Interface BetaManagedAgentsSessionStatusIdleEvent.StopReason.Visitor
-
- All Implemented Interfaces:
public interface BetaManagedAgentsSessionStatusIdleEvent.StopReason.Visitor<T extends Object>An interface that defines how to map each variant of StopReason to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitEndTurn(BetaManagedAgentsSessionEndTurn endTurn)The agent completed its turn naturally and is ready for the next user message. abstract TvisitRequiresAction(BetaManagedAgentsSessionRequiresAction requiresAction)The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). abstract TvisitRetriesExhausted(BetaManagedAgentsSessionRetriesExhausted retriesExhausted)The turn ended because the retry budget was exhausted ( max_iterationshit or an error escalated toretry_status: 'exhausted').Tunknown(JsonValue json)Maps an unknown variant of StopReason to a value of type T. -
-
Method Detail
-
visitEndTurn
abstract T visitEndTurn(BetaManagedAgentsSessionEndTurn endTurn)
The agent completed its turn naturally and is ready for the next user message.
-
visitRequiresAction
abstract T visitRequiresAction(BetaManagedAgentsSessionRequiresAction requiresAction)
The agent is idle waiting on one or more blocking user-input events (tool confirmation, custom tool result, etc.). Resolving all of them transitions the session back to running.
-
visitRetriesExhausted
abstract T visitRetriesExhausted(BetaManagedAgentsSessionRetriesExhausted retriesExhausted)
The turn ended because the retry budget was exhausted (
max_iterationshit or an error escalated toretry_status: 'exhausted').
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of StopReason to a value of type T.
An instance of StopReason can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-