MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / gatedThenReturnCode

Function gatedThenReturnCode

e2e/scenarios/mcp-execute.test.ts:85–92  ·  view source on GitHub ↗
(pattern: string, payload: unknown)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected