@camstack/addon-post-analysis 1.2.151 → 1.2.152

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.
@@ -13567,6 +13567,133 @@ var embeddingEncoderCapability = {
13567
13567
  }
13568
13568
  };
13569
13569
  /**
13570
+ * `failure-contribution` — the capability an addon reports its OWN losses
13571
+ * through, per camera, with the denominator attached. It stores nothing.
13572
+ *
13573
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13574
+ *
13575
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13576
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13577
+ * copied: the contributor reports what it already knows, hub-main adds only
13578
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13579
+ * somebody to forget to edit.
13580
+ *
13581
+ * They are not merged, because their invariants are opposites:
13582
+ *
13583
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13584
+ * claim a camera cost nothing, which is a measurement nobody made;
13585
+ * - a `failure-contribution` zero is the **most valuable value on the
13586
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13587
+ * and it is exactly what an absent entry cannot say.
13588
+ *
13589
+ * Putting a loss counter on a cost entry would also break the reconciliation
13590
+ * that gives `load-contribution` its point: contributions are subtracted from
13591
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13592
+ * has no process.
13593
+ *
13594
+ * ## Why not a log line, since the counters already exist
13595
+ *
13596
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13597
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13598
+ * ends in a log line, and a log line is the thing the operator asked to stop
13599
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13600
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13601
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13602
+ * media blackout were both diagnosed. The counters stay; this is where they can
13603
+ * be READ.
13604
+ *
13605
+ * ## The rate is served with its denominator or not at all
13606
+ *
13607
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13608
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13609
+ * than yesterday" and was **flat across twelve hours** once divided by the
13610
+ * successes on the same path. A surface that publishes only the numerator
13611
+ * reproduces that mistake on every read.
13612
+ *
13613
+ * ## Shape
13614
+ *
13615
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13616
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13617
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13618
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13619
+ * a forked runner's entries reach hub-main over transport that already exists.
13620
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13621
+ * result through `system.getFailureContributions`.
13622
+ */
13623
+ var FailureReasonCountSchema = object({
13624
+ /**
13625
+ * Why the attempt did not land, in the contributor's own vocabulary —
13626
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13627
+ * strings that already appear in this repo's logs and, where one exists, the
13628
+ * same string the per-track `previewMissReason` records (D276): a second
13629
+ * vocabulary for the same loss would make the row and the counter
13630
+ * un-joinable.
13631
+ */
13632
+ reason: string(),
13633
+ count: number().int().nonnegative()
13634
+ });
13635
+ var FailureContributionSchema = object({
13636
+ /**
13637
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13638
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13639
+ * `unit` free: the families are owned by different addons and a shared enum
13640
+ * is a central list that rots invisibly.
13641
+ */
13642
+ family: string(),
13643
+ /**
13644
+ * The NUMERIC device id — the same value every log line carries as
13645
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13646
+ * cannot name the camera must not emit the entry, because a fleet total
13647
+ * cannot answer the only question anybody asks of this surface.
13648
+ */
13649
+ deviceId: number().int().positive(),
13650
+ /**
13651
+ * A second dimension inside the family: the model / step id for an inference
13652
+ * timeout, so "which camera AND which model" is one read. Absent when the
13653
+ * family has a single variant.
13654
+ */
13655
+ variant: string().optional(),
13656
+ /**
13657
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13658
+ * differencing two reads must drop the interval when it changes, because the
13659
+ * counter restarted from zero in a respawned runner. Same discipline as
13660
+ * `LoadContribution.startedAtMs`.
13661
+ */
13662
+ sinceMs: number(),
13663
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13664
+ atMs: number(),
13665
+ /**
13666
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13667
+ * window. A failure count published without it is the mistake this schema
13668
+ * exists to make impossible.
13669
+ */
13670
+ attempts: number().int().nonnegative(),
13671
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13672
+ succeeded: number().int().nonnegative(),
13673
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13674
+ reasons: array(FailureReasonCountSchema).readonly()
13675
+ });
13676
+ var failureContributionCapability = {
13677
+ name: "failure-contribution",
13678
+ scope: "system",
13679
+ mode: "collection",
13680
+ internal: true,
13681
+ methods: {
13682
+ /**
13683
+ * This addon's per-camera failure counters, read live from bounded in-RAM
13684
+ * state it already keeps. Inert: no persistence, no sampling, no timer.
13685
+ *
13686
+ * READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
13687
+ * consumer that wants a rate differences two reads. A draining read would
13688
+ * make two operators with the page open each destroy half of the other's
13689
+ * numbers, and `load-contribution` already settled the same question the
13690
+ * same way for `cpuSeconds`.
13691
+ */
13692
+ list: method(_void(), array(FailureContributionSchema).readonly()) },
13693
+ /** In-process only — enumerated through `addons.listCapabilityProviders`. */
13694
+ mount: { kind: "skip" }
13695
+ };
13696
+ /**
13570
13697
  * filesystem-browse — per-node capability for browsing the node's local
13571
13698
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
13572
13699
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -14088,6 +14215,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
14088
14215
  kind: "mutation",
14089
14216
  auth: "admin"
14090
14217
  });
14218
+ var LoadContributionSchema = object({
14219
+ role: _enum([
14220
+ "decode",
14221
+ "transcode",
14222
+ "recording",
14223
+ "streaming",
14224
+ "detection"
14225
+ ]),
14226
+ /**
14227
+ * The NUMERIC device id — the same value every log line carries as
14228
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
14229
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
14230
+ * contributor that cannot name its camera must not emit the entry at all,
14231
+ * because an unnamed per-camera entry is indistinguishable from a shared one
14232
+ * and would quietly turn one camera's cost into everybody's.
14233
+ */
14234
+ deviceId: number().int().positive().nullable(),
14235
+ attribution: _enum([
14236
+ "measured",
14237
+ "accounted",
14238
+ "unattributable"
14239
+ ]),
14240
+ /**
14241
+ * What ONE entry is, in the contributor's own words — `615/high`,
14242
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
14243
+ * family and inventing a common one would lose the only information that
14244
+ * makes two entries for the same camera distinguishable.
14245
+ */
14246
+ unit: string(),
14247
+ /**
14248
+ * The OS process this cost lives in, when there is one. Present so a
14249
+ * consumer can (a) tell two generations of the same unit apart across a
14250
+ * restart, and (b) subtract claimed processes from the node's process
14251
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
14252
+ * process of its own.
14253
+ */
14254
+ pid: number().int().positive().optional(),
14255
+ /**
14256
+ * When this generation started. The pid's incarnation marker: a consumer
14257
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
14258
+ * window when this changes, because the counter restarted from zero in a new
14259
+ * process.
14260
+ */
14261
+ startedAtMs: number().optional(),
14262
+ /**
14263
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
14264
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
14265
+ * contribution is asked for.
14266
+ *
14267
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
14268
+ * needs a sampler, and a new per-node sampler is the defect half of
14269
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
14270
+ * by whoever already keeps a history; a rate cannot be un-averaged.
14271
+ *
14272
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
14273
+ * an entry with no process.
14274
+ */
14275
+ cpuSeconds: number().optional(),
14276
+ /** Resident bytes of this unit's process, same source and same rules. */
14277
+ rssBytes: number().optional()
14278
+ });
14279
+ method(_void(), array(LoadContributionSchema).readonly());
14091
14280
  /**
14092
14281
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
14093
14282
  * through. It stores nothing.
@@ -14164,195 +14353,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
14164
14353
  tags: record(string(), string()).optional()
14165
14354
  }), array(LogEntrySchema).readonly());
14166
14355
  /**
14167
- * `failure-contribution` — the capability an addon reports its OWN losses
14168
- * through, per camera, with the denominator attached. It stores nothing.
14169
- *
14170
- * ## The twin of `load-contribution`, and why it is a twin and not a field
14171
- *
14172
- * `load-contribution` answers *what did this camera COST*. This answers *what
14173
- * did this camera LOSE*. The reporting discipline is identical and deliberately
14174
- * copied: the contributor reports what it already knows, hub-main adds only
14175
- * `addonId`, nothing needs global knowledge, and there is no central list for
14176
- * somebody to forget to edit.
14177
- *
14178
- * They are not merged, because their invariants are opposites:
14179
- *
14180
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
14181
- * claim a camera cost nothing, which is a measurement nobody made;
14182
- * - a `failure-contribution` zero is the **most valuable value on the
14183
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
14184
- * and it is exactly what an absent entry cannot say.
14185
- *
14186
- * Putting a loss counter on a cost entry would also break the reconciliation
14187
- * that gives `load-contribution` its point: contributions are subtracted from
14188
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
14189
- * has no process.
14190
- *
14191
- * ## Why not a log line, since the counters already exist
14192
- *
14193
- * Several of these paths already counted themselves — `CaptureScheduler`'s
14194
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
14195
- * ends in a log line, and a log line is the thing the operator asked to stop
14196
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
14197
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
14198
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
14199
- * media blackout were both diagnosed. The counters stay; this is where they can
14200
- * be READ.
14201
- *
14202
- * ## The rate is served with its denominator or not at all
14203
- *
14204
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
14205
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
14206
- * than yesterday" and was **flat across twelve hours** once divided by the
14207
- * successes on the same path. A surface that publishes only the numerator
14208
- * reproduces that mistake on every read.
14209
- *
14210
- * ## Shape
14211
- *
14212
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
14213
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
14214
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
14215
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
14216
- * a forked runner's entries reach hub-main over transport that already exists.
14217
- * No new UDS message, no second registry (D3). The operator reads the assembled
14218
- * result through `system.getFailureContributions`.
14219
- */
14220
- var FailureReasonCountSchema = object({
14221
- /**
14222
- * Why the attempt did not land, in the contributor's own vocabulary —
14223
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
14224
- * strings that already appear in this repo's logs and, where one exists, the
14225
- * same string the per-track `previewMissReason` records (D276): a second
14226
- * vocabulary for the same loss would make the row and the counter
14227
- * un-joinable.
14228
- */
14229
- reason: string(),
14230
- count: number().int().nonnegative()
14231
- });
14232
- var FailureContributionSchema = object({
14233
- /**
14234
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
14235
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
14236
- * `unit` free: the families are owned by different addons and a shared enum
14237
- * is a central list that rots invisibly.
14238
- */
14239
- family: string(),
14240
- /**
14241
- * The NUMERIC device id — the same value every log line carries as
14242
- * `tags.deviceId`. Never nullable and never absent: a contributor that
14243
- * cannot name the camera must not emit the entry, because a fleet total
14244
- * cannot answer the only question anybody asks of this surface.
14245
- */
14246
- deviceId: number().int().positive(),
14247
- /**
14248
- * A second dimension inside the family: the model / step id for an inference
14249
- * timeout, so "which camera AND which model" is one read. Absent when the
14250
- * family has a single variant.
14251
- */
14252
- variant: string().optional(),
14253
- /**
14254
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
14255
- * differencing two reads must drop the interval when it changes, because the
14256
- * counter restarted from zero in a respawned runner. Same discipline as
14257
- * `LoadContribution.startedAtMs`.
14258
- */
14259
- sinceMs: number(),
14260
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
14261
- atMs: number(),
14262
- /**
14263
- * THE DENOMINATOR — every attempt on this path for this camera in the
14264
- * window. A failure count published without it is the mistake this schema
14265
- * exists to make impossible.
14266
- */
14267
- attempts: number().int().nonnegative(),
14268
- /** Attempts that landed. `attempts - succeeded` is the loss. */
14269
- succeeded: number().int().nonnegative(),
14270
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
14271
- reasons: array(FailureReasonCountSchema).readonly()
14272
- });
14273
- var failureContributionCapability = {
14274
- name: "failure-contribution",
14275
- scope: "system",
14276
- mode: "collection",
14277
- internal: true,
14278
- methods: {
14279
- /**
14280
- * This addon's per-camera failure counters, read live from bounded in-RAM
14281
- * state it already keeps. Inert: no persistence, no sampling, no timer.
14282
- *
14283
- * READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
14284
- * consumer that wants a rate differences two reads. A draining read would
14285
- * make two operators with the page open each destroy half of the other's
14286
- * numbers, and `load-contribution` already settled the same question the
14287
- * same way for `cpuSeconds`.
14288
- */
14289
- list: method(_void(), array(FailureContributionSchema).readonly()) },
14290
- /** In-process only — enumerated through `addons.listCapabilityProviders`. */
14291
- mount: { kind: "skip" }
14292
- };
14293
- var LoadContributionSchema = object({
14294
- role: _enum([
14295
- "decode",
14296
- "transcode",
14297
- "recording",
14298
- "streaming",
14299
- "detection"
14300
- ]),
14301
- /**
14302
- * The NUMERIC device id — the same value every log line carries as
14303
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
14304
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
14305
- * contributor that cannot name its camera must not emit the entry at all,
14306
- * because an unnamed per-camera entry is indistinguishable from a shared one
14307
- * and would quietly turn one camera's cost into everybody's.
14308
- */
14309
- deviceId: number().int().positive().nullable(),
14310
- attribution: _enum([
14311
- "measured",
14312
- "accounted",
14313
- "unattributable"
14314
- ]),
14315
- /**
14316
- * What ONE entry is, in the contributor's own words — `615/high`,
14317
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
14318
- * family and inventing a common one would lose the only information that
14319
- * makes two entries for the same camera distinguishable.
14320
- */
14321
- unit: string(),
14322
- /**
14323
- * The OS process this cost lives in, when there is one. Present so a
14324
- * consumer can (a) tell two generations of the same unit apart across a
14325
- * restart, and (b) subtract claimed processes from the node's process
14326
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
14327
- * process of its own.
14328
- */
14329
- pid: number().int().positive().optional(),
14330
- /**
14331
- * When this generation started. The pid's incarnation marker: a consumer
14332
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
14333
- * window when this changes, because the counter restarted from zero in a new
14334
- * process.
14335
- */
14336
- startedAtMs: number().optional(),
14337
- /**
14338
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
14339
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
14340
- * contribution is asked for.
14341
- *
14342
- * Cumulative and not a rate on purpose: a rate needs a window, a window
14343
- * needs a sampler, and a new per-node sampler is the defect half of
14344
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
14345
- * by whoever already keeps a history; a rate cannot be un-averaged.
14346
- *
14347
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
14348
- * an entry with no process.
14349
- */
14350
- cpuSeconds: number().optional(),
14351
- /** Resident bytes of this unit's process, same source and same rules. */
14352
- rssBytes: number().optional()
14353
- });
14354
- method(_void(), array(LoadContributionSchema).readonly());
14355
- /**
14356
14356
  * `login-method` — collection cap through which auth addons contribute
14357
14357
  * their pre-auth login surfaces to the login page. This is the SINGLE,
14358
14358
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -19718,12 +19718,53 @@ var MediaFileKindEnum = _enum([
19718
19718
  "keyFrameSmall",
19719
19719
  "thumbnailSmall"
19720
19720
  ]);
19721
+ /**
19722
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
19723
+ * ARE — never the bytes themselves.
19724
+ *
19725
+ * ## Why `url` and not `base64`
19726
+ *
19727
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
19728
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
19729
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
19730
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
19731
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
19732
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
19733
+ *
19734
+ * `url` points at the `event-media` data plane
19735
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
19736
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
19737
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
19738
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
19739
+ * no less protected than they were inside a `view`-level cap response — see
19740
+ * `data-plane-access.ts` for the rule and the one gap it does not close
19741
+ * (per-device scoping).
19742
+ *
19743
+ * The URL is built from the row's **stored** key, which is not always its
19744
+ * published `kind`: a track's face/plate crop is stored as `crop` under
19745
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
19746
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
19747
+ *
19748
+ * ## `base64` is TRANSITIONAL and is going away
19749
+ *
19750
+ * It is still populated for one reason: the deployed viewer's track-detail
19751
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
19752
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
19753
+ * triangle — not as absence. Removing the field before that viewer ships is an
19754
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
19755
+ * delete this line and the `withBytes` pass-through in
19756
+ * `analytics-query-facade.ts`; nothing else reads it.
19757
+ */
19721
19758
  var MediaFileSchema = object({
19722
19759
  key: string(),
19723
19760
  kind: MediaFileKindEnum,
19724
- base64: string(),
19725
19761
  sizeBytes: number(),
19726
19762
  timestamp: number()
19763
+ }).extend({
19764
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
19765
+ url: string(),
19766
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
19767
+ base64: string()
19727
19768
  });
19728
19769
  /**
19729
19770
  * One media row WITHOUT its bytes.
@@ -19735,7 +19776,9 @@ var MediaFileSchema = object({
19735
19776
  * blocks the whole view.
19736
19777
  *
19737
19778
  * `sizeBytes` is carried because it is what lets a client decide between the
19738
- * stored blob and a `?variant=thumb` rendering without fetching either.
19779
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
19780
+ * `url` because a client that had to build the plane path itself is a second
19781
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
19739
19782
  */
19740
19783
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
19741
19784
  /**
@@ -20867,6 +20910,26 @@ var pipelineAnalyticsCapability = {
20867
20910
  deviceId: number()
20868
20911
  }), array(MediaFileInfoSchema).readonly()),
20869
20912
  /**
20913
+ * What media an EVENT has, without any of it — the twin `getEventMedia`
20914
+ * never had.
20915
+ *
20916
+ * `listTrackMedia` above got this treatment because a track's media is
20917
+ * 5-8 MB. An event's is worse per row, not better: an old-style event owns
20918
+ * a `crop` AND a native-resolution `fullFrameBoxed`, and the track DETAIL
20919
+ * modal — the one surface that legitimately shows the big kinds — unions
20920
+ * both listings to build its filmstrip. It then renders every tile from
20921
+ * the `event-media` plane by key and throws the bytes away. Measured on
20922
+ * the live hub: one event's `fullFrameBoxed` is 2 824 077 B, base64'd to
20923
+ * ~3.8 MB, allocated whole in hub-main's heap, for a list of keys.
20924
+ *
20925
+ * Same `deviceId` authorization subject as `getEventMedia`, and the same
20926
+ * rows — this is a projection of that method, never a different question.
20927
+ */
20928
+ listEventMedia: method(object({
20929
+ eventId: string(),
20930
+ deviceId: number()
20931
+ }), array(MediaFileInfoSchema).readonly()),
20932
+ /**
20870
20933
  * Search object events by text query using CLIP cosine similarity.
20871
20934
  * Encodes `text` via the `embedding-encoder` cap, queries the
20872
20935
  * `ObjectEmbeddingStore` with optional prefilters, ranks all matching
@@ -25930,10 +25993,24 @@ var FaceClusterSchema = object({
25930
25993
  size: number().int(),
25931
25994
  cohesion: number()
25932
25995
  });
25996
+ /**
25997
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
25998
+ * are — never the bytes.
25999
+ *
26000
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
26001
+ * track/event contract) is still populated because a deployed viewer requires
26002
+ * the field to parse a row at all; this method has no such reader. Its ONE
26003
+ * caller is the admin UI's detail modal, which was building
26004
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
26005
+ * dialog already rendering its key FRAME from the `event-media` plane.
26006
+ *
26007
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
26008
+ * media key directly, so this needed no new plane and no new access decision.
26009
+ */
25933
26010
  var MediaFileLiteSchema$1 = object({
25934
26011
  key: string(),
25935
26012
  kind: string(),
25936
- base64: string(),
26013
+ url: string(),
25937
26014
  sizeBytes: number(),
25938
26015
  timestamp: number()
25939
26016
  });
@@ -28981,10 +29058,24 @@ var PlateInfoSchema = object({
28981
29058
  */
28982
29059
  cropUrl: string().optional()
28983
29060
  });
29061
+ /**
29062
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
29063
+ * are — never the bytes.
29064
+ *
29065
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
29066
+ * track/event contract) is still populated because a deployed viewer requires
29067
+ * the field to parse a row at all; this method has no such reader. Its ONE
29068
+ * caller is the admin UI's detail modal, which was building
29069
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
29070
+ * dialog already rendering its key FRAME from the `event-media` plane.
29071
+ *
29072
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
29073
+ * media key directly, so this needed no new plane and no new access decision.
29074
+ */
28984
29075
  var MediaFileLiteSchema = object({
28985
29076
  key: string(),
28986
29077
  kind: string(),
28987
- base64: string(),
29078
+ url: string(),
28988
29079
  sizeBytes: number(),
28989
29080
  timestamp: number()
28990
29081
  });
@@ -37132,6 +37223,12 @@ Object.freeze({
37132
37223
  addonId: null,
37133
37224
  access: "view"
37134
37225
  },
37226
+ "pipelineAnalytics.listEventMedia": {
37227
+ capName: "pipeline-analytics",
37228
+ capScope: "device",
37229
+ addonId: null,
37230
+ access: "view"
37231
+ },
37135
37232
  "pipelineAnalytics.listGroups": {
37136
37233
  capName: "pipeline-analytics",
37137
37234
  capScope: "device",
@@ -40755,6 +40852,11 @@ Object.freeze({
40755
40852
  form: "array",
40756
40853
  optional: false
40757
40854
  }],
40855
+ "pipelineAnalytics.listEventMedia": [{
40856
+ name: "deviceId",
40857
+ form: "single",
40858
+ optional: false
40859
+ }],
40758
40860
  "pipelineAnalytics.listGroups": [{
40759
40861
  name: "deviceIds",
40760
40862
  form: "array",