import type { Checkout } from './worktree.js'; /** Everything `docker run` needs to start one checkout's sandbox. Pure data. */ export interface SandboxRunSpec { /** Container name (also the volume prefix). */ name: string; /** Hostname the Mac reaches the sandbox at (OrbStack `dev.orbstack.domains`). */ domain: string; /** * Hostname the inner orc prints in its URLs: `domain`'s `.test` alias when * `orc sandbox dns` is set up (see `dns.ts`), otherwise `domain` itself. */ host: string; image: string; project: string; checkout: Checkout; /** * Root of the orckit package to run inside (real path). A local checkout is * mounted at the same path; an installed one (under `node_modules`) with its * `node_modules` at {@link ORCKIT_NODE_MODULES}. */ packageRoot: string; /** * Mount a local-checkout `packageRoot` writable. Only when the project itself * links to it (a `link:` dev setup): its package manager then installs into * it and chmods its bin, which fails on a read-only mount. */ packageWritable: boolean; /** Absolute path of the config file (same path inside the sandbox). */ configPath: string; /** Working directory inside the sandbox. */ cwd: string; /** Attach a TTY (`-t`). */ tty: boolean; /** Resource caps (`--memory`, `--cpus`). */ memory?: string; cpus?: number; /** Mac-home paths seeded into the sandbox home on first start. */ homeSeeds: Array<{ source: string; rel: string; }>; /** * Package dirs (relative to the checkout root) whose `node_modules` gets a * sandbox-private volume instead of the Mac's directory. */ packageDirs: string[]; mounts: Array<{ source: string; target: string; readonly: boolean; }>; env: Record; /** * PID and start time of the host-side `orc start`, so a later run can tell a * live session from a headless one (the start time guards against PID reuse). */ clientPid: number; clientStart: string; /** Re-copy `homeSeeds` even if the home volume was seeded before. */ reseed: boolean; /** Arguments for the inner `orc start` (see {@link innerStartArgs}). */ startArgs: string[]; } export declare const SANDBOX_LABEL = "orckit.sandbox"; export declare const CLIENT_PID_LABEL = "orckit.client-pid"; export declare const CLIENT_START_LABEL = "orckit.client-start"; export declare const WORKTREE_LABEL = "orckit.worktree"; export declare const PROJECT_LABEL = "orckit.project"; /** A sandbox's persistent volumes: the inner Docker image cache and its home. */ export declare function sandboxVolumes(name: string): [docker: string, home: string]; /** The private volume backing `/node_modules` in a sandbox. */ export declare function nodeModulesVolume(name: string, packageDir: string): string; /** Mount point of the Mac-home seed copies inside the sandbox. */ export declare const SEED_DIR = "/orckit-seed"; /** Mount point of an installed orckit's `node_modules` inside the sandbox. */ export declare const ORCKIT_NODE_MODULES = "/orckit/node_modules"; /** * Split an orckit installed from a registry into the outermost `node_modules` * above it and its path within. That directory holds orckit's dependencies too * (pnpm's `.pnpm` store links them with relative symlinks; npm and yarn hoist * them beside it), so mounting it whole lets orckit resolve them. null for a * local orckit checkout, which carries its own `node_modules`. */ export declare function installedNodeModules(packageRoot: string): { root: string; rel: string; } | null; /** * The `docker run` argv for a sandbox. orckit runs as the container's main * process (behind `--init`) so `docker run`'s signal proxy and TTY carry * Ctrl-C / SIGTERM / SIGHUP straight to the inner `orc start`, whose own * teardown then runs unchanged. `--rm` + one container per sandbox means * `docker rm -f` is a complete kill switch: every process — nested * containers included — lives inside it. */ export declare function buildRunArgs(spec: SandboxRunSpec): string[]; /** * The inner `orc start` argv: the user's own `start` arguments minus host-only * flags, with the config path made absolute (the inner process may run in a * different working directory). */ export declare function innerStartArgs(argsAfterStart: string[], configPath: string): string[]; //# sourceMappingURL=docker-args.d.ts.map