diff --git a/packages/a2a-server/src/agent/task.ts b/packages/a2a-server/src/agent/task.ts index a76054263f..0adc665754 100644 --- a/packages/a2a-server/src/agent/task.ts +++ b/packages/a2a-server/src/agent/task.ts @@ -10,7 +10,6 @@ import { type GeminiClient, GeminiEventType, ToolConfirmationOutcome, - ApprovalMode, getAllMCPServerStatuses, MCPServerStatus, isNodeError, @@ -89,7 +88,8 @@ export class Task { autoExecute: boolean; private get isYoloMatch(): boolean { return ( - this.autoExecute || this.config.getApprovalMode() === ApprovalMode.YOLO + this.autoExecute || + (this.config.getAllowedTools()?.includes('*') ?? false) ); } @@ -880,9 +880,7 @@ export class Task { if ( part.kind !== 'data' || !part.data || - // eslint-disable-next-line no-restricted-syntax typeof part.data['callId'] !== 'string' || - // eslint-disable-next-line no-restricted-syntax typeof part.data['outcome'] !== 'string' ) { return false; diff --git a/packages/a2a-server/src/http/app.test.ts b/packages/a2a-server/src/http/app.test.ts index c874032074..63bf019d63 100644 --- a/packages/a2a-server/src/http/app.test.ts +++ b/packages/a2a-server/src/http/app.test.ts @@ -121,6 +121,7 @@ describe('E2E Tests', () => { beforeEach(() => { getApprovalModeSpy.mockReturnValue(ApprovalMode.DEFAULT); getAllowedToolsSpy.mockReturnValue([]); + getAllowedToolsSpy.mockReturnValue([]); }); afterAll( diff --git a/packages/cli/src/ui/components/InputPrompt.test.tsx b/packages/cli/src/ui/components/InputPrompt.test.tsx index 5745d04a07..0ada0892c3 100644 --- a/packages/cli/src/ui/components/InputPrompt.test.tsx +++ b/packages/cli/src/ui/components/InputPrompt.test.tsx @@ -4033,7 +4033,6 @@ describe('InputPrompt', () => { unmount(); }); - it('should not show inverted cursor when shell is focused', async () => { props.isEmbeddedShellFocused = true; props.focus = false; diff --git a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx index 497f3e0725..07524ca80c 100644 --- a/packages/cli/src/ui/hooks/useGeminiStream.test.tsx +++ b/packages/cli/src/ui/hooks/useGeminiStream.test.tsx @@ -106,12 +106,10 @@ const MockedGeminiClientClass = vi.hoisted(() => ); const MockedUserPromptEvent = vi.hoisted(() => - vi - .fn() - .mockImplementation(() => ({ - toLogBody: vi.fn(), - toOpenTelemetryAttributes: vi.fn(), - })), + vi.fn().mockImplementation(() => ({ + toLogBody: vi.fn(), + toOpenTelemetryAttributes: vi.fn(), + })), ); const mockParseAndFormatApiError = vi.hoisted(() => vi.fn()); const mockIsBackgroundExecutionData = vi.hoisted(