@camstack/addon-pipeline 1.2.226 → 1.2.228

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 (32) hide show
  1. package/dist/audio-analyzer/index.js +2 -2
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/{default-detection-model-A2qZmOuO.mjs → default-detection-model-C4C723aL.mjs} +1 -1
  4. package/dist/{default-detection-model-BseJDKpG.js → default-detection-model-D0Em2AXV.js} +1 -1
  5. package/dist/detection-pipeline/index.js +4 -4
  6. package/dist/detection-pipeline/index.mjs +4 -4
  7. package/dist/{dist-InCt3_5U.mjs → dist-Dcp-eVbN.mjs} +297 -60
  8. package/dist/{dist-DXilmc1W.js → dist-Dwhv3eOj.js} +297 -60
  9. package/dist/motion-wasm/index.js +1 -1
  10. package/dist/motion-wasm/index.mjs +1 -1
  11. package/dist/{node--Icxw2jo.js → node-CSDLSs7t.js} +1 -1
  12. package/dist/{node-B6Wz_gqK.mjs → node-ClxCG7kX.mjs} +1 -1
  13. package/dist/pipeline-runner/index.js +3 -3
  14. package/dist/pipeline-runner/index.mjs +3 -3
  15. package/dist/{process-memory-DnuJjAW1.mjs → process-memory-CJ9kKdO6.mjs} +1 -1
  16. package/dist/{process-memory-pGbtKNsw.js → process-memory-DYCrYZZl.js} +1 -1
  17. package/dist/recorder/index.js +3 -2
  18. package/dist/recorder/index.mjs +3 -2
  19. package/dist/{segment-demux-js-CB9SGcWW.mjs → segment-demux-js-BWZQJ1AS.mjs} +1 -1
  20. package/dist/{segment-demux-js-jnT5YAxt.js → segment-demux-js-CelIP7H_.js} +1 -1
  21. package/dist/stream-broker/_stub.js +26 -25
  22. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-D2AmFf2m.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BOpWY0lf.mjs} +3 -3
  23. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Bc-sSkWV.mjs +26 -0
  24. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CKUGpDns.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B84T0KI-.mjs} +1 -1
  25. package/dist/stream-broker/demux-worker-child.js +1 -1
  26. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  27. package/dist/stream-broker/{hostInit-Bs7yHPfB.mjs → hostInit-D79Uznvf.mjs} +3 -3
  28. package/dist/stream-broker/index.js +161 -6
  29. package/dist/stream-broker/index.mjs +161 -6
  30. package/dist/stream-broker/remoteEntry.js +1 -1
  31. package/package.json +2 -2
  32. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-gz4b6miC.mjs +0 -26
@@ -1,5 +1,5 @@
1
1
  let node_crypto = require("node:crypto");
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.
@@ -5346,7 +5346,7 @@ var ZodIssueCode = {
5346
5346
  var ZodFirstPartyTypeKind;
5347
5347
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5348
5348
  //#endregion
5349
- //#region ../types/dist/sleep-BnujYGPe.mjs
5349
+ //#region ../types/dist/sleep-DBKu2-U5.mjs
5350
5350
  /**
5351
5351
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5352
5352
  * window to float samples (D455).
@@ -7541,7 +7541,7 @@ function sleep(ms) {
7541
7541
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
7542
7542
  }
7543
7543
  //#endregion
7544
- //#region ../types/dist/canonical-hash-rO1sRmEK.mjs
7544
+ //#region ../types/dist/canonical-hash-Ch5bSjFG.mjs
7545
7545
  var AUDIO_ENCODER_BY_CODEC = {
7546
7546
  opus: "libopus",
7547
7547
  aac: "aac",
@@ -7644,6 +7644,7 @@ function buildVideoArgs(video, outputArgs) {
7644
7644
  ];
7645
7645
  if (video.preset !== void 0) args.push("-preset", video.preset);
7646
7646
  if (video.tune !== void 0) args.push("-tune", video.tune);
7647
+ if (video.singleSlicePerFrame === true && video.encoder === "libx264") args.push("-x264-params", "sliced-threads=0");
7647
7648
  if (video.profile !== void 0) args.push("-profile:v", video.profile);
7648
7649
  if (video.level !== void 0) args.push("-level", video.level);
7649
7650
  if (video.pixelFormat !== void 0) args.push("-pix_fmt", video.pixelFormat);
@@ -7918,6 +7919,7 @@ function invocationFromEncodeProfile(input) {
7918
7919
  scale,
7919
7920
  ...v.preset !== void 0 ? { preset: v.preset } : {},
7920
7921
  ...v.tune !== void 0 ? { tune: v.tune } : {},
7922
+ ...v.singleSlicePerFrame !== void 0 ? { singleSlicePerFrame: v.singleSlicePerFrame } : {},
7921
7923
  ...v.profile !== void 0 ? { profile: v.profile } : {},
7922
7924
  ...v.level !== void 0 ? { level: v.level } : {},
7923
7925
  ...input.pixelFormat !== void 0 ? { pixelFormat: input.pixelFormat } : {},
@@ -8171,13 +8173,30 @@ new Set([
8171
8173
  "scene",
8172
8174
  "motion",
8173
8175
  "object",
8174
- "audio"
8176
+ "audio",
8177
+ "mosaic"
8175
8178
  ]);
8176
- new Set([
8179
+ /**
8180
+ * The owner types that are event tables, in the order the event-media resolver
8181
+ * should consider them. Exported so a consumer asking "is this key an event?"
8182
+ * does not re-spell the list and drift from it.
8183
+ */
8184
+ var EVENT_OWNER_TYPES = [
8177
8185
  "motion",
8178
8186
  "object",
8179
8187
  "audio"
8180
- ]);
8188
+ ];
8189
+ /**
8190
+ * The same list as a Zod enum, for the cap inputs that must NAME the table
8191
+ * (D482: `getEventMedia` / `listEventMedia` take an owner, and an owner is
8192
+ * `(table, id)`).
8193
+ *
8194
+ * Built FROM {@link EVENT_OWNER_TYPES} rather than re-spelled: a fourth event
8195
+ * table would otherwise be accepted by the codec and refused at the door, with
8196
+ * nothing failing until a caller asked.
8197
+ */
8198
+ var EventOwnerTypeSchema = _enum(EVENT_OWNER_TYPES);
8199
+ new Set(EVENT_OWNER_TYPES);
8181
8200
  var EncodeProfileSchema = object({
8182
8201
  video: object({
8183
8202
  codec: _enum([
@@ -8216,7 +8235,23 @@ var EncodeProfileSchema = object({
8216
8235
  "zerolatency",
8217
8236
  "film",
8218
8237
  "animation"
8219
- ]).optional()
8238
+ ]).optional(),
8239
+ /**
8240
+ * ONE slice per access unit.
8241
+ *
8242
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
8243
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
8244
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
8245
+ * frame-end per frame: the first pictures render and the video then freezes
8246
+ * for good while the audio, on its own plane, plays on. Measured on this hub
8247
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
8248
+ *
8249
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
8250
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
8251
+ * consumers meaning the same thing spelled differently would stop sharing one
8252
+ * child. Absent means "whatever the encoder does" — today's behaviour.
8253
+ */
8254
+ singleSlicePerFrame: boolean().optional()
8220
8255
  }),
8221
8256
  audio: union([literal("passthrough"), object({
8222
8257
  codec: _enum([
@@ -8266,7 +8301,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
8266
8301
  audio: "passthrough"
8267
8302
  };
8268
8303
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
8269
- ({ ...BASE_LIVE_EGRESS_PROFILE });
8304
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
8270
8305
  /** VBV window for a consumer whose budget is enforced per second (HomeKit). */
8271
8306
  var RATE_CONTROL_TIGHT = {
8272
8307
  kind: "cbr",
@@ -8375,7 +8410,8 @@ function canonicalVideo(video) {
8375
8410
  gopFrames: video.gopFrames ?? -1,
8376
8411
  bf: video.bf ?? -1,
8377
8412
  preset: video.preset ?? UNSET,
8378
- tune: video.tune ?? UNSET
8413
+ tune: video.tune ?? UNSET,
8414
+ singleSlicePerFrame: video.singleSlicePerFrame === void 0 ? UNSET : String(video.singleSlicePerFrame)
8379
8415
  };
8380
8416
  }
8381
8417
  function canonicalAudio(audio) {
@@ -14565,6 +14601,16 @@ method(object({
14565
14601
  filter: QueryFilterSchema.optional(),
14566
14602
  columns: array(string()).readonly().optional()
14567
14603
  }), array(SettingsRecordSchema).readonly()), method(object({
14604
+ namespace: string().optional(),
14605
+ collection: string(),
14606
+ /** Declared columns identifying the slot; must be covered by a UNIQUE
14607
+ * index on the collection. Never empty. */
14608
+ conflict: array(string()).readonly(),
14609
+ record: BulkRecordSchema
14610
+ }), object({
14611
+ /** The id the row HAS: assigned by SQLite on an insert, or the existing
14612
+ * row's own id on an update. */
14613
+ id: union([string(), number()]) }), { kind: "mutation" }), method(object({
14568
14614
  namespace: string().optional(),
14569
14615
  collection: string(),
14570
14616
  record: object({
@@ -14699,6 +14745,14 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
14699
14745
  id: union([string(), number()]) }), {
14700
14746
  kind: "mutation",
14701
14747
  auth: "admin"
14748
+ }), method(object({
14749
+ namespace: string().optional(),
14750
+ collection: string(),
14751
+ conflict: array(string()).readonly(),
14752
+ record: BulkRecordSchema
14753
+ }), object({ id: union([string(), number()]) }), {
14754
+ kind: "mutation",
14755
+ auth: "admin"
14702
14756
  }), method(object({
14703
14757
  namespace: string().optional(),
14704
14758
  collection: string(),
@@ -21527,8 +21581,8 @@ var TrackPositionSchema = object({
21527
21581
  var TrackSnapshotSchema = object({
21528
21582
  timestamp: number(),
21529
21583
  position: TrackPositionSchema,
21530
- /** MediaStore key; resolve via `getTrackMedia({ trackId })`. */
21531
- mediaKey: string()
21584
+ /** The snapshot's media row id (D482); resolve via `listTrackMedia({ trackId })`. */
21585
+ mediaId: number().int()
21532
21586
  });
21533
21587
  /**
21534
21588
  * Normalized 0..1 trajectory envelope (min/max over every position bbox,
@@ -22132,14 +22186,14 @@ var ObjectEventSchema = object({
22132
22186
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
22133
22187
  frameWidth: number().optional(),
22134
22188
  frameHeight: number().optional(),
22135
- /** MediaStore key for the crop attached to this event (if any). */
22136
- mediaKey: string().optional(),
22137
- /** Design B: MediaStore key of the track's native-resolution key frame (the
22189
+ /** Media row id of the crop attached to this event (if any) — D482. */
22190
+ mediaId: number().int().optional(),
22191
+ /** Design B: media row id of the track's native-resolution key frame (the
22138
22192
  * best-detection full frame). Resolve via the event-media data-plane
22139
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
22193
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`) for a detail view that
22140
22194
  * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
22141
- * sources — consumers fall back to `mediaKey` (the tight crop). */
22142
- keyFrameMediaKey: string().optional(),
22195
+ * sources — consumers fall back to `mediaId` (the tight crop). */
22196
+ keyFrameMediaId: number().int().optional(),
22143
22197
  /** Populated by B5 (recording playback URL for this event). */
22144
22198
  mediaUrl: string().optional(),
22145
22199
  /** The parent track's key-event importance [0,1], propagated to every object
@@ -22189,7 +22243,7 @@ var MediaFileKindEnum = _enum([
22189
22243
  * hub-main's heap on the way past — for an `<img>` that would have cached it.
22190
22244
  *
22191
22245
  * `url` points at the `event-media` data plane
22192
- * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
22246
+ * (`/addon/<addonId>/event-media/m/<mediaId>` — D482), which serves the same blob
22193
22247
  * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
22194
22248
  * render a `?variant=thumb`, and streams. The hub gate in front of it requires
22195
22249
  * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
@@ -22197,10 +22251,13 @@ var MediaFileKindEnum = _enum([
22197
22251
  * `data-plane-access.ts` for the rule and the one gap it does not close
22198
22252
  * (per-device scoping).
22199
22253
  *
22200
- * The URL is built from the row's **stored** key, which is not always its
22201
- * published `kind`: a track's face/plate crop is stored as `crop` under
22254
+ * The URL is built from the row's own id, which since D482 says nothing about
22255
+ * the row's owner or kind — and that is the point. The published `kind` is not
22256
+ * the stored one (a track's face/plate crop is stored as `crop` under
22202
22257
  * `('face'|'plate', '<prefix>-<trackId>')` and published as
22203
- * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
22258
+ * `faceCrop`/`plateCrop`), and under the old composite key the URL had to be
22259
+ * taken from `row.key` verbatim or it 404'd exactly those two rows. An id
22260
+ * cannot be mis-reconstructed, because there is nothing in it to reconstruct.
22204
22261
  *
22205
22262
  * ## `base64` is TRANSITIONAL and is going away
22206
22263
  *
@@ -22213,7 +22270,19 @@ var MediaFileKindEnum = _enum([
22213
22270
  * `analytics-query-facade.ts`; nothing else reads it.
22214
22271
  */
22215
22272
  var MediaFileSchema = object({
22216
- key: string(),
22273
+ /**
22274
+ * The media row's OWN id — the rowid SQLite assigned it (D482).
22275
+ *
22276
+ * It used to be the row's composite key, `<ownerType>:<ownerId>:<fileKind>
22277
+ * [:<timestampMs>]`, which embedded a FOREIGN id. D474 made event ids
22278
+ * per-table rowid aliases, so `object:101314` and `motion:101314` are two
22279
+ * different rows that spell the same number, and a track whose
22280
+ * `bestEventId` was an object event was served a motion event's snapshot —
22281
+ * a night-time thumbnail on an afternoon track, with no error anywhere. A
22282
+ * surrogate id cannot name the wrong row's owner, because it names no owner
22283
+ * at all.
22284
+ */
22285
+ mediaId: number().int(),
22217
22286
  kind: MediaFileKindEnum,
22218
22287
  sizeBytes: number(),
22219
22288
  timestamp: number()
@@ -22321,7 +22390,7 @@ var RetrainTrackSchema = object({
22321
22390
  });
22322
22391
  /** A frame the picker may offer — an index row, no blob was read to produce it. */
22323
22392
  var RetrainFrameCandidateSchema = object({
22324
- mediaKey: string(),
22393
+ mediaId: number().int(),
22325
22394
  kind: MediaFileKindEnum,
22326
22395
  timestamp: number(),
22327
22396
  sizeBytes: number().int(),
@@ -22335,7 +22404,7 @@ var RetrainFrameSchema = object({
22335
22404
  deviceId: number(),
22336
22405
  trackId: string(),
22337
22406
  /** Provenance only. It may already point at nothing — that is expected. */
22338
- sourceMediaKey: string(),
22407
+ sourceMediaId: number().int(),
22339
22408
  sourceKind: MediaFileKindEnum,
22340
22409
  sizeBytes: number().int(),
22341
22410
  width: number().int(),
@@ -22351,7 +22420,7 @@ var RetrainCopyRefusalSchema = _enum([
22351
22420
  var RetrainFrameSelectionSchema = object({
22352
22421
  copied: array(RetrainFrameSchema).readonly(),
22353
22422
  refused: array(object({
22354
- sourceMediaKey: string(),
22423
+ sourceMediaId: number().int(),
22355
22424
  reason: RetrainCopyRefusalSchema
22356
22425
  })).readonly()
22357
22426
  });
@@ -22359,7 +22428,7 @@ var RetrainFrameListSchema = object({
22359
22428
  candidates: array(RetrainFrameCandidateSchema).readonly(),
22360
22429
  copies: array(RetrainFrameSchema).readonly(),
22361
22430
  /** What the page pre-selects — the native key frame when one survives. */
22362
- autoPickMediaKey: string().optional()
22431
+ autoPickMediaId: number().int().optional()
22363
22432
  });
22364
22433
  /** What the operator asked the assist to look for. */
22365
22434
  var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
@@ -22454,9 +22523,11 @@ var RecentTracksQueryInput = object({
22454
22523
  });
22455
22524
  /**
22456
22525
  * A Summary (D359): the per-camera session envelope that references tracks.
22457
- * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
22458
- * served by the event-media plane by key), null until the first frame with a
22459
- * member visible has been materialised.
22526
+ * `groupShotMediaId` is the media ROW id of its group shot (`ownerKind:
22527
+ * 'summary'`, served by the event-media plane at `/m/<id>`), null until the
22528
+ * first frame with a member visible has been materialised (D482 — it was the
22529
+ * row's composite key, which embedded the owner and could name another table's
22530
+ * row once event ids became per-table rowids).
22460
22531
  */
22461
22532
  var SummarySchema = object({
22462
22533
  id: string(),
@@ -22465,19 +22536,115 @@ var SummarySchema = object({
22465
22536
  lastActiveAt: number(),
22466
22537
  sealedAt: number().nullable(),
22467
22538
  memberCount: number().int().nonnegative(),
22468
- groupShotKey: string().nullable()
22539
+ groupShotMediaId: number().int().nullable()
22469
22540
  });
22470
22541
  var SummariesQueryInput = object({
22471
22542
  deviceIds: array(number()).min(1),
22472
22543
  since: number().optional(),
22473
22544
  until: number().optional(),
22474
- limit: number().int().min(1).max(200).default(50)
22545
+ limit: number().int().min(1).max(200).default(50),
22546
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
22547
+ * meaning of "dog" on every summary surface. */
22548
+ classes: array(string().min(1).max(60)).max(40).optional()
22475
22549
  });
22476
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
22477
22550
  var SummaryDetailSchema = object({
22478
22551
  summary: SummarySchema,
22479
- /** Member track ids, in absorption order. */
22480
- trackIds: array(string()).readonly()
22552
+ /** Members in absorption order, oldest join first. */
22553
+ members: array(object({
22554
+ trackId: string(),
22555
+ /**
22556
+ * The track's class at the time it JOINED, or `null` when it was unresolved
22557
+ * and the track no longer exists to fill it.
22558
+ *
22559
+ * The join, not the latest opinion: class voting can re-decide a track's
22560
+ * class afterwards, and a group's composition is the history of who came
22561
+ * together. A consumer counts these to badge a thumbnail — "two people and a
22562
+ * dog" — rather than being handed a second, denormalised tally that would
22563
+ * drift from the members it claims to describe.
22564
+ */
22565
+ className: string().nullable(),
22566
+ /** `primary` is the one member that carries the group's identity. */
22567
+ role: _enum([
22568
+ "primary",
22569
+ "sibling",
22570
+ "child"
22571
+ ]).nullable(),
22572
+ joinedAt: number(),
22573
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
22574
+ * at read time. Absent when nothing resolved, never an empty string. */
22575
+ label: string().optional(),
22576
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
22577
+ * recognised nobody, and absent for a member whose track has been pruned —
22578
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
22579
+ subLabel: string().optional()
22580
+ })).readonly()
22581
+ });
22582
+ /**
22583
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
22584
+ *
22585
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
22586
+ * we extend when we notice we need more". Enough to draw the card ("two people
22587
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
22588
+ * are on {@link getSummary}: shipping every member of every group so a client
22589
+ * can count them turns a page of two hundred groups into a thousand records to
22590
+ * draw two hundred badges.
22591
+ */
22592
+ var SummaryListItemSchema = object({
22593
+ summary: SummarySchema,
22594
+ /** Class counts, most numerous first; `className: null` is a member whose
22595
+ * class never resolved, counted so the counts add up to `memberCount`. */
22596
+ classes: array(object({
22597
+ className: string().nullable(),
22598
+ count: number().int().positive()
22599
+ })).readonly()
22600
+ });
22601
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
22602
+ /**
22603
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
22604
+ *
22605
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
22606
+ * summaries feed that could only answer "the last N for these cameras"
22607
+ * (`listSummaries`) would make groups available in the timeline and nowhere
22608
+ * else. Two feeds with different ordering contracts would be two ideas of what
22609
+ * "newest" means, on one screen.
22610
+ */
22611
+ var RecentSummariesQueryInput = object({
22612
+ /** Devices to merge. An empty array yields an empty page. */
22613
+ deviceIds: array(number()),
22614
+ /** Window lower bound on `lastActiveAt` (inclusive). */
22615
+ since: number().optional(),
22616
+ /** Window upper bound on `lastActiveAt` (inclusive). */
22617
+ until: number().optional(),
22618
+ limit: number().int().min(1).max(500).default(100),
22619
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
22620
+ cursor: string().optional(),
22621
+ /**
22622
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
22623
+ * deliberately the same name: the events filter tree emits one list of ticked
22624
+ * taxonomy nodes, and a summaries feed that called it something else would
22625
+ * make the operator's one filter component produce two shapes.
22626
+ *
22627
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
22628
+ * me the arrivals with a dog" has to return the group of four people who had
22629
+ * one with them; a filter on the group's own fields could only ever answer
22630
+ * about its primary.
22631
+ *
22632
+ * Matched against all THREE tiers of a member — the class (`animal`), the
22633
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
22634
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
22635
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
22636
+ * that read only the class would answer "animal" and never "dog".
22637
+ *
22638
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
22639
+ */
22640
+ classes: array(string().min(1).max(60)).max(40).optional()
22641
+ });
22642
+ var RecentSummariesPageSchema = object({
22643
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
22644
+ * {@link listSummaries} — one list shape, so a card renders the same
22645
+ * whichever feed drew it. */
22646
+ summaries: array(SummaryListItemSchema).readonly(),
22647
+ nextCursor: string().nullable()
22481
22648
  });
22482
22649
  var RecentTracksPageSchema = object({
22483
22650
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -22891,7 +23058,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
22891
23058
  classes: array(string()).optional(),
22892
23059
  /** See {@link ExcludeSourcesDoc}. */
22893
23060
  excludeSources: array(TrackSourceSchema).optional()
22894
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
23061
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
22895
23062
  kind: "mutation",
22896
23063
  auth: "admin"
22897
23064
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -23019,7 +23186,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23019
23186
  }), method(object({
23020
23187
  deviceId: number(),
23021
23188
  trackId: string(),
23022
- mediaKeys: array(string()).min(1)
23189
+ mediaIds: array(number().int()).min(1)
23023
23190
  }), RetrainFrameSelectionSchema, {
23024
23191
  kind: "mutation",
23025
23192
  auth: "admin"
@@ -23087,7 +23254,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23087
23254
  kind: "query",
23088
23255
  auth: "admin"
23089
23256
  }), method(object({
23090
- eventId: string(),
23257
+ /** Which of the three event tables owns the row. */
23258
+ ownerType: EventOwnerTypeSchema,
23259
+ /** The event's rowid in that table (D474: an event id is a number). */
23260
+ eventId: number().int(),
23091
23261
  kind: MediaFileKindEnum.optional(),
23092
23262
  deviceId: number()
23093
23263
  }), array(MediaFileSchema).readonly()), method(object({
@@ -23098,7 +23268,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
23098
23268
  trackId: string(),
23099
23269
  deviceId: number()
23100
23270
  }), array(MediaFileInfoSchema).readonly()), method(object({
23101
- eventId: string(),
23271
+ ownerType: EventOwnerTypeSchema,
23272
+ eventId: number().int(),
23102
23273
  deviceId: number()
23103
23274
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
23104
23275
  kind: "mutation",
@@ -27926,8 +28097,8 @@ var IdentitySchema = object({
27926
28097
  id: string(),
27927
28098
  name: string(),
27928
28099
  sampleCount: number().int().nonnegative(),
27929
- coverMediaKey: string().optional(),
27930
- /** Inline base64 of the cover sample's crop, resolved from `coverMediaKey`.
28100
+ coverMediaId: number().int().optional(),
28101
+ /** Inline base64 of the cover sample's crop, resolved from `coverMediaId`.
27931
28102
  * Lets the UI render the person's face avatar instead of a placeholder icon. */
27932
28103
  coverBase64: string().optional()
27933
28104
  });
@@ -27953,8 +28124,8 @@ var IdentitySampleAuditRowSchema = object({
27953
28124
  enrolledAt: number().int(),
27954
28125
  deviceId: number().int().optional(),
27955
28126
  source: _enum(["detected", "photo"]),
27956
- /** The enrolled crop's media key, so the panel can show the evidence. */
27957
- mediaKey: string().optional(),
28127
+ /** The enrolled crop's media row id, so the panel can show the evidence. */
28128
+ mediaId: number().int().optional(),
27958
28129
  /**
27959
28130
  * False = the sample is stamped with a DIFFERENT face model, and a cosine
27960
28131
  * across feature spaces is a well-formed float with no meaning. Every number
@@ -28023,15 +28194,15 @@ var FaceInfoSchema = object({
28023
28194
  */
28024
28195
  cropUrl: string().optional(),
28025
28196
  /** Design B: the face bbox (pixel space) on the key frame — lets a detail
28026
- * view draw the box over the native `keyFrameMediaKey` frame. Absent on
28197
+ * view draw the box over the native `keyFrameMediaId` frame. Absent on
28027
28198
  * legacy rows written before design B. */
28028
28199
  faceBbox: BoundingBoxSchema.optional(),
28029
28200
  /** Design B: MediaStore key of the track's native-resolution key frame.
28030
28201
  * Fetch the native JPEG via the event-media data-plane
28031
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
28202
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`). Absent when the
28032
28203
  * track produced no key frame (e.g. native/onboard source) — the UI falls
28033
28204
  * back to the inline `base64` face crop. */
28034
- keyFrameMediaKey: string().optional(),
28205
+ keyFrameMediaId: number().int().optional(),
28035
28206
  /** Winning identity-match cosine (0..1) for this face's track, when an
28036
28207
  * identity was auto-confirmed. Lets the UI surface WHY a face was assigned
28037
28208
  * (confidence badge / low-confidence audit). Absent on legacy rows and on
@@ -28100,11 +28271,14 @@ var FaceClusterSchema = object({
28100
28271
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
28101
28272
  * dialog already rendering its key FRAME from the `event-media` plane.
28102
28273
  *
28103
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
28104
- * media key directly, so this needed no new plane and no new access decision.
28274
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
28275
+ * resolves a media row by its own id, so this needed no new plane and no new
28276
+ * access decision.
28105
28277
  */
28106
28278
  var MediaFileLiteSchema$1 = object({
28107
- key: string(),
28279
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
28280
+ * (D482). It was the row's composite key, which embedded the owner. */
28281
+ mediaId: number().int(),
28108
28282
  kind: string(),
28109
28283
  url: string(),
28110
28284
  sizeBytes: number(),
@@ -28121,7 +28295,7 @@ method(object({
28121
28295
  * covers inline, ~10 KB of base64 per row, on a query this UI mounts
28122
28296
  * four times and the viewer holds at `staleTime: 30_000`.
28123
28297
  *
28124
- * Nothing loses its avatar: `coverMediaKey` is already on every row and
28298
+ * Nothing loses its avatar: `coverMediaId` is already on every row and
28125
28299
  * the `event-media` plane serves that key `immutable` with an ETag.
28126
28300
  *
28127
28301
  * **This is an INPUT field, so it does not reach the addon until the
@@ -30614,8 +30788,8 @@ var VehicleSchema = object({
30614
30788
  id: string(),
30615
30789
  name: string(),
30616
30790
  sampleCount: number().int().nonnegative(),
30617
- coverMediaKey: string().optional(),
30618
- /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaKey`. */
30791
+ coverMediaId: number().int().optional(),
30792
+ /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaId`. */
30619
30793
  coverBase64: string().optional()
30620
30794
  });
30621
30795
  var VehicleSampleInfoSchema = object({
@@ -30648,7 +30822,7 @@ var PlateInfoSchema = object({
30648
30822
  /** keyFrame parity: the plate bbox (pixel space) on the native key frame. */
30649
30823
  plateBbox: BoundingBoxSchema.optional(),
30650
30824
  /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
30651
- keyFrameMediaKey: string().optional(),
30825
+ keyFrameMediaId: number().int().optional(),
30652
30826
  base64: string().optional(),
30653
30827
  /**
30654
30828
  * Same crop as a data-plane URL, always present when the plate has a stored
@@ -30669,11 +30843,14 @@ var PlateInfoSchema = object({
30669
30843
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
30670
30844
  * dialog already rendering its key FRAME from the `event-media` plane.
30671
30845
  *
30672
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
30673
- * media key directly, so this needed no new plane and no new access decision.
30846
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
30847
+ * resolves a media row by its own id, so this needed no new plane and no new
30848
+ * access decision.
30674
30849
  */
30675
30850
  var MediaFileLiteSchema = object({
30676
- key: string(),
30851
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
30852
+ * (D482). It was the row's composite key, which embedded the owner. */
30853
+ mediaId: number().int(),
30677
30854
  kind: string(),
30678
30855
  url: string(),
30679
30856
  sizeBytes: number(),
@@ -30732,7 +30909,7 @@ method(object({
30732
30909
  }), method(object({
30733
30910
  /** Inline {@link VehicleSchema.coverBase64} on every row. Default
30734
30911
  * `false` — the vehicle twin of `faceGallery.listIdentities`'s
30735
- * option; `coverMediaKey` + the `event-media` plane carry the picture.
30912
+ * option; `coverMediaId` + the `event-media` plane carry the picture.
30736
30913
  * INPUT field: stripped by the hub router until the train ships, which
30737
30914
  * resolves to `false` and is exactly the intended default. */
30738
30915
  includeCrops: boolean().optional() }).optional(), array(VehicleSchema).readonly()), method(object({ name: string().min(1) }), VehicleSchema, {
@@ -32311,7 +32488,14 @@ var SceneReferenceSchema = object({
32311
32488
  modelId: string(),
32312
32489
  condition: SceneConditionSchema,
32313
32490
  capturedAt: number(),
32314
- thumbnailMediaId: string().optional(),
32491
+ /**
32492
+ * The reference thumbnail's media ROW id (D482).
32493
+ *
32494
+ * The name already said `mediaId` while the value was the row's composite
32495
+ * key — a leftover that read as done and was not. It is the row's own id
32496
+ * now, addressed at `/addon/<addonId>/event-media/m/<id>`.
32497
+ */
32498
+ thumbnailMediaId: number().int().optional(),
32315
32499
  /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
32316
32500
  * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
32317
32501
  * normalized rect frame a different piece of world, and the scene would
@@ -33125,7 +33309,29 @@ var LoggingSettingsPatchSchema = object({
33125
33309
  * disarmed the channels it did not mention would make the Levels page and
33126
33310
  * the Diagnostics page fight over the same value.
33127
33311
  */
33128
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
33312
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
33313
+ /**
33314
+ * How many days the analytics OPS LOG is kept — the audit trail of what
33315
+ * retention actually deleted.
33316
+ *
33317
+ * It lives HERE, on the logging document, and not on the analytics addon's
33318
+ * settings form, on the operator's instruction: every other log-ish window in
33319
+ * this system is configured through this one document, and a retention audit
33320
+ * configured somewhere else is a second place to look when the question is
33321
+ * "what happened to my data".
33322
+ *
33323
+ * That placement has a cost worth stating: this document ships in the
33324
+ * framework closure, so this knob needs a published `@camstack/server` while
33325
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
33326
+ *
33327
+ * `retention-model.ts` argued this one must NOT follow a device window,
33328
+ * because the audit trail is the history of the SWEEP and not of the camera.
33329
+ * That argument stands and is untouched — what changes is that 30 days stops
33330
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
33331
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
33332
+ * state in which the next 9.5 GiB leak cannot be explained.
33333
+ */
33334
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
33129
33335
  });
33130
33336
  /**
33131
33337
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -33198,6 +33404,14 @@ var LoggingSettingsStateSchema = object({
33198
33404
  channels: array(LogChannelDescriptorSchema).readonly(),
33199
33405
  /** The channels ARMED right now, each with its deadline. */
33200
33406
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
33407
+ /**
33408
+ * The ops-log window in days, as it is in force. `0` = kept forever.
33409
+ *
33410
+ * Reported rather than left to the caller's memory of what it wrote: this is
33411
+ * the value the analytics sweep will actually use, and an operator asking how
33412
+ * long their audit trail lives should not have to infer it from a default.
33413
+ */
33414
+ opsLogRetentionDays: number().int().min(0),
33201
33415
  persisted: boolean()
33202
33416
  });
33203
33417
  method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), method(_void(), FeatureManifestSchema), method(_void(), array(NetworkAddressSchema).readonly()), method(_void(), unknown().nullable(), { auth: "admin" }), method(record(string(), unknown()), _null(), {
@@ -33759,7 +33973,7 @@ var StationaryObjectSchema = object({
33759
33973
  /** Enrichment label carried from the source track (identity / plate). */
33760
33974
  label: string().optional(),
33761
33975
  /** Native-resolution key-frame media key for the parked object's best image. */
33762
- keyFrameMediaKey: string().optional()
33976
+ keyFrameMediaId: number().int().optional()
33763
33977
  });
33764
33978
  var CameraOccupancySnapshotSchema = object({
33765
33979
  /** Frame timestamp of the inference result that produced this snapshot. */
@@ -35074,6 +35288,12 @@ Object.freeze({
35074
35288
  addonId: null,
35075
35289
  access: "create"
35076
35290
  },
35291
+ "dataStoreProvider.upsert": {
35292
+ capName: "data-store-provider",
35293
+ capScope: "system",
35294
+ addonId: null,
35295
+ access: "create"
35296
+ },
35077
35297
  "dayNight.getOptions": {
35078
35298
  capName: "day-night",
35079
35299
  capScope: "device",
@@ -37510,6 +37730,12 @@ Object.freeze({
37510
37730
  addonId: null,
37511
37731
  access: "view"
37512
37732
  },
37733
+ "pipelineAnalytics.listRecentSummaries": {
37734
+ capName: "pipeline-analytics",
37735
+ capScope: "device",
37736
+ addonId: null,
37737
+ access: "view"
37738
+ },
37513
37739
  "pipelineAnalytics.listRecentTracks": {
37514
37740
  capName: "pipeline-analytics",
37515
37741
  capScope: "device",
@@ -38938,6 +39164,12 @@ Object.freeze({
38938
39164
  addonId: null,
38939
39165
  access: "create"
38940
39166
  },
39167
+ "settingsStore.upsert": {
39168
+ capName: "settings-store",
39169
+ capScope: "system",
39170
+ addonId: null,
39171
+ access: "create"
39172
+ },
38941
39173
  "smtpProvider.getStatus": {
38942
39174
  capName: "smtp-provider",
38943
39175
  capScope: "system",
@@ -41331,6 +41563,11 @@ Object.freeze({
41331
41563
  form: "single",
41332
41564
  optional: true
41333
41565
  }],
41566
+ "pipelineAnalytics.listRecentSummaries": [{
41567
+ name: "deviceIds",
41568
+ form: "array",
41569
+ optional: false
41570
+ }],
41334
41571
  "pipelineAnalytics.listRecentTracks": [{
41335
41572
  name: "deviceIds",
41336
41573
  form: "array",