File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import type { OpenClawConfig } from "../config/config.js";
99import type { ModelAuthMode } from "./model-auth.js" ;
1010import type { AnyAgentTool } from "./pi-tools.types.js" ;
1111import type { SandboxContext } from "./sandbox.js" ;
12+ import { parseBindMountHostPaths } from "./sandbox/fs-bridge.js" ;
1213import { logWarn } from "../logger.js" ;
1314import { getPluginToolMeta } from "../plugins/tools.js" ;
1415import { isSubagentSessionKey } from "../routing/session-key.js" ;
@@ -238,9 +239,7 @@ export function createOpenClawCodingTools(options?: {
238239 const execConfig = resolveExecConfig ( { cfg : options ?. config , agentId } ) ;
239240 const sandboxRoot = sandbox ?. workspaceDir ;
240241 const sandboxFsBridge = sandbox ?. fsBridge ;
241- const sandboxAllowedPaths = sandbox ?. docker . binds
242- ?. map ( ( b ) => b . split ( ":" ) [ 0 ] )
243- . filter ( Boolean ) ;
242+ const sandboxAllowedPaths = parseBindMountHostPaths ( sandbox ?. docker . binds ) ;
244243 const allowWorkspaceWrites = sandbox ?. workspaceAccess !== "ro" ;
245244 const workspaceRoot = options ?. workspaceDir ?? process . cwd ( ) ;
246245 const applyPatchConfig = options ?. config ?. tools ?. exec ?. applyPatch ;
You can’t perform that action at this time.
0 commit comments