Reading the CLI's output
What a person, an agent and a script each get from a saphan command, where the full detail goes, and how the owner-presence prompt waits.
For anyone who runs saphan at a terminal, from an agent, or from a script.
After reading it you can tell which form of output you are getting and why, find the full detail a short form left out, and answer the owner-presence prompt.
Three audiences, detected and never asked
Saphan decides who is reading. You are not asked, and there is no setting to pick.
| Who is reading | What the command prints |
|---|---|
| A person at a terminal | The short form: what matters about this act, and what to do next. |
An agent: the variable SAPHAN_AGENT is set | The full form. Saphan sets this variable on every agent run it starts. |
| A pipe or a file | The full form, with no colour and no box drawing, so a script can read it. |
A person can ask for more. --verbose gives a person the full form. Setting the variable by hand does
the same for one command: SAPHAN_AGENT=manual saphan <verb> ….
--quiet prints only the first line. NO_COLOR, TERM=dumb and --color change colour only; they
never change what is said.
--json output is unchanged by any of this.
The short form
A person at a terminal sees these parts, in this order:
- A first line with a symbol.
✔done ·✖refused or failed ·⚠done, with a warning ·●waiting. - A few lines about this act only.
ReasonandCause, on a refusal.NEXT, with the exact commands to run. They are written without a leading$, so you can copy them.- Warnings.
- One dim line,
full detail: <path>, whenever anything was left out.
Four examples follow. Yours will differ in names and numbers.
Landed
Not landed
Waiting for the code
A table
Where the rest goes: the log
Everything the short form leaves out is written to a log:
The last line of the short form, full detail: <path>, names the file. It appears only when something
was left out.
A log that cannot be written never fails the command. You get one warning saying so, and the act carries on.
Owner acts show one stream
saphan accept, land, merge, gate and teardown are acts on one stream, and they show only that
stream. Deviations elsewhere in the fleet are not printed by them. The act names the command that lists
them: saphan bus reconcile.
The owner-presence prompt
The acts listed in Acts that need the owner present ask for a code before they write anything. The prompt waits for you:
- It is printed once.
- Enter with no code does not cancel. It asks again.
- A wrong code prints one line and asks again.
- Only three things cancel the act: Ctrl-C, closing the terminal, or 5 wrong codes.
- A cancel writes nothing.
- The same code is valid for the whole act. An act that needs the owner in several steps does not ask again.
So pressing Enter by habit does not leave the prompt. To leave it, press Ctrl-C.