(pattern: string, payload: unknown)
| 83 | * payload. The pattern is unique-per-run and matches no real tool, so the |
| 84 | * created `block` rule is inert even if leaked. */ |
| 85 | const gatedThenReturnCode = (pattern: string, payload: unknown) => ` |
| 86 | await tools.executor.coreTools.policies.create({ |
| 87 | owner: "user", |
| 88 | pattern: ${JSON.stringify(pattern)}, |
| 89 | action: "block", |
| 90 | }); |
| 91 | return ${JSON.stringify(payload)}; |
| 92 | `; |
| 93 | |
| 94 | scenario( |
| 95 | "MCP · a duplicate resume replays the identical settled result without re-running the tool", |