import { Disposable } from "../../../base/common/lifecycle.js"; import { ILogService } from "../../log/common/log.service.js"; import type { AgentHostClientConnectionKind } from "./agentHostTelemetry.js"; import type { AhpServerNotification, JsonRpcNotification, JsonRpcParseErrorResponse, JsonRpcRequest, JsonRpcResponse, ProtocolMessage } from "./state/sessionProtocol.js"; import type { IClientTransport, IProtocolTransport, ITransportCloseDetails } from "./state/sessionTransport.js"; /** * A connected transport and the optional owner-specific resource teardown for its establishment attempt. */ export interface IEstablishedTransport { /** The live inner transport to route traffic through. */ readonly transport: IProtocolTransport; /** Tear down whatever this attempt established. Omitted when the caller owns teardown. */ close?(): Promise; } /** * Establishes an inner transport on demand and forwards its protocol traffic. */ export declare class ReconnectingTransport extends Disposable implements IClientTransport { private readonly _establish; private readonly _logService; private readonly _logPrefix; readonly clientConnectionKind: AgentHostClientConnectionKind | undefined; private readonly _sendBeforeConnectWarning; private readonly _onDidCloseDetails; readonly onDidCloseDetails: import("../../../base/common/event.js").Event; private readonly _onMessage; readonly onMessage: import("../../../base/common/event.js").Event; private readonly _onDidReceiveData; readonly onDidReceiveData: import("../../../base/common/event.js").Event; private readonly _onClose; readonly onClose: import("../../../base/common/event.js").Event; private readonly _establishedTransport; private _connectPromise; constructor(_establish: () => Promise, _logService: ILogService, _logPrefix: string, clientConnectionKind?: AgentHostClientConnectionKind | undefined, _sendBeforeConnectWarning?: string); /** Establishes and adopts the inner transport. */ connect(): Promise; get bufferedAmount(): number | undefined; /** Routes a protocol message through the established inner transport. */ send(message: ProtocolMessage | AhpServerNotification | JsonRpcNotification | JsonRpcParseErrorResponse | JsonRpcResponse | JsonRpcRequest): void; private _establishTransport; private _disposeEstablishedTransport; }