mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 21:01:43 +03:00
refactor: rename clawdbot to moltbot with legacy compat
This commit is contained in:
@@ -5,7 +5,7 @@ import {
|
||||
createWriteTool,
|
||||
readTool,
|
||||
} from "@mariozechner/pi-coding-agent";
|
||||
import type { ClawdbotConfig } from "../config/config.js";
|
||||
import type { MoltbotConfig } from "../config/config.js";
|
||||
import { isSubagentSessionKey } from "../routing/session-key.js";
|
||||
import { resolveGatewayMessageChannel } from "../utils/message-channel.js";
|
||||
import { createApplyPatchTool } from "./apply-patch.js";
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
type ProcessToolDefaults,
|
||||
} from "./bash-tools.js";
|
||||
import { listChannelAgentTools } from "./channel-tools.js";
|
||||
import { createClawdbotTools } from "./clawdbot-tools.js";
|
||||
import { createMoltbotTools } from "./moltbot-tools.js";
|
||||
import type { ModelAuthMode } from "./model-auth.js";
|
||||
import { wrapToolWithAbortSignal } from "./pi-tools.abort.js";
|
||||
import {
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
import {
|
||||
assertRequiredParams,
|
||||
CLAUDE_PARAM_GROUPS,
|
||||
createClawdbotReadTool,
|
||||
createMoltbotReadTool,
|
||||
createSandboxedEditTool,
|
||||
createSandboxedReadTool,
|
||||
createSandboxedWriteTool,
|
||||
@@ -78,7 +78,7 @@ function isApplyPatchAllowedForModel(params: {
|
||||
});
|
||||
}
|
||||
|
||||
function resolveExecConfig(cfg: ClawdbotConfig | undefined) {
|
||||
function resolveExecConfig(cfg: MoltbotConfig | undefined) {
|
||||
const globalExec = cfg?.tools?.exec;
|
||||
return {
|
||||
host: globalExec?.host,
|
||||
@@ -104,7 +104,7 @@ export const __testing = {
|
||||
assertRequiredParams,
|
||||
} as const;
|
||||
|
||||
export function createClawdbotCodingTools(options?: {
|
||||
export function createMoltbotCodingTools(options?: {
|
||||
exec?: ExecToolDefaults & ProcessToolDefaults;
|
||||
messageProvider?: string;
|
||||
agentAccountId?: string;
|
||||
@@ -114,7 +114,7 @@ export function createClawdbotCodingTools(options?: {
|
||||
sessionKey?: string;
|
||||
agentDir?: string;
|
||||
workspaceDir?: string;
|
||||
config?: ClawdbotConfig;
|
||||
config?: MoltbotConfig;
|
||||
abortSignal?: AbortSignal;
|
||||
/**
|
||||
* Provider of the currently selected model (used for provider-specific tool quirks).
|
||||
@@ -232,7 +232,7 @@ export function createClawdbotCodingTools(options?: {
|
||||
return [createSandboxedReadTool(sandboxRoot)];
|
||||
}
|
||||
const freshReadTool = createReadTool(workspaceRoot);
|
||||
return [createClawdbotReadTool(freshReadTool)];
|
||||
return [createMoltbotReadTool(freshReadTool)];
|
||||
}
|
||||
if (tool.name === "bash" || tool.name === execToolName) return [];
|
||||
if (tool.name === "write") {
|
||||
@@ -301,7 +301,7 @@ export function createClawdbotCodingTools(options?: {
|
||||
processTool as unknown as AnyAgentTool,
|
||||
// Channel docking: include channel-defined agent tools (login, etc.).
|
||||
...listChannelAgentTools({ cfg: options?.config }),
|
||||
...createClawdbotTools({
|
||||
...createMoltbotTools({
|
||||
sandboxBrowserBridgeUrl: sandbox?.browser?.bridgeUrl,
|
||||
allowHostBrowserControl: sandbox ? sandbox.browserAllowHostControl : true,
|
||||
agentSessionKey: options?.sessionKey,
|
||||
|
||||
Reference in New Issue
Block a user