Expand description
The file protocol between srv and agentmux-remote serve --stdio
(SPEC_REMOTE_TERMINALS_AND_DURABLE_SESSIONS_2026_10_02.md §6.1, §6.3),
carried over one ssh -T host -- agentmux-remote serve --stdio per
connection. Shared by both ends, so they can never disagree on it.
A message is [len: u32 big-endian][body: len bytes]. A request body is
[id: u32][op: u8][fields], a reply body [id: u32][status: u8][fields];
the reply carries its request’s id. Strings and byte runs are
[len: u32][bytes]; numbers are big-endian. Binary, not JSON lines: the
helper stays dependency-free (a few hundred KB on the host), and a file’s
bytes need no escaping.
Structs§
- Entry
- Pane
Frame - The answer to
Request::PaneProcs. Absent values are ones the host’s OS wouldn’t give, never zeros. - Proc
Frame - The answer to
Request::Procs. - ProcRow
- One process in a
ProcFrame. Absent values are ones the host’s OS wouldn’t give without elevation, never zeros. - Splitter
- Splits a byte stream that arrives in arbitrary pieces into message bodies.
Enums§
- ErrKind
- Why a request failed, for srv to report the way a local error would be.
- Kind
- What kind of thing an entry is (a symlink is reported as what it points
to, with
Entry::symlinkset). - Pane
Found - How
Request::PaneProcsfound the pane’s processes. - Reply
- The answer to one request.
- Request
- What a request asks for.
Constants§
- MAX_
MESSAGE - Largest message accepted; a longer length means a broken stream.
- MAX_
READ - Largest
Readanswered at once: a bigger file is read in ranges. - MAX_
WRITE - Largest file
Writetakes in one message. - PROTOCOL
- The protocol version both ends must share (
Hello). 2 addedProcs, 3PaneProcs.