Asks a human whether a blocked tool call may run. Used by SuperPi.Plugins.Permissions and
SuperPi.Plugins.Hooks.
The question travels as a permission_request event through SuperPi.UI.Broker. The answer is
the option_id of one of the four options (ACP PermissionOptionKind): allow_once,
allow_always, reject_once, reject_always.
Fail closed. ask/2 returns :unavailable when no client can answer, when the question times
out or is cancelled, and when the answer cannot be read. A caller treats :unavailable exactly like
the block that it would have returned without a prompt, with the same message. Prompting is on by
default and config :super_pi, :permissions, interactive_prompts: false turns it off.
Summary
Functions
Asks about one tool call. fields has "tool_name", "arguments", "reason" and "risk".
ctx supplies :conversation_id, :tool_call_id and :turn_id.
True when a prompt can be shown now: enabled, and a client answers for the conversation.
True when prompts are enabled in settings.
Types
Functions
Asks about one tool call. fields has "tool_name", "arguments", "reason" and "risk".
ctx supplies :conversation_id, :tool_call_id and :turn_id.
True when a prompt can be shown now: enabled, and a client answers for the conversation.
True when prompts are enabled in settings.