feat(core): introduce Kind.Agent for sub-agent classification (#20369)

This commit is contained in:
Abhi
2026-02-25 20:04:20 -05:00
committed by GitHub
parent f9f916e1dc
commit 28c9a907de
6 changed files with 12 additions and 3 deletions
@@ -7,6 +7,7 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { SubagentTool } from './subagent-tool.js';
import { SubagentToolWrapper } from './subagent-tool-wrapper.js';
import { Kind } from '../tools/tools.js';
import type {
LocalAgentDefinition,
RemoteAgentDefinition,
@@ -70,6 +71,11 @@ describe('SubAgentInvocation', () => {
.mockReturnValue(mockInnerInvocation);
});
it('should have Kind.Agent', () => {
const tool = new SubagentTool(testDefinition, mockConfig, mockMessageBus);
expect(tool.kind).toBe(Kind.Agent);
});
it('should delegate shouldConfirmExecute to the inner sub-invocation (local)', async () => {
const tool = new SubagentTool(testDefinition, mockConfig, mockMessageBus);
const params = {};