@camstack/system 1.2.465 → 1.2.466

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.
Files changed (88) hide show
  1. package/dist/addon-runner.js +1 -0
  2. package/dist/addon-runner.mjs +1 -0
  3. package/dist/{agent-https-CPJ7FTs0.mjs → agent-https-DDzIuZY_.mjs} +1 -1
  4. package/dist/{agent-https-CzA1AmyI.js → agent-https-OIvfjiTx.js} +1 -1
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  11. package/dist/builtins/autotrack/index.js +1 -1
  12. package/dist/builtins/autotrack/index.mjs +1 -1
  13. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  15. package/dist/builtins/calendars/calendars.addon.js +1 -1
  16. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  17. package/dist/builtins/camera-grid/index.js +1 -1
  18. package/dist/builtins/camera-grid/index.mjs +1 -1
  19. package/dist/builtins/composer/composer.addon.js +2 -2
  20. package/dist/builtins/composer/composer.addon.mjs +2 -2
  21. package/dist/builtins/console-logging/index.js +1 -1
  22. package/dist/builtins/console-logging/index.mjs +1 -1
  23. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  24. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  25. package/dist/builtins/device-history/device-history.addon.js +1 -1
  26. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  27. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  28. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  29. package/dist/builtins/hub-forwarder/index.js +1 -1
  30. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  31. package/dist/builtins/keychain/index.js +3 -3
  32. package/dist/builtins/keychain/index.mjs +3 -3
  33. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  34. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  35. package/dist/builtins/local-auth/auth-schema.d.ts +0 -2
  36. package/dist/builtins/local-auth/local-auth.addon.d.ts +0 -1
  37. package/dist/builtins/local-auth/local-auth.addon.js +23 -178
  38. package/dist/builtins/local-auth/local-auth.addon.mjs +24 -178
  39. package/dist/builtins/local-auth/record-kinds.d.ts +1 -6
  40. package/dist/builtins/local-network/local-network.addon.js +2 -2
  41. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  42. package/dist/builtins/loki-logging/index.js +1 -1
  43. package/dist/builtins/loki-logging/index.mjs +1 -1
  44. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  45. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  46. package/dist/builtins/platform-probe/index.js +1 -1
  47. package/dist/builtins/platform-probe/index.mjs +1 -1
  48. package/dist/builtins/record-entries/index.js +1 -1
  49. package/dist/builtins/record-entries/index.mjs +1 -1
  50. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  51. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  52. package/dist/builtins/snapshot/index.js +1 -1
  53. package/dist/builtins/snapshot/index.mjs +1 -1
  54. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  55. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  56. package/dist/builtins/sqlite-storage/index.js +1 -1
  57. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  58. package/dist/builtins/sqlite-storage/records/records-engine.d.ts +11 -0
  59. package/dist/builtins/sqlite-storage/records/records-provider.d.ts +7 -2
  60. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +25 -15
  61. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +25 -15
  62. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  63. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  64. package/dist/builtins/system-config/system-config.addon.js +3 -3
  65. package/dist/builtins/system-config/system-config.addon.mjs +3 -3
  66. package/dist/builtins/winston-logging/index.js +1 -1
  67. package/dist/builtins/winston-logging/index.mjs +1 -1
  68. package/dist/{composition-sources-BG0E76VO.js → composition-sources-DqHwltDV.js} +1 -1
  69. package/dist/{composition-sources-CqRsEC0a.mjs → composition-sources-f74jlgRO.mjs} +1 -1
  70. package/dist/{constants-BYJ4ni7h.js → constants-CdgJF4V6.js} +1 -1
  71. package/dist/{constants-CmGw1liQ.mjs → constants-Dknv37yZ.mjs} +1 -1
  72. package/dist/{device-ca-CQcB6yfj.mjs → device-ca-B16Mr3EY.mjs} +1 -1
  73. package/dist/{device-ca-B-Txwl4W.js → device-ca-DpvQ5wrb.js} +1 -1
  74. package/dist/{dist-CR7idLer.mjs → dist-CfjkLTZV.mjs} +158 -66
  75. package/dist/{dist-Dwi4JA96.js → dist-QyW9hVO2.js} +175 -71
  76. package/dist/file-host-worker.js +1 -1
  77. package/dist/file-host-worker.mjs +1 -1
  78. package/dist/{hub-mdns-ciao-3qdHbtyp.js → hub-mdns-ciao-CWkX17zX.js} +2 -2
  79. package/dist/{hub-mdns-ciao-BlLwL65g.mjs → hub-mdns-ciao-CtHQEnb3.mjs} +2 -2
  80. package/dist/index.d.ts +0 -2
  81. package/dist/index.js +8 -8
  82. package/dist/index.mjs +10 -9
  83. package/dist/{restore-archive-BYL7E5af.mjs → restore-archive-BmHNBgte.mjs} +1 -1
  84. package/dist/{restore-archive-D1uxP8Eb.js → restore-archive-DMgpNgX5.js} +1 -1
  85. package/dist/{wal-maintenance-BQlvAduo.js → wal-maintenance-BIpPCYDi.js} +0 -0
  86. package/dist/{wal-maintenance-BDQT7TIi.mjs → wal-maintenance-Bs_X-di6.mjs} +0 -0
  87. package/package.json +1 -1
  88. package/dist/auth/api-key-manager.d.ts +0 -19
@@ -1,6 +1,6 @@
1
1
  let zod = require("zod");
2
2
  require("node:crypto");
3
- //#region ../types/dist/event-category-7pZEBmVg.mjs
3
+ //#region ../types/dist/event-category-BfJwUd2S.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -317,6 +317,15 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
317
317
  */
318
318
  EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
319
319
  /**
320
+ * A camera's motion source has fired constantly with no subject for an hour
321
+ * (motion duty or session count over the bar, zero detections) — it is not
322
+ * blind, its motion zones or sensitivity want tuning (D907). Paired with
323
+ * {@link PipelineMotionCalm}.
324
+ */
325
+ EventCategory["PipelineMotionNoisy"] = "pipeline.motion-noisy";
326
+ /** The recovery edge of {@link PipelineMotionNoisy}: the motion fell back, or a detection arrived. */
327
+ EventCategory["PipelineMotionCalm"] = "pipeline.motion-calm";
328
+ /**
320
329
  * Per-camera pipeline config was mutated by the orchestrator
321
330
  * (3-level settings change via `setAgentAddonDefaults` /
322
331
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -753,7 +762,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
753
762
  return EventCategory;
754
763
  }({});
755
764
  //#endregion
756
- //#region ../types/dist/sleep-CueztlR1.mjs
765
+ //#region ../types/dist/sleep-DJFUfKvA.mjs
757
766
  /**
758
767
  * The audio chunk plane's byte format, and the ONE expansion from a coded
759
768
  * window to float samples (D455).
@@ -3412,6 +3421,17 @@ var BatchTooLargeError = class extends RecordsError {
3412
3421
  this.name = "BatchTooLargeError";
3413
3422
  }
3414
3423
  };
3424
+ /**
3425
+ * A `transact` the engine refuses before touching a row: an op on a kind the
3426
+ * caller did not declare in ONE file and ONE `transactFamily`. The detail names
3427
+ * which rule (`cross-file`, `cross-family`, `no-family`); it is never a silent split.
3428
+ */
3429
+ var TransactRefusedError = class extends RecordsError {
3430
+ constructor(detail) {
3431
+ super("transact-refused", detail);
3432
+ this.name = "TransactRefusedError";
3433
+ }
3434
+ };
3415
3435
  function defOf(schema) {
3416
3436
  const zodBag = Reflect.get(schema, "_zod");
3417
3437
  if (typeof zodBag !== "object" || zodBag === null) return {};
@@ -3646,8 +3666,7 @@ var EntryDescriptorSchema = zod.z.object({
3646
3666
  /** JSON Schema of the entry body; `secret: true` marks a password field. */
3647
3667
  fields: zod.z.record(zod.z.string(), zod.z.unknown())
3648
3668
  }).strict();
3649
- /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
3650
- var RecordKindDeclarationSchema = zod.z.object({
3669
+ var RecordKindDeclarationShape = zod.z.object({
3651
3670
  database: zod.z.enum(RECORD_DATABASES).default("settings"),
3652
3671
  class: zod.z.enum(RECORD_CLASSES),
3653
3672
  writeTrigger: zod.z.string().min(1),
@@ -3665,18 +3684,18 @@ var RecordKindDeclarationSchema = zod.z.object({
3665
3684
  secretPaths: zod.z.array(zod.z.string().min(1)).default([]),
3666
3685
  /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
3667
3686
  secretArrayKeys: zod.z.record(zod.z.string(), zod.z.string()).default({}),
3668
- /**
3669
- * RETIRED (D900): the legacy table a kind adopted from during the records
3670
- * migration. Nothing declares it any more and nothing reads it; the schema
3671
- * still ACCEPTS it because the catalog rows the migration wrote carry it
3672
- * (an orphaned kind is never redeclared) and an addon built before the
3673
- * removal still sends it. Never set it.
3674
- */
3675
- adoptsFrom: zod.z.string().min(1).optional(),
3676
3687
  /** Kinds that must agree through `transact` sit in one file under one family name. */
3677
3688
  transactFamily: zod.z.string().min(1).optional(),
3678
3689
  entry: EntryDescriptorSchema.optional()
3679
- }).strict();
3690
+ });
3691
+ /** What crosses the wire from an addon: JSON only, no Zod. An unknown key is refused. */
3692
+ var RecordKindDeclarationSchema = RecordKindDeclarationShape.strict();
3693
+ /**
3694
+ * A declaration as the engine's catalog stored it: an unknown key is DROPPED,
3695
+ * because a row written by an older engine must never stop records from
3696
+ * starting. Only for rows read back from the catalog, never for input.
3697
+ */
3698
+ var StoredRecordKindDeclarationSchema = RecordKindDeclarationShape;
3680
3699
  /** The kind names: lower-case, dash separated, short enough for an index name. */
3681
3700
  var RecordKindNameSchema = zod.z.string().regex(/^[a-z][a-z0-9-]{0,47}$/);
3682
3701
  /** Cross-field rules a declaration must satisfy. Throws {@link DeclarationRefusedError}. */
@@ -3762,6 +3781,23 @@ function defineRecordKinds(specs) {
3762
3781
  }
3763
3782
  return out;
3764
3783
  }
3784
+ /**
3785
+ * The scope rule of `transact`, shared by the engine, the provider and the
3786
+ * in-memory records so they cannot disagree: every op's kind sits in ONE
3787
+ * database file, and when more than one kind is involved they all name the
3788
+ * SAME `transactFamily`. A refusal names the rule; nothing is split silently.
3789
+ */
3790
+ /** Throws {@link TransactRefusedError} unless the kinds may share one transaction. */
3791
+ function assertTransactScope(members) {
3792
+ const byKind = /* @__PURE__ */ new Map();
3793
+ for (const m of members) byKind.set(m.kind, m);
3794
+ const kinds = [...byKind.values()];
3795
+ if (new Set(kinds.map((m) => m.declaration.database)).size > 1) throw new TransactRefusedError(`cross-file: the ops span more than one database file (${kinds.map((m) => `${m.kind}@${m.declaration.database}`).join(", ")}); a transaction lives in ONE file`);
3796
+ if (kinds.length <= 1) return;
3797
+ const missing = kinds.filter((m) => m.declaration.transactFamily === void 0);
3798
+ if (missing.length > 0) throw new TransactRefusedError(`no-family: ${missing.map((m) => m.kind).join(", ")} declare no transactFamily; kinds that must agree through transact share one`);
3799
+ if (new Set(kinds.map((m) => m.declaration.transactFamily)).size > 1) throw new TransactRefusedError(`cross-family: the ops span more than one transactFamily (${kinds.map((m) => `${m.kind}=${String(m.declaration.transactFamily)}`).join(", ")})`);
3800
+ }
3765
3801
  /** Shared Zod schemas used across streaming capabilities. */
3766
3802
  var CamProfileSchema = zod.z.enum([
3767
3803
  "high",
@@ -10561,17 +10597,6 @@ var UserRecordSchema = zod.z.object({
10561
10597
  createdAt: zod.z.number(),
10562
10598
  updatedAt: zod.z.number()
10563
10599
  });
10564
- var ApiKeyRecordSchema = zod.z.object({
10565
- id: zod.z.string(),
10566
- label: zod.z.string(),
10567
- isAdmin: zod.z.boolean().default(false),
10568
- allowedProviders: AllowedProviderSchema,
10569
- allowedDevices: AllowedDevicesSchema,
10570
- tokenHash: zod.z.string(),
10571
- tokenPrefix: zod.z.string(),
10572
- createdAt: zod.z.number(),
10573
- lastUsedAt: zod.z.number().optional()
10574
- });
10575
10600
  var ScopedTokenSchema = zod.z.object({
10576
10601
  id: zod.z.string(),
10577
10602
  userId: zod.z.string(),
@@ -17215,16 +17240,36 @@ var RecordKindStateSchema = zod.z.enum([
17215
17240
  var DeclareKindResultSchema = zod.z.object({
17216
17241
  kindId: zod.z.number().int(),
17217
17242
  state: RecordKindStateSchema,
17218
- createdIndexes: zod.z.array(zod.z.string()),
17219
- /**
17220
- * RETIRED (D900): always `null`. It carried the records-migration boot guard;
17221
- * it stays on the wire, null, because an addon built before the removal reads
17222
- * an ABSENT field as "adoption pending" and refuses to start.
17223
- */
17224
- adoptionPending: zod.z.null()
17243
+ createdIndexes: zod.z.array(zod.z.string())
17225
17244
  });
17226
17245
  /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
17227
17246
  var SecretRefsList = zod.z.array(zod.z.string());
17247
+ /**
17248
+ * One op of a `transact`: the single-row writes, each on a kind of the caller.
17249
+ * All ops of one call share ONE database file and ONE `transactFamily`.
17250
+ */
17251
+ var RecordTransactOpSchema = zod.z.discriminatedUnion("op", [
17252
+ zod.z.object({
17253
+ op: zod.z.literal("put"),
17254
+ kind: RecordKindNameSchema,
17255
+ record: RecordInputSchema,
17256
+ ifRev: zod.z.number().int().min(0).optional()
17257
+ }),
17258
+ zod.z.object({
17259
+ op: zod.z.literal("patch"),
17260
+ kind: RecordKindNameSchema,
17261
+ id: RecordIdSchema,
17262
+ data: RecordBodySchema,
17263
+ at: zod.z.number().int().nullable().optional(),
17264
+ expiresAt: zod.z.number().int().nullable().optional(),
17265
+ ifRev: zod.z.number().int().min(1).optional()
17266
+ }),
17267
+ zod.z.object({
17268
+ op: zod.z.literal("delete"),
17269
+ kind: RecordKindNameSchema,
17270
+ id: RecordIdSchema
17271
+ })
17272
+ ]);
17228
17273
  var RecordSecretRefsSchema = zod.z.record(zod.z.string(), zod.z.record(zod.z.string(), zod.z.string()));
17229
17274
  var recordsCapability = {
17230
17275
  name: "records",
@@ -17356,6 +17401,22 @@ var recordsCapability = {
17356
17401
  kind: "mutation",
17357
17402
  auth: "admin"
17358
17403
  }),
17404
+ /**
17405
+ * Several single-row writes (put / patch / delete) in ONE SQLite transaction:
17406
+ * all land or none does. Every op's kind must sit in one file and share one
17407
+ * `transactFamily` (`records/transact-refused` otherwise). Results are in op order.
17408
+ */
17409
+ transact: method(zod.z.object({ ops: zod.z.array(RecordTransactOpSchema).min(1).max(RECORD_BATCH_MAX) }), zod.z.object({
17410
+ results: zod.z.array(zod.z.object({
17411
+ rev: zod.z.number().int().nullable(),
17412
+ deleted: zod.z.boolean()
17413
+ })),
17414
+ releasedRefs: SecretRefsList,
17415
+ secretRefs: SecretRefsList
17416
+ }), {
17417
+ kind: "mutation",
17418
+ auth: "admin"
17419
+ }),
17359
17420
  /** The D865 hook body: every kind of this addon declared `deviceRemoval: 'delete'`. */
17360
17421
  deleteDevice: method(zod.z.object({
17361
17422
  deviceId: zod.z.number().int(),
@@ -44990,9 +45051,13 @@ var NcSystemEventKindSchema = zod.z.enum([
44990
45051
  "node-updating",
44991
45052
  "node-inference-unavailable",
44992
45053
  "detection-blind",
45054
+ "motion-noisy",
45055
+ "motion-calm",
44993
45056
  "recording-stalled",
44994
45057
  "recording-healthy",
44995
45058
  "recording-degraded",
45059
+ "device-attention-required",
45060
+ "device-attention-resolved",
44996
45061
  "storage-location-low",
44997
45062
  "storage-location-critical",
44998
45063
  "storage-location-ok",
@@ -61570,6 +61635,16 @@ var DishwasherStatusSchema = zod.z.object({
61570
61635
  powerState: zod.z.string().nullable(),
61571
61636
  saltLevel: DishwasherConsumableLevelSchema.nullable(),
61572
61637
  rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
61638
+ /**
61639
+ * True while the appliance asks for its filter to be cleaned (smart-filter, filter-system or
61640
+ * combined care-and-filter reminder raised); false when every such reminder reads clear; null
61641
+ * when none is reported. A cleared reminder is not an unknown one.
61642
+ */
61643
+ filterCleaningDue: zod.z.boolean().nullable(),
61644
+ /** True while the machine-care (descaling / cleaning-program) reminder is raised; false when clear; null when not reported. */
61645
+ machineCareDue: zod.z.boolean().nullable(),
61646
+ /** Program runs left before the machine-care reminder is due; null when the appliance does not say. */
61647
+ machineCareRemainingRuns: zod.z.number().int().nonnegative().nullable(),
61573
61648
  /** Option states: null when the appliance does not expose the option or has not said. */
61574
61649
  halfLoad: zod.z.boolean().nullable(),
61575
61650
  hygienePlus: zod.z.boolean().nullable(),
@@ -71712,16 +71787,6 @@ var UpdateUserInputSchema = zod.z.object({
71712
71787
  allowedDevices: zod.z.record(zod.z.string(), zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")])).optional(),
71713
71788
  scopes: zod.z.array(TokenScopeSchema).optional()
71714
71789
  });
71715
- var ApiKeySummarySchema = zod.z.object({
71716
- id: zod.z.string(),
71717
- label: zod.z.string(),
71718
- isAdmin: zod.z.boolean().default(false),
71719
- allowedProviders: zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")]).optional(),
71720
- allowedDevices: zod.z.record(zod.z.string(), zod.z.union([zod.z.array(zod.z.string()), zod.z.literal("*")])).optional(),
71721
- tokenPrefix: zod.z.string(),
71722
- createdAt: zod.z.number(),
71723
- lastUsedAt: zod.z.number().optional()
71724
- });
71725
71790
  var OauthSessionSummarySchema = zod.z.object({
71726
71791
  id: zod.z.string(),
71727
71792
  userId: zod.z.string(),
@@ -71743,8 +71808,7 @@ var TotpStatusSchema = zod.z.object({
71743
71808
  confirmedAt: zod.z.number().nullable()
71744
71809
  });
71745
71810
  /**
71746
- * user-management — singleton capability for user accounts and the
71747
- * legacy API-key rows.
71811
+ * user-management — singleton capability for user accounts.
71748
71812
  *
71749
71813
  * v2 model: every method gated by `auth: 'admin'`. Admin-only delegation
71750
71814
  * — the subset check on `setUserScopes` is moot
@@ -71812,12 +71876,6 @@ var userManagementCapability = {
71812
71876
  kind: "mutation",
71813
71877
  access: "view"
71814
71878
  }),
71815
- listApiKeys: method(zod.z.void(), zod.z.array(ApiKeySummarySchema), { auth: "admin" }),
71816
- revokeApiKey: method(zod.z.object({ id: zod.z.string() }), zod.z.object({ success: zod.z.literal(true) }), {
71817
- kind: "mutation",
71818
- auth: "admin",
71819
- access: "delete"
71820
- }),
71821
71879
  setupTotp: method(zod.z.object({ userId: zod.z.string() }), TotpSetupResultSchema, {
71822
71880
  kind: "mutation",
71823
71881
  auth: "admin",
@@ -81671,6 +81729,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
81671
81729
  addonId: null,
81672
81730
  access: "view"
81673
81731
  },
81732
+ "records.transact": {
81733
+ capName: "records",
81734
+ capScope: "system",
81735
+ addonId: null,
81736
+ access: "create"
81737
+ },
81674
81738
  "sceneMonitor.captureReference": {
81675
81739
  capName: "scene-monitor",
81676
81740
  capScope: "device",
@@ -83003,12 +83067,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
83003
83067
  addonId: null,
83004
83068
  access: "view"
83005
83069
  },
83006
- "userManagement.listApiKeys": {
83007
- capName: "user-management",
83008
- capScope: "system",
83009
- addonId: null,
83010
- access: "view"
83011
- },
83012
83070
  "userManagement.listExternalIdentities": {
83013
83071
  capName: "user-management",
83014
83072
  capScope: "system",
@@ -83063,12 +83121,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
83063
83121
  addonId: null,
83064
83122
  access: "create"
83065
83123
  },
83066
- "userManagement.revokeApiKey": {
83067
- capName: "user-management",
83068
- capScope: "system",
83069
- addonId: null,
83070
- access: "delete"
83071
- },
83072
83124
  "userManagement.revokeOauthSession": {
83073
83125
  capName: "user-management",
83074
83126
  capScope: "system",
@@ -87384,9 +87436,13 @@ new Map(Object.entries({
87384
87436
  "stream-online": "device-events",
87385
87437
  "stream-offline": "device-events",
87386
87438
  "detection-blind": "device-events",
87439
+ "motion-noisy": "device-events",
87440
+ "motion-calm": "device-events",
87387
87441
  "recording-stalled": "device-events",
87388
87442
  "recording-healthy": "device-events",
87389
87443
  "recording-degraded": "device-events",
87444
+ "device-attention-required": "device-events",
87445
+ "device-attention-resolved": "device-events",
87390
87446
  "node-online": "system",
87391
87447
  "node-offline": "system",
87392
87448
  "node-restarting": "system",
@@ -87469,6 +87525,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
87469
87525
  label: "Detecting nothing",
87470
87526
  kinds: ["detection-blind"]
87471
87527
  },
87528
+ {
87529
+ id: "motion-noise",
87530
+ family: "device-events",
87531
+ label: "Motion without a subject",
87532
+ kinds: ["motion-noisy", "motion-calm"]
87533
+ },
87472
87534
  {
87473
87535
  id: "recording",
87474
87536
  family: "device-events",
@@ -87479,6 +87541,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
87479
87541
  "recording-degraded"
87480
87542
  ]
87481
87543
  },
87544
+ {
87545
+ id: "device-attention",
87546
+ family: "device-events",
87547
+ label: "Needs attention",
87548
+ kinds: ["device-attention-required", "device-attention-resolved"]
87549
+ },
87482
87550
  {
87483
87551
  id: "nodes",
87484
87552
  family: "system",
@@ -87660,6 +87728,7 @@ var ALERT_EPISODE = [
87660
87728
  "alert-error",
87661
87729
  "alert-critical-resolved"
87662
87730
  ];
87731
+ var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
87663
87732
  var UPDATES = [
87664
87733
  "addon-update-available",
87665
87734
  "server-update-available",
@@ -87689,9 +87758,12 @@ var DEVICE_EVENTS = [
87689
87758
  "stream-online",
87690
87759
  "stream-offline",
87691
87760
  "detection-blind",
87761
+ "motion-noisy",
87762
+ "motion-calm",
87692
87763
  "recording-stalled",
87693
87764
  "recording-healthy",
87694
87765
  "recording-degraded",
87766
+ ...DEVICE_ATTENTION,
87695
87767
  ...ALARM
87696
87768
  ];
87697
87769
  /** Every kind a summary may speak about — the two summarisable families. */
@@ -87859,7 +87931,9 @@ var STATE_SUMMARY_VARS = [
87859
87931
  [...RULE_TEXT],
87860
87932
  [...RULE_TEXT],
87861
87933
  [...RULE_TEXT],
87862
- ([...RULE_TEXT], [...ALERT_EPISODE]),
87934
+ [...RULE_TEXT],
87935
+ [...RULE_TEXT],
87936
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
87863
87937
  [...RULE_TEXT],
87864
87938
  [...RULE_TEXT],
87865
87939
  [...RULE_TEXT],
@@ -87881,11 +87955,11 @@ var STATE_SUMMARY_VARS = [
87881
87955
  [...RULE_TEXT],
87882
87956
  [...RULE_TEXT],
87883
87957
  [...RULE_TEXT],
87958
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
87884
87959
  ([...RULE_TEXT], [...ALERT_EPISODE]),
87960
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
87885
87961
  ([...RULE_TEXT], [...ALERT_EPISODE]),
87886
- ([...RULE_TEXT], [...ALERT_EPISODE]),
87887
- ([...RULE_TEXT], [...ALERT_EPISODE]),
87888
- ([...RULE_TEXT], [...ALERT_EPISODE]),
87962
+ ([...RULE_TEXT], [...DEVICE_ATTENTION, ...ALERT_EPISODE]),
87889
87963
  [...RULE_TEXT],
87890
87964
  [...RULE_TEXT],
87891
87965
  [...RULE_TEXT],
@@ -87961,6 +88035,15 @@ new Map([
87961
88035
  snapshotLabel: "Tanks low or full now",
87962
88036
  snapshotSection: "tanks"
87963
88037
  },
88038
+ {
88039
+ id: "motion-noise",
88040
+ family: "device-events",
88041
+ label: "Motion without a subject (constant / calm again)",
88042
+ bad: ["motion-noisy"],
88043
+ recovery: ["motion-calm"],
88044
+ snapshotLabel: "Cameras with constant motion now",
88045
+ snapshotSection: null
88046
+ },
87964
88047
  {
87965
88048
  id: "recording-health",
87966
88049
  family: "device-events",
@@ -87970,6 +88053,15 @@ new Map([
87970
88053
  snapshotLabel: "Recordings stalled now",
87971
88054
  snapshotSection: null
87972
88055
  },
88056
+ {
88057
+ id: "device-attention",
88058
+ family: "device-events",
88059
+ label: "Device needs attention (raised / resolved)",
88060
+ bad: ["device-attention-required"],
88061
+ recovery: ["device-attention-resolved"],
88062
+ snapshotLabel: "Devices needing attention now",
88063
+ snapshotSection: null
88064
+ },
87973
88065
  {
87974
88066
  id: "node-connectivity",
87975
88067
  family: "system",
@@ -88945,12 +89037,6 @@ Object.defineProperty(exports, "AlertSchema", {
88945
89037
  return AlertSchema;
88946
89038
  }
88947
89039
  });
88948
- Object.defineProperty(exports, "ApiKeyRecordSchema", {
88949
- enumerable: true,
88950
- get: function() {
88951
- return ApiKeyRecordSchema;
88952
- }
88953
- });
88954
89040
  Object.defineProperty(exports, "BaseAddon", {
88955
89041
  enumerable: true,
88956
89042
  get: function() {
@@ -89521,12 +89607,24 @@ Object.defineProperty(exports, "StorageMigrationJobSchema", {
89521
89607
  return StorageMigrationJobSchema;
89522
89608
  }
89523
89609
  });
89610
+ Object.defineProperty(exports, "StoredRecordKindDeclarationSchema", {
89611
+ enumerable: true,
89612
+ get: function() {
89613
+ return StoredRecordKindDeclarationSchema;
89614
+ }
89615
+ });
89524
89616
  Object.defineProperty(exports, "TokenScopeSchema", {
89525
89617
  enumerable: true,
89526
89618
  get: function() {
89527
89619
  return TokenScopeSchema;
89528
89620
  }
89529
89621
  });
89622
+ Object.defineProperty(exports, "TransactRefusedError", {
89623
+ enumerable: true,
89624
+ get: function() {
89625
+ return TransactRefusedError;
89626
+ }
89627
+ });
89530
89628
  Object.defineProperty(exports, "UNATTRIBUTED_BUCKET_KEY", {
89531
89629
  enumerable: true,
89532
89630
  get: function() {
@@ -89617,6 +89715,12 @@ Object.defineProperty(exports, "asString", {
89617
89715
  return asString$1;
89618
89716
  }
89619
89717
  });
89718
+ Object.defineProperty(exports, "assertTransactScope", {
89719
+ enumerable: true,
89720
+ get: function() {
89721
+ return assertTransactScope;
89722
+ }
89723
+ });
89620
89724
  Object.defineProperty(exports, "assertValidDeclaration", {
89621
89725
  enumerable: true,
89622
89726
  get: function() {
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Cek0wNdY.js");
2
- const require_wal_maintenance = require("./wal-maintenance-BQlvAduo.js");
2
+ const require_wal_maintenance = require("./wal-maintenance-BIpPCYDi.js");
3
3
  let node_worker_threads = require("node:worker_threads");
4
4
  //#region src/builtins/sqlite-storage/file-host-worker.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { C as RecordsEngine, D as callVector, E as callRecords, O as controlTargetOf, T as callData, _ as collectTransferables, a as WalMaintenance, b as isFileHostWorkerData, h as serializeError, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, w as callControl, x as trustInput, y as isFileHostRequest } from "./wal-maintenance-BDQT7TIi.mjs";
1
+ import { C as RecordsEngine, D as callVector, E as callRecords, O as controlTargetOf, T as callData, _ as collectTransferables, a as WalMaintenance, b as isFileHostWorkerData, h as serializeError, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, w as callControl, x as trustInput, y as isFileHostRequest } from "./wal-maintenance-Bs_X-di6.mjs";
2
2
  import { parentPort, threadId, workerData } from "node:worker_threads";
3
3
  //#region src/builtins/sqlite-storage/file-host-worker.ts
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-Dwi4JA96.js");
2
+ const require_dist = require("./dist-QyW9hVO2.js");
3
3
  const require_x509_es = require("./x509.es-C4cOo48M.js");
4
- const require_agent_https = require("./agent-https-CzA1AmyI.js");
4
+ const require_agent_https = require("./agent-https-OIvfjiTx.js");
5
5
  let node_crypto = require("node:crypto");
6
6
  let _camstack_types_node = require("@camstack/types/node");
7
7
  let node_fs_promises = require("node:fs/promises");
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
2
- import { xa as userError } from "./dist-CR7idLer.mjs";
2
+ import { Ca as userError } from "./dist-CfjkLTZV.mjs";
3
3
  import { f as X509Certificate$1 } from "./x509.es-DK__ETIe.mjs";
4
- import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-CPJ7FTs0.mjs";
4
+ import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-DDzIuZY_.mjs";
5
5
  import { X509Certificate, createPrivateKey } from "node:crypto";
6
6
  import { writeOwnerOnlyFileSync } from "@camstack/types/node";
7
7
  import { mkdir, writeFile } from "node:fs/promises";
package/dist/index.d.ts CHANGED
@@ -4,8 +4,6 @@ export { buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePyth
4
4
  export type { DirectCallerOptions } from "./addon/addon-api-factory.js";
5
5
  export { AddonApiFactory } from "./addon/addon-api-factory.js";
6
6
  export { AddonRouteRegistry } from "./addon-routes/addon-route-registry.js";
7
- export type { ApiKeyRecord, ApiKeyStorageAccess } from "./auth/api-key-manager.js";
8
- export { ApiKeyManager } from "./auth/api-key-manager.js";
9
7
  export type { AuthConfigReader, ReauthClaims, TokenPayload } from "./auth/auth-manager.js";
10
8
  export { AuthManager } from "./auth/auth-manager.js";
11
9
  export { scopesAllowAddon, scopesAllowDeviceCap } from "./auth/scope-matcher.js";
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-Dwi4JA96.js");
3
+ const require_dist = require("./dist-QyW9hVO2.js");
4
+ const require_device_ca = require("./device-ca-DpvQ5wrb.js");
4
5
  const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
5
- const require_device_ca = require("./device-ca-B-Txwl4W.js");
6
6
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
7
7
  require("./builtins/alerts/index.js");
8
8
  const require_builtins_calendars_calendars_addon = require("./builtins/calendars/calendars.addon.js");
@@ -26,21 +26,21 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
26
26
  const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
27
27
  const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
28
28
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
29
- const require_wal_maintenance = require("./wal-maintenance-BQlvAduo.js");
29
+ const require_wal_maintenance = require("./wal-maintenance-BIpPCYDi.js");
30
30
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
31
31
  const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
32
32
  const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
33
33
  require("./builtins/storage-orchestrator/index.js");
34
- const require_agent_https = require("./agent-https-CzA1AmyI.js");
35
- const require_constants = require("./constants-BYJ4ni7h.js");
34
+ const require_agent_https = require("./agent-https-OIvfjiTx.js");
35
+ const require_constants = require("./constants-CdgJF4V6.js");
36
36
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
37
37
  require("./builtins/system-config/index.js");
38
38
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
39
39
  const require_custom_action_registry = require("./custom-action-registry-MRyes5j0.js");
40
- const require_hub_mdns_ciao = require("./hub-mdns-ciao-3qdHbtyp.js");
40
+ const require_hub_mdns_ciao = require("./hub-mdns-ciao-CWkX17zX.js");
41
41
  const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
42
42
  const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
43
- const require_restore_archive = require("./restore-archive-D1uxP8Eb.js");
43
+ const require_restore_archive = require("./restore-archive-DMgpNgX5.js");
44
44
  const require_coral_accelerators = require("./coral-accelerators-oUXmmbc2.js");
45
45
  let zod = require("zod");
46
46
  let node_crypto = require("node:crypto");
@@ -15951,6 +15951,7 @@ function recordsTransportOf(api) {
15951
15951
  histogram: (input) => r.histogram.query(input),
15952
15952
  aggregate: (input) => r.aggregate.query(input),
15953
15953
  deleteWhere: (input) => r.deleteWhere.mutate(input),
15954
+ transact: (input) => r.transact.mutate(input),
15954
15955
  deleteDevice: (input) => r.deleteDevice.mutate(input),
15955
15956
  allocateId: (input) => r.allocateId.mutate(input)
15956
15957
  };
@@ -27572,7 +27573,6 @@ exports.AgentMdnsAdvertiser = AgentMdnsAdvertiser;
27572
27573
  exports.AgentMeshIdentityGate = AgentMeshIdentityGate;
27573
27574
  exports.AgentPairing = require_builtins_system_config_system_config_addon.AgentPairing;
27574
27575
  exports.AlertCenterAddon = require_builtins_alerts_alerts_addon.AlertCenterAddon;
27575
- exports.ApiKeyManager = require_builtins_local_auth_local_auth_addon.ApiKeyManager;
27576
27576
  exports.AuthAuditLog = require_builtins_local_auth_local_auth_addon.AuthAuditLog;
27577
27577
  exports.AuthManager = require_builtins_local_auth_local_auth_addon.AuthManager;
27578
27578
  exports.BackupDecryptError = require_restore_archive.BackupDecryptError;