eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
18 lines (17 loc) • 1.07 kB
TypeScript
import type { InternalSandboxSession, MutableNetworkSandboxSession, SandboxSession } from "#shared/sandbox-session.js";
import type { SandboxNetworkPolicy } from "#shared/sandbox-network-policy.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<void>): MutableNetworkSandboxSession;
export declare function buildSandboxSession(primitives: InternalSandboxSession): SandboxSession;