import type { BgNudgeRef } from "./subc-transport.js"; import type { AftProjectTransport, AftTransportPool, ToolCallArguments, ToolCallOptions, ToolCallResult } from "./transport.js"; type StatusListener = (snapshot: Record) => void; type PoolFactory = () => Promise; /** * Owns one terminal transport instance and replaces it when new demand arrives * after the host has shut it down. The replaced instance is never reused: its * routes, sessions, and sockets remain owned by the dead instance. */ export declare class RevivableTransportPool implements AftTransportPool { private readonly createPool; private readonly onBinaryReplaced?; private activePool; private revival; private revivalRetryDelayMs; private revivalRetryNotBefore; private shutdownReason; private readonly transports; private readonly configureOverrides; private editSlotSurvivesCaptured; constructor(initialPool: AftTransportPool, createPool: PoolFactory, onBinaryReplaced?: ((path: string) => void) | undefined); getBridge(projectRoot: string): RevivableProjectTransport; /** Delegate to the active pool: session-scoped signal fan-out reaches the * same live transports the underlying pool would report. */ activeBridges(): AftProjectTransport[]; getActiveBridgeForRoot(projectRoot: string): RevivableProjectTransport | null; toolCall(projectRoot: string, runtime: { sessionID?: string; }, name: string, rawArgs?: ToolCallArguments, options?: ToolCallOptions): Promise; setConfigureOverride(key: string, value: unknown): void; reconfigure(projectRoot: string, overrides: Record): Promise; replaceBinary(path: string): Promise; closeSession(projectRoot: string, session: string): Promise; shutdown(reason?: string): Promise; isShutdown(): boolean; ensureActivePool(): Promise; /** * Return only the existing outer facade that matches a live concrete nudge. * Unlike getActiveBridgeForRoot, this path never creates a wrapper facade or * asks the active pool for demand. */ getActiveBridgeForRootGeneration(ref: BgNudgeRef): RevivableProjectTransport | null; recordBgNudgeRejection(ref: BgNudgeRef): void; getCurrentRootGeneration(root: string): BgNudgeRef["generation"] | undefined; getConcretePoolId(): BgNudgeRef["concretePoolId"] | undefined; currentBridge(projectRoot: string): AftProjectTransport | null; send(projectRoot: string, command: string, params?: Record, options?: Parameters[2]): Promise>; toolCallOnProject(projectRoot: string, sessionId: string | undefined, name: string, rawArgs?: ToolCallArguments, options?: ToolCallOptions): Promise; } /** * Stable project facade returned to callers so a facade acquired before a host * quit hook still routes the next call through the replacement pool. */ declare class RevivableProjectTransport implements AftProjectTransport { private readonly owner; private readonly projectRoot; private readonly statusListeners; private readonly statusBridges; constructor(owner: RevivableTransportPool, projectRoot: string); getCwd(): string; getCachedStatus(): import("./bridge.js").StatusSnapshot | null; cacheStatusSnapshot(snapshot: Parameters[0]): void; send(command: string, params?: Record, options?: Parameters[2]): Promise>; toolCall(sessionId: string | undefined, name: string, rawArgs?: ToolCallArguments, options?: ToolCallOptions): Promise; subscribeStatus(listener: StatusListener): () => void; refreshStatusSubscription(bridge: AftProjectTransport | null): void; private bindStatusListener; private removeStatusListener; } export {}; //# sourceMappingURL=revivable-transport.d.ts.map