import { Runtime } from '../base.ts'; import { LINE_EXECUTOR, type LineExecutor } from '../mixin.ts'; import type { RunResult, RuntimeOptions } from '../types.ts'; import { type NormalizedSandboxConfig, type SandboxConfig } from './config.ts'; /** * A runtime that runs whole lines inside a sandbox the user runs. * * Mirage never creates, provisions, or deletes sandboxes: you bring * your own (a running container, a live Daytona or E2B sandbox) and * the provider config says how to reach it. The sandbox is also * yours to provision: serve the workspace inside it yourself (run * `mirage workspace create` in the image entrypoint or by hand) with * mounts at the same prefixes as the host workspace, so the session * cwd and every path in a line resolve unchanged. Mirage only * connects and execs lines: the whole-line door is LineExecutor's * runLine, and there is no interpreter door. Subclasses adapt one * provider by implementing connect() and execLine(); routing, * captures, and per-line scripts are inherited. Constructed like * every runtime (captures, config, script); config is how to reach * the sandbox, coerced against the provider's own key list. */ export declare abstract class RemoteSandbox extends Runtime implements LineExecutor { readonly reach = "remote"; readonly [LINE_EXECUTOR]: true; config: NormalizedSandboxConfig; private connecting; constructor(options?: RuntimeOptions | Record, configKeys?: readonly string[]); /** * Run one raw line in the sandbox, connecting once. * * The line, cwd, and paths pass through verbatim: the sandbox is * expected to serve the workspace at the same prefixes as the host, * so nothing is rewritten. The session environment merges over the * config environment. */ runLine(line: string, stdin: Uint8Array | null, env: Record, cwd: string): Promise; /** Attach to the user's live sandbox, failing loud if absent. */ abstract connect(): Promise; /** Execute one shell line inside the sandbox. */ abstract execLine(line: string, stdin: Uint8Array | null, env: Record, cwd: string): Promise; /** Release provider client resources; the sandbox itself is the user's. */ close(): Promise; } //# sourceMappingURL=base.d.ts.map