import type { TlsOptions } from '../types.js'; import type { WorkerServiceClient } from '../generated/proto-loader/memoflow/v1/WorkerService.js'; import type { WorkerSessionClient } from '../generated/proto-loader/memoflow/v1/WorkerSession.js'; import type { WorkflowServiceClient } from '../generated/proto-loader/memoflow/v1/WorkflowService.js'; import type { ControlResourceServiceClient } from '../generated/proto-loader/memoflow/v1/ControlResourceService.js'; /** * Connection options shared by both client constructors (P4.2). */ export interface ConnectionOptions { /** * API key — attached as `authorization: Bearer ` gRPC metadata on * every call via a client-side interceptor (works on both plaintext and * TLS channels, unlike composed call-credentials, which grpc-js refuses * to combine with insecure channel credentials). Against a server with * auth disabled, the extra metadata is simply ignored. */ apiKey?: string; /** mTLS options. Omit for plaintext gRPC (the default). */ tls?: TlsOptions; /** Bounded default deadline inherited by unary calls on this client. */ defaultRpcTimeoutMs?: number; } /** * Create a WorkflowService gRPC client (for application code: start, signal, query, cancel). */ export declare function createWorkflowServiceClient(address: string, options?: ConnectionOptions): WorkflowServiceClient; /** Create the administrative control-resource client. */ export declare function createControlResourceServiceClient(address: string, options?: ConnectionOptions): ControlResourceServiceClient; /** * Create a WorkerService gRPC client. Post-P9.2 this service carries only * the non-session RPCs a worker still needs out-of-band: `GetCheckpoints` * (lazy hydration) and `GetSqlContract` (available standalone; the session * hello_ack carries the same payload). */ export declare function createWorkerServiceClient(address: string, options?: ConnectionOptions): WorkerServiceClient; /** * Create a WorkerSession gRPC client (ADR-0002, P9.2): one bidirectional * `Session` stream replaces the two poll streams plus the unary * complete/heartbeat/stream-chunk RPCs. */ export declare function createWorkerSessionClient(address: string, options?: ConnectionOptions): WorkerSessionClient;