(
annotations: ToolAnnotations | undefined,
policy: EffectivePolicy,
)
| 3292 | // Read before pre-approval arg validation so the extra validation pass |
| 3293 | // only runs for calls that would otherwise burn a user approval. |
| 3294 | const approvalRequired = ( |
| 3295 | annotations: ToolAnnotations | undefined, |
| 3296 | policy: EffectivePolicy, |
| 3297 | ): boolean => { |
| 3298 | if (policy.action === "approve") return false; |
| 3299 | return policy.action === "require_approval" || annotations?.requiresApproval === true; |
| 3300 | }; |
| 3301 | |
| 3302 | const enforceApproval = ( |
| 3303 | annotations: ToolAnnotations | undefined, |
no outgoing calls
no test coverage detected