Liking cljdoc? Tell your friends :D

hive-tmux.claude.answer

Answer the option menu a Claude Code pane is showing.

Parsing and selection are pure. All screen reads and key writes go through the existing host port; this namespace never starts a compaction job.

This verb sits on the operator's consent boundary. It answers only a menu it can positively read, refuses a permission dialog unless the caller passes permission? with an expect text from the dialog, never chooses a standing grant, re-reads the pane before Enter, and audits every attempt to a file whether or not a job is running on the pane.

Answer the option menu a Claude Code pane is showing.

Parsing and selection are pure. All screen reads and key writes go through
the existing host port; this namespace never starts a compaction job.

This verb sits on the operator's consent boundary. It answers only a menu
it can positively read, refuses a permission dialog unless the caller
passes permission? with an expect text from the dialog, never chooses a
standing grant, re-reads the pane before Enter, and audits every attempt
to a file whether or not a job is running on the pane.
raw docstring

*audit!*clj

The audit sink answer! uses when OPTS carry no :audit!. Tests bind it.

The audit sink `answer!` uses when OPTS carry no :audit!. Tests bind it.
sourceraw docstring

*audit-file*clj

A java.io.File overriding audit-file, or nil. Tests bind it.

A java.io.File overriding `audit-file`, or nil. Tests bind it.
sourceraw docstring

answer!clj

(answer! h row option)
(answer! h row option {:keys [actor opts audit!] :or {opts {}} :as gate-opts})

Answer the live menu on the pane ROW names, OPTION being its printed number or exact label. OPTS: :actor (recorded), :permission? and :expect (see gate), :audit! (fn of one record, default append-audit!) and :opts (timing overrides of defaults).

Nothing is sent unless the screen parses as one live menu and the gate passes. The arrows go first; the pane is then read again, and Enter goes only when the same menu (question and labels) shows with the highlight on the chosen row, else :menu-changed with the keys already sent. Once Enter is delivered the result is :delivered? true, never a failure: :confirmed? says whether the menu closed and :next-menu shows a different menu that took its place. Every outcome is audited.

Answer the live menu on the pane ROW names, OPTION being its printed number
or exact label. OPTS: :actor (recorded), :permission? and :expect (see
`gate`), :audit! (fn of one record, default `append-audit!`) and :opts
(timing overrides of `defaults`).

Nothing is sent unless the screen parses as one live menu and the gate
passes. The arrows go first; the pane is then read again, and Enter goes
only when the same menu (question and labels) shows with the highlight on
the chosen row, else :menu-changed with the keys already sent. Once Enter
is delivered the result is :delivered? true, never a failure: :confirmed?
says whether the menu closed and :next-menu shows a different menu that
took its place. Every outcome is audited.
sourceraw docstring

append-audit!clj

(append-audit! record)

Append RECORD to audit-file, durably (the file is flushed and closed).

Append RECORD to `audit-file`, durably (the file is flushed and closed).
sourceraw docstring

audit-fileclj

(audit-file)

Where every answer attempt is appended, one EDN map per line: $XDG_STATE_HOME/hive-tmux/answers.edn, else ~/.local/state/hive-tmux/.

Where every answer attempt is appended, one EDN map per line:
$XDG_STATE_HOME/hive-tmux/answers.edn, else ~/.local/state/hive-tmux/.
sourceraw docstring

defaultsclj

source

parse-menuclj

(parse-menu text)

Read the live Claude Code option menu from captured screen TEXT (a string or screen lines), escapes kept or not.

The menu is the one contiguous block around the single ❯ option row: option rows that share its number column, joined by deeper-indented description lines, scroll markers or blank lines. It needs strictly consecutive 1-2 digit numbers, at least two rows, and a selection footer (Enter to select / Esc to cancel) below it with nothing between but blanks, rules, scroll markers or a trailing free-text row. A visible composer or running turn below the menu, a checkbox (multi-select) menu, or anything else is refused.

Returns {:menu {...}} with :kind, :question, :options, :highlighted, :footer and :fingerprint, or {:error reason} with reason one of :no-menu, :no-highlight, :not-a-menu, :composer-visible or :multi-select.

Read the live Claude Code option menu from captured screen TEXT (a string or
screen lines), escapes kept or not.

The menu is the one contiguous block around the single `❯` option row:
option rows that share its number column, joined by deeper-indented
description lines, scroll markers or blank lines. It needs strictly
consecutive 1-2 digit numbers, at least two rows, and a selection footer
(`Enter to select` / `Esc to cancel`) below it with nothing between but
blanks, rules, scroll markers or a trailing free-text row. A visible
composer or running turn below the menu, a checkbox (multi-select) menu,
or anything else is refused.

Returns {:menu {...}} with :kind, :question, :options, :highlighted,
:footer and :fingerprint, or {:error reason} with reason one of :no-menu,
:no-highlight, :not-a-menu, :composer-visible or :multi-select.
sourceraw docstring

select-optionclj

(select-option menu option)

Resolve OPTION, a one-based number or a label, against parsed MENU. Number means the printed option number, not the highlighted row. Text matches the full normalized label or the part before an em-dash description. Exactly one match is required. Returns {:option <row>} or a structured error map.

Resolve OPTION, a one-based number or a label, against parsed MENU. Number
means the printed option number, not the highlighted row. Text matches the
full normalized label or the part before an em-dash description. Exactly
one match is required. Returns {:option <row>} or a structured error map.
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