compact-ready (S2, card 20261122160542-14c8ef6c): when a Claude pane may be compacted without losing anything, and the one compactor that may act on it.
A pane is compact-ready only when ALL hold:
compact/idle?);compact/open-dialog?);Strata: Promote verdict / reseed-text / agent-ids / lease-verdict pure Port evidence (row -> {:wrapped-at :handoff}), lease {:read :write!}, silence (row -> result) fns Boundary host-evidence / file-lease / host-silencer soft-resolved host fns, one file
Exactly ONE compactor (decision 20261121215259-7b40b779): auto-compact holds a lease naming its owner; a second owner is refused while the lease is fresh.
compact-ready (S2, card 20261122160542-14c8ef6c): when a Claude pane may be
compacted without losing anything, and the one compactor that may act on it.
A pane is compact-ready only when ALL hold:
- its context is at or over the threshold;
- it is idle (`compact/idle?`);
- its prompt line is empty (:input nil): nobody is typing;
- no dialog is open and the session is not :waiting (`compact/open-dialog?`);
- its coordinator said it is done: it shouted WRAPPED, or a memory tagged
handoff for its agent-session was updated, AFTER the context crossed
the threshold.
Evidence is always matched by the session (its id prefix or its pid, the
two ways a coordinator is named), never by the pane: pane ids are reused
across restarts (friction 181557dd).
Strata:
Promote verdict / reseed-text / agent-ids / lease-verdict pure
Port evidence (row -> {:wrapped-at :handoff}), lease {:read :write!},
silence (row -> result) fns
Boundary host-evidence / file-lease / host-silencer soft-resolved host fns, one file
Exactly ONE compactor (decision 20261121215259-7b40b779): auto-compact
holds a lease naming its owner; a second owner is refused while the lease
is fresh.(->ms x)Epoch ms of X: a number, an inst, or an ISO-8601 (zoned) string; else nil.
Epoch ms of X: a number, an inst, or an ISO-8601 (zoned) string; else nil.
(agent-ids row)The hivemind agent ids ROW's coordinator shouts as.
The hivemind agent ids ROW's coordinator shouts as.
(blockers row threshold crossed-at evidence)Why ROW is not compact-ready at THRESHOLD, its context having crossed it at CROSSED-AT, given EVIDENCE: a vector of keywords, empty when ready.
Why ROW is not compact-ready at THRESHOLD, its context having crossed it at CROSSED-AT, given EVIDENCE: a vector of keywords, empty when ready.
(candidate? row threshold)Does ROW pass every cheap condition, so only the coordinator's word is missing? Keeps the evidence port off busy, typing and waiting panes.
Does ROW pass every cheap condition, so only the coordinator's word is missing? Keeps the evidence port off busy, typing and waiting panes.
(coordinator-tokens row)The ids a coordinator of ROW's session goes by: the first 8 characters of
its session id and its pid, as strings (coordinator:<token>, and the tag
agent-session:coordinator:<token>).
The ids a coordinator of ROW's session goes by: the first 8 characters of its session id and its pid, as strings (`coordinator:<token>`, and the tag `agent-session:coordinator:<token>`).
(evidence-after evidence crossed-at)The part of EVIDENCE ({:wrapped-at ms, :handoff {:id :updated-ms}}) newer than CROSSED-AT: {:by :handoff :handoff-id id :at ms} (a hand-off names what to read, so it wins), {:by :wrapped :at ms}, or nil.
The part of EVIDENCE ({:wrapped-at ms, :handoff {:id :updated-ms}}) newer
than CROSSED-AT: {:by :handoff :handoff-id id :at ms} (a hand-off names
what to read, so it wins), {:by :wrapped :at ms}, or nil.(file-lease)(file-lease f)The lease port over one EDN file (default lease-file), shared by every
process on the host: {:read (fn [] lease-or-nil) :write! (fn [lease-or-nil])}.
The lease port over one EDN file (default `lease-file`), shared by every
process on the host: {:read (fn [] lease-or-nil) :write! (fn [lease-or-nil])}.(host-evidence)The evidence port over the host, resolved softly: a fn of ROW -> {:wrapped-at ms :handoff {:id :updated-ms}} (keys absent when unknown). WRAPPED is read from the hivemind messages of each of the session's agent ids, the hand-off from memory rows tagged handoff and agent-session:coordinator:<token>.
The evidence port over the host, resolved softly: a fn of ROW ->
{:wrapped-at ms :handoff {:id :updated-ms}} (keys absent when unknown).
WRAPPED is read from the hivemind messages of each of the session's agent
ids, the hand-off from memory rows tagged handoff and
agent-session:coordinator:<token>.(host-silencer)A fn of ROW that silences its session's wakers through the host, or nil.
A fn of ROW that silences its session's wakers through the host, or nil.
A compactor lease not renewed for this long is free for another owner.
A compactor lease not renewed for this long is free for another owner.
(lease-verdict lease owner now takeover?)May OWNER hold the compactor lease LEASE ({:owner :renewed-ms} or nil) at
NOW? {:ok? true}, or {:ok? false :holder owner :renewed-ms ms}. A lease
not renewed for lease-ttl-ms is free; TAKEOVER? takes a fresh one.
May OWNER hold the compactor lease LEASE ({:owner :renewed-ms} or nil) at
NOW? {:ok? true}, or {:ok? false :holder owner :renewed-ms ms}. A lease
not renewed for `lease-ttl-ms` is free; TAKEOVER? takes a fresh one.(newest-handoff entries)The newest of ENTRIES (memory rows tagged handoff for the session): {:id :updated-ms}, or nil.
The newest of ENTRIES (memory rows tagged handoff for the session):
{:id :updated-ms}, or nil.(own-row? row agent-id)Does ROW show the session of AGENT-ID (a coordinator:<token>)?
Does ROW show the session of AGENT-ID (a `coordinator:<token>`)?
(reseed-text {:keys [handoff-id]})The re-seed after an auto-compact: catchup, then the hand-off it names.
The re-seed after an auto-compact: catchup, then the hand-off it names.
A host fn that silences a session's own event wakers (its sixth-sense
monitor, its short awaits), {:agent-ids [...] :session-id s} -> result.
Resolved softly; absent, only this watcher's own shouts to that
coordinator are held (hive-tmux.claude.watch).
A host fn that silences a session's own event wakers (its sixth-sense
monitor, its short awaits), {:agent-ids [...] :session-id s} -> result.
Resolved softly; absent, only this watcher's own shouts to that
coordinator are held (`hive-tmux.claude.watch`).(verdict row threshold crossed-at evidence){:ready? true :evidence e} when ROW is compact-ready (see the ns doc), else {:ready? false :blockers [...]}.
{:ready? true :evidence e} when ROW is compact-ready (see the ns doc),
else {:ready? false :blockers [...]}.(wrapped-at messages)The newest time one of MESSAGES (a coordinator's hivemind rows) says WRAPPED, or nil.
The newest time one of MESSAGES (a coordinator's hivemind rows) says WRAPPED, or nil.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |