@camstack/addon-export-hap 1.2.172 → 1.2.174

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.
@@ -49,7 +49,7 @@ let node_fs_promises = require("node:fs/promises");
49
49
  node_fs_promises = __toESM(node_fs_promises, 1);
50
50
  let node_events = require("node:events");
51
51
  let node_dgram = require("node:dgram");
52
- //#region ../types/dist/event-category-DOl51-Ij.mjs
52
+ //#region ../types/dist/event-category-BfJwUd2S.mjs
53
53
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
54
54
  EventCategory["SystemBoot"] = "system.boot";
55
55
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -366,6 +366,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
366
366
  */
367
367
  EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
368
368
  /**
369
+ * A camera's motion source has fired constantly with no subject for an hour
370
+ * (motion duty or session count over the bar, zero detections) — it is not
371
+ * blind, its motion zones or sensitivity want tuning (D907). Paired with
372
+ * {@link PipelineMotionCalm}.
373
+ */
374
+ EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
375
+ /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
376
+ EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
377
+ /**
369
378
  * Per-camera pipeline config was mutated by the orchestrator
370
379
  * (3-level settings change via `setAgentAddonDefaults` /
371
380
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -737,6 +746,14 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
737
746
  EventCategory["BackupRestored"] = "backup.restored";
738
747
  EventCategory["NotificationDispatched"] = "notification.dispatched";
739
748
  EventCategory["NotificationFailed"] = "notification.failed";
749
+ /**
750
+ * A notification rule that cannot work (D905): its stored row does not load,
751
+ * or it still names a device / delivery target the prune CONFIRMED deleted.
752
+ * One edge per rule per distinct set of reasons; never on an unanswered read.
753
+ */
754
+ EventCategory["NotificationRuleBroken"] = "notification.rule-broken";
755
+ /** The clear of {@link NotificationRuleBroken}: the rule loads and names nothing deleted. */
756
+ EventCategory["NotificationRuleRepaired"] = "notification.rule-repaired";
740
757
  EventCategory["DeviceUpdated"] = "device.updated";
741
758
  /**
742
759
  * Transport-level connectivity. Emitted by the device driver when
@@ -5464,7 +5481,7 @@ var ZodIssueCode = {
5464
5481
  var ZodFirstPartyTypeKind;
5465
5482
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5466
5483
  //#endregion
5467
- //#region ../types/dist/sleep-_sV1BE2f.mjs
5484
+ //#region ../types/dist/sleep-DJFUfKvA.mjs
5468
5485
  /**
5469
5486
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5470
5487
  * window to float samples (D455).
@@ -7926,7 +7943,7 @@ var EntryDescriptorSchema = object({
7926
7943
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
7927
7944
  fields: record(string(), unknown())
7928
7945
  }).strict();
7929
- /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
7946
+ /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
7930
7947
  var RecordKindDeclarationSchema = object({
7931
7948
  database: _enum(RECORD_DATABASES).default("settings"),
7932
7949
  class: _enum(RECORD_CLASSES),
@@ -7945,14 +7962,6 @@ var RecordKindDeclarationSchema = object({
7945
7962
  secretPaths: array(string().min(1)).default([]),
7946
7963
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
7947
7964
  secretArrayKeys: record(string(), string()).default({}),
7948
- /**
7949
- * RETIRED (D900): the legacy table a kind adopted from during the records
7950
- * migration. Nothing declares it any more and nothing reads it; the schema
7951
- * still ACCEPTS it because the catalog rows the migration wrote carry it
7952
- * (an orphaned kind is never redeclared) and an addon built before the
7953
- * removal still sends it. Never set it.
7954
- */
7955
- adoptsFrom: string().min(1).optional(),
7956
7965
  /** Kinds that must agree through `transact` sit in one file under one family name. */
7957
7966
  transactFamily: string().min(1).optional(),
7958
7967
  entry: EntryDescriptorSchema.optional()
@@ -13504,17 +13513,6 @@ object({
13504
13513
  createdAt: number(),
13505
13514
  updatedAt: number()
13506
13515
  });
13507
- object({
13508
- id: string(),
13509
- label: string(),
13510
- isAdmin: boolean().default(false),
13511
- allowedProviders: AllowedProviderSchema,
13512
- allowedDevices: AllowedDevicesSchema,
13513
- tokenHash: string(),
13514
- tokenPrefix: string(),
13515
- createdAt: number(),
13516
- lastUsedAt: number().optional()
13517
- });
13518
13516
  object({
13519
13517
  id: string(),
13520
13518
  userId: string(),
@@ -17390,16 +17388,36 @@ var RecordKindStateSchema = _enum([
17390
17388
  var DeclareKindResultSchema = object({
17391
17389
  kindId: number().int(),
17392
17390
  state: RecordKindStateSchema,
17393
- createdIndexes: array(string()),
17394
- /**
17395
- * RETIRED (D900): always `null`. It carried the records-migration boot guard;
17396
- * it stays on the wire, null, because an addon built before the removal reads
17397
- * an ABSENT field as "adoption pending" and refuses to start.
17398
- */
17399
- adoptionPending: _null()
17391
+ createdIndexes: array(string())
17400
17392
  });
17401
17393
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
17402
17394
  var SecretRefsList = array(string());
17395
+ /**
17396
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
17397
+ * All ops of one call share ONE database file and ONE `transactFamily`.
17398
+ */
17399
+ var RecordTransactOpSchema = discriminatedUnion("op", [
17400
+ object({
17401
+ op: literal("put"),
17402
+ kind: RecordKindNameSchema,
17403
+ record: RecordInputSchema,
17404
+ ifRev: number().int().min(0).optional()
17405
+ }),
17406
+ object({
17407
+ op: literal("patch"),
17408
+ kind: RecordKindNameSchema,
17409
+ id: RecordIdSchema,
17410
+ data: RecordBodySchema,
17411
+ at: number().int().nullable().optional(),
17412
+ expiresAt: number().int().nullable().optional(),
17413
+ ifRev: number().int().min(1).optional()
17414
+ }),
17415
+ object({
17416
+ op: literal("delete"),
17417
+ kind: RecordKindNameSchema,
17418
+ id: RecordIdSchema
17419
+ })
17420
+ ]);
17403
17421
  var RecordSecretRefsSchema = record(string(), record(string(), string()));
17404
17422
  method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
17405
17423
  kind: "mutation",
@@ -17506,6 +17524,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
17506
17524
  }), {
17507
17525
  kind: "mutation",
17508
17526
  auth: "admin"
17527
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
17528
+ results: array(object({
17529
+ rev: number().int().nullable(),
17530
+ deleted: boolean()
17531
+ })),
17532
+ releasedRefs: SecretRefsList,
17533
+ secretRefs: SecretRefsList
17534
+ }), {
17535
+ kind: "mutation",
17536
+ auth: "admin"
17509
17537
  }), method(object({
17510
17538
  deviceId: number().int(),
17511
17539
  kinds: array(RecordKindNameSchema).optional()
@@ -42945,9 +42973,13 @@ var NcSystemEventKindSchema = _enum([
42945
42973
  "node-updating",
42946
42974
  "node-inference-unavailable",
42947
42975
  "detection-blind",
42976
+ "motion-noisy",
42977
+ "motion-calm",
42948
42978
  "recording-stalled",
42949
42979
  "recording-healthy",
42950
42980
  "recording-degraded",
42981
+ "device-attention-required",
42982
+ "device-attention-resolved",
42951
42983
  "storage-location-low",
42952
42984
  "storage-location-critical",
42953
42985
  "storage-location-ok",
@@ -42971,6 +43003,8 @@ var NcSystemEventKindSchema = _enum([
42971
43003
  "alert-critical",
42972
43004
  "alert-error",
42973
43005
  "alert-critical-resolved",
43006
+ "rule-broken",
43007
+ "rule-repaired",
42974
43008
  "camera-online",
42975
43009
  "camera-offline",
42976
43010
  "camera-disabled",
@@ -55615,6 +55649,16 @@ object({
55615
55649
  powerState: string().nullable(),
55616
55650
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
55617
55651
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55652
+ /**
55653
+ * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
55654
+ * combined care-and-filter reminder raised); false when every such reminder reads clear; null
55655
+ * when none is reported. A cleared reminder is not an unknown one.
55656
+ */
55657
+ filterCleaningDue: boolean().nullable(),
55658
+ /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
55659
+ machineCareDue: boolean().nullable(),
55660
+ /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
55661
+ machineCareRemainingRuns: number().int().nonnegative().nullable(),
55618
55662
  /** Option states: null when the appliance does not expose the option or has not said. */
55619
55663
  halfLoad: boolean().nullable(),
55620
55664
  hygienePlus: boolean().nullable(),
@@ -62273,16 +62317,6 @@ var UpdateUserInputSchema = object({
62273
62317
  allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
62274
62318
  scopes: array(TokenScopeSchema).optional()
62275
62319
  });
62276
- var ApiKeySummarySchema = object({
62277
- id: string(),
62278
- label: string(),
62279
- isAdmin: boolean().default(false),
62280
- allowedProviders: union([array(string()), literal("*")]).optional(),
62281
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
62282
- tokenPrefix: string(),
62283
- createdAt: number(),
62284
- lastUsedAt: number().optional()
62285
- });
62286
62320
  var OauthSessionSummarySchema = object({
62287
62321
  id: string(),
62288
62322
  userId: string(),
@@ -62304,8 +62338,7 @@ var TotpStatusSchema = object({
62304
62338
  confirmedAt: number().nullable()
62305
62339
  });
62306
62340
  /**
62307
- * user-management — singleton capability for user accounts and the
62308
- * legacy API-key rows.
62341
+ * user-management — singleton capability for user accounts.
62309
62342
  *
62310
62343
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
62311
62344
  * — the subset check on `setUserScopes` is moot
@@ -62361,10 +62394,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
62361
62394
  }), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
62362
62395
  kind: "mutation",
62363
62396
  access: "view"
62364
- }), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
62365
- kind: "mutation",
62366
- auth: "admin",
62367
- access: "delete"
62368
62397
  }), method(object({ userId: string() }), TotpSetupResultSchema, {
62369
62398
  kind: "mutation",
62370
62399
  auth: "admin",
@@ -69877,6 +69906,12 @@ Object.freeze({
69877
69906
  addonId: null,
69878
69907
  access: "view"
69879
69908
  },
69909
+ "records.transact": {
69910
+ capName: "records",
69911
+ capScope: "system",
69912
+ addonId: null,
69913
+ access: "create"
69914
+ },
69880
69915
  "sceneMonitor.captureReference": {
69881
69916
  capName: "scene-monitor",
69882
69917
  capScope: "device",
@@ -71209,12 +71244,6 @@ Object.freeze({
71209
71244
  addonId: null,
71210
71245
  access: "view"
71211
71246
  },
71212
- "userManagement.listApiKeys": {
71213
- capName: "user-management",
71214
- capScope: "system",
71215
- addonId: null,
71216
- access: "view"
71217
- },
71218
71247
  "userManagement.listExternalIdentities": {
71219
71248
  capName: "user-management",
71220
71249
  capScope: "system",
@@ -71269,12 +71298,6 @@ Object.freeze({
71269
71298
  addonId: null,
71270
71299
  access: "create"
71271
71300
  },
71272
- "userManagement.revokeApiKey": {
71273
- capName: "user-management",
71274
- capScope: "system",
71275
- addonId: null,
71276
- access: "delete"
71277
- },
71278
71301
  "userManagement.revokeOauthSession": {
71279
71302
  capName: "user-management",
71280
71303
  capScope: "system",
@@ -74639,9 +74662,13 @@ new Map(Object.entries({
74639
74662
  "stream-online": "device-events",
74640
74663
  "stream-offline": "device-events",
74641
74664
  "detection-blind": "device-events",
74665
+ "motion-noisy": "device-events",
74666
+ "motion-calm": "device-events",
74642
74667
  "recording-stalled": "device-events",
74643
74668
  "recording-healthy": "device-events",
74644
74669
  "recording-degraded": "device-events",
74670
+ "device-attention-required": "device-events",
74671
+ "device-attention-resolved": "device-events",
74645
74672
  "node-online": "system",
74646
74673
  "node-offline": "system",
74647
74674
  "node-restarting": "system",
@@ -74658,6 +74685,8 @@ new Map(Object.entries({
74658
74685
  "alert-critical": "system",
74659
74686
  "alert-error": "system",
74660
74687
  "alert-critical-resolved": "system",
74688
+ "rule-broken": "system",
74689
+ "rule-repaired": "system",
74661
74690
  "storage-location-low": "system",
74662
74691
  "storage-location-critical": "system",
74663
74692
  "storage-location-ok": "system",
@@ -74722,6 +74751,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74722
74751
  label: "Detecting nothing",
74723
74752
  kinds: ["detection-blind"]
74724
74753
  },
74754
+ {
74755
+ id: "motion-noise",
74756
+ family: "device-events",
74757
+ label: "Motion without a subject",
74758
+ kinds: ["motion-noisy", "motion-calm"]
74759
+ },
74725
74760
  {
74726
74761
  id: "recording",
74727
74762
  family: "device-events",
@@ -74732,6 +74767,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74732
74767
  "recording-degraded"
74733
74768
  ]
74734
74769
  },
74770
+ {
74771
+ id: "device-attention",
74772
+ family: "device-events",
74773
+ label: "Needs attention",
74774
+ kinds: ["device-attention-required", "device-attention-resolved"]
74775
+ },
74735
74776
  {
74736
74777
  id: "nodes",
74737
74778
  family: "system",
@@ -74792,6 +74833,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74792
74833
  "alert-critical-resolved"
74793
74834
  ]
74794
74835
  },
74836
+ {
74837
+ id: "rule-health",
74838
+ family: "system",
74839
+ label: "Notification rules",
74840
+ kinds: ["rule-broken", "rule-repaired"]
74841
+ },
74795
74842
  {
74796
74843
  id: "alarm",
74797
74844
  family: "alarm",
@@ -74865,6 +74912,7 @@ var ALERT_EPISODE = [
74865
74912
  "alert-error",
74866
74913
  "alert-critical-resolved"
74867
74914
  ];
74915
+ var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
74868
74916
  var UPDATES = [
74869
74917
  "addon-update-available",
74870
74918
  "server-update-available",
@@ -74894,9 +74942,12 @@ var DEVICE_EVENTS = [
74894
74942
  "stream-online",
74895
74943
  "stream-offline",
74896
74944
  "detection-blind",
74945
+ "motion-noisy",
74946
+ "motion-calm",
74897
74947
  "recording-stalled",
74898
74948
  "recording-healthy",
74899
74949
  "recording-degraded",
74950
+ ...DEVICE_ATTENTION,
74900
74951
  ...ALARM
74901
74952
  ];
74902
74953
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -75064,7 +75115,13 @@ var STATE_SUMMARY_VARS = [
75064
75115
  [...RULE_TEXT],
75065
75116
  [...RULE_TEXT],
75066
75117
  [...RULE_TEXT],
75067
- ([...RULE_TEXT], [...ALERT_EPISODE]),
75118
+ [...RULE_TEXT],
75119
+ [...RULE_TEXT],
75120
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
75121
+ [...RULE_TEXT],
75122
+ [...RULE_TEXT],
75123
+ [...RULE_TEXT],
75124
+ [...RULE_TEXT],
75068
75125
  [...RULE_TEXT],
75069
75126
  [...RULE_TEXT],
75070
75127
  [...RULE_TEXT],
@@ -75082,11 +75139,11 @@ var STATE_SUMMARY_VARS = [
75082
75139
  [...RULE_TEXT],
75083
75140
  [...RULE_TEXT],
75084
75141
  [...RULE_TEXT],
75142
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
75085
75143
  ([...RULE_TEXT], [...ALERT_EPISODE]),
75144
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
75086
75145
  ([...RULE_TEXT], [...ALERT_EPISODE]),
75087
- ([...RULE_TEXT], [...ALERT_EPISODE]),
75088
- ([...RULE_TEXT], [...ALERT_EPISODE]),
75089
- ([...RULE_TEXT], [...ALERT_EPISODE]),
75146
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
75090
75147
  [...RULE_TEXT],
75091
75148
  [...RULE_TEXT],
75092
75149
  [...RULE_TEXT],
@@ -75107,6 +75164,125 @@ var STATE_SUMMARY_VARS = [
75107
75164
  [...RULE_TEXT],
75108
75165
  ...STATE_SUMMARY_VARS
75109
75166
  ];
75167
+ new Map([
75168
+ {
75169
+ id: "device-connectivity",
75170
+ family: "device-events",
75171
+ label: "Device connectivity (offline / back online)",
75172
+ bad: ["device-offline"],
75173
+ recovery: ["device-online"],
75174
+ snapshotLabel: "Devices offline now",
75175
+ snapshotSection: "device-state"
75176
+ },
75177
+ {
75178
+ id: "device-switch",
75179
+ family: "device-events",
75180
+ label: "Device switched off / back on",
75181
+ bad: ["device-disabled"],
75182
+ recovery: ["device-enabled"],
75183
+ snapshotLabel: "Devices switched off now",
75184
+ snapshotSection: "device-state"
75185
+ },
75186
+ {
75187
+ id: "stream-connectivity",
75188
+ family: "device-events",
75189
+ label: "Stream connectivity (offline / back online)",
75190
+ bad: ["stream-offline"],
75191
+ recovery: ["stream-online"],
75192
+ snapshotLabel: "Streams offline now",
75193
+ snapshotSection: "streams"
75194
+ },
75195
+ {
75196
+ id: "battery",
75197
+ family: "device-events",
75198
+ label: "Battery (low / back to normal)",
75199
+ bad: ["device-battery-low"],
75200
+ recovery: ["device-battery-normal"],
75201
+ snapshotLabel: "Batteries low now",
75202
+ snapshotSection: "battery"
75203
+ },
75204
+ {
75205
+ id: "consumables",
75206
+ family: "device-events",
75207
+ label: "Consumables (low / replaced)",
75208
+ bad: ["device-consumable-low"],
75209
+ recovery: ["device-consumable-normal"],
75210
+ snapshotLabel: "Consumables low now",
75211
+ snapshotSection: "consumables"
75212
+ },
75213
+ {
75214
+ id: "tanks",
75215
+ family: "device-events",
75216
+ label: "Tanks (low or full / back to normal)",
75217
+ bad: ["device-tank-low", "device-tank-full"],
75218
+ recovery: ["device-tank-normal"],
75219
+ snapshotLabel: "Tanks low or full now",
75220
+ snapshotSection: "tanks"
75221
+ },
75222
+ {
75223
+ id: "motion-noise",
75224
+ family: "device-events",
75225
+ label: "Motion without a subject (constant / calm again)",
75226
+ bad: ["motion-noisy"],
75227
+ recovery: ["motion-calm"],
75228
+ snapshotLabel: "Cameras with constant motion now",
75229
+ snapshotSection: null
75230
+ },
75231
+ {
75232
+ id: "recording-health",
75233
+ family: "device-events",
75234
+ label: "Recording health (stalled or degraded / recording again)",
75235
+ bad: ["recording-stalled", "recording-degraded"],
75236
+ recovery: ["recording-healthy"],
75237
+ snapshotLabel: "Recordings stalled now",
75238
+ snapshotSection: null
75239
+ },
75240
+ {
75241
+ id: "device-attention",
75242
+ family: "device-events",
75243
+ label: "Device needs attention (raised / resolved)",
75244
+ bad: ["device-attention-required"],
75245
+ recovery: ["device-attention-resolved"],
75246
+ snapshotLabel: "Devices needing attention now",
75247
+ snapshotSection: null
75248
+ },
75249
+ {
75250
+ id: "node-connectivity",
75251
+ family: "system",
75252
+ label: "Node connectivity (offline / back online)",
75253
+ bad: ["node-offline"],
75254
+ recovery: ["node-online"],
75255
+ snapshotLabel: "Nodes offline now",
75256
+ snapshotSection: "nodes"
75257
+ },
75258
+ {
75259
+ id: "storage-space",
75260
+ family: "system",
75261
+ label: "Storage space (low or critical / ok again)",
75262
+ bad: ["storage-location-low", "storage-location-critical"],
75263
+ recovery: ["storage-location-ok"],
75264
+ snapshotLabel: "Storage locations low now",
75265
+ snapshotSection: null
75266
+ },
75267
+ {
75268
+ id: "critical-alerts",
75269
+ family: "system",
75270
+ label: "Critical alerts (raised / resolved)",
75271
+ bad: ["alert-critical"],
75272
+ recovery: ["alert-critical-resolved"],
75273
+ snapshotLabel: "Critical alerts open now",
75274
+ snapshotSection: null
75275
+ },
75276
+ {
75277
+ id: "rule-health",
75278
+ family: "system",
75279
+ label: "Rule health (broken / repaired)",
75280
+ bad: ["rule-broken"],
75281
+ recovery: ["rule-repaired"],
75282
+ snapshotLabel: "Notification rules broken now",
75283
+ snapshotSection: null
75284
+ }
75285
+ ].flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
75110
75286
  new Set([
75111
75287
  "disarmed",
75112
75288
  "armed_home",
@@ -39,7 +39,7 @@ var __copyProps = (to, from, except, desc) => {
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
@@ -5454,7 +5471,7 @@ var ZodIssueCode = {
5454
5471
  var ZodFirstPartyTypeKind;
5455
5472
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5456
5473
  //#endregion
5457
- //#region ../types/dist/sleep-_sV1BE2f.mjs
5474
+ //#region ../types/dist/sleep-DJFUfKvA.mjs
5458
5475
  /**
5459
5476
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5460
5477
  * window to float samples (D455).
@@ -7916,7 +7933,7 @@ var EntryDescriptorSchema = object({
7916
7933
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
7917
7934
  fields: record(string(), unknown())
7918
7935
  }).strict();
7919
- /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
7936
+ /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
7920
7937
  var RecordKindDeclarationSchema = object({
7921
7938
  database: _enum(RECORD_DATABASES).default("settings"),
7922
7939
  class: _enum(RECORD_CLASSES),
@@ -7935,14 +7952,6 @@ var RecordKindDeclarationSchema = object({
7935
7952
  secretPaths: array(string().min(1)).default([]),
7936
7953
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
7937
7954
  secretArrayKeys: record(string(), string()).default({}),
7938
- /**
7939
- * RETIRED (D900): the legacy table a kind adopted from during the records
7940
- * migration. Nothing declares it any more and nothing reads it; the schema
7941
- * still ACCEPTS it because the catalog rows the migration wrote carry it
7942
- * (an orphaned kind is never redeclared) and an addon built before the
7943
- * removal still sends it. Never set it.
7944
- */
7945
- adoptsFrom: string().min(1).optional(),
7946
7955
  /** Kinds that must agree through `transact` sit in one file under one family name. */
7947
7956
  transactFamily: string().min(1).optional(),
7948
7957
  entry: EntryDescriptorSchema.optional()
@@ -13494,17 +13503,6 @@ object({
13494
13503
  createdAt: number(),
13495
13504
  updatedAt: number()
13496
13505
  });
13497
- object({
13498
- id: string(),
13499
- label: string(),
13500
- isAdmin: boolean().default(false),
13501
- allowedProviders: AllowedProviderSchema,
13502
- allowedDevices: AllowedDevicesSchema,
13503
- tokenHash: string(),
13504
- tokenPrefix: string(),
13505
- createdAt: number(),
13506
- lastUsedAt: number().optional()
13507
- });
13508
13506
  object({
13509
13507
  id: string(),
13510
13508
  userId: string(),
@@ -17380,16 +17378,36 @@ var RecordKindStateSchema = _enum([
17380
17378
  var DeclareKindResultSchema = object({
17381
17379
  kindId: number().int(),
17382
17380
  state: RecordKindStateSchema,
17383
- createdIndexes: array(string()),
17384
- /**
17385
- * RETIRED (D900): always `null`. It carried the records-migration boot guard;
17386
- * it stays on the wire, null, because an addon built before the removal reads
17387
- * an ABSENT field as "adoption pending" and refuses to start.
17388
- */
17389
- adoptionPending: _null()
17381
+ createdIndexes: array(string())
17390
17382
  });
17391
17383
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
17392
17384
  var SecretRefsList = array(string());
17385
+ /**
17386
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
17387
+ * All ops of one call share ONE database file and ONE `transactFamily`.
17388
+ */
17389
+ var RecordTransactOpSchema = discriminatedUnion("op", [
17390
+ object({
17391
+ op: literal("put"),
17392
+ kind: RecordKindNameSchema,
17393
+ record: RecordInputSchema,
17394
+ ifRev: number().int().min(0).optional()
17395
+ }),
17396
+ object({
17397
+ op: literal("patch"),
17398
+ kind: RecordKindNameSchema,
17399
+ id: RecordIdSchema,
17400
+ data: RecordBodySchema,
17401
+ at: number().int().nullable().optional(),
17402
+ expiresAt: number().int().nullable().optional(),
17403
+ ifRev: number().int().min(1).optional()
17404
+ }),
17405
+ object({
17406
+ op: literal("delete"),
17407
+ kind: RecordKindNameSchema,
17408
+ id: RecordIdSchema
17409
+ })
17410
+ ]);
17393
17411
  var RecordSecretRefsSchema = record(string(), record(string(), string()));
17394
17412
  method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
17395
17413
  kind: "mutation",
@@ -17496,6 +17514,16 @@ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema)
17496
17514
  }), {
17497
17515
  kind: "mutation",
17498
17516
  auth: "admin"
17517
+ }), method(object({ ops: array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), object({
17518
+ results: array(object({
17519
+ rev: number().int().nullable(),
17520
+ deleted: boolean()
17521
+ })),
17522
+ releasedRefs: SecretRefsList,
17523
+ secretRefs: SecretRefsList
17524
+ }), {
17525
+ kind: "mutation",
17526
+ auth: "admin"
17499
17527
  }), method(object({
17500
17528
  deviceId: number().int(),
17501
17529
  kinds: array(RecordKindNameSchema).optional()
@@ -42935,9 +42963,13 @@ var NcSystemEventKindSchema = _enum([
42935
42963
  "node-updating",
42936
42964
  "node-inference-unavailable",
42937
42965
  "detection-blind",
42966
+ "motion-noisy",
42967
+ "motion-calm",
42938
42968
  "recording-stalled",
42939
42969
  "recording-healthy",
42940
42970
  "recording-degraded",
42971
+ "device-attention-required",
42972
+ "device-attention-resolved",
42941
42973
  "storage-location-low",
42942
42974
  "storage-location-critical",
42943
42975
  "storage-location-ok",
@@ -42961,6 +42993,8 @@ var NcSystemEventKindSchema = _enum([
42961
42993
  "alert-critical",
42962
42994
  "alert-error",
42963
42995
  "alert-critical-resolved",
42996
+ "rule-broken",
42997
+ "rule-repaired",
42964
42998
  "camera-online",
42965
42999
  "camera-offline",
42966
43000
  "camera-disabled",
@@ -55605,6 +55639,16 @@ object({
55605
55639
  powerState: string().nullable(),
55606
55640
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
55607
55641
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55642
+ /**
55643
+ * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
55644
+ * combined care-and-filter reminder raised); false when every such reminder reads clear; null
55645
+ * when none is reported. A cleared reminder is not an unknown one.
55646
+ */
55647
+ filterCleaningDue: boolean().nullable(),
55648
+ /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
55649
+ machineCareDue: boolean().nullable(),
55650
+ /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
55651
+ machineCareRemainingRuns: number().int().nonnegative().nullable(),
55608
55652
  /** Option states: null when the appliance does not expose the option or has not said. */
55609
55653
  halfLoad: boolean().nullable(),
55610
55654
  hygienePlus: boolean().nullable(),
@@ -62263,16 +62307,6 @@ var UpdateUserInputSchema = object({
62263
62307
  allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
62264
62308
  scopes: array(TokenScopeSchema).optional()
62265
62309
  });
62266
- var ApiKeySummarySchema = object({
62267
- id: string(),
62268
- label: string(),
62269
- isAdmin: boolean().default(false),
62270
- allowedProviders: union([array(string()), literal("*")]).optional(),
62271
- allowedDevices: record(string(), union([array(string()), literal("*")])).optional(),
62272
- tokenPrefix: string(),
62273
- createdAt: number(),
62274
- lastUsedAt: number().optional()
62275
- });
62276
62310
  var OauthSessionSummarySchema = object({
62277
62311
  id: string(),
62278
62312
  userId: string(),
@@ -62294,8 +62328,7 @@ var TotpStatusSchema = object({
62294
62328
  confirmedAt: number().nullable()
62295
62329
  });
62296
62330
  /**
62297
- * user-management — singleton capability for user accounts and the
62298
- * legacy API-key rows.
62331
+ * user-management — singleton capability for user accounts.
62299
62332
  *
62300
62333
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
62301
62334
  * — the subset check on `setUserScopes` is moot
@@ -62351,10 +62384,6 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
62351
62384
  }), UserSummarySchema.extend({ passwordHash: string() }).nullable(), {
62352
62385
  kind: "mutation",
62353
62386
  access: "view"
62354
- }), method(_void(), array(ApiKeySummarySchema), { auth: "admin" }), method(object({ id: string() }), object({ success: literal(true) }), {
62355
- kind: "mutation",
62356
- auth: "admin",
62357
- access: "delete"
62358
62387
  }), method(object({ userId: string() }), TotpSetupResultSchema, {
62359
62388
  kind: "mutation",
62360
62389
  auth: "admin",
@@ -69867,6 +69896,12 @@ Object.freeze({
69867
69896
  addonId: null,
69868
69897
  access: "view"
69869
69898
  },
69899
+ "records.transact": {
69900
+ capName: "records",
69901
+ capScope: "system",
69902
+ addonId: null,
69903
+ access: "create"
69904
+ },
69870
69905
  "sceneMonitor.captureReference": {
69871
69906
  capName: "scene-monitor",
69872
69907
  capScope: "device",
@@ -71199,12 +71234,6 @@ Object.freeze({
71199
71234
  addonId: null,
71200
71235
  access: "view"
71201
71236
  },
71202
- "userManagement.listApiKeys": {
71203
- capName: "user-management",
71204
- capScope: "system",
71205
- addonId: null,
71206
- access: "view"
71207
- },
71208
71237
  "userManagement.listExternalIdentities": {
71209
71238
  capName: "user-management",
71210
71239
  capScope: "system",
@@ -71259,12 +71288,6 @@ Object.freeze({
71259
71288
  addonId: null,
71260
71289
  access: "create"
71261
71290
  },
71262
- "userManagement.revokeApiKey": {
71263
- capName: "user-management",
71264
- capScope: "system",
71265
- addonId: null,
71266
- access: "delete"
71267
- },
71268
71291
  "userManagement.revokeOauthSession": {
71269
71292
  capName: "user-management",
71270
71293
  capScope: "system",
@@ -74629,9 +74652,13 @@ new Map(Object.entries({
74629
74652
  "stream-online": "device-events",
74630
74653
  "stream-offline": "device-events",
74631
74654
  "detection-blind": "device-events",
74655
+ "motion-noisy": "device-events",
74656
+ "motion-calm": "device-events",
74632
74657
  "recording-stalled": "device-events",
74633
74658
  "recording-healthy": "device-events",
74634
74659
  "recording-degraded": "device-events",
74660
+ "device-attention-required": "device-events",
74661
+ "device-attention-resolved": "device-events",
74635
74662
  "node-online": "system",
74636
74663
  "node-offline": "system",
74637
74664
  "node-restarting": "system",
@@ -74648,6 +74675,8 @@ new Map(Object.entries({
74648
74675
  "alert-critical": "system",
74649
74676
  "alert-error": "system",
74650
74677
  "alert-critical-resolved": "system",
74678
+ "rule-broken": "system",
74679
+ "rule-repaired": "system",
74651
74680
  "storage-location-low": "system",
74652
74681
  "storage-location-critical": "system",
74653
74682
  "storage-location-ok": "system",
@@ -74712,6 +74741,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74712
74741
  label: "Detecting nothing",
74713
74742
  kinds: ["detection-blind"]
74714
74743
  },
74744
+ {
74745
+ id: "motion-noise",
74746
+ family: "device-events",
74747
+ label: "Motion without a subject",
74748
+ kinds: ["motion-noisy", "motion-calm"]
74749
+ },
74715
74750
  {
74716
74751
  id: "recording",
74717
74752
  family: "device-events",
@@ -74722,6 +74757,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74722
74757
  "recording-degraded"
74723
74758
  ]
74724
74759
  },
74760
+ {
74761
+ id: "device-attention",
74762
+ family: "device-events",
74763
+ label: "Needs attention",
74764
+ kinds: ["device-attention-required", "device-attention-resolved"]
74765
+ },
74725
74766
  {
74726
74767
  id: "nodes",
74727
74768
  family: "system",
@@ -74782,6 +74823,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
74782
74823
  "alert-critical-resolved"
74783
74824
  ]
74784
74825
  },
74826
+ {
74827
+ id: "rule-health",
74828
+ family: "system",
74829
+ label: "Notification rules",
74830
+ kinds: ["rule-broken", "rule-repaired"]
74831
+ },
74785
74832
  {
74786
74833
  id: "alarm",
74787
74834
  family: "alarm",
@@ -74855,6 +74902,7 @@ var ALERT_EPISODE = [
74855
74902
  "alert-error",
74856
74903
  "alert-critical-resolved"
74857
74904
  ];
74905
+ var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
74858
74906
  var UPDATES = [
74859
74907
  "addon-update-available",
74860
74908
  "server-update-available",
@@ -74884,9 +74932,12 @@ var DEVICE_EVENTS = [
74884
74932
  "stream-online",
74885
74933
  "stream-offline",
74886
74934
  "detection-blind",
74935
+ "motion-noisy",
74936
+ "motion-calm",
74887
74937
  "recording-stalled",
74888
74938
  "recording-healthy",
74889
74939
  "recording-degraded",
74940
+ ...DEVICE_ATTENTION,
74890
74941
  ...ALARM
74891
74942
  ];
74892
74943
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -75054,7 +75105,13 @@ var STATE_SUMMARY_VARS = [
75054
75105
  [...RULE_TEXT],
75055
75106
  [...RULE_TEXT],
75056
75107
  [...RULE_TEXT],
75057
- ([...RULE_TEXT], [...ALERT_EPISODE]),
75108
+ [...RULE_TEXT],
75109
+ [...RULE_TEXT],
75110
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
75111
+ [...RULE_TEXT],
75112
+ [...RULE_TEXT],
75113
+ [...RULE_TEXT],
75114
+ [...RULE_TEXT],
75058
75115
  [...RULE_TEXT],
75059
75116
  [...RULE_TEXT],
75060
75117
  [...RULE_TEXT],
@@ -75072,11 +75129,11 @@ var STATE_SUMMARY_VARS = [
75072
75129
  [...RULE_TEXT],
75073
75130
  [...RULE_TEXT],
75074
75131
  [...RULE_TEXT],
75132
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
75075
75133
  ([...RULE_TEXT], [...ALERT_EPISODE]),
75134
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
75076
75135
  ([...RULE_TEXT], [...ALERT_EPISODE]),
75077
- ([...RULE_TEXT], [...ALERT_EPISODE]),
75078
- ([...RULE_TEXT], [...ALERT_EPISODE]),
75079
- ([...RULE_TEXT], [...ALERT_EPISODE]),
75136
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
75080
75137
  [...RULE_TEXT],
75081
75138
  [...RULE_TEXT],
75082
75139
  [...RULE_TEXT],
@@ -75097,6 +75154,125 @@ var STATE_SUMMARY_VARS = [
75097
75154
  [...RULE_TEXT],
75098
75155
  ...STATE_SUMMARY_VARS
75099
75156
  ];
75157
+ new Map([
75158
+ {
75159
+ id: "device-connectivity",
75160
+ family: "device-events",
75161
+ label: "Device connectivity (offline / back online)",
75162
+ bad: ["device-offline"],
75163
+ recovery: ["device-online"],
75164
+ snapshotLabel: "Devices offline now",
75165
+ snapshotSection: "device-state"
75166
+ },
75167
+ {
75168
+ id: "device-switch",
75169
+ family: "device-events",
75170
+ label: "Device switched off / back on",
75171
+ bad: ["device-disabled"],
75172
+ recovery: ["device-enabled"],
75173
+ snapshotLabel: "Devices switched off now",
75174
+ snapshotSection: "device-state"
75175
+ },
75176
+ {
75177
+ id: "stream-connectivity",
75178
+ family: "device-events",
75179
+ label: "Stream connectivity (offline / back online)",
75180
+ bad: ["stream-offline"],
75181
+ recovery: ["stream-online"],
75182
+ snapshotLabel: "Streams offline now",
75183
+ snapshotSection: "streams"
75184
+ },
75185
+ {
75186
+ id: "battery",
75187
+ family: "device-events",
75188
+ label: "Battery (low / back to normal)",
75189
+ bad: ["device-battery-low"],
75190
+ recovery: ["device-battery-normal"],
75191
+ snapshotLabel: "Batteries low now",
75192
+ snapshotSection: "battery"
75193
+ },
75194
+ {
75195
+ id: "consumables",
75196
+ family: "device-events",
75197
+ label: "Consumables (low / replaced)",
75198
+ bad: ["device-consumable-low"],
75199
+ recovery: ["device-consumable-normal"],
75200
+ snapshotLabel: "Consumables low now",
75201
+ snapshotSection: "consumables"
75202
+ },
75203
+ {
75204
+ id: "tanks",
75205
+ family: "device-events",
75206
+ label: "Tanks (low or full / back to normal)",
75207
+ bad: ["device-tank-low", "device-tank-full"],
75208
+ recovery: ["device-tank-normal"],
75209
+ snapshotLabel: "Tanks low or full now",
75210
+ snapshotSection: "tanks"
75211
+ },
75212
+ {
75213
+ id: "motion-noise",
75214
+ family: "device-events",
75215
+ label: "Motion without a subject (constant / calm again)",
75216
+ bad: ["motion-noisy"],
75217
+ recovery: ["motion-calm"],
75218
+ snapshotLabel: "Cameras with constant motion now",
75219
+ snapshotSection: null
75220
+ },
75221
+ {
75222
+ id: "recording-health",
75223
+ family: "device-events",
75224
+ label: "Recording health (stalled or degraded / recording again)",
75225
+ bad: ["recording-stalled", "recording-degraded"],
75226
+ recovery: ["recording-healthy"],
75227
+ snapshotLabel: "Recordings stalled now",
75228
+ snapshotSection: null
75229
+ },
75230
+ {
75231
+ id: "device-attention",
75232
+ family: "device-events",
75233
+ label: "Device needs attention (raised / resolved)",
75234
+ bad: ["device-attention-required"],
75235
+ recovery: ["device-attention-resolved"],
75236
+ snapshotLabel: "Devices needing attention now",
75237
+ snapshotSection: null
75238
+ },
75239
+ {
75240
+ id: "node-connectivity",
75241
+ family: "system",
75242
+ label: "Node connectivity (offline / back online)",
75243
+ bad: ["node-offline"],
75244
+ recovery: ["node-online"],
75245
+ snapshotLabel: "Nodes offline now",
75246
+ snapshotSection: "nodes"
75247
+ },
75248
+ {
75249
+ id: "storage-space",
75250
+ family: "system",
75251
+ label: "Storage space (low or critical / ok again)",
75252
+ bad: ["storage-location-low", "storage-location-critical"],
75253
+ recovery: ["storage-location-ok"],
75254
+ snapshotLabel: "Storage locations low now",
75255
+ snapshotSection: null
75256
+ },
75257
+ {
75258
+ id: "critical-alerts",
75259
+ family: "system",
75260
+ label: "Critical alerts (raised / resolved)",
75261
+ bad: ["alert-critical"],
75262
+ recovery: ["alert-critical-resolved"],
75263
+ snapshotLabel: "Critical alerts open now",
75264
+ snapshotSection: null
75265
+ },
75266
+ {
75267
+ id: "rule-health",
75268
+ family: "system",
75269
+ label: "Rule health (broken / repaired)",
75270
+ bad: ["rule-broken"],
75271
+ recovery: ["rule-repaired"],
75272
+ snapshotLabel: "Notification rules broken now",
75273
+ snapshotSection: null
75274
+ }
75275
+ ].flatMap((spec) => [...spec.bad, ...spec.recovery].map((kind) => [kind, spec])));
75100
75276
  new Set([
75101
75277
  "disarmed",
75102
75278
  "armed_home",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.172",
3
+ "version": "1.2.174",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",