Skip to content

ToolUpdateMeta

Base classes

Name Children Inherits
dict
builtins
dict() -> new empty dictionary

⋔ Inheritance diagram

graph TD
  95970865807312["field_meta.ToolUpdateMeta"]
  125067848556736["builtins.dict"]
  125067848591872["builtins.object"]
  125067848556736 --> 95970865807312
  125067848591872 --> 125067848556736

🛈 DocStrings

Bases: TypedDict

_meta of tool_call and tool_call_update session updates.

Defined as ToolUpdateMeta in claude-agent-acp's src/tool-calls/renderer.ts; the terminal keys match codex-acp's.

Display-only terminal lifecycle (shell tools, clients declaring terminal_output or terminal_output_delta):

  1. tool_call with terminal_info: client creates the terminal.
  2. tool_call_update with terminal_output / terminal_output_delta: client shows the output.
  3. tool_call_update with terminal_exit: client marks the process exited.

This exists because these agents run commands themselves, while ACP v1 expects the client to own terminals via terminal/create. ACP v2 removes client terminals and adds agent-owned display terminals instead.

Source code in src/aclientp/schema/field_meta.py
class ToolUpdateMeta(TypedDict, total=False):
    """``_meta`` of ``tool_call`` and ``tool_call_update`` session updates.

    Defined as ``ToolUpdateMeta`` in claude-agent-acp's ``src/tool-calls/renderer.ts``;
    the terminal keys match codex-acp's.

    **Display-only terminal lifecycle** (shell tools, clients declaring
    ``terminal_output`` or ``terminal_output_delta``):

    1. ``tool_call`` with ``terminal_info``: client creates the terminal.
    2. ``tool_call_update`` with ``terminal_output`` / ``terminal_output_delta``:
       client shows the output.
    3. ``tool_call_update`` with ``terminal_exit``: client marks the process exited.

    This exists because these agents run commands themselves, while ACP v1
    expects the client to own terminals via ``terminal/create``. ACP v2 removes
    client terminals and adds agent-owned display terminals instead.
    """

    claudeCode: ClaudeCodeToolMeta
    """Claude Code-specific tool metadata."""

    is_mcp_tool_call: Literal[True]
    """Set on MCP tool calls (claude-agent-acp)."""

    terminal_info: TerminalInfoMeta
    """Create a display-only terminal (initial ``tool_call``)."""

    terminal_output: TerminalOutputMeta
    """Terminal output, replacing earlier output."""

    terminal_output_delta: TerminalOutputMeta
    """Terminal output, appended to earlier output."""

    terminal_exit: TerminalExitMeta
    """Process exit (final ``tool_call_update``)."""

claudeCode instance-attribute

claudeCode: ClaudeCodeToolMeta

Claude Code-specific tool metadata.

is_mcp_tool_call instance-attribute

is_mcp_tool_call: Literal[True]

Set on MCP tool calls (claude-agent-acp).

terminal_exit instance-attribute

terminal_exit: TerminalExitMeta

Process exit (final tool_call_update).

terminal_info instance-attribute

terminal_info: TerminalInfoMeta

Create a display-only terminal (initial tool_call).

terminal_output instance-attribute

terminal_output: TerminalOutputMeta

Terminal output, replacing earlier output.

terminal_output_delta instance-attribute

terminal_output_delta: TerminalOutputMeta

Terminal output, appended to earlier output.

:fa-brands-github: Show source on GitHub