This is chell from mise’s side: what the two shipped programs are, how they relate to the engine beneath them, and every way to start and reach a session. packages/chell/ carries its own documentation of the shell itself — the commands, the virtual filesystem, plugin execution, the store. What is here is the part a reader of the mise README needs next, and no more.
-
CUBE is the reality — the data, the analyses, the record of what produced what.
-
mise makes CUBE a POSIX-like computer — the data is a filesystem, every plugin a command, every running job a file.
-
calypso brings that computer to life, under one login — a session that holds your place and keeps working when you look away.
-
chell and ARGUS are two windows onto that login — a terminal and a browser console showing one session, never two copies.
brasa is the engine: it turns a line into validated ChRIS actions and hands back a structured envelope. It has no terminal of its own. Two programs put a face on it.
chell is a surface. It is a terminal that drives the engine, renders what comes back, and reads the next line. By default it holds the engine in-process: the session begins when the shell starts and dies when it exits.
calypso is a host. It holds one engine as a long-lived session and serves it over a WebSocket to whatever attaches. It renders nothing itself.
They are the same host code. chell --daemon and the calypso binary do the same thing, and the flags match; use whichever is to hand. A calypso session outlives any surface attached to it, which is the point: a walk that takes twenty minutes keeps walking when the terminal showing it is closed.
$ chell
> connect --user you --password •••• https://cube.chrisproject.org/api/v1/One process, one session, nothing to clean up. The right mode for scripting and for a single operator at one machine.
$ chell --daemon # or: calypsoThe daemon logs into CUBE from the saved session — no prompt, because nobody may be watching — and prints its address, its identity, its attach token, and its berth file. The same lines are written to a file it names, so a second terminal can find them without scrollback.
A chell attached to a session (chell --remote) runs host commands, pipeline segments and its editor when the session asks, on the person’s own machine. It runs one only against the line it sent that asked for it: a ! line its command, a pipeline’s later segment that is not a builtin exactly as typed (and grep’s or command’s own host line), an `edit <file> line one edit of that file as typed, a download the files its sources send (each source as typed matched against the root the session resolved; a folder’s files by their path inside it) into the destination it named, each place once, and a ! the session runs on its own pseudo-terminal the hand-over of this terminal, while the line runs. Which pipeline segments leave the session follows the words the session says its engine runs, where this chell’s own catalogue for that backend agrees; where the two disagree, or the backend is one whose commands this chell does not carry, the pipeline is put to you. Anything else the session asks (a script’s !, a step after &&, a pipeline chell could not route) is put to you on this terminal, with exactly what would run, quoted, every control and direction character shown: y once, l for that kind of request for the rest of the line (whatever it runs; for a file written here, only into the same folder here from inside the same source, and a file that is not inside the source it names, or names none, is offered once only), r to refuse the rest of the line, allow all (typed in full) to let the session run anything it asks on this machine until it disconnects; anything else is no, and three noes refuse the rest of the line. The terminal has one holder at a time, passed straight to the next in line, and a closed connection withdraws the session’s own questions, waiting or open. A question is put only when nothing else holds the terminal (a command, the editor, a program handed the terminal, a question of the session’s own); otherwise the request is refused. A question is put only once the terminal has been quiet for a moment (keys typed while chell was busy are typed ahead, not an answer), and is drawn plain whatever the session’s output left the terminal in. Lines typed ahead and a line half typed at the prompt never answer it, in the REPL or in -c, where what the terminal still holds is dropped first. A line’s failure and chell’s own notes, like its output, are shown after an open question, never over it. While a question is open the session’s output waits and is shown after it, and the line’s end withdraws it. Where there is no terminal to ask on, such a request is refused, with the reason. chell --remote --allow-host-requests gives the whole connection that permission from the start, for scripts run without a terminal; it is never stored, a new connection starts without it, and while it holds (or after allow all) the prompt begins [host: all allowed]. Whatever is allowed, a file is written only to a place resolved here and once per line, a request id is answered once, and the terminal is handed to a program only when nothing else holds it. A line chell cannot read that from (a list with ;, && or ||, a capture, a redirect, a line sent to the background, a segment holding a reference, a download of . or ~) asks for nothing here. A session of an earlier release does not say which line asks, so a current chell grants it nothing: while exactly one line runs, its requests are put to you for y once (never l or allow all), bound to that line, and an editor it asks for on a file it does not name is refused. Upgrade the daemon.
download writes only inside the destination named: every name that came from ChRIS (a source’s own name, a file inside a folder downloaded, a parent’s name for two sources that share one) is placed under it, and a name that would land elsewhere is refused and counted failed while the rest of the batch goes on. A listing row counts only when it is a plain name directly inside the folder it was listed in. Each file is written to a fresh temporary file beside its place, checked to be inside the destination, and renamed over the name, owner-only (0600): a link standing at the name is replaced, never followed, and a file outside the destination is never opened for writing. Replacing a file needs write permission on its folder, not on the file. A delivery to an attached chell is placed the same way on the chell’s machine, at the place the person’s grant or answer approved. On macOS a folder whose ACL would give new files to others is refused. On Linux the writer holds each folder it writes into as an open descriptor and creates, renames and cleans up only relative to it, so another process that swaps a folder for a link during the download cannot take a byte outside the destination; a folder moved out of the destination is refused before the file is published, and reported as unconfirmed if it moves right after. On macOS, or where /proc cannot be used, the guarantee holds while no other process changes folders inside the destination during the download; where one does, an empty temporary file or folder can be left outside, and the download says so.
$ chell --remote you@http://cube.example.org/api/v1/ # same machine, by identity
$ chell --attach 'ws://host:35739/?token=4c9d98c3…' # elsewhere; the URL carries the token
$ chell --attach ws://host:35739/ --token 4c9d98c3… # when the URL does not
$ calypso --berths # what is running on this machine
$ calypso --version # the stack this calypso would run (-V)A berth is the record of a running session, keyed by identity, so --remote you@url finds the right daemon without being told a port. Berths are per-identity: several daemons for several CUBE logins coexist on one machine without colliding.
A berth lives in a folder only its owner can use: $XDG_RUNTIME_DIR/calypso, or <tmpdir>/calypso-<uid> where there is no runtime directory. A folder or record another account could have made or changed (a link, another owner’s, wider than 0700 or 0600) is refused and named, never read. A berth is believed only when its daemon proves it is the instance that wrote it (GET /instance, a challenge that carries no secret; see the session supervisor). No process removes a berth: a dead one is passed over and the next daemon of its identity replaces it.
Upgrading: a daemon of an earlier release wrote its berth in the shared tmpdir()/calypso (where there was no runtime directory) and cannot prove itself, so current clients do not find it there, and where they do find one it is listed as unverified (earlier release) and no daemon is started beside it. Stop it once from its original terminal (Ctrl-C at the idle daemon prompt) or through its service manager, then start it again.
The attach token gates every session. Anyone holding it can drive the session as the identity that started it, so the URL the daemon prints is a credential in full.
A hosted session runs on the daemon’s machine, not the operator’s. It therefore refuses to touch that machine unless told otherwise: ! shell escapes, pipeline segments, and upload/download against the local disk are all off. This is the safe default, and it is why a remote surface cannot quietly read the disk of the host it attached to.
Turn on what is needed, in tiers:
$ chell --daemon --host-control # shell, files, pipes
$ chell --daemon --host-control=files # just upload/download against this disk
$ chell --daemon --host-control=shell,pipes # a subset
$ stratus --host-control=tasks # jobs that change the cloud; never in bare or allCALYPSO_HOST_CONTROL sets the same thing from the environment.
The shell tier is also what lets the engine start a program of its own on that machine: docker for plugin add of an image, git for scripts add and scripts pull (scripts already there are still listed, opened and played without it), ssh for vm shell, a renderer or a browser for chili’s path scan --mermaid and man doc --browser; pipes alone runs pipeline segments there and nothing else. With files off, a command that would read a file there (--ssh-key-file, cluster adopt --from, a redirect) refuses by name before touching the path.
The daemon binds to 127.0.0.1. CALYPSO_BIND=0.0.0.0 opens it to the network, which is what a demo on a trusted network needs. Combining a non-loopback bind
with host control requires --expose-host-control as well — a deliberate
second yes, because the combination hands a shell on that machine to anyone holding the attach URL. Without the flag the daemon refuses to start and says why.
When a built ARGUS bundle is found, the daemon serves it from the same port as the wire and prints one more line naming the URL. The bundle is looked for in CALYPSO_WEB_ROOT, then apps/argus/dist under the working directory, then the checkout enclosing the calypso module — so a dev tree serves the surface from any directory with no configuration.
A published install has none of those, so npm install -g @fnndsc/chell gives the CLI, the daemon and the wire, and no web surface. ARGUS is not published; the reason is its theme, and it is set out in docs/argus.adoc.
chell is a shell, and the shell things work: pipes between commands, > and >> redirection, ; sequencing, ! to reach the host OS, comments, and !/usr/bin/env chell shebangs. -c runs a line and exits, -f runs a file, and -e stops on the first error rather than continuing.
$ chell -c "ls /PIPELINES"
$ chell -c "cd /PIPELINES; ls; cat main.yml"
$ chell -f analysis.chell # played as a manifest; stops at its first refused line-
docs/gettingStarted.adoc— the tour, connecting, and a first analysis -
docs/calypso.adoc— the session daemon’s architecture and its reasoning -
docs/argus.adoc— the web surface, and the LCARS theme question -
docs/workspace-model.adoc— the filesystem the engine projects -
packages/chell/— the shell’s own documentation: commands, VFS, store, PACS