import type { WeftEventMap } from '../core/events.ts'; import { WorkflowHandleDelegation } from './handle-delegation.ts'; import type { HttpClient } from './http-client.ts'; /** * Server-mode workflow handle. Lifecycle events are delivered push-based over * the server's per-workflow WebSocket or SSE event stream rather than by * polling `getEvents()` on a timer — listeners fire the moment an event lands * on the server. Each delivered event is re-dispatched as a `CustomEvent` whose * `detail` is the event's `data`, matching the long-standing handle contract. */ export declare class HttpHandle extends WorkflowHandleDelegation { #private; /** * Resolves once the handle's live event subscription is connected, so a * caller can attach listeners and then trigger work without missing the * events emitted in the window before the socket connects. Opens the * subscription if it is not already open. */ whenConnected(): Promise; /** Stop the event subscription and release resources. Cannot be restarted. */ close(): void; [Symbol.dispose](): void; result(): Promise; addEventListener(type: K, listener: (event: WeftEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (event: WeftEventMap[K]) => void, options?: boolean | EventListenerOptions): void; }