Optionalambient_Subscribes to events the engine originates on its own: a sampler's refreshed model, a watch changing state.
Receives each ambient event.
Function that unsubscribes.
Optionalcommand_Whether the command the caller runs inside was stopped (its output and questions are no one's).
Optionalfile_Reads one ChRIS file's raw bytes, resolved against the session's working directory. The seam a hosting daemon uses to serve file content to surfaces that render it natively (an image in a browser panel) rather than through a terminal stream.
The file's path (absolute or cwd-relative).
The file's bytes.
Optionalfile_Opens one file's bytes as a stream, resolved as Engine.file_read resolves. A hosting daemon serves a download through it, so a large file reaches the surface as it arrives and is never held whole.
The file's path (absolute, cwd-relative, or projected).
The stream and its size when known.
Optionalfile_Writes bytes to one ChRIS path, resolved against the session's working directory. The twin of Engine.file_read: a surface that cannot reach the machine's disk (a browser) hands its bytes to the daemon, which puts them in the store through the kernel like any other write.
The destination path (absolute or cwd-relative).
The content to write.
Optionaljoblets_The joblets running now, for a host that warns before a restart ends them.
Them, by number.
Optionaljobs_Picks up the backend's jobs that were running when the session last
ended (core/runner.ts). A host calls it once, after installing its surface,
which says whether the tasks tier is granted.
How many went on.
Optionalline_Aborts a running command, cancellable or not; the host abandons one that does not end.
Optionalid: stringOptionalline_Requests cancellation of a running command when it supports it (Ctrl-C).
Optionalid: string
The line, as its host named it; the most recent when omitted.
True when the command accepted the request.
Computes completion candidates for a partial input line.
The input line up to the cursor.
The matching candidates and the prefix they complete.
Executes one input line and returns one envelope per executed command.
The raw input line (may contain ;, |, >, !).
Optionaloptions: LineOptionsThe envelopes of the executed commands, in execution order.
Optionalline_What a line holds of the session while it runs, for a host that runs lines side by side: the pieces its commands change, none for a read, or 'all' when the line cannot say.
The line.
Its pieces, or 'all'.
Optionalorigin_Forgets what a surface left behind (its last answer), when it has gone.
The surface's origin.
Optionalregard_Returns the session's retained regard, or null before the first indication.
The retained regard, or null.
Optionalregard_Notes a regard write from a surface: the addressable thing the operator most recently indicated. The engine retains it as session truth (last write wins) so engine-side consumers can answer "what is the operator regarding" without any surface geometry crossing the seam.
The indicated address with its provenance.
Installs where the engine's output goes from now on: a daemon's sink relays it to every attached surface, a terminal's writes it to stdout.
The sink.
Installs who the engine asks for what only a surface can give: a hidden prompt, a local editor, a host shell, a delivered file.
The surface.
Optionalwatch_Releases every watch one owner holds (a surface detached).
The owner whose watches end.
Optionalwatch_Opens or closes a liveness watch on a subject for one owner (a surface id, or the operator at a console). While any owner watches a subject, the engine samples it and publishes refreshed models as ambient events.
The subject address (/proc/jobs/feed_N).
Who holds the watch.
True to watch, false to release.
The subject's watch state, or null when the subject is not watchable.
The hostable shell engine.
One engine serves one session: it executes command lines against the shared session state and answers completion requests. Hosts own the output destination (via the sink) and the input source (a readline loop, a socket); the engine owns everything between.