Ship Paseo-equivalent provider snapshot, AgentComposerBar, ACP dispatch rewrite with streaming/persist, permission prompts, and agent commands. Follow-up: pane-scoped chat resolution, CoderMessageList tool timeline, WS user-delta replace, and inference orphan tool_call stripping. Archive openspec v2-2; update CHANGELOG and CURRENT. Co-authored-by: Cursor <cursoragent@cursor.com>
3.2 KiB
3.2 KiB
v2.3 Provider lifecycle (Paseo-style registry)
Status: Planned
Depends on: v2.2 Paseo providers (snapshot, modes, commands, ACP dispatch)
Reference fork: /opt/forks/paseo
Related deferred work: docs/DEFERRED-WORK.md §2 (cold-probe skip)
Why
BooCode v2.2 copied Paseo’s snapshot wire shape (modes, thinking, commands) but not Paseo’s provider lifecycle:
- Providers are hardcoded in
provider-registry.ts; adding one requires a code change and redeploy. - Uninstalled agents disappear from the picker instead of showing “not installed.”
- There is no enable/disable toggle — every probed binary appears.
- Every snapshot cache miss runs a full cold ACP probe for all installed agents (5–30s).
Paseo’s model (see /opt/forks/paseo/public-docs/providers.md) treats providers as registered entries in a config-backed registry, then probes the machine for readiness, then lets the user toggle visibility. That fits a one-person homelab: edit JSON, refresh, flip a switch — no TypeScript deploy for each new ACP CLI.
Scope
In scope
- Config file
/data/coder-providers.json— add/disable/custom ACP providers without code changes - Merged registry — built-ins + config overrides at runtime
- Snapshot lifecycle —
loading|ready|unavailable|error; always list registered providers;enabledflag - Two-tier probe — fast binary check vs slow ACP session (DB
last_probed_atgate) - Generic ACP dispatch — config entries spawn via
{ command, env }without newacp-spawncases - HTTP API — read/patch config, per-provider refresh, optional diagnostic
- Web UI — settings drawer: provider list, enable toggle, refresh, add-from-catalog (curated ~5–10 entries)
- Tests + docs — snapshot unit tests,
BOOCODER.mdrefresh contract
Out of scope (this batch)
- Full Paseo ACP catalog (30+ agents) — curate a small local catalog only
- React Native settings app port
- Replacing
acp-dispatch.tswith Paseo’sACPAgentClienthierarchy - Voice provider stack
- MCP
list_providers/inspect_providertools (Tier 2 follow-up) - WS push of snapshot updates (Tier 2 follow-up)
Non-goals
- Multi-user provider prefs (single-user homelab)
- Installing CLIs from the UI (link to install instructions only, like Paseo)
- Removing
available_agentstable — keep it as probe cache, extend withenabledor mirror config
Success criteria
- Add
amp-acpvia catalog → appears in picker after refresh without coder redeploy - Disable goose in settings → gone from picker, still visible as “Disabled” in settings
- opencode not on PATH → shows “Not installed” in settings, hidden from picker
- Second snapshot open within warm window completes in <500ms (no ACP spawns)
POST /api/providers/refreshstill runs full cold probe- Existing v2.2 dispatch (cursor, opencode, claude, qwen) unchanged for built-ins
Deliverables
| Doc | Purpose |
|---|---|
design.md |
Full architecture, schemas, file map, Tier 3 reference |
tasks.md |
Numbered implementation checklist |