Skip to content

TerminalUpdate

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.v2.base
A v2 object with the ``_meta`` extension point.

⋔ Inheritance diagram

graph TD
  95970869953520["terminals.TerminalUpdate"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970869953520
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

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
class TerminalUpdate(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.
    """

    session_update: Literal["terminal_update"] = Field(default="terminal_update", init=False)

    terminal_id: TerminalId
    """Unique identifier for this terminal within the session."""

    command: str | MISSING | None = MISSING
    """The command being run."""

    cwd: AbsolutePath | MISSING | None = MISSING
    """The absolute working directory of the command."""

    output: TerminalOutput | MISSING | None = MISSING
    """An authoritative replacement snapshot of terminal output bytes."""

    exit_status: TerminalExitStatus | MISSING | None = MISSING
    """Exit information. A concrete object marks the terminal as exited."""

    size: TerminalSize | MISSING | None = MISSING
    """The terminal size the command runs with, when known."""

    capabilities: TerminalCapabilities | MISSING | None = MISSING
    """Client-initiated controls this terminal currently supports, such as cancellation."""

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

command: str | MISSING | None = MISSING

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.

:fa-brands-github: Show source on GitHub