import type { Child, OutputWatcher, SpawnCaptureResult } from "./ps.js"; interface FileOptions { cwd?: string; env: NodeJS.ProcessEnv; timeout?: number; signal?: AbortSignal; } /** Only the Bun process operations the FIFO-backed path needs. */ export interface FileProcess { pid: number; exitCode: number | null; signalCode: NodeJS.Signals | null; exited: Promise; stdin: Pick | number | undefined; kill(signal?: NodeJS.Signals): void; unref(): void; } /** The runtime boundary, also used to reproduce a lost exit without a race. */ export interface FileRuntime { spawn(argv: string[], opts: FileOptions & { stdin: "pipe" | "inherit"; stdout: number; stderr: number; }): FileProcess; reap(pid: number): number | null; } /** Starts a child with live output streams that survive a lost Bun exit. */ export declare function fileStart(argv: string[], opts: FileOptions & { stdin?: "pipe" | "inherit"; runtime?: FileRuntime; }): Child; /** Capture waits for both readers, including their final decoder flush. */ export declare function fileCapture(argv: string[], opts: FileOptions & { input?: string; watcher?: OutputWatcher; runtime?: FileRuntime; }): Promise; /** Closing input after a child exits is normal, not a failed command. */ export declare function ignoreClosedInput(error: unknown): void; export {};