import type { SandboxAvailability, SandboxLaunchInput, SandboxLaunchPlan, SandboxProvider } from "#src/sandbox/types"; /** * The exact srt version this provider's behavior is asserted against. * Upgrading is an explicit compatibility change (omit-vs-empty network shape, * AF_UNIX filter, short-temp mux socket, cleanup), never a floating update. */ export declare const PINNED_SRT_VERSION = "0.0.66"; /** Injectable probe seams for deterministic tests. */ export interface SrtProviderOptions { platform?: NodeJS.Platform; arch?: string; nodeMajor?: number; /** Returns the resolved srt package.json path; throws when unresolvable. */ resolvePackageJson?: () => string; /** Returns the absolute path of an executable found on PATH, or undefined. */ findExecutable?: (name: string) => string | undefined; /** Runs the bounded bwrap namespace probe. */ runNamespaceProbe?: (bwrapPath: string) => Promise<{ ok: boolean; stderr: string; }>; launcherPath?: string; /** Absolute node binary used to run the launcher. */ nodeBinary?: string; } /** Scan PATH for an executable without spawning a subprocess. */ export declare function findExecutableOnPath(name: string, pathValue?: string | undefined): string | undefined; /** Classify a bwrap namespace-probe failure into an actionable reason. */ export declare function classifyNamespaceFailure(stderr: string): string; /** Quote for POSIX shell single-quoted context. */ export declare function shellQuote(value: string): string; /** * Build the `env -i` prefix for a scrubbed launch. Core policy (D5): the * scrub applies to BOTH enforced and warn-and-spawn degraded launches. */ export declare function buildEnvScrubPrefix(env: Record): string; export declare class SrtSandboxProvider implements SandboxProvider { readonly id = "srt"; private readonly opts; private cachedAvailability; constructor(opts?: SrtProviderOptions); /** * One bounded capability probe per process (D8). Available only when the * COMPLETE boundary works: platform, runtime, exact pinned package, bwrap, * socat, namespaces, and the packaged x64 AF_UNIX seccomp helper. Missing * seccomp is unavailable, not a warning — abstract-socket isolation is * mandatory even in default-allow mode. */ probe(): Promise; private runProbe; /** * Compose one enforceable launch (D4): write the redacted srt settings * under the owned runtime subtree, allocate the owned srt staging CWD, and * return the complete scrubbed outer command for tmux. */ prepareLaunch(input: SandboxLaunchInput): Promise; } /** * Resolve the node binary used to run the launcher. Prefers the current * process's own node (absolute, version-matched); falls back to PATH lookup * against the scrubbed launch PATH so the wrapped child could re-resolve it. */ export declare function resolveNodeBinary(scrubbedPath: string | undefined): string; //# sourceMappingURL=srt-provider.d.ts.map