@camstack/addon-import-alexa 0.2.45 → 0.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
@@ -13427,6 +13427,114 @@ method(object({
13427
13427
  height: number()
13428
13428
  }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
13429
13429
  /**
13430
+ * `failure-contribution` — the capability an addon reports its OWN losses
13431
+ * through, per camera, with the denominator attached. It stores nothing.
13432
+ *
13433
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13434
+ *
13435
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13436
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13437
+ * copied: the contributor reports what it already knows, hub-main adds only
13438
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13439
+ * somebody to forget to edit.
13440
+ *
13441
+ * They are not merged, because their invariants are opposites:
13442
+ *
13443
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13444
+ * claim a camera cost nothing, which is a measurement nobody made;
13445
+ * - a `failure-contribution` zero is the **most valuable value on the
13446
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13447
+ * and it is exactly what an absent entry cannot say.
13448
+ *
13449
+ * Putting a loss counter on a cost entry would also break the reconciliation
13450
+ * that gives `load-contribution` its point: contributions are subtracted from
13451
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13452
+ * has no process.
13453
+ *
13454
+ * ## Why not a log line, since the counters already exist
13455
+ *
13456
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13457
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13458
+ * ends in a log line, and a log line is the thing the operator asked to stop
13459
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13460
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13461
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13462
+ * media blackout were both diagnosed. The counters stay; this is where they can
13463
+ * be READ.
13464
+ *
13465
+ * ## The rate is served with its denominator or not at all
13466
+ *
13467
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13468
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13469
+ * than yesterday" and was **flat across twelve hours** once divided by the
13470
+ * successes on the same path. A surface that publishes only the numerator
13471
+ * reproduces that mistake on every read.
13472
+ *
13473
+ * ## Shape
13474
+ *
13475
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13476
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13477
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13478
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13479
+ * a forked runner's entries reach hub-main over transport that already exists.
13480
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13481
+ * result through `system.getFailureContributions`.
13482
+ */
13483
+ var FailureReasonCountSchema = object({
13484
+ /**
13485
+ * Why the attempt did not land, in the contributor's own vocabulary —
13486
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13487
+ * strings that already appear in this repo's logs and, where one exists, the
13488
+ * same string the per-track `previewMissReason` records (D276): a second
13489
+ * vocabulary for the same loss would make the row and the counter
13490
+ * un-joinable.
13491
+ */
13492
+ reason: string(),
13493
+ count: number().int().nonnegative()
13494
+ });
13495
+ var FailureContributionSchema = object({
13496
+ /**
13497
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13498
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13499
+ * `unit` free: the families are owned by different addons and a shared enum
13500
+ * is a central list that rots invisibly.
13501
+ */
13502
+ family: string(),
13503
+ /**
13504
+ * The NUMERIC device id — the same value every log line carries as
13505
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13506
+ * cannot name the camera must not emit the entry, because a fleet total
13507
+ * cannot answer the only question anybody asks of this surface.
13508
+ */
13509
+ deviceId: number().int().positive(),
13510
+ /**
13511
+ * A second dimension inside the family: the model / step id for an inference
13512
+ * timeout, so "which camera AND which model" is one read. Absent when the
13513
+ * family has a single variant.
13514
+ */
13515
+ variant: string().optional(),
13516
+ /**
13517
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13518
+ * differencing two reads must drop the interval when it changes, because the
13519
+ * counter restarted from zero in a respawned runner. Same discipline as
13520
+ * `LoadContribution.startedAtMs`.
13521
+ */
13522
+ sinceMs: number(),
13523
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13524
+ atMs: number(),
13525
+ /**
13526
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13527
+ * window. A failure count published without it is the mistake this schema
13528
+ * exists to make impossible.
13529
+ */
13530
+ attempts: number().int().nonnegative(),
13531
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13532
+ succeeded: number().int().nonnegative(),
13533
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13534
+ reasons: array(FailureReasonCountSchema).readonly()
13535
+ });
13536
+ method(_void(), array(FailureContributionSchema).readonly());
13537
+ /**
13430
13538
  * filesystem-browse — per-node capability for browsing the node's local
13431
13539
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
13432
13540
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -13948,6 +14056,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13948
14056
  kind: "mutation",
13949
14057
  auth: "admin"
13950
14058
  });
14059
+ var LoadContributionSchema = object({
14060
+ role: _enum([
14061
+ "decode",
14062
+ "transcode",
14063
+ "recording",
14064
+ "streaming",
14065
+ "detection"
14066
+ ]),
14067
+ /**
14068
+ * The NUMERIC device id — the same value every log line carries as
14069
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
14070
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
14071
+ * contributor that cannot name its camera must not emit the entry at all,
14072
+ * because an unnamed per-camera entry is indistinguishable from a shared one
14073
+ * and would quietly turn one camera's cost into everybody's.
14074
+ */
14075
+ deviceId: number().int().positive().nullable(),
14076
+ attribution: _enum([
14077
+ "measured",
14078
+ "accounted",
14079
+ "unattributable"
14080
+ ]),
14081
+ /**
14082
+ * What ONE entry is, in the contributor's own words — `615/high`,
14083
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
14084
+ * family and inventing a common one would lose the only information that
14085
+ * makes two entries for the same camera distinguishable.
14086
+ */
14087
+ unit: string(),
14088
+ /**
14089
+ * The OS process this cost lives in, when there is one. Present so a
14090
+ * consumer can (a) tell two generations of the same unit apart across a
14091
+ * restart, and (b) subtract claimed processes from the node's process
14092
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
14093
+ * process of its own.
14094
+ */
14095
+ pid: number().int().positive().optional(),
14096
+ /**
14097
+ * When this generation started. The pid's incarnation marker: a consumer
14098
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
14099
+ * window when this changes, because the counter restarted from zero in a new
14100
+ * process.
14101
+ */
14102
+ startedAtMs: number().optional(),
14103
+ /**
14104
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
14105
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
14106
+ * contribution is asked for.
14107
+ *
14108
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
14109
+ * needs a sampler, and a new per-node sampler is the defect half of
14110
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
14111
+ * by whoever already keeps a history; a rate cannot be un-averaged.
14112
+ *
14113
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
14114
+ * an entry with no process.
14115
+ */
14116
+ cpuSeconds: number().optional(),
14117
+ /** Resident bytes of this unit's process, same source and same rules. */
14118
+ rssBytes: number().optional()
14119
+ });
14120
+ method(_void(), array(LoadContributionSchema).readonly());
13951
14121
  /**
13952
14122
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
13953
14123
  * through. It stores nothing.
@@ -14024,176 +14194,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
14024
14194
  tags: record(string(), string()).optional()
14025
14195
  }), array(LogEntrySchema).readonly());
14026
14196
  /**
14027
- * `failure-contribution` — the capability an addon reports its OWN losses
14028
- * through, per camera, with the denominator attached. It stores nothing.
14029
- *
14030
- * ## The twin of `load-contribution`, and why it is a twin and not a field
14031
- *
14032
- * `load-contribution` answers *what did this camera COST*. This answers *what
14033
- * did this camera LOSE*. The reporting discipline is identical and deliberately
14034
- * copied: the contributor reports what it already knows, hub-main adds only
14035
- * `addonId`, nothing needs global knowledge, and there is no central list for
14036
- * somebody to forget to edit.
14037
- *
14038
- * They are not merged, because their invariants are opposites:
14039
- *
14040
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
14041
- * claim a camera cost nothing, which is a measurement nobody made;
14042
- * - a `failure-contribution` zero is the **most valuable value on the
14043
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
14044
- * and it is exactly what an absent entry cannot say.
14045
- *
14046
- * Putting a loss counter on a cost entry would also break the reconciliation
14047
- * that gives `load-contribution` its point: contributions are subtracted from
14048
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
14049
- * has no process.
14050
- *
14051
- * ## Why not a log line, since the counters already exist
14052
- *
14053
- * Several of these paths already counted themselves — `CaptureScheduler`'s
14054
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
14055
- * ends in a log line, and a log line is the thing the operator asked to stop
14056
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
14057
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
14058
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
14059
- * media blackout were both diagnosed. The counters stay; this is where they can
14060
- * be READ.
14061
- *
14062
- * ## The rate is served with its denominator or not at all
14063
- *
14064
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
14065
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
14066
- * than yesterday" and was **flat across twelve hours** once divided by the
14067
- * successes on the same path. A surface that publishes only the numerator
14068
- * reproduces that mistake on every read.
14069
- *
14070
- * ## Shape
14071
- *
14072
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
14073
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
14074
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
14075
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
14076
- * a forked runner's entries reach hub-main over transport that already exists.
14077
- * No new UDS message, no second registry (D3). The operator reads the assembled
14078
- * result through `system.getFailureContributions`.
14079
- */
14080
- var FailureReasonCountSchema = object({
14081
- /**
14082
- * Why the attempt did not land, in the contributor's own vocabulary —
14083
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
14084
- * strings that already appear in this repo's logs and, where one exists, the
14085
- * same string the per-track `previewMissReason` records (D276): a second
14086
- * vocabulary for the same loss would make the row and the counter
14087
- * un-joinable.
14088
- */
14089
- reason: string(),
14090
- count: number().int().nonnegative()
14091
- });
14092
- var FailureContributionSchema = object({
14093
- /**
14094
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
14095
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
14096
- * `unit` free: the families are owned by different addons and a shared enum
14097
- * is a central list that rots invisibly.
14098
- */
14099
- family: string(),
14100
- /**
14101
- * The NUMERIC device id — the same value every log line carries as
14102
- * `tags.deviceId`. Never nullable and never absent: a contributor that
14103
- * cannot name the camera must not emit the entry, because a fleet total
14104
- * cannot answer the only question anybody asks of this surface.
14105
- */
14106
- deviceId: number().int().positive(),
14107
- /**
14108
- * A second dimension inside the family: the model / step id for an inference
14109
- * timeout, so "which camera AND which model" is one read. Absent when the
14110
- * family has a single variant.
14111
- */
14112
- variant: string().optional(),
14113
- /**
14114
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
14115
- * differencing two reads must drop the interval when it changes, because the
14116
- * counter restarted from zero in a respawned runner. Same discipline as
14117
- * `LoadContribution.startedAtMs`.
14118
- */
14119
- sinceMs: number(),
14120
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
14121
- atMs: number(),
14122
- /**
14123
- * THE DENOMINATOR — every attempt on this path for this camera in the
14124
- * window. A failure count published without it is the mistake this schema
14125
- * exists to make impossible.
14126
- */
14127
- attempts: number().int().nonnegative(),
14128
- /** Attempts that landed. `attempts - succeeded` is the loss. */
14129
- succeeded: number().int().nonnegative(),
14130
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
14131
- reasons: array(FailureReasonCountSchema).readonly()
14132
- });
14133
- method(_void(), array(FailureContributionSchema).readonly());
14134
- var LoadContributionSchema = object({
14135
- role: _enum([
14136
- "decode",
14137
- "transcode",
14138
- "recording",
14139
- "streaming",
14140
- "detection"
14141
- ]),
14142
- /**
14143
- * The NUMERIC device id — the same value every log line carries as
14144
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
14145
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
14146
- * contributor that cannot name its camera must not emit the entry at all,
14147
- * because an unnamed per-camera entry is indistinguishable from a shared one
14148
- * and would quietly turn one camera's cost into everybody's.
14149
- */
14150
- deviceId: number().int().positive().nullable(),
14151
- attribution: _enum([
14152
- "measured",
14153
- "accounted",
14154
- "unattributable"
14155
- ]),
14156
- /**
14157
- * What ONE entry is, in the contributor's own words — `615/high`,
14158
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
14159
- * family and inventing a common one would lose the only information that
14160
- * makes two entries for the same camera distinguishable.
14161
- */
14162
- unit: string(),
14163
- /**
14164
- * The OS process this cost lives in, when there is one. Present so a
14165
- * consumer can (a) tell two generations of the same unit apart across a
14166
- * restart, and (b) subtract claimed processes from the node's process
14167
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
14168
- * process of its own.
14169
- */
14170
- pid: number().int().positive().optional(),
14171
- /**
14172
- * When this generation started. The pid's incarnation marker: a consumer
14173
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
14174
- * window when this changes, because the counter restarted from zero in a new
14175
- * process.
14176
- */
14177
- startedAtMs: number().optional(),
14178
- /**
14179
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
14180
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
14181
- * contribution is asked for.
14182
- *
14183
- * Cumulative and not a rate on purpose: a rate needs a window, a window
14184
- * needs a sampler, and a new per-node sampler is the defect half of
14185
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
14186
- * by whoever already keeps a history; a rate cannot be un-averaged.
14187
- *
14188
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
14189
- * an entry with no process.
14190
- */
14191
- cpuSeconds: number().optional(),
14192
- /** Resident bytes of this unit's process, same source and same rules. */
14193
- rssBytes: number().optional()
14194
- });
14195
- method(_void(), array(LoadContributionSchema).readonly());
14196
- /**
14197
14197
  * `login-method` — collection cap through which auth addons contribute
14198
14198
  * their pre-auth login surfaces to the login page. This is the SINGLE,
14199
14199
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -18931,12 +18931,53 @@ var MediaFileKindEnum = _enum([
18931
18931
  "keyFrameSmall",
18932
18932
  "thumbnailSmall"
18933
18933
  ]);
18934
+ /**
18935
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
18936
+ * ARE — never the bytes themselves.
18937
+ *
18938
+ * ## Why `url` and not `base64`
18939
+ *
18940
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
18941
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
18942
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
18943
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
18944
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
18945
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
18946
+ *
18947
+ * `url` points at the `event-media` data plane
18948
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18949
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18950
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18951
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
18952
+ * no less protected than they were inside a `view`-level cap response — see
18953
+ * `data-plane-access.ts` for the rule and the one gap it does not close
18954
+ * (per-device scoping).
18955
+ *
18956
+ * The URL is built from the row's **stored** key, which is not always its
18957
+ * published `kind`: a track's face/plate crop is stored as `crop` under
18958
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
18959
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18960
+ *
18961
+ * ## `base64` is TRANSITIONAL and is going away
18962
+ *
18963
+ * It is still populated for one reason: the deployed viewer's track-detail
18964
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
18965
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
18966
+ * triangle — not as absence. Removing the field before that viewer ships is an
18967
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
18968
+ * delete this line and the `withBytes` pass-through in
18969
+ * `analytics-query-facade.ts`; nothing else reads it.
18970
+ */
18934
18971
  var MediaFileSchema = object({
18935
18972
  key: string(),
18936
18973
  kind: MediaFileKindEnum,
18937
- base64: string(),
18938
18974
  sizeBytes: number(),
18939
18975
  timestamp: number()
18976
+ }).extend({
18977
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
18978
+ url: string(),
18979
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
18980
+ base64: string()
18940
18981
  });
18941
18982
  /**
18942
18983
  * One media row WITHOUT its bytes.
@@ -18948,7 +18989,9 @@ var MediaFileSchema = object({
18948
18989
  * blocks the whole view.
18949
18990
  *
18950
18991
  * `sizeBytes` is carried because it is what lets a client decide between the
18951
- * stored blob and a `?variant=thumb` rendering without fetching either.
18992
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
18993
+ * `url` because a client that had to build the plane path itself is a second
18994
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
18952
18995
  */
18953
18996
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
18954
18997
  /**
@@ -19637,6 +19680,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19637
19680
  }), array(MediaFileSchema).readonly()), method(object({
19638
19681
  trackId: string(),
19639
19682
  deviceId: number()
19683
+ }), array(MediaFileInfoSchema).readonly()), method(object({
19684
+ eventId: string(),
19685
+ deviceId: number()
19640
19686
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
19641
19687
  kind: "mutation",
19642
19688
  auth: "admin"
@@ -24644,10 +24690,24 @@ var FaceClusterSchema = object({
24644
24690
  size: number().int(),
24645
24691
  cohesion: number()
24646
24692
  });
24693
+ /**
24694
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
24695
+ * are — never the bytes.
24696
+ *
24697
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
24698
+ * track/event contract) is still populated because a deployed viewer requires
24699
+ * the field to parse a row at all; this method has no such reader. Its ONE
24700
+ * caller is the admin UI's detail modal, which was building
24701
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
24702
+ * dialog already rendering its key FRAME from the `event-media` plane.
24703
+ *
24704
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
24705
+ * media key directly, so this needed no new plane and no new access decision.
24706
+ */
24647
24707
  var MediaFileLiteSchema$1 = object({
24648
24708
  key: string(),
24649
24709
  kind: string(),
24650
- base64: string(),
24710
+ url: string(),
24651
24711
  sizeBytes: number(),
24652
24712
  timestamp: number()
24653
24713
  });
@@ -27669,10 +27729,24 @@ var PlateInfoSchema = object({
27669
27729
  */
27670
27730
  cropUrl: string().optional()
27671
27731
  });
27732
+ /**
27733
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
27734
+ * are — never the bytes.
27735
+ *
27736
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
27737
+ * track/event contract) is still populated because a deployed viewer requires
27738
+ * the field to parse a row at all; this method has no such reader. Its ONE
27739
+ * caller is the admin UI's detail modal, which was building
27740
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
27741
+ * dialog already rendering its key FRAME from the `event-media` plane.
27742
+ *
27743
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
27744
+ * media key directly, so this needed no new plane and no new access decision.
27745
+ */
27672
27746
  var MediaFileLiteSchema = object({
27673
27747
  key: string(),
27674
27748
  kind: string(),
27675
- base64: string(),
27749
+ url: string(),
27676
27750
  sizeBytes: number(),
27677
27751
  timestamp: number()
27678
27752
  });
@@ -35569,6 +35643,12 @@ Object.freeze({
35569
35643
  addonId: null,
35570
35644
  access: "view"
35571
35645
  },
35646
+ "pipelineAnalytics.listEventMedia": {
35647
+ capName: "pipeline-analytics",
35648
+ capScope: "device",
35649
+ addonId: null,
35650
+ access: "view"
35651
+ },
35572
35652
  "pipelineAnalytics.listGroups": {
35573
35653
  capName: "pipeline-analytics",
35574
35654
  capScope: "device",
@@ -39192,6 +39272,11 @@ Object.freeze({
39192
39272
  form: "array",
39193
39273
  optional: false
39194
39274
  }],
39275
+ "pipelineAnalytics.listEventMedia": [{
39276
+ name: "deviceId",
39277
+ form: "single",
39278
+ optional: false
39279
+ }],
39195
39280
  "pipelineAnalytics.listGroups": [{
39196
39281
  name: "deviceIds",
39197
39282
  form: "array",
package/dist/addon.mjs CHANGED
@@ -13427,6 +13427,114 @@ method(object({
13427
13427
  height: number()
13428
13428
  }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
13429
13429
  /**
13430
+ * `failure-contribution` — the capability an addon reports its OWN losses
13431
+ * through, per camera, with the denominator attached. It stores nothing.
13432
+ *
13433
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13434
+ *
13435
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13436
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13437
+ * copied: the contributor reports what it already knows, hub-main adds only
13438
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13439
+ * somebody to forget to edit.
13440
+ *
13441
+ * They are not merged, because their invariants are opposites:
13442
+ *
13443
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13444
+ * claim a camera cost nothing, which is a measurement nobody made;
13445
+ * - a `failure-contribution` zero is the **most valuable value on the
13446
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13447
+ * and it is exactly what an absent entry cannot say.
13448
+ *
13449
+ * Putting a loss counter on a cost entry would also break the reconciliation
13450
+ * that gives `load-contribution` its point: contributions are subtracted from
13451
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13452
+ * has no process.
13453
+ *
13454
+ * ## Why not a log line, since the counters already exist
13455
+ *
13456
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13457
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13458
+ * ends in a log line, and a log line is the thing the operator asked to stop
13459
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13460
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13461
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13462
+ * media blackout were both diagnosed. The counters stay; this is where they can
13463
+ * be READ.
13464
+ *
13465
+ * ## The rate is served with its denominator or not at all
13466
+ *
13467
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13468
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13469
+ * than yesterday" and was **flat across twelve hours** once divided by the
13470
+ * successes on the same path. A surface that publishes only the numerator
13471
+ * reproduces that mistake on every read.
13472
+ *
13473
+ * ## Shape
13474
+ *
13475
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13476
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13477
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13478
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13479
+ * a forked runner's entries reach hub-main over transport that already exists.
13480
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13481
+ * result through `system.getFailureContributions`.
13482
+ */
13483
+ var FailureReasonCountSchema = object({
13484
+ /**
13485
+ * Why the attempt did not land, in the contributor's own vocabulary —
13486
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13487
+ * strings that already appear in this repo's logs and, where one exists, the
13488
+ * same string the per-track `previewMissReason` records (D276): a second
13489
+ * vocabulary for the same loss would make the row and the counter
13490
+ * un-joinable.
13491
+ */
13492
+ reason: string(),
13493
+ count: number().int().nonnegative()
13494
+ });
13495
+ var FailureContributionSchema = object({
13496
+ /**
13497
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13498
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13499
+ * `unit` free: the families are owned by different addons and a shared enum
13500
+ * is a central list that rots invisibly.
13501
+ */
13502
+ family: string(),
13503
+ /**
13504
+ * The NUMERIC device id — the same value every log line carries as
13505
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13506
+ * cannot name the camera must not emit the entry, because a fleet total
13507
+ * cannot answer the only question anybody asks of this surface.
13508
+ */
13509
+ deviceId: number().int().positive(),
13510
+ /**
13511
+ * A second dimension inside the family: the model / step id for an inference
13512
+ * timeout, so "which camera AND which model" is one read. Absent when the
13513
+ * family has a single variant.
13514
+ */
13515
+ variant: string().optional(),
13516
+ /**
13517
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13518
+ * differencing two reads must drop the interval when it changes, because the
13519
+ * counter restarted from zero in a respawned runner. Same discipline as
13520
+ * `LoadContribution.startedAtMs`.
13521
+ */
13522
+ sinceMs: number(),
13523
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13524
+ atMs: number(),
13525
+ /**
13526
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13527
+ * window. A failure count published without it is the mistake this schema
13528
+ * exists to make impossible.
13529
+ */
13530
+ attempts: number().int().nonnegative(),
13531
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13532
+ succeeded: number().int().nonnegative(),
13533
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13534
+ reasons: array(FailureReasonCountSchema).readonly()
13535
+ });
13536
+ method(_void(), array(FailureContributionSchema).readonly());
13537
+ /**
13430
13538
  * filesystem-browse — per-node capability for browsing the node's local
13431
13539
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
13432
13540
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -13948,6 +14056,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13948
14056
  kind: "mutation",
13949
14057
  auth: "admin"
13950
14058
  });
14059
+ var LoadContributionSchema = object({
14060
+ role: _enum([
14061
+ "decode",
14062
+ "transcode",
14063
+ "recording",
14064
+ "streaming",
14065
+ "detection"
14066
+ ]),
14067
+ /**
14068
+ * The NUMERIC device id — the same value every log line carries as
14069
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
14070
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
14071
+ * contributor that cannot name its camera must not emit the entry at all,
14072
+ * because an unnamed per-camera entry is indistinguishable from a shared one
14073
+ * and would quietly turn one camera's cost into everybody's.
14074
+ */
14075
+ deviceId: number().int().positive().nullable(),
14076
+ attribution: _enum([
14077
+ "measured",
14078
+ "accounted",
14079
+ "unattributable"
14080
+ ]),
14081
+ /**
14082
+ * What ONE entry is, in the contributor's own words — `615/high`,
14083
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
14084
+ * family and inventing a common one would lose the only information that
14085
+ * makes two entries for the same camera distinguishable.
14086
+ */
14087
+ unit: string(),
14088
+ /**
14089
+ * The OS process this cost lives in, when there is one. Present so a
14090
+ * consumer can (a) tell two generations of the same unit apart across a
14091
+ * restart, and (b) subtract claimed processes from the node's process
14092
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
14093
+ * process of its own.
14094
+ */
14095
+ pid: number().int().positive().optional(),
14096
+ /**
14097
+ * When this generation started. The pid's incarnation marker: a consumer
14098
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
14099
+ * window when this changes, because the counter restarted from zero in a new
14100
+ * process.
14101
+ */
14102
+ startedAtMs: number().optional(),
14103
+ /**
14104
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
14105
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
14106
+ * contribution is asked for.
14107
+ *
14108
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
14109
+ * needs a sampler, and a new per-node sampler is the defect half of
14110
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
14111
+ * by whoever already keeps a history; a rate cannot be un-averaged.
14112
+ *
14113
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
14114
+ * an entry with no process.
14115
+ */
14116
+ cpuSeconds: number().optional(),
14117
+ /** Resident bytes of this unit's process, same source and same rules. */
14118
+ rssBytes: number().optional()
14119
+ });
14120
+ method(_void(), array(LoadContributionSchema).readonly());
13951
14121
  /**
13952
14122
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
13953
14123
  * through. It stores nothing.
@@ -14024,176 +14194,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
14024
14194
  tags: record(string(), string()).optional()
14025
14195
  }), array(LogEntrySchema).readonly());
14026
14196
  /**
14027
- * `failure-contribution` — the capability an addon reports its OWN losses
14028
- * through, per camera, with the denominator attached. It stores nothing.
14029
- *
14030
- * ## The twin of `load-contribution`, and why it is a twin and not a field
14031
- *
14032
- * `load-contribution` answers *what did this camera COST*. This answers *what
14033
- * did this camera LOSE*. The reporting discipline is identical and deliberately
14034
- * copied: the contributor reports what it already knows, hub-main adds only
14035
- * `addonId`, nothing needs global knowledge, and there is no central list for
14036
- * somebody to forget to edit.
14037
- *
14038
- * They are not merged, because their invariants are opposites:
14039
- *
14040
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
14041
- * claim a camera cost nothing, which is a measurement nobody made;
14042
- * - a `failure-contribution` zero is the **most valuable value on the
14043
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
14044
- * and it is exactly what an absent entry cannot say.
14045
- *
14046
- * Putting a loss counter on a cost entry would also break the reconciliation
14047
- * that gives `load-contribution` its point: contributions are subtracted from
14048
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
14049
- * has no process.
14050
- *
14051
- * ## Why not a log line, since the counters already exist
14052
- *
14053
- * Several of these paths already counted themselves — `CaptureScheduler`'s
14054
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
14055
- * ends in a log line, and a log line is the thing the operator asked to stop
14056
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
14057
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
14058
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
14059
- * media blackout were both diagnosed. The counters stay; this is where they can
14060
- * be READ.
14061
- *
14062
- * ## The rate is served with its denominator or not at all
14063
- *
14064
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
14065
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
14066
- * than yesterday" and was **flat across twelve hours** once divided by the
14067
- * successes on the same path. A surface that publishes only the numerator
14068
- * reproduces that mistake on every read.
14069
- *
14070
- * ## Shape
14071
- *
14072
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
14073
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
14074
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
14075
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
14076
- * a forked runner's entries reach hub-main over transport that already exists.
14077
- * No new UDS message, no second registry (D3). The operator reads the assembled
14078
- * result through `system.getFailureContributions`.
14079
- */
14080
- var FailureReasonCountSchema = object({
14081
- /**
14082
- * Why the attempt did not land, in the contributor's own vocabulary —
14083
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
14084
- * strings that already appear in this repo's logs and, where one exists, the
14085
- * same string the per-track `previewMissReason` records (D276): a second
14086
- * vocabulary for the same loss would make the row and the counter
14087
- * un-joinable.
14088
- */
14089
- reason: string(),
14090
- count: number().int().nonnegative()
14091
- });
14092
- var FailureContributionSchema = object({
14093
- /**
14094
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
14095
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
14096
- * `unit` free: the families are owned by different addons and a shared enum
14097
- * is a central list that rots invisibly.
14098
- */
14099
- family: string(),
14100
- /**
14101
- * The NUMERIC device id — the same value every log line carries as
14102
- * `tags.deviceId`. Never nullable and never absent: a contributor that
14103
- * cannot name the camera must not emit the entry, because a fleet total
14104
- * cannot answer the only question anybody asks of this surface.
14105
- */
14106
- deviceId: number().int().positive(),
14107
- /**
14108
- * A second dimension inside the family: the model / step id for an inference
14109
- * timeout, so "which camera AND which model" is one read. Absent when the
14110
- * family has a single variant.
14111
- */
14112
- variant: string().optional(),
14113
- /**
14114
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
14115
- * differencing two reads must drop the interval when it changes, because the
14116
- * counter restarted from zero in a respawned runner. Same discipline as
14117
- * `LoadContribution.startedAtMs`.
14118
- */
14119
- sinceMs: number(),
14120
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
14121
- atMs: number(),
14122
- /**
14123
- * THE DENOMINATOR — every attempt on this path for this camera in the
14124
- * window. A failure count published without it is the mistake this schema
14125
- * exists to make impossible.
14126
- */
14127
- attempts: number().int().nonnegative(),
14128
- /** Attempts that landed. `attempts - succeeded` is the loss. */
14129
- succeeded: number().int().nonnegative(),
14130
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
14131
- reasons: array(FailureReasonCountSchema).readonly()
14132
- });
14133
- method(_void(), array(FailureContributionSchema).readonly());
14134
- var LoadContributionSchema = object({
14135
- role: _enum([
14136
- "decode",
14137
- "transcode",
14138
- "recording",
14139
- "streaming",
14140
- "detection"
14141
- ]),
14142
- /**
14143
- * The NUMERIC device id — the same value every log line carries as
14144
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
14145
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
14146
- * contributor that cannot name its camera must not emit the entry at all,
14147
- * because an unnamed per-camera entry is indistinguishable from a shared one
14148
- * and would quietly turn one camera's cost into everybody's.
14149
- */
14150
- deviceId: number().int().positive().nullable(),
14151
- attribution: _enum([
14152
- "measured",
14153
- "accounted",
14154
- "unattributable"
14155
- ]),
14156
- /**
14157
- * What ONE entry is, in the contributor's own words — `615/high`,
14158
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
14159
- * family and inventing a common one would lose the only information that
14160
- * makes two entries for the same camera distinguishable.
14161
- */
14162
- unit: string(),
14163
- /**
14164
- * The OS process this cost lives in, when there is one. Present so a
14165
- * consumer can (a) tell two generations of the same unit apart across a
14166
- * restart, and (b) subtract claimed processes from the node's process
14167
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
14168
- * process of its own.
14169
- */
14170
- pid: number().int().positive().optional(),
14171
- /**
14172
- * When this generation started. The pid's incarnation marker: a consumer
14173
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
14174
- * window when this changes, because the counter restarted from zero in a new
14175
- * process.
14176
- */
14177
- startedAtMs: number().optional(),
14178
- /**
14179
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
14180
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
14181
- * contribution is asked for.
14182
- *
14183
- * Cumulative and not a rate on purpose: a rate needs a window, a window
14184
- * needs a sampler, and a new per-node sampler is the defect half of
14185
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
14186
- * by whoever already keeps a history; a rate cannot be un-averaged.
14187
- *
14188
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
14189
- * an entry with no process.
14190
- */
14191
- cpuSeconds: number().optional(),
14192
- /** Resident bytes of this unit's process, same source and same rules. */
14193
- rssBytes: number().optional()
14194
- });
14195
- method(_void(), array(LoadContributionSchema).readonly());
14196
- /**
14197
14197
  * `login-method` — collection cap through which auth addons contribute
14198
14198
  * their pre-auth login surfaces to the login page. This is the SINGLE,
14199
14199
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -18931,12 +18931,53 @@ var MediaFileKindEnum = _enum([
18931
18931
  "keyFrameSmall",
18932
18932
  "thumbnailSmall"
18933
18933
  ]);
18934
+ /**
18935
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
18936
+ * ARE — never the bytes themselves.
18937
+ *
18938
+ * ## Why `url` and not `base64`
18939
+ *
18940
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
18941
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
18942
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
18943
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
18944
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
18945
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
18946
+ *
18947
+ * `url` points at the `event-media` data plane
18948
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18949
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18950
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18951
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
18952
+ * no less protected than they were inside a `view`-level cap response — see
18953
+ * `data-plane-access.ts` for the rule and the one gap it does not close
18954
+ * (per-device scoping).
18955
+ *
18956
+ * The URL is built from the row's **stored** key, which is not always its
18957
+ * published `kind`: a track's face/plate crop is stored as `crop` under
18958
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
18959
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18960
+ *
18961
+ * ## `base64` is TRANSITIONAL and is going away
18962
+ *
18963
+ * It is still populated for one reason: the deployed viewer's track-detail
18964
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
18965
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
18966
+ * triangle — not as absence. Removing the field before that viewer ships is an
18967
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
18968
+ * delete this line and the `withBytes` pass-through in
18969
+ * `analytics-query-facade.ts`; nothing else reads it.
18970
+ */
18934
18971
  var MediaFileSchema = object({
18935
18972
  key: string(),
18936
18973
  kind: MediaFileKindEnum,
18937
- base64: string(),
18938
18974
  sizeBytes: number(),
18939
18975
  timestamp: number()
18976
+ }).extend({
18977
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
18978
+ url: string(),
18979
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
18980
+ base64: string()
18940
18981
  });
18941
18982
  /**
18942
18983
  * One media row WITHOUT its bytes.
@@ -18948,7 +18989,9 @@ var MediaFileSchema = object({
18948
18989
  * blocks the whole view.
18949
18990
  *
18950
18991
  * `sizeBytes` is carried because it is what lets a client decide between the
18951
- * stored blob and a `?variant=thumb` rendering without fetching either.
18992
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
18993
+ * `url` because a client that had to build the plane path itself is a second
18994
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
18952
18995
  */
18953
18996
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
18954
18997
  /**
@@ -19637,6 +19680,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19637
19680
  }), array(MediaFileSchema).readonly()), method(object({
19638
19681
  trackId: string(),
19639
19682
  deviceId: number()
19683
+ }), array(MediaFileInfoSchema).readonly()), method(object({
19684
+ eventId: string(),
19685
+ deviceId: number()
19640
19686
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
19641
19687
  kind: "mutation",
19642
19688
  auth: "admin"
@@ -24644,10 +24690,24 @@ var FaceClusterSchema = object({
24644
24690
  size: number().int(),
24645
24691
  cohesion: number()
24646
24692
  });
24693
+ /**
24694
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
24695
+ * are — never the bytes.
24696
+ *
24697
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
24698
+ * track/event contract) is still populated because a deployed viewer requires
24699
+ * the field to parse a row at all; this method has no such reader. Its ONE
24700
+ * caller is the admin UI's detail modal, which was building
24701
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
24702
+ * dialog already rendering its key FRAME from the `event-media` plane.
24703
+ *
24704
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
24705
+ * media key directly, so this needed no new plane and no new access decision.
24706
+ */
24647
24707
  var MediaFileLiteSchema$1 = object({
24648
24708
  key: string(),
24649
24709
  kind: string(),
24650
- base64: string(),
24710
+ url: string(),
24651
24711
  sizeBytes: number(),
24652
24712
  timestamp: number()
24653
24713
  });
@@ -27669,10 +27729,24 @@ var PlateInfoSchema = object({
27669
27729
  */
27670
27730
  cropUrl: string().optional()
27671
27731
  });
27732
+ /**
27733
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
27734
+ * are — never the bytes.
27735
+ *
27736
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
27737
+ * track/event contract) is still populated because a deployed viewer requires
27738
+ * the field to parse a row at all; this method has no such reader. Its ONE
27739
+ * caller is the admin UI's detail modal, which was building
27740
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
27741
+ * dialog already rendering its key FRAME from the `event-media` plane.
27742
+ *
27743
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
27744
+ * media key directly, so this needed no new plane and no new access decision.
27745
+ */
27672
27746
  var MediaFileLiteSchema = object({
27673
27747
  key: string(),
27674
27748
  kind: string(),
27675
- base64: string(),
27749
+ url: string(),
27676
27750
  sizeBytes: number(),
27677
27751
  timestamp: number()
27678
27752
  });
@@ -35569,6 +35643,12 @@ Object.freeze({
35569
35643
  addonId: null,
35570
35644
  access: "view"
35571
35645
  },
35646
+ "pipelineAnalytics.listEventMedia": {
35647
+ capName: "pipeline-analytics",
35648
+ capScope: "device",
35649
+ addonId: null,
35650
+ access: "view"
35651
+ },
35572
35652
  "pipelineAnalytics.listGroups": {
35573
35653
  capName: "pipeline-analytics",
35574
35654
  capScope: "device",
@@ -39192,6 +39272,11 @@ Object.freeze({
39192
39272
  form: "array",
39193
39273
  optional: false
39194
39274
  }],
39275
+ "pipelineAnalytics.listEventMedia": [{
39276
+ name: "deviceId",
39277
+ form: "single",
39278
+ optional: false
39279
+ }],
39195
39280
  "pipelineAnalytics.listGroups": [{
39196
39281
  name: "deviceIds",
39197
39282
  form: "array",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-import-alexa",
3
- "version": "0.2.45",
3
+ "version": "0.2.46",
4
4
  "description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
5
5
  "keywords": [
6
6
  "camstack",