import type { AftTransportPool } from "./transport.js"; import { type AftTransportFactoryOptions } from "./transport-factory.js"; type PoolFactory = (options: AftTransportFactoryOptions) => Promise; export interface AcquireBridgeDependencies { /** Construction seam for lifecycle tests. Production always uses createAftTransportPool. */ createPool?: PoolFactory; } export interface BridgeLifecycleTopology { /** Live standalone daemon processes held by this JavaScript process (zero or one). */ daemonProcesses: number; /** Location-scoped routes. A route exists for every acquired Location lease. */ routes: number; /** Plugin-owned subc clients. The externally supervised daemon is not included. */ subcClients: number; /** All currently acquired V2 Location leases. */ locations: number; } export interface BridgeLifecycleCensus { watchers: number; listenPorts: number; routes: number; lspChildren: number; daemonProcesses: number; } export interface BridgeLifecycleCensusOptions { /** Delay before sampling. Leak probes use the required 2,000 ms settle. */ settleMs?: number; abortSignal?: AbortSignal; } /** * Acquire the transport resources for one host Location. Standalone Locations * share one process-global owner; subc Locations each own one client while the * daemon remains externally supervised. Acquisition and disposal for identical * canonical directories pass through the same process-global lock. */ export declare function acquireBridge(locationDirectory: string, options: AftTransportFactoryOptions, dependencies?: AcquireBridgeDependencies): Promise; /** Release one Location lease. Non-lifecycle pools retain shutdown compatibility. */ export declare function releaseBridge(pool: AftTransportPool): Promise; /** * Sample daemon-reported lifecycle health without creating a bridge. Once every * Location has released, the empty process topology is returned after the same * settle window used by host leak probes. */ export declare function sampleBridgeLifecycleCensus(options?: BridgeLifecycleCensusOptions): Promise; /** Process-local topology used by lifecycle probes; it never starts a daemon. */ export declare function getBridgeLifecycleTopology(): BridgeLifecycleTopology; export {}; //# sourceMappingURL=location-lifecycle.d.ts.map