Liking cljdoc? Tell your friends :D

hive-tmux.claude.ready

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.

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.
raw docstring

->msclj

(->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.
sourceraw docstring

agent-idsclj

(agent-ids row)

The hivemind agent ids ROW's coordinator shouts as.

The hivemind agent ids ROW's coordinator shouts as.
sourceraw docstring

blockersclj

(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.
sourceraw docstring

candidate?clj

(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.
sourceraw docstring

coordinator-tokensclj

(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>`).
sourceraw docstring

evidence-afterclj

(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.
sourceraw docstring

file-leaseclj

(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])}.
sourceraw docstring

host-evidenceclj

(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>.
sourceraw docstring

host-silencerclj

(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.
sourceraw docstring

lease-fileclj

(lease-file)
source

lease-ttl-msclj

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.
sourceraw docstring

lease-verdictclj

(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.
sourceraw docstring

newest-handoffclj

(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.
sourceraw docstring

own-row?clj

(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>`)?
sourceraw docstring

reseed-templateclj

source

reseed-textclj

(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.
sourceraw docstring

silence-symclj

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`).
sourceraw docstring

verdictclj

(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 [...]}.
sourceraw docstring

wrapped-atclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close