v0.5.0
First-class OpenCode provider support lands on the web app: session analytics, a hierarchical per-provider/per-model token breakdown card, transcript rendering, and official branding. Minor bump for the new provider surface and the accompanying API + schema additions.
Features
- OpenCode provider — Phase 2 web (#261) — Full web support for OpenCode sessions: analytics compute, the new
tokens_v2peer card (hierarchical token breakdown across multiple LLM providers/models), and transcript UI rendering. Also wires per-line timestamp extraction for OpenCode transcripts (info.time.createdepoch-ms) solast_message_atis populated for OpenCode sessions. - OpenCode official branding (#262, CF-544) — Replace the placeholder OpenCode branding with official brand assets (icon/label/color).
UI
- Workflows card padding (#260, CF-534) — Add horizontal padding to Workflows card rows for roomier spacing.
DB Migrations
- 000051_session_card_tokens_v2 — Adds the
session_card_tokens_v2table: a hierarchical, per-provider/per-model token-usage breakdown (nested JSON tree of total cost →by_provider→models→ token breakdown), used primarily by OpenCode sessions that span multiple LLM providers. Columns:session_id(UUID PK, FK →sessions(id)ON DELETE CASCADE),version(INT, compute-logic version for cache invalidation),computed_at(TIMESTAMPTZ),up_to_line(BIGINT, JSONL line count when computed),data(JSONB). Adds indexidx_session_card_tokens_v2_version. Coexists with the existing flatsession_card_tokenstable for backward compatibility.
API Changes
GET /api/v1/sessions/{external_id}/analytics— Newcards.tokens_v2object in the response. Hierarchical per-provider/per-model token breakdown. Cached for every session and part of the cache-validity gate, but included in the response only when it has provider data (currently OpenCode); omitted for Claude/Codex until their per-model trees are built. Supersedescards.tokensin the UI when present. Fields:total_cost_usd(string, 6dp) — total estimated cost across all providers; sourced from OpenCode's reported per-message cost, falling back to Confab's pricing table only for models OpenCode reports no cost for.total_input/total_output(int) — totals matchingcards.tokens.input/output.by_provider(object) — map of provider id →{cost_usd, models}; each model entry hasinput,output,cache_read,cache_write,reasoning,cost_usd.
Breaking Changes
None. No env vars renamed/removed, no CLI impact. The tokens_v2 API field and the session_card_tokens_v2 table are purely additive.