import type { SandboxNetworkPolicy } from "#shared/sandbox-network-policy.js"; type NetworkPolicySandboxSession = SandboxSession & { setNetworkPolicy(policy: SandboxNetworkPolicy): Promise; }; import type { InternalSandboxSession, SandboxSession } from "#shared/sandbox-session.js"; export type { InternalSandboxSession }; /** * Builds a public {@link SandboxSession} from provider-specific primitives. * * Encoding handling, line-range slicing, and the binary/text/stream * variants live here so each provider only has to implement byte-oriented * read/write primitives. `run` is implemented as a thin wrapper over the * provider's `spawn`: collect stdout/stderr to strings, await `wait()`, * then return the combined result. * * Providers without mutable firewall support omit `setNetworkPolicy`; the * dedicated Vercel provider wires it to `sandbox.update`. */ export declare function buildSandboxSession(primitives: InternalSandboxSession, setNetworkPolicy: (policy: SandboxNetworkPolicy) => Promise): NetworkPolicySandboxSession; export declare function buildSandboxSession(primitives: InternalSandboxSession): SandboxSession;