@camera.ui/sdk 0.0.24 → 0.0.25

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
@@ -843,6 +843,10 @@ interface DeviceStorage<T extends Record<string, any> = Record<string, any>> {
843
843
  save(): Promise<void>;
844
844
  }
845
845
 
846
+ /** Object-detection labels the detector groups its classes into. */
847
+ declare const OBJECT_DETECTION_LABELS: readonly ["person", "vehicle", "animal", "package"];
848
+ /** Union of the object-detection label strings. */
849
+ type ObjectDetectionLabel = (typeof OBJECT_DETECTION_LABELS)[number];
846
850
  /** Built-in detection label types recognized across the system. */
847
851
  declare const DETECTION_LABELS: readonly ["motion", "person", "vehicle", "animal", "package", "audio"];
848
852
  /** Union of the built-in detection label strings. */
@@ -852,24 +856,24 @@ declare const DETECTION_ATTRIBUTES: readonly ["face", "license_plate"];
852
856
  /** Union of the built-in detection attribute strings. */
853
857
  type DetectionAttribute = (typeof DETECTION_ATTRIBUTES)[number];
854
858
  /**
855
- * Bounding box of a detection. All coordinates are normalized to 01
859
+ * Bounding box of a detection. All coordinates are normalized to 0-1
856
860
  * (fraction of frame dimensions), so they are independent of resolution.
857
861
  */
858
862
  interface BoundingBox {
859
- /** X coordinate of the top-left corner (01). */
863
+ /** X coordinate of the top-left corner (0-1). */
860
864
  x: number;
861
- /** Y coordinate of the top-left corner (01). */
865
+ /** Y coordinate of the top-left corner (0-1). */
862
866
  y: number;
863
- /** Width as a fraction of frame width (01). */
867
+ /** Width as a fraction of frame width (0-1). */
864
868
  width: number;
865
- /** Height as a fraction of frame height (01). */
869
+ /** Height as a fraction of frame height (0-1). */
866
870
  height: number;
867
871
  }
868
872
  /** A single detection result emitted by any detection sensor. */
869
873
  interface Detection {
870
874
  /** Detection label (e.g. `'person'`, `'vehicle'`). */
871
875
  label: DetectionLabel;
872
- /** Confidence score in the range 01. */
876
+ /** Confidence score in the range 0-1. */
873
877
  confidence: number;
874
878
  /** Bounding box in normalized coordinates. */
875
879
  box: BoundingBox;
@@ -1102,6 +1106,99 @@ declare abstract class AudioDetectorSensor<TStorage extends object = Record<stri
1102
1106
  /** Analyze a single audio frame for events. Called by the backend at the configured cadence. */
1103
1107
  abstract detectAudio(audio: AudioFrameData): Promise<AudioResult>;
1104
1108
  }
1109
+ /** Registry metadata for {@link AudioSensor}. */
1110
+ declare const audioMeta: {
1111
+ readonly type: SensorType.Audio;
1112
+ readonly category: SensorCategory.Sensor;
1113
+ readonly assignmentKey: "audio";
1114
+ readonly multiProvider: false;
1115
+ readonly isDetectionType: true;
1116
+ readonly properties: AudioProperty[];
1117
+ readonly semantics: null;
1118
+ };
1119
+
1120
+ /** Condition under which a sensor arms an automation cascade. */
1121
+ interface SensorCascadeTrigger {
1122
+ readonly property: string;
1123
+ readonly value: unknown;
1124
+ readonly sustained: boolean;
1125
+ }
1126
+ /** Initial property values and capabilities for a user-created virtual sensor. */
1127
+ interface SensorVirtualDefaults {
1128
+ readonly properties: Readonly<Record<string, unknown>>;
1129
+ readonly capabilities?: readonly string[];
1130
+ }
1131
+ /** The kind of thing a sensor is, used by consumers to pick how to render it. */
1132
+ declare enum SensorDomain {
1133
+ Binary = "binary",
1134
+ Measurement = "measurement",
1135
+ Switch = "switch",
1136
+ Light = "light",
1137
+ Siren = "siren",
1138
+ Lock = "lock",
1139
+ Cover = "cover",
1140
+ Alarm = "alarm"
1141
+ }
1142
+ /**
1143
+ * What a sensor means, independent of any transport: which property holds its
1144
+ * state, which takes commands, its unit and state mapping. Consumers (MQTT
1145
+ * discovery, the HA integration) render from this instead of their own switch.
1146
+ */
1147
+ interface SensorSemantics {
1148
+ readonly domain: SensorDomain;
1149
+ readonly stateProperty: string;
1150
+ readonly commandProperty: string;
1151
+ readonly deviceClass?: string;
1152
+ readonly unit?: string;
1153
+ readonly icon?: string;
1154
+ readonly diagnostic?: boolean;
1155
+ readonly states?: Readonly<Record<string, number>>;
1156
+ readonly brightness?: {
1157
+ readonly property: string;
1158
+ readonly scale: number;
1159
+ };
1160
+ }
1161
+ /**
1162
+ * Metadata for a sensor type, declared alongside its class via {@link defineSensor}.
1163
+ *
1164
+ * Collected into the sensor registry, from which plugin assignment keys and the
1165
+ * host's per-type tables derive, so each type is described once instead of in
1166
+ * several parallel tables that drift apart.
1167
+ */
1168
+ interface SensorMeta {
1169
+ readonly type: SensorType;
1170
+ readonly category: SensorCategory;
1171
+ readonly assignmentKey: string;
1172
+ readonly multiProvider: boolean;
1173
+ readonly isDetectionType: boolean;
1174
+ readonly properties: readonly string[];
1175
+ readonly shortcutable?: boolean;
1176
+ readonly cascadeTrigger?: SensorCascadeTrigger;
1177
+ readonly propertyCapabilities?: Readonly<Record<string, string>>;
1178
+ readonly virtual?: SensorVirtualDefaults;
1179
+ readonly semantics?: SensorSemantics | null;
1180
+ }
1181
+ /**
1182
+ * Declares the metadata for a sensor type: how it is assigned, scheduled, and
1183
+ * optionally created as a virtual sensor.
1184
+ *
1185
+ * @param meta - The sensor's metadata.
1186
+ *
1187
+ * @returns The same metadata, with `type` and `assignmentKey` preserved as literal
1188
+ * types so the registry can be checked for completeness and its keys derived.
1189
+ *
1190
+ * @example
1191
+ * ```ts
1192
+ * export const lightMeta = defineSensor({
1193
+ * type: SensorType.Light,
1194
+ * category: SensorCategory.Control,
1195
+ * assignmentKey: 'light',
1196
+ * multiProvider: true,
1197
+ * isDetectionType: false,
1198
+ * });
1199
+ * ```
1200
+ */
1201
+ declare function defineSensor<const M extends SensorMeta>(meta: M): M;
1105
1202
 
1106
1203
  /** Optional capabilities for battery info sensors */
1107
1204
  declare enum BatteryCapability {
@@ -1116,7 +1213,7 @@ declare enum BatteryCapability {
1116
1213
  * @internal
1117
1214
  */
1118
1215
  declare enum BatteryProperty {
1119
- /** Battery level percentage (0100) */
1216
+ /** Battery level percentage (0-100) */
1120
1217
  Level = "level",
1121
1218
  /** Current charging state */
1122
1219
  Charging = "charging",
@@ -1170,7 +1267,7 @@ declare class BatteryInfo<TStorage extends object = Record<string, any>> extends
1170
1267
  /**
1171
1268
  * Report a new battery level (percentage). Clamped to [0, 100].
1172
1269
  *
1173
- * @param value - Battery level percentage in the range 0100.
1270
+ * @param value - Battery level percentage in the range 0-100.
1174
1271
  *
1175
1272
  * @example
1176
1273
  * ```ts
@@ -1216,6 +1313,28 @@ declare class BatteryInfo<TStorage extends object = Record<string, any>> extends
1216
1313
  */
1217
1314
  updateValue(_property: string, _value: unknown): void;
1218
1315
  }
1316
+ /** Registry metadata for {@link BatteryInfo}. */
1317
+ declare const batteryMeta: {
1318
+ readonly type: SensorType.Battery;
1319
+ readonly category: SensorCategory.Info;
1320
+ readonly assignmentKey: "battery";
1321
+ readonly multiProvider: false;
1322
+ readonly isDetectionType: false;
1323
+ readonly properties: BatteryProperty[];
1324
+ readonly shortcutable: true;
1325
+ readonly propertyCapabilities: {
1326
+ readonly charging: BatteryCapability.Charging;
1327
+ readonly low: BatteryCapability.LowBattery;
1328
+ };
1329
+ readonly semantics: {
1330
+ readonly domain: SensorDomain.Measurement;
1331
+ readonly stateProperty: BatteryProperty.Level;
1332
+ readonly commandProperty: BatteryProperty.Level;
1333
+ readonly deviceClass: "battery";
1334
+ readonly unit: "%";
1335
+ readonly diagnostic: true;
1336
+ };
1337
+ };
1219
1338
 
1220
1339
  /**
1221
1340
  * Properties for contact sensors
@@ -1273,6 +1392,32 @@ declare class ContactSensor<TStorage extends object = Record<string, any>> exten
1273
1392
  */
1274
1393
  updateValue(_property: string, _value: unknown): void;
1275
1394
  }
1395
+ /** Registry metadata for {@link ContactSensor}. */
1396
+ declare const contactMeta: {
1397
+ readonly type: SensorType.Contact;
1398
+ readonly category: SensorCategory.Sensor;
1399
+ readonly assignmentKey: "contact";
1400
+ readonly multiProvider: true;
1401
+ readonly isDetectionType: false;
1402
+ readonly properties: ContactProperty.Detected[];
1403
+ readonly shortcutable: true;
1404
+ readonly cascadeTrigger: {
1405
+ readonly property: ContactProperty;
1406
+ readonly value: true;
1407
+ readonly sustained: true;
1408
+ };
1409
+ readonly virtual: {
1410
+ readonly properties: {
1411
+ readonly detected: false;
1412
+ };
1413
+ };
1414
+ readonly semantics: {
1415
+ readonly domain: SensorDomain.Binary;
1416
+ readonly stateProperty: ContactProperty;
1417
+ readonly commandProperty: ContactProperty;
1418
+ readonly deviceClass: "opening";
1419
+ };
1420
+ };
1276
1421
 
1277
1422
  /**
1278
1423
  * Properties for doorbell triggers
@@ -1340,6 +1485,32 @@ declare class DoorbellTrigger<TStorage extends object = Record<string, any>> ext
1340
1485
  updateValue(property: string, value: unknown): void;
1341
1486
  _cleanup(): void;
1342
1487
  }
1488
+ /** Registry metadata for {@link DoorbellTrigger}. */
1489
+ declare const doorbellMeta: {
1490
+ readonly type: SensorType.Doorbell;
1491
+ readonly category: SensorCategory.Trigger;
1492
+ readonly assignmentKey: "doorbell";
1493
+ readonly multiProvider: true;
1494
+ readonly isDetectionType: false;
1495
+ readonly properties: DoorbellProperty.Ring[];
1496
+ readonly shortcutable: true;
1497
+ readonly cascadeTrigger: {
1498
+ readonly property: DoorbellProperty;
1499
+ readonly value: true;
1500
+ readonly sustained: false;
1501
+ };
1502
+ readonly virtual: {
1503
+ readonly properties: {
1504
+ readonly ring: false;
1505
+ };
1506
+ };
1507
+ readonly semantics: {
1508
+ readonly domain: SensorDomain.Binary;
1509
+ readonly stateProperty: DoorbellProperty;
1510
+ readonly commandProperty: DoorbellProperty;
1511
+ readonly icon: "mdi:doorbell";
1512
+ };
1513
+ };
1343
1514
 
1344
1515
  /**
1345
1516
  * Property names of a face detection sensor.
@@ -1474,6 +1645,16 @@ declare abstract class FaceDetectorSensor<TStorage extends object = Record<strin
1474
1645
  */
1475
1646
  abstract detectFaces(frames: VideoFrameData[]): Promise<FaceResult[]>;
1476
1647
  }
1648
+ /** Registry metadata for {@link FaceSensor}. */
1649
+ declare const faceMeta: {
1650
+ readonly type: SensorType.Face;
1651
+ readonly category: SensorCategory.Sensor;
1652
+ readonly assignmentKey: "face";
1653
+ readonly multiProvider: false;
1654
+ readonly isDetectionType: true;
1655
+ readonly properties: FaceProperty[];
1656
+ readonly semantics: null;
1657
+ };
1477
1658
 
1478
1659
  /** Garage door states (HomeKit-compatible values) */
1479
1660
  declare enum GarageState {
@@ -1585,6 +1766,40 @@ declare class GarageControl<TStorage extends object = Record<string, any>> exten
1585
1766
  */
1586
1767
  updateValue(property: string, value: unknown): Promise<void>;
1587
1768
  }
1769
+ /** Registry metadata for {@link GarageControl}. */
1770
+ declare const garageMeta: {
1771
+ readonly type: SensorType.Garage;
1772
+ readonly category: SensorCategory.Control;
1773
+ readonly assignmentKey: "garage";
1774
+ readonly multiProvider: true;
1775
+ readonly isDetectionType: false;
1776
+ readonly properties: GarageProperty[];
1777
+ readonly shortcutable: true;
1778
+ readonly cascadeTrigger: {
1779
+ readonly property: GarageProperty.CurrentState;
1780
+ readonly value: 0;
1781
+ readonly sustained: true;
1782
+ };
1783
+ readonly virtual: {
1784
+ readonly properties: {
1785
+ readonly currentState: 1;
1786
+ readonly targetState: 1;
1787
+ };
1788
+ };
1789
+ readonly semantics: {
1790
+ readonly domain: SensorDomain.Cover;
1791
+ readonly stateProperty: GarageProperty.CurrentState;
1792
+ readonly commandProperty: GarageProperty.TargetState;
1793
+ readonly deviceClass: "garage";
1794
+ readonly states: {
1795
+ readonly open: GarageState.Open;
1796
+ readonly closed: GarageState.Closed;
1797
+ readonly opening: GarageState.Opening;
1798
+ readonly closing: GarageState.Closing;
1799
+ readonly stopped: GarageState.Stopped;
1800
+ };
1801
+ };
1802
+ };
1588
1803
 
1589
1804
  /**
1590
1805
  * Properties for humidity sensors
@@ -1592,7 +1807,7 @@ declare class GarageControl<TStorage extends object = Record<string, any>> exten
1592
1807
  * @internal
1593
1808
  */
1594
1809
  declare enum HumidityProperty {
1595
- /** Current relative humidity (0100%) */
1810
+ /** Current relative humidity (0-100%) */
1596
1811
  Current = "current"
1597
1812
  }
1598
1813
  /**
@@ -1619,7 +1834,7 @@ declare class HumidityInfo<TStorage extends object = Record<string, any>> extend
1619
1834
  /**
1620
1835
  * Report a new humidity reading. Clamped to [0, 100] %.
1621
1836
  *
1622
- * @param value - Relative humidity percentage in the range 0100.
1837
+ * @param value - Relative humidity percentage in the range 0-100.
1623
1838
  *
1624
1839
  * @example
1625
1840
  * ```ts
@@ -1642,6 +1857,28 @@ declare class HumidityInfo<TStorage extends object = Record<string, any>> extend
1642
1857
  */
1643
1858
  updateValue(_property: string, _value: unknown): void;
1644
1859
  }
1860
+ /** Registry metadata for {@link HumidityInfo}. */
1861
+ declare const humidityMeta: {
1862
+ readonly type: SensorType.Humidity;
1863
+ readonly category: SensorCategory.Info;
1864
+ readonly assignmentKey: "humidity";
1865
+ readonly multiProvider: true;
1866
+ readonly isDetectionType: false;
1867
+ readonly properties: HumidityProperty.Current[];
1868
+ readonly shortcutable: true;
1869
+ readonly virtual: {
1870
+ readonly properties: {
1871
+ readonly current: 50;
1872
+ };
1873
+ };
1874
+ readonly semantics: {
1875
+ readonly domain: SensorDomain.Measurement;
1876
+ readonly stateProperty: HumidityProperty;
1877
+ readonly commandProperty: HumidityProperty;
1878
+ readonly deviceClass: "humidity";
1879
+ readonly unit: "%";
1880
+ };
1881
+ };
1645
1882
 
1646
1883
  /**
1647
1884
  * Properties for leak sensors
@@ -1699,6 +1936,32 @@ declare class LeakSensor<TStorage extends object = Record<string, any>> extends
1699
1936
  */
1700
1937
  updateValue(_property: string, _value: unknown): void;
1701
1938
  }
1939
+ /** Registry metadata for {@link LeakSensor}. */
1940
+ declare const leakMeta: {
1941
+ readonly type: SensorType.Leak;
1942
+ readonly category: SensorCategory.Sensor;
1943
+ readonly assignmentKey: "leak";
1944
+ readonly multiProvider: true;
1945
+ readonly isDetectionType: false;
1946
+ readonly properties: LeakProperty.Detected[];
1947
+ readonly shortcutable: true;
1948
+ readonly cascadeTrigger: {
1949
+ readonly property: LeakProperty;
1950
+ readonly value: true;
1951
+ readonly sustained: true;
1952
+ };
1953
+ readonly virtual: {
1954
+ readonly properties: {
1955
+ readonly detected: false;
1956
+ };
1957
+ };
1958
+ readonly semantics: {
1959
+ readonly domain: SensorDomain.Binary;
1960
+ readonly stateProperty: LeakProperty;
1961
+ readonly commandProperty: LeakProperty;
1962
+ readonly deviceClass: "moisture";
1963
+ };
1964
+ };
1702
1965
 
1703
1966
  /**
1704
1967
  * Property names of a license plate detection sensor.
@@ -1826,10 +2089,20 @@ declare abstract class LicensePlateDetectorSensor<TStorage extends object = Reco
1826
2089
  */
1827
2090
  abstract detectLicensePlates(frames: VideoFrameData[]): Promise<LicensePlateResult[]>;
1828
2091
  }
2092
+ /** Registry metadata for {@link LicensePlateSensor}. */
2093
+ declare const licensePlateMeta: {
2094
+ readonly type: SensorType.LicensePlate;
2095
+ readonly category: SensorCategory.Sensor;
2096
+ readonly assignmentKey: "licensePlate";
2097
+ readonly multiProvider: false;
2098
+ readonly isDetectionType: true;
2099
+ readonly properties: LicensePlateProperty[];
2100
+ readonly semantics: null;
2101
+ };
1829
2102
 
1830
2103
  /** Optional capabilities for light controls */
1831
2104
  declare enum LightCapability {
1832
- /** Light supports brightness adjustment (0100) */
2105
+ /** Light supports brightness adjustment (0-100) */
1833
2106
  Brightness = "brightness"
1834
2107
  }
1835
2108
  /**
@@ -1840,7 +2113,7 @@ declare enum LightCapability {
1840
2113
  declare enum LightProperty {
1841
2114
  /** Whether the light is on */
1842
2115
  On = "on",
1843
- /** Brightness level (0100) */
2116
+ /** Brightness level (0-100) */
1844
2117
  Brightness = "brightness"
1845
2118
  }
1846
2119
  /**
@@ -1902,7 +2175,7 @@ declare class LightControl<TStorage extends object = Record<string, any>> extend
1902
2175
  * Set brightness. Override to drive hardware and call `await super.setBrightness(value)`
1903
2176
  * after the hardware call succeeds. The default implementation clamps the value to [0, 100].
1904
2177
  *
1905
- * @param value - Brightness level in the range 0100.
2178
+ * @param value - Brightness level in the range 0-100.
1906
2179
  *
1907
2180
  * @example
1908
2181
  * ```ts
@@ -1923,6 +2196,36 @@ declare class LightControl<TStorage extends object = Record<string, any>> extend
1923
2196
  */
1924
2197
  updateValue(property: string, value: unknown): Promise<void>;
1925
2198
  }
2199
+ /** Registry metadata for {@link LightControl}. */
2200
+ declare const lightMeta: {
2201
+ readonly type: SensorType.Light;
2202
+ readonly category: SensorCategory.Control;
2203
+ readonly assignmentKey: "light";
2204
+ readonly multiProvider: true;
2205
+ readonly isDetectionType: false;
2206
+ readonly properties: LightProperty[];
2207
+ readonly shortcutable: true;
2208
+ readonly cascadeTrigger: {
2209
+ readonly property: LightProperty.On;
2210
+ readonly value: true;
2211
+ readonly sustained: true;
2212
+ };
2213
+ readonly propertyCapabilities: {
2214
+ readonly brightness: LightCapability;
2215
+ };
2216
+ readonly virtual: {
2217
+ readonly properties: {
2218
+ readonly on: false;
2219
+ readonly brightness: 100;
2220
+ };
2221
+ readonly capabilities: readonly [LightCapability];
2222
+ };
2223
+ readonly semantics: {
2224
+ readonly domain: SensorDomain.Light;
2225
+ readonly stateProperty: LightProperty.On;
2226
+ readonly commandProperty: LightProperty.On;
2227
+ };
2228
+ };
1926
2229
 
1927
2230
  /** Lock states (HomeKit-compatible values) */
1928
2231
  declare enum LockState {
@@ -2015,6 +2318,36 @@ declare class LockControl<TStorage extends object = Record<string, any>> extends
2015
2318
  */
2016
2319
  updateValue(property: string, value: unknown): Promise<void>;
2017
2320
  }
2321
+ /** Registry metadata for {@link LockControl}. */
2322
+ declare const lockMeta: {
2323
+ readonly type: SensorType.Lock;
2324
+ readonly category: SensorCategory.Control;
2325
+ readonly assignmentKey: "lock";
2326
+ readonly multiProvider: true;
2327
+ readonly isDetectionType: false;
2328
+ readonly properties: LockProperty[];
2329
+ readonly shortcutable: true;
2330
+ readonly cascadeTrigger: {
2331
+ readonly property: LockProperty.CurrentState;
2332
+ readonly value: 1;
2333
+ readonly sustained: true;
2334
+ };
2335
+ readonly virtual: {
2336
+ readonly properties: {
2337
+ readonly currentState: 0;
2338
+ readonly targetState: 0;
2339
+ };
2340
+ };
2341
+ readonly semantics: {
2342
+ readonly domain: SensorDomain.Lock;
2343
+ readonly stateProperty: LockProperty.CurrentState;
2344
+ readonly commandProperty: LockProperty.TargetState;
2345
+ readonly states: {
2346
+ readonly locked: LockState.Secured;
2347
+ readonly unlocked: LockState.Unsecured;
2348
+ };
2349
+ };
2350
+ };
2018
2351
 
2019
2352
  /**
2020
2353
  * Property names of a motion sensor.
@@ -2139,6 +2472,16 @@ declare abstract class MotionDetectorSensor<TStorage extends object = Record<str
2139
2472
  /** Analyze a single video frame for motion. Called by the backend at the configured interval. */
2140
2473
  abstract detectMotion(frame: VideoFrameData): Promise<MotionResult>;
2141
2474
  }
2475
+ /** Registry metadata for {@link MotionSensor}. */
2476
+ declare const motionMeta: {
2477
+ readonly type: SensorType.Motion;
2478
+ readonly category: SensorCategory.Sensor;
2479
+ readonly assignmentKey: "motion";
2480
+ readonly multiProvider: false;
2481
+ readonly isDetectionType: true;
2482
+ readonly properties: MotionProperty[];
2483
+ readonly semantics: null;
2484
+ };
2142
2485
 
2143
2486
  /**
2144
2487
  * Property names of an object detection sensor.
@@ -2282,6 +2625,16 @@ declare abstract class ObjectDetectorSensor<TStorage extends object = Record<str
2282
2625
  /** Analyze a single video frame for objects. Called by the backend at the configured interval. */
2283
2626
  abstract detectObjects(frame: VideoFrameData): Promise<ObjectResult>;
2284
2627
  }
2628
+ /** Registry metadata for {@link ObjectSensor}. */
2629
+ declare const objectMeta: {
2630
+ readonly type: SensorType.Object;
2631
+ readonly category: SensorCategory.Sensor;
2632
+ readonly assignmentKey: "object";
2633
+ readonly multiProvider: false;
2634
+ readonly isDetectionType: true;
2635
+ readonly properties: ObjectProperty[];
2636
+ readonly semantics: null;
2637
+ };
2285
2638
 
2286
2639
  /**
2287
2640
  * Properties for occupancy sensors
@@ -2339,11 +2692,40 @@ declare class OccupancySensor<TStorage extends object = Record<string, any>> ext
2339
2692
  */
2340
2693
  updateValue(_property: string, _value: unknown): void;
2341
2694
  }
2695
+ /** Registry metadata for {@link OccupancySensor}. */
2696
+ declare const occupancyMeta: {
2697
+ readonly type: SensorType.Occupancy;
2698
+ readonly category: SensorCategory.Sensor;
2699
+ readonly assignmentKey: "occupancy";
2700
+ readonly multiProvider: true;
2701
+ readonly isDetectionType: false;
2702
+ readonly properties: OccupancyProperty.Detected[];
2703
+ readonly shortcutable: true;
2704
+ readonly cascadeTrigger: {
2705
+ readonly property: OccupancyProperty;
2706
+ readonly value: true;
2707
+ readonly sustained: true;
2708
+ };
2709
+ readonly virtual: {
2710
+ readonly properties: {
2711
+ readonly detected: false;
2712
+ };
2713
+ };
2714
+ readonly semantics: {
2715
+ readonly domain: SensorDomain.Binary;
2716
+ readonly stateProperty: OccupancyProperty;
2717
+ readonly commandProperty: OccupancyProperty;
2718
+ readonly deviceClass: "occupancy";
2719
+ };
2720
+ };
2342
2721
 
2343
2722
  /** Optional capabilities for PTZ controls. Add to `capabilities` to enable features. */
2344
2723
  declare enum PTZCapability {
2724
+ /** Camera supports panning (horizontal movement) */
2345
2725
  Pan = "pan",
2726
+ /** Camera supports tilting (vertical movement) */
2346
2727
  Tilt = "tilt",
2728
+ /** Camera supports zoom */
2347
2729
  Zoom = "zoom",
2348
2730
  /** Camera supports named position presets */
2349
2731
  Presets = "presets",
@@ -2373,7 +2755,9 @@ declare enum PTZProperty {
2373
2755
  /** Target preset to move to */
2374
2756
  TargetPreset = "targetPreset",
2375
2757
  /** Relative displacement move command (write-only) */
2376
- RelativeMove = "relativeMove"
2758
+ RelativeMove = "relativeMove",
2759
+ /** Move to the home position (write-only command, carries no state) */
2760
+ Home = "home"
2377
2761
  }
2378
2762
  /** Absolute PTZ position */
2379
2763
  interface PTZPosition {
@@ -2546,7 +2930,7 @@ declare class PTZControl<TStorage extends object = Record<string, any>> extends
2546
2930
  * Cross-process consumer entry point. Dispatches writable properties
2547
2931
  * to semantic methods so plugin overrides (hardware actions) are honored.
2548
2932
  * `moving` and `presets` are observed/discovered state and not externally writable;
2549
- * only `Position`, `Velocity`, `TargetPreset`, and `RelativeMove` may be set.
2933
+ * only `Position`, `Velocity`, `TargetPreset`, `RelativeMove` and `Home` may be set.
2550
2934
  *
2551
2935
  * @param property - Property name to write.
2552
2936
  *
@@ -2556,6 +2940,16 @@ declare class PTZControl<TStorage extends object = Record<string, any>> extends
2556
2940
  */
2557
2941
  updateValue(property: string, value: unknown): Promise<void>;
2558
2942
  }
2943
+ /** Registry metadata for {@link PTZControl}. */
2944
+ declare const ptzMeta: {
2945
+ readonly type: SensorType.PTZ;
2946
+ readonly category: SensorCategory.Control;
2947
+ readonly assignmentKey: "ptz";
2948
+ readonly multiProvider: false;
2949
+ readonly isDetectionType: false;
2950
+ readonly properties: PTZProperty[];
2951
+ readonly semantics: null;
2952
+ };
2559
2953
 
2560
2954
  /** Security system arm/disarm states (HomeKit-compatible values) */
2561
2955
  declare enum SecuritySystemState {
@@ -2652,10 +3046,43 @@ declare class SecuritySystem<TStorage extends object = Record<string, any>> exte
2652
3046
  */
2653
3047
  updateValue(property: string, value: unknown): Promise<void>;
2654
3048
  }
3049
+ /** Registry metadata for {@link SecuritySystem}. */
3050
+ declare const securitySystemMeta: {
3051
+ readonly type: SensorType.SecuritySystem;
3052
+ readonly category: SensorCategory.Control;
3053
+ readonly assignmentKey: "securitySystem";
3054
+ readonly multiProvider: true;
3055
+ readonly isDetectionType: false;
3056
+ readonly properties: SecuritySystemProperty[];
3057
+ readonly shortcutable: true;
3058
+ readonly cascadeTrigger: {
3059
+ readonly property: SecuritySystemProperty.CurrentState;
3060
+ readonly value: 4;
3061
+ readonly sustained: true;
3062
+ };
3063
+ readonly virtual: {
3064
+ readonly properties: {
3065
+ readonly currentState: 3;
3066
+ readonly targetState: 3;
3067
+ };
3068
+ };
3069
+ readonly semantics: {
3070
+ readonly domain: SensorDomain.Alarm;
3071
+ readonly stateProperty: SecuritySystemProperty.CurrentState;
3072
+ readonly commandProperty: SecuritySystemProperty.TargetState;
3073
+ readonly states: {
3074
+ readonly armed_home: SecuritySystemState.StayArm;
3075
+ readonly armed_away: SecuritySystemState.AwayArm;
3076
+ readonly armed_night: SecuritySystemState.NightArm;
3077
+ readonly disarmed: SecuritySystemState.Disarmed;
3078
+ readonly triggered: SecuritySystemState.AlarmTriggered;
3079
+ };
3080
+ };
3081
+ };
2655
3082
 
2656
3083
  /** Optional capabilities for siren controls */
2657
3084
  declare enum SirenCapability {
2658
- /** Siren supports volume adjustment (0100) */
3085
+ /** Siren supports volume adjustment (0-100) */
2659
3086
  Volume = "volume"
2660
3087
  }
2661
3088
  /**
@@ -2666,7 +3093,7 @@ declare enum SirenCapability {
2666
3093
  declare enum SirenProperty {
2667
3094
  /** Whether the siren is currently active */
2668
3095
  Active = "active",
2669
- /** Volume level (0100) */
3096
+ /** Volume level (0-100) */
2670
3097
  Volume = "volume"
2671
3098
  }
2672
3099
  /**
@@ -2723,7 +3150,7 @@ declare class SirenControl<TStorage extends object = Record<string, any>> extend
2723
3150
  * Set volume. Override to drive hardware and call `await super.setVolume(value)`
2724
3151
  * after success. The default implementation clamps the value to [0, 100].
2725
3152
  *
2726
- * @param value - Volume level in the range 0100.
3153
+ * @param value - Volume level in the range 0-100.
2727
3154
  *
2728
3155
  * @example
2729
3156
  * ```ts
@@ -2744,6 +3171,36 @@ declare class SirenControl<TStorage extends object = Record<string, any>> extend
2744
3171
  */
2745
3172
  updateValue(property: string, value: unknown): Promise<void>;
2746
3173
  }
3174
+ /** Registry metadata for {@link SirenControl}. */
3175
+ declare const sirenMeta: {
3176
+ readonly type: SensorType.Siren;
3177
+ readonly category: SensorCategory.Control;
3178
+ readonly assignmentKey: "siren";
3179
+ readonly multiProvider: true;
3180
+ readonly isDetectionType: false;
3181
+ readonly properties: SirenProperty[];
3182
+ readonly shortcutable: true;
3183
+ readonly cascadeTrigger: {
3184
+ readonly property: SirenProperty.Active;
3185
+ readonly value: true;
3186
+ readonly sustained: true;
3187
+ };
3188
+ readonly propertyCapabilities: {
3189
+ readonly volume: SirenCapability;
3190
+ };
3191
+ readonly virtual: {
3192
+ readonly properties: {
3193
+ readonly active: false;
3194
+ readonly volume: 100;
3195
+ };
3196
+ readonly capabilities: readonly [SirenCapability];
3197
+ };
3198
+ readonly semantics: {
3199
+ readonly domain: SensorDomain.Siren;
3200
+ readonly stateProperty: SirenProperty.Active;
3201
+ readonly commandProperty: SirenProperty.Active;
3202
+ };
3203
+ };
2747
3204
 
2748
3205
  /**
2749
3206
  * Properties for smoke sensors
@@ -2801,6 +3258,32 @@ declare class SmokeSensor<TStorage extends object = Record<string, any>> extends
2801
3258
  */
2802
3259
  updateValue(_property: string, _value: unknown): void;
2803
3260
  }
3261
+ /** Registry metadata for {@link SmokeSensor}. */
3262
+ declare const smokeMeta: {
3263
+ readonly type: SensorType.Smoke;
3264
+ readonly category: SensorCategory.Sensor;
3265
+ readonly assignmentKey: "smoke";
3266
+ readonly multiProvider: true;
3267
+ readonly isDetectionType: false;
3268
+ readonly properties: SmokeProperty.Detected[];
3269
+ readonly shortcutable: true;
3270
+ readonly cascadeTrigger: {
3271
+ readonly property: SmokeProperty;
3272
+ readonly value: true;
3273
+ readonly sustained: true;
3274
+ };
3275
+ readonly virtual: {
3276
+ readonly properties: {
3277
+ readonly detected: false;
3278
+ };
3279
+ };
3280
+ readonly semantics: {
3281
+ readonly domain: SensorDomain.Binary;
3282
+ readonly stateProperty: SmokeProperty;
3283
+ readonly commandProperty: SmokeProperty;
3284
+ readonly deviceClass: "smoke";
3285
+ };
3286
+ };
2804
3287
 
2805
3288
  /**
2806
3289
  * Properties for switch controls
@@ -2870,63 +3353,31 @@ declare class SwitchControl<TStorage extends object = Record<string, any>> exten
2870
3353
  */
2871
3354
  updateValue(property: string, value: unknown): Promise<void>;
2872
3355
  }
2873
-
2874
- /**
2875
- * Properties for temperature sensors
2876
- *
2877
- * @internal
2878
- */
2879
- declare enum TemperatureProperty {
2880
- /** Current temperature in degrees Celsius */
2881
- Current = "current"
2882
- }
2883
- /**
2884
- * Property value map for temperature info sensors.
2885
- *
2886
- * @internal
2887
- */
2888
- interface TemperatureInfoProperties {
2889
- [TemperatureProperty.Current]: number;
2890
- }
2891
- /** Read-only proxy interface for a temperature sensor */
2892
- interface TemperatureInfoLike extends SensorLike {
2893
- readonly type: SensorType.Temperature;
2894
- readonly onPropertyChanged: Observable<PropertyChangeOf<TemperatureInfoProperties>>;
2895
- getValue(property: TemperatureProperty.Current): number | undefined;
2896
- getValue(property: string): unknown;
2897
- }
2898
- /** Temperature info sensor. Reports current temperature in °C. */
2899
- declare class TemperatureInfo<TStorage extends object = Record<string, any>> extends Sensor<TemperatureInfoProperties, TStorage> {
2900
- readonly type = SensorType.Temperature;
2901
- readonly category = SensorCategory.Info;
2902
- constructor(name?: string);
2903
- get current(): number;
2904
- /**
2905
- * Report a new temperature reading. Clamped to [-270, 100] °C.
2906
- *
2907
- * @param value - Temperature reading in degrees Celsius.
2908
- *
2909
- * @example
2910
- * ```ts
2911
- * temperature.setCurrent(21.5);
2912
- * ```
2913
- */
2914
- setCurrent(value: number): void;
2915
- /**
2916
- * Read-only sensor: external writes are ignored. Reading via `setCurrent` is plugin-only.
2917
- *
2918
- * Called by the cross-process plugin host when a generic property write is received.
2919
- * Temperature sensors have no externally writable properties, so the parameters are
2920
- * unused (underscore-prefixed) and the call is a no-op.
2921
- *
2922
- * @param _property - Unused — temperature sensors expose no writable properties.
2923
- *
2924
- * @param _value - Unused — temperature sensors expose no writable properties.
2925
- *
2926
- * @internal
2927
- */
2928
- updateValue(_property: string, _value: unknown): void;
2929
- }
3356
+ /** Registry metadata for {@link SwitchControl}. */
3357
+ declare const switchMeta: {
3358
+ readonly type: SensorType.Switch;
3359
+ readonly category: SensorCategory.Control;
3360
+ readonly assignmentKey: "switch";
3361
+ readonly multiProvider: true;
3362
+ readonly isDetectionType: false;
3363
+ readonly properties: SwitchProperty.On[];
3364
+ readonly shortcutable: true;
3365
+ readonly cascadeTrigger: {
3366
+ readonly property: SwitchProperty;
3367
+ readonly value: true;
3368
+ readonly sustained: true;
3369
+ };
3370
+ readonly virtual: {
3371
+ readonly properties: {
3372
+ readonly on: false;
3373
+ };
3374
+ };
3375
+ readonly semantics: {
3376
+ readonly domain: SensorDomain.Switch;
3377
+ readonly stateProperty: SwitchProperty;
3378
+ readonly commandProperty: SwitchProperty;
3379
+ };
3380
+ };
2930
3381
 
2931
3382
  /**
2932
3383
  * Receives a partial-state delta (only properties that actually changed). One callback
@@ -2982,7 +3433,7 @@ declare enum SensorType {
2982
3433
  Contact = "contact",
2983
3434
  /** Temperature sensor (°C) */
2984
3435
  Temperature = "temperature",
2985
- /** Humidity sensor (0100%) */
3436
+ /** Humidity sensor (0-100%) */
2986
3437
  Humidity = "humidity",
2987
3438
  /** Occupancy/presence sensor */
2988
3439
  Occupancy = "occupancy",
@@ -3327,57 +3778,712 @@ declare abstract class Sensor<TProperties extends object, TStorage extends objec
3327
3778
  }
3328
3779
 
3329
3780
  /**
3330
- * Stable reference to a sensor for cascade trigger configuration.
3331
- * Uses composite key (sensorType + sensorName + pluginId) instead of UUID
3332
- * so references survive plugin restarts.
3781
+ * Properties for temperature sensors
3782
+ *
3783
+ * @internal
3333
3784
  */
3334
- interface SensorTriggerRef {
3335
- /** Sensor type (e.g. 'contact', 'doorbell') */
3336
- sensorType: SensorType;
3337
- /** Sensor name (stable across restarts) */
3338
- sensorName: string;
3339
- /** Plugin ID that provides this sensor */
3340
- pluginId: string;
3785
+ declare enum TemperatureProperty {
3786
+ /** Current temperature in degrees Celsius */
3787
+ Current = "current"
3341
3788
  }
3342
3789
  /**
3343
- * Sensor trigger settings (contact, doorbell, switch, light, etc.).
3790
+ * Property value map for temperature info sensors.
3791
+ *
3792
+ * @internal
3344
3793
  */
3345
- interface SensorTriggerSettings {
3346
- /** Sensor trigger timeout in seconds */
3347
- timeout: number;
3348
- /** Sensors that also trigger the detection cascade (in addition to motion/audio) */
3349
- triggers: SensorTriggerRef[];
3794
+ interface TemperatureInfoProperties {
3795
+ [TemperatureProperty.Current]: number;
3350
3796
  }
3351
- /**
3352
- * Detection line configuration.
3353
- * Defines a virtual tripwire for line crossing detection.
3354
- * The two points define grab-handle positions; the actual crossing line
3355
- * is perpendicular through their midpoint.
3356
- */
3357
- interface DetectionLine {
3358
- /** Line display name */
3359
- name: string;
3360
- /** Grab-handle positions (0–100%). Crossing line is perpendicular through midpoint. */
3361
- points: [Point, Point];
3362
- /** Which crossing direction(s) trigger events */
3363
- direction: LineDirection;
3364
- /** Labels to filter (empty = all labels) */
3365
- labels: DetectionLabel[];
3366
- /** Line display color (hex) */
3367
- color: string;
3797
+ /** Read-only proxy interface for a temperature sensor */
3798
+ interface TemperatureInfoLike extends SensorLike {
3799
+ readonly type: SensorType.Temperature;
3800
+ readonly onPropertyChanged: Observable<PropertyChangeOf<TemperatureInfoProperties>>;
3801
+ getValue(property: TemperatureProperty.Current): number | undefined;
3802
+ getValue(property: string): unknown;
3803
+ }
3804
+ /** Temperature info sensor. Reports current temperature in °C. */
3805
+ declare class TemperatureInfo<TStorage extends object = Record<string, any>> extends Sensor<TemperatureInfoProperties, TStorage> {
3806
+ readonly type = SensorType.Temperature;
3807
+ readonly category = SensorCategory.Info;
3808
+ constructor(name?: string);
3809
+ get current(): number;
3810
+ /**
3811
+ * Report a new temperature reading. Clamped to [-270, 100] °C.
3812
+ *
3813
+ * @param value - Temperature reading in degrees Celsius.
3814
+ *
3815
+ * @example
3816
+ * ```ts
3817
+ * temperature.setCurrent(21.5);
3818
+ * ```
3819
+ */
3820
+ setCurrent(value: number): void;
3821
+ /**
3822
+ * Read-only sensor: external writes are ignored. Reading via `setCurrent` is plugin-only.
3823
+ *
3824
+ * Called by the cross-process plugin host when a generic property write is received.
3825
+ * Temperature sensors have no externally writable properties, so the parameters are
3826
+ * unused (underscore-prefixed) and the call is a no-op.
3827
+ *
3828
+ * @param _property - Unused — temperature sensors expose no writable properties.
3829
+ *
3830
+ * @param _value - Unused — temperature sensors expose no writable properties.
3831
+ *
3832
+ * @internal
3833
+ */
3834
+ updateValue(_property: string, _value: unknown): void;
3368
3835
  }
3836
+ /** Registry metadata for {@link TemperatureInfo}. */
3837
+ declare const temperatureMeta: {
3838
+ readonly type: SensorType.Temperature;
3839
+ readonly category: SensorCategory.Info;
3840
+ readonly assignmentKey: "temperature";
3841
+ readonly multiProvider: true;
3842
+ readonly isDetectionType: false;
3843
+ readonly properties: TemperatureProperty.Current[];
3844
+ readonly shortcutable: true;
3845
+ readonly virtual: {
3846
+ readonly properties: {
3847
+ readonly current: 20;
3848
+ };
3849
+ };
3850
+ readonly semantics: {
3851
+ readonly domain: SensorDomain.Measurement;
3852
+ readonly stateProperty: TemperatureProperty;
3853
+ readonly commandProperty: TemperatureProperty;
3854
+ readonly deviceClass: "temperature";
3855
+ readonly unit: "°C";
3856
+ };
3857
+ };
3858
+
3369
3859
  /**
3370
- * Detection zone configuration.
3371
- * Defines areas that restrict or drop detections.
3860
+ * Property names of a classifier sensor.
3861
+ *
3862
+ * @internal
3372
3863
  */
3373
- interface DetectionZone {
3374
- /** Zone display name */
3375
- name: string;
3376
- /** Polygon points (0-100 percentage coordinates) */
3377
- points: Point[];
3378
- /** Intersection detection type */
3379
- type: ZoneType;
3380
- /** Include/exclude filter mode */
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
+ /** Every sensor's metadata. A new sensor type adds its meta here. */
4004
+ declare const SENSOR_META: readonly [{
4005
+ readonly type: SensorType.Audio;
4006
+ readonly category: SensorCategory.Sensor;
4007
+ readonly assignmentKey: "audio";
4008
+ readonly multiProvider: false;
4009
+ readonly isDetectionType: true;
4010
+ readonly properties: AudioProperty[];
4011
+ readonly semantics: null;
4012
+ }, {
4013
+ readonly type: SensorType.Battery;
4014
+ readonly category: SensorCategory.Info;
4015
+ readonly assignmentKey: "battery";
4016
+ readonly multiProvider: false;
4017
+ readonly isDetectionType: false;
4018
+ readonly properties: BatteryProperty[];
4019
+ readonly shortcutable: true;
4020
+ readonly propertyCapabilities: {
4021
+ readonly charging: BatteryCapability.Charging;
4022
+ readonly low: BatteryCapability.LowBattery;
4023
+ };
4024
+ readonly semantics: {
4025
+ readonly domain: SensorDomain.Measurement;
4026
+ readonly stateProperty: BatteryProperty.Level;
4027
+ readonly commandProperty: BatteryProperty.Level;
4028
+ readonly deviceClass: "battery";
4029
+ readonly unit: "%";
4030
+ readonly diagnostic: true;
4031
+ };
4032
+ }, {
4033
+ readonly type: SensorType.Classifier;
4034
+ readonly category: SensorCategory.Sensor;
4035
+ readonly assignmentKey: "classifier";
4036
+ readonly multiProvider: true;
4037
+ readonly isDetectionType: true;
4038
+ readonly properties: ClassifierProperty[];
4039
+ readonly semantics: null;
4040
+ }, {
4041
+ readonly type: SensorType.Clip;
4042
+ readonly category: SensorCategory.Sensor;
4043
+ readonly assignmentKey: "clip";
4044
+ readonly multiProvider: false;
4045
+ readonly isDetectionType: true;
4046
+ readonly properties: readonly [];
4047
+ readonly semantics: null;
4048
+ }, {
4049
+ readonly type: SensorType.Contact;
4050
+ readonly category: SensorCategory.Sensor;
4051
+ readonly assignmentKey: "contact";
4052
+ readonly multiProvider: true;
4053
+ readonly isDetectionType: false;
4054
+ readonly properties: ContactProperty.Detected[];
4055
+ readonly shortcutable: true;
4056
+ readonly cascadeTrigger: {
4057
+ readonly property: ContactProperty;
4058
+ readonly value: true;
4059
+ readonly sustained: true;
4060
+ };
4061
+ readonly virtual: {
4062
+ readonly properties: {
4063
+ readonly detected: false;
4064
+ };
4065
+ };
4066
+ readonly semantics: {
4067
+ readonly domain: SensorDomain.Binary;
4068
+ readonly stateProperty: ContactProperty;
4069
+ readonly commandProperty: ContactProperty;
4070
+ readonly deviceClass: "opening";
4071
+ };
4072
+ }, {
4073
+ readonly type: SensorType.Doorbell;
4074
+ readonly category: SensorCategory.Trigger;
4075
+ readonly assignmentKey: "doorbell";
4076
+ readonly multiProvider: true;
4077
+ readonly isDetectionType: false;
4078
+ readonly properties: DoorbellProperty.Ring[];
4079
+ readonly shortcutable: true;
4080
+ readonly cascadeTrigger: {
4081
+ readonly property: DoorbellProperty;
4082
+ readonly value: true;
4083
+ readonly sustained: false;
4084
+ };
4085
+ readonly virtual: {
4086
+ readonly properties: {
4087
+ readonly ring: false;
4088
+ };
4089
+ };
4090
+ readonly semantics: {
4091
+ readonly domain: SensorDomain.Binary;
4092
+ readonly stateProperty: DoorbellProperty;
4093
+ readonly commandProperty: DoorbellProperty;
4094
+ readonly icon: "mdi:doorbell";
4095
+ };
4096
+ }, {
4097
+ readonly type: SensorType.Face;
4098
+ readonly category: SensorCategory.Sensor;
4099
+ readonly assignmentKey: "face";
4100
+ readonly multiProvider: false;
4101
+ readonly isDetectionType: true;
4102
+ readonly properties: FaceProperty[];
4103
+ readonly semantics: null;
4104
+ }, {
4105
+ readonly type: SensorType.Garage;
4106
+ readonly category: SensorCategory.Control;
4107
+ readonly assignmentKey: "garage";
4108
+ readonly multiProvider: true;
4109
+ readonly isDetectionType: false;
4110
+ readonly properties: GarageProperty[];
4111
+ readonly shortcutable: true;
4112
+ readonly cascadeTrigger: {
4113
+ readonly property: GarageProperty.CurrentState;
4114
+ readonly value: 0;
4115
+ readonly sustained: true;
4116
+ };
4117
+ readonly virtual: {
4118
+ readonly properties: {
4119
+ readonly currentState: 1;
4120
+ readonly targetState: 1;
4121
+ };
4122
+ };
4123
+ readonly semantics: {
4124
+ readonly domain: SensorDomain.Cover;
4125
+ readonly stateProperty: GarageProperty.CurrentState;
4126
+ readonly commandProperty: GarageProperty.TargetState;
4127
+ readonly deviceClass: "garage";
4128
+ readonly states: {
4129
+ readonly open: GarageState.Open;
4130
+ readonly closed: GarageState.Closed;
4131
+ readonly opening: GarageState.Opening;
4132
+ readonly closing: GarageState.Closing;
4133
+ readonly stopped: GarageState.Stopped;
4134
+ };
4135
+ };
4136
+ }, {
4137
+ readonly type: SensorType.Humidity;
4138
+ readonly category: SensorCategory.Info;
4139
+ readonly assignmentKey: "humidity";
4140
+ readonly multiProvider: true;
4141
+ readonly isDetectionType: false;
4142
+ readonly properties: HumidityProperty.Current[];
4143
+ readonly shortcutable: true;
4144
+ readonly virtual: {
4145
+ readonly properties: {
4146
+ readonly current: 50;
4147
+ };
4148
+ };
4149
+ readonly semantics: {
4150
+ readonly domain: SensorDomain.Measurement;
4151
+ readonly stateProperty: HumidityProperty;
4152
+ readonly commandProperty: HumidityProperty;
4153
+ readonly deviceClass: "humidity";
4154
+ readonly unit: "%";
4155
+ };
4156
+ }, {
4157
+ readonly type: SensorType.Leak;
4158
+ readonly category: SensorCategory.Sensor;
4159
+ readonly assignmentKey: "leak";
4160
+ readonly multiProvider: true;
4161
+ readonly isDetectionType: false;
4162
+ readonly properties: LeakProperty.Detected[];
4163
+ readonly shortcutable: true;
4164
+ readonly cascadeTrigger: {
4165
+ readonly property: LeakProperty;
4166
+ readonly value: true;
4167
+ readonly sustained: true;
4168
+ };
4169
+ readonly virtual: {
4170
+ readonly properties: {
4171
+ readonly detected: false;
4172
+ };
4173
+ };
4174
+ readonly semantics: {
4175
+ readonly domain: SensorDomain.Binary;
4176
+ readonly stateProperty: LeakProperty;
4177
+ readonly commandProperty: LeakProperty;
4178
+ readonly deviceClass: "moisture";
4179
+ };
4180
+ }, {
4181
+ readonly type: SensorType.LicensePlate;
4182
+ readonly category: SensorCategory.Sensor;
4183
+ readonly assignmentKey: "licensePlate";
4184
+ readonly multiProvider: false;
4185
+ readonly isDetectionType: true;
4186
+ readonly properties: LicensePlateProperty[];
4187
+ readonly semantics: null;
4188
+ }, {
4189
+ readonly type: SensorType.Light;
4190
+ readonly category: SensorCategory.Control;
4191
+ readonly assignmentKey: "light";
4192
+ readonly multiProvider: true;
4193
+ readonly isDetectionType: false;
4194
+ readonly properties: LightProperty[];
4195
+ readonly shortcutable: true;
4196
+ readonly cascadeTrigger: {
4197
+ readonly property: LightProperty.On;
4198
+ readonly value: true;
4199
+ readonly sustained: true;
4200
+ };
4201
+ readonly propertyCapabilities: {
4202
+ readonly brightness: LightCapability;
4203
+ };
4204
+ readonly virtual: {
4205
+ readonly properties: {
4206
+ readonly on: false;
4207
+ readonly brightness: 100;
4208
+ };
4209
+ readonly capabilities: readonly [LightCapability];
4210
+ };
4211
+ readonly semantics: {
4212
+ readonly domain: SensorDomain.Light;
4213
+ readonly stateProperty: LightProperty.On;
4214
+ readonly commandProperty: LightProperty.On;
4215
+ };
4216
+ }, {
4217
+ readonly type: SensorType.Lock;
4218
+ readonly category: SensorCategory.Control;
4219
+ readonly assignmentKey: "lock";
4220
+ readonly multiProvider: true;
4221
+ readonly isDetectionType: false;
4222
+ readonly properties: LockProperty[];
4223
+ readonly shortcutable: true;
4224
+ readonly cascadeTrigger: {
4225
+ readonly property: LockProperty.CurrentState;
4226
+ readonly value: 1;
4227
+ readonly sustained: true;
4228
+ };
4229
+ readonly virtual: {
4230
+ readonly properties: {
4231
+ readonly currentState: 0;
4232
+ readonly targetState: 0;
4233
+ };
4234
+ };
4235
+ readonly semantics: {
4236
+ readonly domain: SensorDomain.Lock;
4237
+ readonly stateProperty: LockProperty.CurrentState;
4238
+ readonly commandProperty: LockProperty.TargetState;
4239
+ readonly states: {
4240
+ readonly locked: LockState.Secured;
4241
+ readonly unlocked: LockState.Unsecured;
4242
+ };
4243
+ };
4244
+ }, {
4245
+ readonly type: SensorType.Motion;
4246
+ readonly category: SensorCategory.Sensor;
4247
+ readonly assignmentKey: "motion";
4248
+ readonly multiProvider: false;
4249
+ readonly isDetectionType: true;
4250
+ readonly properties: MotionProperty[];
4251
+ readonly semantics: null;
4252
+ }, {
4253
+ readonly type: SensorType.Object;
4254
+ readonly category: SensorCategory.Sensor;
4255
+ readonly assignmentKey: "object";
4256
+ readonly multiProvider: false;
4257
+ readonly isDetectionType: true;
4258
+ readonly properties: ObjectProperty[];
4259
+ readonly semantics: null;
4260
+ }, {
4261
+ readonly type: SensorType.Occupancy;
4262
+ readonly category: SensorCategory.Sensor;
4263
+ readonly assignmentKey: "occupancy";
4264
+ readonly multiProvider: true;
4265
+ readonly isDetectionType: false;
4266
+ readonly properties: OccupancyProperty.Detected[];
4267
+ readonly shortcutable: true;
4268
+ readonly cascadeTrigger: {
4269
+ readonly property: OccupancyProperty;
4270
+ readonly value: true;
4271
+ readonly sustained: true;
4272
+ };
4273
+ readonly virtual: {
4274
+ readonly properties: {
4275
+ readonly detected: false;
4276
+ };
4277
+ };
4278
+ readonly semantics: {
4279
+ readonly domain: SensorDomain.Binary;
4280
+ readonly stateProperty: OccupancyProperty;
4281
+ readonly commandProperty: OccupancyProperty;
4282
+ readonly deviceClass: "occupancy";
4283
+ };
4284
+ }, {
4285
+ readonly type: SensorType.PTZ;
4286
+ readonly category: SensorCategory.Control;
4287
+ readonly assignmentKey: "ptz";
4288
+ readonly multiProvider: false;
4289
+ readonly isDetectionType: false;
4290
+ readonly properties: PTZProperty[];
4291
+ readonly semantics: null;
4292
+ }, {
4293
+ readonly type: SensorType.SecuritySystem;
4294
+ readonly category: SensorCategory.Control;
4295
+ readonly assignmentKey: "securitySystem";
4296
+ readonly multiProvider: true;
4297
+ readonly isDetectionType: false;
4298
+ readonly properties: SecuritySystemProperty[];
4299
+ readonly shortcutable: true;
4300
+ readonly cascadeTrigger: {
4301
+ readonly property: SecuritySystemProperty.CurrentState;
4302
+ readonly value: 4;
4303
+ readonly sustained: true;
4304
+ };
4305
+ readonly virtual: {
4306
+ readonly properties: {
4307
+ readonly currentState: 3;
4308
+ readonly targetState: 3;
4309
+ };
4310
+ };
4311
+ readonly semantics: {
4312
+ readonly domain: SensorDomain.Alarm;
4313
+ readonly stateProperty: SecuritySystemProperty.CurrentState;
4314
+ readonly commandProperty: SecuritySystemProperty.TargetState;
4315
+ readonly states: {
4316
+ readonly armed_home: SecuritySystemState.StayArm;
4317
+ readonly armed_away: SecuritySystemState.AwayArm;
4318
+ readonly armed_night: SecuritySystemState.NightArm;
4319
+ readonly disarmed: SecuritySystemState.Disarmed;
4320
+ readonly triggered: SecuritySystemState.AlarmTriggered;
4321
+ };
4322
+ };
4323
+ }, {
4324
+ readonly type: SensorType.Siren;
4325
+ readonly category: SensorCategory.Control;
4326
+ readonly assignmentKey: "siren";
4327
+ readonly multiProvider: true;
4328
+ readonly isDetectionType: false;
4329
+ readonly properties: SirenProperty[];
4330
+ readonly shortcutable: true;
4331
+ readonly cascadeTrigger: {
4332
+ readonly property: SirenProperty.Active;
4333
+ readonly value: true;
4334
+ readonly sustained: true;
4335
+ };
4336
+ readonly propertyCapabilities: {
4337
+ readonly volume: SirenCapability;
4338
+ };
4339
+ readonly virtual: {
4340
+ readonly properties: {
4341
+ readonly active: false;
4342
+ readonly volume: 100;
4343
+ };
4344
+ readonly capabilities: readonly [SirenCapability];
4345
+ };
4346
+ readonly semantics: {
4347
+ readonly domain: SensorDomain.Siren;
4348
+ readonly stateProperty: SirenProperty.Active;
4349
+ readonly commandProperty: SirenProperty.Active;
4350
+ };
4351
+ }, {
4352
+ readonly type: SensorType.Smoke;
4353
+ readonly category: SensorCategory.Sensor;
4354
+ readonly assignmentKey: "smoke";
4355
+ readonly multiProvider: true;
4356
+ readonly isDetectionType: false;
4357
+ readonly properties: SmokeProperty.Detected[];
4358
+ readonly shortcutable: true;
4359
+ readonly cascadeTrigger: {
4360
+ readonly property: SmokeProperty;
4361
+ readonly value: true;
4362
+ readonly sustained: true;
4363
+ };
4364
+ readonly virtual: {
4365
+ readonly properties: {
4366
+ readonly detected: false;
4367
+ };
4368
+ };
4369
+ readonly semantics: {
4370
+ readonly domain: SensorDomain.Binary;
4371
+ readonly stateProperty: SmokeProperty;
4372
+ readonly commandProperty: SmokeProperty;
4373
+ readonly deviceClass: "smoke";
4374
+ };
4375
+ }, {
4376
+ readonly type: SensorType.Switch;
4377
+ readonly category: SensorCategory.Control;
4378
+ readonly assignmentKey: "switch";
4379
+ readonly multiProvider: true;
4380
+ readonly isDetectionType: false;
4381
+ readonly properties: SwitchProperty.On[];
4382
+ readonly shortcutable: true;
4383
+ readonly cascadeTrigger: {
4384
+ readonly property: SwitchProperty;
4385
+ readonly value: true;
4386
+ readonly sustained: true;
4387
+ };
4388
+ readonly virtual: {
4389
+ readonly properties: {
4390
+ readonly on: false;
4391
+ };
4392
+ };
4393
+ readonly semantics: {
4394
+ readonly domain: SensorDomain.Switch;
4395
+ readonly stateProperty: SwitchProperty;
4396
+ readonly commandProperty: SwitchProperty;
4397
+ };
4398
+ }, {
4399
+ readonly type: SensorType.Temperature;
4400
+ readonly category: SensorCategory.Info;
4401
+ readonly assignmentKey: "temperature";
4402
+ readonly multiProvider: true;
4403
+ readonly isDetectionType: false;
4404
+ readonly properties: TemperatureProperty.Current[];
4405
+ readonly shortcutable: true;
4406
+ readonly virtual: {
4407
+ readonly properties: {
4408
+ readonly current: 20;
4409
+ };
4410
+ };
4411
+ readonly semantics: {
4412
+ readonly domain: SensorDomain.Measurement;
4413
+ readonly stateProperty: TemperatureProperty;
4414
+ readonly commandProperty: TemperatureProperty;
4415
+ readonly deviceClass: "temperature";
4416
+ readonly unit: "°C";
4417
+ };
4418
+ }];
4419
+ /** Union of every declared assignment key, derived from the registry. */
4420
+ type SensorAssignmentKey = (typeof SENSOR_META)[number]['assignmentKey'];
4421
+ /**
4422
+ * Looks up a sensor's metadata by its type.
4423
+ *
4424
+ * @param type - The sensor type value.
4425
+ *
4426
+ * @returns The metadata, or `undefined` if no sensor declares that type.
4427
+ *
4428
+ * @example
4429
+ * ```ts
4430
+ * const meta = sensorMeta(SensorType.Light);
4431
+ * ```
4432
+ */
4433
+ declare function sensorMeta(type: string): SensorMeta | undefined;
4434
+
4435
+ /**
4436
+ * Stable reference to a sensor for cascade trigger configuration.
4437
+ * Uses composite key (sensorType + sensorName + pluginId) instead of UUID
4438
+ * so references survive plugin restarts.
4439
+ */
4440
+ interface SensorTriggerRef {
4441
+ /** Sensor type (e.g. 'contact', 'doorbell') */
4442
+ sensorType: SensorType;
4443
+ /** Sensor name (stable across restarts) */
4444
+ sensorName: string;
4445
+ /** Plugin ID that provides this sensor */
4446
+ pluginId: string;
4447
+ }
4448
+ /**
4449
+ * Sensor trigger settings (contact, doorbell, switch, light, etc.).
4450
+ */
4451
+ interface SensorTriggerSettings {
4452
+ /** Sensor trigger timeout in seconds */
4453
+ timeout: number;
4454
+ /** Sensors that also trigger the detection cascade (in addition to motion/audio) */
4455
+ triggers: SensorTriggerRef[];
4456
+ }
4457
+ /**
4458
+ * Detection line configuration.
4459
+ * Defines a virtual tripwire for line crossing detection.
4460
+ * The two points define grab-handle positions; the actual crossing line
4461
+ * is perpendicular through their midpoint.
4462
+ */
4463
+ interface DetectionLine {
4464
+ /** Line display name */
4465
+ name: string;
4466
+ /** Grab-handle positions (0–100%). Crossing line is perpendicular through midpoint. */
4467
+ points: [Point, Point];
4468
+ /** Which crossing direction(s) trigger events */
4469
+ direction: LineDirection;
4470
+ /** Labels to filter (empty = all labels) */
4471
+ labels: DetectionLabel[];
4472
+ /** Line display color (hex) */
4473
+ color: string;
4474
+ }
4475
+ /**
4476
+ * Detection zone configuration.
4477
+ * Defines areas that restrict or drop detections.
4478
+ */
4479
+ interface DetectionZone {
4480
+ /** Zone display name */
4481
+ name: string;
4482
+ /** Polygon points (0-100 percentage coordinates) */
4483
+ points: Point[];
4484
+ /** Intersection detection type */
4485
+ type: ZoneType;
4486
+ /** Include/exclude filter mode */
3381
4487
  filter: ZoneFilter;
3382
4488
  /** Labels to filter (empty = all labels) */
3383
4489
  labels: DetectionLabel[];
@@ -4004,38 +5110,24 @@ interface AssignedPlugin {
4004
5110
  /** Plugin display name */
4005
5111
  name: string;
4006
5112
  }
4007
- /**
4008
- * Plugin assignments for camera sensors/features.
4009
- * Maps sensor types to their assigned plugin(s).
4010
- */
4011
- interface PluginAssignments {
4012
- /** Motion detection plugin */
4013
- motion?: AssignedPlugin;
4014
- /** Object detection plugin */
4015
- object?: AssignedPlugin;
4016
- /** Audio detection plugin */
4017
- audio?: AssignedPlugin;
4018
- /** Face detection plugin */
4019
- face?: AssignedPlugin;
4020
- /** License plate detection plugin */
4021
- licensePlate?: AssignedPlugin;
4022
- /** PTZ control plugin */
4023
- ptz?: AssignedPlugin;
4024
- /** Battery info plugin */
4025
- battery?: AssignedPlugin;
4026
- /** Camera controller plugin */
5113
+ /** @internal */
5114
+ type SingleProviderAssignmentKey = Extract<(typeof SENSOR_META)[number], {
5115
+ multiProvider: false;
5116
+ }>['assignmentKey'];
5117
+ /** @internal */
5118
+ type MultiProviderAssignmentKey = Extract<(typeof SENSOR_META)[number], {
5119
+ multiProvider: true;
5120
+ }>['assignmentKey'];
5121
+ /**
5122
+ * Plugin assignments for a camera, keyed by the assignment keys the SDK sensor
5123
+ * registry declares. Single-provider sensors and the camera controller hold one
5124
+ * plugin; multi-provider sensors and the hub hold an array. Derived from the
5125
+ * registry so a new sensor type gains its assignment slot automatically.
5126
+ */
5127
+ type PluginAssignments = Partial<Record<SingleProviderAssignmentKey, AssignedPlugin>> & Partial<Record<MultiProviderAssignmentKey, AssignedPlugin[]>> & {
4027
5128
  cameraController?: AssignedPlugin;
4028
- /** Light control plugins */
4029
- light?: AssignedPlugin[];
4030
- /** Siren control plugins */
4031
- siren?: AssignedPlugin[];
4032
- /** Contact sensor plugins */
4033
- contact?: AssignedPlugin[];
4034
- /** Doorbell trigger plugins */
4035
- doorbell?: AssignedPlugin[];
4036
- /** Hub/bridge plugins */
4037
5129
  hub?: AssignedPlugin[];
4038
- }
5130
+ };
4039
5131
  /**
4040
5132
  * Camera source plugin information.
4041
5133
  */
@@ -4681,140 +5773,6 @@ interface PluginInfo {
4681
5773
  contract: PluginContract;
4682
5774
  }
4683
5775
 
4684
- /**
4685
- * Property names of a classifier sensor.
4686
- *
4687
- * @internal
4688
- */
4689
- declare enum ClassifierProperty {
4690
- /** Whether any classification result is active. */
4691
- Detected = "detected",
4692
- /** List of classification results with labels and confidence. */
4693
- Detections = "detections",
4694
- /** Unique labels of the current detections (auto-derived when reporting detections). */
4695
- Labels = "labels"
4696
- }
4697
- /** A classifier detection result with an open attribute for classifier categories. */
4698
- interface ClassifierDetection extends Detection {
4699
- /** Classifier category (e.g. `'bird'`, `'delivery'`). Open string for any classifier. */
4700
- attribute: string;
4701
- /** Classifier sub-category (e.g. `'woodpecker'`, `'amazon'`). */
4702
- subAttribute: string;
4703
- }
4704
- /**
4705
- * Property shape carried by a {@link ClassifierSensor}.
4706
- *
4707
- * @internal
4708
- */
4709
- interface ClassifierSensorProperties {
4710
- [ClassifierProperty.Detected]: boolean;
4711
- [ClassifierProperty.Detections]: ClassifierDetection[];
4712
- [ClassifierProperty.Labels]: string[];
4713
- }
4714
- /** Read-only proxy interface for a classifier sensor. */
4715
- interface ClassifierSensorLike extends SensorLike {
4716
- /** Sensor type discriminant. */
4717
- readonly type: SensorType.Classifier;
4718
- /** Property change observable narrowed to classifier properties. */
4719
- readonly onPropertyChanged: Observable<PropertyChangeOf<ClassifierSensorProperties>>;
4720
- getValue(property: ClassifierProperty.Detected): boolean | undefined;
4721
- getValue(property: ClassifierProperty.Detections): ClassifierDetection[] | undefined;
4722
- getValue(property: ClassifierProperty.Labels): string[] | undefined;
4723
- getValue(property: string): unknown;
4724
- }
4725
- /**
4726
- * General-purpose image classifier sensor.
4727
- *
4728
- * Plugin authors call `reportDetections(list)` to push classification results.
4729
- * `detected` and `labels` are auto-derived from the detection list.
4730
- */
4731
- declare class ClassifierSensor<TStorage extends object = Record<string, any>> extends Sensor<ClassifierSensorProperties, TStorage> {
4732
- readonly type = SensorType.Classifier;
4733
- readonly category = SensorCategory.Sensor;
4734
- _requiresFrames: boolean;
4735
- constructor(name?: string);
4736
- /** Whether any classification result is active. */
4737
- get detected(): boolean;
4738
- /** Current detection list. */
4739
- get detections(): ClassifierDetection[];
4740
- /** Unique labels of the current detections. */
4741
- get labels(): string[];
4742
- /**
4743
- * Report classification results. Auto-derives `detected` and `labels` from the list.
4744
- *
4745
- * - `reportDetections(true)` — generic classification trigger. The SDK
4746
- * synthesizes a single full-frame detection with empty attribute/subAttribute.
4747
- * - `reportDetections(true, [...])` — explicit classifier detections.
4748
- * - `reportDetections(false)` — clear.
4749
- *
4750
- * @param detected - Whether any classification result is active.
4751
- *
4752
- * @param detections - Optional explicit classifier detections to publish.
4753
- *
4754
- * @example
4755
- * ```ts
4756
- * import type { ClassifierDetection } from '@camera.ui/sdk';
4757
- * sensor.reportDetections(true, [
4758
- * {
4759
- * label: 'animal',
4760
- * confidence: 0.88,
4761
- * box: { x: 0.1, y: 0.2, width: 0.3, height: 0.4 },
4762
- * attribute: 'bird',
4763
- * subAttribute: 'woodpecker',
4764
- * } satisfies ClassifierDetection,
4765
- * ]);
4766
- * sensor.reportDetections(false);
4767
- * ```
4768
- */
4769
- reportDetections(detected: boolean, detections?: ClassifierDetection[]): void;
4770
- /**
4771
- * Explicitly clear classifier state (detected = false, detections = [], labels = []).
4772
- *
4773
- * @example
4774
- * ```ts
4775
- * sensor.clearDetections();
4776
- * ```
4777
- */
4778
- clearDetections(): void;
4779
- /**
4780
- * Read-only sensor: external writes are ignored. State is reported via `reportDetections`.
4781
- *
4782
- * Called by the cross-process plugin host when a generic property write is received.
4783
- * Classifier sensors have no externally writable properties, so the parameters are
4784
- * unused (underscore-prefixed) and the call is a no-op.
4785
- *
4786
- * @param _property - Unused — classifier sensors expose no writable properties.
4787
- *
4788
- * @param _value - Unused — classifier sensors expose no writable properties.
4789
- *
4790
- * @internal
4791
- */
4792
- updateValue(_property: string, _value: unknown): void;
4793
- }
4794
- /** Return type for {@link ClassifierDetectorSensor.detectClassifications}. */
4795
- interface ClassifierResult {
4796
- /** Whether any classification result is emitted for this frame. */
4797
- detected: boolean;
4798
- /** Detections emitted for this frame. */
4799
- detections: ClassifierDetection[];
4800
- }
4801
- /**
4802
- * Classifier detector that receives video frames from the backend pipeline.
4803
- * Extend this class and implement {@link detectClassifications} to run image
4804
- * classification models against trigger regions.
4805
- */
4806
- declare abstract class ClassifierDetectorSensor<TStorage extends object = Record<string, any>> extends ClassifierSensor<TStorage> {
4807
- _requiresFrames: boolean;
4808
- /** Declares the expected input dimensions and trigger labels. The backend scales frames to match. */
4809
- abstract get modelSpec(): ModelSpec;
4810
- /**
4811
- * Classify frames in batch. Each frame is a pre-cropped, pre-scaled
4812
- * trigger region produced by the upstream object detector. Must return
4813
- * exactly one ClassifierResult per input frame, in the same order.
4814
- */
4815
- abstract detectClassifications(frames: VideoFrameData[]): Promise<ClassifierResult[]>;
4816
- }
4817
-
4818
5776
  /** A CLIP embedding result for a detected region. */
4819
5777
  interface ClipEmbedding {
4820
5778
  /** Detection label this embedding was computed for (e.g. `'person'`, `'vehicle'`). */
@@ -4865,6 +5823,16 @@ declare abstract class ClipDetectorSensor<TStorage extends object = Record<strin
4865
5823
  */
4866
5824
  updateValue(_property: string, _value: unknown): void;
4867
5825
  }
5826
+ /** Registry metadata for {@link ClipDetectorSensor}. */
5827
+ declare const clipMeta: {
5828
+ readonly type: SensorType.Clip;
5829
+ readonly category: SensorCategory.Sensor;
5830
+ readonly assignmentKey: "clip";
5831
+ readonly multiProvider: false;
5832
+ readonly isDetectionType: true;
5833
+ readonly properties: readonly [];
5834
+ readonly semantics: null;
5835
+ };
4868
5836
 
4869
5837
  /**
4870
5838
  * Lifecycle events emitted on the PluginAPI EventEmitter. Plugins subscribe
@@ -5847,5 +6815,5 @@ interface OAuthClientCredentialsCapable extends OAuthCapable {
5847
6815
  configureClientCredentials(clientId: string, clientSecret: string): Promise<OAuthState>;
5848
6816
  }
5849
6817
 
5850
- 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, ObjectDetectorSensor, ObjectProperty, ObjectSensor, Observable, OccupancyProperty, OccupancySensor, PTZCapability, PTZControl, PTZProperty, PluginCapability, PluginInterface, PluginRole, RING_AUTO_RESET_MS, ReplaySubject, RtpPacket, SecuritySystem, SecuritySystemProperty, SecuritySystemState, Sensor, SensorCategory, SensorType, Severity, SirenCapability, SirenControl, SirenProperty, SmokeProperty, SmokeSensor, Subject, SwitchControl, SwitchProperty, TemperatureInfo, TemperatureProperty, canCreateCameras, canProvideSensorsToAnyCameras, distinctUntilChanged, filter, firstValueFrom, getContractValidationErrors, hasCapability, hasInterface, isHub, map, mergeMap, pairwise, share, validateContractConsistency };
5851
- 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, 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, SensorCapability, SensorLike, SensorPropertyType, SensorTriggerRef, SensorTriggerSettings, 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 };
6818
+ 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 };