#[non_exhaustive]pub enum IdleStopReason {
EndTurn,
MaxTokens,
MaxTurnRequests,
Refusal,
Cancelled,
Error(ErrorStopReason),
Other(OtherStopReason),
}unstable_subagents only.Expand description
UNSTABLE
This capability is not part of the spec yet, and may be removed or changed at any point.
Reason a child’s foreground work stopped, reported on its idle state snapshot.
Tagged by stopReason and flattened into IdleStateUpdate, so the snapshot
matches v2’s idle state_update, including its handling of unknown values.
The known values are those of StopReason plus error.
A child has no prompt response of its own, so this snapshot is the only place
to report that its work failed. The prompt response keeps
StopReason and reports failures as JSON-RPC errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EndTurn
The work ended successfully.
MaxTokens
The work ended because the agent reached the maximum number of tokens.
MaxTurnRequests
The work ended because the agent reached the maximum number of allowed agent requests.
Refusal
The work ended because the agent refused to continue.
Cancelled
The work was cancelled.
Error(ErrorStopReason)
The work ended because something failed.
Other(OtherStopReason)
Custom or future stop reason.
Values beginning with _ are reserved for implementation-specific
extensions. Other unknown values are reserved for future ACP variants.
Trait Implementations§
Source§impl Clone for IdleStopReason
impl Clone for IdleStopReason
Source§fn clone(&self) -> IdleStopReason
fn clone(&self) -> IdleStopReason
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 IdleStopReason
impl Debug for IdleStopReason
Source§impl<'de> Deserialize<'de> for IdleStopReason
impl<'de> Deserialize<'de> for IdleStopReason
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<IdleStopReason, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<IdleStopReason, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for IdleStopReason
Source§impl From<ErrorStopReason> for IdleStopReason
impl From<ErrorStopReason> for IdleStopReason
Source§fn from(value: ErrorStopReason) -> IdleStopReason
fn from(value: ErrorStopReason) -> IdleStopReason
Source§impl JsonSchema for IdleStopReason
impl JsonSchema for IdleStopReason
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 IdleStopReason
impl PartialEq for IdleStopReason
Source§impl Serialize for IdleStopReason
impl Serialize for IdleStopReason
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for IdleStopReason
Auto Trait Implementations§
impl Freeze for IdleStopReason
impl RefUnwindSafe for IdleStopReason
impl Send for IdleStopReason
impl Sync for IdleStopReason
impl Unpin for IdleStopReason
impl UnsafeUnpin for IdleStopReason
impl UnwindSafe for IdleStopReason
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.