@camstack/addon-model-studio 1.1.62 → 1.1.64

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 (18) hide show
  1. package/dist/{MotionZonesSettings-Bs3JGKkN.mjs → MotionZonesSettings-Csh9Okvs.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-CKY_Zd76.mjs → PrivacyMaskSettings-D7aBKmIl.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-O2nnwm0s.mjs → SceneMonitorEditor-C7d4QdK2.mjs} +3 -3
  4. package/dist/_stub.js +11 -11
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DWs1_4xY.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-_UMbIXm8.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BEv5J4au.mjs +26 -0
  7. package/dist/{hostInit-JUNzADlm.mjs → hostInit-ChZMP5Bt.mjs} +3 -3
  8. package/dist/model-studio.addon.js +313 -181
  9. package/dist/model-studio.addon.mjs +313 -181
  10. package/dist/{player-overlays-CEwcewTI.mjs → player-overlays-C3k5161p.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-CUUfCGVt.mjs → responsive-DumBDPmA.mjs} +1 -1
  13. package/dist/{square-tBwuj1tn.mjs → square-39X7CNAb.mjs} +1 -1
  14. package/dist/{trash-2-Bu1QShSc.mjs → trash-2-CqLF5pGv.mjs} +1 -1
  15. package/dist/{use-device-snapshot-D86u2wfz.mjs → use-device-snapshot-B7Pamux4.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DW2n6IfQ.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DkSj9fD3.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ch9nSO9i.mjs +0 -26
@@ -8549,6 +8549,21 @@ var RelocateJobSchema = object({
8549
8549
  bytesMoved: number().int(),
8550
8550
  /** Total files discovered up front; null while (or when) unknown. */
8551
8551
  filesTotal: number().int().nullable(),
8552
+ /**
8553
+ * Rows this run CORRECTED while moving them — a durable mutation the move
8554
+ * made that nobody asked for, so it is reported where the operator reads the
8555
+ * job rather than only in a log line.
8556
+ *
8557
+ * A footage segment records its byte count in its own NAME, and the durable
8558
+ * hour row derives its aggregates from those names. A file that does not
8559
+ * match its name therefore makes the ledger's sums — and with them quota and
8560
+ * pressure eviction — wrong by the difference, and only a rename can fix it.
8561
+ * On 2026-08-30 one such row also stalled a 110 749-file drain permanently.
8562
+ *
8563
+ * Absent on lanes where the question has no meaning: a media blob's size is
8564
+ * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8565
+ */
8566
+ rowsReconciled: number().int().nonnegative().optional(),
8552
8567
  startedAt: number(),
8553
8568
  finishedAt: number().nullable(),
8554
8569
  error: string().nullable()
@@ -8617,14 +8632,42 @@ var RelocateMediaInputSchema = object({
8617
8632
  /** Omitted = `move`, the pre-existing behaviour. */
8618
8633
  mode: MediaRelocateModeSchema.optional()
8619
8634
  });
8620
- /** How many rows still carry NO `locationId` — the population a repoint would
8621
- * silently re-aim at a disk that does not hold their bytes. Zero is the only
8622
- * value that permits a non-blocking `eventMedia` cutover. */
8623
- var UnstampedEventMediaCountSchema = object({
8624
- media: number().int().nonnegative(),
8625
- retrainFrames: number().int().nonnegative(),
8626
- total: number().int().nonnegative()
8635
+ /**
8636
+ * The unstamped population of ONE collection split, because the gate and the
8637
+ * operator ask two different questions and only one of them has to be cheap.
8638
+ *
8639
+ * `present` is the GATE: "is there at least one row that would be orphaned by a
8640
+ * repoint". It is a single indexed seek to the first matching row, so it stays
8641
+ * answerable on a saturated disk and answers in O(log n) precisely in the state
8642
+ * that matters — after a seal, when the population is empty.
8643
+ *
8644
+ * `rows` is the NUMBER, for the refusal message and the operator's sense of
8645
+ * scale. It is a second, indexed `COUNT(*)`, and `null` means **not
8646
+ * measurable** — never zero. `{ present: true, rows: null }` is a legitimate
8647
+ * and useful answer: "there are some, and this read could not say how many"
8648
+ * still refuses the cutover, which is the whole job.
8649
+ */
8650
+ var UnstampedRowsSchema = object({
8651
+ present: boolean(),
8652
+ rows: number().int().nonnegative().nullable()
8627
8653
  });
8654
+ /**
8655
+ * How many rows still carry NO `locationId` — the population a repoint would
8656
+ * silently re-aim at a disk that does not hold their bytes.
8657
+ *
8658
+ * **`null` = the count could not be taken**, and it is NOT permission to cut
8659
+ * over. The gate opens on a measured absence and on nothing else; an unread
8660
+ * collection and an empty one are different facts, and this repo has already
8661
+ * paid for conflating them (`RelocateResidueSchema`, D295).
8662
+ */
8663
+ var UnstampedEventMediaCountSchema = object({
8664
+ media: UnstampedRowsSchema,
8665
+ retrainFrames: UnstampedRowsSchema,
8666
+ /** True when EITHER collection holds one. The refusal reads this. */
8667
+ anyPresent: boolean(),
8668
+ /** Sum across both, or `null` when either lane could not be counted. */
8669
+ total: number().int().nonnegative().nullable()
8670
+ }).nullable();
8628
8671
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8629
8672
  /** The independently selectable logical storage classes — every class
8630
8673
  * `storage.listLocationDeclarations` reports, so an operator never meets a
@@ -8735,6 +8778,10 @@ var StorageMigrationMoveProgressSchema = object({
8735
8778
  /** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
8736
8779
  filesTotal: number().int().nonnegative().nullable(),
8737
8780
  bytesMoved: number().int().nonnegative(),
8781
+ /** Rows the mover corrected while moving them — see `RelocateJob`. Absent on
8782
+ * a lane that cannot reconcile. A migration that silently rewrote durable
8783
+ * rows would be the same failure as one that silently skipped them. */
8784
+ rowsReconciled: number().int().nonnegative().optional(),
8738
8785
  /** The MOVER's start, not the migration's: a drain restarted after an addon
8739
8786
  * crash gets a new mover, and a rate computed from the migration's start
8740
8787
  * would silently average in the time nothing was running. */
@@ -13475,6 +13522,114 @@ method(object({
13475
13522
  height: number()
13476
13523
  }), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
13477
13524
  /**
13525
+ * `failure-contribution` — the capability an addon reports its OWN losses
13526
+ * through, per camera, with the denominator attached. It stores nothing.
13527
+ *
13528
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13529
+ *
13530
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13531
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13532
+ * copied: the contributor reports what it already knows, hub-main adds only
13533
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13534
+ * somebody to forget to edit.
13535
+ *
13536
+ * They are not merged, because their invariants are opposites:
13537
+ *
13538
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13539
+ * claim a camera cost nothing, which is a measurement nobody made;
13540
+ * - a `failure-contribution` zero is the **most valuable value on the
13541
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13542
+ * and it is exactly what an absent entry cannot say.
13543
+ *
13544
+ * Putting a loss counter on a cost entry would also break the reconciliation
13545
+ * that gives `load-contribution` its point: contributions are subtracted from
13546
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13547
+ * has no process.
13548
+ *
13549
+ * ## Why not a log line, since the counters already exist
13550
+ *
13551
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13552
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13553
+ * ends in a log line, and a log line is the thing the operator asked to stop
13554
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13555
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13556
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13557
+ * media blackout were both diagnosed. The counters stay; this is where they can
13558
+ * be READ.
13559
+ *
13560
+ * ## The rate is served with its denominator or not at all
13561
+ *
13562
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13563
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13564
+ * than yesterday" and was **flat across twelve hours** once divided by the
13565
+ * successes on the same path. A surface that publishes only the numerator
13566
+ * reproduces that mistake on every read.
13567
+ *
13568
+ * ## Shape
13569
+ *
13570
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13571
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13572
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13573
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13574
+ * a forked runner's entries reach hub-main over transport that already exists.
13575
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13576
+ * result through `system.getFailureContributions`.
13577
+ */
13578
+ var FailureReasonCountSchema = object({
13579
+ /**
13580
+ * Why the attempt did not land, in the contributor's own vocabulary —
13581
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13582
+ * strings that already appear in this repo's logs and, where one exists, the
13583
+ * same string the per-track `previewMissReason` records (D276): a second
13584
+ * vocabulary for the same loss would make the row and the counter
13585
+ * un-joinable.
13586
+ */
13587
+ reason: string(),
13588
+ count: number().int().nonnegative()
13589
+ });
13590
+ var FailureContributionSchema = object({
13591
+ /**
13592
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13593
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13594
+ * `unit` free: the families are owned by different addons and a shared enum
13595
+ * is a central list that rots invisibly.
13596
+ */
13597
+ family: string(),
13598
+ /**
13599
+ * The NUMERIC device id — the same value every log line carries as
13600
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13601
+ * cannot name the camera must not emit the entry, because a fleet total
13602
+ * cannot answer the only question anybody asks of this surface.
13603
+ */
13604
+ deviceId: number().int().positive(),
13605
+ /**
13606
+ * A second dimension inside the family: the model / step id for an inference
13607
+ * timeout, so "which camera AND which model" is one read. Absent when the
13608
+ * family has a single variant.
13609
+ */
13610
+ variant: string().optional(),
13611
+ /**
13612
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13613
+ * differencing two reads must drop the interval when it changes, because the
13614
+ * counter restarted from zero in a respawned runner. Same discipline as
13615
+ * `LoadContribution.startedAtMs`.
13616
+ */
13617
+ sinceMs: number(),
13618
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13619
+ atMs: number(),
13620
+ /**
13621
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13622
+ * window. A failure count published without it is the mistake this schema
13623
+ * exists to make impossible.
13624
+ */
13625
+ attempts: number().int().nonnegative(),
13626
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13627
+ succeeded: number().int().nonnegative(),
13628
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13629
+ reasons: array(FailureReasonCountSchema).readonly()
13630
+ });
13631
+ method(_void(), array(FailureContributionSchema).readonly());
13632
+ /**
13478
13633
  * filesystem-browse — per-node capability for browsing the node's local
13479
13634
  * filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
13480
13635
  * are sandboxed to operator-configured allowed roots (D115). Used by the
@@ -13996,6 +14151,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13996
14151
  kind: "mutation",
13997
14152
  auth: "admin"
13998
14153
  });
14154
+ var LoadContributionSchema = object({
14155
+ role: _enum([
14156
+ "decode",
14157
+ "transcode",
14158
+ "recording",
14159
+ "streaming",
14160
+ "detection"
14161
+ ]),
14162
+ /**
14163
+ * The NUMERIC device id — the same value every log line carries as
14164
+ * `tags.deviceId`. `null` means this cost genuinely belongs to no single
14165
+ * camera (a shared pool), NOT that the contributor forgot to look it up: a
14166
+ * contributor that cannot name its camera must not emit the entry at all,
14167
+ * because an unnamed per-camera entry is indistinguishable from a shared one
14168
+ * and would quietly turn one camera's cost into everybody's.
14169
+ */
14170
+ deviceId: number().int().positive().nullable(),
14171
+ attribution: _enum([
14172
+ "measured",
14173
+ "accounted",
14174
+ "unattributable"
14175
+ ]),
14176
+ /**
14177
+ * What ONE entry is, in the contributor's own words — `615/high`,
14178
+ * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
14179
+ * family and inventing a common one would lose the only information that
14180
+ * makes two entries for the same camera distinguishable.
14181
+ */
14182
+ unit: string(),
14183
+ /**
14184
+ * The OS process this cost lives in, when there is one. Present so a
14185
+ * consumer can (a) tell two generations of the same unit apart across a
14186
+ * restart, and (b) subtract claimed processes from the node's process
14187
+ * snapshot to see what NOBODY claimed. Absent for an entry that owns no
14188
+ * process of its own.
14189
+ */
14190
+ pid: number().int().positive().optional(),
14191
+ /**
14192
+ * When this generation started. The pid's incarnation marker: a consumer
14193
+ * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
14194
+ * window when this changes, because the counter restarted from zero in a new
14195
+ * process.
14196
+ */
14197
+ startedAtMs: number().optional(),
14198
+ /**
14199
+ * CUMULATIVE CPU seconds this unit has consumed since it started — user +
14200
+ * system, read from the child's own `/proc/<pid>/stat` at the moment the
14201
+ * contribution is asked for.
14202
+ *
14203
+ * Cumulative and not a rate on purpose: a rate needs a window, a window
14204
+ * needs a sampler, and a new per-node sampler is the defect half of
14205
+ * `docs/architecture/load-ledger.md` documents. A counter can be differenced
14206
+ * by whoever already keeps a history; a rate cannot be un-averaged.
14207
+ *
14208
+ * Absent — never zero — on a node with no `/proc`, on a read failure, and on
14209
+ * an entry with no process.
14210
+ */
14211
+ cpuSeconds: number().optional(),
14212
+ /** Resident bytes of this unit's process, same source and same rules. */
14213
+ rssBytes: number().optional()
14214
+ });
14215
+ method(_void(), array(LoadContributionSchema).readonly());
13999
14216
  /**
14000
14217
  * `log-channels` — the capability an addon DECLARES its diagnostic channels
14001
14218
  * through. It stores nothing.
@@ -14072,176 +14289,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
14072
14289
  tags: record(string(), string()).optional()
14073
14290
  }), array(LogEntrySchema).readonly());
14074
14291
  /**
14075
- * `failure-contribution` — the capability an addon reports its OWN losses
14076
- * through, per camera, with the denominator attached. It stores nothing.
14077
- *
14078
- * ## The twin of `load-contribution`, and why it is a twin and not a field
14079
- *
14080
- * `load-contribution` answers *what did this camera COST*. This answers *what
14081
- * did this camera LOSE*. The reporting discipline is identical and deliberately
14082
- * copied: the contributor reports what it already knows, hub-main adds only
14083
- * `addonId`, nothing needs global knowledge, and there is no central list for
14084
- * somebody to forget to edit.
14085
- *
14086
- * They are not merged, because their invariants are opposites:
14087
- *
14088
- * - a `load-contribution` measurement is **absent, never zero** — a zero would
14089
- * claim a camera cost nothing, which is a measurement nobody made;
14090
- * - a `failure-contribution` zero is the **most valuable value on the
14091
- * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
14092
- * and it is exactly what an absent entry cannot say.
14093
- *
14094
- * Putting a loss counter on a cost entry would also break the reconciliation
14095
- * that gives `load-contribution` its point: contributions are subtracted from
14096
- * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
14097
- * has no process.
14098
- *
14099
- * ## Why not a log line, since the counters already exist
14100
- *
14101
- * Several of these paths already counted themselves — `CaptureScheduler`'s
14102
- * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
14103
- * ends in a log line, and a log line is the thing the operator asked to stop
14104
- * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
14105
- * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
14106
- * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
14107
- * media blackout were both diagnosed. The counters stay; this is where they can
14108
- * be READ.
14109
- *
14110
- * ## The rate is served with its denominator or not at all
14111
- *
14112
- * Every entry carries `attempts` and `succeeded`. A miss count alone is
14113
- * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
14114
- * than yesterday" and was **flat across twelve hours** once divided by the
14115
- * successes on the same path. A surface that publishes only the numerator
14116
- * reproduces that mistake on every read.
14117
- *
14118
- * ## Shape
14119
- *
14120
- * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
14121
- * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
14122
- * generated hooks, while `addons.listCapabilityProviders` still enumerates it
14123
- * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
14124
- * a forked runner's entries reach hub-main over transport that already exists.
14125
- * No new UDS message, no second registry (D3). The operator reads the assembled
14126
- * result through `system.getFailureContributions`.
14127
- */
14128
- var FailureReasonCountSchema = object({
14129
- /**
14130
- * Why the attempt did not land, in the contributor's own vocabulary —
14131
- * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
14132
- * strings that already appear in this repo's logs and, where one exists, the
14133
- * same string the per-track `previewMissReason` records (D276): a second
14134
- * vocabulary for the same loss would make the row and the counter
14135
- * un-joinable.
14136
- */
14137
- reason: string(),
14138
- count: number().int().nonnegative()
14139
- });
14140
- var FailureContributionSchema = object({
14141
- /**
14142
- * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
14143
- * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
14144
- * `unit` free: the families are owned by different addons and a shared enum
14145
- * is a central list that rots invisibly.
14146
- */
14147
- family: string(),
14148
- /**
14149
- * The NUMERIC device id — the same value every log line carries as
14150
- * `tags.deviceId`. Never nullable and never absent: a contributor that
14151
- * cannot name the camera must not emit the entry, because a fleet total
14152
- * cannot answer the only question anybody asks of this surface.
14153
- */
14154
- deviceId: number().int().positive(),
14155
- /**
14156
- * A second dimension inside the family: the model / step id for an inference
14157
- * timeout, so "which camera AND which model" is one read. Absent when the
14158
- * family has a single variant.
14159
- */
14160
- variant: string().optional(),
14161
- /**
14162
- * Epoch ms this counter started — the INCARNATION MARKER. A consumer
14163
- * differencing two reads must drop the interval when it changes, because the
14164
- * counter restarted from zero in a respawned runner. Same discipline as
14165
- * `LoadContribution.startedAtMs`.
14166
- */
14167
- sinceMs: number(),
14168
- /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
14169
- atMs: number(),
14170
- /**
14171
- * THE DENOMINATOR — every attempt on this path for this camera in the
14172
- * window. A failure count published without it is the mistake this schema
14173
- * exists to make impossible.
14174
- */
14175
- attempts: number().int().nonnegative(),
14176
- /** Attempts that landed. `attempts - succeeded` is the loss. */
14177
- succeeded: number().int().nonnegative(),
14178
- /** The loss, partitioned. Sums to `attempts - succeeded`. */
14179
- reasons: array(FailureReasonCountSchema).readonly()
14180
- });
14181
- method(_void(), array(FailureContributionSchema).readonly());
14182
- var LoadContributionSchema = object({
14183
- role: _enum([
14184
- "decode",
14185
- "transcode",
14186
- "recording",
14187
- "streaming",
14188
- "detection"
14189
- ]),
14190
- /**
14191
- * The NUMERIC device id — the same value every log line carries as
14192
- * `tags.deviceId`. `null` means this cost genuinely belongs to no single
14193
- * camera (a shared pool), NOT that the contributor forgot to look it up: a
14194
- * contributor that cannot name its camera must not emit the entry at all,
14195
- * because an unnamed per-camera entry is indistinguishable from a shared one
14196
- * and would quietly turn one camera's cost into everybody's.
14197
- */
14198
- deviceId: number().int().positive().nullable(),
14199
- attribution: _enum([
14200
- "measured",
14201
- "accounted",
14202
- "unattributable"
14203
- ]),
14204
- /**
14205
- * What ONE entry is, in the contributor's own words — `615/high`,
14206
- * `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
14207
- * family and inventing a common one would lose the only information that
14208
- * makes two entries for the same camera distinguishable.
14209
- */
14210
- unit: string(),
14211
- /**
14212
- * The OS process this cost lives in, when there is one. Present so a
14213
- * consumer can (a) tell two generations of the same unit apart across a
14214
- * restart, and (b) subtract claimed processes from the node's process
14215
- * snapshot to see what NOBODY claimed. Absent for an entry that owns no
14216
- * process of its own.
14217
- */
14218
- pid: number().int().positive().optional(),
14219
- /**
14220
- * When this generation started. The pid's incarnation marker: a consumer
14221
- * differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
14222
- * window when this changes, because the counter restarted from zero in a new
14223
- * process.
14224
- */
14225
- startedAtMs: number().optional(),
14226
- /**
14227
- * CUMULATIVE CPU seconds this unit has consumed since it started — user +
14228
- * system, read from the child's own `/proc/<pid>/stat` at the moment the
14229
- * contribution is asked for.
14230
- *
14231
- * Cumulative and not a rate on purpose: a rate needs a window, a window
14232
- * needs a sampler, and a new per-node sampler is the defect half of
14233
- * `docs/architecture/load-ledger.md` documents. A counter can be differenced
14234
- * by whoever already keeps a history; a rate cannot be un-averaged.
14235
- *
14236
- * Absent — never zero — on a node with no `/proc`, on a read failure, and on
14237
- * an entry with no process.
14238
- */
14239
- cpuSeconds: number().optional(),
14240
- /** Resident bytes of this unit's process, same source and same rules. */
14241
- rssBytes: number().optional()
14242
- });
14243
- method(_void(), array(LoadContributionSchema).readonly());
14244
- /**
14245
14292
  * `login-method` — collection cap through which auth addons contribute
14246
14293
  * their pre-auth login surfaces to the login page. This is the SINGLE,
14247
14294
  * generic mechanism that supersedes the dead `auth.listProviders` reader:
@@ -18907,12 +18954,53 @@ var MediaFileKindEnum = _enum([
18907
18954
  "keyFrameSmall",
18908
18955
  "thumbnailSmall"
18909
18956
  ]);
18957
+ /**
18958
+ * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
18959
+ * ARE — never the bytes themselves.
18960
+ *
18961
+ * ## Why `url` and not `base64`
18962
+ *
18963
+ * Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
18964
+ * with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
18965
+ * was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
18966
+ * wire. Forty events is ~144 MB. Every byte of it was read off disk,
18967
+ * base64-encoded, held whole in a unary tRPC envelope, and materialised in
18968
+ * hub-main's heap on the way past — for an `<img>` that would have cached it.
18969
+ *
18970
+ * `url` points at the `event-media` data plane
18971
+ * (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
18972
+ * with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
18973
+ * render a `?variant=thumb`, and streams. The hub gate in front of it requires
18974
+ * a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
18975
+ * no less protected than they were inside a `view`-level cap response — see
18976
+ * `data-plane-access.ts` for the rule and the one gap it does not close
18977
+ * (per-device scoping).
18978
+ *
18979
+ * The URL is built from the row's **stored** key, which is not always its
18980
+ * published `kind`: a track's face/plate crop is stored as `crop` under
18981
+ * `('face'|'plate', '<prefix>-<trackId>')` and published as
18982
+ * `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
18983
+ *
18984
+ * ## `base64` is TRANSITIONAL and is going away
18985
+ *
18986
+ * It is still populated for one reason: the deployed viewer's track-detail
18987
+ * HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
18988
+ * REQUIRES the field), and a row without it parses as a FAILED read — the red
18989
+ * triangle — not as absence. Removing the field before that viewer ships is an
18990
+ * outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
18991
+ * delete this line and the `withBytes` pass-through in
18992
+ * `analytics-query-facade.ts`; nothing else reads it.
18993
+ */
18910
18994
  var MediaFileSchema = object({
18911
18995
  key: string(),
18912
18996
  kind: MediaFileKindEnum,
18913
- base64: string(),
18914
18997
  sizeBytes: number(),
18915
18998
  timestamp: number()
18999
+ }).extend({
19000
+ /** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
19001
+ url: string(),
19002
+ /** @deprecated Transitional — see the schema docblock. Use {@link url}. */
19003
+ base64: string()
18916
19004
  });
18917
19005
  /**
18918
19006
  * One media row WITHOUT its bytes.
@@ -18924,7 +19012,9 @@ var MediaFileSchema = object({
18924
19012
  * blocks the whole view.
18925
19013
  *
18926
19014
  * `sizeBytes` is carried because it is what lets a client decide between the
18927
- * stored blob and a `?variant=thumb` rendering without fetching either.
19015
+ * stored blob and a `?variant=thumb` rendering without fetching either, and
19016
+ * `url` because a client that had to build the plane path itself is a second
19017
+ * copy of a route — the embed, the viewer and the admin UI each grew one.
18928
19018
  */
18929
19019
  var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
18930
19020
  /**
@@ -19613,6 +19703,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19613
19703
  }), array(MediaFileSchema).readonly()), method(object({
19614
19704
  trackId: string(),
19615
19705
  deviceId: number()
19706
+ }), array(MediaFileInfoSchema).readonly()), method(object({
19707
+ eventId: string(),
19708
+ deviceId: number()
19616
19709
  }), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
19617
19710
  kind: "mutation",
19618
19711
  auth: "admin"
@@ -23873,10 +23966,24 @@ var FaceClusterSchema = object({
23873
23966
  size: number().int(),
23874
23967
  cohesion: number()
23875
23968
  });
23969
+ /**
23970
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
23971
+ * are — never the bytes.
23972
+ *
23973
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
23974
+ * track/event contract) is still populated because a deployed viewer requires
23975
+ * the field to parse a row at all; this method has no such reader. Its ONE
23976
+ * caller is the admin UI's detail modal, which was building
23977
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
23978
+ * dialog already rendering its key FRAME from the `event-media` plane.
23979
+ *
23980
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
23981
+ * media key directly, so this needed no new plane and no new access decision.
23982
+ */
23876
23983
  var MediaFileLiteSchema$1 = object({
23877
23984
  key: string(),
23878
23985
  kind: string(),
23879
- base64: string(),
23986
+ url: string(),
23880
23987
  sizeBytes: number(),
23881
23988
  timestamp: number()
23882
23989
  });
@@ -26128,10 +26235,24 @@ var PlateInfoSchema = object({
26128
26235
  */
26129
26236
  cropUrl: string().optional()
26130
26237
  });
26238
+ /**
26239
+ * One gallery media row: what the crop is, how big it is, and WHERE its bytes
26240
+ * are — never the bytes.
26241
+ *
26242
+ * `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
26243
+ * track/event contract) is still populated because a deployed viewer requires
26244
+ * the field to parse a row at all; this method has no such reader. Its ONE
26245
+ * caller is the admin UI's detail modal, which was building
26246
+ * `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
26247
+ * dialog already rendering its key FRAME from the `event-media` plane.
26248
+ *
26249
+ * `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
26250
+ * media key directly, so this needed no new plane and no new access decision.
26251
+ */
26131
26252
  var MediaFileLiteSchema = object({
26132
26253
  key: string(),
26133
26254
  kind: string(),
26134
- base64: string(),
26255
+ url: string(),
26135
26256
  sizeBytes: number(),
26136
26257
  timestamp: number()
26137
26258
  });
@@ -32144,6 +32265,12 @@ Object.freeze({
32144
32265
  addonId: null,
32145
32266
  access: "view"
32146
32267
  },
32268
+ "pipelineAnalytics.listEventMedia": {
32269
+ capName: "pipeline-analytics",
32270
+ capScope: "device",
32271
+ addonId: null,
32272
+ access: "view"
32273
+ },
32147
32274
  "pipelineAnalytics.listGroups": {
32148
32275
  capName: "pipeline-analytics",
32149
32276
  capScope: "device",
@@ -35767,6 +35894,11 @@ Object.freeze({
35767
35894
  form: "array",
35768
35895
  optional: false
35769
35896
  }],
35897
+ "pipelineAnalytics.listEventMedia": [{
35898
+ name: "deviceId",
35899
+ form: "single",
35900
+ optional: false
35901
+ }],
35770
35902
  "pipelineAnalytics.listGroups": [{
35771
35903
  name: "deviceIds",
35772
35904
  form: "array",
@@ -1,5 +1,5 @@
1
1
  import { h as e, l as t, u as n, y as r } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
- import { o as i, s as a } from "./responsive-CUUfCGVt.mjs";
2
+ import { o as i, s as a } from "./responsive-DumBDPmA.mjs";
3
3
  import { n as o, r as s, t as c } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
4
4
  var l = a("chevron-down", [["path", {
5
5
  d: "m6 9 6 6 6-6",
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DW2n6IfQ.mjs";
1
+ import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DkSj9fD3.mjs";
2
2
  export { t as get, e as init };
@@ -1,6 +1,6 @@
1
1
  import { c as e, g as t, h as n, l as r, n as i, p as a, r as o, t as s, u as c, y as l } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
2
  import "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
3
- import { n as u } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ch9nSO9i.mjs";
3
+ import { n as u } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BEv5J4au.mjs";
4
4
  //#region ../ui-library/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
5
5
  l();
6
6
  var d = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), f = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), p = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), m = (e) => {
@@ -1,4 +1,4 @@
1
- import { s as e } from "./responsive-CUUfCGVt.mjs";
1
+ import { s as e } from "./responsive-DumBDPmA.mjs";
2
2
  var t = e("eye-off", [
3
3
  ["path", {
4
4
  d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
@@ -1,4 +1,4 @@
1
- import { s as e } from "./responsive-CUUfCGVt.mjs";
1
+ import { s as e } from "./responsive-DumBDPmA.mjs";
2
2
  var t = e("trash-2", [
3
3
  ["path", {
4
4
  d: "M10 11v6",
@@ -1,5 +1,5 @@
1
1
  import { c as e, h as t, p as n, y as r } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DJDHChgO.mjs";
2
- import { s as i } from "./responsive-CUUfCGVt.mjs";
2
+ import { s as i } from "./responsive-DumBDPmA.mjs";
3
3
  var a = i("camera", [["path", {
4
4
  d: "M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",
5
5
  key: "18u6gg"
@@ -2753,7 +2753,7 @@ async function rr(e) {
2753
2753
  }
2754
2754
  }
2755
2755
  async function ir() {
2756
- return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DWs1_4xY.mjs")).catch((e) => {
2756
+ return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-_UMbIXm8.mjs")).catch((e) => {
2757
2757
  throw tr = void 0, e;
2758
2758
  }), tr;
2759
2759
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-model-studio",
3
- "version": "1.1.62",
3
+ "version": "1.1.64",
4
4
  "description": "Custom detection model registry, conversion & distribution for CamStack",
5
5
  "keywords": [
6
6
  "camstack",