Expand description
Which websocket RPC commands a connection may call without being the AgentMux window.
Holding the instance key opens a connection; it does not make the connection the window. A command is
the window’s alone unless it is listed here: a new command is refused to everything but the window until
someone decides it is safe to open. server::dispatch_guard applies these lists at dispatch, and
scripts/gen-operator-commands.mjs writes the frontend’s list of commands that wait for the window’s
proof from them and from super::action_commands.
Constants§
- EVENT_
COMMANDS - The commands that carry an event name, which only the events in
OPEN_EVENTSmay be named in by a connection that is not the window: every event is delivered to whoever subscribed to it, and most carry another’s words (a pane’s output, a person’s typing, an agent’s turns). - OPEN
- Calls any connection may make: they read what the window itself shows to anyone who can open it, they
only subscribe this connection, or the handler decides per caller (
setconfigper key,notify.ackby the launcher’s proof). The window makes these before its own proof lands. - OPEN_
EVENTS - The events any connection may subscribe to or read the history of: the launcher’s notification events.
- OWN_
PANE - Calls a connection registered as an agent may make although they are the window’s: the handler lets the
agent act on its own pane only (
server::pane_caller) and refuses the rest.
Functions§
- is_
open_ for - Whether any connection may call
commandwith this request: it is open, and when it names an event (eventsub,eventreadhistory) the event is one ofOPEN_EVENTS. - is_
own_ pane - Whether a connection registered as an agent reaches
command’s handler although the command is not open: the handler checks the pane.