import { type InternalRemoteWorkerOptions } from './options.ts'; export type { RemoteWorkerOptions } from './options.ts'; export { isOutboxFull, MAX_BUFFERED_TASK_RESULTS } from './task-result-outbox.ts'; export { HeartbeatManager } from './heartbeat.ts'; export { LongPollWorker } from './long-poll.ts'; export type { LongPollWorkerOptions } from './long-poll.ts'; export { WorkerRegistry } from './registry.ts'; export type { InFlightTask, RoutingOptions, WorkerInfo } from './registry.ts'; export type { RemoteActivityContext } from './remote-activity-context.ts'; export { buildQualifiedActivityTable, type RemoteWorkerActivityFunction, type RemoteWorkerActivityImplementation, type RemoteWorkerWorkflowDefinition, } from './workflow-activity-binding.ts'; /** * WebSocket-based remote worker that connects to the Weft server and executes * activities on behalf of the engine. * * Construct with the server URL, a map of activity implementations, and optional * concurrency and queue settings. Call `start()` to open the WebSocket * connection and begin processing tasks. Dispose the instance (or call * `[Symbol.dispose]()`) to close the connection. * * @example * ```ts * import { RemoteWorker } from '@lostgradient/weft'; * * using worker = new RemoteWorker({ * serverUrl: 'ws://localhost:3000', * workflows: { * notifications: { * name: 'notifications', * activities: { * sendEmail: async (input: unknown) => { * console.log('sending', input); * return 'sent'; * }, * }, * }, * }, * concurrency: 5, * queue: 'email', * deploymentName: 'notifications', * buildId: '2026.08.19-1', * }); * await worker.connect(); * ``` */ export declare class RemoteWorker implements Disposable { #private; constructor(options: InternalRemoteWorkerOptions); /** Connect to the server and start processing tasks. */ connect(): Promise; /** Gracefully disconnect: finish in-flight, then close. */ disconnect(): Promise; /** Get the number of in-flight tasks. */ get inFlight(): number; /** Whether the worker is connected. */ get connected(): boolean; /** Whether the worker is in the process of shutting down. */ get shuttingDown(): boolean; [Symbol.dispose](): void; }