feat(browser): implement experimental browser agent (#19284)

This commit is contained in:
Gaurav
2026-02-24 09:22:09 -08:00
committed by GitHub
parent 182c858e67
commit 9e95b8b3c5
23 changed files with 3506 additions and 1 deletions
@@ -14,6 +14,8 @@ import type { Config } from '../config/config.js';
import type { AgentDefinition, AgentInputs } from './types.js';
import { LocalSubagentInvocation } from './local-invocation.js';
import { RemoteAgentInvocation } from './remote-invocation.js';
import { BrowserAgentInvocation } from './browser/browserAgentInvocation.js';
import { BROWSER_AGENT_NAME } from './browser/browserAgentDefinition.js';
import type { MessageBus } from '../confirmation-bus/message-bus.js';
/**
@@ -79,6 +81,17 @@ export class SubagentToolWrapper extends BaseDeclarativeTool<
);
}
// Special handling for browser agent - needs async MCP setup
if (definition.name === BROWSER_AGENT_NAME) {
return new BrowserAgentInvocation(
this.config,
params,
effectiveMessageBus,
_toolName,
_toolDisplayName,
);
}
return new LocalSubagentInvocation(
definition,
this.config,