diff --git a/scripts/build.ts b/scripts/build.ts index 2982f1f8..52b7953c 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -29,7 +29,8 @@ const featureFlags: Record = { ABLATION_BASELINE: false, DUMP_SYSTEM_PROMPT: false, CACHED_MICROCOMPACT: false, - COORDINATOR_MODE: false, + COORDINATOR_MODE: true, + BUILTIN_EXPLORE_PLAN_AGENTS: true, CONTEXT_COLLAPSE: false, COMMIT_ATTRIBUTION: false, TEAMMEM: false, diff --git a/src/coordinator/workerAgent.ts b/src/coordinator/workerAgent.ts new file mode 100644 index 00000000..8e65cf9c --- /dev/null +++ b/src/coordinator/workerAgent.ts @@ -0,0 +1,18 @@ +import type { BuiltInAgentDefinition } from '../tools/AgentTool/loadAgentsDir.js' +import { EXPLORE_AGENT } from '../tools/AgentTool/built-in/exploreAgent.js' +import { GENERAL_PURPOSE_AGENT } from '../tools/AgentTool/built-in/generalPurposeAgent.js' +import { PLAN_AGENT } from '../tools/AgentTool/built-in/planAgent.js' + +// The coordinator system prompt instructs the model to spawn workers with +// subagent_type: "worker". This agent definition matches that type so +// AgentTool.tsx can resolve it. It reuses GENERAL_PURPOSE_AGENT's capabilities. +const WORKER_AGENT: BuiltInAgentDefinition = { + ...GENERAL_PURPOSE_AGENT, + agentType: 'worker', + whenToUse: + 'Worker agent for coordinator mode. Executes tasks autonomously — research, implementation, or verification.', +} + +export function getCoordinatorAgents(): BuiltInAgentDefinition[] { + return [WORKER_AGENT, GENERAL_PURPOSE_AGENT, EXPLORE_AGENT, PLAN_AGENT] +}