Liking cljdoc? Tell your friends :D

hive-tmux.claude.screen

Pure reading of a Claude Code pane: the captured screen lines of one tmux pane in, the facts a supervisor needs out.

Stratum: Promote. Nothing here touches tmux, the filesystem or a clock; the lines come from hive-tmux.claude.panes, which is the Boundary.

What the screen carries (Claude Code 2.1.x):

  • Working… (26m 48s · ↓ 29.8k tokens) <- spinner line while a turn runs 260803 tokens · ◎ /goal active (26m) <- status line: context size, goal ──────────── caveman skill hydration ─ <- footer rule naming the session ❯ <- the prompt -- INSERT -- ⏵⏵ auto mode on <- vim mode + permission mode

The context count is the bare NNN tokens that opens the status line. The spinner line also says 29.8k tokens, which is the turn's output, so only a first segment made of digits and tokens counts.

Matching is plain string work, no regex: every shape here is a fixed glyph or word at a fixed edge of a line.

Pure reading of a Claude Code pane: the captured screen lines of one tmux
pane in, the facts a supervisor needs out.

Stratum: Promote. Nothing here touches tmux, the filesystem or a clock; the
lines come from `hive-tmux.claude.panes`, which is the Boundary.

What the screen carries (Claude Code 2.1.x):

  * Working… (26m 48s · ↓ 29.8k tokens)      <- spinner line while a turn runs
      260803 tokens · ◎ /goal active (26m)   <- status line: context size, goal
  ──────────── caveman skill hydration ─       <- footer rule naming the session
  ❯                                            <- the prompt
    -- INSERT -- ⏵⏵ auto mode on               <- vim mode + permission mode

The context count is the bare `NNN tokens` that opens the status line. The
spinner line also says `29.8k tokens`, which is the turn's output, so only a
first segment made of digits and ` tokens` counts.

Matching is plain string work, no regex: every shape here is a fixed glyph
or word at a fixed edge of a line.
raw docstring

activity-ofclj

(activity-of line)

The running-turn text of a spinner LINE (✶ Percolating… (23m 49s · …)), or nil. The line opens with one non-word glyph, then a word ending in ….

The running-turn text of a spinner LINE (`✶ Percolating… (23m 49s · …)`), or
nil. The line opens with one non-word glyph, then a word ending in `…`.
sourceraw docstring

bodyclj

(body lines n)

The conversation part of LINES: everything above the prompt minus the chrome Claude Code draws under it (spinner, finished-turn line, status line, tip, footer rule), trailing blank lines dropped, at most N lines from the bottom. A screen with no prompt is returned whole, last N lines. No-break spaces, which Claude Code draws inside its chrome (⎿ + U+00A0 + Tip:), read as plain spaces, and escapes (a capture-pane -e capture) are removed.

The conversation part of LINES: everything above the prompt minus the
chrome Claude Code draws under it (spinner, finished-turn line, status line,
tip, footer rule), trailing blank lines dropped, at most N lines from the
bottom. A screen with no prompt is returned whole, last N lines. No-break
spaces, which Claude Code draws inside its chrome (`⎿` + U+00A0 + `Tip:`),
read as plain spaces, and escapes (a `capture-pane -e` capture) are removed.
sourceraw docstring

ctx-tokens-ofclj

(ctx-tokens-of line)

The context size a status LINE opens with (260803 tokens · …), or nil.

The context size a status LINE opens with (`260803 tokens · …`), or nil.
sourceraw docstring

(footer-name-of line)

The session name on a footer rule LINE (──── name ─), or nil.

The session name on a footer rule LINE (`──── name ─`), or nil.
sourceraw docstring

goal-ofclj

(goal-of line)

{:age str-or-nil} when LINE shows an active /goal, else nil.

{:age str-or-nil} when LINE shows an active /goal, else nil.
sourceraw docstring

read-screenclj

(read-screen lines)

The facts of LINES, a pane capture top to bottom, escapes kept (tmux capture-pane -e) or not. A screen with no prompt is :claude? false with every fact nil: not a Claude Code pane, or one mid-redraw, and either way nothing on it can be trusted.

:input is what stands after ❯ on the prompt line and was typed by someone; a sender must not type over it. :suggestion is the dimmed (SGR 2) ghost text Claude Code predicts there, only when prompt-split can PROVE it is ghost text: no one typed it, a sender may type over it. Dim text it cannot prove (a voice-dictation interim range, dim beside typed text, a box cut off by the capture, a capture without escapes) reads as :input, the safe side.

:goal-ended? is true when no goal is active and the screen still shows Claude Code's Goal achieved line: the pane finished its goal and waits for new work.

The facts of LINES, a pane capture top to bottom, escapes kept (`tmux
capture-pane -e`) or not. A screen with no prompt is `:claude? false` with
every fact nil: not a Claude Code pane, or one mid-redraw, and either way
nothing on it can be trusted.

:input is what stands after `❯` on the prompt line and was typed by
someone; a sender must not type over it. :suggestion is the dimmed (SGR 2)
ghost text Claude Code predicts there, only when `prompt-split` can PROVE
it is ghost text: no one typed it, a sender may type over it. Dim text it
cannot prove (a voice-dictation interim range, dim beside typed text, a
box cut off by the capture, a capture without escapes) reads as :input,
the safe side.

:goal-ended? is true when no goal is active and the screen still shows
Claude Code's `Goal achieved` line: the pane finished its goal and waits
for new work.
sourceraw docstring

Screenclj

What one pane's screen says. A fact is nil when the screen does not say it, which is different from false: an unreadable pane is not an idle one.

:input is text someone typed at the prompt; :suggestion is the dimmed (SGR 2) ghost text Claude Code predicts there, which no one typed.

What one pane's screen says. A fact is nil when the screen does not say it,
which is different from false: an unreadable pane is not an idle one.

:input is text someone typed at the prompt; :suggestion is the dimmed
(SGR 2) ghost text Claude Code predicts there, which no one typed.
sourceraw docstring

sgr-runsclj

(sgr-runs line)

LINE as [[text dim?] ...]: the visible text in order, split where SGR faint turns on or off, escapes removed. Adjacent runs never share dim?.

LINE as [[text dim?] ...]: the visible text in order, split where SGR
faint turns on or off, escapes removed. Adjacent runs never share dim?.
sourceraw docstring

strip-ansiclj

(strip-ansi line)

LINE without escape sequences.

LINE without escape sequences.
sourceraw docstring

title-nameclj

(title-name title)

The session name in a tmux pane title such as "✳ caveman skill load": the title minus its leading status glyphs. Nil for a blank title.

The session name in a tmux pane title such as "✳ caveman skill load": the
title minus its leading status glyphs. Nil for a blank title.
sourceraw docstring

utrimclj

(utrim s)

S without leading and trailing space of any kind. str/trim keeps U+00A0, and Claude Code draws its empty prompt as ❯ + NO-BREAK SPACE, so a plain trim reads every idle prompt as pending input.

S without leading and trailing space of any kind. `str/trim` keeps U+00A0,
and Claude Code draws its empty prompt as `❯` + NO-BREAK SPACE, so a plain
trim reads every idle prompt as pending input.
sourceraw docstring

voice-marksclj

What Claude Code 2.1.x draws under the prompt while voice dictation runs: recording (hold or tap mode), push-to-talk held, transcribing. Its interim transcript is drawn dim INSIDE the value the human is composing, so while any of these shows, dim text at the prompt is the human's own words.

What Claude Code 2.1.x draws under the prompt while voice dictation runs:
recording (hold or tap mode), push-to-talk held, transcribing. Its interim
transcript is drawn dim INSIDE the value the human is composing, so while
any of these shows, dim text at the prompt is the human's own words.
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