import { HostRpcProgressPayload, HostRpcResponsePayload } from '../protocol/envelope.js'; export type RpcMethod = string; export interface RpcCallOpts { /** Receive intermediate progress events for a streaming call. */ onProgress?: (progress: TProgress) => void; /** Optional abort. The dispatcher fires `controller.abort` reasons through. */ signal?: AbortSignal; /** Overrides the default 30s timeout. Set to `null` to disable. */ timeoutMs?: number | null; } export interface RpcSender { /** Push the outbound RPC over the underlying transport. */ send(requestId: string, method: RpcMethod, args: unknown, streaming: boolean): void; } export declare class RpcDispatcher { private readonly sender; private readonly pending; constructor(sender: RpcSender); call(method: RpcMethod, args: unknown, opts?: RpcCallOpts): Promise; handleResponse(requestId: string, payload: HostRpcResponsePayload): void; handleProgress(requestId: string, payload: HostRpcProgressPayload): void; rejectAll(reason: unknown): void; private settle; } //# sourceMappingURL=rpc.d.ts.map