(
annotations: ToolAnnotations | undefined,
policy: EffectivePolicy,
)
| 6270 | // Read before pre-approval arg validation so the extra validation pass |
| 6271 | // only runs for calls that would otherwise burn a user approval. |
| 6272 | const approvalRequired = ( |
| 6273 | annotations: ToolAnnotations | undefined, |
| 6274 | policy: EffectivePolicy, |
| 6275 | ): boolean => { |
| 6276 | if (policy.action === "approve") return false; |
| 6277 | return policy.action === "require_approval" || annotations?.requiresApproval === true; |
| 6278 | }; |
| 6279 | |
| 6280 | const enforceApproval = ( |
| 6281 | annotations: ToolAnnotations | undefined, |
no outgoing calls
no test coverage detected