Commands
| Command | |
|---|---|
flume launch |
Make one place and start, hold or queue its first stage. |
flume status [<place>] |
Every fact of a place, or of every place, and of the host; with --line, each place’s one line; with --binding, the repository’s binding, its merge queue and which kinds land there. |
flume list |
A line for each place on the host, under its repository, and each stream, reading only what flume keeps; --all adds the places that landed or were dropped. |
flume prompt <place> <stage> |
The exact prompt a stage would be sent at its next start, starting nothing. |
flume message <target> <words> |
Hand a place’s agent words as a prompt, once it waits, or leave them at a role’s address, <stream>/<role>, as a delivery its session takes at its next wait; to an agent kept open for its answer, the answer, --answers <key> naming the stop-short it answers. flume tell runs it too. |
flume hold <place> <words> |
Hold the place’s next stage, --stage, or its submission, --submission, with words saying what for; or, --waiting, the move the place waits on, with words saying who makes it and an optional bound. |
flume retry <place> |
Start a stage again with a fresh agent, hand an answer to the agent kept open for it, or submit the place again; --answers <key> names the stop-short the words answer. |
flume answer <place> <region> <answer> |
Answer the decision standing at a region of a statechart place; the next settle applies it. |
flume stop <place> |
End the place’s agent and nothing else. |
flume finish <place> |
End a conversation’s agent; the conversation counts as delivered. |
flume drop <place> |
Give up the place’s work, and tidy it. |
flume done <place> |
Declare complete the work of a place whose kind does not land, and tidy it. |
flume priority <place> <n> |
Set the place’s priority in the host’s queue. |
flume tidy [<place>] |
Remove what is over, for one place or every place. |
flume settle [<place>] |
Move a place, or every place, on; with --every <time>, the places where something is pending, as a watch over the host. |
flume wait <place> |
Wait on a stage’s end or the submission’s outcome, as a recipient; --confirm confirms the end as it is answered. |
flume inbox [<place>] |
Collect every end and every message pending for a recipient, on every place of the host, or the ends of the place named alone; --confirm confirms each as it is given. |
flume confirm <key>… |
Confirm, as a recipient, each end’s or message’s delivery by its key, so it is delivered and pending for it no more. |
flume wake <address> |
Wake a role’s address, <stream>/<role>: launch its run where none stands, and nothing where an agent already holds it. |
flume kinds lock <identity>… |
Record each kind at its content’s hash in a lock of kinds, or take it out. |
flume open [<session>] |
Show a session of a stream’s, by the session’s name, in its stream’s view: a window its terminal app opens, its multiplexer’s own app, or the line to run. |
flume relay <place> |
Relay the place’s live agent’s terminal to a program that carries a person’s screen and keys: the screen out and the person’s input in, as JSON lines. |
flume host attach --cloud <address> <code> |
Attach this host to an account of a cloud by the attach code its page shows, and write that account’s host.toml beside flume’s configuration. |
flume mcp |
Serve flume’s status, and its message, launch, wake, hibernate and resume, over MCP on standard input and output. |
flume needs <words> |
From an agent flume started: its stage cannot deliver without an answer, or found work; --to names the role the words are for. |
flume ack started, flume ack received |
From an agent flume started: it started, or it received a prompt. |
flume hook <event> |
From an agent program’s hook: what flume does with the hook’s input. |
flume --help and flume <command> --help print each command’s own
words. flume --version prints the version.
Every command
Section titled “Every command”Two flags work with every command:
| Flag | |
|---|---|
--json |
Print the answer as JSON, one document. The form only ever gains fields, and every surface, the MCP server included, gives the same one. |
--repository <dir> |
The repository, where it is not the one the command runs in. |
The repository is the one the command runs in, found from any of
its worktrees, a place’s included. In a bare layout,
project/project.git beside its worktrees, it is project.
A place is its location, or <kind>--<name> in the
repository, such as fix--the-parser-reads-tabs.
Times are written <n>, <n>s, <n>m or <n>h: 90, 90s,
10m, 1h.
Exits. A command exits 0 with its answer, and 1 with
refused: <reason> when flume refused it, the reason in flume’s words.
Words that name no command or flag exit 2, with the usage on standard
error. flume wait has exits of its own.
flume host first. Every command that builds flume’s core reaches
the host’s flume host on its socket before it acts. Where none
answers, it is refused before it acts, naming the socket and the host’s
service manager, which runs flume host, and it writes nothing and
starts nothing. flume host itself, flume status, flume store and
a command’s help reach nothing more than they ask.
Settling first. Every command that acts, launch, message,
hold, retry, stop, finish, drop, done, hibernate,
resume, take, priority, tidy, wait, inbox and wake, settles the
places on the host where something is pending first, unless a caller
keeps watch over the host with flume settle --every. A place that
waits only on an answer, its caller’s word or a drop is not read then;
the command that acts on it settles it.
flume status, flume list, flume prompt, flume store and
flume mcp only read, flume status --line and flume hook status-line among
them. flume open and flume relay settle nothing, and flume kinds lock writes its lock and settles nothing.
flume launch
Section titled “flume launch”flume launch --kind <kind> --name <name> [--brief <text> | --brief-file <file>] [flags]| Flag | |
|---|---|
--kind <kind> |
The kind by its name, <name> or <name>@<version>, resolved from the launch’s --kinds file, then the repository’s .config/flume.toml at the base, then flume’s own. Or by its identity, <source>/<name> or <source>/<name>@<version>, from that source alone: flume, repo, launch or one the host declares (where kinds come from). Required. |
--name <name> |
The work’s name, which names its branch, <prefix>/<name>, and its place, <kind>--<name>. Required. |
--base <branch> |
The branch the place is cut from and lands on; where none is named, the repository’s default branch, its remote’s. |
--brief <text> |
What the work is, given whole to every stage whose prompt asks for {{brief}}. |
--brief-file <file> |
The brief, read from a file once at the launch. |
--kinds <file> |
A declaration of kinds the launch carries, read from disk with its prompts beside it. |
--hold <stage>=<words> |
Hold that stage before it starts, with words saying what it waits for. Repeatable. |
--hold-submission |
Hold the submission once the last stage delivers. |
--recipient <name> |
A recipient of the place’s ends: a terminal’s session by its name, or a role’s address, <stream>/<role>, of any stream, whose run is woken for them. A name no pane holds is sent no notice: its ends wait for it, the place’s record kept once it is tidied, until it collects them by flume inbox or flume wait as that name and confirms them (the end of a place’s work). Repeatable. With none, $FLUME_RECIPIENT, else the address a standing agent holds where the launch runs in its pane (the agent’s own commands), else the terminal session the launch runs in, else the answerer behind the place’s stream (who answers a place). Every stall reaches that answerer too. |
--mark <mark> |
A mark the caller finds its places by, given back in status. |
--priority <n> |
The place’s priority in the host’s queue, a whole number, negative allowed; 0 where none is given. |
--stall-after <time> |
How long the place may wait on its caller under no hold’s words before it is said stalled; five minutes where none is given. |
--agent [<stage>.]<field>=<value> |
One setting of every stage’s agent, or of one stage’s. The field is program, model, effort, instructions, beside, session, mode, keep_open, hibernate_after or programs. effort=<word> gives the agent’s effort in its program’s own word, as Claude Code’s low, medium, high, xhigh or max, and a word its program does not take refuses the launch (the effort). session=<name> opens the agent in that herdr session whatever its stream’s, and beside opens it beside a pane before any session. mode=<mode> gives one of plan, ask, edits and full, and mode.<program>=<value> one entry of a table of programs, several building one table. A mode word and a table for the same stage refuse the launch. keep_open=<time> gives how long the agent is kept open for an answer once it stops short needing one, as a time, 0 keeping none; a keep_open.<program> refuses the launch (how long an agent is kept open). hibernate_after=<time> gives how long a conversation whose kind hibernates it may idle before flume hibernates it, 0 never; a hibernate_after.<program> refuses the launch (how long a conversation idles). programs.<program>.settings.<key>=<value> gives one top-level key of a program’s own settings, several building one entry. Its value is read as JSON where it parses and as the text written otherwise. A nested key, or one key given twice for one stage, refuses the launch. programs.<program>.file=<path> names a program’s settings file, relative to the working directory, read once at the launch (a program’s own settings). Repeatable. |
--stream <stream> |
The stream the place runs in, one the host’s configuration declares. Where none is named: the intent’s stream, else the one the host’s configuration names for the repository and kind, the repository or the kind, else default. Fixed at the launch. |
--intent <name> |
The intent the place serves, by name. Places of one intent keep to one account while it is usable. Where none is named, the repository and base name the intent. |
--drive <id> |
The drive whose store holds the place, by its id. The place takes it where an attachment of the host names it, and the host’s own drive, local, otherwise, as where none is named. Fixed at the launch: status gives it as the place’s drive. |
The answer is the place’s status. A launch is refused whole, leaving nothing it made, when:
- the place, its branch or its directory already stands;
- the kind resolves to no declaration, or a declaration cannot be read;
- the kind names a source the host does not declare, or one whose file cannot be read, or a version its source does not hold;
- a kind from a source on the host is recorded in no lock, or its content’s hash is not its lock’s;
- the two locks give a kind two hashes, or a lock the launch needs cannot be read;
- the kind asks for more than flume runs, such as a stage with no agent or several;
- the kind lands and the repository binds no merge queue, or reads a change and binds no change tool;
- a stage’s prompt asks for
{{brief}}and the launch gives none; - the name gives no valid branch;
- the base’s current revision cannot be read, a failed fetch among the causes;
- a declaration sets
env,keep_openorhibernate_afterin an agents table, or a setting names a stage the kind lacks, or a program no agent profile runs; - a program’s own setting is a key its agent profile reserves for another setting, holds a value shaped as a credential, or is given for a program whose profile takes none;
- the stream is one the host’s configuration does not declare;
- the stream’s multiplexer names no terminal profile flume carries, while a launch on another stream runs;
- it finds no recipient: no
--recipient, no$FLUME_RECIPIENT, no terminal session it runs in, and no role standing behind its stream; - it names no recipient,
$FLUME_RECIPIENTis unset, and it runs in the pane of an agent its sources give more than one address, naming the agent and each address; - it would take its stream’s answerer, and two roles stand behind the stream, naming both;
- it names a role’s address that no source declares, or two declare, and no role stands behind its stream to take its questions.
$ flume launch --kind deploy --name x --brief xrefused: the kind deploy resolves to no declaration$ flume launch --kind chore --name 'bad..name' --brief xrefused: the name bad..name gives no valid branch: chore/bad..nameEvery launch that is not refused is taken: one that finds the host at its bound waits for room, and the answer says so.
flume status
Section titled “flume status”flume status [<place>] [--line | --binding]With a place, its status; with none, every place on the host. The
host’s flume host answers it, so flume status starts no process of
its own; where no flume host runs, flume status is refused, naming
the socket it asked. Each place gives:
- its line, the one
--lineprints; - its kind, version and origin, and its phase, live or tidied;
- its kind’s identity, where it came from, and for a package its hash and the lock that recorded it;
- its branch, base and head, and where the base’s revision was read:
where its merge queue lands it, at
origin, or the local branch’s, with why; - whether each readiness step passed or failed, with the last ten lines a failed step printed, its terminal escapes stripped;
- each stage’s state and starts;
- its current agent’s identity, program, settings with their layers and state, and whether it started, is asking or has its own work running;
- its current agent’s own settings, each with its layer and its file, the keys left out of each file with their owners, and how they were passed;
- whether the deliverable exists, and a change’s tasks;
- its submission;
- what it waits on, since when and in whose words, and whether it is stalled;
- its stream, its label and its intent, its current agent’s account, the multiplexer and the session it opened in, each move between accounts, and each start that began without its settings;
- its holds, priority, recipients and ends, and what flume could not read.
The host part gives the agents running, the bound, the room and the queue. Each stream’s part gives its session, its multiplexer, view, terminal app and title, each with where it came from, and its labels. Then come each pool’s part, each source of kinds the host declares with the kinds it holds or why it cannot be read, each base’s count and the role addresses with ends pending. Every address an agent already holds is there too, with its agent, its session and where that came from, and what the multiplexer found there when asked. Each multiplexer the host binds gives what a tidy kept there. Then comes the host’s configuration: whether its local layer was taken, each value it set and each key passed over with its pin. Last comes the host’s watch: a caller keeping it, with the bound it stated and when its newest settle began, or no caller keeping it, and since when where one did. With none, the places where something is pending move on at flume’s commands, and a place when its agent goes quiet. Under that line it gives what the terminal’s own configuration lacks for flume’s plugin there, such as herdr’s key for the popup, in words you can act on.
--line gives each place’s one line and nothing else, reading only
what a line holds: the place’s held state, the change at its head and
its agent’s own record. It calls no terminal and no merge queue. Each
line holds the place, its kind and version, its current stage with a
repeating stage’s group, how many times that stage started, a change’s
tasks ticked and the place’s state. A part the place has none of is
left out:
$ flume status --linechange--parser · change@2 · code 1/2 · run 1 · tasks 0/3 · workingfix--the-parser-reads-tabs · fix@1 · code · run 2 · waiting on an answer--binding gives, beside the places, the repository the command
runs in, or the one --repository names, as it holds its default
branch: the [profiles] table of its .config/flume.toml, the merge
queue it binds and whether that queue lands the default branch, and each
kind flume can run there, whether it lands and why a launch of it there
would be refused. It reads the branch as origin was last fetched, else
the repository’s own, and fetches, writes and launches nothing; where
origin moved since, run git fetch first. Where the merge queue is not
ready, it names what is missing:
$ flume status --bindingno place stands on this host…repository /src/app binding: read at main (4f1c2a9, origin as last fetched) from .config/flume.toml place: none change: openspec merge_queue: none merge queue: not ready: .config/flume.toml at main (4f1c2a9) names no merge_queue in its [profiles] kinds: flume/fix@1 lands; refused: the kind flume/fix@1 lands, and no merge queue lands it: …A caller about to launch reads it to offer only a kind the repository
can run. flume host’s status and subscribe asks take the same
report for each folder their repositories names. The Claude Code
plugin’s setting-up-flume skill writes the [profiles] table from it.
The words are the ones status gives each place, the herdr plugin’s
sidebar and popup show, and every agent’s status line pins under its
prompt (the status line
lists the states). With --json the answer is
{"lines":{"lines":[…]}}, each line with the fields of status’s
line.
flume reads each fact where it lives when asked, and keeps none between asks. The state reference lists the JSON fields.
flume list
Section titled “flume list”flume list [--all]A line for each place on the host and each stream its configuration
declares, for a person to see at a glance what flume holds and what
flume open can show. A place that landed or was dropped has nothing
left to open, so the list leaves it out; --all lists every place,
those among them. It needs no repository and always exits 0. flume status <place> gives a place’s every fact.
Each repository’s path stands on a line of its own, its places’ lines
under it. A place’s line is <kind>--<name> · <stage> · <state>, the
stage its line names, without a repeating stage’s group, and the state
in the words its line gives it. A place that is not live names no
stage. Then come the parts that hold:
- whom it waits on:
waits on its caller, where its next move is its caller’s, stalled or not;waits on the host, where a stage waits for room;waits on its session, where a stage waits while a process runs the conversation its start would carry; orwaits on the merge queue, where it is submitted; - what keeps a place whose work is over, in a word:
kept by <step>, the teardown’s step that failed, such assluice release;kept holding work,kept holding a lockorkept holding work and a lock;kept while its agent runs;kept while its session runs, while a process runs its conversation; orkept unread. A place removed whose branch and document are still to go readsbeing tidied, and a tidied place’s document kept for an end pending readstidied. A place that landed or was dropped shows these only under--all; a place its caller declared done shows them always.
After the places, under streams, comes a line for each stream, in
status’s order, default among them: <stream> · session <name> · <runs>. The session is the stream’s own, which flume open shows by
its name: the stream’s session, else its name, and, for default
naming none, the multiplexer’s own, named as the multiplexer names it. The last part is
runs, not running, not read where the multiplexer could not be
read, or no profile for <multiplexer> where the stream’s multiplexer
names no profile flume carries. Then comes session <name> · <runs>
for each other session the stream names for a kind or a stage, each
once, so the line names every session a person can open for the
stream. Where no multiplexer was asked, the sessions come first and
no profile for <multiplexer> once after them. Under the printed
command, which holds no session, a stream’s line reads <stream> · no session. A host with no places to list prints no places before streams.
$ flume list/home/you/src/parser change--tabs-are-read-as-spaces · design · working fix--a-long-line-wraps · code · waiting for room · waits on the host/home/you/src/site change--the-search-is-rebuilt · construct · held · waits on its callerstreams work · session work · runs personal · session personal · not running default · session flume · runsWith --all, the places that landed or were dropped are listed among
the others, in the same order:
$ flume list --all/home/you/src/parser change--tabs-are-read-as-spaces · design · working chore--the-docs-are-moved · landed · kept by sluice release fix--a-long-line-wraps · code · waiting for room · waits on the host fix--the-old-parser-is-removed · dropped · tidied/home/you/src/site change--the-search-is-rebuilt · construct · held · waits on its callerstreams work · session work · runs · session work-design · not running personal · session personal · not running default · session flume · runsThe list reads each place’s held state, and a live agent’s asking mark from its own record, and asks each stream’s multiplexer once whether each of its sessions runs, all of them in one reading. It reads no worktree, head, deliverable, change or submission, asks no merge queue, and starts no session. None of a place’s long words, a stop-short’s, a hold’s, a failure’s or a teardown’s, is in its lines or its JSON. It says what the last settle left: where no caller keeps watch over the host, places move on only at flume’s commands and their agents’ quiet. It settles, starts, sends and writes nothing.
With --json the answer is {"list":{"places":[…],"streams":[…]}},
the same lines and their parts. The state
reference
lists the fields.
flume prompt
Section titled “flume prompt”flume prompt <place> <stage>The exact prompt the stage would be sent at its next start, every part filled, with nothing started, sent, settled or written. A prompt that asks for a part with nothing to fill it is refused, naming the part.
flume message
Section titled “flume message”flume message <target> <words> [--within <time>] [--answers <key>]The target is a role’s address where it is <stream>/<role>, each part
a word and neither . nor .., and otherwise a place, named as every
command names one; ./east/planner names a place’s location.
To a place, it hands the place’s current agent the words as a prompt
once it has said it started and waits, read back as received or sent
once more. flume waits up to ten minutes, or --within, for the agent
to wait. It refuses with nothing typed when the place has no live
agent, its agent is asking a person a question, or the words are not
delivered within the bound. A message starts and ends no agent, and
moves no stage but one it answers or resumes. Where the agent’s program
takes words by its own channel, the message waits on the agent’s start
until the agent takes it at its wait, and nothing goes through the
multiplexer.
To a place whose stage hibernates, the message resumes it at once: a
fresh agent carries the stage’s own session, the words its prompt, and
flume answers with the place’s status
(flume hibernate and resume).
To a role’s address, it records the words at once as a delivery to the
address, keyed message/<stream>/<role>/<token>, its first line naming
who sent it, and answers with the key, the address and what it found:
the address’s run woken, live or waiting, its standing agent, carried
to another host, or the message handed. It wakes the address’s run
where none stands. The message waits at the address, with no bound,
until the address’s session takes it at its next wait, with every other
end and message pending for it in one prompt, and confirms it
(a message to a role).
An address no source declares, two declare, or whose stream the host
does not declare is refused, recording nothing, and so are --within
and --answers with an address.
flume tell, the command’s earlier name, runs as flume message.
To a stage that ended short needing an answer, while its agent is kept
open for it, the message is the answer. flume types the question and the
words into that agent’s session and records the answer on the
stop-short. The stage carries on there under the same start
(the answer in its session).
Where its agent hibernated at the end of that time, the message is the
answer too: flume records it on the stop-short and resumes the agent’s
session with the question and the words. Once the agent is let go
otherwise, the message is refused with nothing typed, naming the retry
that gives the answer:
flume retry <place> --words <answer>. Under the printed command every
message to a place is refused, since flume holds no pane to type into.
--answers <key> names the stop-short the words answer, by the key the
inbox and status give it, as stage/construct/1/ended-short. flume
takes the answer only while the place waits on that stop-short and no
answer was taken for it, and otherwise refuses with nothing typed,
naming the answer taken, who gave it and when, or the move the place
waits on now (the answer’s key).
flume hold
Section titled “flume hold”flume hold <place> --stage <stage> <words>flume hold <place> --submission <words>flume hold <place> --waiting <words> [--for <time>]Holds a stage not started since the current stage began, taking one waiting for room out of the queue, or the submission not yet made. It refuses a stage started, a submission made and undecided, a second hold and a place whose work is over. Only a retry naming the stage or the submission ends the hold.
On a place of a statechart kind, --stage names a stage by its path,
as stages.test, which holds each of its sessions not yet started,
those of its next entry among them; or one session by its name, as
stages.test#1/2. A session that has started is not held.
--waiting holds the move the place waits on its caller for, with
words saying who makes it and how, so the place is not stalled while
the hold holds. A later hold on the move replaces the words, the bound
and since when. The hold ends once the place waits on another move or
none. --for <time> gives how long it holds, as --stall-after
takes a time, with no days, 24h for a day: once that passes, the
settle that reads it lapses the hold, records when, and stalls the
place at once with the hold’s words. With no --for it holds until the
move is made. It refuses a place that waits on no move of its
caller’s, and a --for beside --stage or --submission
(a hold on the waiting move).
flume retry
Section titled “flume retry”flume retry <place> [--stage <stage>] [--words <words>] [--answers <key>] [--force]flume retry <place> --submission| Flag | |
|---|---|
--stage <stage> |
The stage to start again; the current one where none is named. The stages after it run again in order. |
--words <words> |
Words for the stage’s agent, after the question its stage stopped on; the answer, to an agent kept open for it. |
--answers <key> |
The key of the stop-short the words answer, as the inbox and status give it. Taken only while the place waits on that stop-short, once, with words and naming its stage; refused otherwise, before any agent is ended, naming the answer taken, who gave it and when, or the move the place waits on now (the answer’s key). |
--force |
End an agent that is not quiet. |
--submission |
Submit the place’s head again, starting no agent. |
A retry ends the place’s agent first, starts the stage with a fresh
agent, and ends a hold on it. It never ends an agent whose stage has
started or begun: the retry is refused, forced or not, naming the
agent, and flume stop <place> ends it first.
A retry with --words naming a stage that ended short needing an
answer, while its agent is kept open for it, is the answer instead. It
starts and ends no agent. flume types the question and the words into
that agent’s session as it types a message, within ten minutes, and
records the answer on the stop-short. The stage carries on there under
the same start. An answer the agent does not take is refused with nothing
recorded, and the stage still waits
(the answer in its session).
A retry with no words runs as above, the question alone in the fresh
agent’s prompt.
A retry with --words naming a stage whose agent hibernated waiting on
its answer is that answer: it resumes the agent’s session with the
question and the words, its starts unchanged. A retry of any other
hibernating stage starts it afresh, carrying no conversation.
On a place of a statechart kind, --stage names one session by its
name, as stages.test#1/2, and starts that session again alone,
ending only its own agent: the place’s other sessions work on, and no
stage after it is run again. --stage naming a stage by its path, as
stages.test, ends the hold on that stage and starts each session it
held. The statechart decides where the run goes next, never a retry.
flume answer
Section titled “flume answer”flume answer <place> <region> <answer>Answers the decision standing at a region of a statechart place’s statechart. The region is its path, as status gives it with the decision, and the answer is one of the words the decision takes. flume records the answer with who gave it, the recipient the command runs as, and when, and the place’s next settle gives it to the statechart, which applies it once. One answer is applied each settle, the oldest first.
The answer is refused, recording nothing, where the region carries no decision standing, naming the regions where one does, and where an answer given that decision is not yet applied, naming that answer, who gave it and when. A place of a simple kind has no decision, and its answer is refused.
flume stop, finish, drop and done
Section titled “flume stop, finish, drop and done”flume stop <place> [--force]flume finish <place> [--force]flume drop <place> [--force]flume done <place> [--force]| Command | Ends the agent, then |
|---|---|
stop |
nothing more: the stage waits for a retry or a drop |
finish |
the conversation counts as delivered |
drop |
starts nothing more and tidies the place |
done |
declares the work complete and tidies the place; refused for a kind that lands |
Each ends an agent only once it is quiet, unless --force is given.
Under the printed command flume cannot end an agent, and the act is
refused until the agent’s session ends where it runs.
A place whose stage hibernates has no agent to end. stop ends its
hibernation and the stage reads stopped, or, where it waits on its
answer, leaves it waiting with its close read stopped, so nothing
resumes it. finish counts a hibernating conversation delivered, and
drop and done end its work.
flume hibernate and resume
Section titled “flume hibernate and resume”flume hibernate <place> [--force]flume resume <place>hibernate ends the agent of the place’s current stage once it is
quiet, --force ending one that works, and keeps its session. The
stage reads hibernating, neither ended nor moved on, its room and its
account free, and counts no start. It is taken only for a stage whose
kind hibernates it (a stage’s fields),
and refused for any other, for a place with no live agent, and, unless
forced, while a message is being handed to the agent. flume also
hibernates such a stage on its own: a conversation once it idles its
hibernate_after (how long a conversation
idles),
and any such stage’s agent kept open for an answer once its time
passes.
resume starts the hibernating stage again in its own session: one
fresh agent, named <stage>:<start>.<resume>, on the account the
hibernated agent ran under while that account is usable. It waits for
room, and while a process runs the session, as a lost conversation’s
retry does. Its prompt is flume’s words that the session resumes, then
the way to stop short. A message resumes it with the message’s words,
and an answer to the stop-short its agent waits on with the question
and the answer. Where no account reaches the conversation, or its
transcript is gone, the stage starts afresh, saying why. A resume of a
place with nothing hibernating is refused, naming the place.
flume take
Section titled “flume take”flume take <place>The base place takes its base in through the merge queue: flume submits
the base, by name at the revision where the merge queue says it lives,
to the base place’s branch, from the repository, with no wait on the
verdict. The merge queue merges it with the base place’s checks and no
agent, and only a conflict or a failure launches the base place’s fix
(taking its base in).
The answer is the place’s status, its take naming the take’s number,
its submission, the revision taken and its state.
A take is refused, naming why, for a place that is no base place, while the base place’s submission is open or its fix is live, and once its work is over. Asked while a take is open, it answers that take and submits nothing.
flume priority
Section titled “flume priority”flume priority <place> <n>Sets the place’s priority, a whole number, negative allowed. A settle starts waiting stages by their stream’s priority, then their place’s, highest first, equals in the order they came to wait.
flume tidy
Section titled “flume tidy”flume tidy [<place>]Removes what is over, for each place whose work landed, was dropped or is done and whose agent stopped:
- its worktree, through the repository’s teardown and
git worktree remove, then whatever a tool left in its folder, and its repository’s folder underplaces/once that holds no place. Wheregit worktree removefails having let the place go, the place is kept with git’s words, and the next settle removes what is left of its folder. flume removes a folder so only where it is in aplaces/folder flume makes places in and holds nothing of another repository’s; - its branch, where the base holds every commit of it;
- in each multiplexer its agents opened in, under herdr its tab, and its base’s workspace once that holds nothing else of flume’s or yours.
It keeps a place
holding uncommitted or unignored work, and a branch with commits the
base lacks, naming each. What it closed or kept in a multiplexer is
named with that multiplexer, profile in the JSON form.
$ flume tidyremoved ~/.local/share/flume/places/f5f5e14159a8/chore--tidy-the-readmekept the branch chore/tidy-the-readme of ~/.local/share/flume/places/f5f5e14159a8/chore--tidy-the-readme, 1 commits not landedclosed the tab chore--tidy-the-readme of ~/.local/share/flume/places/f5f5e14159a8/chore--tidy-the-readme in the terminal herdrflume settle
Section titled “flume settle”flume settle [<place>] [--on-quiet]flume settle --every <time>Moves a place, or every place, on. It reads each stage’s deliverable,
starts the next stage or the waiting ones there is room for, and
submits. It collects the merge queue’s outcomes, delivers pending
ends, wakes roles and tidies. Safe to repeat. --on-quiet first reads the place’s
agent until it is quiet, for up to sixty seconds, and starts again the
idle time of a conversation whose kind hibernates it, since a turn
ended. The Stop hook asks flume host for the same settle on its
socket, and runs no command.
No multiplexer and no plugin of one runs it.
Naming no place and no --every, it settles every place on the host,
one that waits on nothing among them. Run it so to have flume read a
move made outside it, such as a branch landed by hand while its place
held its submission; a watch reads no such move.
--every <time> settles the places where something is pending as a
watch over the host. <time> is the bound its runs come within, as
flume wait --timeout takes one: <n>, <n>s, <n>m or <n>h.
flume records in the host’s state when the settle began, its bound and
the command running it. It then settles the places where something is
pending, an agent in them or none, steps each open submission’s base,
starts the stages waiting for room the host now has, and records when
the settle ended. Something is pending on a place while a change that
calls flume nothing may have moved it: it is being made, or its work is
over and it is not yet tidied away; a stage of it starts or runs; its
submission is in flight; it is a base place; a time it waits on has
come, a stall’s or a hold’s bound; or an end of it, or a wake for it,
waits to be handed on. flume reads that from what it holds, and you name
none of it. A place that waits only on an answer, its caller’s word or a
drop is not read: neither its merge queue, its multiplexer nor its agent.
Run it on that bound from a timer of the host’s or whatever else keeps
time there. Every place then moves on within the bound with no command
of yours, a place whose submission waits on the merge queue among them.
While that settle runs, and until twice its bound has passed since it
ended, a caller keeps watch and flume runs unattended: the commands that
act settle no place first, and flume wait leaves the settling to the
watch. A settle whose command died before it ended keeps watch until
twice its bound after it began. Once its runs stop, the watch lapses and
flume runs attended again. flume status gives the watch, its bound,
when its settle began and ended, or since when none is kept.
--every beside a place’s name, or with a bound that is no positive
duration, is refused before anything is read:
$ flume settle fix--one --every 2mrefused: --every settles the places where something is pending as a caller's watch over the host, and takes no place: fix--one was namedflume host
Section titled “flume host”flume host [--every <bound>]flume’s resident, which the host’s service manager runs and keeps
running, one on a host. It keeps watch over the host: it settles the
places where something is pending at once, at each change it hears in
the merge queue, and at least every <bound>, a minute by default.
It serves status on a socket of its own, host-<key>.sock in
/tmp/flume-<uid>, or in $FLUME_USER_SCRATCH where set, the key the
first 10 hex digits of the SHA-1 of flume’s state folder. Each line is
one JSON object. A client says {"hello":"<client>/<version>"}, flume
host answers with its version, its protocol, 4, its pid and
since, and the client then asks one thing:
{"ask":"status"}: one{"document": …}line, the answerflume --json statusprints, and the connection closes;{"ask":"subscribe"}: adocumentline at once, and another each time the answer changes, until the client closes the connection.
Either ask may name a place by its location, and ask each place’s
line. Status is read again after each settle, after each change heard
in the merge queue, and after each change of flume’s state folder.
A client may instead ask of flume’s stores, one for each drive flume host serves, which every process of flume’s but flume host reaches through these asks:
{"ask":"read"}: flume host brings each store into line, answers one{"document": {"stores": [{"store": …, "drive": …, "places": […]}, …], "closed": [{"store": …, "drive": …, "why": …}, …]}}line, each open store in order of its drive’s id and each store that is not open with why, and closes the connection;{"ask":"place","drive":<id>,"place":<id>}: that place’s facts alone, read from the store of that drive with no run of the lead, as{"place": {…}}, or{"place": null}where the store does not hold it;{"ask":"places","drive":<id>}: every place’s facts, read from the store of that drive with no run of the lead, as{"places": […]}, which each command’s read of a store’s places asks;{"ask":"commit","drive":<id>,"events":[…]}, each event written whole as{"name": "v1.<Name>", "args": {…}}: flume host commits them through the store of that drive in one batch and answers{"committed": <n>}, how many events the store took. A launch or an end the store holds already takes nothing;{"ask":"drives"}: one{"drives": [<id>, …]}line, each drive whose store is open, in order of its id.
A place, a places and a commit ask each require their drive: a
line that names none is not read, and its answer is
{"error": <words>}. Where the drive’s store is not open, flume host
reads the host’s attachments and its places again, and opens the store
where one names the drive, so an attach made while flume host runs takes
effect at the first ask that names one of its drives. Where none names
it, where the store does not open, as when another process holds its
folder, or where the store refuses a commit, the answer is
{"error": <words>} naming the drive and why, and nothing is
committed; status and the other stores still answer. The
socket takes no store ask. A client that says its hello and closes
asked nothing: it reached flume host, which says nothing of it. Each
command that builds flume’s core reaches flume host so before it acts.
flume host leads flume’s store of each drive it serves, flume_<drive>:
the host’s own drive, local, each drive that an attachment of the host
names, and each drive that a place it holds names
(flume’s stores). Each place’s
events go to the store of its drive. flume host opens every store at
its start, before it binds its socket. The store of local that does
not open refuses its start. The store of another drive that does not
open stays closed with its words, which flume host says once on its
standard error; the other stores serve, and each run of the lead opens
it again. Each run, and each ask that names a drive, reads the
accounts’ host.toml files again, and opens a store again where they
give it another file or another backend: a drive that no file names
any more stops syncing, and a drive that a file names once flume host
runs starts, with no restart. Each core it builds reads and commits
through them.
It brings each place’s stages, questions and ends into line with its
held state in the store of its drive, one run at a time, each store in
order of its drive’s id. It runs at once, after each settle, after each
change of flume’s state folder, and at each read ask. A run commits
the events of each place on its own. A commit a store refuses is one
line on flume host’s standard error, naming the store and the place;
the run goes on with the next place, and the next run tries again.
flume host holds a socket to the cloud of each account the host is
attached to, one for each account’s host.toml, and dials out for it.
The cloud knows that the host is alive, and how much room its streams
have, from this socket alone. A host with no host.toml opens no
socket and reads no key, and works as it does without one. A
host.toml written while flume host runs has its socket by the next
settle, and an account whose host.toml goes has its socket closed.
Each socket opens at the cloud’s origin, with the statement that the
account’s key signs for that open. Its first frame on each connection
is the host’s capacity: the host’s agents running, its bound and its
room, and each stream’s name, priority, agents running, bound and room,
as flume status gives them, as one JSON object
{"id": …, "name": "v1.Capacity", "args": {…}}. Every account’s socket
carries the same capacity. flume host reads the capacity again after
each settle and at each change of flume’s state folder, and sends it
again only where it changed, under a new id. After a reconnect it sends
the whole capacity again, under the id it last sent where nothing
changed while the socket was closed. It sends nothing for the cloud to
compare.
The socket carries at most 16 streams, each named in at most 64 characters. A capacity leaves out each stream whose name is longer, then each stream past the first 16 in status’s order, and flume host says which, and why, in one line. The cloud then shows no room in a stream left out, so no launch goes to that stream on this host.
flume host sends a WebSocket ping on each socket every 30 seconds, and no message of its own to keep it. A socket that gives no frame within 30 seconds of a ping is taken as dropped. Each open, its connection, its TLS and its upgrade, stops after 30 seconds. A socket that drops, or an open that does not reach the cloud, is opened again after a pause: its steps begin at 1 second and double to 30 seconds, each pause its step and a random part of less than its step, and they begin again at 1 second once a socket has stayed open for 30 seconds.
These stop an account’s socket until its host.toml is written again
or flume host starts again, each said in one line naming the account
and why:
- the cloud refuses the open’s statement, with
401; - no statement can be signed for the account, as for a key the credential store does not keep;
- the cloud closes the socket with
1008, for a frame it does not take; - the cloud closes the socket with
1000, as it does once a newer connection of the host replaced this one.
Every other failure is tried again. flume host says one line when an
account’s socket drops or its first open does not reach the cloud, and
one when it opens again, and none for each try between. Each line about
the cloud starts with its time, in RFC 3339 and UTC to the second, then
flume host: and its words. When flume host stops, it closes each
socket with 1001, waiting no longer than 30 seconds for the cloud’s
close.
flume host attach
Section titled “flume host attach”flume host attach --cloud <address> <code> [--new-key]Attaches this host to an account of a cloud by the attach code the cloud’s page shows beside the command, and exits. It starts nothing and reads no place. The code lapses in minutes, and one attach spends it.
A host is attached to as many accounts as it is given codes for, each
through a host.toml and a key of its own:
$XDG_CONFIG_HOME/flume/accounts/<account>/host.toml, the folder named
by the account’s id. An attach for another account adds that account,
and leaves each account the host is attached to as it was.
Before it sends the code it checks the host, in this order, so a refusal spends no code:
- the address names a cloud’s origin:
https, orhttpforlocalhost,127.0.0.1or[::1]alone; - each account’s
host.tomlwas written by an attach and reads; ahost.tomla person wrote is left as it is; - the
accountsfolder is there, or is made; - the host has a credential store, and the store reads the key it keeps for each account of that cloud;
- the machine has a name.
The host’s key for an account is a key pair made on the host. Its
private half lies in the host’s credential store alone, under the name
of that account’s host.toml path: on macOS, the user’s keychain. Any
other operating system is refused, naming it. The attach sends the code
with the key kept for each account of that cloud in turn: the cloud
takes it with the key of the account the code is for, so an attach
again stays the same host, and it refuses each other account’s key.
Where it takes none, the attach sends a key made new, for an account the
host is not attached to. --new-key sends a key made new at once, in
place of the one kept for the code’s account. A key made new is kept
only once the cloud takes it, so a refused attach leaves every key as it
was.
The attach makes one try with each key. Once the cloud attaches the
host, the command keeps the key and writes that account’s host.toml
whole: the host’s id, its account, the cloud’s origin, each drive, and
each key of a tool’s own that the account’s earlier file held. It
writes no other file, and copies nothing from one account’s file to
another’s. Where the cloud attached the host and its key could not be
kept, or its file could not be written, the refusal says so, and a new
code attaches it again.
With --json the answer is
{"attached":{"host":"hst-…","account":"…","cloud":"https://…","drives":[{"id":"…","name":"…"}],"file":"…/flume/accounts/<account>/host.toml"}},
a drive’s name left out where the cloud gave none. A refusal is
{"refused":{"refusal":{"reason":"…"}}}, with the cloud’s words or
the check that failed. No answer holds the code. It exits 0 once the
host is attached, 1 when refused, and 2 for a usage error: no
address or no code, an option it does not take, or --every.
flume store
Section titled “flume store”flume store [--json]Asks flume host to read flume’s stores: for each drive it serves, in
order of the drive’s id, its store’s id, flume_<drive>, the drive and
each place the store holds, or, for a store that is not open, why. flume host brings each store into line
before it reads it, and does no member’s move for the read. It answers
only after each run that a change heard before the read calls for, and
that run does the members’ moves. With or without --json, it prints
the document:
{"stores": [{"store": "flume_local", "drive": "local", "places": [{"id": "0af7…", "launch": {"name": "parser", "kind": "flume/fix@2", "repository": "madswan/atlas", "branch": "fix/parser", "base": "main", "launched_at": "…"}, "ended": {"outcome": "landed", "commit": "3213e81e", "ended_at": "…"}, "stages": […], "questions": […], "moves": […]}]}], "closed": []}A host that is not attached serves local alone, so its document holds
one store, flume_local. A store that is not open is in closed, with
its id, its drive and why, and the open stores answer as ever:
{"stores": [{"store": "flume_local", "drive": "local", "places": […]}], "closed": [{"store": "flume_drv-a", "drive": "drv-a", "why": "…/accounts/acct-1/host.toml does not read: …"}]}Each place’s id is its id in the store, the store_id that
flume status gives it: its trace’s 32 hexadecimal digits. Its
launch gives its name, its kind’s identity, its repository, branch
and base, and when it was launched. Its ended gives why its work
ended, landed, dropped, done or refused, the commit that landed,
and when flume read or took it, and is null while its work goes on.
The store keeps a place once its document goes. The command
builds no core and opens no store. Where no flume host answers on its socket, it is
refused, naming the socket and the host’s service manager.
flume wait
Section titled “flume wait”flume wait <place> --stage <stage> [--recipient <name>] [--timeout <time>] [--confirm]flume wait <place> --submission [--recipient <name>] [--timeout <time>] [--confirm]Waits as a recipient on the current start’s end of a stage, or on the
submission’s outcome. An end pending for the recipient is answered at
once and recorded handed to it by the wait. A hand-over delivers
nothing: the end stays pending, and the next wait answers it again,
until the recipient confirms it. With --confirm the wait confirms it
as it answers it, the hand-over and the confirmation recorded together.
An end the recipient confirmed is read again, handing nothing over.
Otherwise the wait follows the host’s state until an end comes or the
timeout passes. With no timeout it waits until an end comes. The answer
gives the end’s delivery, the key flume confirm
takes.
| Exit | |
|---|---|
0 |
a stage delivered or finished, or a submission landed |
2 |
any other end |
3 |
still waiting when the timeout passed |
1 |
refused |
The recipient is --recipient, else $FLUME_RECIPIENT, else the role
a role’s run serves, else the address a standing agent holds where the
command runs in its pane, else the terminal session the command runs
in (the agent’s own commands).
In the pane of an agent its sources give more than one address, a
command naming no recipient is refused, naming the agent and each
address, and does nothing:
$ flume wait fix--one --stage coderefused: the agent east-planner this command runs in stands for east/ops and east/planner: name which with --recipientflume inbox
Section titled “flume inbox”flume inbox [<place>] [--recipient <name>] [--confirm]Every end pending for the recipient, on every place of the host, a
tidied place’s kept record among them, each recorded handed to it by
the inbox, each with its key and its delivery’s key, a drop’s or a
done’s among them, and whether it is expired; and, under messages,
every message pending at it, with its key, who sent it, when and its
words, each handed to it by the inbox. A hand-over delivers
nothing: an end the inbox gives stays pending, and the next inbox gives
it again, until the recipient confirms it, by --confirm as the inbox
gives it, or by flume confirm naming its delivery’s
key. Prints nothing pending for <recipient> when there is none. The
recipient defaults as for flume wait.
Naming a place, as flume status names one, the inbox collects that
place’s ends alone, and no message: those of its record, or, once it was tidied, of the
records kept for it, <place>@<at> naming one record. It reads them
before it moves anything on, so it collects nothing tidied since. A
name under which no record stands is refused, and nothing is handed
over.
Beneath them, waiting gives every place, or the place named, that
waits on its caller and on the recipient: one it is a recipient of, one whose stop-short named
it, or one whose stall of the move it waits on now reached it as the
answerer. Each comes with its kind, name, stream and brief’s first
line, the move and since when, the stop-short’s words, key and the
role it asked, and a hold on the move that still holds. The inbox marks
nothing for these
(flume inbox).
flume confirm
Section titled “flume confirm”flume confirm <key>… [--recipient <name>]Confirms, as the recipient, each end’s delivery by its key,
<kind>--<name>/<token>/<end key>, or each message’s,
message/<stream>/<role>/<token>, as the inbox, a wait, status and
the notice give it, each in the command that confirms it as its
recipient, flume confirm --recipient <recipient> <key>. A notice, a wait, the inbox and a session’s start
hand an end over, and a hand-over delivers nothing: the end stays
pending for its recipient until the recipient confirms it, so a
recipient that stopped before it acted on what it was handed is handed
it again. Each key answers with when it was confirmed; a key confirmed
before writes nothing and gives when it first was. A key no end is
under, or one whose end is another recipient’s, is refused, naming the
key and what failed, and the keys after it are not confirmed. The
recipient defaults as for flume wait.
$ flume confirm fix--one/0a1b2c3d/submission/1/landed --recipient cifix--one/0a1b2c3d/submission/1/landed confirmed by ci at 1794150120An end nobody confirms is never dropped: once the host’s span,
[host] ends_expire, passes since it
was read, status shows it expired with its recipient, and a name nothing
was ever confirmed under as never confirmed, so a misspelt recipient is
found and confirmed as that name.
| Exit | |
|---|---|
0 |
every key confirmed |
1 |
refused |
flume wake
Section titled “flume wake”flume wake <address>Wakes a role’s address, <stream>/<role>: a role a source of the host
declares in its roles file, for a stream the host declares
(roles and wake). Where no run of the
address stands, it launches the run its source’s entry gives, in the
address’s stream. Otherwise it makes nothing, saying the run is live or
waits. It is refused, saying why, for a name that is no address, and
for an address that no source declares or two declare, whose stream the
host does not declare, whose entry is at fault, or that its source
declares carried, its run on another host:
$ flume wake east/reviewerrefused: east/reviewer wakes nothing: no source of the host declares east/reviewer$ flume wake north/plannerrefused: north/planner wakes nothing on this host: acme declares it carried, its run on another hostAn address its source gives an agent that already runs (an address an agent already holds) launches nothing. The wake settles as any act does, then answers that the agent holds the address. It names the agent, its session and where that came from, and what the multiplexer found there, with the ends pending for it beneath:
$ flume wake east/designeast/design is held by the standing agent east-design in the session acme (the entry's), none of that name there, so nothing was launched; 1 end pending ~/.local/share/flume/places/f5f5e14159a8/fix--the-parser-reads-tabs: submission landed d185a879b51dba33555c036392b50443f4dfc5e8With --json the answer is {"woken":{…}} for a run and
{"held":{…}} for an agent that holds the address, as the state
reference
gives them.
flume kinds lock
Section titled “flume kinds lock”flume kinds lock [--host] [--remove | --hash <hash>] <identity>…Records each kind named, whole as <source>/<name>@<version>, at its
content’s hash, beside any other version of the same kind the lock
holds, and over an entry of the same identity. A source’s kind is read
as the host holds it, flume’s own as flume carries it.
| Flag | |
|---|---|
--host |
Write the host’s lock, $XDG_CONFIG_HOME/flume/flume.lock. Without it, the lock is .config/flume.lock in the working copy the command runs in, or --repository’s, which you commit. |
--remove |
Take each named entry out, reading no package, so a kind whose directory is gone can be taken out. |
--hash <hash> |
With one kind named, record it only where its content hashes to <hash>. Otherwise refuse, naming both hashes, and leave the lock as it was. |
It refuses, writing nothing:
- outside a working copy without
--host, naming--host; - an identity whose source is
repoorlaunch, which no lock records; - a kind no source holds, naming what its source does hold;
- a lock that cannot be read, which it never overwrites;
--hashwith more than one kind named.
--remove and --hash are never given together.
It writes the lock whole, beside it and renamed over it, while it holds
$XDG_STATE_HOME/flume/kinds-lock.lock, so two writers on the host
never lose each other’s entries. It fetches nothing and commits
nothing, and run twice it leaves the same lock. The answer names the
lock and each entry recorded or removed:
$ flume kinds lock --host acme/review@1recorded acme/review@1 at sha256:ab12… in ~/.config/flume/flume.lock$ flume kinds lock --host --remove acme/review@1removed acme/review@1 from ~/.config/flume/flume.lock$ flume kinds lock --host --remove acme/review@1~/.config/flume/flume.lock is as it wasflume open
Section titled “flume open”flume open [<session>]Shows a session of a stream’s, by the session’s name, in its stream’s
view, and the default stream’s own where none is named. It needs no
repository. What it opens is a session, never a stream:
- A stream’s own session, the one its
sessionnames, else the one named by the stream’s name, and, fordefaultnaming none, the multiplexer’s own. Soflume open workshowswork’s own whereworknames none. Its window is titled with the stream’stitle, else its name. - A session a stream names for a kind or a stage (a stream’s sessions). Its window is titled with the session’s name, and the answer gives the kinds and stages the stream names it for, each with its layer. Where it is the stream’s own session too, it is shown as the stream’s own.
Under herdr, a session not yet running is started first, as an agent’s start would start it, and stays running.
- View
terminal, the default. The stream’s multiplexer gives the command that attaches to the session, and the stream’s terminal app opens a window running it, under its title. Where no terminal app is named, flume opens no window and prints the command on its last line, afterrun:, for you or a launcher of your own to run. - View
app. The multiplexer’s own app shows the session. No title is given and no terminal app is read.
Configuration gives the keys, and seeing a stream’s agents the views and the terminal apps.
$ flume open workopened a ghostty window titled "Work Agents" (the stream's title) on herdr's session work (the stream's name) stream work, multiplexer herdr (the host's), view terminal (the default), terminal app ghostty (the host's) its command /usr/local/bin/herdr session attach work$ flume open personalthe terminal app printed opens no window; run this line to show herdr's session personal (the stream's name) titled "personal" (the stream's name): stream personal, multiplexer herdr (the host's), view terminal (the default), terminal app printed (the default) its command /usr/local/bin/herdr session attach personalrun: /usr/local/bin/herdr session attach personal$ flume open work-designopened a ghostty window titled "work-design" (the session's name) on herdr's session work-design (the stream's for its kind) stream work, multiplexer herdr (the host's), view terminal (the default), terminal app ghostty (the host's) the stream names the session work-design for the kind research (from managed) its command /usr/local/bin/herdr session attach work-designThe answer gives the stream, its multiplexer, session, view, title and
terminal app, each with where it came from, the kinds and stages the
stream names the session for, the command and what the window did. A variable the command needs is named, never its value:
the printed line gives it as <name>=<set>. With --json the answer
is {"opened":{…}}:
| Field | |
|---|---|
stream |
the stream’s name |
multiplexer |
profile and from: stream, host or neither |
session |
name, null for the multiplexer’s own, and from: stream, stream-name, own, stream-kind or stream-stage |
named |
the kinds and stages the stream names the session for: name, kinds and stages, each name, the kind or <kind>.<stage>, and layer, managed or local; left out where the stream names it for none |
view |
view, terminal or app, and from |
title |
title and from: stream, stream-name, or session for a session the stream names for a kind or a stage; null for the view app |
terminal_app |
profile and from; null for the view app |
command |
program, by its full path, arguments, and environment, the names of the variables it needs; null for the view app |
window |
"opened", {"printed":{"line":…}} or "app" |
Each asking opens a window of its own. flume keeps nothing of a window: it never finds, raises or closes one, and opens one only at your asking, never at a launch, a settle or a start. It takes no lock and writes nothing it holds. It is refused, opening nothing, when:
- the name is no session a stream’s word gives, a stream’s name that is not one of its sessions’ among them, naming each stream’s sessions, before the multiplexer or a window is asked anything;
- the session is given by two streams’ words, naming both;
- the stream’s multiplexer or terminal app names no profile flume carries, naming the profiles there are;
- the multiplexer holds no session to show, as the printed command, whose agents run in the commands it printed;
- the view is
appand the multiplexer has no app of its own, as herdr; - the terminal app refuses, in its own words: Ghostty not installed, Terminal.app not allowed to be controlled, or Terminal.app on a host that is not macOS.
flume relay
Section titled “flume relay”flume relay <place>Relays the place’s live agent’s terminal to a program that carries a
person’s screen and keys, such as a terminal in a web page: what the
terminal shows of the agent goes out each time it changes, and the
person’s input goes in as typed. The place is named as flume status
names one. The agent is the one the place’s current stage runs, reached
through the terminal it opened in.
It speaks JSON lines whatever --json says, one object a line. Out,
on standard output:
| Line | |
|---|---|
{"screen": "<text>"} |
What the terminal shows of the agent, as a person’s view of it shows it, colours as the terminal gives them. The first comes at once, then one each time it differs from the last. |
{"unread": "<why>"} |
A read the terminal did not answer, in its words, given once until a read answers again. |
{"untyped": "<why>"} |
An input not typed: a line of neither form below, a key flume does not name, or the terminal’s refusal, in its words. |
{"relayed": {"place": …, "agent": …, "ended": …}} |
The last line, its answer: the place, the agent by its identity, and caller or gone for what ended it. |
In, on standard input, one object a line, an empty line passed over:
| Line | |
|---|---|
{"text": "<text>"} |
Typed as it is. |
{"keys": ["<key>", …]} |
Each key typed in order, named by flume’s key names. |
Key names. enter, tab, esc, backspace, delete, insert,
home, end, pageup, pagedown, up, down, left, right,
space, f1 to f12, and any one printable character, each led by
any of ctrl+, alt+ and shift+ in that order: ctrl+c,
shift+tab, ctrl+alt+x. escape is read as esc. herdr 0.9.5
cannot type delete, insert, home, end, pageup or pagedown:
under it each is given back as untyped, named, and the keys around it
still go in. Rex 0.1.0-preview.14 types as typed only some keys. Under
it, these characters go in as text when bare, and are given back as
untyped, named, when led: ! " # $ % & ( ) * : <
? @ ^ _ { | } ~, every character outside ASCII and each
capital. So are ctrl+shift+ and a character or space, ctrl+ and
one of i m ' + , - . ; = > [ `, and
alt+shift+ and a character its shift changes. The keys around them
still go in.
A person’s keys. Nothing the agent holds typed is cleared first, and no receipt is waited on: the input is a person’s at the keyboard, not a prompt of flume’s. Text typed and not submitted stays typed.
Ends and exits. The relay ends when its input closes or its output
is no longer read, its answer ended by its caller, or once the agent’s
terminal goes, ended gone; either way it exits 0. A place with no
live agent, such as one whose stage waits for room, and a terminal that
offers no relay, the printed command’s, are refused: the
refusal’s JSON is the only line, and it exits 1.
Nothing kept. The relay settles nothing, writes nothing and keeps nothing it carried, and status and the list name no relay. Under herdr and Rex alike, the screen is read again at most every 250 milliseconds, each read and each input bounded at a second, and a screen is the agent’s visible screen, never its scrollback.
$ printf '%s\n' '{"text":"yes"}' '{"keys":["enter"]}' | flume relay fix--the-parser-reads-tabs{"screen":"> "}{"screen":"> yes"}{"relayed":{"place":"~/.local/share/flume/places/f5f5e14159a8/fix--the-parser-reads-tabs","agent":"flume:f5f5e14159a8:fix--the-parser-reads-tabs:code:1","ended":"caller"}}flume mcp
Section titled “flume mcp”Serves MCP on standard input and output with six tools. status takes
an optional place, answers as flume status --json does and settles
nothing. message, with target, words, within and answers;
launch, with kind, name, brief and the command’s other
switches by their long names, base, recipient, hold,
hold_submission, mark, priority, stall_after, agent, stream,
intent and drive, a list where the switch is given again and again;
wake, with address; hibernate, with place and force; and
resume, with place: each call is run as the command line runs the
same words, every default, check and refusal the command’s, its result
the command’s JSON and a refusal marked an error. A launch takes no
file over MCP: its brief is text. The server runs in its caller’s
environment, so a launch over MCP from a role’s run that names no
recipient reports to the run’s address. flume’s Claude Code plugin runs
it as its flume server.
Run by agents
Section titled “Run by agents”These run inside an agent flume started, where FLUME_AGENT and
FLUME_SECRET name its start. Elsewhere they refuse, or in the hook’s
case do nothing but session-start, which collects for the session
(a session of your own).
| Command | |
|---|---|
flume needs [--found] [--to <role or address>] <words> |
The stage ends short with the words: it needs an answer. --found says it found work a stage before its own must do again instead. --to names the role the words are for, one the stage’s prompt lists: a role alone, <role>, is the place’s own stream’s, and an address, <stream>/<role>, any stream’s. The end goes to that role alone, in place of the place’s recipients; a name the prompt did not list is refused, naming those it did, and the stage goes on (asking a role). Where its multiplexer can type into a running agent, the agent is kept open for the answer, but for found work that starts the kind’s fix round (the agent kept open). |
flume ack started --session <id> --transcript <path> --plugin-version <v> [--source <how>] |
The agent started under its identity and secret, in a session with a transcript. --source says how the session began, startup where none is given. flume takes it only where the agent runs the program its start recorded and every variable of the record matches. Otherwise it refuses, naming each variable that differed and whether the program did, and starts a settle of the place. |
flume ack received --digest <hex> [--mode <mode>] |
The agent received a prompt, by the SHA-256 digest of its text with paste tags taken off and whitespace collapsed. At the start’s first prompt, where its start passed a mode, flume takes it only where --mode names that mode as the program names it. Otherwise it refuses, naming the mode asked and the one given, records the start begun without its settings and starts a settle of the place. A later prompt compares no mode. |
flume hook <event> |
What the hook for the event does with the input on standard input: session-start, user-prompt-submit, pre-tool-use, permission-request, post-tool-use, stop, stop-failure or session-end. Any other event does nothing. It always exits 0. |
flume hook deliver |
Prints what the agent FLUME_AGENT names, under the secret FLUME_SECRET gives, takes at its wait in the place FLUME_PLACE names: a message to its place waiting on its start, else every end and message pending at a role’s run’s address as one prompt, each recorded handed. Only where the agent’s program takes words by its own channel; it prints nothing where nothing waits, the agent asks or its prompt is not yet received, reads no standard input and always exits 0. |
flume hook status-line |
Prints the line of the place FLUME_PLACE names, as flume status <place> --line gives it, ending · this session is not its agent where FLUME_AGENT is not the current stage’s live start. It needs FLUME_PLACE and FLUME_AGENT alone, and reads no standard input. It prints nothing where they are missing or the place cannot be read, writes nothing, settles nothing and always exits 0. |
flume hook usage |
Keeps the usage windows its standard input reports, {"rateLimits": […]} as Claude Code gives them, beside the start’s record with the time it ran, and has flume take them as the reading of the account the start FLUME_AGENT names runs under, with FLUME_SECRET. A report with a window in no form it reads keeps nothing, and one taken no later than the reading kept changes nothing. It reads and writes nothing without FLUME_AGENT and FLUME_SECRET, prints nothing and always exits 0 (the account’s usage windows). |
flume’s Claude Code plugin runs flume hook for every event, and its
module runs flume hook status-line to pin the place’s line,
flume hook usage to pass the account’s usage windows and, where the
agent’s program takes words by its own channel, flume hook deliver;
the Claude Code plugin
says what each does.
A hook that needs flume’s core reaches flume host first, as every
command does. Where none answers, the hook acts on nothing and writes
nothing. It says the refusal once on its standard error, naming the
socket and the host’s service manager. It still gives its answer and
exits 0, so it never holds up the agent.