eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
32 lines (31 loc) • 1.68 kB
TypeScript
import type { MutableNetworkSandboxSession } from "#shared/sandbox-session.js";
import { type DockerCli } from "#execution/sandbox/bindings/docker-cli.js";
import { type SandboxProviderImplementation } from "#shared/sandbox-provider.js";
import type { DockerSandboxEnvironmentOptions, DockerSandboxRuntimeOptions } from "#public/sandbox/docker-sandbox.js";
export { DOCKER_TEMPLATE_IMAGE_REPOSITORY, pruneDockerSandboxTemplates, } from "#execution/sandbox/bindings/docker-templates.js";
/**
* Stable provider name used for prepared-artifact storage and provider identity.
*/
export declare const DOCKER_PROVIDER_NAME = "docker";
type DockerSandboxPreparedArtifact = {
readonly imageReference: string;
};
type DockerSandboxSessionState = {
readonly containerName: string;
readonly generation: string;
readonly version: 2;
};
/**
* Creates the Docker sandbox provider.
*
* Two-phase lifecycle mapped onto Docker primitives:
*
* - `prewarm` runs the base image, applies base setup, runs the
* authored preparation, writes seed files, then `docker commit`s the
* container into a reusable template image.
* - `create` starts (or restarts) one long-lived container per session
* key from the template image. The container's filesystem carries
* session state across reconnects, so `shutdown` only stops the
* container and the next `create` restarts it with state intact.
*/
export declare function createDockerSandboxProvider(createOptions?: DockerSandboxEnvironmentOptions, dockerCli?: DockerCli): SandboxProviderImplementation<DockerSandboxRuntimeOptions, DockerSandboxPreparedArtifact, DockerSandboxSessionState, MutableNetworkSandboxSession>;