pub struct ToolApprovalPauseHook;Expand description
Hook that parks the turn when a hard approval gate deferred a call.
Spec: knowledge/execution/tool-approval.md.
The tool_approval capability answers a gated call it has no decision for
with a structured tool_approval_required result instead of running it.
This hook turns each one into a synthetic approve_tool_call call a person
answers through POST /v1/sessions/{id}/tool-approvals.
Decision: like FormElicitationHook, the call is appended to
client_tool_calls rather than emitted here, so every pause in one act
lands in a single tool.call_requested event and the answer surfaces read
one batch. Must run before ClientSideToolHook. The planner holds the pause
unconditionally (see plan_after_act): the gated call already failed
closed, so a client with no card only delays the answer, it never lets the
call through.