You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fires after the runtime's tool approval chain (yolo / permissions /
readonly / ask) resolves a verdict for a tool call, BEFORE the call
is executed (allow) or its error response is recorded (deny /
canceled). Until now this verdict was implicit \u2014 reconstructible
only by correlating ToolCall, ToolCallConfirmation, ToolCallResponse,
and HookBlocked events from the runtime channel. The hook gives
audit pipelines a single, structured "who approved what" record.
Two new typed Input fields:
- ApprovalDecision: "allow" | "deny" | "canceled"
- ApprovalSource: stable classifier for which step decided
(yolo, session_permissions_allow,
session_permissions_deny, team_permissions_allow,
team_permissions_deny, readonly_hint,
user_approved, user_approved_session,
user_approved_tool, user_rejected,
context_canceled)
Constants live on the runtime side as Approval{Decision,Source}*
so the contract between executeWithApproval and the hook protocol
is discoverable from one place. allowSourceFor / denySourceFor map
the existing permissionChecker.source labels onto the public
classifiers; unknown labels default to team_permissions to avoid
silent misclassification on future label changes.
The hook is fired at every return path of executeWithApproval and
askUserForConfirmation, so a single hook gets exactly one record
per tool call regardless of which step decided. Existing event
consumers see no change.
Assisted-By: docker-agent
Copy file name to clipboardExpand all lines: agent-schema.json
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -581,6 +581,13 @@
581
581
"items": {
582
582
"$ref": "#/definitions/HookDefinition"
583
583
}
584
+
},
585
+
"on_tool_approval_decision": {
586
+
"type": "array",
587
+
"description": "Hooks that run after the runtime's tool approval chain (yolo / permissions / readonly / ask) resolves a verdict for a tool call, before the call is executed (allow) or its error response is recorded (deny / canceled). Receives approval_decision (\"allow\" | \"deny\" | \"canceled\") and approval_source (a stable classifier of which step decided). Observational; gives audit pipelines a single \"who approved what\" record without re-implementing the chain.",
0 commit comments