import type { MutableWorkerAdvertisementProvider } from '../client.js'; import { NativeBridgeProtocolError } from './protocol.js'; export declare const NATIVE_BRIDGE_HELLO_TIMEOUT_MS = 5000; export interface NativeBridgeRunResult { checkpoint?: Record; action_output?: Record; auth_update?: Record; credentials?: Record; metadata?: Record; } export interface NativeBridgeRunOptions { requestId?: string; operation: 'sync' | 'action' | 'auth' | 'read'; job: Record; onStream?: (payload: Record, sequence: number) => Promise; } export declare class NativeBridgeClient { private readonly input; private readonly provider; private readonly expectedWorkerId; private readonly daemonBuild; private readonly handshakeTimeoutMs; private readonly decoder; private readonly writer; private readonly pending; private readonly terminalRuns; private readonly ignoredRuns; private reading; private handshakeComplete; private handshakePromise?; private handshakeReject?; private failure?; private readonly transportFailureHandlers; constructor(input: NodeJS.ReadableStream, output: NodeJS.WritableStream, provider: MutableWorkerAdvertisementProvider, expectedWorkerId: string, daemonBuild: string, handshakeTimeoutMs?: number); handshake(): Promise; run(options: NativeBridgeRunOptions): Promise; cancel(requestId: string, runId: number): Promise; cancelAndAbandon(requestId: string, runId: number, error: Error): Promise; cancelActiveRuns(): Promise; shutdown(): Promise; close(error?: NativeBridgeProtocolError): void; onTransportFailure(handler: (error: Error) => void): () => void; get activeRunCount(): number; private readLoop; private receive; private send; private rejectPending; private failAll; private failBridge; } //# sourceMappingURL=client.d.ts.map