Appendix A Message Reference

A.1 The mirror websocket (/ws) #

One JSON object per text frame. Shell → session:

MessageFieldsEffect
launchapp, new?Open (or focus) an application
focusidFocus a window, restoring it if minimised
minimizeidMinimise a window
closeidClose a window
set-titleid, titleRename a window (relayed from its app)
appwin, req, bodyAn application request, shell-stamped

Session → shell:

MessageFieldsAudience
snapshotwindows, focus, keymapThe connecting tab
window.openedwindowEvery tab
window.closedidEvery tab
window.minimized / window.restoredidEvery tab
window.titledid, titleEvery tab
focusid (nullable)Every tab
app.replywin, req, bodyThe asking tab
app.streamwin, req, bodyThe asking tab
errormessageThe asking tab

A.2 The frame bus (postMessage) #

App → shell: hello {v} · set-title {title} · close · request {req, body} (req 0 marks fire-and-forget: pty-input, pty-resize) · chord {chord} (a captured reserved chord).

Shell → app: ready {window, theme, user, reserved} · theme {theme} · reply {req, body | error} · stream {req, body}.

A.3 Application request kinds #

KindCapabilityReply
system-infoHostname, kernel, uptime, user, logon session, host pid, Atrium version
execexec allowlistStreamed output, then {exit_code, exit_signal, truncated}
pty-openptyStreamed output; reply on shell exit
pty-input, pty-resizeptyNone (fire-and-forget)

Edit this page