@camstack/addon-mqtt-broker 1.2.139 → 1.2.141

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.
@@ -46,7 +46,7 @@ let node_fs = require("node:fs");
46
46
  node_fs = __toESM(node_fs);
47
47
  let node_path = require("node:path");
48
48
  node_path = __toESM(node_path);
49
- //#region ../types/dist/event-category-DOl51-Ij.mjs
49
+ //#region ../types/dist/event-category-BfJwUd2S.mjs
50
50
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
51
51
  EventCategory["SystemBoot"] = "system.boot";
52
52
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -363,6 +363,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
363
363
  */
364
364
  EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
365
365
  /**
366
+ * A camera's motion source has fired constantly with no subject for an hour
367
+ * (motion duty or session count over the bar, zero detections) — it is not
368
+ * blind, its motion zones or sensitivity want tuning (D907). Paired with
369
+ * {@link PipelineMotionCalm}.
370
+ */
371
+ EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
372
+ /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
373
+ EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
374
+ /**
366
375
  * Per-camera pipeline config was mutated by the orchestrator
367
376
  * (3-level settings change via `setAgentAddonDefaults` /
368
377
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -734,6 +743,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
734
743
  EventCategory["BackupRestored"] = "backup.restored";
735
744
  EventCategory["NotificationDispatched"] = "notification.dispatched";
736
745
  EventCategory["NotificationFailed"] = "notification.failed";
746
+ /**
747
+ * A notification rule that cannot work (D905): its stored row does not load,
748
+ * or it still names a device / delivery target the prune CONFIRMED deleted.
749
+ * One edge per rule per distinct set of reasons; never on an unanswered read.
750
+ */
751
+ EventCategory["NotificationRuleBroken"] = "notification.rule-broken";
752
+ /** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
753
+ EventCategory["NotificationRuleRepaired"] = "notification.rule-repaired";
737
754
  EventCategory["DeviceUpdated"] = "device.updated";
738
755
  /**
739
756
  * Transport-level connectivity. Emitted by the device driver when
@@ -5594,7 +5611,7 @@ var ZodIssueCode = {
5594
5611
  var ZodFirstPartyTypeKind;
5595
5612
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5596
5613
  //#endregion
5597
- //#region ../types/dist/sleep-_sV1BE2f.mjs
5614
+ //#region ../types/dist/sleep-DJFUfKvA.mjs
5598
5615
  /**
5599
5616
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5600
5617
  * window to float samples (D455).
@@ -8193,7 +8210,7 @@ var EntryDescriptorSchema = object({
8193
8210
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
8194
8211
  fields: record(string(), unknown())
8195
8212
  }).strict();
8196
- /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
8213
+ /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
8197
8214
  var RecordKindDeclarationSchema = object({
8198
8215
  database: _enum(RECORD_DATABASES).default("settings"),
8199
8216
  class: _enum(RECORD_CLASSES),
@@ -8212,14 +8229,6 @@ var RecordKindDeclarationSchema = object({
8212
8229
  secretPaths: array(string().min(1)).default([]),
8213
8230
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
8214
8231
  secretArrayKeys: record(string(), string()).default({}),
8215
- /**
8216
- * RETIRED (D900): the legacy table a kind adopted from during the records
8217
- * migration. Nothing declares it any more and nothing reads it; the schema
8218
- * still ACCEPTS it because the catalog rows the migration wrote carry it
8219
- * (an orphaned kind is never redeclared) and an addon built before the
8220
- * removal still sends it. Never set it.
8221
- */
8222
- adoptsFrom: string().min(1).optional(),
8223
8232
  /** Kinds that must agree through `transact` sit in one file under one family name. */
8224
8233
  transactFamily: string().min(1).optional(),
8225
8234
  entry: EntryDescriptorSchema.optional()
@@ -13001,17 +13010,6 @@ object({
13001
13010
  createdAt: number(),
13002
13011
  updatedAt: number()
13003
13012
  });
13004
- object({
13005
- id: string(),
13006
- label: string(),
13007
- isAdmin: boolean().default(false),
13008
- allowedProviders: AllowedProviderSchema,
13009
- allowedDevices: AllowedDevicesSchema,
13010
- tokenHash: string(),
13011
- tokenPrefix: string(),
13012
- createdAt: number(),
13013
- lastUsedAt: number().optional()
13014
- });
13015
13013
  object({
13016
13014
  id: string(),
13017
13015
  userId: string(),
@@ -16936,16 +16934,36 @@ var RecordKindStateSchema = _enum([
16936
16934
  var DeclareKindResultSchema = object({
16937
16935
  kindId: number().int(),
16938
16936
  state: RecordKindStateSchema,
16939
- createdIndexes: array(string()),
16940
- /**
16941
- * RETIRED (D900): always `null`. It carried the records-migration boot guard;
16942
- * it stays on the wire, null, because an addon built before the removal reads
16943
- * an ABSENT field as "adoption pending" and refuses to start.
16944
- */
16945
- adoptionPending: _null()
16937
+ createdIndexes: array(string())
16946
16938
  });
16947
16939
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16948
16940
  var SecretRefsList = array(string());
16941
+ /**
16942
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
16943
+ * All ops of one call share ONE database file and ONE `transactFamily`.
16944
+ */
16945
+ var RecordTransactOpSchema = discriminatedUnion("op", [
16946
+ object({
16947
+ op: literal("put"),
16948
+ kind: RecordKindNameSchema,
16949
+ record: RecordInputSchema,
16950
+ ifRev: number().int().min(0).optional()
16951
+ }),
16952
+ object({
16953
+ op: literal("patch"),
16954
+ kind: RecordKindNameSchema,
16955
+ id: RecordIdSchema,
16956
+ data: RecordBodySchema,
16957
+ at: number().int().nullable().optional(),
16958
+ expiresAt: number().int().nullable().optional(),
16959
+ ifRev: number().int().min(1).optional()
16960
+ }),
16961
+ object({
16962
+ op: literal("delete"),
16963
+ kind: RecordKindNameSchema,
16964
+ id: RecordIdSchema
16965
+ })
16966
+ ]);
16949
16967
  var RecordSecretRefsSchema = record(string(), record(string(), string()));
16950
16968
  method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16951
16969
  kind: "mutation",
@@ -17052,6 +17070,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
17052
17070
  }), {
17053
17071
  kind: "mutation",
17054
17072
  auth: "admin"
17073
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
17074
+ results: array(object({
17075
+ rev: number().int().nullable(),
17076
+ deleted: boolean()
17077
+ })),
17078
+ releasedRefs: SecretRefsList,
17079
+ secretRefs: SecretRefsList
17080
+ }), {
17081
+ kind: "mutation",
17082
+ auth: "admin"
17055
17083
  }), method(object({
17056
17084
  deviceId: number().int(),
17057
17085
  kinds: array(RecordKindNameSchema).optional()
@@ -42429,9 +42457,13 @@ var NcSystemEventKindSchema = _enum([
42429
42457
  "node-updating",
42430
42458
  "node-inference-unavailable",
42431
42459
  "detection-blind",
42460
+ "motion-noisy",
42461
+ "motion-calm",
42432
42462
  "recording-stalled",
42433
42463
  "recording-healthy",
42434
42464
  "recording-degraded",
42465
+ "device-attention-required",
42466
+ "device-attention-resolved",
42435
42467
  "storage-location-low",
42436
42468
  "storage-location-critical",
42437
42469
  "storage-location-ok",
@@ -42455,6 +42487,8 @@ var NcSystemEventKindSchema = _enum([
42455
42487
  "alert-critical",
42456
42488
  "alert-error",
42457
42489
  "alert-critical-resolved",
42490
+ "rule-broken",
42491
+ "rule-repaired",
42458
42492
  "camera-online",
42459
42493
  "camera-offline",
42460
42494
  "camera-disabled",
@@ -54886,6 +54920,16 @@ object({
54886
54920
  powerState: string().nullable(),
54887
54921
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
54888
54922
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
54923
+ /**
54924
+ * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
54925
+ * combined care-and-filter reminder raised); false when every such reminder reads clear; null
54926
+ * when none is reported. A cleared reminder is not an unknown one.
54927
+ */
54928
+ filterCleaningDue: boolean().nullable(),
54929
+ /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
54930
+ machineCareDue: boolean().nullable(),
54931
+ /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
54932
+ machineCareRemainingRuns: number().int().nonnegative().nullable(),
54889
54933
  /** Option states: null when the appliance does not expose the option or has not said. */
54890
54934
  halfLoad: boolean().nullable(),
54891
54935
  hygienePlus: boolean().nullable(),
@@ -61503,16 +61547,6 @@ var UpdateUserInputSchema = object({
61503
61547
  allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
61504
61548
  scopes: array(TokenScopeSchema).optional()
61505
61549
  });
61506
- var ApiKeySummarySchema = object({
61507
- id: string(),
61508
- label: string(),
61509
- isAdmin: boolean().default(false),
61510
- allowedProviders: union([array(string()), literal("*")]).optional(),
61511
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
61512
- tokenPrefix: string(),
61513
- createdAt: number(),
61514
- lastUsedAt: number().optional()
61515
- });
61516
61550
  var OauthSessionSummarySchema = object({
61517
61551
  id: string(),
61518
61552
  userId: string(),
@@ -61534,8 +61568,7 @@ var TotpStatusSchema = object({
61534
61568
  confirmedAt: number().nullable()
61535
61569
  });
61536
61570
  /**
61537
- * user-management — singleton capability for user accounts and the
61538
- * legacy API-key rows.
61571
+ * user-management — singleton capability for user accounts.
61539
61572
  *
61540
61573
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
61541
61574
  * — the subset check on `setUserScopes` is moot
@@ -61591,10 +61624,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
61591
61624
  }), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
61592
61625
  kind: "mutation",
61593
61626
  access: "view"
61594
- }), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
61595
- kind: "mutation",
61596
- auth: "admin",
61597
- access: "delete"
61598
61627
  }), method(object({ userId: string() }), TotpSetupResultSchema, {
61599
61628
  kind: "mutation",
61600
61629
  auth: "admin",
@@ -69107,6 +69136,12 @@ Object.freeze({
69107
69136
  addonId: null,
69108
69137
  access: "view"
69109
69138
  },
69139
+ "records.transact": {
69140
+ capName: "records",
69141
+ capScope: "system",
69142
+ addonId: null,
69143
+ access: "create"
69144
+ },
69110
69145
  "sceneMonitor.captureReference": {
69111
69146
  capName: "scene-monitor",
69112
69147
  capScope: "device",
@@ -70439,12 +70474,6 @@ Object.freeze({
70439
70474
  addonId: null,
70440
70475
  access: "view"
70441
70476
  },
70442
- "userManagement.listApiKeys": {
70443
- capName: "user-management",
70444
- capScope: "system",
70445
- addonId: null,
70446
- access: "view"
70447
- },
70448
70477
  "userManagement.listExternalIdentities": {
70449
70478
  capName: "user-management",
70450
70479
  capScope: "system",
@@ -70499,12 +70528,6 @@ Object.freeze({
70499
70528
  addonId: null,
70500
70529
  access: "create"
70501
70530
  },
70502
- "userManagement.revokeApiKey": {
70503
- capName: "user-management",
70504
- capScope: "system",
70505
- addonId: null,
70506
- access: "delete"
70507
- },
70508
70531
  "userManagement.revokeOauthSession": {
70509
70532
  capName: "user-management",
70510
70533
  capScope: "system",
@@ -73869,9 +73892,13 @@ new Map(Object.entries({
73869
73892
  "stream-online": "device-events",
73870
73893
  "stream-offline": "device-events",
73871
73894
  "detection-blind": "device-events",
73895
+ "motion-noisy": "device-events",
73896
+ "motion-calm": "device-events",
73872
73897
  "recording-stalled": "device-events",
73873
73898
  "recording-healthy": "device-events",
73874
73899
  "recording-degraded": "device-events",
73900
+ "device-attention-required": "device-events",
73901
+ "device-attention-resolved": "device-events",
73875
73902
  "node-online": "system",
73876
73903
  "node-offline": "system",
73877
73904
  "node-restarting": "system",
@@ -73888,6 +73915,8 @@ new Map(Object.entries({
73888
73915
  "alert-critical": "system",
73889
73916
  "alert-error": "system",
73890
73917
  "alert-critical-resolved": "system",
73918
+ "rule-broken": "system",
73919
+ "rule-repaired": "system",
73891
73920
  "storage-location-low": "system",
73892
73921
  "storage-location-critical": "system",
73893
73922
  "storage-location-ok": "system",
@@ -73952,6 +73981,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73952
73981
  label: "Detecting nothing",
73953
73982
  kinds: ["detection-blind"]
73954
73983
  },
73984
+ {
73985
+ id: "motion-noise",
73986
+ family: "device-events",
73987
+ label: "Motion without a subject",
73988
+ kinds: ["motion-noisy", "motion-calm"]
73989
+ },
73955
73990
  {
73956
73991
  id: "recording",
73957
73992
  family: "device-events",
@@ -73962,6 +73997,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73962
73997
  "recording-degraded"
73963
73998
  ]
73964
73999
  },
74000
+ {
74001
+ id: "device-attention",
74002
+ family: "device-events",
74003
+ label: "Needs attention",
74004
+ kinds: ["device-attention-required", "device-attention-resolved"]
74005
+ },
73965
74006
  {
73966
74007
  id: "nodes",
73967
74008
  family: "system",
@@ -74022,6 +74063,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74022
74063
  "alert-critical-resolved"
74023
74064
  ]
74024
74065
  },
74066
+ {
74067
+ id: "rule-health",
74068
+ family: "system",
74069
+ label: "Notification rules",
74070
+ kinds: ["rule-broken", "rule-repaired"]
74071
+ },
74025
74072
  {
74026
74073
  id: "alarm",
74027
74074
  family: "alarm",
@@ -74095,6 +74142,7 @@ var ALERT_EPISODE = [
74095
74142
  "alert-error",
74096
74143
  "alert-critical-resolved"
74097
74144
  ];
74145
+ var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
74098
74146
  var UPDATES = [
74099
74147
  "addon-update-available",
74100
74148
  "server-update-available",
@@ -74124,9 +74172,12 @@ var DEVICE_EVENTS = [
74124
74172
  "stream-online",
74125
74173
  "stream-offline",
74126
74174
  "detection-blind",
74175
+ "motion-noisy",
74176
+ "motion-calm",
74127
74177
  "recording-stalled",
74128
74178
  "recording-healthy",
74129
74179
  "recording-degraded",
74180
+ ...DEVICE_ATTENTION,
74130
74181
  ...ALARM
74131
74182
  ];
74132
74183
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -74294,7 +74345,13 @@ var STATE_SUMMARY_VARS = [
74294
74345
  [...RULE_TEXT],
74295
74346
  [...RULE_TEXT],
74296
74347
  [...RULE_TEXT],
74297
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74348
+ [...RULE_TEXT],
74349
+ [...RULE_TEXT],
74350
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74351
+ [...RULE_TEXT],
74352
+ [...RULE_TEXT],
74353
+ [...RULE_TEXT],
74354
+ [...RULE_TEXT],
74298
74355
  [...RULE_TEXT],
74299
74356
  [...RULE_TEXT],
74300
74357
  [...RULE_TEXT],
@@ -74312,11 +74369,11 @@ var STATE_SUMMARY_VARS = [
74312
74369
  [...RULE_TEXT],
74313
74370
  [...RULE_TEXT],
74314
74371
  [...RULE_TEXT],
74372
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74315
74373
  ([...RULE_TEXT], [...ALERT_EPISODE]),
74374
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74316
74375
  ([...RULE_TEXT], [...ALERT_EPISODE]),
74317
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74318
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74319
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74376
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74320
74377
  [...RULE_TEXT],
74321
74378
  [...RULE_TEXT],
74322
74379
  [...RULE_TEXT],
@@ -74337,6 +74394,125 @@ var STATE_SUMMARY_VARS = [
74337
74394
  [...RULE_TEXT],
74338
74395
  ...STATE_SUMMARY_VARS
74339
74396
  ];
74397
+ new Map([
74398
+ {
74399
+ id: "device-connectivity",
74400
+ family: "device-events",
74401
+ label: "Device connectivity (offline / back online)",
74402
+ bad: ["device-offline"],
74403
+ recovery: ["device-online"],
74404
+ snapshotLabel: "Devices offline now",
74405
+ snapshotSection: "device-state"
74406
+ },
74407
+ {
74408
+ id: "device-switch",
74409
+ family: "device-events",
74410
+ label: "Device switched off / back on",
74411
+ bad: ["device-disabled"],
74412
+ recovery: ["device-enabled"],
74413
+ snapshotLabel: "Devices switched off now",
74414
+ snapshotSection: "device-state"
74415
+ },
74416
+ {
74417
+ id: "stream-connectivity",
74418
+ family: "device-events",
74419
+ label: "Stream connectivity (offline / back online)",
74420
+ bad: ["stream-offline"],
74421
+ recovery: ["stream-online"],
74422
+ snapshotLabel: "Streams offline now",
74423
+ snapshotSection: "streams"
74424
+ },
74425
+ {
74426
+ id: "battery",
74427
+ family: "device-events",
74428
+ label: "Battery (low / back to normal)",
74429
+ bad: ["device-battery-low"],
74430
+ recovery: ["device-battery-normal"],
74431
+ snapshotLabel: "Batteries low now",
74432
+ snapshotSection: "battery"
74433
+ },
74434
+ {
74435
+ id: "consumables",
74436
+ family: "device-events",
74437
+ label: "Consumables (low / replaced)",
74438
+ bad: ["device-consumable-low"],
74439
+ recovery: ["device-consumable-normal"],
74440
+ snapshotLabel: "Consumables low now",
74441
+ snapshotSection: "consumables"
74442
+ },
74443
+ {
74444
+ id: "tanks",
74445
+ family: "device-events",
74446
+ label: "Tanks (low or full / back to normal)",
74447
+ bad: ["device-tank-low", "device-tank-full"],
74448
+ recovery: ["device-tank-normal"],
74449
+ snapshotLabel: "Tanks low or full now",
74450
+ snapshotSection: "tanks"
74451
+ },
74452
+ {
74453
+ id: "motion-noise",
74454
+ family: "device-events",
74455
+ label: "Motion without a subject (constant / calm again)",
74456
+ bad: ["motion-noisy"],
74457
+ recovery: ["motion-calm"],
74458
+ snapshotLabel: "Cameras with constant motion now",
74459
+ snapshotSection: null
74460
+ },
74461
+ {
74462
+ id: "recording-health",
74463
+ family: "device-events",
74464
+ label: "Recording health (stalled or degraded / recording again)",
74465
+ bad: ["recording-stalled", "recording-degraded"],
74466
+ recovery: ["recording-healthy"],
74467
+ snapshotLabel: "Recordings stalled now",
74468
+ snapshotSection: null
74469
+ },
74470
+ {
74471
+ id: "device-attention",
74472
+ family: "device-events",
74473
+ label: "Device needs attention (raised / resolved)",
74474
+ bad: ["device-attention-required"],
74475
+ recovery: ["device-attention-resolved"],
74476
+ snapshotLabel: "Devices needing attention now",
74477
+ snapshotSection: null
74478
+ },
74479
+ {
74480
+ id: "node-connectivity",
74481
+ family: "system",
74482
+ label: "Node connectivity (offline / back online)",
74483
+ bad: ["node-offline"],
74484
+ recovery: ["node-online"],
74485
+ snapshotLabel: "Nodes offline now",
74486
+ snapshotSection: "nodes"
74487
+ },
74488
+ {
74489
+ id: "storage-space",
74490
+ family: "system",
74491
+ label: "Storage space (low or critical / ok again)",
74492
+ bad: ["storage-location-low", "storage-location-critical"],
74493
+ recovery: ["storage-location-ok"],
74494
+ snapshotLabel: "Storage locations low now",
74495
+ snapshotSection: null
74496
+ },
74497
+ {
74498
+ id: "critical-alerts",
74499
+ family: "system",
74500
+ label: "Critical alerts (raised / resolved)",
74501
+ bad: ["alert-critical"],
74502
+ recovery: ["alert-critical-resolved"],
74503
+ snapshotLabel: "Critical alerts open now",
74504
+ snapshotSection: null
74505
+ },
74506
+ {
74507
+ id: "rule-health",
74508
+ family: "system",
74509
+ label: "Rule health (broken / repaired)",
74510
+ bad: ["rule-broken"],
74511
+ recovery: ["rule-repaired"],
74512
+ snapshotLabel: "Notification rules broken now",
74513
+ snapshotSection: null
74514
+ }
74515
+ ].flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
74340
74516
  new Set([
74341
74517
  "disarmed",
74342
74518
  "armed_home",
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
40
40
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
41
41
  //#endregion
42
- //#region ../types/dist/event-category-DOl51-Ij.mjs
42
+ //#region ../types/dist/event-category-BfJwUd2S.mjs
43
43
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
44
44
  EventCategory["SystemBoot"] = "system.boot";
45
45
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -356,6 +356,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
356
356
  */
357
357
  EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
358
358
  /**
359
+ * A camera's motion source has fired constantly with no subject for an hour
360
+ * (motion duty or session count over the bar, zero detections) — it is not
361
+ * blind, its motion zones or sensitivity want tuning (D907). Paired with
362
+ * {@link PipelineMotionCalm}.
363
+ */
364
+ EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
365
+ /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
366
+ EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
367
+ /**
359
368
  * Per-camera pipeline config was mutated by the orchestrator
360
369
  * (3-level settings change via `setAgentAddonDefaults` /
361
370
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -727,6 +736,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
727
736
  EventCategory["BackupRestored"] = "backup.restored";
728
737
  EventCategory["NotificationDispatched"] = "notification.dispatched";
729
738
  EventCategory["NotificationFailed"] = "notification.failed";
739
+ /**
740
+ * A notification rule that cannot work (D905): its stored row does not load,
741
+ * or it still names a device / delivery target the prune CONFIRMED deleted.
742
+ * One edge per rule per distinct set of reasons; never on an unanswered read.
743
+ */
744
+ EventCategory["NotificationRuleBroken"] = "notification.rule-broken";
745
+ /** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
746
+ EventCategory["NotificationRuleRepaired"] = "notification.rule-repaired";
730
747
  EventCategory["DeviceUpdated"] = "device.updated";
731
748
  /**
732
749
  * Transport-level connectivity. Emitted by the device driver when
@@ -5587,7 +5604,7 @@ var ZodIssueCode = {
5587
5604
  var ZodFirstPartyTypeKind;
5588
5605
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5589
5606
  //#endregion
5590
- //#region ../types/dist/sleep-_sV1BE2f.mjs
5607
+ //#region ../types/dist/sleep-DJFUfKvA.mjs
5591
5608
  /**
5592
5609
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5593
5610
  * window to float samples (D455).
@@ -8186,7 +8203,7 @@ var EntryDescriptorSchema = object({
8186
8203
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
8187
8204
  fields: record(string(), unknown())
8188
8205
  }).strict();
8189
- /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
8206
+ /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
8190
8207
  var RecordKindDeclarationSchema = object({
8191
8208
  database: _enum(RECORD_DATABASES).default("settings"),
8192
8209
  class: _enum(RECORD_CLASSES),
@@ -8205,14 +8222,6 @@ var RecordKindDeclarationSchema = object({
8205
8222
  secretPaths: array(string().min(1)).default([]),
8206
8223
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
8207
8224
  secretArrayKeys: record(string(), string()).default({}),
8208
- /**
8209
- * RETIRED (D900): the legacy table a kind adopted from during the records
8210
- * migration. Nothing declares it any more and nothing reads it; the schema
8211
- * still ACCEPTS it because the catalog rows the migration wrote carry it
8212
- * (an orphaned kind is never redeclared) and an addon built before the
8213
- * removal still sends it. Never set it.
8214
- */
8215
- adoptsFrom: string().min(1).optional(),
8216
8225
  /** Kinds that must agree through `transact` sit in one file under one family name. */
8217
8226
  transactFamily: string().min(1).optional(),
8218
8227
  entry: EntryDescriptorSchema.optional()
@@ -12994,17 +13003,6 @@ object({
12994
13003
  createdAt: number(),
12995
13004
  updatedAt: number()
12996
13005
  });
12997
- object({
12998
- id: string(),
12999
- label: string(),
13000
- isAdmin: boolean().default(false),
13001
- allowedProviders: AllowedProviderSchema,
13002
- allowedDevices: AllowedDevicesSchema,
13003
- tokenHash: string(),
13004
- tokenPrefix: string(),
13005
- createdAt: number(),
13006
- lastUsedAt: number().optional()
13007
- });
13008
13006
  object({
13009
13007
  id: string(),
13010
13008
  userId: string(),
@@ -16929,16 +16927,36 @@ var RecordKindStateSchema = _enum([
16929
16927
  var DeclareKindResultSchema = object({
16930
16928
  kindId: number().int(),
16931
16929
  state: RecordKindStateSchema,
16932
- createdIndexes: array(string()),
16933
- /**
16934
- * RETIRED (D900): always `null`. It carried the records-migration boot guard;
16935
- * it stays on the wire, null, because an addon built before the removal reads
16936
- * an ABSENT field as "adoption pending" and refuses to start.
16937
- */
16938
- adoptionPending: _null()
16930
+ createdIndexes: array(string())
16939
16931
  });
16940
16932
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16941
16933
  var SecretRefsList = array(string());
16934
+ /**
16935
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
16936
+ * All ops of one call share ONE database file and ONE `transactFamily`.
16937
+ */
16938
+ var RecordTransactOpSchema = discriminatedUnion("op", [
16939
+ object({
16940
+ op: literal("put"),
16941
+ kind: RecordKindNameSchema,
16942
+ record: RecordInputSchema,
16943
+ ifRev: number().int().min(0).optional()
16944
+ }),
16945
+ object({
16946
+ op: literal("patch"),
16947
+ kind: RecordKindNameSchema,
16948
+ id: RecordIdSchema,
16949
+ data: RecordBodySchema,
16950
+ at: number().int().nullable().optional(),
16951
+ expiresAt: number().int().nullable().optional(),
16952
+ ifRev: number().int().min(1).optional()
16953
+ }),
16954
+ object({
16955
+ op: literal("delete"),
16956
+ kind: RecordKindNameSchema,
16957
+ id: RecordIdSchema
16958
+ })
16959
+ ]);
16942
16960
  var RecordSecretRefsSchema = record(string(), record(string(), string()));
16943
16961
  method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16944
16962
  kind: "mutation",
@@ -17045,6 +17063,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
17045
17063
  }), {
17046
17064
  kind: "mutation",
17047
17065
  auth: "admin"
17066
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
17067
+ results: array(object({
17068
+ rev: number().int().nullable(),
17069
+ deleted: boolean()
17070
+ })),
17071
+ releasedRefs: SecretRefsList,
17072
+ secretRefs: SecretRefsList
17073
+ }), {
17074
+ kind: "mutation",
17075
+ auth: "admin"
17048
17076
  }), method(object({
17049
17077
  deviceId: number().int(),
17050
17078
  kinds: array(RecordKindNameSchema).optional()
@@ -42422,9 +42450,13 @@ var NcSystemEventKindSchema = _enum([
42422
42450
  "node-updating",
42423
42451
  "node-inference-unavailable",
42424
42452
  "detection-blind",
42453
+ "motion-noisy",
42454
+ "motion-calm",
42425
42455
  "recording-stalled",
42426
42456
  "recording-healthy",
42427
42457
  "recording-degraded",
42458
+ "device-attention-required",
42459
+ "device-attention-resolved",
42428
42460
  "storage-location-low",
42429
42461
  "storage-location-critical",
42430
42462
  "storage-location-ok",
@@ -42448,6 +42480,8 @@ var NcSystemEventKindSchema = _enum([
42448
42480
  "alert-critical",
42449
42481
  "alert-error",
42450
42482
  "alert-critical-resolved",
42483
+ "rule-broken",
42484
+ "rule-repaired",
42451
42485
  "camera-online",
42452
42486
  "camera-offline",
42453
42487
  "camera-disabled",
@@ -54879,6 +54913,16 @@ object({
54879
54913
  powerState: string().nullable(),
54880
54914
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
54881
54915
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
54916
+ /**
54917
+ * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
54918
+ * combined care-and-filter reminder raised); false when every such reminder reads clear; null
54919
+ * when none is reported. A cleared reminder is not an unknown one.
54920
+ */
54921
+ filterCleaningDue: boolean().nullable(),
54922
+ /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
54923
+ machineCareDue: boolean().nullable(),
54924
+ /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
54925
+ machineCareRemainingRuns: number().int().nonnegative().nullable(),
54882
54926
  /** Option states: null when the appliance does not expose the option or has not said. */
54883
54927
  halfLoad: boolean().nullable(),
54884
54928
  hygienePlus: boolean().nullable(),
@@ -61496,16 +61540,6 @@ var UpdateUserInputSchema = object({
61496
61540
  allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
61497
61541
  scopes: array(TokenScopeSchema).optional()
61498
61542
  });
61499
- var ApiKeySummarySchema = object({
61500
- id: string(),
61501
- label: string(),
61502
- isAdmin: boolean().default(false),
61503
- allowedProviders: union([array(string()), literal("*")]).optional(),
61504
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
61505
- tokenPrefix: string(),
61506
- createdAt: number(),
61507
- lastUsedAt: number().optional()
61508
- });
61509
61543
  var OauthSessionSummarySchema = object({
61510
61544
  id: string(),
61511
61545
  userId: string(),
@@ -61527,8 +61561,7 @@ var TotpStatusSchema = object({
61527
61561
  confirmedAt: number().nullable()
61528
61562
  });
61529
61563
  /**
61530
- * user-management — singleton capability for user accounts and the
61531
- * legacy API-key rows.
61564
+ * user-management — singleton capability for user accounts.
61532
61565
  *
61533
61566
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
61534
61567
  * — the subset check on `setUserScopes` is moot
@@ -61584,10 +61617,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
61584
61617
  }), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
61585
61618
  kind: "mutation",
61586
61619
  access: "view"
61587
- }), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
61588
- kind: "mutation",
61589
- auth: "admin",
61590
- access: "delete"
61591
61620
  }), method(object({ userId: string() }), TotpSetupResultSchema, {
61592
61621
  kind: "mutation",
61593
61622
  auth: "admin",
@@ -69100,6 +69129,12 @@ Object.freeze({
69100
69129
  addonId: null,
69101
69130
  access: "view"
69102
69131
  },
69132
+ "records.transact": {
69133
+ capName: "records",
69134
+ capScope: "system",
69135
+ addonId: null,
69136
+ access: "create"
69137
+ },
69103
69138
  "sceneMonitor.captureReference": {
69104
69139
  capName: "scene-monitor",
69105
69140
  capScope: "device",
@@ -70432,12 +70467,6 @@ Object.freeze({
70432
70467
  addonId: null,
70433
70468
  access: "view"
70434
70469
  },
70435
- "userManagement.listApiKeys": {
70436
- capName: "user-management",
70437
- capScope: "system",
70438
- addonId: null,
70439
- access: "view"
70440
- },
70441
70470
  "userManagement.listExternalIdentities": {
70442
70471
  capName: "user-management",
70443
70472
  capScope: "system",
@@ -70492,12 +70521,6 @@ Object.freeze({
70492
70521
  addonId: null,
70493
70522
  access: "create"
70494
70523
  },
70495
- "userManagement.revokeApiKey": {
70496
- capName: "user-management",
70497
- capScope: "system",
70498
- addonId: null,
70499
- access: "delete"
70500
- },
70501
70524
  "userManagement.revokeOauthSession": {
70502
70525
  capName: "user-management",
70503
70526
  capScope: "system",
@@ -73862,9 +73885,13 @@ new Map(Object.entries({
73862
73885
  "stream-online": "device-events",
73863
73886
  "stream-offline": "device-events",
73864
73887
  "detection-blind": "device-events",
73888
+ "motion-noisy": "device-events",
73889
+ "motion-calm": "device-events",
73865
73890
  "recording-stalled": "device-events",
73866
73891
  "recording-healthy": "device-events",
73867
73892
  "recording-degraded": "device-events",
73893
+ "device-attention-required": "device-events",
73894
+ "device-attention-resolved": "device-events",
73868
73895
  "node-online": "system",
73869
73896
  "node-offline": "system",
73870
73897
  "node-restarting": "system",
@@ -73881,6 +73908,8 @@ new Map(Object.entries({
73881
73908
  "alert-critical": "system",
73882
73909
  "alert-error": "system",
73883
73910
  "alert-critical-resolved": "system",
73911
+ "rule-broken": "system",
73912
+ "rule-repaired": "system",
73884
73913
  "storage-location-low": "system",
73885
73914
  "storage-location-critical": "system",
73886
73915
  "storage-location-ok": "system",
@@ -73945,6 +73974,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73945
73974
  label: "Detecting nothing",
73946
73975
  kinds: ["detection-blind"]
73947
73976
  },
73977
+ {
73978
+ id: "motion-noise",
73979
+ family: "device-events",
73980
+ label: "Motion without a subject",
73981
+ kinds: ["motion-noisy", "motion-calm"]
73982
+ },
73948
73983
  {
73949
73984
  id: "recording",
73950
73985
  family: "device-events",
@@ -73955,6 +73990,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
73955
73990
  "recording-degraded"
73956
73991
  ]
73957
73992
  },
73993
+ {
73994
+ id: "device-attention",
73995
+ family: "device-events",
73996
+ label: "Needs attention",
73997
+ kinds: ["device-attention-required", "device-attention-resolved"]
73998
+ },
73958
73999
  {
73959
74000
  id: "nodes",
73960
74001
  family: "system",
@@ -74015,6 +74056,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74015
74056
  "alert-critical-resolved"
74016
74057
  ]
74017
74058
  },
74059
+ {
74060
+ id: "rule-health",
74061
+ family: "system",
74062
+ label: "Notification rules",
74063
+ kinds: ["rule-broken", "rule-repaired"]
74064
+ },
74018
74065
  {
74019
74066
  id: "alarm",
74020
74067
  family: "alarm",
@@ -74088,6 +74135,7 @@ var ALERT_EPISODE = [
74088
74135
  "alert-error",
74089
74136
  "alert-critical-resolved"
74090
74137
  ];
74138
+ var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
74091
74139
  var UPDATES = [
74092
74140
  "addon-update-available",
74093
74141
  "server-update-available",
@@ -74117,9 +74165,12 @@ var DEVICE_EVENTS = [
74117
74165
  "stream-online",
74118
74166
  "stream-offline",
74119
74167
  "detection-blind",
74168
+ "motion-noisy",
74169
+ "motion-calm",
74120
74170
  "recording-stalled",
74121
74171
  "recording-healthy",
74122
74172
  "recording-degraded",
74173
+ ...DEVICE_ATTENTION,
74123
74174
  ...ALARM
74124
74175
  ];
74125
74176
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -74287,7 +74338,13 @@ var STATE_SUMMARY_VARS = [
74287
74338
  [...RULE_TEXT],
74288
74339
  [...RULE_TEXT],
74289
74340
  [...RULE_TEXT],
74290
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74341
+ [...RULE_TEXT],
74342
+ [...RULE_TEXT],
74343
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74344
+ [...RULE_TEXT],
74345
+ [...RULE_TEXT],
74346
+ [...RULE_TEXT],
74347
+ [...RULE_TEXT],
74291
74348
  [...RULE_TEXT],
74292
74349
  [...RULE_TEXT],
74293
74350
  [...RULE_TEXT],
@@ -74305,11 +74362,11 @@ var STATE_SUMMARY_VARS = [
74305
74362
  [...RULE_TEXT],
74306
74363
  [...RULE_TEXT],
74307
74364
  [...RULE_TEXT],
74365
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74308
74366
  ([...RULE_TEXT], [...ALERT_EPISODE]),
74367
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74309
74368
  ([...RULE_TEXT], [...ALERT_EPISODE]),
74310
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74311
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74312
- ([...RULE_TEXT], [...ALERT_EPISODE]),
74369
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
74313
74370
  [...RULE_TEXT],
74314
74371
  [...RULE_TEXT],
74315
74372
  [...RULE_TEXT],
@@ -74330,6 +74387,125 @@ var STATE_SUMMARY_VARS = [
74330
74387
  [...RULE_TEXT],
74331
74388
  ...STATE_SUMMARY_VARS
74332
74389
  ];
74390
+ new Map([
74391
+ {
74392
+ id: "device-connectivity",
74393
+ family: "device-events",
74394
+ label: "Device connectivity (offline / back online)",
74395
+ bad: ["device-offline"],
74396
+ recovery: ["device-online"],
74397
+ snapshotLabel: "Devices offline now",
74398
+ snapshotSection: "device-state"
74399
+ },
74400
+ {
74401
+ id: "device-switch",
74402
+ family: "device-events",
74403
+ label: "Device switched off / back on",
74404
+ bad: ["device-disabled"],
74405
+ recovery: ["device-enabled"],
74406
+ snapshotLabel: "Devices switched off now",
74407
+ snapshotSection: "device-state"
74408
+ },
74409
+ {
74410
+ id: "stream-connectivity",
74411
+ family: "device-events",
74412
+ label: "Stream connectivity (offline / back online)",
74413
+ bad: ["stream-offline"],
74414
+ recovery: ["stream-online"],
74415
+ snapshotLabel: "Streams offline now",
74416
+ snapshotSection: "streams"
74417
+ },
74418
+ {
74419
+ id: "battery",
74420
+ family: "device-events",
74421
+ label: "Battery (low / back to normal)",
74422
+ bad: ["device-battery-low"],
74423
+ recovery: ["device-battery-normal"],
74424
+ snapshotLabel: "Batteries low now",
74425
+ snapshotSection: "battery"
74426
+ },
74427
+ {
74428
+ id: "consumables",
74429
+ family: "device-events",
74430
+ label: "Consumables (low / replaced)",
74431
+ bad: ["device-consumable-low"],
74432
+ recovery: ["device-consumable-normal"],
74433
+ snapshotLabel: "Consumables low now",
74434
+ snapshotSection: "consumables"
74435
+ },
74436
+ {
74437
+ id: "tanks",
74438
+ family: "device-events",
74439
+ label: "Tanks (low or full / back to normal)",
74440
+ bad: ["device-tank-low", "device-tank-full"],
74441
+ recovery: ["device-tank-normal"],
74442
+ snapshotLabel: "Tanks low or full now",
74443
+ snapshotSection: "tanks"
74444
+ },
74445
+ {
74446
+ id: "motion-noise",
74447
+ family: "device-events",
74448
+ label: "Motion without a subject (constant / calm again)",
74449
+ bad: ["motion-noisy"],
74450
+ recovery: ["motion-calm"],
74451
+ snapshotLabel: "Cameras with constant motion now",
74452
+ snapshotSection: null
74453
+ },
74454
+ {
74455
+ id: "recording-health",
74456
+ family: "device-events",
74457
+ label: "Recording health (stalled or degraded / recording again)",
74458
+ bad: ["recording-stalled", "recording-degraded"],
74459
+ recovery: ["recording-healthy"],
74460
+ snapshotLabel: "Recordings stalled now",
74461
+ snapshotSection: null
74462
+ },
74463
+ {
74464
+ id: "device-attention",
74465
+ family: "device-events",
74466
+ label: "Device needs attention (raised / resolved)",
74467
+ bad: ["device-attention-required"],
74468
+ recovery: ["device-attention-resolved"],
74469
+ snapshotLabel: "Devices needing attention now",
74470
+ snapshotSection: null
74471
+ },
74472
+ {
74473
+ id: "node-connectivity",
74474
+ family: "system",
74475
+ label: "Node connectivity (offline / back online)",
74476
+ bad: ["node-offline"],
74477
+ recovery: ["node-online"],
74478
+ snapshotLabel: "Nodes offline now",
74479
+ snapshotSection: "nodes"
74480
+ },
74481
+ {
74482
+ id: "storage-space",
74483
+ family: "system",
74484
+ label: "Storage space (low or critical / ok again)",
74485
+ bad: ["storage-location-low", "storage-location-critical"],
74486
+ recovery: ["storage-location-ok"],
74487
+ snapshotLabel: "Storage locations low now",
74488
+ snapshotSection: null
74489
+ },
74490
+ {
74491
+ id: "critical-alerts",
74492
+ family: "system",
74493
+ label: "Critical alerts (raised / resolved)",
74494
+ bad: ["alert-critical"],
74495
+ recovery: ["alert-critical-resolved"],
74496
+ snapshotLabel: "Critical alerts open now",
74497
+ snapshotSection: null
74498
+ },
74499
+ {
74500
+ id: "rule-health",
74501
+ family: "system",
74502
+ label: "Rule health (broken / repaired)",
74503
+ bad: ["rule-broken"],
74504
+ recovery: ["rule-repaired"],
74505
+ snapshotLabel: "Notification rules broken now",
74506
+ snapshotSection: null
74507
+ }
74508
+ ].flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
74333
74509
  new Set([
74334
74510
  "disarmed",
74335
74511
  "armed_home",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-mqtt-broker",
3
- "version": "1.2.139",
3
+ "version": "1.2.141",
4
4
  "description": "MQTT broker registry addon for CamStack — manages external broker entries + an optional embedded aedes broker. Consumers spin up their own `mqtt.js` clients via the `mqtt-broker` cap.",
5
5
  "keywords": [
6
6
  "camstack",