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:
@@ -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');
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user