import { ChildProcessWithoutNullStreams } from 'node:child_process'; import { EventEmitter } from 'node:events'; import type { BridgeEvent } from './protocol.js'; export interface BridgeLaunchOptions { executableOverride?: string; bridgeArgsOverride?: string[]; } export interface BridgeProcessOptions extends BridgeLaunchOptions { proxyMode?: boolean; explicitConfigMode?: boolean; env?: NodeJS.ProcessEnv; cwd?: string; startupTimeoutMs?: number; bridgeArgs?: string[]; } export type LaunchOptions = BridgeProcessOptions; export declare function sanitizedEnv(opts?: BridgeProcessOptions): NodeJS.ProcessEnv; export declare class VillaniBridgeProcess extends EventEmitter { proc: ChildProcessWithoutNullStreams; ready: boolean; stderr: string; buffer: string; startupTimeoutMs: number; readonly shell = false; finals: Map; private exitInfo?; constructor(executable: string, opts?: BridgeProcessOptions); getRecentStderr(): string; onout(s: string): void; send(c: unknown): boolean; abort(runId: string): void; respondToApproval(runId: string, requestId: string, approved: boolean): void; kill(): void; private timeout; waitForEvent(type: string, timeoutMs?: number, signal?: AbortSignal): Promise; waitForAnyEvent(types: string[], runId?: string, timeoutMs?: number, signal?: AbortSignal): Promise; waitUntilReady(timeoutMs?: number, signal?: AbortSignal): Promise; waitForFinalEvent(runId: string, timeoutMs?: number, signal?: AbortSignal): Promise; waitForExit(timeoutMs?: number, signal?: AbortSignal): Promise; }