@camera.ui/sdk 0.0.25 → 0.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1113,7 +1113,23 @@ declare const audioMeta: {
1113
1113
  readonly assignmentKey: "audio";
1114
1114
  readonly multiProvider: false;
1115
1115
  readonly isDetectionType: true;
1116
- readonly properties: AudioProperty[];
1116
+ readonly properties: {
1117
+ readonly detected: {
1118
+ readonly type: "boolean";
1119
+ };
1120
+ readonly detections: {
1121
+ readonly type: "object";
1122
+ readonly internal: true;
1123
+ };
1124
+ readonly decibels: {
1125
+ readonly type: "number";
1126
+ readonly unit: "dB";
1127
+ };
1128
+ readonly lastTriggered: {
1129
+ readonly type: "number";
1130
+ readonly internal: true;
1131
+ };
1132
+ };
1117
1133
  readonly semantics: null;
1118
1134
  };
1119
1135
 
@@ -1128,6 +1144,28 @@ interface SensorVirtualDefaults {
1128
1144
  readonly properties: Readonly<Record<string, unknown>>;
1129
1145
  readonly capabilities?: readonly string[];
1130
1146
  }
1147
+ /** Runtime value type of a sensor property. */
1148
+ type SensorPropertyValueType = 'boolean' | 'number' | 'string' | 'enum' | 'object';
1149
+ /**
1150
+ * Per-property value description: what type a property carries, its possible
1151
+ * enum values or numeric range, and whether it is a command or an internal
1152
+ * detail. Consumers (automation pickers, value editors) render from this
1153
+ * instead of hand-maintained tables.
1154
+ */
1155
+ interface SensorPropertySpec {
1156
+ readonly type: SensorPropertyValueType;
1157
+ /** Enum properties: value-name → wire value. Names double as i18n key stems. */
1158
+ readonly values?: Readonly<Record<string, string | number>>;
1159
+ /** Object properties: scalar member keys, exposed as value-path variables. */
1160
+ readonly keys?: readonly string[];
1161
+ readonly min?: number;
1162
+ readonly max?: number;
1163
+ readonly unit?: string;
1164
+ /** Accepts external writes (commands, target states, virtual sensor state). */
1165
+ readonly writable?: boolean;
1166
+ /** Not an observable state: hidden from trigger/condition pickers. */
1167
+ readonly internal?: boolean;
1168
+ }
1131
1169
  /** The kind of thing a sensor is, used by consumers to pick how to render it. */
1132
1170
  declare enum SensorDomain {
1133
1171
  Binary = "binary",
@@ -1171,7 +1209,7 @@ interface SensorMeta {
1171
1209
  readonly assignmentKey: string;
1172
1210
  readonly multiProvider: boolean;
1173
1211
  readonly isDetectionType: boolean;
1174
- readonly properties: readonly string[];
1212
+ readonly properties: Readonly<Record<string, SensorPropertySpec>>;
1175
1213
  readonly shortcutable?: boolean;
1176
1214
  readonly cascadeTrigger?: SensorCascadeTrigger;
1177
1215
  readonly propertyCapabilities?: Readonly<Record<string, string>>;
@@ -1320,7 +1358,26 @@ declare const batteryMeta: {
1320
1358
  readonly assignmentKey: "battery";
1321
1359
  readonly multiProvider: false;
1322
1360
  readonly isDetectionType: false;
1323
- readonly properties: BatteryProperty[];
1361
+ readonly properties: {
1362
+ readonly level: {
1363
+ readonly type: "number";
1364
+ readonly min: 0;
1365
+ readonly max: 100;
1366
+ readonly unit: "%";
1367
+ };
1368
+ readonly charging: {
1369
+ readonly type: "enum";
1370
+ readonly values: {
1371
+ readonly not_chargeable: ChargingState.NotChargeable;
1372
+ readonly not_charging: ChargingState.NotCharging;
1373
+ readonly charging: ChargingState.Charging;
1374
+ readonly full: ChargingState.Full;
1375
+ };
1376
+ };
1377
+ readonly low: {
1378
+ readonly type: "boolean";
1379
+ };
1380
+ };
1324
1381
  readonly shortcutable: true;
1325
1382
  readonly propertyCapabilities: {
1326
1383
  readonly charging: BatteryCapability.Charging;
@@ -1399,7 +1456,12 @@ declare const contactMeta: {
1399
1456
  readonly assignmentKey: "contact";
1400
1457
  readonly multiProvider: true;
1401
1458
  readonly isDetectionType: false;
1402
- readonly properties: ContactProperty.Detected[];
1459
+ readonly properties: {
1460
+ readonly detected: {
1461
+ readonly type: "boolean";
1462
+ readonly writable: true;
1463
+ };
1464
+ };
1403
1465
  readonly shortcutable: true;
1404
1466
  readonly cascadeTrigger: {
1405
1467
  readonly property: ContactProperty;
@@ -1492,7 +1554,12 @@ declare const doorbellMeta: {
1492
1554
  readonly assignmentKey: "doorbell";
1493
1555
  readonly multiProvider: true;
1494
1556
  readonly isDetectionType: false;
1495
- readonly properties: DoorbellProperty.Ring[];
1557
+ readonly properties: {
1558
+ readonly ring: {
1559
+ readonly type: "boolean";
1560
+ readonly writable: true;
1561
+ };
1562
+ };
1496
1563
  readonly shortcutable: true;
1497
1564
  readonly cascadeTrigger: {
1498
1565
  readonly property: DoorbellProperty;
@@ -1652,7 +1719,15 @@ declare const faceMeta: {
1652
1719
  readonly assignmentKey: "face";
1653
1720
  readonly multiProvider: false;
1654
1721
  readonly isDetectionType: true;
1655
- readonly properties: FaceProperty[];
1722
+ readonly properties: {
1723
+ readonly detected: {
1724
+ readonly type: "boolean";
1725
+ };
1726
+ readonly detections: {
1727
+ readonly type: "object";
1728
+ readonly internal: true;
1729
+ };
1730
+ };
1656
1731
  readonly semantics: null;
1657
1732
  };
1658
1733
 
@@ -1773,7 +1848,29 @@ declare const garageMeta: {
1773
1848
  readonly assignmentKey: "garage";
1774
1849
  readonly multiProvider: true;
1775
1850
  readonly isDetectionType: false;
1776
- readonly properties: GarageProperty[];
1851
+ readonly properties: {
1852
+ readonly currentState: {
1853
+ readonly type: "enum";
1854
+ readonly values: {
1855
+ readonly open: GarageState.Open;
1856
+ readonly closed: GarageState.Closed;
1857
+ readonly opening: GarageState.Opening;
1858
+ readonly closing: GarageState.Closing;
1859
+ readonly stopped: GarageState.Stopped;
1860
+ };
1861
+ };
1862
+ readonly targetState: {
1863
+ readonly type: "enum";
1864
+ readonly values: {
1865
+ readonly open: GarageState.Open;
1866
+ readonly closed: GarageState.Closed;
1867
+ };
1868
+ readonly writable: true;
1869
+ };
1870
+ readonly obstructionDetected: {
1871
+ readonly type: "boolean";
1872
+ };
1873
+ };
1777
1874
  readonly shortcutable: true;
1778
1875
  readonly cascadeTrigger: {
1779
1876
  readonly property: GarageProperty.CurrentState;
@@ -1864,7 +1961,15 @@ declare const humidityMeta: {
1864
1961
  readonly assignmentKey: "humidity";
1865
1962
  readonly multiProvider: true;
1866
1963
  readonly isDetectionType: false;
1867
- readonly properties: HumidityProperty.Current[];
1964
+ readonly properties: {
1965
+ readonly current: {
1966
+ readonly type: "number";
1967
+ readonly min: 0;
1968
+ readonly max: 100;
1969
+ readonly unit: "%";
1970
+ readonly writable: true;
1971
+ };
1972
+ };
1868
1973
  readonly shortcutable: true;
1869
1974
  readonly virtual: {
1870
1975
  readonly properties: {
@@ -1943,7 +2048,12 @@ declare const leakMeta: {
1943
2048
  readonly assignmentKey: "leak";
1944
2049
  readonly multiProvider: true;
1945
2050
  readonly isDetectionType: false;
1946
- readonly properties: LeakProperty.Detected[];
2051
+ readonly properties: {
2052
+ readonly detected: {
2053
+ readonly type: "boolean";
2054
+ readonly writable: true;
2055
+ };
2056
+ };
1947
2057
  readonly shortcutable: true;
1948
2058
  readonly cascadeTrigger: {
1949
2059
  readonly property: LeakProperty;
@@ -1980,6 +2090,8 @@ interface LicensePlateDetection extends Detection {
1980
2090
  attribute: 'license_plate';
1981
2091
  /** Recognized plate text (e.g. `"ABC 1234"`). */
1982
2092
  plateText: string;
2093
+ /** Average text recognition confidence (0-1), separate from the box confidence. */
2094
+ ocrConfidence?: number;
1983
2095
  }
1984
2096
  /**
1985
2097
  * Property shape carried by a {@link LicensePlateSensor}.
@@ -2096,7 +2208,15 @@ declare const licensePlateMeta: {
2096
2208
  readonly assignmentKey: "licensePlate";
2097
2209
  readonly multiProvider: false;
2098
2210
  readonly isDetectionType: true;
2099
- readonly properties: LicensePlateProperty[];
2211
+ readonly properties: {
2212
+ readonly detected: {
2213
+ readonly type: "boolean";
2214
+ };
2215
+ readonly detections: {
2216
+ readonly type: "object";
2217
+ readonly internal: true;
2218
+ };
2219
+ };
2100
2220
  readonly semantics: null;
2101
2221
  };
2102
2222
 
@@ -2203,7 +2323,19 @@ declare const lightMeta: {
2203
2323
  readonly assignmentKey: "light";
2204
2324
  readonly multiProvider: true;
2205
2325
  readonly isDetectionType: false;
2206
- readonly properties: LightProperty[];
2326
+ readonly properties: {
2327
+ readonly on: {
2328
+ readonly type: "boolean";
2329
+ readonly writable: true;
2330
+ };
2331
+ readonly brightness: {
2332
+ readonly type: "number";
2333
+ readonly min: 0;
2334
+ readonly max: 100;
2335
+ readonly unit: "%";
2336
+ readonly writable: true;
2337
+ };
2338
+ };
2207
2339
  readonly shortcutable: true;
2208
2340
  readonly cascadeTrigger: {
2209
2341
  readonly property: LightProperty.On;
@@ -2325,7 +2457,24 @@ declare const lockMeta: {
2325
2457
  readonly assignmentKey: "lock";
2326
2458
  readonly multiProvider: true;
2327
2459
  readonly isDetectionType: false;
2328
- readonly properties: LockProperty[];
2460
+ readonly properties: {
2461
+ readonly currentState: {
2462
+ readonly type: "enum";
2463
+ readonly values: {
2464
+ readonly secured: LockState.Secured;
2465
+ readonly unsecured: LockState.Unsecured;
2466
+ readonly unknown: LockState.Unknown;
2467
+ };
2468
+ };
2469
+ readonly targetState: {
2470
+ readonly type: "enum";
2471
+ readonly values: {
2472
+ readonly secured: LockState.Secured;
2473
+ readonly unsecured: LockState.Unsecured;
2474
+ };
2475
+ readonly writable: true;
2476
+ };
2477
+ };
2329
2478
  readonly shortcutable: true;
2330
2479
  readonly cascadeTrigger: {
2331
2480
  readonly property: LockProperty.CurrentState;
@@ -2479,7 +2628,23 @@ declare const motionMeta: {
2479
2628
  readonly assignmentKey: "motion";
2480
2629
  readonly multiProvider: false;
2481
2630
  readonly isDetectionType: true;
2482
- readonly properties: MotionProperty[];
2631
+ readonly properties: {
2632
+ readonly detected: {
2633
+ readonly type: "boolean";
2634
+ };
2635
+ readonly detections: {
2636
+ readonly type: "object";
2637
+ readonly internal: true;
2638
+ };
2639
+ readonly blocked: {
2640
+ readonly type: "boolean";
2641
+ readonly internal: true;
2642
+ };
2643
+ readonly lastTriggered: {
2644
+ readonly type: "number";
2645
+ readonly internal: true;
2646
+ };
2647
+ };
2483
2648
  readonly semantics: null;
2484
2649
  };
2485
2650
 
@@ -2632,7 +2797,18 @@ declare const objectMeta: {
2632
2797
  readonly assignmentKey: "object";
2633
2798
  readonly multiProvider: false;
2634
2799
  readonly isDetectionType: true;
2635
- readonly properties: ObjectProperty[];
2800
+ readonly properties: {
2801
+ readonly detected: {
2802
+ readonly type: "boolean";
2803
+ };
2804
+ readonly detections: {
2805
+ readonly type: "object";
2806
+ readonly internal: true;
2807
+ };
2808
+ readonly labels: {
2809
+ readonly type: "object";
2810
+ };
2811
+ };
2636
2812
  readonly semantics: null;
2637
2813
  };
2638
2814
 
@@ -2699,7 +2875,12 @@ declare const occupancyMeta: {
2699
2875
  readonly assignmentKey: "occupancy";
2700
2876
  readonly multiProvider: true;
2701
2877
  readonly isDetectionType: false;
2702
- readonly properties: OccupancyProperty.Detected[];
2878
+ readonly properties: {
2879
+ readonly detected: {
2880
+ readonly type: "boolean";
2881
+ readonly writable: true;
2882
+ };
2883
+ };
2703
2884
  readonly shortcutable: true;
2704
2885
  readonly cascadeTrigger: {
2705
2886
  readonly property: OccupancyProperty;
@@ -2947,7 +3128,38 @@ declare const ptzMeta: {
2947
3128
  readonly assignmentKey: "ptz";
2948
3129
  readonly multiProvider: false;
2949
3130
  readonly isDetectionType: false;
2950
- readonly properties: PTZProperty[];
3131
+ readonly properties: {
3132
+ readonly position: {
3133
+ readonly type: "object";
3134
+ readonly writable: true;
3135
+ readonly keys: readonly ["pan", "tilt", "zoom"];
3136
+ };
3137
+ readonly moving: {
3138
+ readonly type: "boolean";
3139
+ };
3140
+ readonly presets: {
3141
+ readonly type: "object";
3142
+ };
3143
+ readonly velocity: {
3144
+ readonly type: "object";
3145
+ readonly writable: true;
3146
+ readonly internal: true;
3147
+ };
3148
+ readonly targetPreset: {
3149
+ readonly type: "string";
3150
+ readonly writable: true;
3151
+ };
3152
+ readonly relativeMove: {
3153
+ readonly type: "object";
3154
+ readonly writable: true;
3155
+ readonly internal: true;
3156
+ };
3157
+ readonly home: {
3158
+ readonly type: "boolean";
3159
+ readonly writable: true;
3160
+ readonly internal: true;
3161
+ };
3162
+ };
2951
3163
  readonly semantics: null;
2952
3164
  };
2953
3165
 
@@ -3053,7 +3265,28 @@ declare const securitySystemMeta: {
3053
3265
  readonly assignmentKey: "securitySystem";
3054
3266
  readonly multiProvider: true;
3055
3267
  readonly isDetectionType: false;
3056
- readonly properties: SecuritySystemProperty[];
3268
+ readonly properties: {
3269
+ readonly currentState: {
3270
+ readonly type: "enum";
3271
+ readonly values: {
3272
+ readonly stay_arm: SecuritySystemState.StayArm;
3273
+ readonly away_arm: SecuritySystemState.AwayArm;
3274
+ readonly night_arm: SecuritySystemState.NightArm;
3275
+ readonly disarmed: SecuritySystemState.Disarmed;
3276
+ readonly alarm_triggered: SecuritySystemState.AlarmTriggered;
3277
+ };
3278
+ };
3279
+ readonly targetState: {
3280
+ readonly type: "enum";
3281
+ readonly values: {
3282
+ readonly stay_arm: SecuritySystemState.StayArm;
3283
+ readonly away_arm: SecuritySystemState.AwayArm;
3284
+ readonly night_arm: SecuritySystemState.NightArm;
3285
+ readonly disarmed: SecuritySystemState.Disarmed;
3286
+ };
3287
+ readonly writable: true;
3288
+ };
3289
+ };
3057
3290
  readonly shortcutable: true;
3058
3291
  readonly cascadeTrigger: {
3059
3292
  readonly property: SecuritySystemProperty.CurrentState;
@@ -3178,7 +3411,19 @@ declare const sirenMeta: {
3178
3411
  readonly assignmentKey: "siren";
3179
3412
  readonly multiProvider: true;
3180
3413
  readonly isDetectionType: false;
3181
- readonly properties: SirenProperty[];
3414
+ readonly properties: {
3415
+ readonly active: {
3416
+ readonly type: "boolean";
3417
+ readonly writable: true;
3418
+ };
3419
+ readonly volume: {
3420
+ readonly type: "number";
3421
+ readonly min: 0;
3422
+ readonly max: 100;
3423
+ readonly unit: "%";
3424
+ readonly writable: true;
3425
+ };
3426
+ };
3182
3427
  readonly shortcutable: true;
3183
3428
  readonly cascadeTrigger: {
3184
3429
  readonly property: SirenProperty.Active;
@@ -3265,7 +3510,12 @@ declare const smokeMeta: {
3265
3510
  readonly assignmentKey: "smoke";
3266
3511
  readonly multiProvider: true;
3267
3512
  readonly isDetectionType: false;
3268
- readonly properties: SmokeProperty.Detected[];
3513
+ readonly properties: {
3514
+ readonly detected: {
3515
+ readonly type: "boolean";
3516
+ readonly writable: true;
3517
+ };
3518
+ };
3269
3519
  readonly shortcutable: true;
3270
3520
  readonly cascadeTrigger: {
3271
3521
  readonly property: SmokeProperty;
@@ -3360,7 +3610,12 @@ declare const switchMeta: {
3360
3610
  readonly assignmentKey: "switch";
3361
3611
  readonly multiProvider: true;
3362
3612
  readonly isDetectionType: false;
3363
- readonly properties: SwitchProperty.On[];
3613
+ readonly properties: {
3614
+ readonly on: {
3615
+ readonly type: "boolean";
3616
+ readonly writable: true;
3617
+ };
3618
+ };
3364
3619
  readonly shortcutable: true;
3365
3620
  readonly cascadeTrigger: {
3366
3621
  readonly property: SwitchProperty;
@@ -3840,7 +4095,13 @@ declare const temperatureMeta: {
3840
4095
  readonly assignmentKey: "temperature";
3841
4096
  readonly multiProvider: true;
3842
4097
  readonly isDetectionType: false;
3843
- readonly properties: TemperatureProperty.Current[];
4098
+ readonly properties: {
4099
+ readonly current: {
4100
+ readonly type: "number";
4101
+ readonly unit: "°C";
4102
+ readonly writable: true;
4103
+ };
4104
+ };
3844
4105
  readonly shortcutable: true;
3845
4106
  readonly virtual: {
3846
4107
  readonly properties: {
@@ -3856,150 +4117,6 @@ declare const temperatureMeta: {
3856
4117
  };
3857
4118
  };
3858
4119
 
3859
- /**
3860
- * Property names of a classifier sensor.
3861
- *
3862
- * @internal
3863
- */
3864
- declare enum ClassifierProperty {
3865
- /** Whether any classification result is active. */
3866
- Detected = "detected",
3867
- /** List of classification results with labels and confidence. */
3868
- Detections = "detections",
3869
- /** Unique labels of the current detections (auto-derived when reporting detections). */
3870
- Labels = "labels"
3871
- }
3872
- /** A classifier detection result with an open attribute for classifier categories. */
3873
- interface ClassifierDetection extends Detection {
3874
- /** Classifier category (e.g. `'bird'`, `'delivery'`). Open string for any classifier. */
3875
- attribute: string;
3876
- /** Classifier sub-category (e.g. `'woodpecker'`, `'amazon'`). */
3877
- subAttribute: string;
3878
- }
3879
- /**
3880
- * Property shape carried by a {@link ClassifierSensor}.
3881
- *
3882
- * @internal
3883
- */
3884
- interface ClassifierSensorProperties {
3885
- [ClassifierProperty.Detected]: boolean;
3886
- [ClassifierProperty.Detections]: ClassifierDetection[];
3887
- [ClassifierProperty.Labels]: string[];
3888
- }
3889
- /** Read-only proxy interface for a classifier sensor. */
3890
- interface ClassifierSensorLike extends SensorLike {
3891
- /** Sensor type discriminant. */
3892
- readonly type: SensorType.Classifier;
3893
- /** Property change observable narrowed to classifier properties. */
3894
- readonly onPropertyChanged: Observable<PropertyChangeOf<ClassifierSensorProperties>>;
3895
- getValue(property: ClassifierProperty.Detected): boolean | undefined;
3896
- getValue(property: ClassifierProperty.Detections): ClassifierDetection[] | undefined;
3897
- getValue(property: ClassifierProperty.Labels): string[] | undefined;
3898
- getValue(property: string): unknown;
3899
- }
3900
- /**
3901
- * General-purpose image classifier sensor.
3902
- *
3903
- * Plugin authors call `reportDetections(list)` to push classification results.
3904
- * `detected` and `labels` are auto-derived from the detection list.
3905
- */
3906
- declare class ClassifierSensor<TStorage extends object = Record<string, any>> extends Sensor<ClassifierSensorProperties, TStorage> {
3907
- readonly type = SensorType.Classifier;
3908
- readonly category = SensorCategory.Sensor;
3909
- _requiresFrames: boolean;
3910
- constructor(name?: string);
3911
- /** Whether any classification result is active. */
3912
- get detected(): boolean;
3913
- /** Current detection list. */
3914
- get detections(): ClassifierDetection[];
3915
- /** Unique labels of the current detections. */
3916
- get labels(): string[];
3917
- /**
3918
- * Report classification results. Auto-derives `detected` and `labels` from the list.
3919
- *
3920
- * - `reportDetections(true)` — generic classification trigger. The SDK
3921
- * synthesizes a single full-frame detection with empty attribute/subAttribute.
3922
- * - `reportDetections(true, [...])` — explicit classifier detections.
3923
- * - `reportDetections(false)` — clear.
3924
- *
3925
- * @param detected - Whether any classification result is active.
3926
- *
3927
- * @param detections - Optional explicit classifier detections to publish.
3928
- *
3929
- * @example
3930
- * ```ts
3931
- * import type { ClassifierDetection } from '@camera.ui/sdk';
3932
- * sensor.reportDetections(true, [
3933
- * {
3934
- * label: 'animal',
3935
- * confidence: 0.88,
3936
- * box: { x: 0.1, y: 0.2, width: 0.3, height: 0.4 },
3937
- * attribute: 'bird',
3938
- * subAttribute: 'woodpecker',
3939
- * } satisfies ClassifierDetection,
3940
- * ]);
3941
- * sensor.reportDetections(false);
3942
- * ```
3943
- */
3944
- reportDetections(detected: boolean, detections?: ClassifierDetection[]): void;
3945
- /**
3946
- * Explicitly clear classifier state (detected = false, detections = [], labels = []).
3947
- *
3948
- * @example
3949
- * ```ts
3950
- * sensor.clearDetections();
3951
- * ```
3952
- */
3953
- clearDetections(): void;
3954
- /**
3955
- * Read-only sensor: external writes are ignored. State is reported via `reportDetections`.
3956
- *
3957
- * Called by the cross-process plugin host when a generic property write is received.
3958
- * Classifier sensors have no externally writable properties, so the parameters are
3959
- * unused (underscore-prefixed) and the call is a no-op.
3960
- *
3961
- * @param _property - Unused — classifier sensors expose no writable properties.
3962
- *
3963
- * @param _value - Unused — classifier sensors expose no writable properties.
3964
- *
3965
- * @internal
3966
- */
3967
- updateValue(_property: string, _value: unknown): void;
3968
- }
3969
- /** Return type for {@link ClassifierDetectorSensor.detectClassifications}. */
3970
- interface ClassifierResult {
3971
- /** Whether any classification result is emitted for this frame. */
3972
- detected: boolean;
3973
- /** Detections emitted for this frame. */
3974
- detections: ClassifierDetection[];
3975
- }
3976
- /**
3977
- * Classifier detector that receives video frames from the backend pipeline.
3978
- * Extend this class and implement {@link detectClassifications} to run image
3979
- * classification models against trigger regions.
3980
- */
3981
- declare abstract class ClassifierDetectorSensor<TStorage extends object = Record<string, any>> extends ClassifierSensor<TStorage> {
3982
- _requiresFrames: boolean;
3983
- /** Declares the expected input dimensions and trigger labels. The backend scales frames to match. */
3984
- abstract get modelSpec(): ModelSpec;
3985
- /**
3986
- * Classify frames in batch. Each frame is a pre-cropped, pre-scaled
3987
- * trigger region produced by the upstream object detector. Must return
3988
- * exactly one ClassifierResult per input frame, in the same order.
3989
- */
3990
- abstract detectClassifications(frames: VideoFrameData[]): Promise<ClassifierResult[]>;
3991
- }
3992
- /** Registry metadata for {@link ClassifierSensor}. */
3993
- declare const classifierMeta: {
3994
- readonly type: SensorType.Classifier;
3995
- readonly category: SensorCategory.Sensor;
3996
- readonly assignmentKey: "classifier";
3997
- readonly multiProvider: true;
3998
- readonly isDetectionType: true;
3999
- readonly properties: ClassifierProperty[];
4000
- readonly semantics: null;
4001
- };
4002
-
4003
4120
  /** Every sensor's metadata. A new sensor type adds its meta here. */
4004
4121
  declare const SENSOR_META: readonly [{
4005
4122
  readonly type: SensorType.Audio;
@@ -4007,7 +4124,23 @@ declare const SENSOR_META: readonly [{
4007
4124
  readonly assignmentKey: "audio";
4008
4125
  readonly multiProvider: false;
4009
4126
  readonly isDetectionType: true;
4010
- readonly properties: AudioProperty[];
4127
+ readonly properties: {
4128
+ readonly detected: {
4129
+ readonly type: "boolean";
4130
+ };
4131
+ readonly detections: {
4132
+ readonly type: "object";
4133
+ readonly internal: true;
4134
+ };
4135
+ readonly decibels: {
4136
+ readonly type: "number";
4137
+ readonly unit: "dB";
4138
+ };
4139
+ readonly lastTriggered: {
4140
+ readonly type: "number";
4141
+ readonly internal: true;
4142
+ };
4143
+ };
4011
4144
  readonly semantics: null;
4012
4145
  }, {
4013
4146
  readonly type: SensorType.Battery;
@@ -4015,7 +4148,26 @@ declare const SENSOR_META: readonly [{
4015
4148
  readonly assignmentKey: "battery";
4016
4149
  readonly multiProvider: false;
4017
4150
  readonly isDetectionType: false;
4018
- readonly properties: BatteryProperty[];
4151
+ readonly properties: {
4152
+ readonly level: {
4153
+ readonly type: "number";
4154
+ readonly min: 0;
4155
+ readonly max: 100;
4156
+ readonly unit: "%";
4157
+ };
4158
+ readonly charging: {
4159
+ readonly type: "enum";
4160
+ readonly values: {
4161
+ readonly not_chargeable: ChargingState.NotChargeable;
4162
+ readonly not_charging: ChargingState.NotCharging;
4163
+ readonly charging: ChargingState.Charging;
4164
+ readonly full: ChargingState.Full;
4165
+ };
4166
+ };
4167
+ readonly low: {
4168
+ readonly type: "boolean";
4169
+ };
4170
+ };
4019
4171
  readonly shortcutable: true;
4020
4172
  readonly propertyCapabilities: {
4021
4173
  readonly charging: BatteryCapability.Charging;
@@ -4035,7 +4187,18 @@ declare const SENSOR_META: readonly [{
4035
4187
  readonly assignmentKey: "classifier";
4036
4188
  readonly multiProvider: true;
4037
4189
  readonly isDetectionType: true;
4038
- readonly properties: ClassifierProperty[];
4190
+ readonly properties: {
4191
+ readonly detected: {
4192
+ readonly type: "boolean";
4193
+ };
4194
+ readonly detections: {
4195
+ readonly type: "object";
4196
+ readonly internal: true;
4197
+ };
4198
+ readonly labels: {
4199
+ readonly type: "object";
4200
+ };
4201
+ };
4039
4202
  readonly semantics: null;
4040
4203
  }, {
4041
4204
  readonly type: SensorType.Clip;
@@ -4043,7 +4206,7 @@ declare const SENSOR_META: readonly [{
4043
4206
  readonly assignmentKey: "clip";
4044
4207
  readonly multiProvider: false;
4045
4208
  readonly isDetectionType: true;
4046
- readonly properties: readonly [];
4209
+ readonly properties: {};
4047
4210
  readonly semantics: null;
4048
4211
  }, {
4049
4212
  readonly type: SensorType.Contact;
@@ -4051,7 +4214,12 @@ declare const SENSOR_META: readonly [{
4051
4214
  readonly assignmentKey: "contact";
4052
4215
  readonly multiProvider: true;
4053
4216
  readonly isDetectionType: false;
4054
- readonly properties: ContactProperty.Detected[];
4217
+ readonly properties: {
4218
+ readonly detected: {
4219
+ readonly type: "boolean";
4220
+ readonly writable: true;
4221
+ };
4222
+ };
4055
4223
  readonly shortcutable: true;
4056
4224
  readonly cascadeTrigger: {
4057
4225
  readonly property: ContactProperty;
@@ -4075,7 +4243,12 @@ declare const SENSOR_META: readonly [{
4075
4243
  readonly assignmentKey: "doorbell";
4076
4244
  readonly multiProvider: true;
4077
4245
  readonly isDetectionType: false;
4078
- readonly properties: DoorbellProperty.Ring[];
4246
+ readonly properties: {
4247
+ readonly ring: {
4248
+ readonly type: "boolean";
4249
+ readonly writable: true;
4250
+ };
4251
+ };
4079
4252
  readonly shortcutable: true;
4080
4253
  readonly cascadeTrigger: {
4081
4254
  readonly property: DoorbellProperty;
@@ -4099,7 +4272,15 @@ declare const SENSOR_META: readonly [{
4099
4272
  readonly assignmentKey: "face";
4100
4273
  readonly multiProvider: false;
4101
4274
  readonly isDetectionType: true;
4102
- readonly properties: FaceProperty[];
4275
+ readonly properties: {
4276
+ readonly detected: {
4277
+ readonly type: "boolean";
4278
+ };
4279
+ readonly detections: {
4280
+ readonly type: "object";
4281
+ readonly internal: true;
4282
+ };
4283
+ };
4103
4284
  readonly semantics: null;
4104
4285
  }, {
4105
4286
  readonly type: SensorType.Garage;
@@ -4107,7 +4288,29 @@ declare const SENSOR_META: readonly [{
4107
4288
  readonly assignmentKey: "garage";
4108
4289
  readonly multiProvider: true;
4109
4290
  readonly isDetectionType: false;
4110
- readonly properties: GarageProperty[];
4291
+ readonly properties: {
4292
+ readonly currentState: {
4293
+ readonly type: "enum";
4294
+ readonly values: {
4295
+ readonly open: GarageState.Open;
4296
+ readonly closed: GarageState.Closed;
4297
+ readonly opening: GarageState.Opening;
4298
+ readonly closing: GarageState.Closing;
4299
+ readonly stopped: GarageState.Stopped;
4300
+ };
4301
+ };
4302
+ readonly targetState: {
4303
+ readonly type: "enum";
4304
+ readonly values: {
4305
+ readonly open: GarageState.Open;
4306
+ readonly closed: GarageState.Closed;
4307
+ };
4308
+ readonly writable: true;
4309
+ };
4310
+ readonly obstructionDetected: {
4311
+ readonly type: "boolean";
4312
+ };
4313
+ };
4111
4314
  readonly shortcutable: true;
4112
4315
  readonly cascadeTrigger: {
4113
4316
  readonly property: GarageProperty.CurrentState;
@@ -4139,7 +4342,15 @@ declare const SENSOR_META: readonly [{
4139
4342
  readonly assignmentKey: "humidity";
4140
4343
  readonly multiProvider: true;
4141
4344
  readonly isDetectionType: false;
4142
- readonly properties: HumidityProperty.Current[];
4345
+ readonly properties: {
4346
+ readonly current: {
4347
+ readonly type: "number";
4348
+ readonly min: 0;
4349
+ readonly max: 100;
4350
+ readonly unit: "%";
4351
+ readonly writable: true;
4352
+ };
4353
+ };
4143
4354
  readonly shortcutable: true;
4144
4355
  readonly virtual: {
4145
4356
  readonly properties: {
@@ -4159,7 +4370,12 @@ declare const SENSOR_META: readonly [{
4159
4370
  readonly assignmentKey: "leak";
4160
4371
  readonly multiProvider: true;
4161
4372
  readonly isDetectionType: false;
4162
- readonly properties: LeakProperty.Detected[];
4373
+ readonly properties: {
4374
+ readonly detected: {
4375
+ readonly type: "boolean";
4376
+ readonly writable: true;
4377
+ };
4378
+ };
4163
4379
  readonly shortcutable: true;
4164
4380
  readonly cascadeTrigger: {
4165
4381
  readonly property: LeakProperty;
@@ -4183,7 +4399,15 @@ declare const SENSOR_META: readonly [{
4183
4399
  readonly assignmentKey: "licensePlate";
4184
4400
  readonly multiProvider: false;
4185
4401
  readonly isDetectionType: true;
4186
- readonly properties: LicensePlateProperty[];
4402
+ readonly properties: {
4403
+ readonly detected: {
4404
+ readonly type: "boolean";
4405
+ };
4406
+ readonly detections: {
4407
+ readonly type: "object";
4408
+ readonly internal: true;
4409
+ };
4410
+ };
4187
4411
  readonly semantics: null;
4188
4412
  }, {
4189
4413
  readonly type: SensorType.Light;
@@ -4191,7 +4415,19 @@ declare const SENSOR_META: readonly [{
4191
4415
  readonly assignmentKey: "light";
4192
4416
  readonly multiProvider: true;
4193
4417
  readonly isDetectionType: false;
4194
- readonly properties: LightProperty[];
4418
+ readonly properties: {
4419
+ readonly on: {
4420
+ readonly type: "boolean";
4421
+ readonly writable: true;
4422
+ };
4423
+ readonly brightness: {
4424
+ readonly type: "number";
4425
+ readonly min: 0;
4426
+ readonly max: 100;
4427
+ readonly unit: "%";
4428
+ readonly writable: true;
4429
+ };
4430
+ };
4195
4431
  readonly shortcutable: true;
4196
4432
  readonly cascadeTrigger: {
4197
4433
  readonly property: LightProperty.On;
@@ -4219,7 +4455,24 @@ declare const SENSOR_META: readonly [{
4219
4455
  readonly assignmentKey: "lock";
4220
4456
  readonly multiProvider: true;
4221
4457
  readonly isDetectionType: false;
4222
- readonly properties: LockProperty[];
4458
+ readonly properties: {
4459
+ readonly currentState: {
4460
+ readonly type: "enum";
4461
+ readonly values: {
4462
+ readonly secured: LockState.Secured;
4463
+ readonly unsecured: LockState.Unsecured;
4464
+ readonly unknown: LockState.Unknown;
4465
+ };
4466
+ };
4467
+ readonly targetState: {
4468
+ readonly type: "enum";
4469
+ readonly values: {
4470
+ readonly secured: LockState.Secured;
4471
+ readonly unsecured: LockState.Unsecured;
4472
+ };
4473
+ readonly writable: true;
4474
+ };
4475
+ };
4223
4476
  readonly shortcutable: true;
4224
4477
  readonly cascadeTrigger: {
4225
4478
  readonly property: LockProperty.CurrentState;
@@ -4247,7 +4500,23 @@ declare const SENSOR_META: readonly [{
4247
4500
  readonly assignmentKey: "motion";
4248
4501
  readonly multiProvider: false;
4249
4502
  readonly isDetectionType: true;
4250
- readonly properties: MotionProperty[];
4503
+ readonly properties: {
4504
+ readonly detected: {
4505
+ readonly type: "boolean";
4506
+ };
4507
+ readonly detections: {
4508
+ readonly type: "object";
4509
+ readonly internal: true;
4510
+ };
4511
+ readonly blocked: {
4512
+ readonly type: "boolean";
4513
+ readonly internal: true;
4514
+ };
4515
+ readonly lastTriggered: {
4516
+ readonly type: "number";
4517
+ readonly internal: true;
4518
+ };
4519
+ };
4251
4520
  readonly semantics: null;
4252
4521
  }, {
4253
4522
  readonly type: SensorType.Object;
@@ -4255,7 +4524,18 @@ declare const SENSOR_META: readonly [{
4255
4524
  readonly assignmentKey: "object";
4256
4525
  readonly multiProvider: false;
4257
4526
  readonly isDetectionType: true;
4258
- readonly properties: ObjectProperty[];
4527
+ readonly properties: {
4528
+ readonly detected: {
4529
+ readonly type: "boolean";
4530
+ };
4531
+ readonly detections: {
4532
+ readonly type: "object";
4533
+ readonly internal: true;
4534
+ };
4535
+ readonly labels: {
4536
+ readonly type: "object";
4537
+ };
4538
+ };
4259
4539
  readonly semantics: null;
4260
4540
  }, {
4261
4541
  readonly type: SensorType.Occupancy;
@@ -4263,7 +4543,12 @@ declare const SENSOR_META: readonly [{
4263
4543
  readonly assignmentKey: "occupancy";
4264
4544
  readonly multiProvider: true;
4265
4545
  readonly isDetectionType: false;
4266
- readonly properties: OccupancyProperty.Detected[];
4546
+ readonly properties: {
4547
+ readonly detected: {
4548
+ readonly type: "boolean";
4549
+ readonly writable: true;
4550
+ };
4551
+ };
4267
4552
  readonly shortcutable: true;
4268
4553
  readonly cascadeTrigger: {
4269
4554
  readonly property: OccupancyProperty;
@@ -4287,7 +4572,38 @@ declare const SENSOR_META: readonly [{
4287
4572
  readonly assignmentKey: "ptz";
4288
4573
  readonly multiProvider: false;
4289
4574
  readonly isDetectionType: false;
4290
- readonly properties: PTZProperty[];
4575
+ readonly properties: {
4576
+ readonly position: {
4577
+ readonly type: "object";
4578
+ readonly writable: true;
4579
+ readonly keys: readonly ["pan", "tilt", "zoom"];
4580
+ };
4581
+ readonly moving: {
4582
+ readonly type: "boolean";
4583
+ };
4584
+ readonly presets: {
4585
+ readonly type: "object";
4586
+ };
4587
+ readonly velocity: {
4588
+ readonly type: "object";
4589
+ readonly writable: true;
4590
+ readonly internal: true;
4591
+ };
4592
+ readonly targetPreset: {
4593
+ readonly type: "string";
4594
+ readonly writable: true;
4595
+ };
4596
+ readonly relativeMove: {
4597
+ readonly type: "object";
4598
+ readonly writable: true;
4599
+ readonly internal: true;
4600
+ };
4601
+ readonly home: {
4602
+ readonly type: "boolean";
4603
+ readonly writable: true;
4604
+ readonly internal: true;
4605
+ };
4606
+ };
4291
4607
  readonly semantics: null;
4292
4608
  }, {
4293
4609
  readonly type: SensorType.SecuritySystem;
@@ -4295,7 +4611,28 @@ declare const SENSOR_META: readonly [{
4295
4611
  readonly assignmentKey: "securitySystem";
4296
4612
  readonly multiProvider: true;
4297
4613
  readonly isDetectionType: false;
4298
- readonly properties: SecuritySystemProperty[];
4614
+ readonly properties: {
4615
+ readonly currentState: {
4616
+ readonly type: "enum";
4617
+ readonly values: {
4618
+ readonly stay_arm: SecuritySystemState.StayArm;
4619
+ readonly away_arm: SecuritySystemState.AwayArm;
4620
+ readonly night_arm: SecuritySystemState.NightArm;
4621
+ readonly disarmed: SecuritySystemState.Disarmed;
4622
+ readonly alarm_triggered: SecuritySystemState.AlarmTriggered;
4623
+ };
4624
+ };
4625
+ readonly targetState: {
4626
+ readonly type: "enum";
4627
+ readonly values: {
4628
+ readonly stay_arm: SecuritySystemState.StayArm;
4629
+ readonly away_arm: SecuritySystemState.AwayArm;
4630
+ readonly night_arm: SecuritySystemState.NightArm;
4631
+ readonly disarmed: SecuritySystemState.Disarmed;
4632
+ };
4633
+ readonly writable: true;
4634
+ };
4635
+ };
4299
4636
  readonly shortcutable: true;
4300
4637
  readonly cascadeTrigger: {
4301
4638
  readonly property: SecuritySystemProperty.CurrentState;
@@ -4326,7 +4663,19 @@ declare const SENSOR_META: readonly [{
4326
4663
  readonly assignmentKey: "siren";
4327
4664
  readonly multiProvider: true;
4328
4665
  readonly isDetectionType: false;
4329
- readonly properties: SirenProperty[];
4666
+ readonly properties: {
4667
+ readonly active: {
4668
+ readonly type: "boolean";
4669
+ readonly writable: true;
4670
+ };
4671
+ readonly volume: {
4672
+ readonly type: "number";
4673
+ readonly min: 0;
4674
+ readonly max: 100;
4675
+ readonly unit: "%";
4676
+ readonly writable: true;
4677
+ };
4678
+ };
4330
4679
  readonly shortcutable: true;
4331
4680
  readonly cascadeTrigger: {
4332
4681
  readonly property: SirenProperty.Active;
@@ -4354,7 +4703,12 @@ declare const SENSOR_META: readonly [{
4354
4703
  readonly assignmentKey: "smoke";
4355
4704
  readonly multiProvider: true;
4356
4705
  readonly isDetectionType: false;
4357
- readonly properties: SmokeProperty.Detected[];
4706
+ readonly properties: {
4707
+ readonly detected: {
4708
+ readonly type: "boolean";
4709
+ readonly writable: true;
4710
+ };
4711
+ };
4358
4712
  readonly shortcutable: true;
4359
4713
  readonly cascadeTrigger: {
4360
4714
  readonly property: SmokeProperty;
@@ -4378,7 +4732,12 @@ declare const SENSOR_META: readonly [{
4378
4732
  readonly assignmentKey: "switch";
4379
4733
  readonly multiProvider: true;
4380
4734
  readonly isDetectionType: false;
4381
- readonly properties: SwitchProperty.On[];
4735
+ readonly properties: {
4736
+ readonly on: {
4737
+ readonly type: "boolean";
4738
+ readonly writable: true;
4739
+ };
4740
+ };
4382
4741
  readonly shortcutable: true;
4383
4742
  readonly cascadeTrigger: {
4384
4743
  readonly property: SwitchProperty;
@@ -4401,7 +4760,13 @@ declare const SENSOR_META: readonly [{
4401
4760
  readonly assignmentKey: "temperature";
4402
4761
  readonly multiProvider: true;
4403
4762
  readonly isDetectionType: false;
4404
- readonly properties: TemperatureProperty.Current[];
4763
+ readonly properties: {
4764
+ readonly current: {
4765
+ readonly type: "number";
4766
+ readonly unit: "°C";
4767
+ readonly writable: true;
4768
+ };
4769
+ };
4405
4770
  readonly shortcutable: true;
4406
4771
  readonly virtual: {
4407
4772
  readonly properties: {
@@ -4519,6 +4884,22 @@ interface AudioDetectionSettings {
4519
4884
  /** Audio dwell time in seconds */
4520
4885
  timeout: number;
4521
4886
  }
4887
+ /**
4888
+ * Face detection settings.
4889
+ */
4890
+ interface FaceDetectionSettings {
4891
+ /** Minimum confidence threshold (0 - 1) for a face to count. */
4892
+ confidence?: number;
4893
+ }
4894
+ /**
4895
+ * License plate detection settings.
4896
+ */
4897
+ interface LicensePlateDetectionSettings {
4898
+ /** Minimum text recognition confidence (0 - 1) for a plate read to count. */
4899
+ confidence?: number;
4900
+ /** Minimum plate text length, shorter reads are dropped as fragments. */
4901
+ minLength?: number;
4902
+ }
4522
4903
  /**
4523
4904
  * PTZ autotracking settings — automatically follow detected objects.
4524
4905
  */
@@ -4566,6 +4947,10 @@ interface CameraDetectionSettings {
4566
4947
  object: ObjectDetectionSettings;
4567
4948
  /** Audio detection settings */
4568
4949
  audio: AudioDetectionSettings;
4950
+ /** Face detection settings */
4951
+ face?: FaceDetectionSettings;
4952
+ /** License plate detection settings */
4953
+ licensePlate?: LicensePlateDetectionSettings;
4569
4954
  /** Sensor trigger settings */
4570
4955
  sensor: SensorTriggerSettings;
4571
4956
  /** Whether the detection cascade is enabled */
@@ -5773,6 +6158,161 @@ interface PluginInfo {
5773
6158
  contract: PluginContract;
5774
6159
  }
5775
6160
 
6161
+ /**
6162
+ * Property names of a classifier sensor.
6163
+ *
6164
+ * @internal
6165
+ */
6166
+ declare enum ClassifierProperty {
6167
+ /** Whether any classification result is active. */
6168
+ Detected = "detected",
6169
+ /** List of classification results with labels and confidence. */
6170
+ Detections = "detections",
6171
+ /** Unique labels of the current detections (auto-derived when reporting detections). */
6172
+ Labels = "labels"
6173
+ }
6174
+ /** A classifier detection result with an open attribute for classifier categories. */
6175
+ interface ClassifierDetection extends Detection {
6176
+ /** Classifier category (e.g. `'bird'`, `'delivery'`). Open string for any classifier. */
6177
+ attribute: string;
6178
+ /** Classifier sub-category (e.g. `'woodpecker'`, `'amazon'`). */
6179
+ subAttribute: string;
6180
+ }
6181
+ /**
6182
+ * Property shape carried by a {@link ClassifierSensor}.
6183
+ *
6184
+ * @internal
6185
+ */
6186
+ interface ClassifierSensorProperties {
6187
+ [ClassifierProperty.Detected]: boolean;
6188
+ [ClassifierProperty.Detections]: ClassifierDetection[];
6189
+ [ClassifierProperty.Labels]: string[];
6190
+ }
6191
+ /** Read-only proxy interface for a classifier sensor. */
6192
+ interface ClassifierSensorLike extends SensorLike {
6193
+ /** Sensor type discriminant. */
6194
+ readonly type: SensorType.Classifier;
6195
+ /** Property change observable narrowed to classifier properties. */
6196
+ readonly onPropertyChanged: Observable<PropertyChangeOf<ClassifierSensorProperties>>;
6197
+ getValue(property: ClassifierProperty.Detected): boolean | undefined;
6198
+ getValue(property: ClassifierProperty.Detections): ClassifierDetection[] | undefined;
6199
+ getValue(property: ClassifierProperty.Labels): string[] | undefined;
6200
+ getValue(property: string): unknown;
6201
+ }
6202
+ /**
6203
+ * General-purpose image classifier sensor.
6204
+ *
6205
+ * Plugin authors call `reportDetections(list)` to push classification results.
6206
+ * `detected` and `labels` are auto-derived from the detection list.
6207
+ */
6208
+ declare class ClassifierSensor<TStorage extends object = Record<string, any>> extends Sensor<ClassifierSensorProperties, TStorage> {
6209
+ readonly type = SensorType.Classifier;
6210
+ readonly category = SensorCategory.Sensor;
6211
+ _requiresFrames: boolean;
6212
+ constructor(name?: string);
6213
+ /** Whether any classification result is active. */
6214
+ get detected(): boolean;
6215
+ /** Current detection list. */
6216
+ get detections(): ClassifierDetection[];
6217
+ /** Unique labels of the current detections. */
6218
+ get labels(): string[];
6219
+ /**
6220
+ * Report classification results. Auto-derives `detected` and `labels` from the list.
6221
+ *
6222
+ * - `reportDetections(true)` — generic classification trigger. The SDK
6223
+ * synthesizes a single full-frame detection with empty attribute/subAttribute.
6224
+ * - `reportDetections(true, [...])` — explicit classifier detections.
6225
+ * - `reportDetections(false)` — clear.
6226
+ *
6227
+ * @param detected - Whether any classification result is active.
6228
+ *
6229
+ * @param detections - Optional explicit classifier detections to publish.
6230
+ *
6231
+ * @example
6232
+ * ```ts
6233
+ * import type { ClassifierDetection } from '@camera.ui/sdk';
6234
+ * sensor.reportDetections(true, [
6235
+ * {
6236
+ * label: 'animal',
6237
+ * confidence: 0.88,
6238
+ * box: { x: 0.1, y: 0.2, width: 0.3, height: 0.4 },
6239
+ * attribute: 'bird',
6240
+ * subAttribute: 'woodpecker',
6241
+ * } satisfies ClassifierDetection,
6242
+ * ]);
6243
+ * sensor.reportDetections(false);
6244
+ * ```
6245
+ */
6246
+ reportDetections(detected: boolean, detections?: ClassifierDetection[]): void;
6247
+ /**
6248
+ * Explicitly clear classifier state (detected = false, detections = [], labels = []).
6249
+ *
6250
+ * @example
6251
+ * ```ts
6252
+ * sensor.clearDetections();
6253
+ * ```
6254
+ */
6255
+ clearDetections(): void;
6256
+ /**
6257
+ * Read-only sensor: external writes are ignored. State is reported via `reportDetections`.
6258
+ *
6259
+ * Called by the cross-process plugin host when a generic property write is received.
6260
+ * Classifier sensors have no externally writable properties, so the parameters are
6261
+ * unused (underscore-prefixed) and the call is a no-op.
6262
+ *
6263
+ * @param _property - Unused — classifier sensors expose no writable properties.
6264
+ *
6265
+ * @param _value - Unused — classifier sensors expose no writable properties.
6266
+ *
6267
+ * @internal
6268
+ */
6269
+ updateValue(_property: string, _value: unknown): void;
6270
+ }
6271
+ /** Return type for {@link ClassifierDetectorSensor.detectClassifications}. */
6272
+ interface ClassifierResult {
6273
+ /** Whether any classification result is emitted for this frame. */
6274
+ detected: boolean;
6275
+ /** Detections emitted for this frame. */
6276
+ detections: ClassifierDetection[];
6277
+ }
6278
+ /**
6279
+ * Classifier detector that receives video frames from the backend pipeline.
6280
+ * Extend this class and implement {@link detectClassifications} to run image
6281
+ * classification models against trigger regions.
6282
+ */
6283
+ declare abstract class ClassifierDetectorSensor<TStorage extends object = Record<string, any>> extends ClassifierSensor<TStorage> {
6284
+ _requiresFrames: boolean;
6285
+ /** Declares the expected input dimensions and trigger labels. The backend scales frames to match. */
6286
+ abstract get modelSpec(): ModelSpec;
6287
+ /**
6288
+ * Classify frames in batch. Each frame is a pre-cropped, pre-scaled
6289
+ * trigger region produced by the upstream object detector. Must return
6290
+ * exactly one ClassifierResult per input frame, in the same order.
6291
+ */
6292
+ abstract detectClassifications(frames: VideoFrameData[]): Promise<ClassifierResult[]>;
6293
+ }
6294
+ /** Registry metadata for {@link ClassifierSensor}. */
6295
+ declare const classifierMeta: {
6296
+ readonly type: SensorType.Classifier;
6297
+ readonly category: SensorCategory.Sensor;
6298
+ readonly assignmentKey: "classifier";
6299
+ readonly multiProvider: true;
6300
+ readonly isDetectionType: true;
6301
+ readonly properties: {
6302
+ readonly detected: {
6303
+ readonly type: "boolean";
6304
+ };
6305
+ readonly detections: {
6306
+ readonly type: "object";
6307
+ readonly internal: true;
6308
+ };
6309
+ readonly labels: {
6310
+ readonly type: "object";
6311
+ };
6312
+ };
6313
+ readonly semantics: null;
6314
+ };
6315
+
5776
6316
  /** A CLIP embedding result for a detected region. */
5777
6317
  interface ClipEmbedding {
5778
6318
  /** Detection label this embedding was computed for (e.g. `'person'`, `'vehicle'`). */
@@ -5830,7 +6370,7 @@ declare const clipMeta: {
5830
6370
  readonly assignmentKey: "clip";
5831
6371
  readonly multiProvider: false;
5832
6372
  readonly isDetectionType: true;
5833
- readonly properties: readonly [];
6373
+ readonly properties: {};
5834
6374
  readonly semantics: null;
5835
6375
  };
5836
6376
 
@@ -6816,4 +7356,4 @@ interface OAuthClientCredentialsCapable extends OAuthCapable {
6816
7356
  }
6817
7357
 
6818
7358
  export { API_EVENT, AudioDetectorSensor, AudioProperty, AudioSensor, BASE_AUDIO_LABELS, BasePlugin, BatteryCapability, BatteryInfo, BatteryProperty, BehaviorSubject, ChargingState, ClassifierDetectorSensor, ClassifierProperty, ClassifierSensor, ClipDetectorSensor, ContactProperty, ContactSensor, DETECTION_ATTRIBUTES, DETECTION_LABELS, Disposable, DoorbellProperty, DoorbellTrigger, EVENT_TRIGGER_TYPES, FaceDetectorSensor, FaceProperty, FaceSensor, GarageControl, GarageProperty, GarageState, HumidityInfo, HumidityProperty, LeakProperty, LeakSensor, LicensePlateDetectorSensor, LicensePlateProperty, LicensePlateSensor, LightCapability, LightControl, LightProperty, LockControl, LockProperty, LockState, MotionDetectorSensor, MotionProperty, MotionSensor, OBJECT_DETECTION_LABELS, ObjectDetectorSensor, ObjectProperty, ObjectSensor, Observable, OccupancyProperty, OccupancySensor, PTZCapability, PTZControl, PTZProperty, PluginCapability, PluginInterface, PluginRole, RING_AUTO_RESET_MS, ReplaySubject, RtpPacket, SENSOR_META, SecuritySystem, SecuritySystemProperty, SecuritySystemState, Sensor, SensorCategory, SensorDomain, SensorType, Severity, SirenCapability, SirenControl, SirenProperty, SmokeProperty, SmokeSensor, Subject, SwitchControl, SwitchProperty, TemperatureInfo, TemperatureProperty, audioMeta, batteryMeta, canCreateCameras, canProvideSensorsToAnyCameras, classifierMeta, clipMeta, contactMeta, defineSensor, distinctUntilChanged, doorbellMeta, faceMeta, filter, firstValueFrom, garageMeta, getContractValidationErrors, hasCapability, hasInterface, humidityMeta, isHub, leakMeta, licensePlateMeta, lightMeta, lockMeta, map, mergeMap, motionMeta, objectMeta, occupancyMeta, pairwise, ptzMeta, securitySystemMeta, sensorMeta, share, sirenMeta, smokeMeta, switchMeta, temperatureMeta, validateContractConsistency };
6819
- export type { AssignedPlugin, AudioCodec, AudioCodecProperties, AudioDetectionInterface, AudioDetectionPluginResponse, AudioDetectionSettings, AudioFFmpegCodec, AudioFrameData, AudioInputSpec, AudioLabel, AudioMetadata, AudioModelSpec, AudioResult, AudioSensorLike, AudioSensorProperties, AudioStreamInfo, BaseAudioLabel, BaseCamera, BaseCameraConfig, BatteryInfoLike, BatteryInfoProperties, BoundingBox, Camera, CameraAspectRatio, CameraAspectRatioPreset, CameraConfig, CameraConfigInputSettings, CameraDetectionSettings, CameraDevice, CameraDeviceSource, CameraFrameWorkerSettings, CameraImplementation, CameraInformation, CameraInput, CameraPluginInfo, CameraRole, CameraSource, CameraType, CameraUiSettings, ClassifierDetection, ClassifierDetectionInterface, ClassifierDetectionPluginResponse, ClassifierResult, ClassifierSensorLike, ClassifierSensorProperties, ClipDetectionInterface, ClipDetectionPluginResponse, ClipEmbedding, ClipResult, ClipTextEmbeddingResult, ContactSensorLike, ContactSensorProperties, CoreManager, CoreManagerEvent, CreateDownloadOptions, CreateStreamDownloadOptions, Detection, DetectionAttribute, DetectionEvent, DetectionEventState, DetectionEventType, DetectionLabel, DetectionLine, DetectionZone, DeviceManager, DeviceStorage, DiscoveredCamera, DiscoveryProvider, DoorbellTriggerLike, DoorbellTriggerProperties, DownloadCleanup, DownloadManager, DownloadToken, EventAttribute, EventDescription, EventDetection, EventSegment, EventTrigger, EventTriggerType, FMTPInfo, FaceDetection, FaceDetectionInterface, FaceDetectionPluginResponse, FaceResult, FaceSensorLike, FaceSensorProperties, Fmp4Session, Fmp4SessionOptions, FormSubmitResponse, FormSubmitSchema, GarageControlLike, GarageControlProperties, Go2RtcRTSPSource, Go2RtcSnapshotSource, Go2RtcWSSource, HardwareAcceleration, HumidityInfoLike, HumidityInfoProperties, ImageMetadata, JsonArraySchema, JsonBaseSchema, JsonBaseSchemaWithoutCallbacks, JsonBooleanSchema, JsonEnumSchema, JsonFactorySchema, JsonNumberSchema, JsonSchema, JsonSchemaArray, JsonSchemaArrayWithoutCallbacks, JsonSchemaBoolean, JsonSchemaBooleanWithoutCallbacks, JsonSchemaButton, JsonSchemaEnum, JsonSchemaEnumWithoutCallbacks, JsonSchemaNumber, JsonSchemaNumberWithoutCallbacks, JsonSchemaString, JsonSchemaStringWithoutCallbacks, JsonSchemaSubmit, JsonSchemaType, JsonSchemaWithoutCallbacks, JsonSchemaWithoutKey, JsonStringSchema, LeakSensorLike, LeakSensorProperties, LicensePlateDetection, LicensePlateDetectionInterface, LicensePlateDetectionPluginResponse, LicensePlateResult, LicensePlateSensorLike, LicensePlateSensorProperties, LightControlLike, LightControlProperties, LineDirection, LockControlLike, LockControlProperties, LoggerService, ModelSpec, MotionDetectionInterface, MotionDetectionPluginResponse, MotionDetectionSettings, MotionResolution, MotionResult, MotionSensorLike, MotionSensorProperties, Notification, NotificationManager, NotifierDevice, NotifierInterface, OAuthAuthCodeFlowCapable, OAuthCapable, OAuthClientCredentialsCapable, OAuthDeviceFlowCapable, OAuthMetadata, OAuthProviderConfig, OAuthProviderDeclaration, OAuthState, OAuthStatus, ObjectDetectionInterface, ObjectDetectionLabel, ObjectDetectionPluginResponse, ObjectDetectionSettings, ObjectModelSpec, ObjectResult, ObjectSensorLike, ObjectSensorProperties, OccupancySensorLike, OccupancySensorProperties, OperatorFn, PTZControlLike, PTZControlProperties, PTZDirection, PTZPosition, PTZRelativeMove, PluginAPI, PluginAssignments, PluginConfig, PluginContract, PluginInfo, PluginInterfaces, Point, ProbeAudioCodec, ProbeConfig, ProbeStream, PropertyChangeOf, PtzAutotrackSettings, PythonVersion, RTPInfo, RTSPAudioCodec, RTSPUrlOptions, RtpSession, RtpSessionBackchannelOptions, RtpSessionOptions, SchemaCondition, SchemaConditionOperator, SchemaConfig, SecuritySystemLike, SecuritySystemProperties, SensorAssignmentKey, SensorCapability, SensorCascadeTrigger, SensorLike, SensorMeta, SensorPropertyType, SensorSemantics, SensorTriggerRef, SensorTriggerSettings, SensorVirtualDefaults, SirenControlLike, SirenControlProperties, SmokeSensorLike, SmokeSensorProperties, SnapshotInterface, SnapshotSettings, SnapshotUrlOptions, StreamDirection, StreamUrls, StreamingInterface, StreamingRole, SwitchControlLike, SwitchControlProperties, TemperatureInfoLike, TemperatureInfoProperties, ToastMessage, TrackedDetection, VideoCodec, VideoCodecProperties, VideoFFmpegCodec, VideoFrameData, VideoInputSpec, VideoStreamInfo, VideoStreamingMode, ZoneFilter, ZoneType };
7359
+ export type { AssignedPlugin, AudioCodec, AudioCodecProperties, AudioDetectionInterface, AudioDetectionPluginResponse, AudioDetectionSettings, AudioFFmpegCodec, AudioFrameData, AudioInputSpec, AudioLabel, AudioMetadata, AudioModelSpec, AudioResult, AudioSensorLike, AudioSensorProperties, AudioStreamInfo, BaseAudioLabel, BaseCamera, BaseCameraConfig, BatteryInfoLike, BatteryInfoProperties, BoundingBox, Camera, CameraAspectRatio, CameraAspectRatioPreset, CameraConfig, CameraConfigInputSettings, CameraDetectionSettings, CameraDevice, CameraDeviceSource, CameraFrameWorkerSettings, CameraImplementation, CameraInformation, CameraInput, CameraPluginInfo, CameraRole, CameraSource, CameraType, CameraUiSettings, ClassifierDetection, ClassifierDetectionInterface, ClassifierDetectionPluginResponse, ClassifierResult, ClassifierSensorLike, ClassifierSensorProperties, ClipDetectionInterface, ClipDetectionPluginResponse, ClipEmbedding, ClipResult, ClipTextEmbeddingResult, ContactSensorLike, ContactSensorProperties, CoreManager, CoreManagerEvent, CreateDownloadOptions, CreateStreamDownloadOptions, Detection, DetectionAttribute, DetectionEvent, DetectionEventState, DetectionEventType, DetectionLabel, DetectionLine, DetectionZone, DeviceManager, DeviceStorage, DiscoveredCamera, DiscoveryProvider, DoorbellTriggerLike, DoorbellTriggerProperties, DownloadCleanup, DownloadManager, DownloadToken, EventAttribute, EventDescription, EventDetection, EventSegment, EventTrigger, EventTriggerType, FMTPInfo, FaceDetection, FaceDetectionInterface, FaceDetectionPluginResponse, FaceDetectionSettings, FaceResult, FaceSensorLike, FaceSensorProperties, Fmp4Session, Fmp4SessionOptions, FormSubmitResponse, FormSubmitSchema, GarageControlLike, GarageControlProperties, Go2RtcRTSPSource, Go2RtcSnapshotSource, Go2RtcWSSource, HardwareAcceleration, HumidityInfoLike, HumidityInfoProperties, ImageMetadata, JsonArraySchema, JsonBaseSchema, JsonBaseSchemaWithoutCallbacks, JsonBooleanSchema, JsonEnumSchema, JsonFactorySchema, JsonNumberSchema, JsonSchema, JsonSchemaArray, JsonSchemaArrayWithoutCallbacks, JsonSchemaBoolean, JsonSchemaBooleanWithoutCallbacks, JsonSchemaButton, JsonSchemaEnum, JsonSchemaEnumWithoutCallbacks, JsonSchemaNumber, JsonSchemaNumberWithoutCallbacks, JsonSchemaString, JsonSchemaStringWithoutCallbacks, JsonSchemaSubmit, JsonSchemaType, JsonSchemaWithoutCallbacks, JsonSchemaWithoutKey, JsonStringSchema, LeakSensorLike, LeakSensorProperties, LicensePlateDetection, LicensePlateDetectionInterface, LicensePlateDetectionPluginResponse, LicensePlateDetectionSettings, LicensePlateResult, LicensePlateSensorLike, LicensePlateSensorProperties, LightControlLike, LightControlProperties, LineDirection, LockControlLike, LockControlProperties, LoggerService, ModelSpec, MotionDetectionInterface, MotionDetectionPluginResponse, MotionDetectionSettings, MotionResolution, MotionResult, MotionSensorLike, MotionSensorProperties, Notification, NotificationManager, NotifierDevice, NotifierInterface, OAuthAuthCodeFlowCapable, OAuthCapable, OAuthClientCredentialsCapable, OAuthDeviceFlowCapable, OAuthMetadata, OAuthProviderConfig, OAuthProviderDeclaration, OAuthState, OAuthStatus, ObjectDetectionInterface, ObjectDetectionLabel, ObjectDetectionPluginResponse, ObjectDetectionSettings, ObjectModelSpec, ObjectResult, ObjectSensorLike, ObjectSensorProperties, OccupancySensorLike, OccupancySensorProperties, OperatorFn, PTZControlLike, PTZControlProperties, PTZDirection, PTZPosition, PTZRelativeMove, PluginAPI, PluginAssignments, PluginConfig, PluginContract, PluginInfo, PluginInterfaces, Point, ProbeAudioCodec, ProbeConfig, ProbeStream, PropertyChangeOf, PtzAutotrackSettings, PythonVersion, RTPInfo, RTSPAudioCodec, RTSPUrlOptions, RtpSession, RtpSessionBackchannelOptions, RtpSessionOptions, SchemaCondition, SchemaConditionOperator, SchemaConfig, SecuritySystemLike, SecuritySystemProperties, SensorAssignmentKey, SensorCapability, SensorCascadeTrigger, SensorLike, SensorMeta, SensorPropertySpec, SensorPropertyType, SensorPropertyValueType, SensorSemantics, SensorTriggerRef, SensorTriggerSettings, SensorVirtualDefaults, SirenControlLike, SirenControlProperties, SmokeSensorLike, SmokeSensorProperties, SnapshotInterface, SnapshotSettings, SnapshotUrlOptions, StreamDirection, StreamUrls, StreamingInterface, StreamingRole, SwitchControlLike, SwitchControlProperties, TemperatureInfoLike, TemperatureInfoProperties, ToastMessage, TrackedDetection, VideoCodec, VideoCodecProperties, VideoFFmpegCodec, VideoFrameData, VideoInputSpec, VideoStreamInfo, VideoStreamingMode, ZoneFilter, ZoneType };