@camstack/system 1.2.225 → 1.2.227

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 (62) hide show
  1. package/dist/addon-runner.js +2 -2
  2. package/dist/addon-runner.mjs +2 -2
  3. package/dist/addon-utils.js +1 -1
  4. package/dist/addon-utils.mjs +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/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/console-logging/index.js +1 -1
  14. package/dist/builtins/console-logging/index.mjs +1 -1
  15. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  17. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  18. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  19. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  20. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  21. package/dist/builtins/hub-forwarder/index.js +1 -1
  22. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  23. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  24. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  25. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  26. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  27. package/dist/builtins/local-network/local-network.addon.js +1 -1
  28. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  29. package/dist/builtins/loki-logging/index.js +1 -1
  30. package/dist/builtins/loki-logging/index.mjs +1 -1
  31. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  32. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  33. package/dist/builtins/platform-probe/index.js +1 -1
  34. package/dist/builtins/platform-probe/index.mjs +1 -1
  35. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  36. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  37. package/dist/builtins/snapshot/index.js +1 -1
  38. package/dist/builtins/snapshot/index.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  40. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  41. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +25 -1
  42. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  43. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  44. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +3 -1
  45. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +3 -1
  46. package/dist/builtins/system-config/system-config.addon.js +1 -1
  47. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  48. package/dist/builtins/winston-logging/index.js +1 -1
  49. package/dist/builtins/winston-logging/index.mjs +1 -1
  50. package/dist/{custom-action-registry-CdLp1P9C.mjs → custom-action-registry-Bl_FtykP.mjs} +1 -1
  51. package/dist/{custom-action-registry-BTB-LgGN.js → custom-action-registry-mtS2EOEs.js} +1 -1
  52. package/dist/{dist-DmfYrdAn.mjs → dist-jOwC9aK1.mjs} +233 -53
  53. package/dist/{dist-DdRxWA7g.js → dist-u8F4ZyXi.js} +233 -53
  54. package/dist/index.d.ts +1 -1
  55. package/dist/index.js +4 -3
  56. package/dist/index.mjs +4 -4
  57. package/dist/kernel/deps/npm-command.d.ts +22 -0
  58. package/dist/{manifest-system-deps-BhYmLVHw.mjs → manifest-system-deps-BEj9Dpu1.mjs} +35 -2
  59. package/dist/{manifest-system-deps-8x1jgPz_.js → manifest-system-deps-CrSP0Kkp.js} +40 -1
  60. package/dist/{retired-settings-keys-C-jOWHI0.js → retired-settings-keys-BQr0X6st.js} +1 -1
  61. package/dist/{retired-settings-keys-B0JHsynV.mjs → retired-settings-keys-Dcgpesdb.mjs} +1 -1
  62. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  let zod = require("zod");
2
- //#region ../types/dist/event-category-DAXzJeTX.mjs
2
+ //#region ../types/dist/event-category-ZyX6jcse.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -560,7 +560,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
560
560
  * a package zone — a newly-appeared stationary object of a package class
561
561
  * that cleared the class / zone / dwell / size gates. Payload:
562
562
  * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
563
- * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
563
+ * entryId, className, zoneIds, keyFrameMediaId?, bbox, timestamp }`.
564
564
  * Telemetry (D8): the durable record is the `package-events` store row;
565
565
  * this bus topic drives notifier rules + live UI. See
566
566
  * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
@@ -676,7 +676,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
676
676
  return EventCategory;
677
677
  }({});
678
678
  //#endregion
679
- //#region ../types/dist/sleep-BnujYGPe.mjs
679
+ //#region ../types/dist/sleep-CnLyvg3w.mjs
680
680
  /**
681
681
  * The audio chunk plane's byte format, and the ONE expansion from a coded
682
682
  * window to float samples (D455).
@@ -3394,13 +3394,30 @@ new Set([
3394
3394
  "scene",
3395
3395
  "motion",
3396
3396
  "object",
3397
- "audio"
3397
+ "audio",
3398
+ "mosaic"
3398
3399
  ]);
3399
- new Set([
3400
+ /**
3401
+ * The owner types that are event tables, in the order the event-media resolver
3402
+ * should consider them. Exported so a consumer asking "is this key an event?"
3403
+ * does not re-spell the list and drift from it.
3404
+ */
3405
+ var EVENT_OWNER_TYPES = [
3400
3406
  "motion",
3401
3407
  "object",
3402
3408
  "audio"
3403
- ]);
3409
+ ];
3410
+ /**
3411
+ * The same list as a Zod enum, for the cap inputs that must NAME the table
3412
+ * (D482: `getEventMedia` / `listEventMedia` take an owner, and an owner is
3413
+ * `(table, id)`).
3414
+ *
3415
+ * Built FROM {@link EVENT_OWNER_TYPES} rather than re-spelled: a fourth event
3416
+ * table would otherwise be accepted by the codec and refused at the door, with
3417
+ * nothing failing until a caller asked.
3418
+ */
3419
+ var EventOwnerTypeSchema = zod.z.enum(EVENT_OWNER_TYPES);
3420
+ new Set(EVENT_OWNER_TYPES);
3404
3421
  /**
3405
3422
  * Shared video / audio encode profile schemas used by every consumer
3406
3423
  * that asks the stream broker to spawn a derived stream
@@ -10096,6 +10113,59 @@ var settingsStoreCapability = {
10096
10113
  filter: QueryFilterSchema.optional(),
10097
10114
  columns: zod.z.array(zod.z.string()).readonly().optional()
10098
10115
  }), zod.z.array(SettingsRecordSchema).readonly()),
10116
+ /**
10117
+ * Make a SLOT hold this row — insert it, or update whatever already
10118
+ * occupies the slot — and answer with the id the row HAS.
10119
+ *
10120
+ * ## Why the store needed this
10121
+ *
10122
+ * {@link set} is already an upsert, but its slot is the PRIMARY KEY: the
10123
+ * caller has to know the id to address the row. That is exactly what a
10124
+ * collection keyed by an `INTEGER` rowid alias cannot do — SQLite assigns
10125
+ * the id, so a writer whose uniqueness rule is "one row per
10126
+ * `(ownerKind, ownerId, kind, slot)`" has no id to name and no way to
10127
+ * express the rule. {@link insert} can express it (a UNIQUE index
10128
+ * arbitrates) but only by THROWING at the loser of a race, and the loser
10129
+ * here is a legitimate re-capture, not an error.
10130
+ *
10131
+ * Getting there without this method means read-then-write: query the slot,
10132
+ * then `insert` or `update`. Two statements instead of one, a race between
10133
+ * them, and a recovery path that has to recognise a UNIQUE violation by its
10134
+ * MESSAGE — across a process boundary, because the store lives behind an
10135
+ * RPC door. A string match would be the whole gate, and a store that
10136
+ * rephrased its error would lose the row silently. One statement has no
10137
+ * such gate (D482).
10138
+ *
10139
+ * ## The contract
10140
+ *
10141
+ * `conflict` names the DECLARED columns that identify the slot. They must
10142
+ * be covered by a UNIQUE index on the collection — SQLite resolves an
10143
+ * `ON CONFLICT` target against its indexes and REFUSES the statement when
10144
+ * none matches, so a wrong list is a loud error on the first write, never a
10145
+ * silently duplicated row. An empty list is refused rather than passed on:
10146
+ * `ON CONFLICT()` is not valid SQL, and the intent it would most likely
10147
+ * encode ("no slot, just insert") is {@link insert}.
10148
+ *
10149
+ * Row shape is {@link insert}'s: `record.id` is used when the collection
10150
+ * needs a supplied key and IGNORED when the primary key is an `INTEGER`
10151
+ * rowid alias — exactly as `insert` and `insertMany` already treat it.
10152
+ *
10153
+ * Returns the id either way: the one SQLite assigned on an insert, or the
10154
+ * one the row it updated already had. A caller cannot tell which happened,
10155
+ * and deliberately — every caller wants the slot's id, and one that needed
10156
+ * to distinguish creation from replacement would have to read first anyway.
10157
+ */
10158
+ upsert: method(zod.z.object({
10159
+ namespace: zod.z.string().optional(),
10160
+ collection: zod.z.string(),
10161
+ /** Declared columns identifying the slot; must be covered by a UNIQUE
10162
+ * index on the collection. Never empty. */
10163
+ conflict: zod.z.array(zod.z.string()).readonly(),
10164
+ record: BulkRecordSchema
10165
+ }), zod.z.object({
10166
+ /** The id the row HAS: assigned by SQLite on an insert, or the existing
10167
+ * row's own id on an update. */
10168
+ id: zod.z.union([zod.z.string(), zod.z.number()]) }), { kind: "mutation" }),
10099
10169
  /** Insert a new record. */
10100
10170
  insert: method(zod.z.object({
10101
10171
  namespace: zod.z.string().optional(),
@@ -10385,6 +10455,20 @@ id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
10385
10455
  kind: "mutation",
10386
10456
  auth: "admin"
10387
10457
  }),
10458
+ /**
10459
+ * Make a slot hold this row, and answer with the id the row HAS. The
10460
+ * engine half of `settings-store.upsert` — read that docblock for why the
10461
+ * store needed a slot that is not the primary key (D482).
10462
+ */
10463
+ upsert: method(zod.z.object({
10464
+ namespace: zod.z.string().optional(),
10465
+ collection: zod.z.string(),
10466
+ conflict: zod.z.array(zod.z.string()).readonly(),
10467
+ record: BulkRecordSchema
10468
+ }), zod.z.object({ id: zod.z.union([zod.z.string(), zod.z.number()]) }), {
10469
+ kind: "mutation",
10470
+ auth: "admin"
10471
+ }),
10388
10472
  /** Insert many records in ONE transaction. All or nothing. */
10389
10473
  insertMany: method(zod.z.object({
10390
10474
  namespace: zod.z.string().optional(),
@@ -18196,8 +18280,8 @@ var TrackPositionSchema = zod.z.object({
18196
18280
  var TrackSnapshotSchema = zod.z.object({
18197
18281
  timestamp: zod.z.number(),
18198
18282
  position: TrackPositionSchema,
18199
- /** MediaStore key; resolve via `getTrackMedia({ trackId })`. */
18200
- mediaKey: zod.z.string()
18283
+ /** The snapshot's media row id (D482); resolve via `listTrackMedia({ trackId })`. */
18284
+ mediaId: zod.z.number().int()
18201
18285
  });
18202
18286
  /**
18203
18287
  * Normalized 0..1 trajectory envelope (min/max over every position bbox,
@@ -18809,14 +18893,14 @@ var ObjectEventSchema = zod.z.object({
18809
18893
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
18810
18894
  frameWidth: zod.z.number().optional(),
18811
18895
  frameHeight: zod.z.number().optional(),
18812
- /** MediaStore key for the crop attached to this event (if any). */
18813
- mediaKey: zod.z.string().optional(),
18814
- /** Design B: MediaStore key of the track's native-resolution key frame (the
18896
+ /** Media row id of the crop attached to this event (if any) — D482. */
18897
+ mediaId: zod.z.number().int().optional(),
18898
+ /** Design B: media row id of the track's native-resolution key frame (the
18815
18899
  * best-detection full frame). Resolve via the event-media data-plane
18816
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
18900
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`) for a detail view that
18817
18901
  * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
18818
- * sources — consumers fall back to `mediaKey` (the tight crop). */
18819
- keyFrameMediaKey: zod.z.string().optional(),
18902
+ * sources — consumers fall back to `mediaId` (the tight crop). */
18903
+ keyFrameMediaId: zod.z.number().int().optional(),
18820
18904
  /** Populated by B5 (recording playback URL for this event). */
18821
18905
  mediaUrl: zod.z.string().optional(),
18822
18906
  /** The parent track's key-event importance [0,1], propagated to every object
@@ -18866,7 +18950,7 @@ var MediaFileKindEnum = zod.z.enum([
18866
18950
  * hub-main's heap on the way past — for an `<img>` that would have cached it.
18867
18951
  *
18868
18952
  * `url` points at the `event-media` data plane
18869
- * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18953
+ * (`/addon/<addonId>/event-media/m/<mediaId>` — D482), which serves the same blob
18870
18954
  * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18871
18955
  * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18872
18956
  * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
@@ -18874,10 +18958,13 @@ var MediaFileKindEnum = zod.z.enum([
18874
18958
  * `data-plane-access.ts` for the rule and the one gap it does not close
18875
18959
  * (per-device scoping).
18876
18960
  *
18877
- * The URL is built from the row's **stored** key, which is not always its
18878
- * published `kind`: a track's face/plate crop is stored as `crop` under
18961
+ * The URL is built from the row's own id, which since D482 says nothing about
18962
+ * the row's owner or kind — and that is the point. The published `kind` is not
18963
+ * the stored one (a track's face/plate crop is stored as `crop` under
18879
18964
  * `('face'|'plate', '<prefix>-<trackId>')` and published as
18880
- * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18965
+ * `faceCrop`/`plateCrop`), and under the old composite key the URL had to be
18966
+ * taken from `row.key` verbatim or it 404'd exactly those two rows. An id
18967
+ * cannot be mis-reconstructed, because there is nothing in it to reconstruct.
18881
18968
  *
18882
18969
  * ## `base64` is TRANSITIONAL and is going away
18883
18970
  *
@@ -18890,7 +18977,19 @@ var MediaFileKindEnum = zod.z.enum([
18890
18977
  * `analytics-query-facade.ts`; nothing else reads it.
18891
18978
  */
18892
18979
  var MediaFileSchema = zod.z.object({
18893
- key: zod.z.string(),
18980
+ /**
18981
+ * The media row's OWN id — the rowid SQLite assigned it (D482).
18982
+ *
18983
+ * It used to be the row's composite key, `<ownerType>:<ownerId>:<fileKind>
18984
+ * [:<timestampMs>]`, which embedded a FOREIGN id. D474 made event ids
18985
+ * per-table rowid aliases, so `object:101314` and `motion:101314` are two
18986
+ * different rows that spell the same number, and a track whose
18987
+ * `bestEventId` was an object event was served a motion event's snapshot —
18988
+ * a night-time thumbnail on an afternoon track, with no error anywhere. A
18989
+ * surrogate id cannot name the wrong row's owner, because it names no owner
18990
+ * at all.
18991
+ */
18992
+ mediaId: zod.z.number().int(),
18894
18993
  kind: MediaFileKindEnum,
18895
18994
  sizeBytes: zod.z.number(),
18896
18995
  timestamp: zod.z.number()
@@ -18998,7 +19097,7 @@ var RetrainTrackSchema = zod.z.object({
18998
19097
  });
18999
19098
  /** A frame the picker may offer — an index row, no blob was read to produce it. */
19000
19099
  var RetrainFrameCandidateSchema = zod.z.object({
19001
- mediaKey: zod.z.string(),
19100
+ mediaId: zod.z.number().int(),
19002
19101
  kind: MediaFileKindEnum,
19003
19102
  timestamp: zod.z.number(),
19004
19103
  sizeBytes: zod.z.number().int(),
@@ -19012,7 +19111,7 @@ var RetrainFrameSchema = zod.z.object({
19012
19111
  deviceId: zod.z.number(),
19013
19112
  trackId: zod.z.string(),
19014
19113
  /** Provenance only. It may already point at nothing — that is expected. */
19015
- sourceMediaKey: zod.z.string(),
19114
+ sourceMediaId: zod.z.number().int(),
19016
19115
  sourceKind: MediaFileKindEnum,
19017
19116
  sizeBytes: zod.z.number().int(),
19018
19117
  width: zod.z.number().int(),
@@ -19028,7 +19127,7 @@ var RetrainCopyRefusalSchema = zod.z.enum([
19028
19127
  var RetrainFrameSelectionSchema = zod.z.object({
19029
19128
  copied: zod.z.array(RetrainFrameSchema).readonly(),
19030
19129
  refused: zod.z.array(zod.z.object({
19031
- sourceMediaKey: zod.z.string(),
19130
+ sourceMediaId: zod.z.number().int(),
19032
19131
  reason: RetrainCopyRefusalSchema
19033
19132
  })).readonly()
19034
19133
  });
@@ -19036,7 +19135,7 @@ var RetrainFrameListSchema = zod.z.object({
19036
19135
  candidates: zod.z.array(RetrainFrameCandidateSchema).readonly(),
19037
19136
  copies: zod.z.array(RetrainFrameSchema).readonly(),
19038
19137
  /** What the page pre-selects — the native key frame when one survives. */
19039
- autoPickMediaKey: zod.z.string().optional()
19138
+ autoPickMediaId: zod.z.number().int().optional()
19040
19139
  });
19041
19140
  /** What the operator asked the assist to look for. */
19042
19141
  var RetrainAssistSubjectSchema = zod.z.discriminatedUnion("kind", [zod.z.object({
@@ -19131,9 +19230,11 @@ var RecentTracksQueryInput = zod.z.object({
19131
19230
  });
19132
19231
  /**
19133
19232
  * A Summary (D359): the per-camera session envelope that references tracks.
19134
- * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19135
- * served by the event-media plane by key), null until the first frame with a
19136
- * member visible has been materialised.
19233
+ * `groupShotMediaId` is the media ROW id of its group shot (`ownerKind:
19234
+ * 'summary'`, served by the event-media plane at `/m/<id>`), null until the
19235
+ * first frame with a member visible has been materialised (D482 — it was the
19236
+ * row's composite key, which embedded the owner and could name another table's
19237
+ * row once event ids became per-table rowids).
19137
19238
  */
19138
19239
  var SummarySchema = zod.z.object({
19139
19240
  id: zod.z.string(),
@@ -19142,7 +19243,7 @@ var SummarySchema = zod.z.object({
19142
19243
  lastActiveAt: zod.z.number(),
19143
19244
  sealedAt: zod.z.number().nullable(),
19144
19245
  memberCount: zod.z.number().int().nonnegative(),
19145
- groupShotKey: zod.z.string().nullable()
19246
+ groupShotMediaId: zod.z.number().int().nullable()
19146
19247
  });
19147
19248
  var SummariesQueryInput = zod.z.object({
19148
19249
  deviceIds: zod.z.array(zod.z.number()).min(1),
@@ -20126,7 +20227,7 @@ var pipelineAnalyticsCapability = {
20126
20227
  selectRetrainFrames: method(zod.z.object({
20127
20228
  deviceId: zod.z.number(),
20128
20229
  trackId: zod.z.string(),
20129
- mediaKeys: zod.z.array(zod.z.string()).min(1)
20230
+ mediaIds: zod.z.array(zod.z.number().int()).min(1)
20130
20231
  }), RetrainFrameSelectionSchema, {
20131
20232
  kind: "mutation",
20132
20233
  auth: "admin"
@@ -20290,8 +20391,29 @@ var pipelineAnalyticsCapability = {
20290
20391
  kind: "query",
20291
20392
  auth: "admin"
20292
20393
  }),
20394
+ /**
20395
+ * The media an EVENT owns.
20396
+ *
20397
+ * `ownerType` is REQUIRED, and that is the whole correction (D482). An
20398
+ * event is a row in ONE of three tables, and since D474 each numbers from
20399
+ * 1 independently: `motion:101314` and `object:101314` both exist. This
20400
+ * method took a bare `eventId` and the provider probed motion → object →
20401
+ * audio, stopping at the first hit — so on the live hub, where object
20402
+ * events own no media of their own and 299 883 of 300 559 media rows are
20403
+ * motion-owned, EVERY object event resolved to its motion namesake. A
20404
+ * track from 17:34 on camera 615 was served a snapshot from 22:35 eleven
20405
+ * days earlier, silently.
20406
+ *
20407
+ * D476 had already disambiguated the KEY (`motion:` vs `object:`); this is
20408
+ * the API catching up to it. Naming the table is not a "qualification" of
20409
+ * the ambiguity — a listing BY OWNER has no address to make surrogate: the
20410
+ * owner IS (table, id), and half of it is not a question.
20411
+ */
20293
20412
  getEventMedia: method(zod.z.object({
20294
- eventId: zod.z.string(),
20413
+ /** Which of the three event tables owns the row. */
20414
+ ownerType: EventOwnerTypeSchema,
20415
+ /** The event's rowid in that table (D474: an event id is a number). */
20416
+ eventId: zod.z.number().int(),
20295
20417
  kind: MediaFileKindEnum.optional(),
20296
20418
  deviceId: zod.z.number()
20297
20419
  }), zod.z.array(MediaFileSchema).readonly()),
@@ -20336,11 +20458,14 @@ var pipelineAnalyticsCapability = {
20336
20458
  * the live hub: one event's `fullFrameBoxed` is 2 824 077 B, base64'd to
20337
20459
  * ~3.8 MB, allocated whole in hub-main's heap, for a list of keys.
20338
20460
  *
20339
- * Same `deviceId` authorization subject as `getEventMedia`, and the same
20340
- * rows — this is a projection of that method, never a different question.
20461
+ * Same `deviceId` authorization subject as `getEventMedia`, the same
20462
+ * REQUIRED `ownerType` (read that method's docblock for the night-time
20463
+ * thumbnail this closes — D482), and the same rows: this is a projection
20464
+ * of that method, never a different question.
20341
20465
  */
20342
20466
  listEventMedia: method(zod.z.object({
20343
- eventId: zod.z.string(),
20467
+ ownerType: EventOwnerTypeSchema,
20468
+ eventId: zod.z.number().int(),
20344
20469
  deviceId: zod.z.number()
20345
20470
  }), zod.z.array(MediaFileInfoSchema).readonly()),
20346
20471
  /**
@@ -27120,8 +27245,8 @@ var IdentitySchema = zod.z.object({
27120
27245
  id: zod.z.string(),
27121
27246
  name: zod.z.string(),
27122
27247
  sampleCount: zod.z.number().int().nonnegative(),
27123
- coverMediaKey: zod.z.string().optional(),
27124
- /** Inline base64 of the cover sample's crop, resolved from `coverMediaKey`.
27248
+ coverMediaId: zod.z.number().int().optional(),
27249
+ /** Inline base64 of the cover sample's crop, resolved from `coverMediaId`.
27125
27250
  * Lets the UI render the person's face avatar instead of a placeholder icon. */
27126
27251
  coverBase64: zod.z.string().optional()
27127
27252
  });
@@ -27147,8 +27272,8 @@ var IdentitySampleAuditRowSchema = zod.z.object({
27147
27272
  enrolledAt: zod.z.number().int(),
27148
27273
  deviceId: zod.z.number().int().optional(),
27149
27274
  source: zod.z.enum(["detected", "photo"]),
27150
- /** The enrolled crop's media key, so the panel can show the evidence. */
27151
- mediaKey: zod.z.string().optional(),
27275
+ /** The enrolled crop's media row id, so the panel can show the evidence. */
27276
+ mediaId: zod.z.number().int().optional(),
27152
27277
  /**
27153
27278
  * False = the sample is stamped with a DIFFERENT face model, and a cosine
27154
27279
  * across feature spaces is a well-formed float with no meaning. Every number
@@ -27217,15 +27342,15 @@ var FaceInfoSchema = zod.z.object({
27217
27342
  */
27218
27343
  cropUrl: zod.z.string().optional(),
27219
27344
  /** Design B: the face bbox (pixel space) on the key frame — lets a detail
27220
- * view draw the box over the native `keyFrameMediaKey` frame. Absent on
27345
+ * view draw the box over the native `keyFrameMediaId` frame. Absent on
27221
27346
  * legacy rows written before design B. */
27222
27347
  faceBbox: BoundingBoxSchema.optional(),
27223
27348
  /** Design B: MediaStore key of the track's native-resolution key frame.
27224
27349
  * Fetch the native JPEG via the event-media data-plane
27225
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
27350
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`). Absent when the
27226
27351
  * track produced no key frame (e.g. native/onboard source) — the UI falls
27227
27352
  * back to the inline `base64` face crop. */
27228
- keyFrameMediaKey: zod.z.string().optional(),
27353
+ keyFrameMediaId: zod.z.number().int().optional(),
27229
27354
  /** Winning identity-match cosine (0..1) for this face's track, when an
27230
27355
  * identity was auto-confirmed. Lets the UI surface WHY a face was assigned
27231
27356
  * (confidence badge / low-confidence audit). Absent on legacy rows and on
@@ -27294,11 +27419,14 @@ var FaceClusterSchema = zod.z.object({
27294
27419
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
27295
27420
  * dialog already rendering its key FRAME from the `event-media` plane.
27296
27421
  *
27297
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
27298
- * media key directly, so this needed no new plane and no new access decision.
27422
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
27423
+ * resolves a media row by its own id, so this needed no new plane and no new
27424
+ * access decision.
27299
27425
  */
27300
27426
  var MediaFileLiteSchema$1 = zod.z.object({
27301
- key: zod.z.string(),
27427
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
27428
+ * (D482). It was the row's composite key, which embedded the owner. */
27429
+ mediaId: zod.z.number().int(),
27302
27430
  kind: zod.z.string(),
27303
27431
  url: zod.z.string(),
27304
27432
  sizeBytes: zod.z.number(),
@@ -27320,7 +27448,7 @@ var faceGalleryCapability = {
27320
27448
  * covers inline, ~10 KB of base64 per row, on a query this UI mounts
27321
27449
  * four times and the viewer holds at `staleTime: 30_000`.
27322
27450
  *
27323
- * Nothing loses its avatar: `coverMediaKey` is already on every row and
27451
+ * Nothing loses its avatar: `coverMediaId` is already on every row and
27324
27452
  * the `event-media` plane serves that key `immutable` with an ETag.
27325
27453
  *
27326
27454
  * **This is an INPUT field, so it does not reach the addon until the
@@ -31083,8 +31211,8 @@ var VehicleSchema = zod.z.object({
31083
31211
  id: zod.z.string(),
31084
31212
  name: zod.z.string(),
31085
31213
  sampleCount: zod.z.number().int().nonnegative(),
31086
- coverMediaKey: zod.z.string().optional(),
31087
- /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaKey`. */
31214
+ coverMediaId: zod.z.number().int().optional(),
31215
+ /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaId`. */
31088
31216
  coverBase64: zod.z.string().optional()
31089
31217
  });
31090
31218
  var VehicleSampleInfoSchema = zod.z.object({
@@ -31117,7 +31245,7 @@ var PlateInfoSchema = zod.z.object({
31117
31245
  /** keyFrame parity: the plate bbox (pixel space) on the native key frame. */
31118
31246
  plateBbox: BoundingBoxSchema.optional(),
31119
31247
  /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
31120
- keyFrameMediaKey: zod.z.string().optional(),
31248
+ keyFrameMediaId: zod.z.number().int().optional(),
31121
31249
  base64: zod.z.string().optional(),
31122
31250
  /**
31123
31251
  * Same crop as a data-plane URL, always present when the plate has a stored
@@ -31138,11 +31266,14 @@ var PlateInfoSchema = zod.z.object({
31138
31266
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
31139
31267
  * dialog already rendering its key FRAME from the `event-media` plane.
31140
31268
  *
31141
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
31142
- * media key directly, so this needed no new plane and no new access decision.
31269
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
31270
+ * resolves a media row by its own id, so this needed no new plane and no new
31271
+ * access decision.
31143
31272
  */
31144
31273
  var MediaFileLiteSchema = zod.z.object({
31145
- key: zod.z.string(),
31274
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
31275
+ * (D482). It was the row's composite key, which embedded the owner. */
31276
+ mediaId: zod.z.number().int(),
31146
31277
  kind: zod.z.string(),
31147
31278
  url: zod.z.string(),
31148
31279
  sizeBytes: zod.z.number(),
@@ -31224,7 +31355,7 @@ var plateGalleryCapability = {
31224
31355
  listVehicles: method(zod.z.object({
31225
31356
  /** Inline {@link VehicleSchema.coverBase64} on every row. Default
31226
31357
  * `false` — the vehicle twin of `faceGallery.listIdentities`'s
31227
- * option; `coverMediaKey` + the `event-media` plane carry the picture.
31358
+ * option; `coverMediaId` + the `event-media` plane carry the picture.
31228
31359
  * INPUT field: stripped by the hub router until the train ships, which
31229
31360
  * resolves to `false` and is exactly the intended default. */
31230
31361
  includeCrops: zod.z.boolean().optional() }).optional(), zod.z.array(VehicleSchema).readonly()),
@@ -33123,7 +33254,14 @@ var SceneReferenceSchema = zod.z.object({
33123
33254
  modelId: zod.z.string(),
33124
33255
  condition: SceneConditionSchema,
33125
33256
  capturedAt: zod.z.number(),
33126
- thumbnailMediaId: zod.z.string().optional(),
33257
+ /**
33258
+ * The reference thumbnail's media ROW id (D482).
33259
+ *
33260
+ * The name already said `mediaId` while the value was the row's composite
33261
+ * key — a leftover that read as done and was not. It is the row's own id
33262
+ * now, addressed at `/addon/<addonId>/event-media/m/<id>`.
33263
+ */
33264
+ thumbnailMediaId: zod.z.number().int().optional(),
33127
33265
  /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
33128
33266
  * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
33129
33267
  * normalized rect frame a different piece of world, and the scene would
@@ -34480,7 +34618,29 @@ var LoggingSettingsPatchSchema = zod.z.object({
34480
34618
  * disarmed the channels it did not mention would make the Levels page and
34481
34619
  * the Diagnostics page fight over the same value.
34482
34620
  */
34483
- channels: zod.z.array(LogChannelWindowPatchSchema).readonly().optional()
34621
+ channels: zod.z.array(LogChannelWindowPatchSchema).readonly().optional(),
34622
+ /**
34623
+ * How many days the analytics OPS LOG is kept — the audit trail of what
34624
+ * retention actually deleted.
34625
+ *
34626
+ * It lives HERE, on the logging document, and not on the analytics addon's
34627
+ * settings form, on the operator's instruction: every other log-ish window in
34628
+ * this system is configured through this one document, and a retention audit
34629
+ * configured somewhere else is a second place to look when the question is
34630
+ * "what happened to my data".
34631
+ *
34632
+ * That placement has a cost worth stating: this document ships in the
34633
+ * framework closure, so this knob needs a published `@camstack/server` while
34634
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
34635
+ *
34636
+ * `retention-model.ts` argued this one must NOT follow a device window,
34637
+ * because the audit trail is the history of the SWEEP and not of the camera.
34638
+ * That argument stands and is untouched — what changes is that 30 days stops
34639
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
34640
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
34641
+ * state in which the next 9.5 GiB leak cannot be explained.
34642
+ */
34643
+ opsLogRetentionDays: zod.z.number().int().min(0).max(3650).optional()
34484
34644
  });
34485
34645
  /**
34486
34646
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -34553,6 +34713,14 @@ var LoggingSettingsStateSchema = zod.z.object({
34553
34713
  channels: zod.z.array(LogChannelDescriptorSchema).readonly(),
34554
34714
  /** The channels ARMED right now, each with its deadline. */
34555
34715
  activeChannels: zod.z.array(LogChannelWindowStateSchema).readonly(),
34716
+ /**
34717
+ * The ops-log window in days, as it is in force. `0` = kept forever.
34718
+ *
34719
+ * Reported rather than left to the caller's memory of what it wrote: this is
34720
+ * the value the analytics sweep will actually use, and an operator asking how
34721
+ * long their audit trail lives should not have to infer it from a default.
34722
+ */
34723
+ opsLogRetentionDays: zod.z.number().int().min(0),
34556
34724
  persisted: zod.z.boolean()
34557
34725
  });
34558
34726
  var systemCapability = {
@@ -35542,7 +35710,7 @@ var StationaryObjectSchema = zod.z.object({
35542
35710
  /** Enrichment label carried from the source track (identity / plate). */
35543
35711
  label: zod.z.string().optional(),
35544
35712
  /** Native-resolution key-frame media key for the parked object's best image. */
35545
- keyFrameMediaKey: zod.z.string().optional()
35713
+ keyFrameMediaId: zod.z.number().int().optional()
35546
35714
  });
35547
35715
  var CameraOccupancySnapshotSchema = zod.z.object({
35548
35716
  /** Frame timestamp of the inference result that produced this snapshot. */
@@ -37706,6 +37874,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
37706
37874
  addonId: null,
37707
37875
  access: "create"
37708
37876
  },
37877
+ "dataStoreProvider.upsert": {
37878
+ capName: "data-store-provider",
37879
+ capScope: "system",
37880
+ addonId: null,
37881
+ access: "create"
37882
+ },
37709
37883
  "dayNight.getOptions": {
37710
37884
  capName: "day-night",
37711
37885
  capScope: "device",
@@ -41570,6 +41744,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
41570
41744
  addonId: null,
41571
41745
  access: "create"
41572
41746
  },
41747
+ "settingsStore.upsert": {
41748
+ capName: "settings-store",
41749
+ capScope: "system",
41750
+ addonId: null,
41751
+ access: "create"
41752
+ },
41573
41753
  "smtpProvider.getStatus": {
41574
41754
  capName: "smtp-provider",
41575
41755
  capScope: "system",
package/dist/index.d.ts CHANGED
@@ -102,5 +102,5 @@ export * from './tls/index.js';
102
102
  export { IntegrationRegistry } from './builtins/sqlite-storage/integration-registry.js';
103
103
  export { type EnsureAddonNativePrebuildsOptions, ensureAddonNativePrebuilds, type NativeEnsureOutcome, type NativeEnsureResult, } from './kernel/deps/ensure-addon-natives.js';
104
104
  export { type EnsureNativePrebuildsOptions, ensureNativePrebuilds, hasDotNode, NATIVE_SCAN_DEPTH, type PrebuildFetchFn, type PrebuildTarget, TRADITIONAL_NATIVE_PACKAGES, } from './kernel/deps/ensure-native-prebuilds.js';
105
- export { type NpmInvocation, type RunNpmOptions, resolveNpmInvocation, runNpm, } from './kernel/deps/npm-command.js';
105
+ export { type NpmInvocation, type RunNpmOptions, buildNpmChildEnv, resolveNpmInvocation, runNpm, } from './kernel/deps/npm-command.js';
106
106
  export * from './kernel/index.js';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-DdRxWA7g.js");
3
+ const require_dist = require("./dist-u8F4ZyXi.js");
4
4
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
5
5
  require("./builtins/alerts/index.js");
6
6
  const require_formatter = require("./formatter-DqAKDlvN.js");
@@ -27,9 +27,9 @@ require("./builtins/system-config/index.js");
27
27
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
28
28
  const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-CAsHdMwP.js");
29
29
  const require_tls$1 = require("./tls-BFs4PzoW.js");
30
- const require_manifest_system_deps = require("./manifest-system-deps-8x1jgPz_.js");
30
+ const require_manifest_system_deps = require("./manifest-system-deps-CrSP0Kkp.js");
31
31
  const require_resource_monitor = require("./resource-monitor-LVE1BoLs.js");
32
- const require_custom_action_registry = require("./custom-action-registry-BTB-LgGN.js");
32
+ const require_custom_action_registry = require("./custom-action-registry-mtS2EOEs.js");
33
33
  let zod = require("zod");
34
34
  let node_crypto = require("node:crypto");
35
35
  let _camstack_types_node = require("@camstack/types/node");
@@ -95967,6 +95967,7 @@ exports.buildHeapSample = require_manifest_system_deps.buildHeapSample;
95967
95967
  exports.buildLinkChain = require_manifest_system_deps.buildLinkChain;
95968
95968
  exports.buildNativeCapProxy = require_manifest_system_deps.buildNativeCapProxy;
95969
95969
  exports.buildNodeManifest = buildNodeManifest;
95970
+ exports.buildNpmChildEnv = require_manifest_system_deps.buildNpmChildEnv;
95970
95971
  exports.buildStorageLocationRegistry = require_builtins_storage_orchestrator_storage_orchestrator_addon.buildStorageLocationRegistry;
95971
95972
  exports.buildUdsNativeCapProxy = require_manifest_system_deps.buildUdsNativeCapProxy;
95972
95973
  exports.builderMountedCapNames = builderMountedCapNames;