List sessions
GET /v1/agents/runtime/{runtime_id}/pty
Returns every PTY session belonging to the runtime, including sessions that have exited but
not yet been reaped.
{"sessions": [PtySession, ...]}.
Describe a session
GET /v1/agents/runtime/{runtime_id}/pty/{session_id}
PtySession.
Poll this when you want to know whether a session has exited without holding a stream open.
Resize
POST /v1/agents/runtime/{runtime_id}/pty/{session_id}/resize
Changes the terminal geometry and delivers SIGWINCH to the foreground job, so full screen
programs redraw at the new size.
Send a signal
POST /v1/agents/runtime/{runtime_id}/pty/{session_id}/signal
Signals the session’s process directly.
Names are accepted with or without the
SIG prefix. Only these four signals are permitted.
Writing
\x03 with send input goes
through the terminal’s line discipline and interrupts the foreground job, leaving the
shell running. This endpoint signals the session process itself. Use input for
Ctrl-C semantics and this endpoint when you want to act on the session regardless of what
is running in it.Kill a session
DELETE /v1/agents/runtime/{runtime_id}/pty/{session_id}
Terminates the session and releases its terminal, scrollback buffer and slot in the
per-runtime session limit.