AIToolApprover
The person answering tool calls' questions and sign-ins on this device, and how their answer reaches your backend, which holds each call until it gets one.
The approver keeps where each answer is, so create it where it outlives the screen, such as a ViewModel. It is confined to the main thread: pass a scope that runs on it, such as a viewModelScope.
Parameters
The person signed in, matched against a call's target_user_id.
This install, matched against a client tool call's target_client_id. Use AIClientIdentity.installId.
Where answers are sent.
How this person signs in when a call waits for their account at a provider. Without one, no sign-in is offered here.
Sends the answer. Your backend checks it is this person's (and this install's, for a client tool), then updates the call's step; until then the question stays, with its buttons disabled. A thrown exception lets the person answer again.
Constructors
An approver that answers tool calls' questions here, without offering sign-ins.