(pattern: string)
| 38 | /** Sandbox code that creates a policy through the approval-gated core tool. The |
| 39 | * pattern is unique-per-run and matches no real tool, so the rule is inert. */ |
| 40 | const createPolicyCode = (pattern: string) => ` |
| 41 | await tools.executor.coreTools.policies.create({ |
| 42 | owner: "user", |
| 43 | pattern: ${JSON.stringify(pattern)}, |
| 44 | action: "block", |
| 45 | }); |
| 46 | return ${JSON.stringify(approvedPayload)}; |
| 47 | `; |
| 48 | |
| 49 | // Why this was long skipped: `autoApprove: true` came back `"paused"` instead of |
| 50 | // `"completed"`, and static reading of the wiring (HTTP schema, handler, the |
no outgoing calls
no test coverage detected