feat: wire agent.delegate tool with sub-agent configs

- Export createAgentDelegateTool through builtin/index.ts → tools/index.ts
- Register agent.delegate in routing.ts with lazy orchestrator pattern
- Add agent.delegate + agents.list to messaging and coding policy profiles
- Add group:agents tool group to policy.ts
- Add research/code/comms agent config examples to default.yaml
- Add research/code/comms agent configs to user config.yaml
- Add 11 tests for agent-delegate tool (all pass)
- Typecheck clean, no regressions
This commit is contained in:
William Valentin
2026-02-17 10:28:29 -08:00
parent 288ef5ac3c
commit 776b47f80f
16 changed files with 890 additions and 4 deletions
+2
View File
@@ -41,6 +41,7 @@ describe('AgentConfigRegistry', () => {
assistant: {
system_prompt: 'Be helpful.',
model_tier: 'default',
backend: 'codex',
tool_profile: 'messaging',
sandbox: false,
},
@@ -58,6 +59,7 @@ describe('AgentConfigRegistry', () => {
}
expect(assistant.systemPrompt).toBe('Be helpful.');
expect(assistant.modelTier).toBe('default');
expect(assistant.backend).toBe('codex');
expect(assistant.toolProfile).toBe('messaging');
const coder = registry.get('coder');
+3
View File
@@ -5,6 +5,7 @@ export interface AgentConfig {
name: string;
systemPrompt?: string;
modelTier?: ModelTier;
backend?: 'native' | 'claude_code' | 'opencode' | 'codex' | 'gemini';
toolProfile?: ToolProfile;
toolOverrides?: ToolOverrideConfig;
sandbox?: boolean;
@@ -39,6 +40,7 @@ export class AgentConfigRegistry {
loadFromConfig(rawConfigs: Record<string, {
system_prompt?: string;
model_tier?: string;
backend?: 'native' | 'claude_code' | 'opencode' | 'codex' | 'gemini';
tool_profile?: string;
tool_overrides?: ToolOverrideConfig;
sandbox?: boolean;
@@ -48,6 +50,7 @@ export class AgentConfigRegistry {
name,
systemPrompt: raw.system_prompt,
modelTier: raw.model_tier as ModelTier | undefined,
backend: raw.backend,
toolProfile: raw.tool_profile as ToolProfile | undefined,
toolOverrides: raw.tool_overrides,
sandbox: raw.sandbox,