Expand description
The tools a runner lives in: terminal multiplexers and agent runtimes. A
tool opens a pane the person can watch and hands the runner a line, and
its alive verb says whether the pane is still there.
[[tool]] tables in harnesses.toml declare them beside the runners.
herdr and tmux ship as shapes (SHIPPED_TOOLS); a table of the same
name replaces a shipped one. Every verb is an argv with
{placeholders}. A tool the seat has never heard of is one table. A
tool that refuses is named with its own words and the next one is
tried, so a shape gone stale against its tool shows in what hand
returns.
Structs§
- Ran
- What a tool printed when it ran a verb.
- Tool
- One tool, as harnesses.toml declares it.
- Vars
- What fills a verb’s placeholders.
Constants§
- SHIPPED_
TOOLS - The shapes the seat ships, in the order they are tried: herdr’s agent API when its server answers, else tmux.
Functions§
- answers
- Whether a verb that answers by its exit status says yes. An empty verb says no.
- available
- The tools that answer here, in the order they would be tried. A named
tool (
LJOS_PANE_TOOL) narrows the list to that one. - doctor_
state - The doctor’s row on panes: which tool would open a persona’s pane, and which others answer.
- fill
argvwith every{key}replaced fromvars. A placeholder with no value is left as written, so a typo reaches the tool and its refusal names it.- open
- Open a pane with
tool: the firstopenthat exits 0, thenrunwhen the pane starts as a shell. Returns the pane the tool named, or the empty string for a tool whose verbs name the pane themselves. - ordered
- The tools in the order they are tried: the file’s own, then each shipped shape the file did not replace.
- pane_
from - The pane
opennamed, read throughpointerfrom its JSON output. - run
- Run one filled argv. A refusal carries the tool’s first stderr line, or its first stdout line when stderr is empty, and the argv’s verb words.
- send
- Hand the runner one line:
prompt, andtype_linewhenpromptis refused or absent. - sh_
quote - A word quoted for
sh. - shipped
- The shipped shapes, parsed.
- wait_
ready - Wait until a fresh runner takes input:
readyretried each second untilready_sruns out, or a plain sleep ofready_sfor a tool with noready.