Liking cljdoc? Tell your friends :D

hive-tmux.claude.watch

Watch Claude Code panes server-side and shout each change, so the agent that supervises them hears it through sixth-sense (swarm ss wait) instead of polling tmux.

Strata: Promote step pure: previous pane states + new rows -> states + events Boundary start! / stop! one watcher thread per process, shouts through the host

Events (see hive-tmux.claude.sense for the sense classes): :pane-idle a pane seen working is idle on two ticks in a row :goal-ended goal-active? went true -> false, or Goal achieved appeared :context-high ctx-tokens went from under the threshold to at or over it :pane-waiting the session status went to :waiting (a permission or other human prompt); once per waiting spell :tmux-job a compact | say | goal job ended (via job-ended!)

The first tick only seeds: a pane already idle when the watch starts is not news. Every shout is addressed to :parent, the supervisor's agent id, which is who ss wait hears by default.

Watch Claude Code panes server-side and shout each change, so the agent
that supervises them hears it through sixth-sense (`swarm ss wait`)
instead of polling tmux.

Strata:
  Promote   step            pure: previous pane states + new rows -> states + events
  Boundary  start! / stop!  one watcher thread per process, shouts through the host

Events (see hive-tmux.claude.sense for the sense classes):
  :pane-idle     a pane seen working is idle on two ticks in a row
  :goal-ended    goal-active? went true -> false, or `Goal achieved` appeared
  :context-high  ctx-tokens went from under the threshold to at or over it
  :pane-waiting  the session status went to :waiting (a permission or other
                 human prompt); once per waiting spell
  :tmux-job      a compact | say | goal job ended (via `job-ended!`)

The first tick only seeds: a pane already idle when the watch starts is not
news. Every shout is addressed to :parent, the supervisor's agent id, which
is who `ss wait` hears by default.
raw docstring

defaultsclj

source

job-ended!clj

(job-ended! job)

Shout a finished compact | say | goal JOB to the running watcher's parent. A no-op when no watcher runs: nobody asked to hear it.

Shout a finished compact | say | goal JOB to the running watcher's parent.
A no-op when no watcher runs: nobody asked to hear it.
sourceraw docstring

row-dataclj

(row-data row)

The shout data of an event about ROW.

The shout data of an event about ROW.
sourceraw docstring

running?clj

(running?)
source

shout-symclj

source

start!clj

(start! {:keys [parent] :as opts})

Start (or restart) the watcher. OPTS: :parent (agent id the shouts are addressed to; required), :threshold, :interval-ms, :exclude (refs), :host and :shout-fn (tests).

Start (or restart) the watcher. OPTS: :parent (agent id the shouts are
addressed to; required), :threshold, :interval-ms, :exclude (refs),
:host and :shout-fn (tests).
sourceraw docstring

statusclj

(status)
source

stepclj

(step states rows {:keys [exclude] :as opts})

All panes: STATES (pane id -> state) and ROWS now -> {:states :events}. EXCLUDE (a set of refs) drops panes before they are tracked. A pane that vanished is forgotten.

All panes: STATES (pane id -> state) and ROWS now -> {:states :events}.
EXCLUDE (a set of refs) drops panes before they are tracked. A pane that
vanished is forgotten.
sourceraw docstring

stop!clj

(stop!)

Stop the watcher. Returns its last status, or nil when none ran.

Stop the watcher. Returns its last status, or nil when none ran.
sourceraw docstring

tick!clj

(tick! w)

One pass: read the panes, step, shout every event. Returns the events.

One pass: read the panes, step, shout every event. Returns the events.
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