docs(config): document agent backend routing and add schema guard test
This commit is contained in:
@@ -261,6 +261,27 @@ hooks:
|
|||||||
# extra_sections: []
|
# extra_sections: []
|
||||||
# context_level: normal # minimal | normal | detailed | debug
|
# context_level: normal # minimal | normal | detailed | debug
|
||||||
|
|
||||||
|
# Optional: named agent profiles and routing.
|
||||||
|
# Each agent can pin model tier, tool profile, sandbox mode, and execution backend.
|
||||||
|
#
|
||||||
|
# agent_configs:
|
||||||
|
# assistant:
|
||||||
|
# system_prompt: You are helpful.
|
||||||
|
# model_tier: default
|
||||||
|
# backend: native # native | codex | claude_code | opencode | gemini
|
||||||
|
# coder:
|
||||||
|
# system_prompt: Write code.
|
||||||
|
# model_tier: complex
|
||||||
|
# backend: codex
|
||||||
|
# sandbox: true
|
||||||
|
#
|
||||||
|
# routing:
|
||||||
|
# default_agent: assistant
|
||||||
|
# channels:
|
||||||
|
# telegram: assistant
|
||||||
|
# senders:
|
||||||
|
# telegram:admin: coder
|
||||||
|
|
||||||
# ── Context Compaction ────────────────────────────────────────────────
|
# ── Context Compaction ────────────────────────────────────────────────
|
||||||
# Optional proactive context monitoring and checkpointing.
|
# Optional proactive context monitoring and checkpointing.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -418,6 +418,19 @@ describe('configSchema — agent_configs', () => {
|
|||||||
expect(result.agent_configs.assistant.tool_profile).toBe('messaging');
|
expect(result.agent_configs.assistant.tool_profile).toBe('messaging');
|
||||||
expect(result.agent_configs.coder.sandbox).toBe(true);
|
expect(result.agent_configs.coder.sandbox).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('rejects invalid backend name in agent config', () => {
|
||||||
|
expect(() => configSchema.parse({
|
||||||
|
...minimalConfig,
|
||||||
|
agent_configs: {
|
||||||
|
assistant: {
|
||||||
|
system_prompt: 'You are helpful.',
|
||||||
|
model_tier: 'default',
|
||||||
|
backend: 'unknown_backend',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})).toThrow();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('configSchema — backends', () => {
|
describe('configSchema — backends', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user