chore: snapshot main sync

This commit is contained in:
2026-06-17 20:08:31 +00:00
parent b18de2a331
commit 8bd32537cf
354 changed files with 10208 additions and 9230 deletions

View File

@@ -1,5 +1,5 @@
/**
* v2.6 Phase 2 — warm-vs-one-shot routing predicate for goose/qwen.
* v2.6 Phase 2 — warm-vs-one-shot routing predicate for ACP chat agents.
*
* The warm ACP backend keys its persistent process + ACP session on (chat_id,
* agent) — exactly like the opencode-server backend. A task therefore only routes
@@ -9,13 +9,13 @@
* Session-less creators — arena contestants, MCP-created tasks, generic
* `POST /api/tasks`, `new_task` — leave one or both null. Those keep the existing
* one-shot worktree-per-task ACP path (`runExternalAgent`), which spawns a fresh
* `goose acp` / `qwen --acp` per turn and never holds a warm process. Routing them
* `goose acp` / `qwen --acp` / `reasonix acp` per turn and never holds a warm process. Routing them
* warm would either synthesize a degenerate (null, agent) key or create a chat per
* arena contestant — neither is wanted, so they stay one-shot.
*
* Pure, so it's unit-testable; the dispatcher consumes it.
*/
const WARM_CAPABLE_AGENTS = new Set(['goose', 'qwen']);
const WARM_CAPABLE_AGENTS = new Set(['goose', 'qwen', 'reasonix']);
export function shouldUseWarmBackend(task: {
agent: string | null;