import { AddonApi, CapabilityDefinition, DeviceManagerApi, IEventBus, IKernelStreamProbe, IScopedLogger } from '@camstack/types';
import { ServiceBroker } from 'moleculer';
import { DeviceRegistry } from '../device-registry.js';
import { CapabilityRegistry } from '../capability-registry.js';
export interface WorkerDeviceManagerOptions {
    readonly api: AddonApi;
    readonly addonId: string;
    readonly nodeId: string;
    readonly logger: IScopedLogger;
    readonly eventBus: IEventBus;
    readonly registry: DeviceRegistry;
    readonly capabilityRegistry?: CapabilityRegistry;
    readonly broker?: ServiceBroker;
    readonly streamProbe?: IKernelStreamProbe;
}
/**
 * Action name prefix used for cross-process per-device native cap calls.
 * `<addonId>.native-provider.<capName>.<method>`
 */
export declare const NATIVE_PROVIDER_SERVICE_INFIX: ".native-provider";
/**
 * Mount the Moleculer service exposing `<addonId>.native-provider.<capName>`
 * with per-method actions that dispatch to `workerNativeCaps`. Called
 * lazily on first `registerNativeCap` AND proactively at worker boot for
 * always-on caps (e.g. `device-ops`) so the INFO packet sent at TCP
 * connect already advertises the service.
 */
export declare function mountNativeCapService<TCap extends CapabilityDefinition>(broker: ServiceBroker, addonId: string, cap: TCap): void;
export declare function getWorkerNativeCap(capName: string, deviceId: number): unknown | null;
export declare function clearWorkerNativeCapsForDevice(deviceId: number): void;
export declare function getWorkerNativeCapNames(): readonly string[];
export declare function getWorkerNativeCapsForDevice(deviceId: number): readonly string[];
/**
 * Hub-side proxy factory. Returns an object whose method access dispatches
 * via `broker.call('<addonId>.native-provider.<capName>.<method>', input)`.
 * Calls are wrapped in exponential-backoff retry to absorb the race between
 * worker `broker.createService` and the hub's Moleculer registry INFO packet.
 */
export declare function buildNativeCapProxy(broker: ServiceBroker, addonId: string, capName: string, deviceId: number): Record<string, (input: unknown) => Promise<unknown>>;
export declare function createBrokerDeviceManagerApi(opts: WorkerDeviceManagerOptions): DeviceManagerApi;
//# sourceMappingURL=device-cap-proxy.d.ts.map