#[non_exhaustive]pub struct IdleStateUpdate {
pub stop_reason: Option<StopReason>,
pub usage: Option<Usage>,
pub meta: Option<Map<String, Value>>,
}unstable_protocol_v2 only.Expand description
The agent is not currently processing work in the session.
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.stop_reason: Option<StopReason>Indicates why the agent stopped processing active session work.
Optional. Omitted or null both mean the agent is not reporting a stop reason.
Agents SHOULD include this when the idle transition ends active work.
usage: Option<Usage>unstable_end_turn_token_usage only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Token usage for completed session work.
Optional. Omitted or null both mean the agent is not reporting token
usage for this state update.
meta: Option<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
Implementations§
Source§impl IdleStateUpdate
impl IdleStateUpdate
Sourcepub fn new() -> IdleStateUpdate
pub fn new() -> IdleStateUpdate
Builds IdleStateUpdate with the required fields set; optional fields start unset or empty.
Sourcepub fn stop_reason(
self,
stop_reason: impl IntoOption<StopReason>,
) -> IdleStateUpdate
pub fn stop_reason( self, stop_reason: impl IntoOption<StopReason>, ) -> IdleStateUpdate
Indicates why the agent stopped processing active session work.
Sourcepub fn usage(self, usage: impl IntoOption<Usage>) -> IdleStateUpdate
Available on crate feature unstable_end_turn_token_usage only.
pub fn usage(self, usage: impl IntoOption<Usage>) -> IdleStateUpdate
unstable_end_turn_token_usage only.UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Token usage for completed session work.
Sourcepub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> IdleStateUpdate
pub fn meta(self, meta: impl IntoOption<Map<String, Value>>) -> IdleStateUpdate
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
Trait Implementations§
Source§impl Clone for IdleStateUpdate
impl Clone for IdleStateUpdate
Source§fn clone(&self) -> IdleStateUpdate
fn clone(&self) -> IdleStateUpdate
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 IdleStateUpdate
impl Debug for IdleStateUpdate
Source§impl Default for IdleStateUpdate
impl Default for IdleStateUpdate
Source§fn default() -> IdleStateUpdate
fn default() -> IdleStateUpdate
Source§impl<'de> Deserialize<'de> for IdleStateUpdate
impl<'de> Deserialize<'de> for IdleStateUpdate
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IdleStateUpdate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IdleStateUpdate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for IdleStateUpdate
impl JsonSchema for IdleStateUpdate
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 moreSource§impl PartialEq for IdleStateUpdate
impl PartialEq for IdleStateUpdate
Source§fn eq(&self, other: &IdleStateUpdate) -> bool
fn eq(&self, other: &IdleStateUpdate) -> bool
self and other values to be equal, and is used by ==.