(
annotations: ToolAnnotations | undefined,
policy: EffectivePolicy,
)
| 4919 | // Read before pre-approval arg validation so the extra validation pass |
| 4920 | // only runs for calls that would otherwise burn a user approval. |
| 4921 | const approvalRequired = ( |
| 4922 | annotations: ToolAnnotations | undefined, |
| 4923 | policy: EffectivePolicy, |
| 4924 | ): boolean => { |
| 4925 | if (policy.action === "approve") return false; |
| 4926 | return policy.action === "require_approval" || annotations?.requiresApproval === true; |
| 4927 | }; |
| 4928 | |
| 4929 | const enforceApproval = ( |
| 4930 | annotations: ToolAnnotations | undefined, |
no outgoing calls
no test coverage detected