@camstack/types 1.2.55 → 1.2.56

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.
@@ -122,6 +122,21 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
122
122
  delivered: "delivered";
123
123
  "picked-up": "picked-up";
124
124
  }>>;
125
+ systemEvent: z.ZodOptional<z.ZodObject<{
126
+ kinds: z.ZodArray<z.ZodEnum<{
127
+ "camera-online": "camera-online";
128
+ "camera-offline": "camera-offline";
129
+ "stream-online": "stream-online";
130
+ "stream-offline": "stream-offline";
131
+ "node-online": "node-online";
132
+ "node-offline": "node-offline";
133
+ "addon-update-available": "addon-update-available";
134
+ "server-update-available": "server-update-available";
135
+ }>>;
136
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
137
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
138
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
139
+ }, z.core.$strip>>;
125
140
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
126
141
  kind: z.ZodLiteral<"polygon">;
127
142
  points: z.ZodArray<z.ZodObject<{
@@ -231,6 +246,21 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
231
246
  delivered: "delivered";
232
247
  "picked-up": "picked-up";
233
248
  }>>;
249
+ systemEvent: z.ZodOptional<z.ZodObject<{
250
+ kinds: z.ZodArray<z.ZodEnum<{
251
+ "camera-online": "camera-online";
252
+ "camera-offline": "camera-offline";
253
+ "stream-online": "stream-online";
254
+ "stream-offline": "stream-offline";
255
+ "node-online": "node-online";
256
+ "node-offline": "node-offline";
257
+ "addon-update-available": "addon-update-available";
258
+ "server-update-available": "server-update-available";
259
+ }>>;
260
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
261
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
262
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
263
+ }, z.core.$strip>>;
234
264
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
235
265
  kind: z.ZodLiteral<"polygon">;
236
266
  points: z.ZodArray<z.ZodObject<{
@@ -412,6 +442,21 @@ export declare const osdManagerCapability: {
412
442
  delivered: "delivered";
413
443
  "picked-up": "picked-up";
414
444
  }>>;
445
+ systemEvent: z.ZodOptional<z.ZodObject<{
446
+ kinds: z.ZodArray<z.ZodEnum<{
447
+ "camera-online": "camera-online";
448
+ "camera-offline": "camera-offline";
449
+ "stream-online": "stream-online";
450
+ "stream-offline": "stream-offline";
451
+ "node-online": "node-online";
452
+ "node-offline": "node-offline";
453
+ "addon-update-available": "addon-update-available";
454
+ "server-update-available": "server-update-available";
455
+ }>>;
456
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
457
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
458
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
459
+ }, z.core.$strip>>;
415
460
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
416
461
  kind: z.ZodLiteral<"polygon">;
417
462
  points: z.ZodArray<z.ZodObject<{
@@ -470,6 +515,7 @@ export declare const osdManagerCapability: {
470
515
  catalog: z.ZodArray<z.ZodObject<{
471
516
  id: z.ZodString;
472
517
  group: z.ZodEnum<{
518
+ system: "system";
473
519
  device: "device";
474
520
  label: "label";
475
521
  scope: "scope";
@@ -486,6 +532,7 @@ export declare const osdManagerCapability: {
486
532
  deviceState: "deviceState";
487
533
  schedule: "schedule";
488
534
  packagePhase: "packagePhase";
535
+ systemEvent: "systemEvent";
489
536
  occupancy: "occupancy";
490
537
  deviceIdList: "deviceIdList";
491
538
  stringList: "stringList";
@@ -511,6 +558,7 @@ export declare const osdManagerCapability: {
511
558
  immediate: "immediate";
512
559
  "track-end": "track-end";
513
560
  "package-event": "package-event";
561
+ "system-event": "system-event";
514
562
  }>>;
515
563
  phase: z.ZodString;
516
564
  description: z.ZodOptional<z.ZodString>;
@@ -604,6 +652,21 @@ export declare const osdManagerCapability: {
604
652
  delivered: "delivered";
605
653
  "picked-up": "picked-up";
606
654
  }>>;
655
+ systemEvent: z.ZodOptional<z.ZodObject<{
656
+ kinds: z.ZodArray<z.ZodEnum<{
657
+ "camera-online": "camera-online";
658
+ "camera-offline": "camera-offline";
659
+ "stream-online": "stream-online";
660
+ "stream-offline": "stream-offline";
661
+ "node-online": "node-online";
662
+ "node-offline": "node-offline";
663
+ "addon-update-available": "addon-update-available";
664
+ "server-update-available": "server-update-available";
665
+ }>>;
666
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
667
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
668
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
669
+ }, z.core.$strip>>;
607
670
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
608
671
  kind: z.ZodLiteral<"polygon">;
609
672
  points: z.ZodArray<z.ZodObject<{
@@ -712,6 +775,21 @@ export declare const osdManagerCapability: {
712
775
  delivered: "delivered";
713
776
  "picked-up": "picked-up";
714
777
  }>>;
778
+ systemEvent: z.ZodOptional<z.ZodObject<{
779
+ kinds: z.ZodArray<z.ZodEnum<{
780
+ "camera-online": "camera-online";
781
+ "camera-offline": "camera-offline";
782
+ "stream-online": "stream-online";
783
+ "stream-offline": "stream-offline";
784
+ "node-online": "node-online";
785
+ "node-offline": "node-offline";
786
+ "addon-update-available": "addon-update-available";
787
+ "server-update-available": "server-update-available";
788
+ }>>;
789
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
790
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
791
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
792
+ }, z.core.$strip>>;
715
793
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
716
794
  kind: z.ZodLiteral<"polygon">;
717
795
  points: z.ZodArray<z.ZodObject<{
@@ -840,6 +918,21 @@ export declare const osdManagerCapability: {
840
918
  delivered: "delivered";
841
919
  "picked-up": "picked-up";
842
920
  }>>;
921
+ systemEvent: z.ZodOptional<z.ZodObject<{
922
+ kinds: z.ZodArray<z.ZodEnum<{
923
+ "camera-online": "camera-online";
924
+ "camera-offline": "camera-offline";
925
+ "stream-online": "stream-online";
926
+ "stream-offline": "stream-offline";
927
+ "node-online": "node-online";
928
+ "node-offline": "node-offline";
929
+ "addon-update-available": "addon-update-available";
930
+ "server-update-available": "server-update-available";
931
+ }>>;
932
+ deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
933
+ nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
934
+ packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
935
+ }, z.core.$strip>>;
843
936
  customZones: z.ZodOptional<z.ZodArray<z.ZodObject<{
844
937
  kind: z.ZodLiteral<"polygon">;
845
938
  points: z.ZodArray<z.ZodObject<{
@@ -12,6 +12,13 @@ export declare enum EventCategory {
12
12
  * Spec: docs/superpowers/specs/2026-05-14-framework-live-update-design.md
13
13
  */
14
14
  SystemRestartCompleted = "system.restart-completed",
15
+ /**
16
+ * A newer addon or server-root package version was found by the
17
+ * authoritative registry check. Emitted once per
18
+ * `(target, packageName, currentVersion, latestVersion)` transition; repeated
19
+ * polling of the same result is deduplicated by the checker.
20
+ */
21
+ UpdateAvailable = "update.available",
15
22
  /**
16
23
  * Readiness transition for a capability provider. Every producer emits
17
24
  * this event on `onInitialize` completion, `onDestroy`, and
package/dist/enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-BE4PDZ_3.js");
2
+ const require_event_category = require("./event-category-DxZbWydC.js");
3
3
  //#region src/enums/event-source-type.ts
4
4
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
5
5
  EventSourceType["Addon"] = "addon";
package/dist/enums.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-41fKf-q9.mjs";
1
+ import { t as EventCategory } from "./event-category-Cv9dO26A.mjs";
2
2
  //#region src/enums/event-source-type.ts
3
3
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
4
4
  EventSourceType["Addon"] = "addon";
@@ -14,6 +14,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  */
15
15
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
16
16
  /**
17
+ * A newer addon or server-root package version was found by the
18
+ * authoritative registry check. Emitted once per
19
+ * `(target, packageName, currentVersion, latestVersion)` transition; repeated
20
+ * polling of the same result is deduplicated by the checker.
21
+ */
22
+ EventCategory["UpdateAvailable"] = "update.available";
23
+ /**
17
24
  * Readiness transition for a capability provider. Every producer emits
18
25
  * this event on `onInitialize` completion, `onDestroy`, and
19
26
  * `$node.reconnect`; every consumer that needs to gate on a cross-process
@@ -14,6 +14,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
14
14
  */
15
15
  EventCategory["SystemRestartCompleted"] = "system.restart-completed";
16
16
  /**
17
+ * A newer addon or server-root package version was found by the
18
+ * authoritative registry check. Emitted once per
19
+ * `(target, packageName, currentVersion, latestVersion)` transition; repeated
20
+ * polling of the same result is deduplicated by the checker.
21
+ */
22
+ EventCategory["UpdateAvailable"] = "update.available";
23
+ /**
17
24
  * Readiness transition for a capability provider. Every producer emits
18
25
  * this event on `onInitialize` completion, `onDestroy`, and
19
26
  * `$node.reconnect`; every consumer that needs to gate on a cross-process
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-BE4PDZ_3.js");
3
- const require_sleep = require("./sleep-DfF6vKCf.js");
2
+ const require_event_category = require("./event-category-DxZbWydC.js");
3
+ const require_sleep = require("./sleep-EX1-qUVR.js");
4
4
  const require_canonical_hash = require("./canonical-hash-DNV8S5ET.js");
5
5
  const require_enums = require("./enums.js");
6
6
  const require_err_msg = require("./err-msg-COpsHMw2.js");
@@ -11659,9 +11659,36 @@ var NcDeliverySchema = zod.z.enum([
11659
11659
  "immediate",
11660
11660
  "track-end",
11661
11661
  "device-event",
11662
- "package-event"
11662
+ "package-event",
11663
+ "system-event"
11663
11664
  ]);
11664
11665
  /**
11666
+ * Stable Notification Center vocabulary over infrastructure/liveness events.
11667
+ * Bus categories are normalized into these intent-level kinds so rules do not
11668
+ * depend on a provider's raw event name or payload shape.
11669
+ */
11670
+ var NcSystemEventKindSchema = zod.z.enum([
11671
+ "camera-online",
11672
+ "camera-offline",
11673
+ "stream-online",
11674
+ "stream-offline",
11675
+ "node-online",
11676
+ "node-offline",
11677
+ "addon-update-available",
11678
+ "server-update-available"
11679
+ ]);
11680
+ /**
11681
+ * One coherent system-event condition. `kinds` is the required opt-in safety
11682
+ * gate; the remaining lists are optional narrowing filters relevant to the
11683
+ * selected kinds.
11684
+ */
11685
+ var NcSystemEventConditionSchema = zod.z.object({
11686
+ kinds: zod.z.array(NcSystemEventKindSchema).min(1),
11687
+ deviceIds: zod.z.array(zod.z.number().int()).min(1).optional(),
11688
+ nodeIds: zod.z.array(zod.z.string().min(1)).min(1).optional(),
11689
+ packageNames: zod.z.array(zod.z.string().min(1)).min(1).optional()
11690
+ });
11691
+ /**
11665
11692
  * `maxPerTrack` for `immediate` rules is FIXED at 1 (D-3): a single track
11666
11693
  * fires an immediate rule at most once, enforced durably by the outbox
11667
11694
  * unique key `(ruleId, trackId, targetId)`. Not a rule field in P1.
@@ -11984,6 +12011,8 @@ var NcConditionsSchema = zod.z.object({
11984
12011
  "picked-up",
11985
12012
  "both"
11986
12013
  ]).optional(),
12014
+ /** Infrastructure/liveness/update event matcher (`system-event` delivery). */
12015
+ systemEvent: NcSystemEventConditionSchema.optional(),
11987
12016
  /**
11988
12017
  * PERSONAL-RULE custom zones (viewer-drawn). Inline normalized polygons
11989
12018
  * (MaskShape vocabulary). A record passes when its bbox overlaps ANY
@@ -12203,7 +12232,8 @@ var NcTestResultSchema = zod.z.object({
12203
12232
  "object-event",
12204
12233
  "track",
12205
12234
  "device-event",
12206
- "package-event"
12235
+ "package-event",
12236
+ "system-event"
12207
12237
  ]),
12208
12238
  deviceId: zod.z.number(),
12209
12239
  timestamp: zod.z.number(),
@@ -12225,7 +12255,8 @@ var NcConditionDescriptorSchema = zod.z.object({
12225
12255
  "schedule",
12226
12256
  "device",
12227
12257
  "package",
12228
- "occupancy"
12258
+ "occupancy",
12259
+ "system"
12229
12260
  ]),
12230
12261
  label: zod.z.string(),
12231
12262
  /** Editor widget the UI renders — never hardcode per-condition forms. */
@@ -12243,7 +12274,8 @@ var NcConditionDescriptorSchema = zod.z.object({
12243
12274
  "crossingSelect",
12244
12275
  "polygonDraw",
12245
12276
  "occupancy",
12246
- "deviceState"
12277
+ "deviceState",
12278
+ "systemEvent"
12247
12279
  ]),
12248
12280
  operator: zod.z.enum([
12249
12281
  "in",
@@ -12285,6 +12317,50 @@ var NcConditionDescriptorSchema = zod.z.object({
12285
12317
  * rule editors render from the catalog, not hardcoded forms (spec §4.2).
12286
12318
  */
12287
12319
  var NC_CONDITION_CATALOG = [
12320
+ {
12321
+ id: "systemEvent",
12322
+ group: "system",
12323
+ label: "System event",
12324
+ valueType: "systemEvent",
12325
+ options: [
12326
+ {
12327
+ value: "camera-online",
12328
+ label: "Camera online"
12329
+ },
12330
+ {
12331
+ value: "camera-offline",
12332
+ label: "Camera offline"
12333
+ },
12334
+ {
12335
+ value: "stream-online",
12336
+ label: "Stream online"
12337
+ },
12338
+ {
12339
+ value: "stream-offline",
12340
+ label: "Stream offline"
12341
+ },
12342
+ {
12343
+ value: "node-online",
12344
+ label: "Node online"
12345
+ },
12346
+ {
12347
+ value: "node-offline",
12348
+ label: "Node offline"
12349
+ },
12350
+ {
12351
+ value: "addon-update-available",
12352
+ label: "Addon update available"
12353
+ },
12354
+ {
12355
+ value: "server-update-available",
12356
+ label: "Server update available"
12357
+ }
12358
+ ],
12359
+ operator: "in",
12360
+ appliesTo: ["system-event"],
12361
+ phase: "P1",
12362
+ description: "Infrastructure and update events. Optionally narrow camera/stream events by device, node events by node id, and addon updates by package name."
12363
+ },
12288
12364
  {
12289
12365
  id: "devices",
12290
12366
  group: "scope",
@@ -12599,7 +12675,8 @@ var NC_CONDITION_CATALOG = [
12599
12675
  "immediate",
12600
12676
  "track-end",
12601
12677
  "device-event",
12602
- "package-event"
12678
+ "package-event",
12679
+ "system-event"
12603
12680
  ],
12604
12681
  phase: "P1",
12605
12682
  description: "Weekly activation windows (invertible); absent = always active."
@@ -12627,7 +12704,8 @@ var NcHistoryRecordKindSchema = zod.z.enum([
12627
12704
  "object-event",
12628
12705
  "track-end",
12629
12706
  "device-event",
12630
- "package-event"
12707
+ "package-event",
12708
+ "system-event"
12631
12709
  ]);
12632
12710
  /** Subject summary frozen on the row at fire time (survives rule/record edits). */
12633
12711
  var NcHistorySubjectSchema = zod.z.object({
@@ -12635,7 +12713,14 @@ var NcHistorySubjectSchema = zod.z.object({
12635
12713
  label: zod.z.string().optional(),
12636
12714
  confidence: zod.z.number().optional(),
12637
12715
  zones: zod.z.array(zod.z.string()),
12638
- timestamp: zod.z.number()
12716
+ timestamp: zod.z.number(),
12717
+ systemEvent: zod.z.object({
12718
+ kind: NcSystemEventKindSchema,
12719
+ subject: zod.z.string(),
12720
+ title: zod.z.string(),
12721
+ body: zod.z.string(),
12722
+ data: zod.z.record(zod.z.string(), zod.z.unknown())
12723
+ }).optional()
12639
12724
  });
12640
12725
  /**
12641
12726
  * One delivery-history row. This is a read-only VIEW over the durable
@@ -40283,6 +40368,8 @@ exports.NcSnoozeInputSchema = NcSnoozeInputSchema;
40283
40368
  exports.NcSnoozeSchema = NcSnoozeSchema;
40284
40369
  exports.NcSnoozeScopeSchema = NcSnoozeScopeSchema;
40285
40370
  exports.NcSnoozeSuppressedSchema = NcSnoozeSuppressedSchema;
40371
+ exports.NcSystemEventConditionSchema = NcSystemEventConditionSchema;
40372
+ exports.NcSystemEventKindSchema = NcSystemEventKindSchema;
40286
40373
  exports.NcTaxonomyEntrySchema = NcTaxonomyEntrySchema;
40287
40374
  exports.NcTaxonomySchema = NcTaxonomySchema;
40288
40375
  exports.NcTestResultSchema = NcTestResultSchema;