@camstack/types 1.2.66 → 1.2.67
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/addon.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/notification-output.cap.d.ts +46 -0
- package/dist/capabilities/notification-rules.cap.d.ts +99 -3
- package/dist/capabilities/osd-manager.cap.d.ts +12 -0
- package/dist/catalogs/coco-classmap.d.ts +21 -0
- package/dist/device/system-mirror.d.ts +37 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +156 -19
- package/dist/index.mjs +155 -20
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -183,7 +183,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
|
183
183
|
"pipelineEnabled": true,
|
|
184
184
|
"zones": [],
|
|
185
185
|
"onboardMotionDrivesAnalyzer": true,
|
|
186
|
-
"occupancyRecheckEnabled":
|
|
186
|
+
"occupancyRecheckEnabled": true,
|
|
187
187
|
"occupancyRecheckSec": 30,
|
|
188
188
|
"occupancyRecheckFrames": 4,
|
|
189
189
|
"frameSource": { "kind": "local-broker" }
|
package/dist/addon.mjs
CHANGED
|
@@ -182,7 +182,7 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
|
|
|
182
182
|
"pipelineEnabled": true,
|
|
183
183
|
"zones": [],
|
|
184
184
|
"onboardMotionDrivesAnalyzer": true,
|
|
185
|
-
"occupancyRecheckEnabled":
|
|
185
|
+
"occupancyRecheckEnabled": true,
|
|
186
186
|
"occupancyRecheckSec": 30,
|
|
187
187
|
"occupancyRecheckFrames": 4,
|
|
188
188
|
"frameSource": { "kind": "local-broker" }
|
|
@@ -82,8 +82,30 @@ export type NotificationFormat = z.infer<typeof NotificationFormatSchema>;
|
|
|
82
82
|
* Named by INTENT, never by glyph. "check" would tie the vocabulary to one
|
|
83
83
|
* renderer's icon set; "acknowledge" survives an adapter that draws it
|
|
84
84
|
* differently.
|
|
85
|
+
*
|
|
86
|
+
* ── A TOKEN IS NOT A WIRE VALUE ─────────────────────────────────────
|
|
87
|
+
*
|
|
88
|
+
* These names are for US. **No adapter may forward one verbatim.** Each maps
|
|
89
|
+
* the whole set onto its own renderer's vocabulary through a
|
|
90
|
+
* `Record<NotificationActionIcon, string>` — a Record, never a lookup with a
|
|
91
|
+
* fallback, so adding a member here fails every adapter's build until someone
|
|
92
|
+
* decides its glyph, which is the only place that decision can be made
|
|
93
|
+
* honestly.
|
|
94
|
+
*
|
|
95
|
+
* This paragraph is the bug. Zentik declared `actionIcons: true` and passed
|
|
96
|
+
* `disarm` straight through; iOS feeds that string to
|
|
97
|
+
* `UNNotificationActionIcon(systemImageName:)`, `disarm` is not an SF Symbol,
|
|
98
|
+
* and every snooze and alarm button arrived BLANK. A pass-through is not a
|
|
99
|
+
* mapping, and "the field is documented" is not "the value renders".
|
|
100
|
+
*
|
|
101
|
+
* Adding a member is TRAIN-BOUND. The enum lives in the published
|
|
102
|
+
* `@camstack/server` closure and the cap seam validates against the HUB's copy,
|
|
103
|
+
* so an addon that emits a token the running hub does not know does not lose an
|
|
104
|
+
* icon — its whole `send` fails Zod validation and the notification never
|
|
105
|
+
* arrives. Never emit a new token from an addon before the train carrying it.
|
|
85
106
|
*/
|
|
86
107
|
export declare const NotificationActionIconSchema: z.ZodEnum<{
|
|
108
|
+
camera: "camera";
|
|
87
109
|
light: "light";
|
|
88
110
|
lock: "lock";
|
|
89
111
|
view: "view";
|
|
@@ -96,6 +118,10 @@ export declare const NotificationActionIconSchema: z.ZodEnum<{
|
|
|
96
118
|
play: "play";
|
|
97
119
|
acknowledge: "acknowledge";
|
|
98
120
|
silence: "silence";
|
|
121
|
+
snooze: "snooze";
|
|
122
|
+
"arm-home": "arm-home";
|
|
123
|
+
"arm-away": "arm-away";
|
|
124
|
+
"arm-night": "arm-night";
|
|
99
125
|
alert: "alert";
|
|
100
126
|
}>;
|
|
101
127
|
export type NotificationActionIcon = z.infer<typeof NotificationActionIconSchema>;
|
|
@@ -105,6 +131,7 @@ export declare const NotificationActionSchema: z.ZodObject<{
|
|
|
105
131
|
label: z.ZodString;
|
|
106
132
|
url: z.ZodOptional<z.ZodString>;
|
|
107
133
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
134
|
+
camera: "camera";
|
|
108
135
|
light: "light";
|
|
109
136
|
lock: "lock";
|
|
110
137
|
view: "view";
|
|
@@ -117,6 +144,10 @@ export declare const NotificationActionSchema: z.ZodObject<{
|
|
|
117
144
|
play: "play";
|
|
118
145
|
acknowledge: "acknowledge";
|
|
119
146
|
silence: "silence";
|
|
147
|
+
snooze: "snooze";
|
|
148
|
+
"arm-home": "arm-home";
|
|
149
|
+
"arm-away": "arm-away";
|
|
150
|
+
"arm-night": "arm-night";
|
|
120
151
|
alert: "alert";
|
|
121
152
|
}>>;
|
|
122
153
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -163,6 +194,7 @@ export declare const NotificationSchema: z.ZodObject<{
|
|
|
163
194
|
label: z.ZodString;
|
|
164
195
|
url: z.ZodOptional<z.ZodString>;
|
|
165
196
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
197
|
+
camera: "camera";
|
|
166
198
|
light: "light";
|
|
167
199
|
lock: "lock";
|
|
168
200
|
view: "view";
|
|
@@ -175,6 +207,10 @@ export declare const NotificationSchema: z.ZodObject<{
|
|
|
175
207
|
play: "play";
|
|
176
208
|
acknowledge: "acknowledge";
|
|
177
209
|
silence: "silence";
|
|
210
|
+
snooze: "snooze";
|
|
211
|
+
"arm-home": "arm-home";
|
|
212
|
+
"arm-away": "arm-away";
|
|
213
|
+
"arm-night": "arm-night";
|
|
178
214
|
alert: "alert";
|
|
179
215
|
}>>;
|
|
180
216
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -492,6 +528,7 @@ export declare const notificationOutputCapability: {
|
|
|
492
528
|
label: z.ZodString;
|
|
493
529
|
url: z.ZodOptional<z.ZodString>;
|
|
494
530
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
531
|
+
camera: "camera";
|
|
495
532
|
light: "light";
|
|
496
533
|
lock: "lock";
|
|
497
534
|
view: "view";
|
|
@@ -504,6 +541,10 @@ export declare const notificationOutputCapability: {
|
|
|
504
541
|
play: "play";
|
|
505
542
|
acknowledge: "acknowledge";
|
|
506
543
|
silence: "silence";
|
|
544
|
+
snooze: "snooze";
|
|
545
|
+
"arm-home": "arm-home";
|
|
546
|
+
"arm-away": "arm-away";
|
|
547
|
+
"arm-night": "arm-night";
|
|
507
548
|
alert: "alert";
|
|
508
549
|
}>>;
|
|
509
550
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -566,6 +607,7 @@ export declare const notificationOutputCapability: {
|
|
|
566
607
|
label: z.ZodString;
|
|
567
608
|
url: z.ZodOptional<z.ZodString>;
|
|
568
609
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
610
|
+
camera: "camera";
|
|
569
611
|
light: "light";
|
|
570
612
|
lock: "lock";
|
|
571
613
|
view: "view";
|
|
@@ -578,6 +620,10 @@ export declare const notificationOutputCapability: {
|
|
|
578
620
|
play: "play";
|
|
579
621
|
acknowledge: "acknowledge";
|
|
580
622
|
silence: "silence";
|
|
623
|
+
snooze: "snooze";
|
|
624
|
+
"arm-home": "arm-home";
|
|
625
|
+
"arm-away": "arm-away";
|
|
626
|
+
"arm-night": "arm-night";
|
|
581
627
|
alert: "alert";
|
|
582
628
|
}>>;
|
|
583
629
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -79,6 +79,8 @@ export declare const NcSystemEventKindSchema: z.ZodEnum<{
|
|
|
79
79
|
"alarm-triggered": "alarm-triggered";
|
|
80
80
|
"alarm-armed": "alarm-armed";
|
|
81
81
|
"alarm-disarmed": "alarm-disarmed";
|
|
82
|
+
"alarm-arming": "alarm-arming";
|
|
83
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
82
84
|
"camera-online": "camera-online";
|
|
83
85
|
"camera-offline": "camera-offline";
|
|
84
86
|
"camera-disabled": "camera-disabled";
|
|
@@ -92,12 +94,16 @@ export type NcSystemEventKind = z.infer<typeof NcSystemEventKindSchema>;
|
|
|
92
94
|
*/
|
|
93
95
|
export declare const NC_AUTHORABLE_SYSTEM_EVENT_KINDS: readonly NcSystemEventKind[];
|
|
94
96
|
/**
|
|
95
|
-
* The panel's
|
|
97
|
+
* The panel's transitions, as ONE list.
|
|
96
98
|
*
|
|
97
99
|
* Named here rather than spelled out at each of the four sites that need them
|
|
98
100
|
* (the emitter, the intake, the editor group, the combined-notification gate),
|
|
99
|
-
* because a
|
|
100
|
-
*
|
|
101
|
+
* because a transition added to the enum and forgotten at one of them is an
|
|
102
|
+
* alarm state nobody can be notified about. That is exactly what this list
|
|
103
|
+
* failed to prevent while it held three: `alarm-arming` was the fourth.
|
|
104
|
+
*
|
|
105
|
+
* In LIFECYCLE order, which is the order an editor lists them in and the order
|
|
106
|
+
* a person experiences them — not the order they were added.
|
|
101
107
|
*/
|
|
102
108
|
export declare const NC_ALARM_SYSTEM_EVENT_KINDS: readonly NcSystemEventKind[];
|
|
103
109
|
/**
|
|
@@ -120,6 +126,8 @@ export declare const NcSystemEventConditionSchema: z.ZodObject<{
|
|
|
120
126
|
"alarm-triggered": "alarm-triggered";
|
|
121
127
|
"alarm-armed": "alarm-armed";
|
|
122
128
|
"alarm-disarmed": "alarm-disarmed";
|
|
129
|
+
"alarm-arming": "alarm-arming";
|
|
130
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
123
131
|
"camera-online": "camera-online";
|
|
124
132
|
"camera-offline": "camera-offline";
|
|
125
133
|
"camera-disabled": "camera-disabled";
|
|
@@ -367,6 +375,7 @@ export declare const NcRuleNotificationButtonSchema: z.ZodObject<{
|
|
|
367
375
|
label: z.ZodString;
|
|
368
376
|
sequence: z.ZodString;
|
|
369
377
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
378
|
+
camera: "camera";
|
|
370
379
|
light: "light";
|
|
371
380
|
lock: "lock";
|
|
372
381
|
view: "view";
|
|
@@ -379,6 +388,10 @@ export declare const NcRuleNotificationButtonSchema: z.ZodObject<{
|
|
|
379
388
|
play: "play";
|
|
380
389
|
acknowledge: "acknowledge";
|
|
381
390
|
silence: "silence";
|
|
391
|
+
snooze: "snooze";
|
|
392
|
+
"arm-home": "arm-home";
|
|
393
|
+
"arm-away": "arm-away";
|
|
394
|
+
"arm-night": "arm-night";
|
|
382
395
|
alert: "alert";
|
|
383
396
|
}>>;
|
|
384
397
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -413,6 +426,7 @@ export declare const NcRuleActionsSchema: z.ZodObject<{
|
|
|
413
426
|
label: z.ZodString;
|
|
414
427
|
sequence: z.ZodString;
|
|
415
428
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
429
|
+
camera: "camera";
|
|
416
430
|
light: "light";
|
|
417
431
|
lock: "lock";
|
|
418
432
|
view: "view";
|
|
@@ -425,6 +439,10 @@ export declare const NcRuleActionsSchema: z.ZodObject<{
|
|
|
425
439
|
play: "play";
|
|
426
440
|
acknowledge: "acknowledge";
|
|
427
441
|
silence: "silence";
|
|
442
|
+
snooze: "snooze";
|
|
443
|
+
"arm-home": "arm-home";
|
|
444
|
+
"arm-away": "arm-away";
|
|
445
|
+
"arm-night": "arm-night";
|
|
428
446
|
alert: "alert";
|
|
429
447
|
}>>;
|
|
430
448
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -507,6 +525,8 @@ export declare const NcConditionsSchema: z.ZodObject<{
|
|
|
507
525
|
"alarm-triggered": "alarm-triggered";
|
|
508
526
|
"alarm-armed": "alarm-armed";
|
|
509
527
|
"alarm-disarmed": "alarm-disarmed";
|
|
528
|
+
"alarm-arming": "alarm-arming";
|
|
529
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
510
530
|
"camera-online": "camera-online";
|
|
511
531
|
"camera-offline": "camera-offline";
|
|
512
532
|
"camera-disabled": "camera-disabled";
|
|
@@ -772,6 +792,8 @@ export declare const NcRuleInputSchema: z.ZodObject<{
|
|
|
772
792
|
"alarm-triggered": "alarm-triggered";
|
|
773
793
|
"alarm-armed": "alarm-armed";
|
|
774
794
|
"alarm-disarmed": "alarm-disarmed";
|
|
795
|
+
"alarm-arming": "alarm-arming";
|
|
796
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
775
797
|
"camera-online": "camera-online";
|
|
776
798
|
"camera-offline": "camera-offline";
|
|
777
799
|
"camera-disabled": "camera-disabled";
|
|
@@ -886,6 +908,7 @@ export declare const NcRuleInputSchema: z.ZodObject<{
|
|
|
886
908
|
label: z.ZodString;
|
|
887
909
|
sequence: z.ZodString;
|
|
888
910
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
911
|
+
camera: "camera";
|
|
889
912
|
light: "light";
|
|
890
913
|
lock: "lock";
|
|
891
914
|
view: "view";
|
|
@@ -898,6 +921,10 @@ export declare const NcRuleInputSchema: z.ZodObject<{
|
|
|
898
921
|
play: "play";
|
|
899
922
|
acknowledge: "acknowledge";
|
|
900
923
|
silence: "silence";
|
|
924
|
+
snooze: "snooze";
|
|
925
|
+
"arm-home": "arm-home";
|
|
926
|
+
"arm-away": "arm-away";
|
|
927
|
+
"arm-night": "arm-night";
|
|
901
928
|
alert: "alert";
|
|
902
929
|
}>>;
|
|
903
930
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -986,6 +1013,7 @@ export declare const NcRulePatchSchema: z.ZodObject<{
|
|
|
986
1013
|
label: z.ZodString;
|
|
987
1014
|
sequence: z.ZodString;
|
|
988
1015
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
1016
|
+
camera: "camera";
|
|
989
1017
|
light: "light";
|
|
990
1018
|
lock: "lock";
|
|
991
1019
|
view: "view";
|
|
@@ -998,6 +1026,10 @@ export declare const NcRulePatchSchema: z.ZodObject<{
|
|
|
998
1026
|
play: "play";
|
|
999
1027
|
acknowledge: "acknowledge";
|
|
1000
1028
|
silence: "silence";
|
|
1029
|
+
snooze: "snooze";
|
|
1030
|
+
"arm-home": "arm-home";
|
|
1031
|
+
"arm-away": "arm-away";
|
|
1032
|
+
"arm-night": "arm-night";
|
|
1001
1033
|
alert: "alert";
|
|
1002
1034
|
}>>;
|
|
1003
1035
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1087,6 +1119,8 @@ export declare const NcRulePatchSchema: z.ZodObject<{
|
|
|
1087
1119
|
"alarm-triggered": "alarm-triggered";
|
|
1088
1120
|
"alarm-armed": "alarm-armed";
|
|
1089
1121
|
"alarm-disarmed": "alarm-disarmed";
|
|
1122
|
+
"alarm-arming": "alarm-arming";
|
|
1123
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
1090
1124
|
"camera-online": "camera-online";
|
|
1091
1125
|
"camera-offline": "camera-offline";
|
|
1092
1126
|
"camera-disabled": "camera-disabled";
|
|
@@ -1233,6 +1267,8 @@ export declare const NcRuleSchema: z.ZodObject<{
|
|
|
1233
1267
|
"alarm-triggered": "alarm-triggered";
|
|
1234
1268
|
"alarm-armed": "alarm-armed";
|
|
1235
1269
|
"alarm-disarmed": "alarm-disarmed";
|
|
1270
|
+
"alarm-arming": "alarm-arming";
|
|
1271
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
1236
1272
|
"camera-online": "camera-online";
|
|
1237
1273
|
"camera-offline": "camera-offline";
|
|
1238
1274
|
"camera-disabled": "camera-disabled";
|
|
@@ -1347,6 +1383,7 @@ export declare const NcRuleSchema: z.ZodObject<{
|
|
|
1347
1383
|
label: z.ZodString;
|
|
1348
1384
|
sequence: z.ZodString;
|
|
1349
1385
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
1386
|
+
camera: "camera";
|
|
1350
1387
|
light: "light";
|
|
1351
1388
|
lock: "lock";
|
|
1352
1389
|
view: "view";
|
|
@@ -1359,6 +1396,10 @@ export declare const NcRuleSchema: z.ZodObject<{
|
|
|
1359
1396
|
play: "play";
|
|
1360
1397
|
acknowledge: "acknowledge";
|
|
1361
1398
|
silence: "silence";
|
|
1399
|
+
snooze: "snooze";
|
|
1400
|
+
"arm-home": "arm-home";
|
|
1401
|
+
"arm-away": "arm-away";
|
|
1402
|
+
"arm-night": "arm-night";
|
|
1362
1403
|
alert: "alert";
|
|
1363
1404
|
}>>;
|
|
1364
1405
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -1522,6 +1563,8 @@ export declare const NcHistorySubjectSchema: z.ZodObject<{
|
|
|
1522
1563
|
"alarm-triggered": "alarm-triggered";
|
|
1523
1564
|
"alarm-armed": "alarm-armed";
|
|
1524
1565
|
"alarm-disarmed": "alarm-disarmed";
|
|
1566
|
+
"alarm-arming": "alarm-arming";
|
|
1567
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
1525
1568
|
"camera-online": "camera-online";
|
|
1526
1569
|
"camera-offline": "camera-offline";
|
|
1527
1570
|
"camera-disabled": "camera-disabled";
|
|
@@ -1597,6 +1640,8 @@ export declare const NcHistoryEntrySchema: z.ZodObject<{
|
|
|
1597
1640
|
"alarm-triggered": "alarm-triggered";
|
|
1598
1641
|
"alarm-armed": "alarm-armed";
|
|
1599
1642
|
"alarm-disarmed": "alarm-disarmed";
|
|
1643
|
+
"alarm-arming": "alarm-arming";
|
|
1644
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
1600
1645
|
"camera-online": "camera-online";
|
|
1601
1646
|
"camera-offline": "camera-offline";
|
|
1602
1647
|
"camera-disabled": "camera-disabled";
|
|
@@ -1879,6 +1924,8 @@ export declare const notificationRulesCapability: {
|
|
|
1879
1924
|
"alarm-triggered": "alarm-triggered";
|
|
1880
1925
|
"alarm-armed": "alarm-armed";
|
|
1881
1926
|
"alarm-disarmed": "alarm-disarmed";
|
|
1927
|
+
"alarm-arming": "alarm-arming";
|
|
1928
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
1882
1929
|
"camera-online": "camera-online";
|
|
1883
1930
|
"camera-offline": "camera-offline";
|
|
1884
1931
|
"camera-disabled": "camera-disabled";
|
|
@@ -1993,6 +2040,7 @@ export declare const notificationRulesCapability: {
|
|
|
1993
2040
|
label: z.ZodString;
|
|
1994
2041
|
sequence: z.ZodString;
|
|
1995
2042
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
2043
|
+
camera: "camera";
|
|
1996
2044
|
light: "light";
|
|
1997
2045
|
lock: "lock";
|
|
1998
2046
|
view: "view";
|
|
@@ -2005,6 +2053,10 @@ export declare const notificationRulesCapability: {
|
|
|
2005
2053
|
play: "play";
|
|
2006
2054
|
acknowledge: "acknowledge";
|
|
2007
2055
|
silence: "silence";
|
|
2056
|
+
snooze: "snooze";
|
|
2057
|
+
"arm-home": "arm-home";
|
|
2058
|
+
"arm-away": "arm-away";
|
|
2059
|
+
"arm-night": "arm-night";
|
|
2008
2060
|
alert: "alert";
|
|
2009
2061
|
}>>;
|
|
2010
2062
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2112,6 +2164,8 @@ export declare const notificationRulesCapability: {
|
|
|
2112
2164
|
"alarm-triggered": "alarm-triggered";
|
|
2113
2165
|
"alarm-armed": "alarm-armed";
|
|
2114
2166
|
"alarm-disarmed": "alarm-disarmed";
|
|
2167
|
+
"alarm-arming": "alarm-arming";
|
|
2168
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
2115
2169
|
"camera-online": "camera-online";
|
|
2116
2170
|
"camera-offline": "camera-offline";
|
|
2117
2171
|
"camera-disabled": "camera-disabled";
|
|
@@ -2226,6 +2280,7 @@ export declare const notificationRulesCapability: {
|
|
|
2226
2280
|
label: z.ZodString;
|
|
2227
2281
|
sequence: z.ZodString;
|
|
2228
2282
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
2283
|
+
camera: "camera";
|
|
2229
2284
|
light: "light";
|
|
2230
2285
|
lock: "lock";
|
|
2231
2286
|
view: "view";
|
|
@@ -2238,6 +2293,10 @@ export declare const notificationRulesCapability: {
|
|
|
2238
2293
|
play: "play";
|
|
2239
2294
|
acknowledge: "acknowledge";
|
|
2240
2295
|
silence: "silence";
|
|
2296
|
+
snooze: "snooze";
|
|
2297
|
+
"arm-home": "arm-home";
|
|
2298
|
+
"arm-away": "arm-away";
|
|
2299
|
+
"arm-night": "arm-night";
|
|
2241
2300
|
alert: "alert";
|
|
2242
2301
|
}>>;
|
|
2243
2302
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2343,6 +2402,8 @@ export declare const notificationRulesCapability: {
|
|
|
2343
2402
|
"alarm-triggered": "alarm-triggered";
|
|
2344
2403
|
"alarm-armed": "alarm-armed";
|
|
2345
2404
|
"alarm-disarmed": "alarm-disarmed";
|
|
2405
|
+
"alarm-arming": "alarm-arming";
|
|
2406
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
2346
2407
|
"camera-online": "camera-online";
|
|
2347
2408
|
"camera-offline": "camera-offline";
|
|
2348
2409
|
"camera-disabled": "camera-disabled";
|
|
@@ -2457,6 +2518,7 @@ export declare const notificationRulesCapability: {
|
|
|
2457
2518
|
label: z.ZodString;
|
|
2458
2519
|
sequence: z.ZodString;
|
|
2459
2520
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
2521
|
+
camera: "camera";
|
|
2460
2522
|
light: "light";
|
|
2461
2523
|
lock: "lock";
|
|
2462
2524
|
view: "view";
|
|
@@ -2469,6 +2531,10 @@ export declare const notificationRulesCapability: {
|
|
|
2469
2531
|
play: "play";
|
|
2470
2532
|
acknowledge: "acknowledge";
|
|
2471
2533
|
silence: "silence";
|
|
2534
|
+
snooze: "snooze";
|
|
2535
|
+
"arm-home": "arm-home";
|
|
2536
|
+
"arm-away": "arm-away";
|
|
2537
|
+
"arm-night": "arm-night";
|
|
2472
2538
|
alert: "alert";
|
|
2473
2539
|
}>>;
|
|
2474
2540
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2568,6 +2634,8 @@ export declare const notificationRulesCapability: {
|
|
|
2568
2634
|
"alarm-triggered": "alarm-triggered";
|
|
2569
2635
|
"alarm-armed": "alarm-armed";
|
|
2570
2636
|
"alarm-disarmed": "alarm-disarmed";
|
|
2637
|
+
"alarm-arming": "alarm-arming";
|
|
2638
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
2571
2639
|
"camera-online": "camera-online";
|
|
2572
2640
|
"camera-offline": "camera-offline";
|
|
2573
2641
|
"camera-disabled": "camera-disabled";
|
|
@@ -2682,6 +2750,7 @@ export declare const notificationRulesCapability: {
|
|
|
2682
2750
|
label: z.ZodString;
|
|
2683
2751
|
sequence: z.ZodString;
|
|
2684
2752
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
2753
|
+
camera: "camera";
|
|
2685
2754
|
light: "light";
|
|
2686
2755
|
lock: "lock";
|
|
2687
2756
|
view: "view";
|
|
@@ -2694,6 +2763,10 @@ export declare const notificationRulesCapability: {
|
|
|
2694
2763
|
play: "play";
|
|
2695
2764
|
acknowledge: "acknowledge";
|
|
2696
2765
|
silence: "silence";
|
|
2766
|
+
snooze: "snooze";
|
|
2767
|
+
"arm-home": "arm-home";
|
|
2768
|
+
"arm-away": "arm-away";
|
|
2769
|
+
"arm-night": "arm-night";
|
|
2697
2770
|
alert: "alert";
|
|
2698
2771
|
}>>;
|
|
2699
2772
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2782,6 +2855,7 @@ export declare const notificationRulesCapability: {
|
|
|
2782
2855
|
label: z.ZodString;
|
|
2783
2856
|
sequence: z.ZodString;
|
|
2784
2857
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
2858
|
+
camera: "camera";
|
|
2785
2859
|
light: "light";
|
|
2786
2860
|
lock: "lock";
|
|
2787
2861
|
view: "view";
|
|
@@ -2794,6 +2868,10 @@ export declare const notificationRulesCapability: {
|
|
|
2794
2868
|
play: "play";
|
|
2795
2869
|
acknowledge: "acknowledge";
|
|
2796
2870
|
silence: "silence";
|
|
2871
|
+
snooze: "snooze";
|
|
2872
|
+
"arm-home": "arm-home";
|
|
2873
|
+
"arm-away": "arm-away";
|
|
2874
|
+
"arm-night": "arm-night";
|
|
2797
2875
|
alert: "alert";
|
|
2798
2876
|
}>>;
|
|
2799
2877
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2883,6 +2961,8 @@ export declare const notificationRulesCapability: {
|
|
|
2883
2961
|
"alarm-triggered": "alarm-triggered";
|
|
2884
2962
|
"alarm-armed": "alarm-armed";
|
|
2885
2963
|
"alarm-disarmed": "alarm-disarmed";
|
|
2964
|
+
"alarm-arming": "alarm-arming";
|
|
2965
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
2886
2966
|
"camera-online": "camera-online";
|
|
2887
2967
|
"camera-offline": "camera-offline";
|
|
2888
2968
|
"camera-disabled": "camera-disabled";
|
|
@@ -3028,6 +3108,8 @@ export declare const notificationRulesCapability: {
|
|
|
3028
3108
|
"alarm-triggered": "alarm-triggered";
|
|
3029
3109
|
"alarm-armed": "alarm-armed";
|
|
3030
3110
|
"alarm-disarmed": "alarm-disarmed";
|
|
3111
|
+
"alarm-arming": "alarm-arming";
|
|
3112
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
3031
3113
|
"camera-online": "camera-online";
|
|
3032
3114
|
"camera-offline": "camera-offline";
|
|
3033
3115
|
"camera-disabled": "camera-disabled";
|
|
@@ -3142,6 +3224,7 @@ export declare const notificationRulesCapability: {
|
|
|
3142
3224
|
label: z.ZodString;
|
|
3143
3225
|
sequence: z.ZodString;
|
|
3144
3226
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
3227
|
+
camera: "camera";
|
|
3145
3228
|
light: "light";
|
|
3146
3229
|
lock: "lock";
|
|
3147
3230
|
view: "view";
|
|
@@ -3154,6 +3237,10 @@ export declare const notificationRulesCapability: {
|
|
|
3154
3237
|
play: "play";
|
|
3155
3238
|
acknowledge: "acknowledge";
|
|
3156
3239
|
silence: "silence";
|
|
3240
|
+
snooze: "snooze";
|
|
3241
|
+
"arm-home": "arm-home";
|
|
3242
|
+
"arm-away": "arm-away";
|
|
3243
|
+
"arm-night": "arm-night";
|
|
3157
3244
|
alert: "alert";
|
|
3158
3245
|
}>>;
|
|
3159
3246
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3307,6 +3394,8 @@ export declare const notificationRulesCapability: {
|
|
|
3307
3394
|
"alarm-triggered": "alarm-triggered";
|
|
3308
3395
|
"alarm-armed": "alarm-armed";
|
|
3309
3396
|
"alarm-disarmed": "alarm-disarmed";
|
|
3397
|
+
"alarm-arming": "alarm-arming";
|
|
3398
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
3310
3399
|
"camera-online": "camera-online";
|
|
3311
3400
|
"camera-offline": "camera-offline";
|
|
3312
3401
|
"camera-disabled": "camera-disabled";
|
|
@@ -3421,6 +3510,7 @@ export declare const notificationRulesCapability: {
|
|
|
3421
3510
|
label: z.ZodString;
|
|
3422
3511
|
sequence: z.ZodString;
|
|
3423
3512
|
icon: z.ZodOptional<z.ZodEnum<{
|
|
3513
|
+
camera: "camera";
|
|
3424
3514
|
light: "light";
|
|
3425
3515
|
lock: "lock";
|
|
3426
3516
|
view: "view";
|
|
@@ -3433,6 +3523,10 @@ export declare const notificationRulesCapability: {
|
|
|
3433
3523
|
play: "play";
|
|
3434
3524
|
acknowledge: "acknowledge";
|
|
3435
3525
|
silence: "silence";
|
|
3526
|
+
snooze: "snooze";
|
|
3527
|
+
"arm-home": "arm-home";
|
|
3528
|
+
"arm-away": "arm-away";
|
|
3529
|
+
"arm-night": "arm-night";
|
|
3436
3530
|
alert: "alert";
|
|
3437
3531
|
}>>;
|
|
3438
3532
|
destructive: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -3641,6 +3735,8 @@ export declare const notificationRulesCapability: {
|
|
|
3641
3735
|
"alarm-triggered": "alarm-triggered";
|
|
3642
3736
|
"alarm-armed": "alarm-armed";
|
|
3643
3737
|
"alarm-disarmed": "alarm-disarmed";
|
|
3738
|
+
"alarm-arming": "alarm-arming";
|
|
3739
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
3644
3740
|
"camera-online": "camera-online";
|
|
3645
3741
|
"camera-offline": "camera-offline";
|
|
3646
3742
|
"camera-disabled": "camera-disabled";
|
|
@@ -149,6 +149,8 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
|
|
|
149
149
|
"alarm-triggered": "alarm-triggered";
|
|
150
150
|
"alarm-armed": "alarm-armed";
|
|
151
151
|
"alarm-disarmed": "alarm-disarmed";
|
|
152
|
+
"alarm-arming": "alarm-arming";
|
|
153
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
152
154
|
"camera-online": "camera-online";
|
|
153
155
|
"camera-offline": "camera-offline";
|
|
154
156
|
"camera-disabled": "camera-disabled";
|
|
@@ -295,6 +297,8 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
|
|
|
295
297
|
"alarm-triggered": "alarm-triggered";
|
|
296
298
|
"alarm-armed": "alarm-armed";
|
|
297
299
|
"alarm-disarmed": "alarm-disarmed";
|
|
300
|
+
"alarm-arming": "alarm-arming";
|
|
301
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
298
302
|
"camera-online": "camera-online";
|
|
299
303
|
"camera-offline": "camera-offline";
|
|
300
304
|
"camera-disabled": "camera-disabled";
|
|
@@ -513,6 +517,8 @@ export declare const osdManagerCapability: {
|
|
|
513
517
|
"alarm-triggered": "alarm-triggered";
|
|
514
518
|
"alarm-armed": "alarm-armed";
|
|
515
519
|
"alarm-disarmed": "alarm-disarmed";
|
|
520
|
+
"alarm-arming": "alarm-arming";
|
|
521
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
516
522
|
"camera-online": "camera-online";
|
|
517
523
|
"camera-offline": "camera-offline";
|
|
518
524
|
"camera-disabled": "camera-disabled";
|
|
@@ -747,6 +753,8 @@ export declare const osdManagerCapability: {
|
|
|
747
753
|
"alarm-triggered": "alarm-triggered";
|
|
748
754
|
"alarm-armed": "alarm-armed";
|
|
749
755
|
"alarm-disarmed": "alarm-disarmed";
|
|
756
|
+
"alarm-arming": "alarm-arming";
|
|
757
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
750
758
|
"camera-online": "camera-online";
|
|
751
759
|
"camera-offline": "camera-offline";
|
|
752
760
|
"camera-disabled": "camera-disabled";
|
|
@@ -892,6 +900,8 @@ export declare const osdManagerCapability: {
|
|
|
892
900
|
"alarm-triggered": "alarm-triggered";
|
|
893
901
|
"alarm-armed": "alarm-armed";
|
|
894
902
|
"alarm-disarmed": "alarm-disarmed";
|
|
903
|
+
"alarm-arming": "alarm-arming";
|
|
904
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
895
905
|
"camera-online": "camera-online";
|
|
896
906
|
"camera-offline": "camera-offline";
|
|
897
907
|
"camera-disabled": "camera-disabled";
|
|
@@ -1069,6 +1079,8 @@ export declare const osdManagerCapability: {
|
|
|
1069
1079
|
"alarm-triggered": "alarm-triggered";
|
|
1070
1080
|
"alarm-armed": "alarm-armed";
|
|
1071
1081
|
"alarm-disarmed": "alarm-disarmed";
|
|
1082
|
+
"alarm-arming": "alarm-arming";
|
|
1083
|
+
"alarm-arm-refused": "alarm-arm-refused";
|
|
1072
1084
|
"camera-online": "camera-online";
|
|
1073
1085
|
"camera-offline": "camera-offline";
|
|
1074
1086
|
"camera-disabled": "camera-disabled";
|
|
@@ -1,4 +1,25 @@
|
|
|
1
1
|
import type { LabelDefinition, ClassMapDefinition } from '../types/labels.js';
|
|
2
2
|
export declare const COCO_80_LABELS: readonly LabelDefinition[];
|
|
3
3
|
export declare const MACRO_LABELS: readonly LabelDefinition[];
|
|
4
|
+
/**
|
|
5
|
+
* The class names a per-class COUNT can ever be keyed on — the macro ids, and
|
|
6
|
+
* only those.
|
|
7
|
+
*
|
|
8
|
+
* `preserveOriginal: false` below is the whole reason this set exists: the
|
|
9
|
+
* executor maps each raw COCO label onto its macro and DROPS everything else,
|
|
10
|
+
* so a tracked detection's `className` is always one of {@link MACRO_LABELS}.
|
|
11
|
+
* Any surface that indexes counts by class name — the ZoneAnalytics occupancy
|
|
12
|
+
* snapshot's `byClass`, and therefore every occupancy rule — can match nothing
|
|
13
|
+
* else. Derived from the catalog, never hand-listed, so a new macro joins it by
|
|
14
|
+
* being declared once.
|
|
15
|
+
*
|
|
16
|
+
* Cost of not having it, 2026-08-12: the notification rule editor offered the
|
|
17
|
+
* full taxonomy for an occupancy class (occupancy is the one condition that
|
|
18
|
+
* does not go through the engine's macro-expanding `expandClassSelector`), two
|
|
19
|
+
* live rules were authored on `car`, and both counters read 0 forever.
|
|
20
|
+
*/
|
|
21
|
+
export declare const DETECTION_MACRO_CLASSES: ReadonlySet<string>;
|
|
22
|
+
/** True when `className` is a macro the detector can actually emit (and hence a
|
|
23
|
+
* class a count can be keyed on) — see {@link DETECTION_MACRO_CLASSES}. */
|
|
24
|
+
export declare function isDetectionMacroClass(className: string): boolean;
|
|
4
25
|
export declare const COCO_TO_MACRO: ClassMapDefinition;
|
|
@@ -54,9 +54,24 @@ import { type SliceHandleApi } from './device-state-handle.js';
|
|
|
54
54
|
*/
|
|
55
55
|
export interface SystemMirrorApi extends SliceHandleApi {
|
|
56
56
|
readonly deviceManager: {
|
|
57
|
+
/**
|
|
58
|
+
* Whole-fleet binding dump. WARM BOOT ONLY — 903 ms and 373 KB on a
|
|
59
|
+
* 524-device hub. Anything on the event path uses `getBindings`.
|
|
60
|
+
*/
|
|
57
61
|
readonly getAllBindings: {
|
|
58
62
|
query(input: Record<string, never>): Promise<ReadonlyArray<DeviceBinding>>;
|
|
59
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Single-device binding read. Required — `refreshBinding` runs once
|
|
66
|
+
* per `capability.binding-changed` and once per `device.registered`,
|
|
67
|
+
* and a full-fleet fetch there is what turned a 20-device Home
|
|
68
|
+
* Assistant adoption into 166 fleet sweeps (see `refreshBinding`).
|
|
69
|
+
*/
|
|
70
|
+
readonly getBindings: {
|
|
71
|
+
query(input: {
|
|
72
|
+
deviceId: number;
|
|
73
|
+
}): Promise<DeviceBinding>;
|
|
74
|
+
};
|
|
60
75
|
readonly listAll: {
|
|
61
76
|
query(input: {
|
|
62
77
|
addonId?: string;
|
|
@@ -327,6 +342,28 @@ export declare class SystemMirror {
|
|
|
327
342
|
private subscribeBus;
|
|
328
343
|
private applyStateUpdate;
|
|
329
344
|
private applyDeviceRemoval;
|
|
345
|
+
/**
|
|
346
|
+
* ONE device's bindings, not the fleet's.
|
|
347
|
+
*
|
|
348
|
+
* This runs on every `capability.binding-changed` AND on every
|
|
349
|
+
* `device.registered`, per mirror. It used to answer that with
|
|
350
|
+
* `getAllBindings` and `.find()` the one row — measured on the live
|
|
351
|
+
* hub (524 devices): 903 ms and 373 KB per call, against 21 ms and
|
|
352
|
+
* 613 bytes for `getBindings({deviceId})`.
|
|
353
|
+
*
|
|
354
|
+
* Adopting 20 Home Assistant devices registers 166 devices (parents +
|
|
355
|
+
* accessories), so an operator with the admin UI open bought 166
|
|
356
|
+
* full-fleet binding sweeps: ~150 s of hub main-thread time inside a
|
|
357
|
+
* 219 s adoption, with every other RPC — including the adoption's own —
|
|
358
|
+
* queued behind them. Same defect, same fix, as `refreshDeviceMetadata`
|
|
359
|
+
* below (`listAll` → `getDevice`).
|
|
360
|
+
*
|
|
361
|
+
* Removal is the destructive direction (every proxy handle a consumer
|
|
362
|
+
* holds goes inert), and an EMPTY binding list is not a claim that the
|
|
363
|
+
* device is gone — a device can legitimately bind nothing. So it needs
|
|
364
|
+
* a second read to agree (D49); `device.unregistered` remains the
|
|
365
|
+
* primary removal path.
|
|
366
|
+
*/
|
|
330
367
|
private refreshBinding;
|
|
331
368
|
private refreshDeviceMetadata;
|
|
332
369
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export { AutomationActionSchema, AutomationConditionOperatorSchema, AutomationCo
|
|
|
119
119
|
export * from './cap-call-context.js';
|
|
120
120
|
export * from './capabilities/index.js';
|
|
121
121
|
export { APPLE_SA_TO_MACRO, AUDIO_MACRO_LABELS, getAudioMacroClassIds, mapAudioLabelToMacro, YAMNET_TO_MACRO, } from './catalogs/audio-classmap.js';
|
|
122
|
-
export { COCO_80_LABELS, COCO_TO_MACRO, MACRO_LABELS, } from './catalogs/coco-classmap.js';
|
|
122
|
+
export { COCO_80_LABELS, COCO_TO_MACRO, DETECTION_MACRO_CLASSES, isDetectionMacroClass, MACRO_LABELS, } from './catalogs/coco-classmap.js';
|
|
123
123
|
export { DEVICE_STATE_READERS, readDeviceStateFrom, stateVocabularyFor, } from './catalogs/device-state-vocabulary.js';
|
|
124
124
|
export { colorForKind, DEFAULT_EVENT_COLOR, EVENT_TAXONOMY, type EventTaxonomyCategory, type EventTaxonomyEntry, type EventTaxonomyLevel, getTaxonomyEntry, subKindsOf, TAXONOMY_COLORS, } from './catalogs/event-taxonomy.js';
|
|
125
125
|
export { buildNcTaxonomy, NC_TAXONOMY, type NcTaxonomy, type NcTaxonomyEntry, NcTaxonomyEntrySchema, NcTaxonomySchema, } from './catalogs/nc-taxonomy.js';
|