(
annotations: ToolAnnotations | undefined,
policy: EffectivePolicy,
)
| 4257 | // Read before pre-approval arg validation so the extra validation pass |
| 4258 | // only runs for calls that would otherwise burn a user approval. |
| 4259 | const approvalRequired = ( |
| 4260 | annotations: ToolAnnotations | undefined, |
| 4261 | policy: EffectivePolicy, |
| 4262 | ): boolean => { |
| 4263 | if (policy.action === "approve") return false; |
| 4264 | return policy.action === "require_approval" || annotations?.requiresApproval === true; |
| 4265 | }; |
| 4266 | |
| 4267 | const enforceApproval = ( |
| 4268 | annotations: ToolAnnotations | undefined, |
no outgoing calls
no test coverage detected