ACP v2 (Preview) TypeScript SDK — EXPERIMENTAL - v2.12.1
    Preparing search index...

    Type Alias TerminalUpdateExperimental

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

    Only terminalId is required. Other fields have patch semantics: omitted fields leave the stored value unchanged, null clears it, and concrete values replace it. A concrete _meta object instead patches the stored metadata by top-level key. When the terminal ID is new, omitted fields start unknown.

    type TerminalUpdate = {
        terminalId: TerminalId;
        command?: string | null;
        cwd?: AbsolutePath | null;
        output?: TerminalOutput | null;
        exitStatus?: TerminalExitStatus | null;
        size?: TerminalSize | null;
        capabilities?: TerminalCapabilities | null;
        _meta?: { [key: string]: unknown } | null;
    }
    Index
    terminalId: TerminalId

    Unique identifier for this terminal within the session.

    command?: string | null

    The command being run.

    cwd?: AbsolutePath | null

    The absolute working directory of the command.

    output?: TerminalOutput | null

    An authoritative replacement snapshot of terminal output bytes.

    exitStatus?: TerminalExitStatus | null

    Exit information. A concrete object marks the terminal as exited.

    size?: TerminalSize | null

    The terminal size the command runs with, when known.

    Clients can render output at this size so that column layouts, progress bars, and cursor-positioned output display as the program wrote them.

    capabilities?: TerminalCapabilities | null

    Client-initiated controls this terminal currently supports, such as cancellation.

    Omission leaves the capabilities unchanged, null clears them, and an object replaces the whole previous value. A new terminal starts with none.

    _meta?: { [key: string]: unknown } | null

    The _meta property is reserved by ACP to allow Clients and Agents to attach additional metadata to their interactions. Omitted leaves the stored metadata unchanged. null clears it. An object patches the stored metadata by top-level key: keys it omits are unchanged, a key set to null is removed, and any other value replaces that key's stored value without merging nested objects. Beyond this patch rule, implementations MUST NOT assign meaning to keys they do not recognize.

    See protocol docs: Metadata Patches