import type { InteractiveEngineBootstrap } from "./interactive-engine-bootstrap.ts"; /** * Legacy interactive-engine control variables. * * The host no longer sets these: engine startup metadata travels through a * protected bootstrap file (see interactive-engine-bootstrap.ts) precisely * because environment values cannot be taken back from a Bun process tree. They * are still recognized and scrubbed as defense in depth, so an inherited or * caller-supplied value can neither select engine mode nor reach a child. */ export declare const INTERACTIVE_ENGINE_ENV_VARS: readonly ["ATOMIC_INTERACTIVE_ENGINE_CHILD", "ATOMIC_INTERACTIVE_ENGINE_HOST_PID", "ATOMIC_INTERACTIVE_ENGINE_GUARD_FILE", "ATOMIC_INTERACTIVE_ENGINE_API_KEY"]; /** Immutable startup values captured before they are removed from `process.env`. */ export interface InteractiveEngineStartupEnv { readonly child: string | undefined; readonly hostPid: string | undefined; readonly guardFile: string | undefined; readonly apiKey: string | undefined; } /** * Copy an environment without the interactive-engine control variables. * * Pure: the input object is never mutated. Call this AFTER merging every other * environment source so a caller-supplied value cannot reintroduce a key. */ export declare function scrubInteractiveEngineEnv(env: T): T; /** * Capture the engine startup values once and remove the legacy variables from * `process.env`. * * A bootstrap record is authoritative when present. The legacy environment is * only a fallback for a host that still launches the old way; it cannot be made * safe on its own, because Bun children spawned without an explicit `env` * inherit the runtime's launch-time environment no matter what this process * deletes afterwards. Idempotent: later calls return the same frozen snapshot. */ export declare function captureInteractiveEngineStartupEnv(bootstrap?: InteractiveEngineBootstrap): InteractiveEngineStartupEnv; /** Frozen startup snapshot; captures (and scrubs) on first read. */ export declare function interactiveEngineStartupEnv(): InteractiveEngineStartupEnv; /** True when this process was started as the isolated interactive engine child. */ export declare function isInteractiveEngineChild(): boolean; //# sourceMappingURL=interactive-engine-env.d.ts.map