Skip to main content

Module approval

Module approval 

Source
Expand description

Approval gate: interactive confirmation before executing mutating or dangerous tools.

Three modes:

  • Auto: execute everything without asking (trust the AI).
  • Ask (default): pause before mutating/dangerous operations.
  • Strict: pause before every tool call.

Structs§

ApprovalRequest
A human-readable summary of what is about to happen.

Enums§

ApprovalAnswer
User’s response to an approval prompt.
ApproveMode
Approval mode controlling when the user is prompted.
RiskLevel
Risk level assigned to each tool operation.

Functions§

build_approval_request
Convenience function: build request and prompt user.
needs_approval
Determine whether approval is needed given the mode and risk level.
prompt_approval
Display the approval prompt and wait for user input. Returns the user’s answer.