@camstack/addon-remote-storage 1.2.98 → 1.2.100

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.
@@ -1,6 +1,6 @@
1
1
  import { randomUUID } from "node:crypto";
2
2
  import * as path from "node:path";
3
- //#region ../types/dist/event-category-DAXzJeTX.mjs
3
+ //#region ../types/dist/event-category-ZyX6jcse.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -561,7 +561,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
561
561
  * a package zone — a newly-appeared stationary object of a package class
562
562
  * that cleared the class / zone / dwell / size gates. Payload:
563
563
  * `PipelineAnalyticsPackageDeliveredPayload` carrying `{ deviceId,
564
- * entryId, className, zoneIds, keyFrameMediaKey?, bbox, timestamp }`.
564
+ * entryId, className, zoneIds, keyFrameMediaId?, bbox, timestamp }`.
565
565
  * Telemetry (D8): the durable record is the `package-events` store row;
566
566
  * this bus topic drives notifier rules + live UI. See
567
567
  * docs/superpowers/specs/2026-07-17-package-zones-design.md §5.1.
@@ -5347,7 +5347,7 @@ var ZodIssueCode = {
5347
5347
  var ZodFirstPartyTypeKind;
5348
5348
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5349
5349
  //#endregion
5350
- //#region ../types/dist/sleep-BnujYGPe.mjs
5350
+ //#region ../types/dist/sleep-DBKu2-U5.mjs
5351
5351
  /**
5352
5352
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5353
5353
  * window to float samples (D455).
@@ -7298,13 +7298,30 @@ new Set([
7298
7298
  "scene",
7299
7299
  "motion",
7300
7300
  "object",
7301
- "audio"
7301
+ "audio",
7302
+ "mosaic"
7302
7303
  ]);
7303
- new Set([
7304
+ /**
7305
+ * The owner types that are event tables, in the order the event-media resolver
7306
+ * should consider them. Exported so a consumer asking "is this key an event?"
7307
+ * does not re-spell the list and drift from it.
7308
+ */
7309
+ var EVENT_OWNER_TYPES = [
7304
7310
  "motion",
7305
7311
  "object",
7306
7312
  "audio"
7307
- ]);
7313
+ ];
7314
+ /**
7315
+ * The same list as a Zod enum, for the cap inputs that must NAME the table
7316
+ * (D482: `getEventMedia` / `listEventMedia` take an owner, and an owner is
7317
+ * `(table, id)`).
7318
+ *
7319
+ * Built FROM {@link EVENT_OWNER_TYPES} rather than re-spelled: a fourth event
7320
+ * table would otherwise be accepted by the codec and refused at the door, with
7321
+ * nothing failing until a caller asked.
7322
+ */
7323
+ var EventOwnerTypeSchema = _enum(EVENT_OWNER_TYPES);
7324
+ new Set(EVENT_OWNER_TYPES);
7308
7325
  var EncodeProfileSchema = object({
7309
7326
  video: object({
7310
7327
  codec: _enum([
@@ -7343,7 +7360,23 @@ var EncodeProfileSchema = object({
7343
7360
  "zerolatency",
7344
7361
  "film",
7345
7362
  "animation"
7346
- ]).optional()
7363
+ ]).optional(),
7364
+ /**
7365
+ * ONE slice per access unit.
7366
+ *
7367
+ * `-tune zerolatency` turns on x264's sliced threads, and a frame then leaves
7368
+ * the encoder as five NAL slices that share one RTP timestamp and carry one
7369
+ * marker bit. A libwebrtc depacketiser sees five frame-starts and one
7370
+ * frame-end per frame: the first pictures render and the video then freezes
7371
+ * for good while the audio, on its own plane, plays on. Measured on this hub
7372
+ * 2026-09-13 against the Echo, and reduced to one slice by this flag alone.
7373
+ *
7374
+ * A NAMED field and not a raw flag, because {@link EgressEncodeSchema} omits
7375
+ * `outputArgs` on purpose: an opaque array is part of the sharing key, so two
7376
+ * consumers meaning the same thing spelled differently would stop sharing one
7377
+ * child. Absent means "whatever the encoder does" — today's behaviour.
7378
+ */
7379
+ singleSlicePerFrame: boolean().optional()
7347
7380
  }),
7348
7381
  audio: union([literal("passthrough"), object({
7349
7382
  codec: _enum([
@@ -7393,7 +7426,7 @@ var BASE_LIVE_EGRESS_PROFILE = {
7393
7426
  audio: "passthrough"
7394
7427
  };
7395
7428
  ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7396
- ({ ...BASE_LIVE_EGRESS_PROFILE });
7429
+ ({ ...BASE_LIVE_EGRESS_PROFILE }), { ...BASE_LIVE_EGRESS_PROFILE.video };
7397
7430
  /**
7398
7431
  * Deep wiring healthcheck — snapshot of active reachability probes across
7399
7432
  * every declared capability + widget of every installed plugin, on every
@@ -12401,6 +12434,16 @@ method(object({
12401
12434
  filter: QueryFilterSchema.optional(),
12402
12435
  columns: array(string()).readonly().optional()
12403
12436
  }), array(SettingsRecordSchema).readonly()), method(object({
12437
+ namespace: string().optional(),
12438
+ collection: string(),
12439
+ /** Declared columns identifying the slot; must be covered by a UNIQUE
12440
+ * index on the collection. Never empty. */
12441
+ conflict: array(string()).readonly(),
12442
+ record: BulkRecordSchema
12443
+ }), object({
12444
+ /** The id the row HAS: assigned by SQLite on an insert, or the existing
12445
+ * row's own id on an update. */
12446
+ id: union([string(), number()]) }), { kind: "mutation" }), method(object({
12404
12447
  namespace: string().optional(),
12405
12448
  collection: string(),
12406
12449
  record: object({
@@ -12535,6 +12578,14 @@ method(_void(), EngineInfoSchema, { auth: "admin" }), method(object({
12535
12578
  id: union([string(), number()]) }), {
12536
12579
  kind: "mutation",
12537
12580
  auth: "admin"
12581
+ }), method(object({
12582
+ namespace: string().optional(),
12583
+ collection: string(),
12584
+ conflict: array(string()).readonly(),
12585
+ record: BulkRecordSchema
12586
+ }), object({ id: union([string(), number()]) }), {
12587
+ kind: "mutation",
12588
+ auth: "admin"
12538
12589
  }), method(object({
12539
12590
  namespace: string().optional(),
12540
12591
  collection: string(),
@@ -18751,8 +18802,8 @@ var TrackPositionSchema = object({
18751
18802
  var TrackSnapshotSchema = object({
18752
18803
  timestamp: number(),
18753
18804
  position: TrackPositionSchema,
18754
- /** MediaStore key; resolve via `getTrackMedia({ trackId })`. */
18755
- mediaKey: string()
18805
+ /** The snapshot's media row id (D482); resolve via `listTrackMedia({ trackId })`. */
18806
+ mediaId: number().int()
18756
18807
  });
18757
18808
  /**
18758
18809
  * Normalized 0..1 trajectory envelope (min/max over every position bbox,
@@ -19356,14 +19407,14 @@ var ObjectEventSchema = object({
19356
19407
  * pixel-space `bbox` onto a displayed image. Omitted in slim projection. */
19357
19408
  frameWidth: number().optional(),
19358
19409
  frameHeight: number().optional(),
19359
- /** MediaStore key for the crop attached to this event (if any). */
19360
- mediaKey: string().optional(),
19361
- /** Design B: MediaStore key of the track's native-resolution key frame (the
19410
+ /** Media row id of the crop attached to this event (if any) — D482. */
19411
+ mediaId: number().int().optional(),
19412
+ /** Design B: media row id of the track's native-resolution key frame (the
19362
19413
  * best-detection full frame). Resolve via the event-media data-plane
19363
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`) for a detail view that
19414
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`) for a detail view that
19364
19415
  * draws `bbox` over the native frame. Absent on legacy rows / non-decoded
19365
- * sources — consumers fall back to `mediaKey` (the tight crop). */
19366
- keyFrameMediaKey: string().optional(),
19416
+ * sources — consumers fall back to `mediaId` (the tight crop). */
19417
+ keyFrameMediaId: number().int().optional(),
19367
19418
  /** Populated by B5 (recording playback URL for this event). */
19368
19419
  mediaUrl: string().optional(),
19369
19420
  /** The parent track's key-event importance [0,1], propagated to every object
@@ -19413,7 +19464,7 @@ var MediaFileKindEnum = _enum([
19413
19464
  * hub-main's heap on the way past — for an `<img>` that would have cached it.
19414
19465
  *
19415
19466
  * `url` points at the `event-media` data plane
19416
- * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
19467
+ * (`/addon/<addonId>/event-media/m/<mediaId>` — D482), which serves the same blob
19417
19468
  * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
19418
19469
  * render a `?variant=thumb`, and streams. The hub gate in front of it requires
19419
19470
  * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
@@ -19421,10 +19472,13 @@ var MediaFileKindEnum = _enum([
19421
19472
  * `data-plane-access.ts` for the rule and the one gap it does not close
19422
19473
  * (per-device scoping).
19423
19474
  *
19424
- * The URL is built from the row's **stored** key, which is not always its
19425
- * published `kind`: a track's face/plate crop is stored as `crop` under
19475
+ * The URL is built from the row's own id, which since D482 says nothing about
19476
+ * the row's owner or kind and that is the point. The published `kind` is not
19477
+ * the stored one (a track's face/plate crop is stored as `crop` under
19426
19478
  * `('face'|'plate', '<prefix>-<trackId>')` and published as
19427
- * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
19479
+ * `faceCrop`/`plateCrop`), and under the old composite key the URL had to be
19480
+ * taken from `row.key` verbatim or it 404'd exactly those two rows. An id
19481
+ * cannot be mis-reconstructed, because there is nothing in it to reconstruct.
19428
19482
  *
19429
19483
  * ## `base64` is TRANSITIONAL and is going away
19430
19484
  *
@@ -19437,7 +19491,19 @@ var MediaFileKindEnum = _enum([
19437
19491
  * `analytics-query-facade.ts`; nothing else reads it.
19438
19492
  */
19439
19493
  var MediaFileSchema = object({
19440
- key: string(),
19494
+ /**
19495
+ * The media row's OWN id — the rowid SQLite assigned it (D482).
19496
+ *
19497
+ * It used to be the row's composite key, `<ownerType>:<ownerId>:<fileKind>
19498
+ * [:<timestampMs>]`, which embedded a FOREIGN id. D474 made event ids
19499
+ * per-table rowid aliases, so `object:101314` and `motion:101314` are two
19500
+ * different rows that spell the same number, and a track whose
19501
+ * `bestEventId` was an object event was served a motion event's snapshot —
19502
+ * a night-time thumbnail on an afternoon track, with no error anywhere. A
19503
+ * surrogate id cannot name the wrong row's owner, because it names no owner
19504
+ * at all.
19505
+ */
19506
+ mediaId: number().int(),
19441
19507
  kind: MediaFileKindEnum,
19442
19508
  sizeBytes: number(),
19443
19509
  timestamp: number()
@@ -19545,7 +19611,7 @@ var RetrainTrackSchema = object({
19545
19611
  });
19546
19612
  /** A frame the picker may offer — an index row, no blob was read to produce it. */
19547
19613
  var RetrainFrameCandidateSchema = object({
19548
- mediaKey: string(),
19614
+ mediaId: number().int(),
19549
19615
  kind: MediaFileKindEnum,
19550
19616
  timestamp: number(),
19551
19617
  sizeBytes: number().int(),
@@ -19559,7 +19625,7 @@ var RetrainFrameSchema = object({
19559
19625
  deviceId: number(),
19560
19626
  trackId: string(),
19561
19627
  /** Provenance only. It may already point at nothing — that is expected. */
19562
- sourceMediaKey: string(),
19628
+ sourceMediaId: number().int(),
19563
19629
  sourceKind: MediaFileKindEnum,
19564
19630
  sizeBytes: number().int(),
19565
19631
  width: number().int(),
@@ -19575,7 +19641,7 @@ var RetrainCopyRefusalSchema = _enum([
19575
19641
  var RetrainFrameSelectionSchema = object({
19576
19642
  copied: array(RetrainFrameSchema).readonly(),
19577
19643
  refused: array(object({
19578
- sourceMediaKey: string(),
19644
+ sourceMediaId: number().int(),
19579
19645
  reason: RetrainCopyRefusalSchema
19580
19646
  })).readonly()
19581
19647
  });
@@ -19583,7 +19649,7 @@ var RetrainFrameListSchema = object({
19583
19649
  candidates: array(RetrainFrameCandidateSchema).readonly(),
19584
19650
  copies: array(RetrainFrameSchema).readonly(),
19585
19651
  /** What the page pre-selects — the native key frame when one survives. */
19586
- autoPickMediaKey: string().optional()
19652
+ autoPickMediaId: number().int().optional()
19587
19653
  });
19588
19654
  /** What the operator asked the assist to look for. */
19589
19655
  var RetrainAssistSubjectSchema = discriminatedUnion("kind", [object({
@@ -19678,9 +19744,11 @@ var RecentTracksQueryInput = object({
19678
19744
  });
19679
19745
  /**
19680
19746
  * A Summary (D359): the per-camera session envelope that references tracks.
19681
- * `groupShotKey` is the media key of its group shot (`ownerKind: 'summary'`,
19682
- * served by the event-media plane by key), null until the first frame with a
19683
- * member visible has been materialised.
19747
+ * `groupShotMediaId` is the media ROW id of its group shot (`ownerKind:
19748
+ * 'summary'`, served by the event-media plane at `/m/<id>`), null until the
19749
+ * first frame with a member visible has been materialised (D482 — it was the
19750
+ * row's composite key, which embedded the owner and could name another table's
19751
+ * row once event ids became per-table rowids).
19684
19752
  */
19685
19753
  var SummarySchema = object({
19686
19754
  id: string(),
@@ -19689,19 +19757,115 @@ var SummarySchema = object({
19689
19757
  lastActiveAt: number(),
19690
19758
  sealedAt: number().nullable(),
19691
19759
  memberCount: number().int().nonnegative(),
19692
- groupShotKey: string().nullable()
19760
+ groupShotMediaId: number().int().nullable()
19693
19761
  });
19694
19762
  var SummariesQueryInput = object({
19695
19763
  deviceIds: array(number()).min(1),
19696
19764
  since: number().optional(),
19697
19765
  until: number().optional(),
19698
- limit: number().int().min(1).max(200).default(50)
19766
+ limit: number().int().min(1).max(200).default(50),
19767
+ /** The same member-wise filter {@link listRecentSummaries} takes — one
19768
+ * meaning of "dog" on every summary surface. */
19769
+ classes: array(string().min(1).max(60)).max(40).optional()
19699
19770
  });
19700
- var SummariesPageSchema = object({ summaries: array(SummarySchema).readonly() });
19701
19771
  var SummaryDetailSchema = object({
19702
19772
  summary: SummarySchema,
19703
- /** Member track ids, in absorption order. */
19704
- trackIds: array(string()).readonly()
19773
+ /** Members in absorption order, oldest join first. */
19774
+ members: array(object({
19775
+ trackId: string(),
19776
+ /**
19777
+ * The track's class at the time it JOINED, or `null` when it was unresolved
19778
+ * and the track no longer exists to fill it.
19779
+ *
19780
+ * The join, not the latest opinion: class voting can re-decide a track's
19781
+ * class afterwards, and a group's composition is the history of who came
19782
+ * together. A consumer counts these to badge a thumbnail — "two people and a
19783
+ * dog" — rather than being handed a second, denormalised tally that would
19784
+ * drift from the members it claims to describe.
19785
+ */
19786
+ className: string().nullable(),
19787
+ /** `primary` is the one member that carries the group's identity. */
19788
+ role: _enum([
19789
+ "primary",
19790
+ "sibling",
19791
+ "child"
19792
+ ]).nullable(),
19793
+ joinedAt: number(),
19794
+ /** Tier 1 — the sub-class (`dog`, `van`), resolved from the member's track
19795
+ * at read time. Absent when nothing resolved, never an empty string. */
19796
+ label: string().optional(),
19797
+ /** Tier 2 — the instance: a person's name, a plate. Absent when the pipeline
19798
+ * recognised nobody, and absent for a member whose track has been pruned —
19799
+ * a thumbnail that names the wrong person is worse than one naming nobody. */
19800
+ subLabel: string().optional()
19801
+ })).readonly()
19802
+ });
19803
+ /**
19804
+ * What a LIST of groups carries: the envelope plus what it is MADE OF.
19805
+ *
19806
+ * Coarse on purpose — the operator's rule is "only the rough data on the list,
19807
+ * we extend when we notice we need more". Enough to draw the card ("two people
19808
+ * and a dog") and no more. The MEMBERS, their names and the per-member links
19809
+ * are on {@link getSummary}: shipping every member of every group so a client
19810
+ * can count them turns a page of two hundred groups into a thousand records to
19811
+ * draw two hundred badges.
19812
+ */
19813
+ var SummaryListItemSchema = object({
19814
+ summary: SummarySchema,
19815
+ /** Class counts, most numerous first; `className: null` is a member whose
19816
+ * class never resolved, counted so the counts add up to `memberCount`. */
19817
+ classes: array(object({
19818
+ className: string().nullable(),
19819
+ count: number().int().positive()
19820
+ })).readonly()
19821
+ });
19822
+ var SummariesPageSchema = object({ summaries: array(SummaryListItemSchema).readonly() });
19823
+ /**
19824
+ * The paged feed, deliberately the SAME shape as {@link RecentTracksQueryInput}.
19825
+ *
19826
+ * The reel on the cameras page and the Events gallery both ride a cursor, so a
19827
+ * summaries feed that could only answer "the last N for these cameras"
19828
+ * (`listSummaries`) would make groups available in the timeline and nowhere
19829
+ * else. Two feeds with different ordering contracts would be two ideas of what
19830
+ * "newest" means, on one screen.
19831
+ */
19832
+ var RecentSummariesQueryInput = object({
19833
+ /** Devices to merge. An empty array yields an empty page. */
19834
+ deviceIds: array(number()),
19835
+ /** Window lower bound on `lastActiveAt` (inclusive). */
19836
+ since: number().optional(),
19837
+ /** Window upper bound on `lastActiveAt` (inclusive). */
19838
+ until: number().optional(),
19839
+ limit: number().int().min(1).max(500).default(100),
19840
+ /** Opaque continuation cursor from a previous page's `nextCursor`. */
19841
+ cursor: string().optional(),
19842
+ /**
19843
+ * Restrict to these classes — THE SAME FIELD `listRecentTracks` takes, and
19844
+ * deliberately the same name: the events filter tree emits one list of ticked
19845
+ * taxonomy nodes, and a summaries feed that called it something else would
19846
+ * make the operator's one filter component produce two shapes.
19847
+ *
19848
+ * A question about the MEMBERS: a group matches when ANY of them does. "Show
19849
+ * me the arrivals with a dog" has to return the group of four people who had
19850
+ * one with them; a filter on the group's own fields could only ever answer
19851
+ * about its primary.
19852
+ *
19853
+ * Matched against all THREE tiers of a member — the class (`animal`), the
19854
+ * sub-class (`dog`) and the instance (a name, a plate) — because which tier a
19855
+ * ticked node lives on is the taxonomy's business, not the caller's. `dog` is
19856
+ * an event kind in the tree and a tier-1 label on an `animal` track; a filter
19857
+ * that read only the class would answer "animal" and never "dog".
19858
+ *
19859
+ * ABSENT or EMPTY means no filter — absent is not a selection of none.
19860
+ */
19861
+ classes: array(string().min(1).max(60)).max(40).optional()
19862
+ });
19863
+ var RecentSummariesPageSchema = object({
19864
+ /** Ordered by (`lastActiveAt` DESC, id DESC). Same light item as
19865
+ * {@link listSummaries} — one list shape, so a card renders the same
19866
+ * whichever feed drew it. */
19867
+ summaries: array(SummaryListItemSchema).readonly(),
19868
+ nextCursor: string().nullable()
19705
19869
  });
19706
19870
  var RecentTracksPageSchema = object({
19707
19871
  /** Merged page, ordered by (`lastSeen` DESC, `trackId` DESC). */
@@ -20115,7 +20279,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20115
20279
  classes: array(string()).optional(),
20116
20280
  /** See {@link ExcludeSourcesDoc}. */
20117
20281
  excludeSources: array(TrackSourceSchema).optional()
20118
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20282
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(SummariesQueryInput, SummariesPageSchema), method(RecentSummariesQueryInput, RecentSummariesPageSchema), method(object({ id: string() }), SummaryDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
20119
20283
  kind: "mutation",
20120
20284
  auth: "admin"
20121
20285
  }), 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({
@@ -20243,7 +20407,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20243
20407
  }), method(object({
20244
20408
  deviceId: number(),
20245
20409
  trackId: string(),
20246
- mediaKeys: array(string()).min(1)
20410
+ mediaIds: array(number().int()).min(1)
20247
20411
  }), RetrainFrameSelectionSchema, {
20248
20412
  kind: "mutation",
20249
20413
  auth: "admin"
@@ -20311,7 +20475,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20311
20475
  kind: "query",
20312
20476
  auth: "admin"
20313
20477
  }), method(object({
20314
- eventId: string(),
20478
+ /** Which of the three event tables owns the row. */
20479
+ ownerType: EventOwnerTypeSchema,
20480
+ /** The event's rowid in that table (D474: an event id is a number). */
20481
+ eventId: number().int(),
20315
20482
  kind: MediaFileKindEnum.optional(),
20316
20483
  deviceId: number()
20317
20484
  }), array(MediaFileSchema).readonly()), method(object({
@@ -20322,7 +20489,8 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
20322
20489
  trackId: string(),
20323
20490
  deviceId: number()
20324
20491
  }), array(MediaFileInfoSchema).readonly()), method(object({
20325
- eventId: string(),
20492
+ ownerType: EventOwnerTypeSchema,
20493
+ eventId: number().int(),
20326
20494
  deviceId: number()
20327
20495
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
20328
20496
  kind: "mutation",
@@ -24845,8 +25013,8 @@ var IdentitySchema = object({
24845
25013
  id: string(),
24846
25014
  name: string(),
24847
25015
  sampleCount: number().int().nonnegative(),
24848
- coverMediaKey: string().optional(),
24849
- /** Inline base64 of the cover sample's crop, resolved from `coverMediaKey`.
25016
+ coverMediaId: number().int().optional(),
25017
+ /** Inline base64 of the cover sample's crop, resolved from `coverMediaId`.
24850
25018
  * Lets the UI render the person's face avatar instead of a placeholder icon. */
24851
25019
  coverBase64: string().optional()
24852
25020
  });
@@ -24872,8 +25040,8 @@ var IdentitySampleAuditRowSchema = object({
24872
25040
  enrolledAt: number().int(),
24873
25041
  deviceId: number().int().optional(),
24874
25042
  source: _enum(["detected", "photo"]),
24875
- /** The enrolled crop's media key, so the panel can show the evidence. */
24876
- mediaKey: string().optional(),
25043
+ /** The enrolled crop's media row id, so the panel can show the evidence. */
25044
+ mediaId: number().int().optional(),
24877
25045
  /**
24878
25046
  * False = the sample is stamped with a DIFFERENT face model, and a cosine
24879
25047
  * across feature spaces is a well-formed float with no meaning. Every number
@@ -24942,15 +25110,15 @@ var FaceInfoSchema = object({
24942
25110
  */
24943
25111
  cropUrl: string().optional(),
24944
25112
  /** Design B: the face bbox (pixel space) on the key frame — lets a detail
24945
- * view draw the box over the native `keyFrameMediaKey` frame. Absent on
25113
+ * view draw the box over the native `keyFrameMediaId` frame. Absent on
24946
25114
  * legacy rows written before design B. */
24947
25115
  faceBbox: BoundingBoxSchema.optional(),
24948
25116
  /** Design B: MediaStore key of the track's native-resolution key frame.
24949
25117
  * Fetch the native JPEG via the event-media data-plane
24950
- * (`/addon/<addonId>/event-media/<keyFrameMediaKey>`). Absent when the
25118
+ * (`/addon/<addonId>/event-media/m/<keyFrameMediaId>`). Absent when the
24951
25119
  * track produced no key frame (e.g. native/onboard source) — the UI falls
24952
25120
  * back to the inline `base64` face crop. */
24953
- keyFrameMediaKey: string().optional(),
25121
+ keyFrameMediaId: number().int().optional(),
24954
25122
  /** Winning identity-match cosine (0..1) for this face's track, when an
24955
25123
  * identity was auto-confirmed. Lets the UI surface WHY a face was assigned
24956
25124
  * (confidence badge / low-confidence audit). Absent on legacy rows and on
@@ -25019,11 +25187,14 @@ var FaceClusterSchema = object({
25019
25187
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
25020
25188
  * dialog already rendering its key FRAME from the `event-media` plane.
25021
25189
  *
25022
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
25023
- * media key directly, so this needed no new plane and no new access decision.
25190
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
25191
+ * resolves a media row by its own id, so this needed no new plane and no new
25192
+ * access decision.
25024
25193
  */
25025
25194
  var MediaFileLiteSchema$1 = object({
25026
- key: string(),
25195
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
25196
+ * (D482). It was the row's composite key, which embedded the owner. */
25197
+ mediaId: number().int(),
25027
25198
  kind: string(),
25028
25199
  url: string(),
25029
25200
  sizeBytes: number(),
@@ -25040,7 +25211,7 @@ method(object({
25040
25211
  * covers inline, ~10 KB of base64 per row, on a query this UI mounts
25041
25212
  * four times and the viewer holds at `staleTime: 30_000`.
25042
25213
  *
25043
- * Nothing loses its avatar: `coverMediaKey` is already on every row and
25214
+ * Nothing loses its avatar: `coverMediaId` is already on every row and
25044
25215
  * the `event-media` plane serves that key `immutable` with an ETag.
25045
25216
  *
25046
25217
  * **This is an INPUT field, so it does not reach the addon until the
@@ -27508,8 +27679,8 @@ var VehicleSchema = object({
27508
27679
  id: string(),
27509
27680
  name: string(),
27510
27681
  sampleCount: number().int().nonnegative(),
27511
- coverMediaKey: string().optional(),
27512
- /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaKey`. */
27682
+ coverMediaId: number().int().optional(),
27683
+ /** Inline base64 of the cover sample's plate crop, resolved from `coverMediaId`. */
27513
27684
  coverBase64: string().optional()
27514
27685
  });
27515
27686
  var VehicleSampleInfoSchema = object({
@@ -27542,7 +27713,7 @@ var PlateInfoSchema = object({
27542
27713
  /** keyFrame parity: the plate bbox (pixel space) on the native key frame. */
27543
27714
  plateBbox: BoundingBoxSchema.optional(),
27544
27715
  /** keyFrame parity: MediaStore key of the track's native-resolution key frame. */
27545
- keyFrameMediaKey: string().optional(),
27716
+ keyFrameMediaId: number().int().optional(),
27546
27717
  base64: string().optional(),
27547
27718
  /**
27548
27719
  * Same crop as a data-plane URL, always present when the plate has a stored
@@ -27563,11 +27734,14 @@ var PlateInfoSchema = object({
27563
27734
  * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
27564
27735
  * dialog already rendering its key FRAME from the `event-media` plane.
27565
27736
  *
27566
- * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
27567
- * media key directly, so this needed no new plane and no new access decision.
27737
+ * `url` is `/addon/<addonId>/event-media/m/<mediaId>` (D482). The plane
27738
+ * resolves a media row by its own id, so this needed no new plane and no new
27739
+ * access decision.
27568
27740
  */
27569
27741
  var MediaFileLiteSchema = object({
27570
- key: string(),
27742
+ /** The media row's own id — the same address `MediaFileRef.mediaId` carries
27743
+ * (D482). It was the row's composite key, which embedded the owner. */
27744
+ mediaId: number().int(),
27571
27745
  kind: string(),
27572
27746
  url: string(),
27573
27747
  sizeBytes: number(),
@@ -27626,7 +27800,7 @@ method(object({
27626
27800
  }), method(object({
27627
27801
  /** Inline {@link VehicleSchema.coverBase64} on every row. Default
27628
27802
  * `false` — the vehicle twin of `faceGallery.listIdentities`'s
27629
- * option; `coverMediaKey` + the `event-media` plane carry the picture.
27803
+ * option; `coverMediaId` + the `event-media` plane carry the picture.
27630
27804
  * INPUT field: stripped by the hub router until the train ships, which
27631
27805
  * resolves to `false` and is exactly the intended default. */
27632
27806
  includeCrops: boolean().optional() }).optional(), array(VehicleSchema).readonly()), method(object({ name: string().min(1) }), VehicleSchema, {
@@ -28950,7 +29124,14 @@ var SceneReferenceSchema = object({
28950
29124
  modelId: string(),
28951
29125
  condition: SceneConditionSchema,
28952
29126
  capturedAt: number(),
28953
- thumbnailMediaId: string().optional(),
29127
+ /**
29128
+ * The reference thumbnail's media ROW id (D482).
29129
+ *
29130
+ * The name already said `mediaId` while the value was the row's composite
29131
+ * key — a leftover that read as done and was not. It is the row's own id
29132
+ * now, addressed at `/addon/<addonId>/event-media/m/<id>`.
29133
+ */
29134
+ thumbnailMediaId: number().int().optional(),
28954
29135
  /** Whole-frame (downscaled) embedding captured alongside the ROI crop. The
28955
29136
  * anti-view-shift anchor: a bumped camera, a PTZ preset or a re-aim makes the
28956
29137
  * normalized rect frame a different piece of world, and the scene would
@@ -29764,7 +29945,29 @@ var LoggingSettingsPatchSchema = object({
29764
29945
  * disarmed the channels it did not mention would make the Levels page and
29765
29946
  * the Diagnostics page fight over the same value.
29766
29947
  */
29767
- channels: array(LogChannelWindowPatchSchema).readonly().optional()
29948
+ channels: array(LogChannelWindowPatchSchema).readonly().optional(),
29949
+ /**
29950
+ * How many days the analytics OPS LOG is kept — the audit trail of what
29951
+ * retention actually deleted.
29952
+ *
29953
+ * It lives HERE, on the logging document, and not on the analytics addon's
29954
+ * settings form, on the operator's instruction: every other log-ish window in
29955
+ * this system is configured through this one document, and a retention audit
29956
+ * configured somewhere else is a second place to look when the question is
29957
+ * "what happened to my data".
29958
+ *
29959
+ * That placement has a cost worth stating: this document ships in the
29960
+ * framework closure, so this knob needs a published `@camstack/server` while
29961
+ * the four windows beside it (D485) reach a node on `camstack deploy`.
29962
+ *
29963
+ * `retention-model.ts` argued this one must NOT follow a device window,
29964
+ * because the audit trail is the history of the SWEEP and not of the camera.
29965
+ * That argument stands and is untouched — what changes is that 30 days stops
29966
+ * being a constant nobody can reach. `0` keeps it forever. The floor is 1 day
29967
+ * rather than 0-as-delete: an audit log truncated to nothing is precisely the
29968
+ * state in which the next 9.5 GiB leak cannot be explained.
29969
+ */
29970
+ opsLogRetentionDays: number().int().min(0).max(3650).optional()
29768
29971
  });
29769
29972
  /**
29770
29973
  * Which LAYER of the hierarchy is addressed. Absent = the cluster layer.
@@ -29837,6 +30040,14 @@ var LoggingSettingsStateSchema = object({
29837
30040
  channels: array(LogChannelDescriptorSchema).readonly(),
29838
30041
  /** The channels ARMED right now, each with its deadline. */
29839
30042
  activeChannels: array(LogChannelWindowStateSchema).readonly(),
30043
+ /**
30044
+ * The ops-log window in days, as it is in force. `0` = kept forever.
30045
+ *
30046
+ * Reported rather than left to the caller's memory of what it wrote: this is
30047
+ * the value the analytics sweep will actually use, and an operator asking how
30048
+ * long their audit trail lives should not have to infer it from a default.
30049
+ */
30050
+ opsLogRetentionDays: number().int().min(0),
29840
30051
  persisted: boolean()
29841
30052
  });
29842
30053
  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(), {
@@ -30398,7 +30609,7 @@ var StationaryObjectSchema = object({
30398
30609
  /** Enrichment label carried from the source track (identity / plate). */
30399
30610
  label: string().optional(),
30400
30611
  /** Native-resolution key-frame media key for the parked object's best image. */
30401
- keyFrameMediaKey: string().optional()
30612
+ keyFrameMediaId: number().int().optional()
30402
30613
  });
30403
30614
  var CameraOccupancySnapshotSchema = object({
30404
30615
  /** Frame timestamp of the inference result that produced this snapshot. */
@@ -31554,6 +31765,12 @@ Object.freeze({
31554
31765
  addonId: null,
31555
31766
  access: "create"
31556
31767
  },
31768
+ "dataStoreProvider.upsert": {
31769
+ capName: "data-store-provider",
31770
+ capScope: "system",
31771
+ addonId: null,
31772
+ access: "create"
31773
+ },
31557
31774
  "dayNight.getOptions": {
31558
31775
  capName: "day-night",
31559
31776
  capScope: "device",
@@ -33990,6 +34207,12 @@ Object.freeze({
33990
34207
  addonId: null,
33991
34208
  access: "view"
33992
34209
  },
34210
+ "pipelineAnalytics.listRecentSummaries": {
34211
+ capName: "pipeline-analytics",
34212
+ capScope: "device",
34213
+ addonId: null,
34214
+ access: "view"
34215
+ },
33993
34216
  "pipelineAnalytics.listRecentTracks": {
33994
34217
  capName: "pipeline-analytics",
33995
34218
  capScope: "device",
@@ -35418,6 +35641,12 @@ Object.freeze({
35418
35641
  addonId: null,
35419
35642
  access: "create"
35420
35643
  },
35644
+ "settingsStore.upsert": {
35645
+ capName: "settings-store",
35646
+ capScope: "system",
35647
+ addonId: null,
35648
+ access: "create"
35649
+ },
35421
35650
  "smtpProvider.getStatus": {
35422
35651
  capName: "smtp-provider",
35423
35652
  capScope: "system",
@@ -37811,6 +38040,11 @@ Object.freeze({
37811
38040
  form: "single",
37812
38041
  optional: true
37813
38042
  }],
38043
+ "pipelineAnalytics.listRecentSummaries": [{
38044
+ name: "deviceIds",
38045
+ form: "array",
38046
+ optional: false
38047
+ }],
37814
38048
  "pipelineAnalytics.listRecentTracks": [{
37815
38049
  name: "deviceIds",
37816
38050
  form: "array",
package/dist/smb.addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-DOPOfpNg.js");
5
+ const require_shared = require("./shared-CFfHkuDQ.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_shared.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-DW9PrJ9O.mjs";
1
+ import { c as BaseAddon, i as rearmIdleAbort, o as scheduleIdleAbort, s as storageProviderCapability } from "./shared-mQ768xoI.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import * as path from "node:path";
4
4
  import * as fsp from "node:fs/promises";
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_shared = require("./shared-DOPOfpNg.js");
5
+ const require_shared = require("./shared-CFfHkuDQ.js");
6
6
  let node_stream = require("node:stream");
7
7
  let webdav = require("webdav");
8
8
  //#region src/providers/webdav/webdav-config-schema.ts