Rework opencode stack into the Clover Agent
Introduce the detached-session architecture across three new packages:
- agent-protocol: the wire contract between a backend session and its client.
A durable flat LogEntry log plus seq-ordered Deltas that fold in, giving
exactly-once resume across webview reloads and backend restarts. Adds the
backend-wide sync tier (backend.hello resync + revisioned entity events),
placement, session projection, and model catalog.
- agent-backend: detached workers own each provider session (claude/codex) and
its durable recording, so restarting the backend does not restart a live
harness. Sessions reused by id; per-client selection with pushed user profile
and workspace presence. HTTP + WebSocket surface, session hub/store/recorder,
process registry, idle shutdown.
- agent-ui: the webview + standalone vite harness (Conversation, PromptComposer,
pickers, context meter, markdown, live/replay store).
Rewire the extension onto backend-client/backend-process and the clover webview,
dropping the old proxy/supervisor/server/plan-review/theme-bridge tree. Rebrand
opencode -> clover (assets, svg, readme). browser-mcp gains tabs + settings and
drops the old state module. claude-bridge swaps the profile menu for the controls
tui.
Assisted-by: claude-opus-4.8