import { ServiceBroker } from 'moleculer';
type CallFn = (method: string, params: unknown, targetNodeId?: string) => Promise<unknown>;
interface CapabilityBridgeCallbacks {
    onProviderConnected(capabilityName: string, addonId: string, nodeId: string, call: CallFn): void;
    onProviderDisconnected(nodeId: string, addonId: string, capabilities: readonly string[]): void;
}
declare class CapabilityBridge {
    private readonly broker;
    private readonly callbacks;
    /** nodeId → Map<addonId, capabilityNames[]> */
    private readonly nodeAddons;
    /** Debounce timers per nodeId to coalesce rapid $node.connected events */
    private readonly pendingDiscovery;
    /** Retry state per nodeId for nodes that connected but had 0 capabilities found */
    private readonly pendingRetry;
    constructor(broker: ServiceBroker, callbacks: CapabilityBridgeCallbacks);
    start(): void;
    /** Scan the registry for services on `nodeId` and register their capabilities. */
    discoverNodeServices(nodeId: string): void;
    /** Schedule a retry for `nodeId` if we haven't exhausted all retry attempts. */
    private scheduleRetry;
    /** Return the internal nodeAddons map (nodeId -> Map<addonId, capNames[]>) for cluster discovery. */
    getNodeCapabilities(): ReadonlyMap<string, ReadonlyMap<string, readonly string[]>>;
    private handleNodeDisconnected;
}
export { CapabilityBridge };
export type { CapabilityBridgeCallbacks, CallFn };
//# sourceMappingURL=capability-bridge.d.ts.map