diff --git a/packages/a2a-server/src/commands/memory.ts b/packages/a2a-server/src/commands/memory.ts index b29b8ae4d5..f7c3dfa896 100644 --- a/packages/a2a-server/src/commands/memory.ts +++ b/packages/a2a-server/src/commands/memory.ts @@ -104,7 +104,7 @@ export class AddMemoryCommand implements Command { const signal = abortController.signal; await tool.buildAndExecute(result.toolArgs, signal, undefined, { sanitizationConfig: DEFAULT_SANITIZATION_CONFIG, - sandboxManager: context.config.sandboxManager, + sandboxManager: loopContext.sandboxManager, }); await refreshMemory(context.config); return { diff --git a/packages/a2a-server/src/utils/testing_utils.ts b/packages/a2a-server/src/utils/testing_utils.ts index 83c66aab99..fd4d721732 100644 --- a/packages/a2a-server/src/utils/testing_utils.ts +++ b/packages/a2a-server/src/utils/testing_utils.ts @@ -23,6 +23,7 @@ import { type Storage, NoopSandboxManager, type ToolRegistry, + type SandboxManager, } from '@google/gemini-cli-core'; import { createMockMessageBus } from '@google/gemini-cli-core/src/test-utils/mock-message-bus.js'; import { expect, vi } from 'vitest'; @@ -99,7 +100,8 @@ export function createMockConfig( getGitService: vi.fn(), validatePathAccess: vi.fn().mockReturnValue(undefined), getShellExecutionConfig: vi.fn().mockReturnValue({ - sandboxManager: new NoopSandboxManager(), + // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion + sandboxManager: new NoopSandboxManager() as unknown as SandboxManager, sanitizationConfig: { allowedEnvironmentVariables: [], blockedEnvironmentVariables: [],