Places one file where this surface's operator can reach it.
The mechanics are the surface's: a write to the resolved path for the local CLI, a write on the client machine for a remote CLI, a saved file for a browser. A daemon never writes to its own disk on a surface's behalf, for the same reason it never spawns a shell there.
What to deliver and where the operator asked for it.
Where it landed and how large it was.
Opens content in the surface's local editor and returns the result. The
editor mechanics are the surface's business — a temp file and $EDITOR
for the local CLI, the client's editor for a remote CLI, an editor
component in a browser.
The content to edit and an optional extension.
The edited content and whether it changed.
Runs one pipeline segment against an input, returning its output. Where this runs is the surface's business — in-process for the local CLI, on the client machine for a remote CLI — but never on a daemon host.
The segment command line (e.g. grep foo).
The bytes to feed the segment on stdin.
Optional_signal: AbortSignal
Aborted when the operator cancels the command; a surface that started a process kills it.
The segment's stdout.
Prompts for a line of input.
The prompt message and whether to hide the input.
The entered line, trimmed.
Runs one host-shell command on the surface machine.
The shell command without the leading !.
Optional_signal: AbortSignal
Aborted when the operator cancels the command; a surface that started a process kills it.
The process exit code.
The default surface for a host that has not installed one: it can do nothing interactive and says so clearly. This is the correct default for an unknown host — a CLI host replaces it (see
./cliSurface.js), and any attempt to prompt or edit before a real surface is installed fails loudly instead of hanging.