import { AgentServerAdapter, EventStreamHandle } from "../transport.js"; import { HeaderValue, ProtocolRequestHook, ProtocolTransportPaths } from "./types.js"; import { Command, CommandResponse, ErrorResponse, Message, SubscribeParams } from "@langchain/protocol"; //#region src/client/stream/transport/agent-server.d.ts interface HttpAgentServerAdapterOptions { apiUrl: string; threadId: string; /** Auth / tenant / diagnostic headers applied to every request. */ defaultHeaders?: Record; /** Per-request hook for last-mile header mutation. */ onRequest?: ProtocolRequestHook; /** Override the default `/threads/:threadId/...` protocol paths. */ paths?: ProtocolTransportPaths; /** * Optional `fetch` override, forwarded to the SSE transport. Useful * for auth proxies, Next.js route handlers, or tests with injected * mocks. Ignored when `webSocketFactory` is also supplied. */ fetch?: typeof fetch; /** * Optional WebSocket factory. Supplying it flips the adapter into * WebSocket mode — SSE is bypassed entirely. */ webSocketFactory?: (url: string) => WebSocket; } declare class HttpAgentServerAdapter implements AgentServerAdapter { #private; readonly threadId: string; constructor(options: HttpAgentServerAdapterOptions); open(): Promise; send(command: Command): Promise; events(): AsyncIterable; openEventStream(params: SubscribeParams): EventStreamHandle; close(): Promise; } //#endregion export { HttpAgentServerAdapter, HttpAgentServerAdapterOptions }; //# sourceMappingURL=agent-server.d.ts.map