@camstack/addon-provider-onvif 1.2.45 → 1.2.46

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
@@ -12974,6 +12974,114 @@ method(object({
12974
12974
  height: number()
12975
12975
  }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
12976
12976
  /**
12977
+ * `failure-contribution` — the capability an addon reports its OWN losses
12978
+ * through, per camera, with the denominator attached. It stores nothing.
12979
+ *
12980
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
12981
+ *
12982
+ * `load-contribution` answers *what did this camera COST*. This answers *what
12983
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
12984
+ * copied: the contributor reports what it already knows, hub-main adds only
12985
+ * `addonId`, nothing needs global knowledge, and there is no central list for
12986
+ * somebody to forget to edit.
12987
+ *
12988
+ * They are not merged, because their invariants are opposites:
12989
+ *
12990
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
12991
+ * claim a camera cost nothing, which is a measurement nobody made;
12992
+ * - a `failure-contribution` zero is the **most valuable value on the
12993
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
12994
+ * and it is exactly what an absent entry cannot say.
12995
+ *
12996
+ * Putting a loss counter on a cost entry would also break the reconciliation
12997
+ * that gives `load-contribution` its point: contributions are subtracted from
12998
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
12999
+ * has no process.
13000
+ *
13001
+ * ## Why not a log line, since the counters already exist
13002
+ *
13003
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13004
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13005
+ * ends in a log line, and a log line is the thing the operator asked to stop
13006
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13007
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13008
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13009
+ * media blackout were both diagnosed. The counters stay; this is where they can
13010
+ * be READ.
13011
+ *
13012
+ * ## The rate is served with its denominator or not at all
13013
+ *
13014
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13015
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13016
+ * than yesterday" and was **flat across twelve hours** once divided by the
13017
+ * successes on the same path. A surface that publishes only the numerator
13018
+ * reproduces that mistake on every read.
13019
+ *
13020
+ * ## Shape
13021
+ *
13022
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13023
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13024
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13025
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13026
+ * a forked runner's entries reach hub-main over transport that already exists.
13027
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13028
+ * result through `system.getFailureContributions`.
13029
+ */
13030
+ var FailureReasonCountSchema = object({
13031
+ /**
13032
+ * Why the attempt did not land, in the contributor's own vocabulary —
13033
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13034
+ * strings that already appear in this repo's logs and, where one exists, the
13035
+ * same string the per-track `previewMissReason` records (D276): a second
13036
+ * vocabulary for the same loss would make the row and the counter
13037
+ * un-joinable.
13038
+ */
13039
+ reason: string(),
13040
+ count: number().int().nonnegative()
13041
+ });
13042
+ var FailureContributionSchema = object({
13043
+ /**
13044
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13045
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13046
+ * `unit` free: the families are owned by different addons and a shared enum
13047
+ * is a central list that rots invisibly.
13048
+ */
13049
+ family: string(),
13050
+ /**
13051
+ * The NUMERIC device id — the same value every log line carries as
13052
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13053
+ * cannot name the camera must not emit the entry, because a fleet total
13054
+ * cannot answer the only question anybody asks of this surface.
13055
+ */
13056
+ deviceId: number().int().positive(),
13057
+ /**
13058
+ * A second dimension inside the family: the model / step id for an inference
13059
+ * timeout, so "which camera AND which model" is one read. Absent when the
13060
+ * family has a single variant.
13061
+ */
13062
+ variant: string().optional(),
13063
+ /**
13064
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13065
+ * differencing two reads must drop the interval when it changes, because the
13066
+ * counter restarted from zero in a respawned runner. Same discipline as
13067
+ * `LoadContribution.startedAtMs`.
13068
+ */
13069
+ sinceMs: number(),
13070
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13071
+ atMs: number(),
13072
+ /**
13073
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13074
+ * window. A failure count published without it is the mistake this schema
13075
+ * exists to make impossible.
13076
+ */
13077
+ attempts: number().int().nonnegative(),
13078
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13079
+ succeeded: number().int().nonnegative(),
13080
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13081
+ reasons: array(FailureReasonCountSchema).readonly()
13082
+ });
13083
+ method(_void(), array(FailureContributionSchema).readonly());
13084
+ /**
12977
13085
  * filesystem-browse — per-node capability for browsing the node's local
12978
13086
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12979
13087
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -13495,6 +13603,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13495
13603
  kind: "mutation",
13496
13604
  auth: "admin"
13497
13605
  });
13606
+ var LoadContributionSchema = object({
13607
+ role: _enum([
13608
+ "decode",
13609
+ "transcode",
13610
+ "recording",
13611
+ "streaming",
13612
+ "detection"
13613
+ ]),
13614
+ /**
13615
+ * The NUMERIC device id — the same value every log line carries as
13616
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13617
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
13618
+ * contributor that cannot name its camera must not emit the entry at all,
13619
+ * because an unnamed per-camera entry is indistinguishable from a shared one
13620
+ * and would quietly turn one camera's cost into everybody's.
13621
+ */
13622
+ deviceId: number().int().positive().nullable(),
13623
+ attribution: _enum([
13624
+ "measured",
13625
+ "accounted",
13626
+ "unattributable"
13627
+ ]),
13628
+ /**
13629
+ * What ONE entry is, in the contributor's own words — `615/high`,
13630
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13631
+ * family and inventing a common one would lose the only information that
13632
+ * makes two entries for the same camera distinguishable.
13633
+ */
13634
+ unit: string(),
13635
+ /**
13636
+ * The OS process this cost lives in, when there is one. Present so a
13637
+ * consumer can (a) tell two generations of the same unit apart across a
13638
+ * restart, and (b) subtract claimed processes from the node's process
13639
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13640
+ * process of its own.
13641
+ */
13642
+ pid: number().int().positive().optional(),
13643
+ /**
13644
+ * When this generation started. The pid's incarnation marker: a consumer
13645
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13646
+ * window when this changes, because the counter restarted from zero in a new
13647
+ * process.
13648
+ */
13649
+ startedAtMs: number().optional(),
13650
+ /**
13651
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13652
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
13653
+ * contribution is asked for.
13654
+ *
13655
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
13656
+ * needs a sampler, and a new per-node sampler is the defect half of
13657
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13658
+ * by whoever already keeps a history; a rate cannot be un-averaged.
13659
+ *
13660
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13661
+ * an entry with no process.
13662
+ */
13663
+ cpuSeconds: number().optional(),
13664
+ /** Resident bytes of this unit's process, same source and same rules. */
13665
+ rssBytes: number().optional()
13666
+ });
13667
+ method(_void(), array(LoadContributionSchema).readonly());
13498
13668
  /**
13499
13669
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
13500
13670
  * through. It stores nothing.
@@ -13571,176 +13741,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
13571
13741
  tags: record(string(), string()).optional()
13572
13742
  }), array(LogEntrySchema).readonly());
13573
13743
  /**
13574
- * `failure-contribution` — the capability an addon reports its OWN losses
13575
- * through, per camera, with the denominator attached. It stores nothing.
13576
- *
13577
- * ## The twin of `load-contribution`, and why it is a twin and not a field
13578
- *
13579
- * `load-contribution` answers *what did this camera COST*. This answers *what
13580
- * did this camera LOSE*. The reporting discipline is identical and deliberately
13581
- * copied: the contributor reports what it already knows, hub-main adds only
13582
- * `addonId`, nothing needs global knowledge, and there is no central list for
13583
- * somebody to forget to edit.
13584
- *
13585
- * They are not merged, because their invariants are opposites:
13586
- *
13587
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
13588
- * claim a camera cost nothing, which is a measurement nobody made;
13589
- * - a `failure-contribution` zero is the **most valuable value on the
13590
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13591
- * and it is exactly what an absent entry cannot say.
13592
- *
13593
- * Putting a loss counter on a cost entry would also break the reconciliation
13594
- * that gives `load-contribution` its point: contributions are subtracted from
13595
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13596
- * has no process.
13597
- *
13598
- * ## Why not a log line, since the counters already exist
13599
- *
13600
- * Several of these paths already counted themselves — `CaptureScheduler`'s
13601
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13602
- * ends in a log line, and a log line is the thing the operator asked to stop
13603
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13604
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13605
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13606
- * media blackout were both diagnosed. The counters stay; this is where they can
13607
- * be READ.
13608
- *
13609
- * ## The rate is served with its denominator or not at all
13610
- *
13611
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
13612
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13613
- * than yesterday" and was **flat across twelve hours** once divided by the
13614
- * successes on the same path. A surface that publishes only the numerator
13615
- * reproduces that mistake on every read.
13616
- *
13617
- * ## Shape
13618
- *
13619
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13620
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13621
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13622
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13623
- * a forked runner's entries reach hub-main over transport that already exists.
13624
- * No new UDS message, no second registry (D3). The operator reads the assembled
13625
- * result through `system.getFailureContributions`.
13626
- */
13627
- var FailureReasonCountSchema = object({
13628
- /**
13629
- * Why the attempt did not land, in the contributor's own vocabulary —
13630
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13631
- * strings that already appear in this repo's logs and, where one exists, the
13632
- * same string the per-track `previewMissReason` records (D276): a second
13633
- * vocabulary for the same loss would make the row and the counter
13634
- * un-joinable.
13635
- */
13636
- reason: string(),
13637
- count: number().int().nonnegative()
13638
- });
13639
- var FailureContributionSchema = object({
13640
- /**
13641
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13642
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13643
- * `unit` free: the families are owned by different addons and a shared enum
13644
- * is a central list that rots invisibly.
13645
- */
13646
- family: string(),
13647
- /**
13648
- * The NUMERIC device id — the same value every log line carries as
13649
- * `tags.deviceId`. Never nullable and never absent: a contributor that
13650
- * cannot name the camera must not emit the entry, because a fleet total
13651
- * cannot answer the only question anybody asks of this surface.
13652
- */
13653
- deviceId: number().int().positive(),
13654
- /**
13655
- * A second dimension inside the family: the model / step id for an inference
13656
- * timeout, so "which camera AND which model" is one read. Absent when the
13657
- * family has a single variant.
13658
- */
13659
- variant: string().optional(),
13660
- /**
13661
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13662
- * differencing two reads must drop the interval when it changes, because the
13663
- * counter restarted from zero in a respawned runner. Same discipline as
13664
- * `LoadContribution.startedAtMs`.
13665
- */
13666
- sinceMs: number(),
13667
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13668
- atMs: number(),
13669
- /**
13670
- * THE DENOMINATOR — every attempt on this path for this camera in the
13671
- * window. A failure count published without it is the mistake this schema
13672
- * exists to make impossible.
13673
- */
13674
- attempts: number().int().nonnegative(),
13675
- /** Attempts that landed. `attempts - succeeded` is the loss. */
13676
- succeeded: number().int().nonnegative(),
13677
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
13678
- reasons: array(FailureReasonCountSchema).readonly()
13679
- });
13680
- method(_void(), array(FailureContributionSchema).readonly());
13681
- var LoadContributionSchema = object({
13682
- role: _enum([
13683
- "decode",
13684
- "transcode",
13685
- "recording",
13686
- "streaming",
13687
- "detection"
13688
- ]),
13689
- /**
13690
- * The NUMERIC device id — the same value every log line carries as
13691
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13692
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
13693
- * contributor that cannot name its camera must not emit the entry at all,
13694
- * because an unnamed per-camera entry is indistinguishable from a shared one
13695
- * and would quietly turn one camera's cost into everybody's.
13696
- */
13697
- deviceId: number().int().positive().nullable(),
13698
- attribution: _enum([
13699
- "measured",
13700
- "accounted",
13701
- "unattributable"
13702
- ]),
13703
- /**
13704
- * What ONE entry is, in the contributor's own words — `615/high`,
13705
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13706
- * family and inventing a common one would lose the only information that
13707
- * makes two entries for the same camera distinguishable.
13708
- */
13709
- unit: string(),
13710
- /**
13711
- * The OS process this cost lives in, when there is one. Present so a
13712
- * consumer can (a) tell two generations of the same unit apart across a
13713
- * restart, and (b) subtract claimed processes from the node's process
13714
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13715
- * process of its own.
13716
- */
13717
- pid: number().int().positive().optional(),
13718
- /**
13719
- * When this generation started. The pid's incarnation marker: a consumer
13720
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13721
- * window when this changes, because the counter restarted from zero in a new
13722
- * process.
13723
- */
13724
- startedAtMs: number().optional(),
13725
- /**
13726
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13727
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
13728
- * contribution is asked for.
13729
- *
13730
- * Cumulative and not a rate on purpose: a rate needs a window, a window
13731
- * needs a sampler, and a new per-node sampler is the defect half of
13732
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13733
- * by whoever already keeps a history; a rate cannot be un-averaged.
13734
- *
13735
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13736
- * an entry with no process.
13737
- */
13738
- cpuSeconds: number().optional(),
13739
- /** Resident bytes of this unit's process, same source and same rules. */
13740
- rssBytes: number().optional()
13741
- });
13742
- method(_void(), array(LoadContributionSchema).readonly());
13743
- /**
13744
13744
  * `login-method` — collection cap through which auth addons contribute
13745
13745
  * their pre-auth login surfaces to the login page. This is the SINGLE,
13746
13746
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -18400,12 +18400,53 @@ var MediaFileKindEnum = _enum([
18400
18400
  "keyFrameSmall",
18401
18401
  "thumbnailSmall"
18402
18402
  ]);
18403
+ /**
18404
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
18405
+ * ARE — never the bytes themselves.
18406
+ *
18407
+ * ## Why `url` and not `base64`
18408
+ *
18409
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
18410
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
18411
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
18412
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
18413
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
18414
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
18415
+ *
18416
+ * `url` points at the `event-media` data plane
18417
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18418
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18419
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18420
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
18421
+ * no less protected than they were inside a `view`-level cap response — see
18422
+ * `data-plane-access.ts` for the rule and the one gap it does not close
18423
+ * (per-device scoping).
18424
+ *
18425
+ * The URL is built from the row's **stored** key, which is not always its
18426
+ * published `kind`: a track's face/plate crop is stored as `crop` under
18427
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
18428
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18429
+ *
18430
+ * ## `base64` is TRANSITIONAL and is going away
18431
+ *
18432
+ * It is still populated for one reason: the deployed viewer's track-detail
18433
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
18434
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
18435
+ * triangle — not as absence. Removing the field before that viewer ships is an
18436
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
18437
+ * delete this line and the `withBytes` pass-through in
18438
+ * `analytics-query-facade.ts`; nothing else reads it.
18439
+ */
18403
18440
  var MediaFileSchema = object({
18404
18441
  key: string(),
18405
18442
  kind: MediaFileKindEnum,
18406
- base64: string(),
18407
18443
  sizeBytes: number(),
18408
18444
  timestamp: number()
18445
+ }).extend({
18446
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
18447
+ url: string(),
18448
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
18449
+ base64: string()
18409
18450
  });
18410
18451
  /**
18411
18452
  * One media row WITHOUT its bytes.
@@ -18417,7 +18458,9 @@ var MediaFileSchema = object({
18417
18458
  * blocks the whole view.
18418
18459
  *
18419
18460
  * `sizeBytes` is carried because it is what lets a client decide between the
18420
- * stored blob and a `?variant=thumb` rendering without fetching either.
18461
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
18462
+ * `url` because a client that had to build the plane path itself is a second
18463
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
18421
18464
  */
18422
18465
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
18423
18466
  /**
@@ -19106,6 +19149,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19106
19149
  }), array(MediaFileSchema).readonly()), method(object({
19107
19150
  trackId: string(),
19108
19151
  deviceId: number()
19152
+ }), array(MediaFileInfoSchema).readonly()), method(object({
19153
+ eventId: string(),
19154
+ deviceId: number()
19109
19155
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
19110
19156
  kind: "mutation",
19111
19157
  auth: "admin"
@@ -23470,10 +23516,24 @@ var FaceClusterSchema = object({
23470
23516
  size: number().int(),
23471
23517
  cohesion: number()
23472
23518
  });
23519
+ /**
23520
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
23521
+ * are — never the bytes.
23522
+ *
23523
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
23524
+ * track/event contract) is still populated because a deployed viewer requires
23525
+ * the field to parse a row at all; this method has no such reader. Its ONE
23526
+ * caller is the admin UI's detail modal, which was building
23527
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
23528
+ * dialog already rendering its key FRAME from the `event-media` plane.
23529
+ *
23530
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
23531
+ * media key directly, so this needed no new plane and no new access decision.
23532
+ */
23473
23533
  var MediaFileLiteSchema$1 = object({
23474
23534
  key: string(),
23475
23535
  kind: string(),
23476
- base64: string(),
23536
+ url: string(),
23477
23537
  sizeBytes: number(),
23478
23538
  timestamp: number()
23479
23539
  });
@@ -25725,10 +25785,24 @@ var PlateInfoSchema = object({
25725
25785
  */
25726
25786
  cropUrl: string().optional()
25727
25787
  });
25788
+ /**
25789
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
25790
+ * are — never the bytes.
25791
+ *
25792
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
25793
+ * track/event contract) is still populated because a deployed viewer requires
25794
+ * the field to parse a row at all; this method has no such reader. Its ONE
25795
+ * caller is the admin UI's detail modal, which was building
25796
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
25797
+ * dialog already rendering its key FRAME from the `event-media` plane.
25798
+ *
25799
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
25800
+ * media key directly, so this needed no new plane and no new access decision.
25801
+ */
25728
25802
  var MediaFileLiteSchema = object({
25729
25803
  key: string(),
25730
25804
  kind: string(),
25731
- base64: string(),
25805
+ url: string(),
25732
25806
  sizeBytes: number(),
25733
25807
  timestamp: number()
25734
25808
  });
@@ -32193,6 +32267,12 @@ Object.freeze({
32193
32267
  addonId: null,
32194
32268
  access: "view"
32195
32269
  },
32270
+ "pipelineAnalytics.listEventMedia": {
32271
+ capName: "pipeline-analytics",
32272
+ capScope: "device",
32273
+ addonId: null,
32274
+ access: "view"
32275
+ },
32196
32276
  "pipelineAnalytics.listGroups": {
32197
32277
  capName: "pipeline-analytics",
32198
32278
  capScope: "device",
@@ -35816,6 +35896,11 @@ Object.freeze({
35816
35896
  form: "array",
35817
35897
  optional: false
35818
35898
  }],
35899
+ "pipelineAnalytics.listEventMedia": [{
35900
+ name: "deviceId",
35901
+ form: "single",
35902
+ optional: false
35903
+ }],
35819
35904
  "pipelineAnalytics.listGroups": [{
35820
35905
  name: "deviceIds",
35821
35906
  form: "array",
package/dist/addon.mjs CHANGED
@@ -12975,6 +12975,114 @@ method(object({
12975
12975
  height: number()
12976
12976
  }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
12977
12977
  /**
12978
+ * `failure-contribution` — the capability an addon reports its OWN losses
12979
+ * through, per camera, with the denominator attached. It stores nothing.
12980
+ *
12981
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
12982
+ *
12983
+ * `load-contribution` answers *what did this camera COST*. This answers *what
12984
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
12985
+ * copied: the contributor reports what it already knows, hub-main adds only
12986
+ * `addonId`, nothing needs global knowledge, and there is no central list for
12987
+ * somebody to forget to edit.
12988
+ *
12989
+ * They are not merged, because their invariants are opposites:
12990
+ *
12991
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
12992
+ * claim a camera cost nothing, which is a measurement nobody made;
12993
+ * - a `failure-contribution` zero is the **most valuable value on the
12994
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
12995
+ * and it is exactly what an absent entry cannot say.
12996
+ *
12997
+ * Putting a loss counter on a cost entry would also break the reconciliation
12998
+ * that gives `load-contribution` its point: contributions are subtracted from
12999
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13000
+ * has no process.
13001
+ *
13002
+ * ## Why not a log line, since the counters already exist
13003
+ *
13004
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13005
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13006
+ * ends in a log line, and a log line is the thing the operator asked to stop
13007
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13008
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13009
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13010
+ * media blackout were both diagnosed. The counters stay; this is where they can
13011
+ * be READ.
13012
+ *
13013
+ * ## The rate is served with its denominator or not at all
13014
+ *
13015
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13016
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13017
+ * than yesterday" and was **flat across twelve hours** once divided by the
13018
+ * successes on the same path. A surface that publishes only the numerator
13019
+ * reproduces that mistake on every read.
13020
+ *
13021
+ * ## Shape
13022
+ *
13023
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13024
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13025
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13026
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13027
+ * a forked runner's entries reach hub-main over transport that already exists.
13028
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13029
+ * result through `system.getFailureContributions`.
13030
+ */
13031
+ var FailureReasonCountSchema = object({
13032
+ /**
13033
+ * Why the attempt did not land, in the contributor's own vocabulary —
13034
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13035
+ * strings that already appear in this repo's logs and, where one exists, the
13036
+ * same string the per-track `previewMissReason` records (D276): a second
13037
+ * vocabulary for the same loss would make the row and the counter
13038
+ * un-joinable.
13039
+ */
13040
+ reason: string(),
13041
+ count: number().int().nonnegative()
13042
+ });
13043
+ var FailureContributionSchema = object({
13044
+ /**
13045
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13046
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13047
+ * `unit` free: the families are owned by different addons and a shared enum
13048
+ * is a central list that rots invisibly.
13049
+ */
13050
+ family: string(),
13051
+ /**
13052
+ * The NUMERIC device id — the same value every log line carries as
13053
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13054
+ * cannot name the camera must not emit the entry, because a fleet total
13055
+ * cannot answer the only question anybody asks of this surface.
13056
+ */
13057
+ deviceId: number().int().positive(),
13058
+ /**
13059
+ * A second dimension inside the family: the model / step id for an inference
13060
+ * timeout, so "which camera AND which model" is one read. Absent when the
13061
+ * family has a single variant.
13062
+ */
13063
+ variant: string().optional(),
13064
+ /**
13065
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13066
+ * differencing two reads must drop the interval when it changes, because the
13067
+ * counter restarted from zero in a respawned runner. Same discipline as
13068
+ * `LoadContribution.startedAtMs`.
13069
+ */
13070
+ sinceMs: number(),
13071
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13072
+ atMs: number(),
13073
+ /**
13074
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13075
+ * window. A failure count published without it is the mistake this schema
13076
+ * exists to make impossible.
13077
+ */
13078
+ attempts: number().int().nonnegative(),
13079
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13080
+ succeeded: number().int().nonnegative(),
13081
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13082
+ reasons: array(FailureReasonCountSchema).readonly()
13083
+ });
13084
+ method(_void(), array(FailureContributionSchema).readonly());
13085
+ /**
12978
13086
  * filesystem-browse — per-node capability for browsing the node's local
12979
13087
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
12980
13088
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -13496,6 +13604,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13496
13604
  kind: "mutation",
13497
13605
  auth: "admin"
13498
13606
  });
13607
+ var LoadContributionSchema = object({
13608
+ role: _enum([
13609
+ "decode",
13610
+ "transcode",
13611
+ "recording",
13612
+ "streaming",
13613
+ "detection"
13614
+ ]),
13615
+ /**
13616
+ * The NUMERIC device id — the same value every log line carries as
13617
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13618
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
13619
+ * contributor that cannot name its camera must not emit the entry at all,
13620
+ * because an unnamed per-camera entry is indistinguishable from a shared one
13621
+ * and would quietly turn one camera's cost into everybody's.
13622
+ */
13623
+ deviceId: number().int().positive().nullable(),
13624
+ attribution: _enum([
13625
+ "measured",
13626
+ "accounted",
13627
+ "unattributable"
13628
+ ]),
13629
+ /**
13630
+ * What ONE entry is, in the contributor's own words — `615/high`,
13631
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13632
+ * family and inventing a common one would lose the only information that
13633
+ * makes two entries for the same camera distinguishable.
13634
+ */
13635
+ unit: string(),
13636
+ /**
13637
+ * The OS process this cost lives in, when there is one. Present so a
13638
+ * consumer can (a) tell two generations of the same unit apart across a
13639
+ * restart, and (b) subtract claimed processes from the node's process
13640
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13641
+ * process of its own.
13642
+ */
13643
+ pid: number().int().positive().optional(),
13644
+ /**
13645
+ * When this generation started. The pid's incarnation marker: a consumer
13646
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13647
+ * window when this changes, because the counter restarted from zero in a new
13648
+ * process.
13649
+ */
13650
+ startedAtMs: number().optional(),
13651
+ /**
13652
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13653
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
13654
+ * contribution is asked for.
13655
+ *
13656
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
13657
+ * needs a sampler, and a new per-node sampler is the defect half of
13658
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13659
+ * by whoever already keeps a history; a rate cannot be un-averaged.
13660
+ *
13661
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13662
+ * an entry with no process.
13663
+ */
13664
+ cpuSeconds: number().optional(),
13665
+ /** Resident bytes of this unit's process, same source and same rules. */
13666
+ rssBytes: number().optional()
13667
+ });
13668
+ method(_void(), array(LoadContributionSchema).readonly());
13499
13669
  /**
13500
13670
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
13501
13671
  * through. It stores nothing.
@@ -13572,176 +13742,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
13572
13742
  tags: record(string(), string()).optional()
13573
13743
  }), array(LogEntrySchema).readonly());
13574
13744
  /**
13575
- * `failure-contribution` — the capability an addon reports its OWN losses
13576
- * through, per camera, with the denominator attached. It stores nothing.
13577
- *
13578
- * ## The twin of `load-contribution`, and why it is a twin and not a field
13579
- *
13580
- * `load-contribution` answers *what did this camera COST*. This answers *what
13581
- * did this camera LOSE*. The reporting discipline is identical and deliberately
13582
- * copied: the contributor reports what it already knows, hub-main adds only
13583
- * `addonId`, nothing needs global knowledge, and there is no central list for
13584
- * somebody to forget to edit.
13585
- *
13586
- * They are not merged, because their invariants are opposites:
13587
- *
13588
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
13589
- * claim a camera cost nothing, which is a measurement nobody made;
13590
- * - a `failure-contribution` zero is the **most valuable value on the
13591
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13592
- * and it is exactly what an absent entry cannot say.
13593
- *
13594
- * Putting a loss counter on a cost entry would also break the reconciliation
13595
- * that gives `load-contribution` its point: contributions are subtracted from
13596
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13597
- * has no process.
13598
- *
13599
- * ## Why not a log line, since the counters already exist
13600
- *
13601
- * Several of these paths already counted themselves — `CaptureScheduler`'s
13602
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13603
- * ends in a log line, and a log line is the thing the operator asked to stop
13604
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13605
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13606
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13607
- * media blackout were both diagnosed. The counters stay; this is where they can
13608
- * be READ.
13609
- *
13610
- * ## The rate is served with its denominator or not at all
13611
- *
13612
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
13613
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13614
- * than yesterday" and was **flat across twelve hours** once divided by the
13615
- * successes on the same path. A surface that publishes only the numerator
13616
- * reproduces that mistake on every read.
13617
- *
13618
- * ## Shape
13619
- *
13620
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13621
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13622
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13623
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13624
- * a forked runner's entries reach hub-main over transport that already exists.
13625
- * No new UDS message, no second registry (D3). The operator reads the assembled
13626
- * result through `system.getFailureContributions`.
13627
- */
13628
- var FailureReasonCountSchema = object({
13629
- /**
13630
- * Why the attempt did not land, in the contributor's own vocabulary —
13631
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13632
- * strings that already appear in this repo's logs and, where one exists, the
13633
- * same string the per-track `previewMissReason` records (D276): a second
13634
- * vocabulary for the same loss would make the row and the counter
13635
- * un-joinable.
13636
- */
13637
- reason: string(),
13638
- count: number().int().nonnegative()
13639
- });
13640
- var FailureContributionSchema = object({
13641
- /**
13642
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13643
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13644
- * `unit` free: the families are owned by different addons and a shared enum
13645
- * is a central list that rots invisibly.
13646
- */
13647
- family: string(),
13648
- /**
13649
- * The NUMERIC device id — the same value every log line carries as
13650
- * `tags.deviceId`. Never nullable and never absent: a contributor that
13651
- * cannot name the camera must not emit the entry, because a fleet total
13652
- * cannot answer the only question anybody asks of this surface.
13653
- */
13654
- deviceId: number().int().positive(),
13655
- /**
13656
- * A second dimension inside the family: the model / step id for an inference
13657
- * timeout, so "which camera AND which model" is one read. Absent when the
13658
- * family has a single variant.
13659
- */
13660
- variant: string().optional(),
13661
- /**
13662
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13663
- * differencing two reads must drop the interval when it changes, because the
13664
- * counter restarted from zero in a respawned runner. Same discipline as
13665
- * `LoadContribution.startedAtMs`.
13666
- */
13667
- sinceMs: number(),
13668
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13669
- atMs: number(),
13670
- /**
13671
- * THE DENOMINATOR — every attempt on this path for this camera in the
13672
- * window. A failure count published without it is the mistake this schema
13673
- * exists to make impossible.
13674
- */
13675
- attempts: number().int().nonnegative(),
13676
- /** Attempts that landed. `attempts - succeeded` is the loss. */
13677
- succeeded: number().int().nonnegative(),
13678
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
13679
- reasons: array(FailureReasonCountSchema).readonly()
13680
- });
13681
- method(_void(), array(FailureContributionSchema).readonly());
13682
- var LoadContributionSchema = object({
13683
- role: _enum([
13684
- "decode",
13685
- "transcode",
13686
- "recording",
13687
- "streaming",
13688
- "detection"
13689
- ]),
13690
- /**
13691
- * The NUMERIC device id — the same value every log line carries as
13692
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
13693
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
13694
- * contributor that cannot name its camera must not emit the entry at all,
13695
- * because an unnamed per-camera entry is indistinguishable from a shared one
13696
- * and would quietly turn one camera's cost into everybody's.
13697
- */
13698
- deviceId: number().int().positive().nullable(),
13699
- attribution: _enum([
13700
- "measured",
13701
- "accounted",
13702
- "unattributable"
13703
- ]),
13704
- /**
13705
- * What ONE entry is, in the contributor's own words — `615/high`,
13706
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
13707
- * family and inventing a common one would lose the only information that
13708
- * makes two entries for the same camera distinguishable.
13709
- */
13710
- unit: string(),
13711
- /**
13712
- * The OS process this cost lives in, when there is one. Present so a
13713
- * consumer can (a) tell two generations of the same unit apart across a
13714
- * restart, and (b) subtract claimed processes from the node's process
13715
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
13716
- * process of its own.
13717
- */
13718
- pid: number().int().positive().optional(),
13719
- /**
13720
- * When this generation started. The pid's incarnation marker: a consumer
13721
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
13722
- * window when this changes, because the counter restarted from zero in a new
13723
- * process.
13724
- */
13725
- startedAtMs: number().optional(),
13726
- /**
13727
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
13728
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
13729
- * contribution is asked for.
13730
- *
13731
- * Cumulative and not a rate on purpose: a rate needs a window, a window
13732
- * needs a sampler, and a new per-node sampler is the defect half of
13733
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
13734
- * by whoever already keeps a history; a rate cannot be un-averaged.
13735
- *
13736
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
13737
- * an entry with no process.
13738
- */
13739
- cpuSeconds: number().optional(),
13740
- /** Resident bytes of this unit's process, same source and same rules. */
13741
- rssBytes: number().optional()
13742
- });
13743
- method(_void(), array(LoadContributionSchema).readonly());
13744
- /**
13745
13745
  * `login-method` — collection cap through which auth addons contribute
13746
13746
  * their pre-auth login surfaces to the login page. This is the SINGLE,
13747
13747
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -18401,12 +18401,53 @@ var MediaFileKindEnum = _enum([
18401
18401
  "keyFrameSmall",
18402
18402
  "thumbnailSmall"
18403
18403
  ]);
18404
+ /**
18405
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
18406
+ * ARE — never the bytes themselves.
18407
+ *
18408
+ * ## Why `url` and not `base64`
18409
+ *
18410
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
18411
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
18412
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
18413
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
18414
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
18415
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
18416
+ *
18417
+ * `url` points at the `event-media` data plane
18418
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18419
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18420
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18421
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
18422
+ * no less protected than they were inside a `view`-level cap response — see
18423
+ * `data-plane-access.ts` for the rule and the one gap it does not close
18424
+ * (per-device scoping).
18425
+ *
18426
+ * The URL is built from the row's **stored** key, which is not always its
18427
+ * published `kind`: a track's face/plate crop is stored as `crop` under
18428
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
18429
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18430
+ *
18431
+ * ## `base64` is TRANSITIONAL and is going away
18432
+ *
18433
+ * It is still populated for one reason: the deployed viewer's track-detail
18434
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
18435
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
18436
+ * triangle — not as absence. Removing the field before that viewer ships is an
18437
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
18438
+ * delete this line and the `withBytes` pass-through in
18439
+ * `analytics-query-facade.ts`; nothing else reads it.
18440
+ */
18404
18441
  var MediaFileSchema = object({
18405
18442
  key: string(),
18406
18443
  kind: MediaFileKindEnum,
18407
- base64: string(),
18408
18444
  sizeBytes: number(),
18409
18445
  timestamp: number()
18446
+ }).extend({
18447
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
18448
+ url: string(),
18449
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
18450
+ base64: string()
18410
18451
  });
18411
18452
  /**
18412
18453
  * One media row WITHOUT its bytes.
@@ -18418,7 +18459,9 @@ var MediaFileSchema = object({
18418
18459
  * blocks the whole view.
18419
18460
  *
18420
18461
  * `sizeBytes` is carried because it is what lets a client decide between the
18421
- * stored blob and a `?variant=thumb` rendering without fetching either.
18462
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
18463
+ * `url` because a client that had to build the plane path itself is a second
18464
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
18422
18465
  */
18423
18466
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
18424
18467
  /**
@@ -19107,6 +19150,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19107
19150
  }), array(MediaFileSchema).readonly()), method(object({
19108
19151
  trackId: string(),
19109
19152
  deviceId: number()
19153
+ }), array(MediaFileInfoSchema).readonly()), method(object({
19154
+ eventId: string(),
19155
+ deviceId: number()
19110
19156
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
19111
19157
  kind: "mutation",
19112
19158
  auth: "admin"
@@ -23471,10 +23517,24 @@ var FaceClusterSchema = object({
23471
23517
  size: number().int(),
23472
23518
  cohesion: number()
23473
23519
  });
23520
+ /**
23521
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
23522
+ * are — never the bytes.
23523
+ *
23524
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
23525
+ * track/event contract) is still populated because a deployed viewer requires
23526
+ * the field to parse a row at all; this method has no such reader. Its ONE
23527
+ * caller is the admin UI's detail modal, which was building
23528
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
23529
+ * dialog already rendering its key FRAME from the `event-media` plane.
23530
+ *
23531
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
23532
+ * media key directly, so this needed no new plane and no new access decision.
23533
+ */
23474
23534
  var MediaFileLiteSchema$1 = object({
23475
23535
  key: string(),
23476
23536
  kind: string(),
23477
- base64: string(),
23537
+ url: string(),
23478
23538
  sizeBytes: number(),
23479
23539
  timestamp: number()
23480
23540
  });
@@ -25726,10 +25786,24 @@ var PlateInfoSchema = object({
25726
25786
  */
25727
25787
  cropUrl: string().optional()
25728
25788
  });
25789
+ /**
25790
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
25791
+ * are — never the bytes.
25792
+ *
25793
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
25794
+ * track/event contract) is still populated because a deployed viewer requires
25795
+ * the field to parse a row at all; this method has no such reader. Its ONE
25796
+ * caller is the admin UI's detail modal, which was building
25797
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
25798
+ * dialog already rendering its key FRAME from the `event-media` plane.
25799
+ *
25800
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
25801
+ * media key directly, so this needed no new plane and no new access decision.
25802
+ */
25729
25803
  var MediaFileLiteSchema = object({
25730
25804
  key: string(),
25731
25805
  kind: string(),
25732
- base64: string(),
25806
+ url: string(),
25733
25807
  sizeBytes: number(),
25734
25808
  timestamp: number()
25735
25809
  });
@@ -32194,6 +32268,12 @@ Object.freeze({
32194
32268
  addonId: null,
32195
32269
  access: "view"
32196
32270
  },
32271
+ "pipelineAnalytics.listEventMedia": {
32272
+ capName: "pipeline-analytics",
32273
+ capScope: "device",
32274
+ addonId: null,
32275
+ access: "view"
32276
+ },
32197
32277
  "pipelineAnalytics.listGroups": {
32198
32278
  capName: "pipeline-analytics",
32199
32279
  capScope: "device",
@@ -35817,6 +35897,11 @@ Object.freeze({
35817
35897
  form: "array",
35818
35898
  optional: false
35819
35899
  }],
35900
+ "pipelineAnalytics.listEventMedia": [{
35901
+ name: "deviceId",
35902
+ form: "single",
35903
+ optional: false
35904
+ }],
35820
35905
  "pipelineAnalytics.listGroups": [{
35821
35906
  name: "deviceIds",
35822
35907
  form: "array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-onvif",
3
- "version": "1.2.45",
3
+ "version": "1.2.46",
4
4
  "description": "ONVIF camera device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",