terminals
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| CancelTerminalRequest aclientp.schema.v2.terminals Parameters of ``terminal/cancel``: cancel one terminal. |
||
| CancelTerminalResponse aclientp.schema.v2.terminals Response from cancelling a terminal. |
||
| TerminalCancelCapabilities aclientp.schema.v2.terminals Capability to cancel a terminal with ``terminal/cancel``. |
||
| TerminalCapabilities aclientp.schema.v2.terminals Client-initiated controls a terminal currently supports. |
||
| TerminalExitStatus aclientp.schema.v2.terminals Exit information for an agent-owned terminal. |
||
| TerminalOutput aclientp.schema.v2.terminals An authoritative replacement snapshot of terminal output bytes. |
||
| TerminalOutputChunk aclientp.schema.v2.terminals A chunk of bytes appended to an agent-owned terminal's output. |
||
| TerminalSize aclientp.schema.v2.terminals The size of an agent-owned terminal in character cells. |
||
| TerminalUpdate aclientp.schema.v2.terminals An upsert of an agent-owned terminal's state, keyed by ``terminal_id``. |
🛈 DocStrings¶
v2 agent-owned, display-only terminals.
Agents run commands themselves; terminals only display them. Tool calls reference a
terminal by terminalId (Terminal content); terminal_update upserts carry
command, cwd, replay snapshots and exit status, and terminal_output_chunk appends
independently base64-encoded bytes. Clients cannot execute or control processes,
except cancelling terminals that allow it.
CancelTerminalRequest
¶
Bases: AnnotatedObject
Parameters of terminal/cancel: cancel one terminal.
Only for terminals that currently advertise capabilities.cancel.
Source code in src/aclientp/schema/v2/terminals.py
CancelTerminalResponse
¶
Bases: AnnotatedObject
Response from cancelling a terminal.
Source code in src/aclientp/schema/v2/terminals.py
TerminalCancelCapabilities
¶
Bases: AnnotatedObject
Capability to cancel a terminal with terminal/cancel.
Source code in src/aclientp/schema/v2/terminals.py
TerminalCapabilities
¶
Bases: AnnotatedObject
Client-initiated controls a terminal currently supports.
Source code in src/aclientp/schema/v2/terminals.py
cancel
class-attribute
instance-attribute
¶
cancel: TerminalCancelCapabilities | MISSING | None = MISSING
Permits the Client to cancel this terminal with terminal/cancel.
TerminalExitStatus
¶
Bases: AnnotatedObject
Exit information for an agent-owned terminal.
Its presence marks the terminal as exited, even when neither code nor signal is known.
Source code in src/aclientp/schema/v2/terminals.py
TerminalOutput
¶
Bases: AnnotatedObject
An authoritative replacement snapshot of terminal output bytes.
Source code in src/aclientp/schema/v2/terminals.py
TerminalOutputChunk
¶
Bases: AnnotatedObject
A chunk of bytes appended to an agent-owned terminal's output.
Source code in src/aclientp/schema/v2/terminals.py
decode
¶
from_bytes
classmethod
¶
from_bytes(terminal_id: TerminalId, data: bytes) -> Self
Create a chunk from raw output bytes.
TerminalSize
¶
Bases: AnnotatedObject
The size of an agent-owned terminal in character cells.
Source code in src/aclientp/schema/v2/terminals.py
TerminalUpdate
¶
Bases: AnnotatedObject
An upsert of an agent-owned terminal's state, keyed by terminal_id.
Other fields are patches: omitted leaves the stored value unchanged, None
clears it.
Source code in src/aclientp/schema/v2/terminals.py
capabilities
class-attribute
instance-attribute
¶
capabilities: TerminalCapabilities | MISSING | None = MISSING
Client-initiated controls this terminal currently supports, such as cancellation.
command
class-attribute
instance-attribute
¶
The command being run.
cwd
class-attribute
instance-attribute
¶
cwd: AbsolutePath | MISSING | None = MISSING
The absolute working directory of the command.
exit_status
class-attribute
instance-attribute
¶
exit_status: TerminalExitStatus | MISSING | None = MISSING
Exit information. A concrete object marks the terminal as exited.
output
class-attribute
instance-attribute
¶
output: TerminalOutput | MISSING | None = MISSING
An authoritative replacement snapshot of terminal output bytes.
size
class-attribute
instance-attribute
¶
size: TerminalSize | MISSING | None = MISSING
The terminal size the command runs with, when known.
terminal_id
instance-attribute
¶
terminal_id: TerminalId
Unique identifier for this terminal within the session.