Skip to content

session_updates

Class info

Classes

Name Children Inherits
AgentMessageChunk
aclientp.schema.session_updates
A chunk of the agent's response being streamed.
    AgentPlanUpdate
    aclientp.schema.session_updates
    The agent's execution plan for complex tasks.
      AgentThoughtChunk
      aclientp.schema.session_updates
      A chunk of the agent's internal reasoning being streamed.
        AvailableCommandsUpdate
        aclientp.schema.session_updates
        Available commands are ready or have changed.
          BaseChunk
          aclientp.schema.session_updates
          Base class for all session update chunks.
          CompactionSummaryChunk
          aclientp.schema.session_updates
          A content block appended to a compaction's summary.
            CompactionUpdate
            aclientp.schema.session_updates
            A context compaction upsert.
              ConfigOptionUpdate
              aclientp.schema.session_updates
              A session configuration option value has changed.
                Cost
                aclientp.schema.session_updates
                Cost information for a session.
                  CurrentModeUpdate
                  aclientp.schema.session_updates
                  The current mode of the session has changed.
                    CursorUpdate
                    aclientp.schema.session_updates
                    **UNSTABLE**: A session cursor was announced or its capabilities changed.
                      IdleStateUpdate
                      aclientp.schema.session_updates
                      **UNSTABLE**: The child is ready to process another prompt.
                        Notice
                        aclientp.schema.session_updates
                        Fire-and-forget information for the user.
                          PlanRemoved
                          aclientp.schema.session_updates
                          **UNSTABLE**: Remove an ID-addressed plan.
                            PlanUpdate
                            aclientp.schema.session_updates
                            **UNSTABLE**: Create or replace an ID-addressed plan.
                              PromptSuggestion
                              aclientp.schema.session_updates
                              **UNSTABLE**: A prompt the client can offer to the user.
                                PromptSuggestionsUpdate
                                aclientp.schema.session_updates
                                **UNSTABLE**: Suggested next prompts, replacing any previous suggestions.
                                  RequiresActionStateUpdate
                                  aclientp.schema.session_updates
                                  **UNSTABLE**: Foreground work is blocked on user action.
                                    RunningStateUpdate
                                    aclientp.schema.session_updates
                                    **UNSTABLE**: Foreground work is in progress.
                                      SessionInfoUpdate
                                      aclientp.schema.session_updates
                                      Incremental update to session metadata.
                                        SessionMessage
                                        aclientp.schema.session_updates
                                        **UNSTABLE**: A message exchanged between sessions (e.g. parent and subagent).
                                          SessionMessageChunk
                                          aclientp.schema.session_updates
                                          **UNSTABLE**: A content block appended to a ``session_message``.
                                            SubagentUpdate
                                            aclientp.schema.session_updates
                                            **UNSTABLE**: A subagent session started by the parent, or a change to it.
                                              ToolCallProgress
                                              aclientp.schema.session_updates
                                              Update on the status or results of a tool call.
                                                ToolCallStart
                                                aclientp.schema.session_updates
                                                Notification that a new tool call has been initiated.
                                                  UnknownStateUpdate
                                                  aclientp.schema.session_updates
                                                  **UNSTABLE**: The Agent cannot currently determine foreground activity.
                                                    Usage
                                                    aclientp.schema.session_updates
                                                    **UNSTABLE**: Token usage information for a prompt turn.
                                                      UsageUpdate
                                                      aclientp.schema.session_updates
                                                      Context window and cost update for a session.
                                                        UserMessageChunk
                                                        aclientp.schema.session_updates
                                                        A chunk of the user's message being streamed.

                                                          🛈 DocStrings

                                                          Session update schema definitions.

                                                          CompactionId module-attribute

                                                          CompactionId = str
                                                          

                                                          Agent-owned ID of a context compaction, unique within the session.

                                                          CompactionStatus module-attribute

                                                          CompactionStatus = Literal['in_progress', 'completed', 'failed', 'cancelled'] | str
                                                          

                                                          Lifecycle state of a context compaction.

                                                          NoticeSeverity module-attribute

                                                          NoticeSeverity = Literal['info', 'warning', 'error'] | str
                                                          

                                                          Severity hint for a session notice.

                                                          StateUpdate module-attribute

                                                          StateUpdate = Annotated[
                                                              Annotated[RunningStateUpdate, Tag("running")]
                                                              | Annotated[IdleStateUpdate, Tag("idle")]
                                                              | Annotated[RequiresActionStateUpdate, Tag("requires_action")]
                                                              | Annotated[UnknownStateUpdate, Tag("unknown")],
                                                              Discriminator(_state_discriminator),
                                                          ]
                                                          

                                                          UNSTABLE: State snapshot of a subagent session.

                                                          AgentMessageChunk

                                                          Bases: BaseChunk

                                                          A chunk of the agent's response being streamed.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class AgentMessageChunk(BaseChunk):
                                                              """A chunk of the agent's response being streamed."""
                                                          
                                                              session_update: Literal["agent_message_chunk"] = Field(
                                                                  default="agent_message_chunk", init=False
                                                              )
                                                              """Agent message chunk."""
                                                          

                                                          session_update class-attribute instance-attribute

                                                          session_update: Literal['agent_message_chunk'] = Field(default='agent_message_chunk', init=False)
                                                          

                                                          Agent message chunk.

                                                          AgentPlanUpdate

                                                          Bases: AnnotatedObject

                                                          The agent's execution plan for complex tasks.

                                                          See protocol docs: Agent Plan.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class AgentPlanUpdate(AnnotatedObject):
                                                              """The agent's execution plan for complex tasks.
                                                          
                                                              See protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan).
                                                              """
                                                          
                                                              session_update: Literal["plan"] = Field(default="plan", init=False)
                                                          
                                                              entries: Sequence[PlanEntry]
                                                              """The list of tasks to be accomplished.
                                                          
                                                              When updating a plan, the agent must send a complete list of all entries
                                                              with their current status. The client replaces the entire plan with each update."""
                                                          

                                                          entries instance-attribute

                                                          entries: Sequence[PlanEntry]
                                                          

                                                          The list of tasks to be accomplished.

                                                          When updating a plan, the agent must send a complete list of all entries with their current status. The client replaces the entire plan with each update.

                                                          AgentThoughtChunk

                                                          Bases: BaseChunk

                                                          A chunk of the agent's internal reasoning being streamed.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class AgentThoughtChunk(BaseChunk):
                                                              """A chunk of the agent's internal reasoning being streamed."""
                                                          
                                                              session_update: Literal["agent_thought_chunk"] = Field(
                                                                  default="agent_thought_chunk", init=False
                                                              )
                                                              """Agent thought chunk."""
                                                          

                                                          session_update class-attribute instance-attribute

                                                          session_update: Literal['agent_thought_chunk'] = Field(default='agent_thought_chunk', init=False)
                                                          

                                                          Agent thought chunk.

                                                          AvailableCommandsUpdate

                                                          Bases: AnnotatedObject

                                                          Available commands are ready or have changed.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class AvailableCommandsUpdate(AnnotatedObject):
                                                              """Available commands are ready or have changed."""
                                                          
                                                              session_update: Literal["available_commands_update"] = Field(
                                                                  default="available_commands_update", init=False
                                                              )
                                                              """Available commands are ready or have changed."""
                                                          
                                                              available_commands: Sequence[AvailableCommand]
                                                              """Commands the agent can execute"""
                                                          

                                                          available_commands instance-attribute

                                                          available_commands: Sequence[AvailableCommand]
                                                          

                                                          Commands the agent can execute

                                                          session_update class-attribute instance-attribute

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

                                                          Available commands are ready or have changed.

                                                          BaseChunk

                                                          Bases: AnnotatedObject

                                                          Base class for all session update chunks.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class BaseChunk(AnnotatedObject):
                                                              """Base class for all session update chunks."""
                                                          
                                                              content: ContentBlock
                                                              """A single item of content"""
                                                          
                                                              message_id: str | None = None
                                                              """**UNSTABLE**: A unique identifier for the message this chunk belongs to.
                                                          
                                                              All chunks belonging to the same message share the same ``message_id``.
                                                              A change in ``message_id`` indicates a new message has started.
                                                              Both clients and agents MUST use UUID format for message IDs.
                                                              """
                                                          
                                                              @classmethod
                                                              def text(
                                                                  cls,
                                                                  text: str,
                                                                  *,
                                                                  message_id: str | None = None,
                                                                  audience: Audience | None = None,
                                                                  last_modified: datetime | str | None = None,
                                                                  priority: float | None = None,
                                                              ) -> Self:
                                                                  """Create a chunk containing text.
                                                          
                                                                  Args:
                                                                      text: The text content.
                                                                      message_id: Unique identifier for the message this chunk belongs to.
                                                                      audience: The audience for the text.
                                                                      last_modified: The last modified date of the text.
                                                                      priority: The priority of the text.
                                                                  """
                                                                  annotations = Annotations.optionally_create(
                                                                      audience=audience,
                                                                      last_modified=last_modified,
                                                                      priority=priority,
                                                                  )
                                                                  return cls(
                                                                      content=TextContentBlock(text=text, annotations=annotations),
                                                                      message_id=message_id,
                                                                  )
                                                          
                                                              @classmethod
                                                              def image(
                                                                  cls,
                                                                  data: str | bytes,
                                                                  mime_type: str,
                                                                  uri: str | None = None,
                                                                  *,
                                                                  message_id: str | None = None,
                                                                  audience: Audience | None = None,
                                                                  last_modified: datetime | str | None = None,
                                                                  priority: float | None = None,
                                                              ) -> Self:
                                                                  """Create a chunk containing an embedded image resource.
                                                          
                                                                  Args:
                                                                      data: The image data.
                                                                      mime_type: The MIME type of the image.
                                                                      uri: The URI of the image.
                                                                      message_id: Unique identifier for the message this chunk belongs to.
                                                                      audience: The audience for the image.
                                                                      last_modified: The last modified date of the image.
                                                                      priority: The priority of the image.
                                                                  """
                                                                  if isinstance(data, bytes):
                                                                      data = base64.b64encode(data).decode()
                                                                  annotations = Annotations.optionally_create(
                                                                      audience=audience,
                                                                      last_modified=last_modified,
                                                                      priority=priority,
                                                                  )
                                                                  image = ImageContentBlock(
                                                                      data=data,
                                                                      mime_type=mime_type,
                                                                      uri=uri,
                                                                      annotations=annotations,
                                                                  )
                                                                  return cls(content=image, message_id=message_id)
                                                          
                                                              @classmethod
                                                              def audio(
                                                                  cls,
                                                                  data: str | bytes,
                                                                  mime_type: str,
                                                                  *,
                                                                  message_id: str | None = None,
                                                                  audience: Audience | None = None,
                                                                  last_modified: datetime | str | None = None,
                                                                  priority: float | None = None,
                                                              ) -> Self:
                                                                  """Create a chunk containing audio content.
                                                          
                                                                  Args:
                                                                      data: The audio data.
                                                                      mime_type: The MIME type of the audio data.
                                                                      message_id: Unique identifier for the message this chunk belongs to.
                                                                      audience: The audience for the audio chunk.
                                                                      last_modified: The last modified date of the audio chunk.
                                                                      priority: The priority of the audio chunk.
                                                                  """
                                                                  if isinstance(data, bytes):
                                                                      data = base64.b64encode(data).decode()
                                                                  annotations = Annotations.optionally_create(
                                                                      audience=audience,
                                                                      last_modified=last_modified,
                                                                      priority=priority,
                                                                  )
                                                                  content = AudioContentBlock(
                                                                      data=data,
                                                                      mime_type=mime_type,
                                                                      annotations=annotations,
                                                                  )
                                                                  return cls(content=content, message_id=message_id)
                                                          
                                                              @classmethod
                                                              def resource(
                                                                  cls,
                                                                  name: str,
                                                                  uri: str,
                                                                  description: str | None = None,
                                                                  mime_type: str | None = None,
                                                                  size: int | None = None,
                                                                  title: str | None = None,
                                                                  *,
                                                                  message_id: str | None = None,
                                                                  audience: Audience | None = None,
                                                                  last_modified: datetime | str | None = None,
                                                                  priority: float | None = None,
                                                              ) -> Self:
                                                                  """Create a chunk containing a resource content block.
                                                          
                                                                  Args:
                                                                      name: The name of the resource.
                                                                      uri: The URI of the resource.
                                                                      description: The description of the resource.
                                                                      mime_type: The MIME type of the resource.
                                                                      size: The size of the resource.
                                                                      title: The title of the resource.
                                                                      message_id: Unique identifier for the message this chunk belongs to.
                                                                      audience: The audience of the resource.
                                                                      last_modified: The last modified date of the resource.
                                                                      priority: The priority of the resource.
                                                                  """
                                                                  annotations = Annotations.optionally_create(
                                                                      audience=audience,
                                                                      last_modified=last_modified,
                                                                      priority=priority,
                                                                  )
                                                                  block = ResourceContentBlock(
                                                                      name=name,
                                                                      uri=uri,
                                                                      description=description,
                                                                      mime_type=mime_type,
                                                                      size=size,
                                                                      title=title,
                                                                      annotations=annotations,
                                                                  )
                                                                  return cls(content=block, message_id=message_id)
                                                          
                                                              @classmethod
                                                              def embedded_text_resource(
                                                                  cls,
                                                                  text: str,
                                                                  uri: str,
                                                                  mime_type: str | None = None,
                                                                  *,
                                                                  message_id: str | None = None,
                                                                  audience: Audience | None = None,
                                                                  last_modified: datetime | str | None = None,
                                                                  priority: float | None = None,
                                                              ) -> Self:
                                                                  """Create a chunk containing an embedded text resource.
                                                          
                                                                  Args:
                                                                      text: The text to embed.
                                                                      uri: The URI of the resource.
                                                                      mime_type: The MIME type of the resource.
                                                                      message_id: Unique identifier for the message this chunk belongs to.
                                                                      audience: The audience to apply to the resource.
                                                                      last_modified: The last modified date of the resource.
                                                                      priority: The priority of the resource.
                                                                  """
                                                                  annotations = Annotations.optionally_create(
                                                                      audience=audience,
                                                                      last_modified=last_modified,
                                                                      priority=priority,
                                                                  )
                                                                  contents = TextResourceContents(text=text, mime_type=mime_type, uri=uri)
                                                                  content = EmbeddedResourceContentBlock(annotations=annotations, resource=contents)
                                                                  return cls(content=content, message_id=message_id)
                                                          
                                                              @classmethod
                                                              def embedded_blob_resource(
                                                                  cls,
                                                                  data: bytes | str,
                                                                  uri: str,
                                                                  mime_type: str | None = None,
                                                                  *,
                                                                  message_id: str | None = None,
                                                                  audience: Audience | None = None,
                                                                  last_modified: datetime | str | None = None,
                                                                  priority: float | None = None,
                                                              ) -> Self:
                                                                  """Create a chunk containing an embedded blob resource.
                                                          
                                                                  Args:
                                                                      data: The data to embed.
                                                                      uri: The URI of the resource.
                                                                      mime_type: The MIME type of the resource.
                                                                      message_id: Unique identifier for the message this chunk belongs to.
                                                                      audience: The audience to apply to the resource.
                                                                      last_modified: The last modified date of the resource.
                                                                      priority: The priority of the resource.
                                                                  """
                                                                  if isinstance(data, bytes):
                                                                      data = base64.b64encode(data).decode()
                                                                  annotations = Annotations.optionally_create(
                                                                      audience=audience,
                                                                      last_modified=last_modified,
                                                                      priority=priority,
                                                                  )
                                                                  resource = BlobResourceContents(blob=data, mime_type=mime_type, uri=uri)
                                                                  content = EmbeddedResourceContentBlock(annotations=annotations, resource=resource)
                                                                  return cls(content=content, message_id=message_id)
                                                          

                                                          content instance-attribute

                                                          content: ContentBlock
                                                          

                                                          A single item of content

                                                          message_id class-attribute instance-attribute

                                                          message_id: str | None = None
                                                          

                                                          UNSTABLE: A unique identifier for the message this chunk belongs to.

                                                          All chunks belonging to the same message share the same message_id. A change in message_id indicates a new message has started. Both clients and agents MUST use UUID format for message IDs.

                                                          audio classmethod

                                                          audio(
                                                              data: str | bytes,
                                                              mime_type: str,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self
                                                          

                                                          Create a chunk containing audio content.

                                                          Parameters:

                                                          Name Type Description Default
                                                          data str | bytes

                                                          The audio data.

                                                          required
                                                          mime_type str

                                                          The MIME type of the audio data.

                                                          required
                                                          message_id str | None

                                                          Unique identifier for the message this chunk belongs to.

                                                          None
                                                          audience Audience | None

                                                          The audience for the audio chunk.

                                                          None
                                                          last_modified datetime | str | None

                                                          The last modified date of the audio chunk.

                                                          None
                                                          priority float | None

                                                          The priority of the audio chunk.

                                                          None
                                                          Source code in src/aclientp/schema/session_updates.py
                                                          @classmethod
                                                          def audio(
                                                              cls,
                                                              data: str | bytes,
                                                              mime_type: str,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self:
                                                              """Create a chunk containing audio content.
                                                          
                                                              Args:
                                                                  data: The audio data.
                                                                  mime_type: The MIME type of the audio data.
                                                                  message_id: Unique identifier for the message this chunk belongs to.
                                                                  audience: The audience for the audio chunk.
                                                                  last_modified: The last modified date of the audio chunk.
                                                                  priority: The priority of the audio chunk.
                                                              """
                                                              if isinstance(data, bytes):
                                                                  data = base64.b64encode(data).decode()
                                                              annotations = Annotations.optionally_create(
                                                                  audience=audience,
                                                                  last_modified=last_modified,
                                                                  priority=priority,
                                                              )
                                                              content = AudioContentBlock(
                                                                  data=data,
                                                                  mime_type=mime_type,
                                                                  annotations=annotations,
                                                              )
                                                              return cls(content=content, message_id=message_id)
                                                          

                                                          embedded_blob_resource classmethod

                                                          embedded_blob_resource(
                                                              data: bytes | str,
                                                              uri: str,
                                                              mime_type: str | None = None,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self
                                                          

                                                          Create a chunk containing an embedded blob resource.

                                                          Parameters:

                                                          Name Type Description Default
                                                          data bytes | str

                                                          The data to embed.

                                                          required
                                                          uri str

                                                          The URI of the resource.

                                                          required
                                                          mime_type str | None

                                                          The MIME type of the resource.

                                                          None
                                                          message_id str | None

                                                          Unique identifier for the message this chunk belongs to.

                                                          None
                                                          audience Audience | None

                                                          The audience to apply to the resource.

                                                          None
                                                          last_modified datetime | str | None

                                                          The last modified date of the resource.

                                                          None
                                                          priority float | None

                                                          The priority of the resource.

                                                          None
                                                          Source code in src/aclientp/schema/session_updates.py
                                                          @classmethod
                                                          def embedded_blob_resource(
                                                              cls,
                                                              data: bytes | str,
                                                              uri: str,
                                                              mime_type: str | None = None,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self:
                                                              """Create a chunk containing an embedded blob resource.
                                                          
                                                              Args:
                                                                  data: The data to embed.
                                                                  uri: The URI of the resource.
                                                                  mime_type: The MIME type of the resource.
                                                                  message_id: Unique identifier for the message this chunk belongs to.
                                                                  audience: The audience to apply to the resource.
                                                                  last_modified: The last modified date of the resource.
                                                                  priority: The priority of the resource.
                                                              """
                                                              if isinstance(data, bytes):
                                                                  data = base64.b64encode(data).decode()
                                                              annotations = Annotations.optionally_create(
                                                                  audience=audience,
                                                                  last_modified=last_modified,
                                                                  priority=priority,
                                                              )
                                                              resource = BlobResourceContents(blob=data, mime_type=mime_type, uri=uri)
                                                              content = EmbeddedResourceContentBlock(annotations=annotations, resource=resource)
                                                              return cls(content=content, message_id=message_id)
                                                          

                                                          embedded_text_resource classmethod

                                                          embedded_text_resource(
                                                              text: str,
                                                              uri: str,
                                                              mime_type: str | None = None,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self
                                                          

                                                          Create a chunk containing an embedded text resource.

                                                          Parameters:

                                                          Name Type Description Default
                                                          text str

                                                          The text to embed.

                                                          required
                                                          uri str

                                                          The URI of the resource.

                                                          required
                                                          mime_type str | None

                                                          The MIME type of the resource.

                                                          None
                                                          message_id str | None

                                                          Unique identifier for the message this chunk belongs to.

                                                          None
                                                          audience Audience | None

                                                          The audience to apply to the resource.

                                                          None
                                                          last_modified datetime | str | None

                                                          The last modified date of the resource.

                                                          None
                                                          priority float | None

                                                          The priority of the resource.

                                                          None
                                                          Source code in src/aclientp/schema/session_updates.py
                                                          @classmethod
                                                          def embedded_text_resource(
                                                              cls,
                                                              text: str,
                                                              uri: str,
                                                              mime_type: str | None = None,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self:
                                                              """Create a chunk containing an embedded text resource.
                                                          
                                                              Args:
                                                                  text: The text to embed.
                                                                  uri: The URI of the resource.
                                                                  mime_type: The MIME type of the resource.
                                                                  message_id: Unique identifier for the message this chunk belongs to.
                                                                  audience: The audience to apply to the resource.
                                                                  last_modified: The last modified date of the resource.
                                                                  priority: The priority of the resource.
                                                              """
                                                              annotations = Annotations.optionally_create(
                                                                  audience=audience,
                                                                  last_modified=last_modified,
                                                                  priority=priority,
                                                              )
                                                              contents = TextResourceContents(text=text, mime_type=mime_type, uri=uri)
                                                              content = EmbeddedResourceContentBlock(annotations=annotations, resource=contents)
                                                              return cls(content=content, message_id=message_id)
                                                          

                                                          image classmethod

                                                          image(
                                                              data: str | bytes,
                                                              mime_type: str,
                                                              uri: str | None = None,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self
                                                          

                                                          Create a chunk containing an embedded image resource.

                                                          Parameters:

                                                          Name Type Description Default
                                                          data str | bytes

                                                          The image data.

                                                          required
                                                          mime_type str

                                                          The MIME type of the image.

                                                          required
                                                          uri str | None

                                                          The URI of the image.

                                                          None
                                                          message_id str | None

                                                          Unique identifier for the message this chunk belongs to.

                                                          None
                                                          audience Audience | None

                                                          The audience for the image.

                                                          None
                                                          last_modified datetime | str | None

                                                          The last modified date of the image.

                                                          None
                                                          priority float | None

                                                          The priority of the image.

                                                          None
                                                          Source code in src/aclientp/schema/session_updates.py
                                                          @classmethod
                                                          def image(
                                                              cls,
                                                              data: str | bytes,
                                                              mime_type: str,
                                                              uri: str | None = None,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self:
                                                              """Create a chunk containing an embedded image resource.
                                                          
                                                              Args:
                                                                  data: The image data.
                                                                  mime_type: The MIME type of the image.
                                                                  uri: The URI of the image.
                                                                  message_id: Unique identifier for the message this chunk belongs to.
                                                                  audience: The audience for the image.
                                                                  last_modified: The last modified date of the image.
                                                                  priority: The priority of the image.
                                                              """
                                                              if isinstance(data, bytes):
                                                                  data = base64.b64encode(data).decode()
                                                              annotations = Annotations.optionally_create(
                                                                  audience=audience,
                                                                  last_modified=last_modified,
                                                                  priority=priority,
                                                              )
                                                              image = ImageContentBlock(
                                                                  data=data,
                                                                  mime_type=mime_type,
                                                                  uri=uri,
                                                                  annotations=annotations,
                                                              )
                                                              return cls(content=image, message_id=message_id)
                                                          

                                                          resource classmethod

                                                          resource(
                                                              name: str,
                                                              uri: str,
                                                              description: str | None = None,
                                                              mime_type: str | None = None,
                                                              size: int | None = None,
                                                              title: str | None = None,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self
                                                          

                                                          Create a chunk containing a resource content block.

                                                          Parameters:

                                                          Name Type Description Default
                                                          name str

                                                          The name of the resource.

                                                          required
                                                          uri str

                                                          The URI of the resource.

                                                          required
                                                          description str | None

                                                          The description of the resource.

                                                          None
                                                          mime_type str | None

                                                          The MIME type of the resource.

                                                          None
                                                          size int | None

                                                          The size of the resource.

                                                          None
                                                          title str | None

                                                          The title of the resource.

                                                          None
                                                          message_id str | None

                                                          Unique identifier for the message this chunk belongs to.

                                                          None
                                                          audience Audience | None

                                                          The audience of the resource.

                                                          None
                                                          last_modified datetime | str | None

                                                          The last modified date of the resource.

                                                          None
                                                          priority float | None

                                                          The priority of the resource.

                                                          None
                                                          Source code in src/aclientp/schema/session_updates.py
                                                          @classmethod
                                                          def resource(
                                                              cls,
                                                              name: str,
                                                              uri: str,
                                                              description: str | None = None,
                                                              mime_type: str | None = None,
                                                              size: int | None = None,
                                                              title: str | None = None,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self:
                                                              """Create a chunk containing a resource content block.
                                                          
                                                              Args:
                                                                  name: The name of the resource.
                                                                  uri: The URI of the resource.
                                                                  description: The description of the resource.
                                                                  mime_type: The MIME type of the resource.
                                                                  size: The size of the resource.
                                                                  title: The title of the resource.
                                                                  message_id: Unique identifier for the message this chunk belongs to.
                                                                  audience: The audience of the resource.
                                                                  last_modified: The last modified date of the resource.
                                                                  priority: The priority of the resource.
                                                              """
                                                              annotations = Annotations.optionally_create(
                                                                  audience=audience,
                                                                  last_modified=last_modified,
                                                                  priority=priority,
                                                              )
                                                              block = ResourceContentBlock(
                                                                  name=name,
                                                                  uri=uri,
                                                                  description=description,
                                                                  mime_type=mime_type,
                                                                  size=size,
                                                                  title=title,
                                                                  annotations=annotations,
                                                              )
                                                              return cls(content=block, message_id=message_id)
                                                          

                                                          text classmethod

                                                          text(
                                                              text: str,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self
                                                          

                                                          Create a chunk containing text.

                                                          Parameters:

                                                          Name Type Description Default
                                                          text str

                                                          The text content.

                                                          required
                                                          message_id str | None

                                                          Unique identifier for the message this chunk belongs to.

                                                          None
                                                          audience Audience | None

                                                          The audience for the text.

                                                          None
                                                          last_modified datetime | str | None

                                                          The last modified date of the text.

                                                          None
                                                          priority float | None

                                                          The priority of the text.

                                                          None
                                                          Source code in src/aclientp/schema/session_updates.py
                                                          @classmethod
                                                          def text(
                                                              cls,
                                                              text: str,
                                                              *,
                                                              message_id: str | None = None,
                                                              audience: Audience | None = None,
                                                              last_modified: datetime | str | None = None,
                                                              priority: float | None = None,
                                                          ) -> Self:
                                                              """Create a chunk containing text.
                                                          
                                                              Args:
                                                                  text: The text content.
                                                                  message_id: Unique identifier for the message this chunk belongs to.
                                                                  audience: The audience for the text.
                                                                  last_modified: The last modified date of the text.
                                                                  priority: The priority of the text.
                                                              """
                                                              annotations = Annotations.optionally_create(
                                                                  audience=audience,
                                                                  last_modified=last_modified,
                                                                  priority=priority,
                                                              )
                                                              return cls(
                                                                  content=TextContentBlock(text=text, annotations=annotations),
                                                                  message_id=message_id,
                                                              )
                                                          

                                                          CompactionSummaryChunk

                                                          Bases: AnnotatedObject

                                                          A content block appended to a compaction's summary.

                                                          A first-seen ID creates an in-progress compaction. Chunks append in receive order.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class CompactionSummaryChunk(AnnotatedObject):
                                                              """A content block appended to a compaction's summary.
                                                          
                                                              A first-seen ID creates an in-progress compaction. Chunks append in receive order.
                                                              """
                                                          
                                                              session_update: Literal["compaction_summary_chunk"] = Field(
                                                                  default="compaction_summary_chunk", init=False
                                                              )
                                                          
                                                              compaction_id: CompactionId
                                                              """ID of the compaction whose summary receives this content."""
                                                          
                                                              content: ContentBlock
                                                              """One content block to append."""
                                                          

                                                          compaction_id instance-attribute

                                                          compaction_id: CompactionId
                                                          

                                                          ID of the compaction whose summary receives this content.

                                                          content instance-attribute

                                                          content: ContentBlock
                                                          

                                                          One content block to append.

                                                          CompactionUpdate

                                                          Bases: AnnotatedObject

                                                          A context compaction upsert.

                                                          The first notification fixes the compaction's timeline position. Later updates with the same ID patch that entity in place. Only sent if the client advertised session.compaction.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class CompactionUpdate(AnnotatedObject):
                                                              """A context compaction upsert.
                                                          
                                                              The first notification fixes the compaction's timeline position.
                                                              Later updates with the same ID patch that entity in place.
                                                              Only sent if the client advertised ``session.compaction``.
                                                              """
                                                          
                                                              session_update: Literal["compaction_update"] = Field(default="compaction_update", init=False)
                                                          
                                                              compaction_id: CompactionId
                                                              """The Agent-owned ID of this compaction."""
                                                          
                                                              status: CompactionStatus
                                                              """Current lifecycle status."""
                                                          
                                                              summary: Sequence[ContentBlock] | None = None
                                                              """Complete replacement user-displayable summary content for the compaction."""
                                                          
                                                              error: str | None = None
                                                              """Human-readable error details for the compaction."""
                                                          

                                                          compaction_id instance-attribute

                                                          compaction_id: CompactionId
                                                          

                                                          The Agent-owned ID of this compaction.

                                                          error class-attribute instance-attribute

                                                          error: str | None = None
                                                          

                                                          Human-readable error details for the compaction.

                                                          status instance-attribute

                                                          Current lifecycle status.

                                                          summary class-attribute instance-attribute

                                                          summary: Sequence[ContentBlock] | None = None
                                                          

                                                          Complete replacement user-displayable summary content for the compaction.

                                                          ConfigOptionUpdate

                                                          Bases: AnnotatedObject

                                                          A session configuration option value has changed.

                                                          The full set of configuration options and their current values is sent on every change. Clients should replace their cached list entirely.

                                                          See protocol docs: Session Config Options <https://agentclientprotocol.com/protocol/session-config-options>_

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class ConfigOptionUpdate(AnnotatedObject):
                                                              """A session configuration option value has changed.
                                                          
                                                              The full set of configuration options and their current values is sent
                                                              on every change. Clients should replace their cached list entirely.
                                                          
                                                              See protocol docs: `Session Config Options <https://agentclientprotocol.com/protocol/session-config-options>`_
                                                              """
                                                          
                                                              session_update: Literal["config_option_update"] = Field(
                                                                  default="config_option_update", init=False
                                                              )
                                                          
                                                              config_options: Sequence[SessionConfigOption]
                                                              """The full set of configuration options and their current values."""
                                                          

                                                          config_options instance-attribute

                                                          config_options: Sequence[SessionConfigOption]
                                                          

                                                          The full set of configuration options and their current values.

                                                          Cost

                                                          Bases: AnnotatedObject

                                                          Cost information for a session.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class Cost(AnnotatedObject):
                                                              """Cost information for a session."""
                                                          
                                                              amount: float
                                                              """Total cumulative cost for session."""
                                                          
                                                              currency: str
                                                              """Unit of ``amount``: an ISO 4217 currency code (e.g. ``USD``), or e.g. ``credits``."""
                                                          

                                                          amount instance-attribute

                                                          amount: float
                                                          

                                                          Total cumulative cost for session.

                                                          currency instance-attribute

                                                          currency: str
                                                          

                                                          Unit of amount: an ISO 4217 currency code (e.g. USD), or e.g. credits.

                                                          CurrentModeUpdate

                                                          Bases: AnnotatedObject

                                                          The current mode of the session has changed.

                                                          See protocol docs: Session Modes

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class CurrentModeUpdate(AnnotatedObject):
                                                              """The current mode of the session has changed.
                                                          
                                                              See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)
                                                              """
                                                          
                                                              current_mode_id: str
                                                              """The ID of the current mode"""
                                                          
                                                              session_update: Literal["current_mode_update"] = Field(
                                                                  default="current_mode_update", init=False
                                                              )
                                                          

                                                          current_mode_id instance-attribute

                                                          current_mode_id: str
                                                          

                                                          The ID of the current mode

                                                          CursorUpdate

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: A session cursor was announced or its capabilities changed.

                                                          Upserts by cursor_id. The first update for a cursor MUST include anchor, which is fixed afterwards; later updates change only capabilities. Only sent if the client advertised session.cursors.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class CursorUpdate(AnnotatedObject):
                                                              """**UNSTABLE**: A session cursor was announced or its capabilities changed.
                                                          
                                                              Upserts by ``cursor_id``. The first update for a cursor MUST include ``anchor``,
                                                              which is fixed afterwards; later updates change only ``capabilities``.
                                                              Only sent if the client advertised ``session.cursors``.
                                                              """
                                                          
                                                              session_update: Literal["cursor_update"] = Field(default="cursor_update", init=False)
                                                          
                                                              cursor_id: CursorId
                                                              """The Agent-owned ID of this cursor, unique within the session."""
                                                          
                                                              anchor: CursorAnchor | None = None
                                                              """Where the cursor is. Required on the first update for a cursor."""
                                                          
                                                              capabilities: CursorCapabilities | None = None
                                                              """The methods that currently accept this cursor; a new cursor starts with none."""
                                                          

                                                          anchor class-attribute instance-attribute

                                                          anchor: CursorAnchor | None = None
                                                          

                                                          Where the cursor is. Required on the first update for a cursor.

                                                          capabilities class-attribute instance-attribute

                                                          capabilities: CursorCapabilities | None = None
                                                          

                                                          The methods that currently accept this cursor; a new cursor starts with none.

                                                          cursor_id instance-attribute

                                                          cursor_id: CursorId
                                                          

                                                          The Agent-owned ID of this cursor, unique within the session.

                                                          IdleStateUpdate

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: The child is ready to process another prompt.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class IdleStateUpdate(AnnotatedObject):
                                                              """**UNSTABLE**: The child is ready to process another prompt."""
                                                          
                                                              state: Literal["idle"] = Field(default="idle", init=False)
                                                          
                                                              stop_reason: (
                                                                  Literal["end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "error"]
                                                                  | str
                                                                  | None
                                                              ) = None
                                                              """Why foreground work stopped. Omitted when there is no stop reason."""
                                                          
                                                              error: Error | None = None
                                                              """For ``stop_reason: "error"``: the failure, as a JSON-RPC error object."""
                                                          
                                                              usage: Usage | None = None
                                                              """Token usage for completed foreground work."""
                                                          

                                                          error class-attribute instance-attribute

                                                          error: Error | None = None
                                                          

                                                          For stop_reason: "error": the failure, as a JSON-RPC error object.

                                                          stop_reason class-attribute instance-attribute

                                                          stop_reason: (
                                                              Literal["end_turn", "max_tokens", "max_turn_requests", "refusal", "cancelled", "error"]
                                                              | str
                                                              | None
                                                          ) = None
                                                          

                                                          Why foreground work stopped. Omitted when there is no stop reason.

                                                          usage class-attribute instance-attribute

                                                          usage: Usage | None = None
                                                          

                                                          Token usage for completed foreground work.

                                                          Notice

                                                          Bases: AnnotatedObject

                                                          Fire-and-forget information for the user.

                                                          Only sent if the client advertised session.notices.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class Notice(AnnotatedObject):
                                                              """Fire-and-forget information for the user.
                                                          
                                                              Only sent if the client advertised ``session.notices``.
                                                              """
                                                          
                                                              session_update: Literal["notice"] = Field(default="notice", init=False)
                                                          
                                                              severity: NoticeSeverity
                                                              """Presentation severity hint."""
                                                          
                                                              title: str
                                                              """Required non-empty plain-text title that can stand alone."""
                                                          
                                                              description: str | None = None
                                                              """Optional plain-text detail or guidance."""
                                                          

                                                          description class-attribute instance-attribute

                                                          description: str | None = None
                                                          

                                                          Optional plain-text detail or guidance.

                                                          severity instance-attribute

                                                          severity: NoticeSeverity
                                                          

                                                          Presentation severity hint.

                                                          title instance-attribute

                                                          title: str
                                                          

                                                          Required non-empty plain-text title that can stand alone.

                                                          PlanRemoved

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: Remove an ID-addressed plan.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class PlanRemoved(AnnotatedObject):
                                                              """**UNSTABLE**: Remove an ID-addressed plan."""
                                                          
                                                              session_update: Literal["plan_removed"] = Field(default="plan_removed", init=False)
                                                          
                                                              plan_id: PlanId
                                                              """The plan ID to remove."""
                                                          

                                                          plan_id instance-attribute

                                                          plan_id: PlanId
                                                          

                                                          The plan ID to remove.

                                                          PlanUpdate

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: Create or replace an ID-addressed plan.

                                                          Only sent if the client advertised the plan capability.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class PlanUpdate(AnnotatedObject):
                                                              """**UNSTABLE**: Create or replace an ID-addressed plan.
                                                          
                                                              Only sent if the client advertised the ``plan`` capability.
                                                              """
                                                          
                                                              session_update: Literal["plan_update"] = Field(default="plan_update", init=False)
                                                          
                                                              plan: PlanUpdateContent
                                                              """The updated plan content."""
                                                          

                                                          plan instance-attribute

                                                          The updated plan content.

                                                          PromptSuggestion

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: A prompt the client can offer to the user.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class PromptSuggestion(AnnotatedObject):
                                                              """**UNSTABLE**: A prompt the client can offer to the user."""
                                                          
                                                              prompt: Sequence[ContentBlock]
                                                              """The content of the suggested prompt."""
                                                          

                                                          prompt instance-attribute

                                                          prompt: Sequence[ContentBlock]
                                                          

                                                          The content of the suggested prompt.

                                                          PromptSuggestionsUpdate

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: Suggested next prompts, replacing any previous suggestions.

                                                          Only sent if the client advertised session.prompt_suggestions.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class PromptSuggestionsUpdate(AnnotatedObject):
                                                              """**UNSTABLE**: Suggested next prompts, replacing any previous suggestions.
                                                          
                                                              Only sent if the client advertised ``session.prompt_suggestions``.
                                                              """
                                                          
                                                              session_update: Literal["prompt_suggestions_update"] = Field(
                                                                  default="prompt_suggestions_update", init=False
                                                              )
                                                          
                                                              suggestions: Sequence[PromptSuggestion]
                                                              """The suggestions the Client can offer, ordered most likely first."""
                                                          

                                                          suggestions instance-attribute

                                                          suggestions: Sequence[PromptSuggestion]
                                                          

                                                          The suggestions the Client can offer, ordered most likely first.

                                                          RequiresActionStateUpdate

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: Foreground work is blocked on user action.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class RequiresActionStateUpdate(AnnotatedObject):
                                                              """**UNSTABLE**: Foreground work is blocked on user action."""
                                                          
                                                              state: Literal["requires_action"] = Field(default="requires_action", init=False)
                                                          

                                                          RunningStateUpdate

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: Foreground work is in progress.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class RunningStateUpdate(AnnotatedObject):
                                                              """**UNSTABLE**: Foreground work is in progress."""
                                                          
                                                              state: Literal["running"] = Field(default="running", init=False)
                                                          

                                                          SessionInfoUpdate

                                                          Bases: AnnotatedObject

                                                          Incremental update to session metadata.

                                                          Used to notify clients of changes to session info (title, timestamps) without requiring a full session list refresh.

                                                          Fields that are None are not changed. To update a field, set it to a value.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class SessionInfoUpdate(AnnotatedObject):
                                                              """Incremental update to session metadata.
                                                          
                                                              Used to notify clients of changes to session info (title, timestamps)
                                                              without requiring a full session list refresh.
                                                          
                                                              Fields that are None are not changed. To update a field, set it to a value.
                                                              """
                                                          
                                                              session_update: Literal["session_info_update"] = Field(
                                                                  default="session_info_update", init=False
                                                              )
                                                          
                                                              title: str | None = None
                                                              """New title for the session, or None to leave unchanged."""
                                                          
                                                              updated_at: str | None = None
                                                              """New ISO 8601 timestamp, or None to leave unchanged."""
                                                          

                                                          title class-attribute instance-attribute

                                                          title: str | None = None
                                                          

                                                          New title for the session, or None to leave unchanged.

                                                          updated_at class-attribute instance-attribute

                                                          updated_at: str | None = None
                                                          

                                                          New ISO 8601 timestamp, or None to leave unchanged.

                                                          SessionMessage

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: A message exchanged between sessions (e.g. parent and subagent).

                                                          Upserts by message_id: omitted fields are left unchanged, None clears them.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class SessionMessage(AnnotatedObject):
                                                              """**UNSTABLE**: A message exchanged between sessions (e.g. parent and subagent).
                                                          
                                                              Upserts by ``message_id``: omitted fields are left unchanged, ``None`` clears them.
                                                              """
                                                          
                                                              session_update: Literal["session_message"] = Field(default="session_message", init=False)
                                                          
                                                              message_id: str
                                                              """Identifier of this message within the enclosing session's transcript."""
                                                          
                                                              sender_session_id: str | None = None
                                                              """The sending session."""
                                                          
                                                              recipient_session_id: str | None = None
                                                              """The receiving session."""
                                                          
                                                              sender_message_id: str | None = None
                                                              """On an incoming view, the ``message_id`` of the outgoing view in the sender's transcript."""
                                                          
                                                              recipient_message_id: str | None = None
                                                              """On an outgoing view, the ``message_id`` of the incoming view in the recipient."""
                                                          
                                                              content: Sequence[ContentBlock] | None = None
                                                              """Replaces all content when non-empty. ``None`` or ``[]`` clears it."""
                                                          

                                                          content class-attribute instance-attribute

                                                          content: Sequence[ContentBlock] | None = None
                                                          

                                                          Replaces all content when non-empty. None or [] clears it.

                                                          message_id instance-attribute

                                                          message_id: str
                                                          

                                                          Identifier of this message within the enclosing session's transcript.

                                                          recipient_message_id class-attribute instance-attribute

                                                          recipient_message_id: str | None = None
                                                          

                                                          On an outgoing view, the message_id of the incoming view in the recipient.

                                                          recipient_session_id class-attribute instance-attribute

                                                          recipient_session_id: str | None = None
                                                          

                                                          The receiving session.

                                                          sender_message_id class-attribute instance-attribute

                                                          sender_message_id: str | None = None
                                                          

                                                          On an incoming view, the message_id of the outgoing view in the sender's transcript.

                                                          sender_session_id class-attribute instance-attribute

                                                          sender_session_id: str | None = None
                                                          

                                                          The sending session.

                                                          SessionMessageChunk

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: A content block appended to a session_message.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class SessionMessageChunk(AnnotatedObject):
                                                              """**UNSTABLE**: A content block appended to a ``session_message``."""
                                                          
                                                              session_update: Literal["session_message_chunk"] = Field(
                                                                  default="session_message_chunk", init=False
                                                              )
                                                          
                                                              message_id: str
                                                              """Identifier of this message within the enclosing session's transcript."""
                                                          
                                                              content: ContentBlock
                                                              """A single content block appended to the message."""
                                                          

                                                          content instance-attribute

                                                          content: ContentBlock
                                                          

                                                          A single content block appended to the message.

                                                          message_id instance-attribute

                                                          message_id: str
                                                          

                                                          Identifier of this message within the enclosing session's transcript.

                                                          SubagentUpdate

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: A subagent session started by the parent, or a change to it.

                                                          Only sent if the client advertised the subagents capability.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class SubagentUpdate(AnnotatedObject):
                                                              """**UNSTABLE**: A subagent session started by the parent, or a change to it.
                                                          
                                                              Only sent if the client advertised the ``subagents`` capability.
                                                              """
                                                          
                                                              session_update: Literal["subagent_update"] = Field(default="subagent_update", init=False)
                                                          
                                                              session_id: str
                                                              """The opaque session ID identifying the child in all ACP messages."""
                                                          
                                                              title: str | None = None
                                                              """The parent's human-readable display title for this child."""
                                                          
                                                              description: str | None = None
                                                              """The parent's description of the child's role or purpose."""
                                                          
                                                              capabilities: SubagentSessionCapabilities | None = None
                                                              """Client-initiated session mutations permitted for this subagent session."""
                                                          
                                                              state: StateUpdate | None = None
                                                              """Current state snapshot for the child session."""
                                                          
                                                              cwd: str | None = None
                                                              """The child's working directory. Must be an absolute path."""
                                                          
                                                              additional_directories: Sequence[str] | None = None
                                                              """Additional workspace roots for the child. Each path must be absolute."""
                                                          

                                                          additional_directories class-attribute instance-attribute

                                                          additional_directories: Sequence[str] | None = None
                                                          

                                                          Additional workspace roots for the child. Each path must be absolute.

                                                          capabilities class-attribute instance-attribute

                                                          capabilities: SubagentSessionCapabilities | None = None
                                                          

                                                          Client-initiated session mutations permitted for this subagent session.

                                                          cwd class-attribute instance-attribute

                                                          cwd: str | None = None
                                                          

                                                          The child's working directory. Must be an absolute path.

                                                          description class-attribute instance-attribute

                                                          description: str | None = None
                                                          

                                                          The parent's description of the child's role or purpose.

                                                          session_id instance-attribute

                                                          session_id: str
                                                          

                                                          The opaque session ID identifying the child in all ACP messages.

                                                          state class-attribute instance-attribute

                                                          state: StateUpdate | None = None
                                                          

                                                          Current state snapshot for the child session.

                                                          title class-attribute instance-attribute

                                                          title: str | None = None
                                                          

                                                          The parent's human-readable display title for this child.

                                                          ToolCallProgress

                                                          Bases: AnnotatedObject

                                                          Update on the status or results of a tool call.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class ToolCallProgress(AnnotatedObject):
                                                              """Update on the status or results of a tool call."""
                                                          
                                                              session_update: Literal["tool_call_update"] = Field(default="tool_call_update", init=False)
                                                              """Tool call update."""
                                                          
                                                              content: Sequence[ToolCallContent] | None = None
                                                              """Replace the content collection."""
                                                          
                                                              kind: ToolCallKind | None = None
                                                              """Update the tool kind."""
                                                          
                                                              locations: Sequence[ToolCallLocation] | None = None
                                                              """Replace the locations collection."""
                                                          
                                                              raw_input: Any | None = None
                                                              """Update the raw input."""
                                                          
                                                              raw_output: Any | None = None
                                                              """Update the raw output."""
                                                          
                                                              status: ToolCallStatus | None = None
                                                              """Update the execution status."""
                                                          
                                                              title: str | None = None
                                                              """Update the human-readable title."""
                                                          
                                                              name: str | None = None
                                                              """Update the programmatic name of the tool being invoked."""
                                                          
                                                              tool_call_id: str
                                                              """The ID of the tool call being updated."""
                                                          

                                                          content class-attribute instance-attribute

                                                          content: Sequence[ToolCallContent] | None = None
                                                          

                                                          Replace the content collection.

                                                          kind class-attribute instance-attribute

                                                          kind: ToolCallKind | None = None
                                                          

                                                          Update the tool kind.

                                                          locations class-attribute instance-attribute

                                                          locations: Sequence[ToolCallLocation] | None = None
                                                          

                                                          Replace the locations collection.

                                                          name class-attribute instance-attribute

                                                          name: str | None = None
                                                          

                                                          Update the programmatic name of the tool being invoked.

                                                          raw_input class-attribute instance-attribute

                                                          raw_input: Any | None = None
                                                          

                                                          Update the raw input.

                                                          raw_output class-attribute instance-attribute

                                                          raw_output: Any | None = None
                                                          

                                                          Update the raw output.

                                                          session_update class-attribute instance-attribute

                                                          session_update: Literal['tool_call_update'] = Field(default='tool_call_update', init=False)
                                                          

                                                          Tool call update.

                                                          status class-attribute instance-attribute

                                                          status: ToolCallStatus | None = None
                                                          

                                                          Update the execution status.

                                                          title class-attribute instance-attribute

                                                          title: str | None = None
                                                          

                                                          Update the human-readable title.

                                                          tool_call_id instance-attribute

                                                          tool_call_id: str
                                                          

                                                          The ID of the tool call being updated.

                                                          ToolCallStart

                                                          Bases: AnnotatedObject

                                                          Notification that a new tool call has been initiated.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class ToolCallStart(AnnotatedObject):
                                                              """Notification that a new tool call has been initiated."""
                                                          
                                                              session_update: Literal["tool_call"] = Field(default="tool_call", init=False)
                                                              """Notification that a new tool call has been initiated."""
                                                          
                                                              content: Sequence[ToolCallContent] | None = None
                                                              """Content produced by the tool call."""
                                                          
                                                              kind: ToolCallKind | None = None
                                                              """The category of tool being invoked.
                                                          
                                                              Helps clients choose appropriate icons and UI treatment.
                                                              """
                                                          
                                                              locations: Sequence[ToolCallLocation] | None = None
                                                              """File locations affected by this tool call.
                                                          
                                                              Enables "follow-along" features in clients.
                                                              """
                                                          
                                                              raw_input: Any | None = None
                                                              """Raw input parameters sent to the tool."""
                                                          
                                                              raw_output: Any | None = None
                                                              """Raw output returned by the tool."""
                                                          
                                                              status: ToolCallStatus | None = None
                                                              """Current execution status of the tool call."""
                                                          
                                                              title: str
                                                              """Human-readable title describing what the tool is doing."""
                                                          
                                                              name: str | None = None
                                                              """Programmatic name of the tool being invoked."""
                                                          
                                                              tool_call_id: str
                                                              """Unique identifier for this tool call within the session."""
                                                          

                                                          content class-attribute instance-attribute

                                                          content: Sequence[ToolCallContent] | None = None
                                                          

                                                          Content produced by the tool call.

                                                          kind class-attribute instance-attribute

                                                          kind: ToolCallKind | None = None
                                                          

                                                          The category of tool being invoked.

                                                          Helps clients choose appropriate icons and UI treatment.

                                                          locations class-attribute instance-attribute

                                                          locations: Sequence[ToolCallLocation] | None = None
                                                          

                                                          File locations affected by this tool call.

                                                          Enables "follow-along" features in clients.

                                                          name class-attribute instance-attribute

                                                          name: str | None = None
                                                          

                                                          Programmatic name of the tool being invoked.

                                                          raw_input class-attribute instance-attribute

                                                          raw_input: Any | None = None
                                                          

                                                          Raw input parameters sent to the tool.

                                                          raw_output class-attribute instance-attribute

                                                          raw_output: Any | None = None
                                                          

                                                          Raw output returned by the tool.

                                                          session_update class-attribute instance-attribute

                                                          session_update: Literal['tool_call'] = Field(default='tool_call', init=False)
                                                          

                                                          Notification that a new tool call has been initiated.

                                                          status class-attribute instance-attribute

                                                          status: ToolCallStatus | None = None
                                                          

                                                          Current execution status of the tool call.

                                                          title instance-attribute

                                                          title: str
                                                          

                                                          Human-readable title describing what the tool is doing.

                                                          tool_call_id instance-attribute

                                                          tool_call_id: str
                                                          

                                                          Unique identifier for this tool call within the session.

                                                          UnknownStateUpdate

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: The Agent cannot currently determine foreground activity.

                                                          Also used for custom or future states, whose raw value is kept in state.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class UnknownStateUpdate(AnnotatedObject):
                                                              """**UNSTABLE**: The Agent cannot currently determine foreground activity.
                                                          
                                                              Also used for custom or future states, whose raw value is kept in ``state``.
                                                              """
                                                          
                                                              state: str = "unknown"
                                                          

                                                          Usage

                                                          Bases: AnnotatedObject

                                                          UNSTABLE: Token usage information for a prompt turn.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class Usage(AnnotatedObject):
                                                              """**UNSTABLE**: Token usage information for a prompt turn."""
                                                          
                                                              total_tokens: int = Field(ge=0)
                                                              """Sum of all token types across session."""
                                                          
                                                              input_tokens: int = Field(ge=0)
                                                              """Total input tokens across all turns."""
                                                          
                                                              output_tokens: int = Field(ge=0)
                                                              """Total output tokens across all turns."""
                                                          
                                                              thought_tokens: int | None = Field(default=None, ge=0)
                                                              """Total thought/reasoning tokens."""
                                                          
                                                              cached_read_tokens: int | None = Field(default=None, ge=0)
                                                              """Total cache read tokens."""
                                                          
                                                              cached_write_tokens: int | None = Field(default=None, ge=0)
                                                              """Total cache write tokens."""
                                                          

                                                          cached_read_tokens class-attribute instance-attribute

                                                          cached_read_tokens: int | None = Field(default=None, ge=0)
                                                          

                                                          Total cache read tokens.

                                                          cached_write_tokens class-attribute instance-attribute

                                                          cached_write_tokens: int | None = Field(default=None, ge=0)
                                                          

                                                          Total cache write tokens.

                                                          input_tokens class-attribute instance-attribute

                                                          input_tokens: int = Field(ge=0)
                                                          

                                                          Total input tokens across all turns.

                                                          output_tokens class-attribute instance-attribute

                                                          output_tokens: int = Field(ge=0)
                                                          

                                                          Total output tokens across all turns.

                                                          thought_tokens class-attribute instance-attribute

                                                          thought_tokens: int | None = Field(default=None, ge=0)
                                                          

                                                          Total thought/reasoning tokens.

                                                          total_tokens class-attribute instance-attribute

                                                          total_tokens: int = Field(ge=0)
                                                          

                                                          Sum of all token types across session.

                                                          UsageUpdate

                                                          Bases: AnnotatedObject

                                                          Context window and cost update for a session.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class UsageUpdate(AnnotatedObject):
                                                              """Context window and cost update for a session."""
                                                          
                                                              session_update: Literal["usage_update"] = Field(default="usage_update", init=False)
                                                          
                                                              used: int = Field(ge=0)
                                                              """Tokens currently in context."""
                                                          
                                                              size: int = Field(ge=0)
                                                              """Total context window size in tokens."""
                                                          
                                                              cost: Cost | None = None
                                                              """Cumulative session cost (optional)."""
                                                          

                                                          cost class-attribute instance-attribute

                                                          cost: Cost | None = None
                                                          

                                                          Cumulative session cost (optional).

                                                          size class-attribute instance-attribute

                                                          size: int = Field(ge=0)
                                                          

                                                          Total context window size in tokens.

                                                          used class-attribute instance-attribute

                                                          used: int = Field(ge=0)
                                                          

                                                          Tokens currently in context.

                                                          UserMessageChunk

                                                          Bases: BaseChunk

                                                          A chunk of the user's message being streamed.

                                                          Source code in src/aclientp/schema/session_updates.py
                                                          class UserMessageChunk(BaseChunk):
                                                              """A chunk of the user's message being streamed."""
                                                          
                                                              session_update: Literal["user_message_chunk"] = Field(default="user_message_chunk", init=False)
                                                              """User message chunk."""
                                                          

                                                          session_update class-attribute instance-attribute

                                                          session_update: Literal['user_message_chunk'] = Field(default='user_message_chunk', init=False)
                                                          

                                                          User message chunk.