mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-10 17:04:58 +00:00
refactor(agents): centralize sandbox media and fs policy helpers
This commit is contained in:
@@ -3,6 +3,7 @@ import { resolvePluginTools } from "../plugins/tools.js";
|
||||
import type { GatewayMessageChannel } from "../utils/message-channel.js";
|
||||
import { resolveSessionAgentId } from "./agent-scope.js";
|
||||
import type { SandboxFsBridge } from "./sandbox/fs-bridge.js";
|
||||
import type { ToolFsPolicy } from "./tool-fs-policy.js";
|
||||
import { createAgentsListTool } from "./tools/agents-list-tool.js";
|
||||
import { createBrowserTool } from "./tools/browser-tool.js";
|
||||
import { createCanvasTool } from "./tools/canvas-tool.js";
|
||||
@@ -41,7 +42,7 @@ export function createOpenClawTools(options?: {
|
||||
agentDir?: string;
|
||||
sandboxRoot?: string;
|
||||
sandboxFsBridge?: SandboxFsBridge;
|
||||
workspaceOnly?: boolean;
|
||||
fsPolicy?: ToolFsPolicy;
|
||||
workspaceDir?: string;
|
||||
sandboxed?: boolean;
|
||||
config?: OpenClawConfig;
|
||||
@@ -79,7 +80,7 @@ export function createOpenClawTools(options?: {
|
||||
options?.sandboxRoot && options?.sandboxFsBridge
|
||||
? { root: options.sandboxRoot, bridge: options.sandboxFsBridge }
|
||||
: undefined,
|
||||
workspaceOnly: options?.workspaceOnly,
|
||||
fsPolicy: options?.fsPolicy,
|
||||
modelHasVision: options?.modelHasVision,
|
||||
})
|
||||
: null;
|
||||
|
||||
Reference in New Issue
Block a user