(
annotations: ToolAnnotations | undefined,
policy: EffectivePolicy,
)
| 4185 | // Read before pre-approval arg validation so the extra validation pass |
| 4186 | // only runs for calls that would otherwise burn a user approval. |
| 4187 | const approvalRequired = ( |
| 4188 | annotations: ToolAnnotations | undefined, |
| 4189 | policy: EffectivePolicy, |
| 4190 | ): boolean => { |
| 4191 | if (policy.action === "approve") return false; |
| 4192 | return policy.action === "require_approval" || annotations?.requiresApproval === true; |
| 4193 | }; |
| 4194 | |
| 4195 | const enforceApproval = ( |
| 4196 | annotations: ToolAnnotations | undefined, |
no outgoing calls
no test coverage detected