Tool Approval Request
class ToolApprovalRequest(val toolCallId: String, val toolName: String, val inputJson: JsonElement, val approvalId: String? = null, val signature: String? = null, val providerMetadata: ProviderMetadata = ProviderMetadata.None) : StreamEvent(source)
Tool requires approval. Per v6 RPC semantics, the loop ends after emitting this event — the corresponding ai.torad.aisdk.ContentPart.ToolApprovalRequest is added to the assistant message in the result, and the host calls Agent.generate again with a tool message containing ai.torad.aisdk.ContentPart.ToolApprovalResponse to resume.
Since
0.3.0-beta01
Constructors
Link copied to clipboard
constructor(toolCallId: String, toolName: String, inputJson: JsonElement, approvalId: String? = null, signature: String? = null, providerMetadata: ProviderMetadata = ProviderMetadata.None)
Properties
Link copied to clipboard
Approval-identity key, distinct from toolCallId per v6. Null defaults to toolCallId for the common case (single approval per call). Explicit when two approvals share a tool-call id and need separate correlation.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard