(
annotations: ToolAnnotations | undefined,
policy: EffectivePolicy,
)
| 4211 | // Read before pre-approval arg validation so the extra validation pass |
| 4212 | // only runs for calls that would otherwise burn a user approval. |
| 4213 | const approvalRequired = ( |
| 4214 | annotations: ToolAnnotations | undefined, |
| 4215 | policy: EffectivePolicy, |
| 4216 | ): boolean => { |
| 4217 | if (policy.action === "approve") return false; |
| 4218 | return policy.action === "require_approval" || annotations?.requiresApproval === true; |
| 4219 | }; |
| 4220 | |
| 4221 | const enforceApproval = ( |
| 4222 | annotations: ToolAnnotations | undefined, |
no outgoing calls
no test coverage detected