import { type AcquireLeaseRequest, type ActorLease, type CompareAndSwapLeaseRequest, type HeartbeatLeaseRequest, type JsonValue, type ReleaseLeaseRequest, type RuntimeBrokerCommitRequest, type RuntimeBrokerCommitResult, type RuntimeBrokerListStreamsRequest, type RuntimeBrokerMethod, type RuntimeBrokerProbeResult, type RuntimeBrokerReadModelSourceState, type RuntimeBrokerStreamAuthorization, type StoredRuntimeBrokerCursorEvent, type StoredRuntimeBrokerEvent, type TakeoverLeaseRequest } from "./contracts.ts"; export interface RuntimeBrokerClientOptions { stateDirectory?: string; endpoint?: string; timeoutMs?: number; maxLineBytes?: number; maxPendingRequests?: number; /** Override used by embedders and failure-injection tests; defaults to process.execPath. */ daemonExecutable?: string; /** Override used by embedders and failure-injection tests; defaults to the packaged broker bin. */ daemonBinPath?: string; /** Broker daemons are leaf processes by contract; set false for custom daemons that spawn descendants. */ daemonIsLeafProcess?: boolean; } export declare function isRuntimeBrokerTransportError(error: unknown): boolean; export declare class RuntimeBrokerClient { #private; readonly endpoint: string; get readiness(): RuntimeBrokerProbeResult; private constructor(); static connect(options?: RuntimeBrokerClientOptions): Promise; static connectOrStart(options?: RuntimeBrokerClientOptions): Promise; request(method: RuntimeBrokerMethod, params: JsonValue, requestId?: string): Promise; acquireLease(params: AcquireLeaseRequest, requestId?: string): Promise; heartbeatLease(params: HeartbeatLeaseRequest, requestId?: string): Promise; compareAndSwapLease(params: CompareAndSwapLeaseRequest, requestId?: string): Promise; takeoverLease(params: TakeoverLeaseRequest, requestId?: string): Promise; commit(params: RuntimeBrokerCommitRequest, requestId?: string): Promise; releaseLease(params: ReleaseLeaseRequest, requestId?: string): Promise; getStreamRevision(streamId: string, requestId?: string): Promise; readEvents(streamId: string, afterRevision?: number, requestId?: string): Promise; readEvents(streamId: string, afterRevision: number, authorization: RuntimeBrokerStreamAuthorization, requestId?: string): Promise; listStreams(params: RuntimeBrokerListStreamsRequest, requestId?: string): Promise; readRuntimeReadModelEvents(workspaceId: string, afterCursor?: number, limit?: number, requestId?: string): Promise; readRuntimeReadModelSources(workspaceId: string, afterStreamId?: string, limit?: number, requestId?: string): Promise; close(): Promise; } export declare function probeRuntimeBrokerAuthority(options: { stateDirectory?: string; endpoint?: string; timeoutMs?: number; daemonToken?: string; generation?: string; }): Promise;