Terminal fixture for captures, protocol docs, panel icon

This commit is contained in:
2026-11-09 22:03:52 +00:00
parent e79a120ac7
commit 9cda79fa87
5 changed files with 196 additions and 1 deletions
+25
View File
@@ -1291,3 +1291,28 @@ browses `_pipelines._tcp.local` on its own LAN, with a bounded DNS-SD query; it
does not scan arbitrary ports. An unavailable browse returns a protocol error.
The authenticated web front door exposes the same result at `GET /api/discovery`,
including before the browser has opened its application websocket.
### Machine terminals
Interactive login shells on a server's machine, independent of chats (the
app's terminal panel). Every request carries `terminal_request`
`{terminal_id?, cwd?, cols?, rows?, data?, after?}`:
- `terminal_open {cwd, cols, rows}` starts `$SHELL -l` (else `/bin/sh`) in
`cwd` (default home; it must be an existing folder inside home) and replies
with `terminal`. Where `tmux` is installed the shell runs in its own session
of a Pipelines-owned tmux server (`tmux -L pipelines`, never the operator's
own), so it outlives a server restart and the next server reattaches it.
At most 8 running terminals per machine.
- `terminal_list` replies with `terminals` (running and ended, oldest first).
- `terminal_input {terminal_id, data}` writes UTF-8 input (at most 16 KiB);
`terminal_resize {terminal_id, cols, rows}` resizes. Neither is logged.
- `terminal_output {terminal_id, after}` replies with the retained output (1
MiB tail) from byte `after` of the stream named `stream`; a restarted server
starts a new stream at zero. Opening or reading subscribes the connection to
the terminal's output frames.
- `terminal_close {terminal_id}` kills the shell and its tmux session.
- Pushed `terminal_event {terminal_id, output, offset, end}` (output) or
`{terminal_id, terminal}` (opened, title, exited, closed).
See `app/notes/terminal-panel.md`.