import { type JsonValue } from "../state/json.js"; import { type ClientEvent, type ClientHello, type ClientOperation, type ClientResponse } from "./protocol.js"; import type { ResolvedResourceManagerInitialization, ResolvedSettingsChange, ResolvedWorkflowLaunch } from "./resolver.js"; import type { WorkflowRunView } from "./view.js"; export declare class WorkflowClientVersionError extends Error { constructor(message: string); } export type WorkflowClientOptions = { clientId?: string; databasePath?: string; serverEntryPath?: string; env?: Record; }; export declare class WorkflowClient { readonly clientId: string; readonly databasePath: string; readonly endpoint: string; private readonly serverEntryPath; private readonly env; private socket; private connectTask; private hello; private closed; private reconnectTimer; private readonly pending; private readonly subscriptions; constructor(options?: WorkflowClientOptions); get connectionId(): string | undefined; get packageVersion(): string | undefined; connect(): Promise; request(options: { operation: ClientOperation; requestId?: string; idempotencyKey?: string; runId?: string; expectedRevision?: number; payload?: JsonValue; signal?: AbortSignal; }): Promise; requestDurable(options: { operation: ClientOperation; requestId?: string; idempotencyKey: string; runId?: string; expectedRevision?: number; payload?: JsonValue; signal?: AbortSignal; }): Promise; getRun(runId: string): Promise; watchRuns(listener: (event: ClientEvent) => void, options?: { subscriptionId?: string; limit?: number; }): Promise<() => Promise>; watchRun(runId: string, listener: (event: ClientEvent) => void, options?: { subscriptionId?: string; revision?: number; }): Promise<() => Promise>; watchSession(sessionId: string, listener: (event: ClientEvent) => void, options?: { subscriptionId?: string; coordinator?: boolean; }): Promise<() => Promise>; ensureAvailable(): Promise; ensureRunning(): Promise; readContent(runId: string, contentPath: string): Promise<{ mediaType: string; content: Buffer; }>; hydrateContent(runId: string, value: JsonValue): Promise; private hydrateContentValue; resolveWorkflow(options: { cwd: string; workflowRef: string; timeoutMs?: number; }): Promise; resolveResourceManagerInitialization(options: { cwd: string; resourceManagerName: string; spec: JsonValue; timeoutMs?: number; }): Promise; resolveSettingsChange(options: { cwd: string; workflowRef: string; definitionDigest: string; mountPath: string; current: JsonValue; patch: JsonValue; actorId: string; timeoutMs?: number; }): Promise; close(): Promise; private subscribe; private requestConnected; private send; private openConnection; private deliverSubscriptionEvent; private restoreSubscriptions; private resetConnection; private scheduleReconnect; private runResolver; private startDetached; }