Rebase conflict resolution introduced a duplicate `mockBrain` variable in
commands.integration.spec.ts. Also fixes prettier formatting on
command-executor-p8012.spec.ts that was introduced during conflict resolution.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- M4-013: Add routing-e2e.test.ts with 9 integration tests covering the full
classify → match rules → routing decision pipeline; includes coding→Opus,
summarization→GLM-5, conversation→Sonnet, cheap-tier→Haiku, /model bypass,
unhealthy-provider fallback, and research→Codex scenarios
- M5-001: Store resolvedAgentName during session creation when agentConfigId
is provided; expose agentName on AgentSession and SessionInfoDto; emit
agentName in session:info from chat.gateway.ts (message handler and
set:thinking handler); preserve userId and conversationHistory in merged
options so they are not lost when agent config is applied
- M5-002: Add AgentService.updateSessionModel() to update live session
modelId metadata; wire it into ChatGateway.setModelOverride() so the
/model command immediately reflects in session:info; add
ChatGateway.broadcastSessionInfo() to push updated session:info to all
clients watching a conversation on model or agent switch
- M5-003: Implement /agent <name> command end-to-end: inject Brain into
CommandExecutorService; replace stub handleAgent() with real
brain.agents.findByName() + findById() lookup; call
agentService.applyAgentConfig() to update live session; emit session:info
via chatGateway.broadcastSessionInfo(); update tests to mock brain and
agentService.applyAgentConfig; add AgentService.applyAgentConfig() method
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>