(
annotations: ToolAnnotations | undefined,
policy: EffectivePolicy,
)
| 4641 | // Read before pre-approval arg validation so the extra validation pass |
| 4642 | // only runs for calls that would otherwise burn a user approval. |
| 4643 | const approvalRequired = ( |
| 4644 | annotations: ToolAnnotations | undefined, |
| 4645 | policy: EffectivePolicy, |
| 4646 | ): boolean => { |
| 4647 | if (policy.action === "approve") return false; |
| 4648 | return policy.action === "require_approval" || annotations?.requiresApproval === true; |
| 4649 | }; |
| 4650 | |
| 4651 | const enforceApproval = ( |
| 4652 | annotations: ToolAnnotations | undefined, |
no outgoing calls
no test coverage detected