Cotal TypeScript packages
    Preparing search index...

    Class TmuxRuntime

    Spawns each agent into its own new tmux window in a shared per-space session, so spawned teammates get room rather than crowding the spawner. Opened unfocused so the human stays in their current window; switch to session:name to watch the worker. Watch natively: attach() throws. The handle keeps the pane and opening server for control.

    Implements

    Index
    kind: "tmux" = ...
    reportsStartupOutcome: true

    True when every handle this runtime spawns reports AgentHandle.startupOutcome. A once spawn on a connector with Connector.onceNeedsConfirmed is refused without it.

    streamsTerminal: false

    Whether a handle this runtime creates can open a live AttachSession. A backend that owns the child's pseudo-terminal streams it; a backend that attaches to a process it does not own holds no stream for it, and its AgentHandle.attach throws its own guidance instead.

    REQUIRED, and a backend that streams nothing says so rather than leaving a caller to find out by catching the throw: the manager reports this to its callers, so a foreground cotal spawn on such a runtime launches the seat without attempting an attach that cannot open, and cotal attach refuses by name. Omitting it on a streaming backend would silence that terminal.

    • Take back a window an earlier manager opened, by the reference its handle carried (#4095). Only the exact seat is adopted: the server that opened it still runs, the pane is still in the recorded window, that window is still in this runtime's session, and the pane's process is still running. Anything else throws and nothing is touched, so the caller reaps or retires instead. The name is the reference's window id; the caller knows the seat's name.

      Parameters

      Returns AgentHandle

    • Close a window an earlier manager opened, by the reference its handle carried, and prove the window and its pane gone. The window decides, not the pane: a pane that exited can leave its window open (remain-on-exit, or another pane split into it), so a window this runtime's session still holds is closed whatever its pane's state. A server that is gone, or a window and pane it no longer lists, means the seat is gone. A pane still listed outside that window, live or exited, or a window only other sessions hold, is absent: nothing here touches it or proves anything about it. tmux checks the pane and the session again in the command that closes the window, so a seat whose placement changed after these listings is absent too.

      Parameters

      Returns Promise<{ outcome: "absent" } | { detail: string; outcome: "reaped" }>