Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536/** Lazy runtime adapter keeps Node built-ins outside neutral module imports. @module */import { NO_SANDBOX_OWNER, type SandboxRuntime,} from '@monochromatic-dev/module-test-sandbox/ts';
/** Resolves context support using the same runtime gate as descriptor observation. Non-Node execution preserves ordinary Sinon behavior rather than claiming isolation.
@returns runtime appropriate for the current descriptor execution environment @example ```ts const runtime = await sandboxRuntime(); ``` */export async function sandboxRuntime(): Promise<SandboxRuntime> { if (((typeof process) !== 'undefined') && ((typeof process.versions ?.node) === 'string')) { /** Lazy load is essential for the browser artifact's import boundary. */ const { nodeSandboxRuntime, } = await import('./execution-node.ts'); return nodeSandboxRuntime(); } return { contextual: false, current(): typeof NO_SANDBOX_OWNER { return NO_SANDBOX_OWNER; }, isProxy(): boolean { return false; }, run({ body, }): Promise<void> { return body(); }, };}