/** * design/98 §2.3 (S8b) — the reusable CONFORMANCE CONTRACT a HARD {@link WorkflowScriptRunner} * (`safeForUntrustedScripts:true`) MUST pass. Core ships the contract (zero deps beyond `node:assert`); a * deployment's isolated-vm / separate-process runner imports it and runs it in its OWN test suite to prove * its membrane does not leak. It runs a battery of sandbox-escape scripts against the runner and asserts each * FAILS to reach a host capability (`process` / `require` / a host `Function`). * * The dev `vm` runner deliberately does NOT pass this (it is not a boundary) — see * `test/workflow-vm-escape.test.ts`, which PROVES that and asserts `safeForUntrustedScripts === false`. */ import type { WorkflowScriptRunner } from "./workflow-script-runner.js"; /** * Assert a HARD runner passes the sandbox-escape battery. Throws an `AssertionError` on the first escape that * reaches a host capability. A probe that THROWS counts as blocked (PASS). */ /** * 黑板 [427] — the PRIMITIVES-WIRING battery. The [420]①/[423] production incident was a hard runner whose * injection table wired only `agent` (+ return): `phase`/`log` were silently absent in the isolate, so whole * runs recorded `phases: []` with no error anywhere. Sandbox tightness alone doesn't catch that — a runner can * be perfectly escape-proof AND miss half the API. This battery proves EVERY {@link WorkflowPrimitives} member * is present in-isolate, callable, and actually bridged back to the HOST primitives (recorded on the host * side, not just observed in-script). Run it in the same suite as the escape battery. */ export declare function assertWorkflowPrimitivesWiring(runner: WorkflowScriptRunner): Promise; export declare function assertWorkflowSandboxConformance(runner: WorkflowScriptRunner): Promise; /** * PARITY-SPOT-WORKFLOW B2/F3 (CC `S0m` parity) — assert a runner ENFORCES determinism: Date.now() / * Math.random() / argless new Date() throw (a clock/randomness read silently busts the resume prefix cache), * while DATED construction (`new Date(0)`) stays available. SEPARATE from the sandbox/wiring batteries — those * accept a minimal stub runner (they test the assertion's own leak/bridge logic); determinism requires a * runner that actually executes the body against shimmed intrinsics (the dev vm runner + any hard runner). */ export declare function assertWorkflowDeterminism(runner: WorkflowScriptRunner): Promise; //# sourceMappingURL=workflow-sandbox-conformance.d.ts.map