type ForwardableSignal = 'SIGINT' | 'SIGTERM'; interface Killable { kill(signal: ForwardableSignal): void; } /** A signal handler that forwards `signal` to `proc`. */ export declare function killOn(proc: Killable, signal: ForwardableSignal): () => void; /** * Spawn an interactive child process, inheriting the raw tty so a full-screen * agent TUI works, and forwarding interrupt/terminate signals. Resolves with the * child's exit code so the caller can propagate it. * * This is the only module that performs a real spawn; everything upstream * (argv composition, bin resolution) is utils and unit-tested. * * `env` entries override the inherited `process.env` (used for the * sandboxed-run `MISE_CACHE_DIR`, see `agent/launch.ts`'s `composeEnv`). * `cwd`, when given, is `RunPlan.cwd` — the effective working directory, * which can differ from `process.cwd()` for a named alias or a scheduled run * (see `commands/run.ts`'s `planRun`). */ export declare function runForeground(argv: readonly string[], env?: Record, cwd?: string): Promise; /** * Run a setup command silently, capturing stderr for the caller's error * message — the sbx create/policy/provision sequence, see * `commands/run.ts`'s `MaterializeDeps.run`. Never throws on a non-zero * exit: the caller decides which failures matter (an sbx create name * collision means attach, not failure). */ export declare function runCapture(argv: readonly string[]): Promise<{ exitCode: number; stderr: string; }>; /** * Run a command capturing BOTH streams — `commands/schedule.ts`'s * launchctl/systemctl/loginctl steps, which (unlike `runCapture`'s * sbx setup, stderr-only) need stdout too: the linger check * (`loginctl show-user --property=Linger`) reports its answer there. Never * throws on a non-zero exit; the caller decides which failures matter * (`TimerStep.ignoreFailure`). */ export declare function runCaptureAll(argv: readonly string[]): Promise<{ exitCode: number; stdout: string; stderr: string; }>; /** Run a package install (e.g. `npm install`) in `cwd`, inheriting output; throws on non-zero exit. */ export declare function runInstall(command: readonly string[], cwd: string): Promise; export {};