(
annotations: ToolAnnotations | undefined,
policy: EffectivePolicy,
)
| 3540 | // Read before pre-approval arg validation so the extra validation pass |
| 3541 | // only runs for calls that would otherwise burn a user approval. |
| 3542 | const approvalRequired = ( |
| 3543 | annotations: ToolAnnotations | undefined, |
| 3544 | policy: EffectivePolicy, |
| 3545 | ): boolean => { |
| 3546 | if (policy.action === "approve") return false; |
| 3547 | return policy.action === "require_approval" || annotations?.requiresApproval === true; |
| 3548 | }; |
| 3549 | |
| 3550 | const enforceApproval = ( |
| 3551 | annotations: ToolAnnotations | undefined, |
no outgoing calls
no test coverage detected