From ab441faeba6ce7256b1a597bdaabd1c834646ee4 Mon Sep 17 00:00:00 2001 From: Adam Weidman Date: Mon, 18 May 2026 10:01:01 -0400 Subject: [PATCH] test(core): fix compilation in agent-tool.test.ts by updating getter name --- packages/core/src/agents/agent-tool.test.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/core/src/agents/agent-tool.test.ts b/packages/core/src/agents/agent-tool.test.ts index 09c6cdef11..86636f095d 100644 --- a/packages/core/src/agents/agent-tool.test.ts +++ b/packages/core/src/agents/agent-tool.test.ts @@ -148,7 +148,9 @@ describe('AgentTool', () => { describe('agentSessionSubagentEnabled feature flag', () => { it('should use LocalSessionInvocation when flag is enabled for local agent', async () => { - vi.spyOn(mockConfig, 'isAgentSessionEnabled').mockReturnValue(true); + vi.spyOn(mockConfig, 'isAgentSessionSubagentEnabled').mockReturnValue( + true, + ); tool = new AgentTool(mockConfig, mockMessageBus); const params = { @@ -169,7 +171,9 @@ describe('AgentTool', () => { }); it('should use RemoteSessionInvocation when flag is enabled for remote agent', async () => { - vi.spyOn(mockConfig, 'isAgentSessionEnabled').mockReturnValue(true); + vi.spyOn(mockConfig, 'isAgentSessionSubagentEnabled').mockReturnValue( + true, + ); tool = new AgentTool(mockConfig, mockMessageBus); const params = { @@ -190,7 +194,9 @@ describe('AgentTool', () => { }); it('should use legacy invocations when flag is disabled (default)', async () => { - vi.spyOn(mockConfig, 'isAgentSessionEnabled').mockReturnValue(false); + vi.spyOn(mockConfig, 'isAgentSessionSubagentEnabled').mockReturnValue( + false, + ); tool = new AgentTool(mockConfig, mockMessageBus); const localParams = { @@ -217,7 +223,9 @@ describe('AgentTool', () => { }); it('should thread onAgentEvent to session invocations', async () => { - vi.spyOn(mockConfig, 'isAgentSessionEnabled').mockReturnValue(true); + vi.spyOn(mockConfig, 'isAgentSessionSubagentEnabled').mockReturnValue( + true, + ); const onEvent = vi.fn(); tool = new AgentTool(mockConfig, mockMessageBus, onEvent); @@ -238,7 +246,9 @@ describe('AgentTool', () => { }); it('should always use BrowserAgentInvocation for browser agent regardless of flag', async () => { - vi.spyOn(mockConfig, 'isAgentSessionEnabled').mockReturnValue(true); + vi.spyOn(mockConfig, 'isAgentSessionSubagentEnabled').mockReturnValue( + true, + ); tool = new AgentTool(mockConfig, mockMessageBus); const params = {