Expand description
Value surface: makes what lean-ctx did visible outside the dashboard — subtly, outside the model’s context, and with every number provable.
snapshot— a tiny per-session file the MCP server keeps current, so status lines and prompt segments render in microseconds without touching the ledger.format— the shared renderers (one dim line; the branded status line).host— which agent process a session serves, so concurrent agents in one project each see their own numbers.proof— recomputes each number from the hash-chained savings ledger and audit trail and verifies both chains (lean-ctx value).recap— when a host hook speaks up (turn and session recaps, weekly digest), always as a user-only message, never into the model’s context.milestones— a native desktop notification (notify) when a verified lifetime threshold is first crossed; at most one a day.
Modules§
- format
- Shared renderers for the value surface. Subtle by construction: one dim line, no exclamation, nothing when there is nothing measured to say.
- host
- Which agent process a lean-ctx session serves.
- milestones
- Milestones: the rare moments lean-ctx speaks up on its own — a native desktop notification when a lifetime threshold is first crossed.
- notify
- Native desktop notifications without a new dependency:
osascripton macOS,notify-sendon Linux desktops, a WinRT toast via PowerShell on Windows. Title and body are passed as arguments or environment variables, never spliced into a script, so no text can be interpreted. - proof
lean-ctx value: every number the value surface shows, re-derived from the two tamper-evident chains instead of the display counters.- recap
- Turn and session recaps: when lean-ctx says something, and what.
- snapshot
- Per-session value snapshot: the small file every display channel reads.
Functions§
- current_
session - The session this process is serving, if it is an MCP server that has
handled a tool call.
Nonefor CLI, hook and proxy processes. - display_
enabled - Whether any value display is on (
[value_display] mode, overridable viaLEAN_CTX_VALUE_DISPLAY). The proof chains are written regardless; this only gates the display snapshot and the user-facing channels. - set_
current_ session - Marks
idas the session this process is serving. Ledger events and security events recorded afterwards commit it into their hashes.