import type { InferDeviceProxyCap, InferRuntimeState } from '../capabilities/capability-definition.js';
import type { DeviceBinding } from '../device/device-binding.js';
import { type SliceHandle, type SliceHandleSource } from '../device/device-state-handle.js';
import type { AddonApi } from './addon-api.js';
import type { accessoriesCapability } from '../capabilities/accessories.cap.js';
import type { audioAnalysisCapability } from '../capabilities/audio-analysis.cap.js';
import type { audioMetricsCapability } from '../capabilities/audio-metrics.cap.js';
import type { batteryCapability } from '../capabilities/battery.cap.js';
import type { brightnessCapability } from '../capabilities/brightness.cap.js';
import type { cameraCredentialsCapability } from '../capabilities/camera-credentials.cap.js';
import type { cameraStreamsCapability } from '../capabilities/camera-streams.cap.js';
import type { detectionPipelineCapability } from '../capabilities/detection-pipeline.cap.js';
import type { deviceDiscoveryCapability } from '../capabilities/device-discovery.cap.js';
import type { deviceOpsCapability } from '../capabilities/device-ops.cap.js';
import type { deviceStatusCapability } from '../capabilities/device-status.cap.js';
import type { doorbellCapability } from '../capabilities/doorbell.cap.js';
import type { eventsCapability } from '../capabilities/events.cap.js';
import type { featureProbeCapability } from '../capabilities/feature-probe.cap.js';
import type { intercomCapability } from '../capabilities/intercom.cap.js';
import type { motionCapability } from '../capabilities/motion.cap.js';
import type { motionDetectionCapability } from '../capabilities/motion-detection.cap.js';
import type { motionTriggerCapability } from '../capabilities/motion-trigger.cap.js';
import type { nativeObjectDetectionCapability } from '../capabilities/native-object-detection.cap.js';
import type { osdCapability } from '../capabilities/osd.cap.js';
import type { pipelineAnalyticsCapability } from '../capabilities/pipeline-analytics.cap.js';
import type { ptzCapability } from '../capabilities/ptz.cap.js';
import type { ptzAutotrackCapability } from '../capabilities/ptz-autotrack.cap.js';
import type { rebootCapability } from '../capabilities/reboot.cap.js';
import type { recordingCapability } from '../capabilities/recording.cap.js';
import type { snapshotCapability } from '../capabilities/snapshot.cap.js';
import type { switchCapability } from '../capabilities/switch.cap.js';
import type { webrtcSessionCapability } from '../capabilities/webrtc-session.cap.js';
import type { zoneAnalyticsCapability } from '../capabilities/zone-analytics.cap.js';
import type { zoneRulesCapability } from '../capabilities/zone-rules.cap.js';
import type { zonesCapability } from '../capabilities/zones.cap.js';
import type { addonSettingsCapability } from '../capabilities/addon-settings.cap.js';
import type { deviceManagerCapability } from '../capabilities/device-manager.cap.js';
import type { deviceStateCapability } from '../capabilities/device-state.cap.js';
import type { networkQualityCapability } from '../capabilities/network-quality.cap.js';
import type { pipelineExecutorCapability } from '../capabilities/pipeline-executor.cap.js';
import type { pipelineOrchestratorCapability } from '../capabilities/pipeline-orchestrator.cap.js';
import type { pipelineRunnerCapability } from '../capabilities/pipeline-runner.cap.js';
import type { recordingEngineCapability } from '../capabilities/recording-engine.cap.js';
import type { snapshotProviderCapability } from '../capabilities/snapshot-provider.cap.js';
import type { streamBrokerCapability } from '../capabilities/stream-broker.cap.js';
/**
 * Reactive read handle bag for device runtime state. Each entry mirrors the
 * cap's `runtimeState` schema and stays live via the `device-state` cap's
 * `onChanged` event. See `device-state-handle.ts` for the contract.
 */
export interface DeviceProxyState {
    readonly audioMetrics: SliceHandle<InferRuntimeState<typeof audioMetricsCapability>>;
    readonly battery: SliceHandle<InferRuntimeState<typeof batteryCapability>>;
    readonly brightness: SliceHandle<InferRuntimeState<typeof brightnessCapability>>;
    readonly cameraStreams: SliceHandle<InferRuntimeState<typeof cameraStreamsCapability>>;
    readonly deviceDiscovery: SliceHandle<InferRuntimeState<typeof deviceDiscoveryCapability>>;
    readonly deviceStatus: SliceHandle<InferRuntimeState<typeof deviceStatusCapability>>;
    readonly doorbell: SliceHandle<InferRuntimeState<typeof doorbellCapability>>;
    readonly featureProbe: SliceHandle<InferRuntimeState<typeof featureProbeCapability>>;
    readonly motion: SliceHandle<InferRuntimeState<typeof motionCapability>>;
    readonly motionTrigger: SliceHandle<InferRuntimeState<typeof motionTriggerCapability>>;
    readonly ptzAutotrack: SliceHandle<InferRuntimeState<typeof ptzAutotrackCapability>>;
    readonly switch: SliceHandle<InferRuntimeState<typeof switchCapability>>;
    readonly zoneAnalytics: SliceHandle<InferRuntimeState<typeof zoneAnalyticsCapability>>;
    readonly zoneRules: SliceHandle<InferRuntimeState<typeof zoneRulesCapability>>;
    readonly zones: SliceHandle<InferRuntimeState<typeof zonesCapability>>;
}
/**
 * Unified per-device proxy interface. Each optional property is present at
 * runtime only when the device's binding includes that capability.
 *
 * The optional `binding` field is populated post-construction by callers
 * that own a binding cache (e.g. the SDK's `System` mirror). Consumers
 * that need the full per-device binding map can read it from there
 * without paying for a second `getBindings` round-trip — see Phase 5
 * dedup notes in `scripts/generate-device-proxy.ts`.
 */
export interface DeviceProxy {
    readonly deviceId: number;
    /** Reactive runtime state, one slot per cap that declares `runtimeState`. */
    readonly state: DeviceProxyState;
    /** Resolved binding entry list (or null if the proxy was constructed
     *  without a cache-aware caller — defaults to null since
     *  `createDeviceProxy` itself does not own the binding). */
    readonly binding: DeviceBinding | null;
    readonly accessories?: InferDeviceProxyCap<typeof accessoriesCapability>;
    readonly audioAnalysis?: InferDeviceProxyCap<typeof audioAnalysisCapability>;
    readonly audioMetrics?: InferDeviceProxyCap<typeof audioMetricsCapability>;
    readonly battery?: InferDeviceProxyCap<typeof batteryCapability>;
    readonly brightness?: InferDeviceProxyCap<typeof brightnessCapability>;
    readonly cameraCredentials?: InferDeviceProxyCap<typeof cameraCredentialsCapability>;
    readonly cameraStreams?: InferDeviceProxyCap<typeof cameraStreamsCapability>;
    readonly detectionPipeline?: InferDeviceProxyCap<typeof detectionPipelineCapability>;
    readonly deviceDiscovery?: InferDeviceProxyCap<typeof deviceDiscoveryCapability>;
    readonly deviceOps?: InferDeviceProxyCap<typeof deviceOpsCapability>;
    readonly deviceStatus?: InferDeviceProxyCap<typeof deviceStatusCapability>;
    readonly doorbell?: InferDeviceProxyCap<typeof doorbellCapability>;
    readonly events?: InferDeviceProxyCap<typeof eventsCapability>;
    readonly featureProbe?: InferDeviceProxyCap<typeof featureProbeCapability>;
    readonly intercom?: InferDeviceProxyCap<typeof intercomCapability>;
    readonly motion?: InferDeviceProxyCap<typeof motionCapability>;
    readonly motionDetection?: InferDeviceProxyCap<typeof motionDetectionCapability>;
    readonly motionTrigger?: InferDeviceProxyCap<typeof motionTriggerCapability>;
    readonly nativeObjectDetection?: InferDeviceProxyCap<typeof nativeObjectDetectionCapability>;
    readonly osd?: InferDeviceProxyCap<typeof osdCapability>;
    readonly pipelineAnalytics?: InferDeviceProxyCap<typeof pipelineAnalyticsCapability>;
    readonly ptz?: InferDeviceProxyCap<typeof ptzCapability>;
    readonly ptzAutotrack?: InferDeviceProxyCap<typeof ptzAutotrackCapability>;
    readonly reboot?: InferDeviceProxyCap<typeof rebootCapability>;
    readonly recording?: InferDeviceProxyCap<typeof recordingCapability>;
    readonly snapshot?: InferDeviceProxyCap<typeof snapshotCapability>;
    readonly switch?: InferDeviceProxyCap<typeof switchCapability>;
    readonly webrtcSession?: InferDeviceProxyCap<typeof webrtcSessionCapability>;
    readonly zoneAnalytics?: InferDeviceProxyCap<typeof zoneAnalyticsCapability>;
    readonly zoneRules?: InferDeviceProxyCap<typeof zoneRulesCapability>;
    readonly zones?: InferDeviceProxyCap<typeof zonesCapability>;
    readonly addonSettings: Pick<InferDeviceProxyCap<typeof addonSettingsCapability>, 'getDeviceSettings' | 'updateDeviceSettings'>;
    readonly deviceManager: Pick<InferDeviceProxyCap<typeof deviceManagerCapability>, 'loadConfig' | 'loadRuntimeState' | 'loadMeta' | 'setName' | 'setLocation' | 'setMetadata' | 'setDisabled' | 'getDevice' | 'getStreamSources' | 'getConfigSchema' | 'getSettingsSchema' | 'updateConfig' | 'enable' | 'disable' | 'remove' | 'getStreamProfileMap' | 'setStreamProfileMap' | 'probeStreams' | 'getBindings' | 'getAllBindings' | 'setWrapperActive' | 'getDeviceSettingsAggregate' | 'getDeviceLiveInfoAggregate' | 'getDeviceAggregate' | 'updateDeviceField' | 'updateDeviceFieldsBatch' | 'testField' | 'getDeviceStatusAggregate'>;
    readonly deviceState: Pick<InferDeviceProxyCap<typeof deviceStateCapability>, 'getSnapshot' | 'getCapSlice' | 'setCapSlice'>;
    readonly networkQuality: Pick<InferDeviceProxyCap<typeof networkQualityCapability>, 'getDeviceStats' | 'reportClientStats'>;
    readonly pipelineExecutor: Pick<InferDeviceProxyCap<typeof pipelineExecutorCapability>, 'runPipeline' | 'runPipelineBatch'>;
    readonly pipelineOrchestrator: Pick<InferDeviceProxyCap<typeof pipelineOrchestratorCapability>, 'assignPipeline' | 'unassignPipeline' | 'getPipelineAssignment' | 'getCameraMetrics' | 'assignDecoder' | 'unassignDecoder' | 'assignAudio' | 'unassignAudio' | 'getAudioAssignment' | 'getAudioAssignments' | 'getDecoderAssignment' | 'getCameraSettings' | 'setCameraStepToggle' | 'getCameraStepOverrides' | 'setCameraStepOverride' | 'setCameraPipelineForAgent' | 'resolvePipeline' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
    readonly pipelineRunner: Pick<InferDeviceProxyCap<typeof pipelineRunnerCapability>, 'detachCamera' | 'getCameraMetrics'>;
    readonly recordingEngine: Pick<InferDeviceProxyCap<typeof recordingEngineCapability>, 'getPolicyStatus'>;
    readonly snapshotProvider: Pick<InferDeviceProxyCap<typeof snapshotProviderCapability>, 'supportsDevice' | 'getSnapshot'>;
    readonly streamBroker: Pick<InferDeviceProxyCap<typeof streamBrokerCapability>, 'publishCameraStream' | 'retractCameraStream' | 'assignProfile' | 'unassignProfile' | 'restartProfile' | 'getDeviceSettingsContribution' | 'getDeviceLiveContribution' | 'applyDeviceSettingsPatch'>;
}
/**
 * Build a DeviceProxy that pre-binds deviceId + nodeId on every method call
 * and dispatches through the existing cap-router tRPC procedures.
 *
 * Optional `opts.stateSource` lets a SystemManager pass a shared mirror
 * source so every device proxy reads from the same in-memory map and
 * shares the warm-boot/push-event update loop. When omitted, a per-proxy
 * lazy tRPC source is created — the path used by `ctx.fetchDevice` and
 * `BackendClient.fetchDevice` for one-off reads.
 *
 * The returned proxy's `binding` field is set to the input `binding`
 * by default — callers that want to expose a different value (e.g. the
 * SDK's `System` patches it from a shared cache) can overwrite the
 * field on the returned object.
 */
export declare function createDeviceProxy(api: AddonApi, binding: DeviceBinding, opts?: {
    stateSource?: SliceHandleSource;
}): DeviceProxy;
//# sourceMappingURL=device-proxy.d.ts.map