Agents: pass agent-scoped image roots

This commit is contained in:
Vincent Koc
2026-03-07 09:19:07 -08:00
parent a66b179b12
commit 28b17181f6

View File

@@ -80,6 +80,12 @@ export function createOpenClawTools(options?: {
? createImageTool({ ? createImageTool({
config: options?.config, config: options?.config,
agentDir: options.agentDir, agentDir: options.agentDir,
agentId:
options?.requesterAgentIdOverride ??
resolveSessionAgentId({
sessionKey: options?.agentSessionKey,
config: options?.config,
}),
workspaceDir, workspaceDir,
sandbox: sandbox:
options?.sandboxRoot && options?.sandboxFsBridge options?.sandboxRoot && options?.sandboxFsBridge
@@ -113,6 +119,7 @@ export function createOpenClawTools(options?: {
? null ? null
: createMessageTool({ : createMessageTool({
agentAccountId: options?.agentAccountId, agentAccountId: options?.agentAccountId,
agentId: options?.requesterAgentIdOverride,
agentSessionKey: options?.agentSessionKey, agentSessionKey: options?.agentSessionKey,
config: options?.config, config: options?.config,
currentChannelId: options?.currentChannelId, currentChannelId: options?.currentChannelId,