v0.4.12
Highlights
This release adds the Workflows card — per-run aggregates for Claude Code workflow subagent runs (agent count, token breakdown + cost, journal-derived success counts, and a duration span) — surfaced in the session view, backed by ingestion of workflow subagent + journal files and a new capabilities endpoint for CLI feature gating.
Features
- CF-534: Workflows card — per-run subagent aggregates in the session view (#258), with a polished layout that spans 2 columns with roomier spacing (#259).
- CF-532: ingest workflow subagent + journal files (#257) — accept path-encoded
subagents/workflows/<runId>/agent-<id>.jsonltranscripts andworkflow_journalrun journals, with a newGET /api/v1/capabilitiesendpoint so newer CLIs can gate workflow uploads on backend support.
Refactoring / UI
- Collapse TrendsPage layout shell onto the shared
pageLayout(#255). - Polish session-listing toolbar, table header & active-filter chips (#254).
DB Migrations
- 000050_session_card_workflows — Creates the
session_card_workflowstable caching per-run workflow subagent aggregates (line-based invalidation). Columns:session_id(UUID PK, FK →sessionsON DELETE CASCADE),version(INT, default 1),computed_at(TIMESTAMPTZ),up_to_line(BIGINT), andruns(JSONB array of per-run aggregates:run_id,agent_count, token breakdown,estimated_usd,succeeded_agents,has_journal,duration_ms). Adds indexidx_session_card_workflows_version.
API Changes
- New:
GET /api/v1/capabilities— Advertises optional backend features for CLI feature-gating. No auth, no external dependency; the response body is the capabilities map. Returnsworkflow_files(bool) andworkflow_journal(bool), bothtrueon builds that ship this endpoint. Older backends omit the endpoint (404), which the CLI reads as "workflow files unsupported." - Sync upload (
file_type) — now accepts"workflow_journal"in addition to"transcript"and"agent". Path-encodedfile_namevalues with slashes (subagents/workflows/<runId>/agent-<id>.jsonl,.../journal.jsonl) are permitted.workflow_journalfiles are stored and served in the sessionfiles[]API but are never Claude-parsed and never contribute to analytics. - Session analytics (
GET .../analytics) — newcards.workflowsobject (null/omitted when the session has no workflow runs) with aruns[]array of per-run aggregates:run_id,agent_count,input_tokens,output_tokens,cache_creation,cache_read,estimated_usd,succeeded_agents,has_journal,duration_ms. - Card precompute reset —
card_typesnow acceptssession_card_workflows.
Breaking Changes
None. No env vars renamed or removed. The new workflow_journal file_type and capabilities endpoint are additive; rollout order is backend-first (older CLIs are unaffected, and newer CLIs gracefully skip workflow uploads against backends that lack the capabilities endpoint).
Full changelog: v0.4.11...v0.4.12