docs(config): document agent backend routing and add schema guard test

This commit is contained in:
William Valentin
2026-02-17 09:40:11 -08:00
parent ea0988e2f9
commit 1f3d35726b
2 changed files with 34 additions and 0 deletions
+21
View File
@@ -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.
# #
+13
View File
@@ -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', () => {