TerminalUpdate class final

An upsert for the stored state of an agent-owned terminal.

Only TerminalUpdate::terminal_id is required. Other fields have patch semantics: omitted fields leave the stored value unchanged, null clears it, and concrete values replace it. When the terminal ID is new, omitted fields start unknown.

Implemented types
Annotations
  • @JsonSerializable.new(createFactory: false, createToJson: false)

Constructors

TerminalUpdate({required TerminalId terminalId, AcpPatch<String> command = const AcpPatch<String>.unchanged(), AcpPatch<AbsolutePath> cwd = const AcpPatch<AbsolutePath>.unchanged(), AcpPatch<TerminalOutput> output = const AcpPatch<TerminalOutput>.unchanged(), AcpPatch<TerminalExitStatus> exitStatus = const AcpPatch<TerminalExitStatus>.unchanged(), AcpJsonObject? meta})
Creates a TerminalUpdate value.
TerminalUpdate.fromJson(Map<String, Object?> json)
Decodes a JSON object, discarding recoverable issues.
factory

Properties

command AcpPatch<String>
The command being run.
final
cwd AcpPatch<AbsolutePath>
The absolute working directory of the command.
final
exitStatus AcpPatch<TerminalExitStatus>
Exit information. A concrete object marks the terminal as exited.
final
hashCode int
The hash code for this object.
no setterinherited
meta AcpJsonObject?
The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Omitted means no metadata update; null is an explicit clear signal. Implementations MUST NOT make assumptions about values at these keys.
final
output AcpPatch<TerminalOutput>
An authoritative replacement snapshot of terminal output bytes.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
terminalId TerminalId
Unique identifier for this terminal within the session.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toAcpJson() AcpJsonObject
Converts this protocol value to its immutable JSON representation.
override
toJson() Map<String, Object?>
Encodes this value to its wire object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

decode(Object? json) → AcpDecoded<TerminalUpdate>
Decodes this model and reports recoverable issues.