/** * Root of the orckit package this process runs from (`/dist/sandbox/` → * ``), symlinks resolved. Mounted read-only into the sandbox so the * inner `orc start` is exactly the same version as the outer one. */ export declare function packageRoot(): string; /** * True when the Docker CLI talks to OrbStack. Sandboxes depend on two OrbStack * features no other engine on macOS has: container hostnames routed to the Mac * (`dev.orbstack.domains`) and file events forwarded into bind mounts. */ export declare function isOrbStack(): Promise; export interface EnsureImageOptions { project: string; /** Absolute path of the project's `sandbox.dockerfile`, if any. */ dockerfile?: string; /** Status line sink ("building …"). */ log: (msg: string) => void; } /** * Make sure the sandbox image exists and return its tag. Images are tagged by * content hash, so editing orckit's base or the project Dockerfile triggers a * rebuild and nothing else does. Build output streams to the terminal (it only * happens on first use or after a change, and can take minutes). */ export declare function ensureImage(opts: EnsureImageOptions): Promise; /** One sandbox container as `orc sandbox list` shows it. */ export interface SandboxInfo { name: string; project: string; worktree: string; status: string; running: boolean; /** PID of the host `orc start` attached to it (may be dead → headless). */ clientPid: number | null; /** That process's start time, to tell it apart from a recycled PID. */ clientStart: string; } /** All orckit sandbox containers (running or not). */ export declare function listSandboxes(): Promise; /** * Hostnames (OrbStack `dev.orbstack.domains`) of the running sandboxes. Called * by the `.test` forwarder on DNS misses, so it is time-boxed: a stopped or * wedged engine must fail the query, not stall every lookup behind it. */ export declare function listSandboxDomains(timeoutMs?: number): Promise; /** * Stop a sandbox gracefully: `docker stop` SIGTERMs the inner `orc start`, * which runs its full teardown. The timeout covers slow stop graces (Firebase * emulators need ~30s); Docker SIGKILLs after it, which still takes everything * inside down with the container. */ export declare function stopSandbox(name: string, timeoutSec?: number): Promise; /** Force-remove a sandbox container (kills everything inside it). */ export declare function removeSandbox(name: string): Promise; /** * Create the sandbox's volumes (idempotent) labelled with the sandbox and its * worktree. `docker run --rm` removes the container on every stop but keeps * the volumes — the labels are what lets `orc sandbox list` show a stopped * sandbox and `orc sandbox prune` reclaim it once the worktree is deleted. */ export declare function ensureSandboxVolumes(name: string, worktreeRoot: string, extra?: string[]): Promise; /** Sandboxes that only have volumes left (stopped), by name → worktree. */ export declare function listSandboxVolumes(): Promise>; /** Remove all of a sandbox's volumes (image cache, home, node_modules). */ export declare function removeSandboxVolumes(name: string): Promise; //# sourceMappingURL=engine.d.ts.map