@camstack/addon-provider-dreo 0.2.46 → 0.2.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +259 -174
  2. package/dist/addon.mjs +259 -174
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -13237,6 +13237,114 @@ method(object({
13237
13237
  height: number()
13238
13238
  }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
13239
13239
  /**
13240
+ * `failure-contribution` — the capability an addon reports its OWN losses
13241
+ * through, per camera, with the denominator attached. It stores nothing.
13242
+ *
13243
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13244
+ *
13245
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13246
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13247
+ * copied: the contributor reports what it already knows, hub-main adds only
13248
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13249
+ * somebody to forget to edit.
13250
+ *
13251
+ * They are not merged, because their invariants are opposites:
13252
+ *
13253
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13254
+ * claim a camera cost nothing, which is a measurement nobody made;
13255
+ * - a `failure-contribution` zero is the **most valuable value on the
13256
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13257
+ * and it is exactly what an absent entry cannot say.
13258
+ *
13259
+ * Putting a loss counter on a cost entry would also break the reconciliation
13260
+ * that gives `load-contribution` its point: contributions are subtracted from
13261
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13262
+ * has no process.
13263
+ *
13264
+ * ## Why not a log line, since the counters already exist
13265
+ *
13266
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13267
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13268
+ * ends in a log line, and a log line is the thing the operator asked to stop
13269
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13270
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13271
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13272
+ * media blackout were both diagnosed. The counters stay; this is where they can
13273
+ * be READ.
13274
+ *
13275
+ * ## The rate is served with its denominator or not at all
13276
+ *
13277
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13278
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13279
+ * than yesterday" and was **flat across twelve hours** once divided by the
13280
+ * successes on the same path. A surface that publishes only the numerator
13281
+ * reproduces that mistake on every read.
13282
+ *
13283
+ * ## Shape
13284
+ *
13285
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13286
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13287
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13288
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13289
+ * a forked runner's entries reach hub-main over transport that already exists.
13290
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13291
+ * result through `system.getFailureContributions`.
13292
+ */
13293
+ var FailureReasonCountSchema = object({
13294
+ /**
13295
+ * Why the attempt did not land, in the contributor's own vocabulary —
13296
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13297
+ * strings that already appear in this repo's logs and, where one exists, the
13298
+ * same string the per-track `previewMissReason` records (D276): a second
13299
+ * vocabulary for the same loss would make the row and the counter
13300
+ * un-joinable.
13301
+ */
13302
+ reason: string(),
13303
+ count: number().int().nonnegative()
13304
+ });
13305
+ var FailureContributionSchema = object({
13306
+ /**
13307
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13308
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13309
+ * `unit` free: the families are owned by different addons and a shared enum
13310
+ * is a central list that rots invisibly.
13311
+ */
13312
+ family: string(),
13313
+ /**
13314
+ * The NUMERIC device id — the same value every log line carries as
13315
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13316
+ * cannot name the camera must not emit the entry, because a fleet total
13317
+ * cannot answer the only question anybody asks of this surface.
13318
+ */
13319
+ deviceId: number().int().positive(),
13320
+ /**
13321
+ * A second dimension inside the family: the model / step id for an inference
13322
+ * timeout, so "which camera AND which model" is one read. Absent when the
13323
+ * family has a single variant.
13324
+ */
13325
+ variant: string().optional(),
13326
+ /**
13327
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13328
+ * differencing two reads must drop the interval when it changes, because the
13329
+ * counter restarted from zero in a respawned runner. Same discipline as
13330
+ * `LoadContribution.startedAtMs`.
13331
+ */
13332
+ sinceMs: number(),
13333
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13334
+ atMs: number(),
13335
+ /**
13336
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13337
+ * window. A failure count published without it is the mistake this schema
13338
+ * exists to make impossible.
13339
+ */
13340
+ attempts: number().int().nonnegative(),
13341
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13342
+ succeeded: number().int().nonnegative(),
13343
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13344
+ reasons: array(FailureReasonCountSchema).readonly()
13345
+ });
13346
+ method(_void(), array(FailureContributionSchema).readonly());
13347
+ /**
13240
13348
  * filesystem-browse — per-node capability for browsing the node's local
13241
13349
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
13242
13350
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -13758,6 +13866,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13758
13866
  kind: "mutation",
13759
13867
  auth: "admin"
13760
13868
  });
13869
+ var LoadContributionSchema = object({
13870
+ role: _enum([
13871
+ "decode",
13872
+ "transcode",
13873
+ "recording",
13874
+ "streaming",
13875
+ "detection"
13876
+ ]),
13877
+ /**
13878
+ * The NUMERIC device id — the same value every log line carries as
13879
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13880
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
13881
+ * contributor that cannot name its camera must not emit the entry at all,
13882
+ * because an unnamed per-camera entry is indistinguishable from a shared one
13883
+ * and would quietly turn one camera's cost into everybody's.
13884
+ */
13885
+ deviceId: number().int().positive().nullable(),
13886
+ attribution: _enum([
13887
+ "measured",
13888
+ "accounted",
13889
+ "unattributable"
13890
+ ]),
13891
+ /**
13892
+ * What ONE entry is, in the contributor's own words — `615/high`,
13893
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13894
+ * family and inventing a common one would lose the only information that
13895
+ * makes two entries for the same camera distinguishable.
13896
+ */
13897
+ unit: string(),
13898
+ /**
13899
+ * The OS process this cost lives in, when there is one. Present so a
13900
+ * consumer can (a) tell two generations of the same unit apart across a
13901
+ * restart, and (b) subtract claimed processes from the node's process
13902
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13903
+ * process of its own.
13904
+ */
13905
+ pid: number().int().positive().optional(),
13906
+ /**
13907
+ * When this generation started. The pid's incarnation marker: a consumer
13908
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13909
+ * window when this changes, because the counter restarted from zero in a new
13910
+ * process.
13911
+ */
13912
+ startedAtMs: number().optional(),
13913
+ /**
13914
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13915
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
13916
+ * contribution is asked for.
13917
+ *
13918
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
13919
+ * needs a sampler, and a new per-node sampler is the defect half of
13920
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13921
+ * by whoever already keeps a history; a rate cannot be un-averaged.
13922
+ *
13923
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13924
+ * an entry with no process.
13925
+ */
13926
+ cpuSeconds: number().optional(),
13927
+ /** Resident bytes of this unit's process, same source and same rules. */
13928
+ rssBytes: number().optional()
13929
+ });
13930
+ method(_void(), array(LoadContributionSchema).readonly());
13761
13931
  /**
13762
13932
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
13763
13933
  * through. It stores nothing.
@@ -13834,176 +14004,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
13834
14004
  tags: record(string(), string()).optional()
13835
14005
  }), array(LogEntrySchema).readonly());
13836
14006
  /**
13837
- * `failure-contribution` — the capability an addon reports its OWN losses
13838
- * through, per camera, with the denominator attached. It stores nothing.
13839
- *
13840
- * ## The twin of `load-contribution`, and why it is a twin and not a field
13841
- *
13842
- * `load-contribution` answers *what did this camera COST*. This answers *what
13843
- * did this camera LOSE*. The reporting discipline is identical and deliberately
13844
- * copied: the contributor reports what it already knows, hub-main adds only
13845
- * `addonId`, nothing needs global knowledge, and there is no central list for
13846
- * somebody to forget to edit.
13847
- *
13848
- * They are not merged, because their invariants are opposites:
13849
- *
13850
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
13851
- * claim a camera cost nothing, which is a measurement nobody made;
13852
- * - a `failure-contribution` zero is the **most valuable value on the
13853
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13854
- * and it is exactly what an absent entry cannot say.
13855
- *
13856
- * Putting a loss counter on a cost entry would also break the reconciliation
13857
- * that gives `load-contribution` its point: contributions are subtracted from
13858
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13859
- * has no process.
13860
- *
13861
- * ## Why not a log line, since the counters already exist
13862
- *
13863
- * Several of these paths already counted themselves — `CaptureScheduler`'s
13864
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13865
- * ends in a log line, and a log line is the thing the operator asked to stop
13866
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13867
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13868
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13869
- * media blackout were both diagnosed. The counters stay; this is where they can
13870
- * be READ.
13871
- *
13872
- * ## The rate is served with its denominator or not at all
13873
- *
13874
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
13875
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13876
- * than yesterday" and was **flat across twelve hours** once divided by the
13877
- * successes on the same path. A surface that publishes only the numerator
13878
- * reproduces that mistake on every read.
13879
- *
13880
- * ## Shape
13881
- *
13882
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13883
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13884
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13885
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13886
- * a forked runner's entries reach hub-main over transport that already exists.
13887
- * No new UDS message, no second registry (D3). The operator reads the assembled
13888
- * result through `system.getFailureContributions`.
13889
- */
13890
- var FailureReasonCountSchema = object({
13891
- /**
13892
- * Why the attempt did not land, in the contributor's own vocabulary —
13893
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13894
- * strings that already appear in this repo's logs and, where one exists, the
13895
- * same string the per-track `previewMissReason` records (D276): a second
13896
- * vocabulary for the same loss would make the row and the counter
13897
- * un-joinable.
13898
- */
13899
- reason: string(),
13900
- count: number().int().nonnegative()
13901
- });
13902
- var FailureContributionSchema = object({
13903
- /**
13904
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13905
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13906
- * `unit` free: the families are owned by different addons and a shared enum
13907
- * is a central list that rots invisibly.
13908
- */
13909
- family: string(),
13910
- /**
13911
- * The NUMERIC device id — the same value every log line carries as
13912
- * `tags.deviceId`. Never nullable and never absent: a contributor that
13913
- * cannot name the camera must not emit the entry, because a fleet total
13914
- * cannot answer the only question anybody asks of this surface.
13915
- */
13916
- deviceId: number().int().positive(),
13917
- /**
13918
- * A second dimension inside the family: the model / step id for an inference
13919
- * timeout, so "which camera AND which model" is one read. Absent when the
13920
- * family has a single variant.
13921
- */
13922
- variant: string().optional(),
13923
- /**
13924
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13925
- * differencing two reads must drop the interval when it changes, because the
13926
- * counter restarted from zero in a respawned runner. Same discipline as
13927
- * `LoadContribution.startedAtMs`.
13928
- */
13929
- sinceMs: number(),
13930
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13931
- atMs: number(),
13932
- /**
13933
- * THE DENOMINATOR — every attempt on this path for this camera in the
13934
- * window. A failure count published without it is the mistake this schema
13935
- * exists to make impossible.
13936
- */
13937
- attempts: number().int().nonnegative(),
13938
- /** Attempts that landed. `attempts - succeeded` is the loss. */
13939
- succeeded: number().int().nonnegative(),
13940
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
13941
- reasons: array(FailureReasonCountSchema).readonly()
13942
- });
13943
- method(_void(), array(FailureContributionSchema).readonly());
13944
- var LoadContributionSchema = object({
13945
- role: _enum([
13946
- "decode",
13947
- "transcode",
13948
- "recording",
13949
- "streaming",
13950
- "detection"
13951
- ]),
13952
- /**
13953
- * The NUMERIC device id — the same value every log line carries as
13954
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13955
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
13956
- * contributor that cannot name its camera must not emit the entry at all,
13957
- * because an unnamed per-camera entry is indistinguishable from a shared one
13958
- * and would quietly turn one camera's cost into everybody's.
13959
- */
13960
- deviceId: number().int().positive().nullable(),
13961
- attribution: _enum([
13962
- "measured",
13963
- "accounted",
13964
- "unattributable"
13965
- ]),
13966
- /**
13967
- * What ONE entry is, in the contributor's own words — `615/high`,
13968
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13969
- * family and inventing a common one would lose the only information that
13970
- * makes two entries for the same camera distinguishable.
13971
- */
13972
- unit: string(),
13973
- /**
13974
- * The OS process this cost lives in, when there is one. Present so a
13975
- * consumer can (a) tell two generations of the same unit apart across a
13976
- * restart, and (b) subtract claimed processes from the node's process
13977
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13978
- * process of its own.
13979
- */
13980
- pid: number().int().positive().optional(),
13981
- /**
13982
- * When this generation started. The pid's incarnation marker: a consumer
13983
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13984
- * window when this changes, because the counter restarted from zero in a new
13985
- * process.
13986
- */
13987
- startedAtMs: number().optional(),
13988
- /**
13989
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13990
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
13991
- * contribution is asked for.
13992
- *
13993
- * Cumulative and not a rate on purpose: a rate needs a window, a window
13994
- * needs a sampler, and a new per-node sampler is the defect half of
13995
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13996
- * by whoever already keeps a history; a rate cannot be un-averaged.
13997
- *
13998
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13999
- * an entry with no process.
14000
- */
14001
- cpuSeconds: number().optional(),
14002
- /** Resident bytes of this unit's process, same source and same rules. */
14003
- rssBytes: number().optional()
14004
- });
14005
- method(_void(), array(LoadContributionSchema).readonly());
14006
- /**
14007
14007
  * `login-method` — collection cap through which auth addons contribute
14008
14008
  * their pre-auth login surfaces to the login page. This is the SINGLE,
14009
14009
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -18741,12 +18741,53 @@ var MediaFileKindEnum = _enum([
18741
18741
  "keyFrameSmall",
18742
18742
  "thumbnailSmall"
18743
18743
  ]);
18744
+ /**
18745
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
18746
+ * ARE — never the bytes themselves.
18747
+ *
18748
+ * ## Why `url` and not `base64`
18749
+ *
18750
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
18751
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
18752
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
18753
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
18754
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
18755
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
18756
+ *
18757
+ * `url` points at the `event-media` data plane
18758
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18759
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18760
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18761
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
18762
+ * no less protected than they were inside a `view`-level cap response — see
18763
+ * `data-plane-access.ts` for the rule and the one gap it does not close
18764
+ * (per-device scoping).
18765
+ *
18766
+ * The URL is built from the row's **stored** key, which is not always its
18767
+ * published `kind`: a track's face/plate crop is stored as `crop` under
18768
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
18769
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18770
+ *
18771
+ * ## `base64` is TRANSITIONAL and is going away
18772
+ *
18773
+ * It is still populated for one reason: the deployed viewer's track-detail
18774
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
18775
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
18776
+ * triangle — not as absence. Removing the field before that viewer ships is an
18777
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
18778
+ * delete this line and the `withBytes` pass-through in
18779
+ * `analytics-query-facade.ts`; nothing else reads it.
18780
+ */
18744
18781
  var MediaFileSchema = object({
18745
18782
  key: string(),
18746
18783
  kind: MediaFileKindEnum,
18747
- base64: string(),
18748
18784
  sizeBytes: number(),
18749
18785
  timestamp: number()
18786
+ }).extend({
18787
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
18788
+ url: string(),
18789
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
18790
+ base64: string()
18750
18791
  });
18751
18792
  /**
18752
18793
  * One media row WITHOUT its bytes.
@@ -18758,7 +18799,9 @@ var MediaFileSchema = object({
18758
18799
  * blocks the whole view.
18759
18800
  *
18760
18801
  * `sizeBytes` is carried because it is what lets a client decide between the
18761
- * stored blob and a `?variant=thumb` rendering without fetching either.
18802
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
18803
+ * `url` because a client that had to build the plane path itself is a second
18804
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
18762
18805
  */
18763
18806
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
18764
18807
  /**
@@ -19447,6 +19490,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19447
19490
  }), array(MediaFileSchema).readonly()), method(object({
19448
19491
  trackId: string(),
19449
19492
  deviceId: number()
19493
+ }), array(MediaFileInfoSchema).readonly()), method(object({
19494
+ eventId: string(),
19495
+ deviceId: number()
19450
19496
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
19451
19497
  kind: "mutation",
19452
19498
  auth: "admin"
@@ -24445,10 +24491,24 @@ var FaceClusterSchema = object({
24445
24491
  size: number().int(),
24446
24492
  cohesion: number()
24447
24493
  });
24494
+ /**
24495
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
24496
+ * are — never the bytes.
24497
+ *
24498
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
24499
+ * track/event contract) is still populated because a deployed viewer requires
24500
+ * the field to parse a row at all; this method has no such reader. Its ONE
24501
+ * caller is the admin UI's detail modal, which was building
24502
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
24503
+ * dialog already rendering its key FRAME from the `event-media` plane.
24504
+ *
24505
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
24506
+ * media key directly, so this needed no new plane and no new access decision.
24507
+ */
24448
24508
  var MediaFileLiteSchema$1 = object({
24449
24509
  key: string(),
24450
24510
  kind: string(),
24451
- base64: string(),
24511
+ url: string(),
24452
24512
  sizeBytes: number(),
24453
24513
  timestamp: number()
24454
24514
  });
@@ -27470,10 +27530,24 @@ var PlateInfoSchema = object({
27470
27530
  */
27471
27531
  cropUrl: string().optional()
27472
27532
  });
27533
+ /**
27534
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
27535
+ * are — never the bytes.
27536
+ *
27537
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
27538
+ * track/event contract) is still populated because a deployed viewer requires
27539
+ * the field to parse a row at all; this method has no such reader. Its ONE
27540
+ * caller is the admin UI's detail modal, which was building
27541
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
27542
+ * dialog already rendering its key FRAME from the `event-media` plane.
27543
+ *
27544
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
27545
+ * media key directly, so this needed no new plane and no new access decision.
27546
+ */
27473
27547
  var MediaFileLiteSchema = object({
27474
27548
  key: string(),
27475
27549
  kind: string(),
27476
- base64: string(),
27550
+ url: string(),
27477
27551
  sizeBytes: number(),
27478
27552
  timestamp: number()
27479
27553
  });
@@ -35370,6 +35444,12 @@ Object.freeze({
35370
35444
  addonId: null,
35371
35445
  access: "view"
35372
35446
  },
35447
+ "pipelineAnalytics.listEventMedia": {
35448
+ capName: "pipeline-analytics",
35449
+ capScope: "device",
35450
+ addonId: null,
35451
+ access: "view"
35452
+ },
35373
35453
  "pipelineAnalytics.listGroups": {
35374
35454
  capName: "pipeline-analytics",
35375
35455
  capScope: "device",
@@ -38993,6 +39073,11 @@ Object.freeze({
38993
39073
  form: "array",
38994
39074
  optional: false
38995
39075
  }],
39076
+ "pipelineAnalytics.listEventMedia": [{
39077
+ name: "deviceId",
39078
+ form: "single",
39079
+ optional: false
39080
+ }],
38996
39081
  "pipelineAnalytics.listGroups": [{
38997
39082
  name: "deviceIds",
38998
39083
  form: "array",
package/dist/addon.mjs CHANGED
@@ -13238,6 +13238,114 @@ method(object({
13238
13238
  height: number()
13239
13239
  }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
13240
13240
  /**
13241
+ * `failure-contribution` — the capability an addon reports its OWN losses
13242
+ * through, per camera, with the denominator attached. It stores nothing.
13243
+ *
13244
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13245
+ *
13246
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13247
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13248
+ * copied: the contributor reports what it already knows, hub-main adds only
13249
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13250
+ * somebody to forget to edit.
13251
+ *
13252
+ * They are not merged, because their invariants are opposites:
13253
+ *
13254
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13255
+ * claim a camera cost nothing, which is a measurement nobody made;
13256
+ * - a `failure-contribution` zero is the **most valuable value on the
13257
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13258
+ * and it is exactly what an absent entry cannot say.
13259
+ *
13260
+ * Putting a loss counter on a cost entry would also break the reconciliation
13261
+ * that gives `load-contribution` its point: contributions are subtracted from
13262
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13263
+ * has no process.
13264
+ *
13265
+ * ## Why not a log line, since the counters already exist
13266
+ *
13267
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13268
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13269
+ * ends in a log line, and a log line is the thing the operator asked to stop
13270
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13271
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13272
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13273
+ * media blackout were both diagnosed. The counters stay; this is where they can
13274
+ * be READ.
13275
+ *
13276
+ * ## The rate is served with its denominator or not at all
13277
+ *
13278
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13279
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13280
+ * than yesterday" and was **flat across twelve hours** once divided by the
13281
+ * successes on the same path. A surface that publishes only the numerator
13282
+ * reproduces that mistake on every read.
13283
+ *
13284
+ * ## Shape
13285
+ *
13286
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13287
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13288
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13289
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13290
+ * a forked runner's entries reach hub-main over transport that already exists.
13291
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13292
+ * result through `system.getFailureContributions`.
13293
+ */
13294
+ var FailureReasonCountSchema = object({
13295
+ /**
13296
+ * Why the attempt did not land, in the contributor's own vocabulary —
13297
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13298
+ * strings that already appear in this repo's logs and, where one exists, the
13299
+ * same string the per-track `previewMissReason` records (D276): a second
13300
+ * vocabulary for the same loss would make the row and the counter
13301
+ * un-joinable.
13302
+ */
13303
+ reason: string(),
13304
+ count: number().int().nonnegative()
13305
+ });
13306
+ var FailureContributionSchema = object({
13307
+ /**
13308
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13309
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13310
+ * `unit` free: the families are owned by different addons and a shared enum
13311
+ * is a central list that rots invisibly.
13312
+ */
13313
+ family: string(),
13314
+ /**
13315
+ * The NUMERIC device id — the same value every log line carries as
13316
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13317
+ * cannot name the camera must not emit the entry, because a fleet total
13318
+ * cannot answer the only question anybody asks of this surface.
13319
+ */
13320
+ deviceId: number().int().positive(),
13321
+ /**
13322
+ * A second dimension inside the family: the model / step id for an inference
13323
+ * timeout, so "which camera AND which model" is one read. Absent when the
13324
+ * family has a single variant.
13325
+ */
13326
+ variant: string().optional(),
13327
+ /**
13328
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13329
+ * differencing two reads must drop the interval when it changes, because the
13330
+ * counter restarted from zero in a respawned runner. Same discipline as
13331
+ * `LoadContribution.startedAtMs`.
13332
+ */
13333
+ sinceMs: number(),
13334
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13335
+ atMs: number(),
13336
+ /**
13337
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13338
+ * window. A failure count published without it is the mistake this schema
13339
+ * exists to make impossible.
13340
+ */
13341
+ attempts: number().int().nonnegative(),
13342
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13343
+ succeeded: number().int().nonnegative(),
13344
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13345
+ reasons: array(FailureReasonCountSchema).readonly()
13346
+ });
13347
+ method(_void(), array(FailureContributionSchema).readonly());
13348
+ /**
13241
13349
  * filesystem-browse — per-node capability for browsing the node's local
13242
13350
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
13243
13351
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -13759,6 +13867,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13759
13867
  kind: "mutation",
13760
13868
  auth: "admin"
13761
13869
  });
13870
+ var LoadContributionSchema = object({
13871
+ role: _enum([
13872
+ "decode",
13873
+ "transcode",
13874
+ "recording",
13875
+ "streaming",
13876
+ "detection"
13877
+ ]),
13878
+ /**
13879
+ * The NUMERIC device id — the same value every log line carries as
13880
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13881
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
13882
+ * contributor that cannot name its camera must not emit the entry at all,
13883
+ * because an unnamed per-camera entry is indistinguishable from a shared one
13884
+ * and would quietly turn one camera's cost into everybody's.
13885
+ */
13886
+ deviceId: number().int().positive().nullable(),
13887
+ attribution: _enum([
13888
+ "measured",
13889
+ "accounted",
13890
+ "unattributable"
13891
+ ]),
13892
+ /**
13893
+ * What ONE entry is, in the contributor's own words — `615/high`,
13894
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13895
+ * family and inventing a common one would lose the only information that
13896
+ * makes two entries for the same camera distinguishable.
13897
+ */
13898
+ unit: string(),
13899
+ /**
13900
+ * The OS process this cost lives in, when there is one. Present so a
13901
+ * consumer can (a) tell two generations of the same unit apart across a
13902
+ * restart, and (b) subtract claimed processes from the node's process
13903
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13904
+ * process of its own.
13905
+ */
13906
+ pid: number().int().positive().optional(),
13907
+ /**
13908
+ * When this generation started. The pid's incarnation marker: a consumer
13909
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13910
+ * window when this changes, because the counter restarted from zero in a new
13911
+ * process.
13912
+ */
13913
+ startedAtMs: number().optional(),
13914
+ /**
13915
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13916
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
13917
+ * contribution is asked for.
13918
+ *
13919
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
13920
+ * needs a sampler, and a new per-node sampler is the defect half of
13921
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13922
+ * by whoever already keeps a history; a rate cannot be un-averaged.
13923
+ *
13924
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13925
+ * an entry with no process.
13926
+ */
13927
+ cpuSeconds: number().optional(),
13928
+ /** Resident bytes of this unit's process, same source and same rules. */
13929
+ rssBytes: number().optional()
13930
+ });
13931
+ method(_void(), array(LoadContributionSchema).readonly());
13762
13932
  /**
13763
13933
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
13764
13934
  * through. It stores nothing.
@@ -13835,176 +14005,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
13835
14005
  tags: record(string(), string()).optional()
13836
14006
  }), array(LogEntrySchema).readonly());
13837
14007
  /**
13838
- * `failure-contribution` — the capability an addon reports its OWN losses
13839
- * through, per camera, with the denominator attached. It stores nothing.
13840
- *
13841
- * ## The twin of `load-contribution`, and why it is a twin and not a field
13842
- *
13843
- * `load-contribution` answers *what did this camera COST*. This answers *what
13844
- * did this camera LOSE*. The reporting discipline is identical and deliberately
13845
- * copied: the contributor reports what it already knows, hub-main adds only
13846
- * `addonId`, nothing needs global knowledge, and there is no central list for
13847
- * somebody to forget to edit.
13848
- *
13849
- * They are not merged, because their invariants are opposites:
13850
- *
13851
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
13852
- * claim a camera cost nothing, which is a measurement nobody made;
13853
- * - a `failure-contribution` zero is the **most valuable value on the
13854
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13855
- * and it is exactly what an absent entry cannot say.
13856
- *
13857
- * Putting a loss counter on a cost entry would also break the reconciliation
13858
- * that gives `load-contribution` its point: contributions are subtracted from
13859
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13860
- * has no process.
13861
- *
13862
- * ## Why not a log line, since the counters already exist
13863
- *
13864
- * Several of these paths already counted themselves — `CaptureScheduler`'s
13865
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13866
- * ends in a log line, and a log line is the thing the operator asked to stop
13867
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13868
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13869
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13870
- * media blackout were both diagnosed. The counters stay; this is where they can
13871
- * be READ.
13872
- *
13873
- * ## The rate is served with its denominator or not at all
13874
- *
13875
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
13876
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13877
- * than yesterday" and was **flat across twelve hours** once divided by the
13878
- * successes on the same path. A surface that publishes only the numerator
13879
- * reproduces that mistake on every read.
13880
- *
13881
- * ## Shape
13882
- *
13883
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13884
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13885
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13886
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13887
- * a forked runner's entries reach hub-main over transport that already exists.
13888
- * No new UDS message, no second registry (D3). The operator reads the assembled
13889
- * result through `system.getFailureContributions`.
13890
- */
13891
- var FailureReasonCountSchema = object({
13892
- /**
13893
- * Why the attempt did not land, in the contributor's own vocabulary —
13894
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13895
- * strings that already appear in this repo's logs and, where one exists, the
13896
- * same string the per-track `previewMissReason` records (D276): a second
13897
- * vocabulary for the same loss would make the row and the counter
13898
- * un-joinable.
13899
- */
13900
- reason: string(),
13901
- count: number().int().nonnegative()
13902
- });
13903
- var FailureContributionSchema = object({
13904
- /**
13905
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13906
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13907
- * `unit` free: the families are owned by different addons and a shared enum
13908
- * is a central list that rots invisibly.
13909
- */
13910
- family: string(),
13911
- /**
13912
- * The NUMERIC device id — the same value every log line carries as
13913
- * `tags.deviceId`. Never nullable and never absent: a contributor that
13914
- * cannot name the camera must not emit the entry, because a fleet total
13915
- * cannot answer the only question anybody asks of this surface.
13916
- */
13917
- deviceId: number().int().positive(),
13918
- /**
13919
- * A second dimension inside the family: the model / step id for an inference
13920
- * timeout, so "which camera AND which model" is one read. Absent when the
13921
- * family has a single variant.
13922
- */
13923
- variant: string().optional(),
13924
- /**
13925
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13926
- * differencing two reads must drop the interval when it changes, because the
13927
- * counter restarted from zero in a respawned runner. Same discipline as
13928
- * `LoadContribution.startedAtMs`.
13929
- */
13930
- sinceMs: number(),
13931
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13932
- atMs: number(),
13933
- /**
13934
- * THE DENOMINATOR — every attempt on this path for this camera in the
13935
- * window. A failure count published without it is the mistake this schema
13936
- * exists to make impossible.
13937
- */
13938
- attempts: number().int().nonnegative(),
13939
- /** Attempts that landed. `attempts - succeeded` is the loss. */
13940
- succeeded: number().int().nonnegative(),
13941
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
13942
- reasons: array(FailureReasonCountSchema).readonly()
13943
- });
13944
- method(_void(), array(FailureContributionSchema).readonly());
13945
- var LoadContributionSchema = object({
13946
- role: _enum([
13947
- "decode",
13948
- "transcode",
13949
- "recording",
13950
- "streaming",
13951
- "detection"
13952
- ]),
13953
- /**
13954
- * The NUMERIC device id — the same value every log line carries as
13955
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13956
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
13957
- * contributor that cannot name its camera must not emit the entry at all,
13958
- * because an unnamed per-camera entry is indistinguishable from a shared one
13959
- * and would quietly turn one camera's cost into everybody's.
13960
- */
13961
- deviceId: number().int().positive().nullable(),
13962
- attribution: _enum([
13963
- "measured",
13964
- "accounted",
13965
- "unattributable"
13966
- ]),
13967
- /**
13968
- * What ONE entry is, in the contributor's own words — `615/high`,
13969
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13970
- * family and inventing a common one would lose the only information that
13971
- * makes two entries for the same camera distinguishable.
13972
- */
13973
- unit: string(),
13974
- /**
13975
- * The OS process this cost lives in, when there is one. Present so a
13976
- * consumer can (a) tell two generations of the same unit apart across a
13977
- * restart, and (b) subtract claimed processes from the node's process
13978
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13979
- * process of its own.
13980
- */
13981
- pid: number().int().positive().optional(),
13982
- /**
13983
- * When this generation started. The pid's incarnation marker: a consumer
13984
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13985
- * window when this changes, because the counter restarted from zero in a new
13986
- * process.
13987
- */
13988
- startedAtMs: number().optional(),
13989
- /**
13990
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13991
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
13992
- * contribution is asked for.
13993
- *
13994
- * Cumulative and not a rate on purpose: a rate needs a window, a window
13995
- * needs a sampler, and a new per-node sampler is the defect half of
13996
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13997
- * by whoever already keeps a history; a rate cannot be un-averaged.
13998
- *
13999
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
14000
- * an entry with no process.
14001
- */
14002
- cpuSeconds: number().optional(),
14003
- /** Resident bytes of this unit's process, same source and same rules. */
14004
- rssBytes: number().optional()
14005
- });
14006
- method(_void(), array(LoadContributionSchema).readonly());
14007
- /**
14008
14008
  * `login-method` — collection cap through which auth addons contribute
14009
14009
  * their pre-auth login surfaces to the login page. This is the SINGLE,
14010
14010
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -18742,12 +18742,53 @@ var MediaFileKindEnum = _enum([
18742
18742
  "keyFrameSmall",
18743
18743
  "thumbnailSmall"
18744
18744
  ]);
18745
+ /**
18746
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
18747
+ * ARE — never the bytes themselves.
18748
+ *
18749
+ * ## Why `url` and not `base64`
18750
+ *
18751
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
18752
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
18753
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
18754
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
18755
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
18756
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
18757
+ *
18758
+ * `url` points at the `event-media` data plane
18759
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18760
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18761
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18762
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
18763
+ * no less protected than they were inside a `view`-level cap response — see
18764
+ * `data-plane-access.ts` for the rule and the one gap it does not close
18765
+ * (per-device scoping).
18766
+ *
18767
+ * The URL is built from the row's **stored** key, which is not always its
18768
+ * published `kind`: a track's face/plate crop is stored as `crop` under
18769
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
18770
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18771
+ *
18772
+ * ## `base64` is TRANSITIONAL and is going away
18773
+ *
18774
+ * It is still populated for one reason: the deployed viewer's track-detail
18775
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
18776
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
18777
+ * triangle — not as absence. Removing the field before that viewer ships is an
18778
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
18779
+ * delete this line and the `withBytes` pass-through in
18780
+ * `analytics-query-facade.ts`; nothing else reads it.
18781
+ */
18745
18782
  var MediaFileSchema = object({
18746
18783
  key: string(),
18747
18784
  kind: MediaFileKindEnum,
18748
- base64: string(),
18749
18785
  sizeBytes: number(),
18750
18786
  timestamp: number()
18787
+ }).extend({
18788
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
18789
+ url: string(),
18790
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
18791
+ base64: string()
18751
18792
  });
18752
18793
  /**
18753
18794
  * One media row WITHOUT its bytes.
@@ -18759,7 +18800,9 @@ var MediaFileSchema = object({
18759
18800
  * blocks the whole view.
18760
18801
  *
18761
18802
  * `sizeBytes` is carried because it is what lets a client decide between the
18762
- * stored blob and a `?variant=thumb` rendering without fetching either.
18803
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
18804
+ * `url` because a client that had to build the plane path itself is a second
18805
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
18763
18806
  */
18764
18807
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
18765
18808
  /**
@@ -19448,6 +19491,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19448
19491
  }), array(MediaFileSchema).readonly()), method(object({
19449
19492
  trackId: string(),
19450
19493
  deviceId: number()
19494
+ }), array(MediaFileInfoSchema).readonly()), method(object({
19495
+ eventId: string(),
19496
+ deviceId: number()
19451
19497
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
19452
19498
  kind: "mutation",
19453
19499
  auth: "admin"
@@ -24446,10 +24492,24 @@ var FaceClusterSchema = object({
24446
24492
  size: number().int(),
24447
24493
  cohesion: number()
24448
24494
  });
24495
+ /**
24496
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
24497
+ * are — never the bytes.
24498
+ *
24499
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
24500
+ * track/event contract) is still populated because a deployed viewer requires
24501
+ * the field to parse a row at all; this method has no such reader. Its ONE
24502
+ * caller is the admin UI's detail modal, which was building
24503
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
24504
+ * dialog already rendering its key FRAME from the `event-media` plane.
24505
+ *
24506
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
24507
+ * media key directly, so this needed no new plane and no new access decision.
24508
+ */
24449
24509
  var MediaFileLiteSchema$1 = object({
24450
24510
  key: string(),
24451
24511
  kind: string(),
24452
- base64: string(),
24512
+ url: string(),
24453
24513
  sizeBytes: number(),
24454
24514
  timestamp: number()
24455
24515
  });
@@ -27471,10 +27531,24 @@ var PlateInfoSchema = object({
27471
27531
  */
27472
27532
  cropUrl: string().optional()
27473
27533
  });
27534
+ /**
27535
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
27536
+ * are — never the bytes.
27537
+ *
27538
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
27539
+ * track/event contract) is still populated because a deployed viewer requires
27540
+ * the field to parse a row at all; this method has no such reader. Its ONE
27541
+ * caller is the admin UI's detail modal, which was building
27542
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
27543
+ * dialog already rendering its key FRAME from the `event-media` plane.
27544
+ *
27545
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
27546
+ * media key directly, so this needed no new plane and no new access decision.
27547
+ */
27474
27548
  var MediaFileLiteSchema = object({
27475
27549
  key: string(),
27476
27550
  kind: string(),
27477
- base64: string(),
27551
+ url: string(),
27478
27552
  sizeBytes: number(),
27479
27553
  timestamp: number()
27480
27554
  });
@@ -35371,6 +35445,12 @@ Object.freeze({
35371
35445
  addonId: null,
35372
35446
  access: "view"
35373
35447
  },
35448
+ "pipelineAnalytics.listEventMedia": {
35449
+ capName: "pipeline-analytics",
35450
+ capScope: "device",
35451
+ addonId: null,
35452
+ access: "view"
35453
+ },
35374
35454
  "pipelineAnalytics.listGroups": {
35375
35455
  capName: "pipeline-analytics",
35376
35456
  capScope: "device",
@@ -38994,6 +39074,11 @@ Object.freeze({
38994
39074
  form: "array",
38995
39075
  optional: false
38996
39076
  }],
39077
+ "pipelineAnalytics.listEventMedia": [{
39078
+ name: "deviceId",
39079
+ form: "single",
39080
+ optional: false
39081
+ }],
38997
39082
  "pipelineAnalytics.listGroups": [{
38998
39083
  name: "deviceIds",
38999
39084
  form: "array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-dreo",
3
- "version": "0.2.46",
3
+ "version": "0.2.47",
4
4
  "description": "Dreo smart-device (fan / air-circulator / purifier / heater / humidifier) device-provider addon for CamStack — wraps the @apocaliss92/nodedreo Dreo cloud client (REST + WebSocket)",
5
5
  "keywords": [
6
6
  "camstack",