Overview
allternit-mux was the terminal multiplexer daemon behind Code Mode terminals, Gizzi’s PTYs, workspace panes and bot desktops. It has been folded into the Allternit Factory pane engine (factory/pane, run as allternit-factory pane). The cmd/allternit-mux crate and binary no longer exist.
A Desktop terminal tile, a Gizzi PTY and a Factory agent pane are now the same thing: a pane in the pane engine. A terminal shows in the agent wall as a workspace labeled term-<id>, and an agent you start in one is detected like any other agent pane.
Allternit Desktop builds released before this change keep using the
allternit-mux they bundle, so nothing needs migrating on those machines. The hosted runtime image and cloud computer images pick up allternit-factory on their next build.What replaced what
allternit-factory pane tty
The terminal commands, for shells, scripts and guest images. Every command prints JSON and exits 1 on an error. Every command except help starts the pane engine first when it isn’t running.
Socket methods
Clients that draw the terminal themselves (allternit-api’s Terminal API, Gizzi’s PTY websocket, workspace-service) speak to the pane engine’s socket directly. The socket takes one JSON request per connection:{"id", "method", "params"} on one line, then one response line {"id", "result"} or {"id", "error": {"code", "message"}}. These methods are Allternit additions and are not in the published Herdr schema.
factory.terminal.output answers {"id", "result": {"terminal_id", "replay_bytes"}}, then sends lines on the same connection:
{"type":"output","data":"…"}: terminal output as UTF-8 text. A character split across reads is never split across frames.{"type":"live"}: once, withfollow, when the replay is done and live output starts.{"type":"exit","exit_code":0}: once, when the shell exits and its output is drained.exit_codeisnullif it couldn’t be read.
terminal_not_found, terminal_exists, invalid_terminal_id, invalid_size, terminal_exited, terminal_write_failed, terminal_create_failed.
Behavior
- Scrollback. The pane engine keeps the last 2 MiB of each terminal’s raw output for replay. An exited terminal’s output and exit code are kept for 10 minutes, or until it’s closed.
- Size. The client owns a terminal’s size: a resize holds even when the agent wall lays the pane out differently.
- Terminal replies. While a client is streaming a terminal, that client answers the program’s terminal queries (cursor position, device attributes) and the pane engine’s own emulator stays quiet, so programs never read two replies. With nobody attached, the pane engine answers.
- Lifetime. Terminals live in the pane engine daemon. They survive UI reconnects and restarts of allternit-api or
gizzi serve, and end when the shell exits, the terminal is closed, or the pane engine stops. - Windows. The pane engine’s terminals need its Unix socket, and Windows Desktop doesn’t ship
allternit-factoryyet, so Windows Desktop has no terminals. That’s unchanged:allternit-muxwas macOS and Linux only too.