import type { FabricComponentProviderLease } from "../components/types.js"; import type { FabricProvider } from "../protocol.js"; type FabricProviderBindingState = "staged" | "active" | "retiring" | "closed"; export interface FabricProviderBinding { id: string; name: string; generation: number; provider: FabricProvider; state: FabricProviderBindingState; ownerRetained: boolean; allowReplace: boolean; retainers: number; inFlight: number; closeTask?: Promise; closeError?: string; unsubscribeCatalog?: () => void; } export type FabricProviderBindingEvent = { type: "staged" | "activated" | "retiring" | "closed"; binding: FabricProviderBinding; } | { type: "catalog"; provider: string; }; export declare class FabricProviderBindings { #private; subscribe(listener: (event: FabricProviderBindingEvent) => void): () => void; current(name: string): FabricProviderBinding | undefined; binding(id: string): FabricProviderBinding | undefined; has(name: string): boolean; providers(): FabricProvider[]; entries(): FabricProviderBinding[]; mount(provider: FabricProvider, options?: { overwrite?: boolean; staged?: boolean; }): FabricComponentProviderLease; activate(bindingIds: readonly string[]): string[]; /** Withdraw the current binding: retire it and drop its owner hold, so * retained generations drain under the normal lifecycle rules. `provider` * and `generation` (number = generation, string = binding id) pin the target; * a mismatch withdraws nothing. `keepProviderOpen` skips provider.close() for * host-owned instances. */ unregister(name: string, options?: { provider?: FabricProvider; generation?: number | string; keepProviderOpen?: boolean; }): FabricProvider | undefined; retire(id: string): void; retain(ids: Iterable, cleanup?: boolean): () => Promise; beginInvocation(id: string, cleanup?: boolean): () => Promise; signal(id: string): AbortSignal; revoke(id: string): void; quarantine(id: string, error: unknown): void; /** Hold the real operation, not the caller's cancellation race. */ track(id: string, operation: () => T | PromiseLike, cleanup?: boolean): Promise; trackProvider(provider: FabricProvider, operation: () => T | PromiseLike, cleanup?: boolean): Promise; notifyCatalogChanged(provider: string): void; close(excludedProviderNames?: Set): Promise; private releaseOwner; } export {}; //# sourceMappingURL=provider-bindings.d.ts.map