Skip to content

v0.4.12

Choose a tag to compare

@mkjt2 mkjt2 released this 05 Jun 19:59
· 84 commits to main since this release
05c082d

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>.jsonl transcripts and workflow_journal run journals, with a new GET /api/v1/capabilities endpoint 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_workflows table caching per-run workflow subagent aggregates (line-based invalidation). Columns: session_id (UUID PK, FK → sessions ON DELETE CASCADE), version (INT, default 1), computed_at (TIMESTAMPTZ), up_to_line (BIGINT), and runs (JSONB array of per-run aggregates: run_id, agent_count, token breakdown, estimated_usd, succeeded_agents, has_journal, duration_ms). Adds index idx_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. Returns workflow_files (bool) and workflow_journal (bool), both true on 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-encoded file_name values with slashes (subagents/workflows/<runId>/agent-<id>.jsonl, .../journal.jsonl) are permitted. workflow_journal files are stored and served in the session files[] API but are never Claude-parsed and never contribute to analytics.
  • Session analytics (GET .../analytics) — new cards.workflows object (null/omitted when the session has no workflow runs) with a runs[] 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 resetcard_types now accepts session_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