refactor: rename to openclaw

This commit is contained in:
Peter Steinberger
2026-01-30 03:15:10 +01:00
parent 4583f88626
commit 9a7160786a
2357 changed files with 16688 additions and 16788 deletions

View File

@@ -1,4 +1,4 @@
import type { MoltbotConfig } from "../../config/config.js";
import type { OpenClawConfig } from "../../config/config.js";
import { canonicalizeMainSessionAlias, resolveAgentMainSessionKey } from "../../config/sessions.js";
import { resolveSessionAgentId } from "../agent-scope.js";
import { expandToolGroups } from "../tool-policy.js";
@@ -13,7 +13,10 @@ function shouldSandboxSession(cfg: SandboxConfig, sessionKey: string, mainSessio
return sessionKey.trim() !== mainSessionKey.trim();
}
function resolveMainSessionKeyForSandbox(params: { cfg?: MoltbotConfig; agentId: string }): string {
function resolveMainSessionKeyForSandbox(params: {
cfg?: OpenClawConfig;
agentId: string;
}): string {
if (params.cfg?.session?.scope === "global") return "global";
return resolveAgentMainSessionKey({
cfg: params.cfg,
@@ -22,7 +25,7 @@ function resolveMainSessionKeyForSandbox(params: { cfg?: MoltbotConfig; agentId:
}
function resolveComparableSessionKeyForSandbox(params: {
cfg?: MoltbotConfig;
cfg?: OpenClawConfig;
agentId: string;
sessionKey: string;
}): string {
@@ -33,7 +36,10 @@ function resolveComparableSessionKeyForSandbox(params: {
});
}
export function resolveSandboxRuntimeStatus(params: { cfg?: MoltbotConfig; sessionKey?: string }): {
export function resolveSandboxRuntimeStatus(params: {
cfg?: OpenClawConfig;
sessionKey?: string;
}): {
agentId: string;
sessionKey: string;
mainSessionKey: string;
@@ -67,7 +73,7 @@ export function resolveSandboxRuntimeStatus(params: { cfg?: MoltbotConfig; sessi
}
export function formatSandboxToolPolicyBlockedMessage(params: {
cfg?: MoltbotConfig;
cfg?: OpenClawConfig;
sessionKey?: string;
toolName: string;
}): string | undefined {
@@ -111,7 +117,7 @@ export function formatSandboxToolPolicyBlockedMessage(params: {
lines.push(`- Use main session key (direct): ${runtime.mainSessionKey}`);
}
lines.push(
`- See: ${formatCliCommand(`moltbot sandbox explain --session ${runtime.sessionKey}`)}`,
`- See: ${formatCliCommand(`openclaw sandbox explain --session ${runtime.sessionKey}`)}`,
);
return lines.join("\n");