import { EventStreamHandle, TransportAdapter } from "../transport.cjs";
import { ProtocolSseTransportOptions } from "./types.cjs";
import { Command, CommandResponse, ErrorResponse, Message, SubscribeParams } from "@langchain/protocol";

//#region src/client/stream/transport/http.d.ts
/**
 * Transport adapter that speaks the thread-centric protocol over HTTP
 * commands plus SSE event streams. Bound to a specific `threadId`
 * at construction. Each {@link openEventStream} call opens an independent
 * filtered SSE connection via `POST /threads/:thread_id/stream/events`.
 */
declare class ProtocolSseTransportAdapter implements TransportAdapter {
  readonly threadId: string;
  private readonly queue;
  private readonly fetchImpl;
  private readonly apiUrl;
  private readonly defaultHeaders;
  private readonly onRequest?;
  private readonly fetchFactory?;
  private readonly commandsUrl;
  private readonly streamUrl;
  private readonly sessionAbortController;
  private readonly eventStreams;
  private closed;
  constructor(options: ProtocolSseTransportOptions);
  private resolveFetch;
  /**
   * HTTP/SSE transports have no handshake — connections are made
   * per-command and per-subscription.
   */
  open(): Promise<void>;
  send(command: Command): Promise<CommandResponse | ErrorResponse | void>;
  /**
   * WebSocket-style single event stream.
   * For the SSE transport this returns a dummy iterable; real event
   * delivery happens via {@link openEventStream}.
   */
  events(): AsyncIterable<Message>;
  openEventStream(params: SubscribeParams): EventStreamHandle;
  close(): Promise<void>;
  private request;
}
//#endregion
export { ProtocolSseTransportAdapter };
//# sourceMappingURL=http.d.cts.map