import { HonoSSEStream, VercelUIWriter } from "./stream-helpers.js";

//#region src/domains/run/stream/durable-stream-helper.d.ts

/**
 * A HonoSSEStream adapter that writes SSE-formatted data to a WDK WritableStream.
 * Used during durable workflow execution so SSE events are persisted and
 * clients can reconnect via getRun(runId).readable.
 */
declare class WritableBackedHonoSSEStream implements HonoSSEStream {
  private writer;
  constructor(writable: WritableStream<Uint8Array>);
  writeSSE(message: {
    data: string;
    event?: string;
    id?: string;
  }): Promise<void>;
  sleep(ms: number): Promise<void>;
  close(): Promise<void>;
  releaseLock(): void;
}
/**
 * A VercelUIWriter adapter that writes Vercel data stream SSE events to a WDK WritableStream.
 * Used during durable workflow execution via the /chat endpoint so the Vercel AI SDK client
 * can consume the stream directly.
 */
declare class WritableBackedVercelWriter implements VercelUIWriter {
  private writer;
  constructor(writable: WritableStream<Uint8Array>);
  write(chunk: unknown): void;
  merge(_stream: unknown): void;
  releaseLock(): void;
  close(): Promise<void>;
}
//#endregion
export { WritableBackedHonoSSEStream, WritableBackedVercelWriter };