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§
- Approval
Request - A human-readable summary of what is about to happen.
Enums§
- Approval
Answer - User’s response to an approval prompt.
- Approve
Mode - Approval mode controlling when the user is prompted.
- Risk
Level - 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.