@camstack/addon-export-google 0.1.10 → 0.1.11

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.
@@ -13186,6 +13186,114 @@ method(object({
13186
13186
  height: number()
13187
13187
  }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
13188
13188
  /**
13189
+ * `failure-contribution` — the capability an addon reports its OWN losses
13190
+ * through, per camera, with the denominator attached. It stores nothing.
13191
+ *
13192
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13193
+ *
13194
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13195
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13196
+ * copied: the contributor reports what it already knows, hub-main adds only
13197
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13198
+ * somebody to forget to edit.
13199
+ *
13200
+ * They are not merged, because their invariants are opposites:
13201
+ *
13202
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13203
+ * claim a camera cost nothing, which is a measurement nobody made;
13204
+ * - a `failure-contribution` zero is the **most valuable value on the
13205
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13206
+ * and it is exactly what an absent entry cannot say.
13207
+ *
13208
+ * Putting a loss counter on a cost entry would also break the reconciliation
13209
+ * that gives `load-contribution` its point: contributions are subtracted from
13210
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13211
+ * has no process.
13212
+ *
13213
+ * ## Why not a log line, since the counters already exist
13214
+ *
13215
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13216
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13217
+ * ends in a log line, and a log line is the thing the operator asked to stop
13218
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13219
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13220
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13221
+ * media blackout were both diagnosed. The counters stay; this is where they can
13222
+ * be READ.
13223
+ *
13224
+ * ## The rate is served with its denominator or not at all
13225
+ *
13226
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13227
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13228
+ * than yesterday" and was **flat across twelve hours** once divided by the
13229
+ * successes on the same path. A surface that publishes only the numerator
13230
+ * reproduces that mistake on every read.
13231
+ *
13232
+ * ## Shape
13233
+ *
13234
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13235
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13236
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13237
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13238
+ * a forked runner's entries reach hub-main over transport that already exists.
13239
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13240
+ * result through `system.getFailureContributions`.
13241
+ */
13242
+ var FailureReasonCountSchema = object({
13243
+ /**
13244
+ * Why the attempt did not land, in the contributor's own vocabulary —
13245
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13246
+ * strings that already appear in this repo's logs and, where one exists, the
13247
+ * same string the per-track `previewMissReason` records (D276): a second
13248
+ * vocabulary for the same loss would make the row and the counter
13249
+ * un-joinable.
13250
+ */
13251
+ reason: string(),
13252
+ count: number().int().nonnegative()
13253
+ });
13254
+ var FailureContributionSchema = object({
13255
+ /**
13256
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13257
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13258
+ * `unit` free: the families are owned by different addons and a shared enum
13259
+ * is a central list that rots invisibly.
13260
+ */
13261
+ family: string(),
13262
+ /**
13263
+ * The NUMERIC device id — the same value every log line carries as
13264
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13265
+ * cannot name the camera must not emit the entry, because a fleet total
13266
+ * cannot answer the only question anybody asks of this surface.
13267
+ */
13268
+ deviceId: number().int().positive(),
13269
+ /**
13270
+ * A second dimension inside the family: the model / step id for an inference
13271
+ * timeout, so "which camera AND which model" is one read. Absent when the
13272
+ * family has a single variant.
13273
+ */
13274
+ variant: string().optional(),
13275
+ /**
13276
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13277
+ * differencing two reads must drop the interval when it changes, because the
13278
+ * counter restarted from zero in a respawned runner. Same discipline as
13279
+ * `LoadContribution.startedAtMs`.
13280
+ */
13281
+ sinceMs: number(),
13282
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13283
+ atMs: number(),
13284
+ /**
13285
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13286
+ * window. A failure count published without it is the mistake this schema
13287
+ * exists to make impossible.
13288
+ */
13289
+ attempts: number().int().nonnegative(),
13290
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13291
+ succeeded: number().int().nonnegative(),
13292
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13293
+ reasons: array(FailureReasonCountSchema).readonly()
13294
+ });
13295
+ method(_void(), array(FailureContributionSchema).readonly());
13296
+ /**
13189
13297
  * filesystem-browse — per-node capability for browsing the node's local
13190
13298
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
13191
13299
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -13707,6 +13815,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13707
13815
  kind: "mutation",
13708
13816
  auth: "admin"
13709
13817
  });
13818
+ var LoadContributionSchema = object({
13819
+ role: _enum([
13820
+ "decode",
13821
+ "transcode",
13822
+ "recording",
13823
+ "streaming",
13824
+ "detection"
13825
+ ]),
13826
+ /**
13827
+ * The NUMERIC device id — the same value every log line carries as
13828
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13829
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
13830
+ * contributor that cannot name its camera must not emit the entry at all,
13831
+ * because an unnamed per-camera entry is indistinguishable from a shared one
13832
+ * and would quietly turn one camera's cost into everybody's.
13833
+ */
13834
+ deviceId: number().int().positive().nullable(),
13835
+ attribution: _enum([
13836
+ "measured",
13837
+ "accounted",
13838
+ "unattributable"
13839
+ ]),
13840
+ /**
13841
+ * What ONE entry is, in the contributor's own words — `615/high`,
13842
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13843
+ * family and inventing a common one would lose the only information that
13844
+ * makes two entries for the same camera distinguishable.
13845
+ */
13846
+ unit: string(),
13847
+ /**
13848
+ * The OS process this cost lives in, when there is one. Present so a
13849
+ * consumer can (a) tell two generations of the same unit apart across a
13850
+ * restart, and (b) subtract claimed processes from the node's process
13851
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13852
+ * process of its own.
13853
+ */
13854
+ pid: number().int().positive().optional(),
13855
+ /**
13856
+ * When this generation started. The pid's incarnation marker: a consumer
13857
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13858
+ * window when this changes, because the counter restarted from zero in a new
13859
+ * process.
13860
+ */
13861
+ startedAtMs: number().optional(),
13862
+ /**
13863
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13864
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
13865
+ * contribution is asked for.
13866
+ *
13867
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
13868
+ * needs a sampler, and a new per-node sampler is the defect half of
13869
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13870
+ * by whoever already keeps a history; a rate cannot be un-averaged.
13871
+ *
13872
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13873
+ * an entry with no process.
13874
+ */
13875
+ cpuSeconds: number().optional(),
13876
+ /** Resident bytes of this unit's process, same source and same rules. */
13877
+ rssBytes: number().optional()
13878
+ });
13879
+ method(_void(), array(LoadContributionSchema).readonly());
13710
13880
  /**
13711
13881
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
13712
13882
  * through. It stores nothing.
@@ -13783,176 +13953,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
13783
13953
  tags: record(string(), string()).optional()
13784
13954
  }), array(LogEntrySchema).readonly());
13785
13955
  /**
13786
- * `failure-contribution` — the capability an addon reports its OWN losses
13787
- * through, per camera, with the denominator attached. It stores nothing.
13788
- *
13789
- * ## The twin of `load-contribution`, and why it is a twin and not a field
13790
- *
13791
- * `load-contribution` answers *what did this camera COST*. This answers *what
13792
- * did this camera LOSE*. The reporting discipline is identical and deliberately
13793
- * copied: the contributor reports what it already knows, hub-main adds only
13794
- * `addonId`, nothing needs global knowledge, and there is no central list for
13795
- * somebody to forget to edit.
13796
- *
13797
- * They are not merged, because their invariants are opposites:
13798
- *
13799
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
13800
- * claim a camera cost nothing, which is a measurement nobody made;
13801
- * - a `failure-contribution` zero is the **most valuable value on the
13802
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13803
- * and it is exactly what an absent entry cannot say.
13804
- *
13805
- * Putting a loss counter on a cost entry would also break the reconciliation
13806
- * that gives `load-contribution` its point: contributions are subtracted from
13807
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13808
- * has no process.
13809
- *
13810
- * ## Why not a log line, since the counters already exist
13811
- *
13812
- * Several of these paths already counted themselves — `CaptureScheduler`'s
13813
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13814
- * ends in a log line, and a log line is the thing the operator asked to stop
13815
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13816
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13817
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13818
- * media blackout were both diagnosed. The counters stay; this is where they can
13819
- * be READ.
13820
- *
13821
- * ## The rate is served with its denominator or not at all
13822
- *
13823
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
13824
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13825
- * than yesterday" and was **flat across twelve hours** once divided by the
13826
- * successes on the same path. A surface that publishes only the numerator
13827
- * reproduces that mistake on every read.
13828
- *
13829
- * ## Shape
13830
- *
13831
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13832
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13833
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13834
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13835
- * a forked runner's entries reach hub-main over transport that already exists.
13836
- * No new UDS message, no second registry (D3). The operator reads the assembled
13837
- * result through `system.getFailureContributions`.
13838
- */
13839
- var FailureReasonCountSchema = object({
13840
- /**
13841
- * Why the attempt did not land, in the contributor's own vocabulary —
13842
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13843
- * strings that already appear in this repo's logs and, where one exists, the
13844
- * same string the per-track `previewMissReason` records (D276): a second
13845
- * vocabulary for the same loss would make the row and the counter
13846
- * un-joinable.
13847
- */
13848
- reason: string(),
13849
- count: number().int().nonnegative()
13850
- });
13851
- var FailureContributionSchema = object({
13852
- /**
13853
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13854
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13855
- * `unit` free: the families are owned by different addons and a shared enum
13856
- * is a central list that rots invisibly.
13857
- */
13858
- family: string(),
13859
- /**
13860
- * The NUMERIC device id — the same value every log line carries as
13861
- * `tags.deviceId`. Never nullable and never absent: a contributor that
13862
- * cannot name the camera must not emit the entry, because a fleet total
13863
- * cannot answer the only question anybody asks of this surface.
13864
- */
13865
- deviceId: number().int().positive(),
13866
- /**
13867
- * A second dimension inside the family: the model / step id for an inference
13868
- * timeout, so "which camera AND which model" is one read. Absent when the
13869
- * family has a single variant.
13870
- */
13871
- variant: string().optional(),
13872
- /**
13873
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13874
- * differencing two reads must drop the interval when it changes, because the
13875
- * counter restarted from zero in a respawned runner. Same discipline as
13876
- * `LoadContribution.startedAtMs`.
13877
- */
13878
- sinceMs: number(),
13879
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13880
- atMs: number(),
13881
- /**
13882
- * THE DENOMINATOR — every attempt on this path for this camera in the
13883
- * window. A failure count published without it is the mistake this schema
13884
- * exists to make impossible.
13885
- */
13886
- attempts: number().int().nonnegative(),
13887
- /** Attempts that landed. `attempts - succeeded` is the loss. */
13888
- succeeded: number().int().nonnegative(),
13889
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
13890
- reasons: array(FailureReasonCountSchema).readonly()
13891
- });
13892
- method(_void(), array(FailureContributionSchema).readonly());
13893
- var LoadContributionSchema = object({
13894
- role: _enum([
13895
- "decode",
13896
- "transcode",
13897
- "recording",
13898
- "streaming",
13899
- "detection"
13900
- ]),
13901
- /**
13902
- * The NUMERIC device id — the same value every log line carries as
13903
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13904
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
13905
- * contributor that cannot name its camera must not emit the entry at all,
13906
- * because an unnamed per-camera entry is indistinguishable from a shared one
13907
- * and would quietly turn one camera's cost into everybody's.
13908
- */
13909
- deviceId: number().int().positive().nullable(),
13910
- attribution: _enum([
13911
- "measured",
13912
- "accounted",
13913
- "unattributable"
13914
- ]),
13915
- /**
13916
- * What ONE entry is, in the contributor's own words — `615/high`,
13917
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13918
- * family and inventing a common one would lose the only information that
13919
- * makes two entries for the same camera distinguishable.
13920
- */
13921
- unit: string(),
13922
- /**
13923
- * The OS process this cost lives in, when there is one. Present so a
13924
- * consumer can (a) tell two generations of the same unit apart across a
13925
- * restart, and (b) subtract claimed processes from the node's process
13926
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13927
- * process of its own.
13928
- */
13929
- pid: number().int().positive().optional(),
13930
- /**
13931
- * When this generation started. The pid's incarnation marker: a consumer
13932
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13933
- * window when this changes, because the counter restarted from zero in a new
13934
- * process.
13935
- */
13936
- startedAtMs: number().optional(),
13937
- /**
13938
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13939
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
13940
- * contribution is asked for.
13941
- *
13942
- * Cumulative and not a rate on purpose: a rate needs a window, a window
13943
- * needs a sampler, and a new per-node sampler is the defect half of
13944
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13945
- * by whoever already keeps a history; a rate cannot be un-averaged.
13946
- *
13947
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13948
- * an entry with no process.
13949
- */
13950
- cpuSeconds: number().optional(),
13951
- /** Resident bytes of this unit's process, same source and same rules. */
13952
- rssBytes: number().optional()
13953
- });
13954
- method(_void(), array(LoadContributionSchema).readonly());
13955
- /**
13956
13956
  * `login-method` — collection cap through which auth addons contribute
13957
13957
  * their pre-auth login surfaces to the login page. This is the SINGLE,
13958
13958
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -18628,12 +18628,53 @@ var MediaFileKindEnum = _enum([
18628
18628
  "keyFrameSmall",
18629
18629
  "thumbnailSmall"
18630
18630
  ]);
18631
+ /**
18632
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
18633
+ * ARE — never the bytes themselves.
18634
+ *
18635
+ * ## Why `url` and not `base64`
18636
+ *
18637
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
18638
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
18639
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
18640
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
18641
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
18642
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
18643
+ *
18644
+ * `url` points at the `event-media` data plane
18645
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18646
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18647
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18648
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
18649
+ * no less protected than they were inside a `view`-level cap response — see
18650
+ * `data-plane-access.ts` for the rule and the one gap it does not close
18651
+ * (per-device scoping).
18652
+ *
18653
+ * The URL is built from the row's **stored** key, which is not always its
18654
+ * published `kind`: a track's face/plate crop is stored as `crop` under
18655
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
18656
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18657
+ *
18658
+ * ## `base64` is TRANSITIONAL and is going away
18659
+ *
18660
+ * It is still populated for one reason: the deployed viewer's track-detail
18661
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
18662
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
18663
+ * triangle — not as absence. Removing the field before that viewer ships is an
18664
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
18665
+ * delete this line and the `withBytes` pass-through in
18666
+ * `analytics-query-facade.ts`; nothing else reads it.
18667
+ */
18631
18668
  var MediaFileSchema = object({
18632
18669
  key: string(),
18633
18670
  kind: MediaFileKindEnum,
18634
- base64: string(),
18635
18671
  sizeBytes: number(),
18636
18672
  timestamp: number()
18673
+ }).extend({
18674
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
18675
+ url: string(),
18676
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
18677
+ base64: string()
18637
18678
  });
18638
18679
  /**
18639
18680
  * One media row WITHOUT its bytes.
@@ -18645,7 +18686,9 @@ var MediaFileSchema = object({
18645
18686
  * blocks the whole view.
18646
18687
  *
18647
18688
  * `sizeBytes` is carried because it is what lets a client decide between the
18648
- * stored blob and a `?variant=thumb` rendering without fetching either.
18689
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
18690
+ * `url` because a client that had to build the plane path itself is a second
18691
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
18649
18692
  */
18650
18693
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
18651
18694
  /**
@@ -19334,6 +19377,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19334
19377
  }), array(MediaFileSchema).readonly()), method(object({
19335
19378
  trackId: string(),
19336
19379
  deviceId: number()
19380
+ }), array(MediaFileInfoSchema).readonly()), method(object({
19381
+ eventId: string(),
19382
+ deviceId: number()
19337
19383
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
19338
19384
  kind: "mutation",
19339
19385
  auth: "admin"
@@ -23606,10 +23652,24 @@ var FaceClusterSchema = object({
23606
23652
  size: number().int(),
23607
23653
  cohesion: number()
23608
23654
  });
23655
+ /**
23656
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
23657
+ * are — never the bytes.
23658
+ *
23659
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
23660
+ * track/event contract) is still populated because a deployed viewer requires
23661
+ * the field to parse a row at all; this method has no such reader. Its ONE
23662
+ * caller is the admin UI's detail modal, which was building
23663
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
23664
+ * dialog already rendering its key FRAME from the `event-media` plane.
23665
+ *
23666
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
23667
+ * media key directly, so this needed no new plane and no new access decision.
23668
+ */
23609
23669
  var MediaFileLiteSchema$1 = object({
23610
23670
  key: string(),
23611
23671
  kind: string(),
23612
- base64: string(),
23672
+ url: string(),
23613
23673
  sizeBytes: number(),
23614
23674
  timestamp: number()
23615
23675
  });
@@ -25861,10 +25921,24 @@ var PlateInfoSchema = object({
25861
25921
  */
25862
25922
  cropUrl: string().optional()
25863
25923
  });
25924
+ /**
25925
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
25926
+ * are — never the bytes.
25927
+ *
25928
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
25929
+ * track/event contract) is still populated because a deployed viewer requires
25930
+ * the field to parse a row at all; this method has no such reader. Its ONE
25931
+ * caller is the admin UI's detail modal, which was building
25932
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
25933
+ * dialog already rendering its key FRAME from the `event-media` plane.
25934
+ *
25935
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
25936
+ * media key directly, so this needed no new plane and no new access decision.
25937
+ */
25864
25938
  var MediaFileLiteSchema = object({
25865
25939
  key: string(),
25866
25940
  kind: string(),
25867
- base64: string(),
25941
+ url: string(),
25868
25942
  sizeBytes: number(),
25869
25943
  timestamp: number()
25870
25944
  });
@@ -31884,6 +31958,12 @@ Object.freeze({
31884
31958
  addonId: null,
31885
31959
  access: "view"
31886
31960
  },
31961
+ "pipelineAnalytics.listEventMedia": {
31962
+ capName: "pipeline-analytics",
31963
+ capScope: "device",
31964
+ addonId: null,
31965
+ access: "view"
31966
+ },
31887
31967
  "pipelineAnalytics.listGroups": {
31888
31968
  capName: "pipeline-analytics",
31889
31969
  capScope: "device",
@@ -35507,6 +35587,11 @@ Object.freeze({
35507
35587
  form: "array",
35508
35588
  optional: false
35509
35589
  }],
35590
+ "pipelineAnalytics.listEventMedia": [{
35591
+ name: "deviceId",
35592
+ form: "single",
35593
+ optional: false
35594
+ }],
35510
35595
  "pipelineAnalytics.listGroups": [{
35511
35596
  name: "deviceIds",
35512
35597
  form: "array",
@@ -13182,6 +13182,114 @@ method(object({
13182
13182
  height: number()
13183
13183
  }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
13184
13184
  /**
13185
+ * `failure-contribution` — the capability an addon reports its OWN losses
13186
+ * through, per camera, with the denominator attached. It stores nothing.
13187
+ *
13188
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13189
+ *
13190
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13191
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13192
+ * copied: the contributor reports what it already knows, hub-main adds only
13193
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13194
+ * somebody to forget to edit.
13195
+ *
13196
+ * They are not merged, because their invariants are opposites:
13197
+ *
13198
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13199
+ * claim a camera cost nothing, which is a measurement nobody made;
13200
+ * - a `failure-contribution` zero is the **most valuable value on the
13201
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13202
+ * and it is exactly what an absent entry cannot say.
13203
+ *
13204
+ * Putting a loss counter on a cost entry would also break the reconciliation
13205
+ * that gives `load-contribution` its point: contributions are subtracted from
13206
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13207
+ * has no process.
13208
+ *
13209
+ * ## Why not a log line, since the counters already exist
13210
+ *
13211
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13212
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13213
+ * ends in a log line, and a log line is the thing the operator asked to stop
13214
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13215
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13216
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13217
+ * media blackout were both diagnosed. The counters stay; this is where they can
13218
+ * be READ.
13219
+ *
13220
+ * ## The rate is served with its denominator or not at all
13221
+ *
13222
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13223
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13224
+ * than yesterday" and was **flat across twelve hours** once divided by the
13225
+ * successes on the same path. A surface that publishes only the numerator
13226
+ * reproduces that mistake on every read.
13227
+ *
13228
+ * ## Shape
13229
+ *
13230
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13231
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13232
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13233
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13234
+ * a forked runner's entries reach hub-main over transport that already exists.
13235
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13236
+ * result through `system.getFailureContributions`.
13237
+ */
13238
+ var FailureReasonCountSchema = object({
13239
+ /**
13240
+ * Why the attempt did not land, in the contributor's own vocabulary —
13241
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13242
+ * strings that already appear in this repo's logs and, where one exists, the
13243
+ * same string the per-track `previewMissReason` records (D276): a second
13244
+ * vocabulary for the same loss would make the row and the counter
13245
+ * un-joinable.
13246
+ */
13247
+ reason: string(),
13248
+ count: number().int().nonnegative()
13249
+ });
13250
+ var FailureContributionSchema = object({
13251
+ /**
13252
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13253
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13254
+ * `unit` free: the families are owned by different addons and a shared enum
13255
+ * is a central list that rots invisibly.
13256
+ */
13257
+ family: string(),
13258
+ /**
13259
+ * The NUMERIC device id — the same value every log line carries as
13260
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13261
+ * cannot name the camera must not emit the entry, because a fleet total
13262
+ * cannot answer the only question anybody asks of this surface.
13263
+ */
13264
+ deviceId: number().int().positive(),
13265
+ /**
13266
+ * A second dimension inside the family: the model / step id for an inference
13267
+ * timeout, so "which camera AND which model" is one read. Absent when the
13268
+ * family has a single variant.
13269
+ */
13270
+ variant: string().optional(),
13271
+ /**
13272
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13273
+ * differencing two reads must drop the interval when it changes, because the
13274
+ * counter restarted from zero in a respawned runner. Same discipline as
13275
+ * `LoadContribution.startedAtMs`.
13276
+ */
13277
+ sinceMs: number(),
13278
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13279
+ atMs: number(),
13280
+ /**
13281
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13282
+ * window. A failure count published without it is the mistake this schema
13283
+ * exists to make impossible.
13284
+ */
13285
+ attempts: number().int().nonnegative(),
13286
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13287
+ succeeded: number().int().nonnegative(),
13288
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13289
+ reasons: array(FailureReasonCountSchema).readonly()
13290
+ });
13291
+ method(_void(), array(FailureContributionSchema).readonly());
13292
+ /**
13185
13293
  * filesystem-browse — per-node capability for browsing the node's local
13186
13294
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
13187
13295
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -13703,6 +13811,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13703
13811
  kind: "mutation",
13704
13812
  auth: "admin"
13705
13813
  });
13814
+ var LoadContributionSchema = object({
13815
+ role: _enum([
13816
+ "decode",
13817
+ "transcode",
13818
+ "recording",
13819
+ "streaming",
13820
+ "detection"
13821
+ ]),
13822
+ /**
13823
+ * The NUMERIC device id — the same value every log line carries as
13824
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13825
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
13826
+ * contributor that cannot name its camera must not emit the entry at all,
13827
+ * because an unnamed per-camera entry is indistinguishable from a shared one
13828
+ * and would quietly turn one camera's cost into everybody's.
13829
+ */
13830
+ deviceId: number().int().positive().nullable(),
13831
+ attribution: _enum([
13832
+ "measured",
13833
+ "accounted",
13834
+ "unattributable"
13835
+ ]),
13836
+ /**
13837
+ * What ONE entry is, in the contributor's own words — `615/high`,
13838
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13839
+ * family and inventing a common one would lose the only information that
13840
+ * makes two entries for the same camera distinguishable.
13841
+ */
13842
+ unit: string(),
13843
+ /**
13844
+ * The OS process this cost lives in, when there is one. Present so a
13845
+ * consumer can (a) tell two generations of the same unit apart across a
13846
+ * restart, and (b) subtract claimed processes from the node's process
13847
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13848
+ * process of its own.
13849
+ */
13850
+ pid: number().int().positive().optional(),
13851
+ /**
13852
+ * When this generation started. The pid's incarnation marker: a consumer
13853
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13854
+ * window when this changes, because the counter restarted from zero in a new
13855
+ * process.
13856
+ */
13857
+ startedAtMs: number().optional(),
13858
+ /**
13859
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13860
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
13861
+ * contribution is asked for.
13862
+ *
13863
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
13864
+ * needs a sampler, and a new per-node sampler is the defect half of
13865
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13866
+ * by whoever already keeps a history; a rate cannot be un-averaged.
13867
+ *
13868
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13869
+ * an entry with no process.
13870
+ */
13871
+ cpuSeconds: number().optional(),
13872
+ /** Resident bytes of this unit's process, same source and same rules. */
13873
+ rssBytes: number().optional()
13874
+ });
13875
+ method(_void(), array(LoadContributionSchema).readonly());
13706
13876
  /**
13707
13877
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
13708
13878
  * through. It stores nothing.
@@ -13779,176 +13949,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
13779
13949
  tags: record(string(), string()).optional()
13780
13950
  }), array(LogEntrySchema).readonly());
13781
13951
  /**
13782
- * `failure-contribution` — the capability an addon reports its OWN losses
13783
- * through, per camera, with the denominator attached. It stores nothing.
13784
- *
13785
- * ## The twin of `load-contribution`, and why it is a twin and not a field
13786
- *
13787
- * `load-contribution` answers *what did this camera COST*. This answers *what
13788
- * did this camera LOSE*. The reporting discipline is identical and deliberately
13789
- * copied: the contributor reports what it already knows, hub-main adds only
13790
- * `addonId`, nothing needs global knowledge, and there is no central list for
13791
- * somebody to forget to edit.
13792
- *
13793
- * They are not merged, because their invariants are opposites:
13794
- *
13795
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
13796
- * claim a camera cost nothing, which is a measurement nobody made;
13797
- * - a `failure-contribution` zero is the **most valuable value on the
13798
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13799
- * and it is exactly what an absent entry cannot say.
13800
- *
13801
- * Putting a loss counter on a cost entry would also break the reconciliation
13802
- * that gives `load-contribution` its point: contributions are subtracted from
13803
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13804
- * has no process.
13805
- *
13806
- * ## Why not a log line, since the counters already exist
13807
- *
13808
- * Several of these paths already counted themselves — `CaptureScheduler`'s
13809
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13810
- * ends in a log line, and a log line is the thing the operator asked to stop
13811
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13812
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13813
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13814
- * media blackout were both diagnosed. The counters stay; this is where they can
13815
- * be READ.
13816
- *
13817
- * ## The rate is served with its denominator or not at all
13818
- *
13819
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
13820
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13821
- * than yesterday" and was **flat across twelve hours** once divided by the
13822
- * successes on the same path. A surface that publishes only the numerator
13823
- * reproduces that mistake on every read.
13824
- *
13825
- * ## Shape
13826
- *
13827
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13828
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13829
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13830
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13831
- * a forked runner's entries reach hub-main over transport that already exists.
13832
- * No new UDS message, no second registry (D3). The operator reads the assembled
13833
- * result through `system.getFailureContributions`.
13834
- */
13835
- var FailureReasonCountSchema = object({
13836
- /**
13837
- * Why the attempt did not land, in the contributor's own vocabulary —
13838
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13839
- * strings that already appear in this repo's logs and, where one exists, the
13840
- * same string the per-track `previewMissReason` records (D276): a second
13841
- * vocabulary for the same loss would make the row and the counter
13842
- * un-joinable.
13843
- */
13844
- reason: string(),
13845
- count: number().int().nonnegative()
13846
- });
13847
- var FailureContributionSchema = object({
13848
- /**
13849
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13850
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13851
- * `unit` free: the families are owned by different addons and a shared enum
13852
- * is a central list that rots invisibly.
13853
- */
13854
- family: string(),
13855
- /**
13856
- * The NUMERIC device id — the same value every log line carries as
13857
- * `tags.deviceId`. Never nullable and never absent: a contributor that
13858
- * cannot name the camera must not emit the entry, because a fleet total
13859
- * cannot answer the only question anybody asks of this surface.
13860
- */
13861
- deviceId: number().int().positive(),
13862
- /**
13863
- * A second dimension inside the family: the model / step id for an inference
13864
- * timeout, so "which camera AND which model" is one read. Absent when the
13865
- * family has a single variant.
13866
- */
13867
- variant: string().optional(),
13868
- /**
13869
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13870
- * differencing two reads must drop the interval when it changes, because the
13871
- * counter restarted from zero in a respawned runner. Same discipline as
13872
- * `LoadContribution.startedAtMs`.
13873
- */
13874
- sinceMs: number(),
13875
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13876
- atMs: number(),
13877
- /**
13878
- * THE DENOMINATOR — every attempt on this path for this camera in the
13879
- * window. A failure count published without it is the mistake this schema
13880
- * exists to make impossible.
13881
- */
13882
- attempts: number().int().nonnegative(),
13883
- /** Attempts that landed. `attempts - succeeded` is the loss. */
13884
- succeeded: number().int().nonnegative(),
13885
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
13886
- reasons: array(FailureReasonCountSchema).readonly()
13887
- });
13888
- method(_void(), array(FailureContributionSchema).readonly());
13889
- var LoadContributionSchema = object({
13890
- role: _enum([
13891
- "decode",
13892
- "transcode",
13893
- "recording",
13894
- "streaming",
13895
- "detection"
13896
- ]),
13897
- /**
13898
- * The NUMERIC device id — the same value every log line carries as
13899
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13900
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
13901
- * contributor that cannot name its camera must not emit the entry at all,
13902
- * because an unnamed per-camera entry is indistinguishable from a shared one
13903
- * and would quietly turn one camera's cost into everybody's.
13904
- */
13905
- deviceId: number().int().positive().nullable(),
13906
- attribution: _enum([
13907
- "measured",
13908
- "accounted",
13909
- "unattributable"
13910
- ]),
13911
- /**
13912
- * What ONE entry is, in the contributor's own words — `615/high`,
13913
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13914
- * family and inventing a common one would lose the only information that
13915
- * makes two entries for the same camera distinguishable.
13916
- */
13917
- unit: string(),
13918
- /**
13919
- * The OS process this cost lives in, when there is one. Present so a
13920
- * consumer can (a) tell two generations of the same unit apart across a
13921
- * restart, and (b) subtract claimed processes from the node's process
13922
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13923
- * process of its own.
13924
- */
13925
- pid: number().int().positive().optional(),
13926
- /**
13927
- * When this generation started. The pid's incarnation marker: a consumer
13928
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13929
- * window when this changes, because the counter restarted from zero in a new
13930
- * process.
13931
- */
13932
- startedAtMs: number().optional(),
13933
- /**
13934
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13935
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
13936
- * contribution is asked for.
13937
- *
13938
- * Cumulative and not a rate on purpose: a rate needs a window, a window
13939
- * needs a sampler, and a new per-node sampler is the defect half of
13940
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13941
- * by whoever already keeps a history; a rate cannot be un-averaged.
13942
- *
13943
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13944
- * an entry with no process.
13945
- */
13946
- cpuSeconds: number().optional(),
13947
- /** Resident bytes of this unit's process, same source and same rules. */
13948
- rssBytes: number().optional()
13949
- });
13950
- method(_void(), array(LoadContributionSchema).readonly());
13951
- /**
13952
13952
  * `login-method` — collection cap through which auth addons contribute
13953
13953
  * their pre-auth login surfaces to the login page. This is the SINGLE,
13954
13954
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -18624,12 +18624,53 @@ var MediaFileKindEnum = _enum([
18624
18624
  "keyFrameSmall",
18625
18625
  "thumbnailSmall"
18626
18626
  ]);
18627
+ /**
18628
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
18629
+ * ARE — never the bytes themselves.
18630
+ *
18631
+ * ## Why `url` and not `base64`
18632
+ *
18633
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
18634
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
18635
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
18636
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
18637
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
18638
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
18639
+ *
18640
+ * `url` points at the `event-media` data plane
18641
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18642
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18643
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18644
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
18645
+ * no less protected than they were inside a `view`-level cap response — see
18646
+ * `data-plane-access.ts` for the rule and the one gap it does not close
18647
+ * (per-device scoping).
18648
+ *
18649
+ * The URL is built from the row's **stored** key, which is not always its
18650
+ * published `kind`: a track's face/plate crop is stored as `crop` under
18651
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
18652
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18653
+ *
18654
+ * ## `base64` is TRANSITIONAL and is going away
18655
+ *
18656
+ * It is still populated for one reason: the deployed viewer's track-detail
18657
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
18658
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
18659
+ * triangle — not as absence. Removing the field before that viewer ships is an
18660
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
18661
+ * delete this line and the `withBytes` pass-through in
18662
+ * `analytics-query-facade.ts`; nothing else reads it.
18663
+ */
18627
18664
  var MediaFileSchema = object({
18628
18665
  key: string(),
18629
18666
  kind: MediaFileKindEnum,
18630
- base64: string(),
18631
18667
  sizeBytes: number(),
18632
18668
  timestamp: number()
18669
+ }).extend({
18670
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
18671
+ url: string(),
18672
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
18673
+ base64: string()
18633
18674
  });
18634
18675
  /**
18635
18676
  * One media row WITHOUT its bytes.
@@ -18641,7 +18682,9 @@ var MediaFileSchema = object({
18641
18682
  * blocks the whole view.
18642
18683
  *
18643
18684
  * `sizeBytes` is carried because it is what lets a client decide between the
18644
- * stored blob and a `?variant=thumb` rendering without fetching either.
18685
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
18686
+ * `url` because a client that had to build the plane path itself is a second
18687
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
18645
18688
  */
18646
18689
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
18647
18690
  /**
@@ -19330,6 +19373,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19330
19373
  }), array(MediaFileSchema).readonly()), method(object({
19331
19374
  trackId: string(),
19332
19375
  deviceId: number()
19376
+ }), array(MediaFileInfoSchema).readonly()), method(object({
19377
+ eventId: string(),
19378
+ deviceId: number()
19333
19379
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
19334
19380
  kind: "mutation",
19335
19381
  auth: "admin"
@@ -23602,10 +23648,24 @@ var FaceClusterSchema = object({
23602
23648
  size: number().int(),
23603
23649
  cohesion: number()
23604
23650
  });
23651
+ /**
23652
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
23653
+ * are — never the bytes.
23654
+ *
23655
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
23656
+ * track/event contract) is still populated because a deployed viewer requires
23657
+ * the field to parse a row at all; this method has no such reader. Its ONE
23658
+ * caller is the admin UI's detail modal, which was building
23659
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
23660
+ * dialog already rendering its key FRAME from the `event-media` plane.
23661
+ *
23662
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
23663
+ * media key directly, so this needed no new plane and no new access decision.
23664
+ */
23605
23665
  var MediaFileLiteSchema$1 = object({
23606
23666
  key: string(),
23607
23667
  kind: string(),
23608
- base64: string(),
23668
+ url: string(),
23609
23669
  sizeBytes: number(),
23610
23670
  timestamp: number()
23611
23671
  });
@@ -25857,10 +25917,24 @@ var PlateInfoSchema = object({
25857
25917
  */
25858
25918
  cropUrl: string().optional()
25859
25919
  });
25920
+ /**
25921
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
25922
+ * are — never the bytes.
25923
+ *
25924
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
25925
+ * track/event contract) is still populated because a deployed viewer requires
25926
+ * the field to parse a row at all; this method has no such reader. Its ONE
25927
+ * caller is the admin UI's detail modal, which was building
25928
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
25929
+ * dialog already rendering its key FRAME from the `event-media` plane.
25930
+ *
25931
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
25932
+ * media key directly, so this needed no new plane and no new access decision.
25933
+ */
25860
25934
  var MediaFileLiteSchema = object({
25861
25935
  key: string(),
25862
25936
  kind: string(),
25863
- base64: string(),
25937
+ url: string(),
25864
25938
  sizeBytes: number(),
25865
25939
  timestamp: number()
25866
25940
  });
@@ -31880,6 +31954,12 @@ Object.freeze({
31880
31954
  addonId: null,
31881
31955
  access: "view"
31882
31956
  },
31957
+ "pipelineAnalytics.listEventMedia": {
31958
+ capName: "pipeline-analytics",
31959
+ capScope: "device",
31960
+ addonId: null,
31961
+ access: "view"
31962
+ },
31883
31963
  "pipelineAnalytics.listGroups": {
31884
31964
  capName: "pipeline-analytics",
31885
31965
  capScope: "device",
@@ -35503,6 +35583,11 @@ Object.freeze({
35503
35583
  form: "array",
35504
35584
  optional: false
35505
35585
  }],
35586
+ "pipelineAnalytics.listEventMedia": [{
35587
+ name: "deviceId",
35588
+ form: "single",
35589
+ optional: false
35590
+ }],
35506
35591
  "pipelineAnalytics.listGroups": [{
35507
35592
  name: "deviceIds",
35508
35593
  form: "array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-google",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Google Home export — hub-side smart-home fulfillment (SYNC / QUERY / EXECUTE / DISCONNECT) for the non-camera fleet, served over the hub's own OAuth account link. No Google credential is stored, sent or required.",
5
5
  "keywords": [
6
6
  "camstack",