#[non_exhaustive]pub struct SubagentUpdate {
pub session_id: SessionId,
pub title: MaybeUndefined<String>,
pub description: MaybeUndefined<String>,
pub capabilities: MaybeUndefined<SubagentSessionCapabilities>,
pub state: MaybeUndefined<StateUpdate>,
pub meta: MaybeUndefined<Map<String, Value>>,
}Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Notification that the enclosing parent session created and owns a child session.
Later updates modify the existing association’s metadata, not its ownership.
Sent on the immediate parent session. The first update for an unknown
SubagentUpdate::session_id announces the child and MUST be sent
before any live child traffic or live message naming the child as sender
or recipient. Parents may message and reuse an announced child across
multiple operations.
Child events are delivered automatically on the same connection; no child
load, resume, or subscription is needed.
Only the subagent session ID is required. Omitted patch fields keep their
previous values; null clears them. Clearing capabilities disables child
mutations. Clearing state leaves current activity unset/unconfirmed: it does
not imply idle, stop work, or create an unknown state snapshot. A concrete
state replaces the entire previous state object, not the session.
The title and description provide the parent’s display metadata for the
child. They do not replace the content of individual messages or operations.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.session_id: SessionIdThe opaque session ID identifying the child in all ACP messages.
title: MaybeUndefined<String>The parent’s human-readable display title for this child. It need not be unique.
Omitted means unchanged; null clears it. If unset, the Client chooses
a fallback presentation.
description: MaybeUndefined<String>The parent’s human-readable description of the child’s role or purpose.
Omitted means unchanged; null clears it. If unset, the Client chooses
a fallback presentation. This is current display metadata, not the
history of instructions sent to the child.
capabilities: MaybeUndefined<SubagentSessionCapabilities>Client-initiated session mutations permitted for this subagent session.
Omitted means unchanged; null clears the capability set and disables
child mutations. If never supplied, no session mutations are permitted.
Read-only operations retain their normal protocol semantics and capability
requirements. A concrete object replaces the whole capability set.
state: MaybeUndefined<StateUpdate>Current state snapshot for the child session.
Omitted means unchanged; null clears the current activity without
asserting idle or sending an unknown snapshot. A concrete state
replaces the previous state object wholesale. If never supplied, the
current activity is unset/unconfirmed.
meta: MaybeUndefined<Map<String, Value>>The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys.
See protocol docs: Extensibility
Omitted means unchanged; null removes the metadata.
Implementations§
Source§impl SubagentUpdate
impl SubagentUpdate
Sourcepub fn new(session_id: impl Into<SessionId>) -> SubagentUpdate
Available on crate feature unstable_subagents only.
pub fn new(session_id: impl Into<SessionId>) -> SubagentUpdate
unstable_subagents only.Builds a subagent upsert with only its required session ID set.
Sourcepub fn title(self, title: impl IntoMaybeUndefined<String>) -> SubagentUpdate
Available on crate feature unstable_subagents only.
pub fn title(self, title: impl IntoMaybeUndefined<String>) -> SubagentUpdate
unstable_subagents only.Sets, clears, or omits the parent’s display title patch.
Sourcepub fn description(
self,
description: impl IntoMaybeUndefined<String>,
) -> SubagentUpdate
Available on crate feature unstable_subagents only.
pub fn description( self, description: impl IntoMaybeUndefined<String>, ) -> SubagentUpdate
unstable_subagents only.Sets, clears, or omits the parent’s description patch.
Sourcepub fn capabilities(
self,
capabilities: impl IntoMaybeUndefined<SubagentSessionCapabilities>,
) -> SubagentUpdate
Available on crate feature unstable_subagents only.
pub fn capabilities( self, capabilities: impl IntoMaybeUndefined<SubagentSessionCapabilities>, ) -> SubagentUpdate
unstable_subagents only.Replaces, clears, or omits the permitted client-initiated mutations patch.
Sourcepub fn state(
self,
state: impl IntoMaybeUndefined<StateUpdate>,
) -> SubagentUpdate
Available on crate feature unstable_subagents only.
pub fn state( self, state: impl IntoMaybeUndefined<StateUpdate>, ) -> SubagentUpdate
unstable_subagents only.Replaces, clears, or omits the current activity patch.
Sourcepub fn meta(
self,
meta: impl IntoMaybeUndefined<Map<String, Value>>,
) -> SubagentUpdate
Available on crate feature unstable_subagents only.
pub fn meta( self, meta: impl IntoMaybeUndefined<Map<String, Value>>, ) -> SubagentUpdate
unstable_subagents only.The _meta property is reserved by ACP to allow clients and agents to attach additional metadata to their interactions. Implementations MUST NOT make assumptions about values at these keys. Sets, clears, or omits this metadata patch.
Trait Implementations§
Source§impl Clone for SubagentUpdate
impl Clone for SubagentUpdate
Source§fn clone(&self) -> SubagentUpdate
fn clone(&self) -> SubagentUpdate
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SubagentUpdate
impl Debug for SubagentUpdate
Source§impl<'de> Deserialize<'de> for SubagentUpdate
impl<'de> Deserialize<'de> for SubagentUpdate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubagentUpdate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SubagentUpdate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for SubagentUpdate
impl JsonSchema for SubagentUpdate
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more