Skip to content

levain 0.7.2

Choose a tag to compare

@phillipclapham phillipclapham released this 10 Oct 18:28
· 3760 commits to main since this release

The cockpit's read side: one manifest, the dashboard drawn from it, and a server's own panels in it.

Changed

  • The state line now reaches a running session when it changes, and lasts 12 hours. Claude Code and Codex sessions read it on the next prompt after a change, once per change, not only at session start. It expires after 12 hours (was 8), everywhere it is shown.

Removed

  • levain focus and the focus line are gone. The state line replaces them: levain state "..." sets it, levain state --clear removes it. A web or API write of kind focus is refused as an unknown kind, the TUI has no f key, and the cockpit draws no focus line. A session-start hook from an older release that levain update left pending still runs; it shows no focus line.

Added

  • levain.cockpit: one manifest and one panel route, read side only. GET /cockpit/manifest.json lists every panel (kind, priority, status, count, freshness, ETag) and GET /cockpit/panel/<id>.json serves one panel's rows or value, in a full or compact profile, with ?q= to search row bodies and ?row=<id> for one row in full. The kernel orders the rows once (a registered ordering with groups, so the Tray's TODAY / OVERDUE / ALSO bands are part of the order), computes status from a typed provider result (Read, Absent or Fault, so only a confirmed read of zero rows says empty), and a failed or silent refresher reads as error, not as a frozen ok. Both routes ride the dashboard's existing read gate; the responses are Cache-Control: private with Vary on the token header, so a shared cache never serves one caller's manifest to another. The built-in panels cover everything the dashboard shows. Nothing here writes: verbs and tiers are the next slice. JobStore.list_recent is new beside it, and scripts/cockpit_payload_diff.py diffs a saved or live payload against the design's field map.

  • The web dashboard can draw itself from the cockpit manifest: open it as /?source=manifest. The same components render the kernel's panels, in the kernel's order and bands, with each panel's status and freshness. That view is read-only: edits, and the actions a server registers, stay on the plain URL, which is unchanged and still the default.

  • A server's own panels (make_server(extra_panels=...)) appear in the manifest view. Each becomes a manifest panel in its zone, under the id ext:<id>: lines become a list that keeps the server's order and its meta text, markdown becomes a prose panel, and a panel's note, empty text and error are shown once. The server's callable runs once per refresh however many panels read it, and a call that does not answer within 8 s shows as not answering instead of holding the page.