@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.
- package/dist/{MotionZonesSettings-Bs3JGKkN.mjs → MotionZonesSettings-Csh9Okvs.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-CKY_Zd76.mjs → PrivacyMaskSettings-D7aBKmIl.mjs} +4 -4
- package/dist/{SceneMonitorEditor-O2nnwm0s.mjs → SceneMonitorEditor-C7d4QdK2.mjs} +3 -3
- package/dist/_stub.js +11 -11
- 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
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BEv5J4au.mjs +26 -0
- package/dist/{hostInit-JUNzADlm.mjs → hostInit-ChZMP5Bt.mjs} +3 -3
- package/dist/model-studio.addon.js +313 -181
- package/dist/model-studio.addon.mjs +313 -181
- package/dist/{player-overlays-CEwcewTI.mjs → player-overlays-C3k5161p.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-CUUfCGVt.mjs → responsive-DumBDPmA.mjs} +1 -1
- package/dist/{square-tBwuj1tn.mjs → square-39X7CNAb.mjs} +1 -1
- package/dist/{trash-2-Bu1QShSc.mjs → trash-2-CqLF5pGv.mjs} +1 -1
- package/dist/{use-device-snapshot-D86u2wfz.mjs → use-device-snapshot-B7Pamux4.mjs} +1 -1
- 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
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ch9nSO9i.mjs +0 -26
|
@@ -8570,6 +8570,21 @@ var RelocateJobSchema = object({
|
|
|
8570
8570
|
bytesMoved: number().int(),
|
|
8571
8571
|
/** Total files discovered up front; null while (or when) unknown. */
|
|
8572
8572
|
filesTotal: number().int().nullable(),
|
|
8573
|
+
/**
|
|
8574
|
+
* Rows this run CORRECTED while moving them — a durable mutation the move
|
|
8575
|
+
* made that nobody asked for, so it is reported where the operator reads the
|
|
8576
|
+
* job rather than only in a log line.
|
|
8577
|
+
*
|
|
8578
|
+
* A footage segment records its byte count in its own NAME, and the durable
|
|
8579
|
+
* hour row derives its aggregates from those names. A file that does not
|
|
8580
|
+
* match its name therefore makes the ledger's sums — and with them quota and
|
|
8581
|
+
* pressure eviction — wrong by the difference, and only a rename can fix it.
|
|
8582
|
+
* On 2026-08-30 one such row also stalled a 110 749-file drain permanently.
|
|
8583
|
+
*
|
|
8584
|
+
* Absent on lanes where the question has no meaning: a media blob's size is
|
|
8585
|
+
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8586
|
+
*/
|
|
8587
|
+
rowsReconciled: number().int().nonnegative().optional(),
|
|
8573
8588
|
startedAt: number(),
|
|
8574
8589
|
finishedAt: number().nullable(),
|
|
8575
8590
|
error: string().nullable()
|
|
@@ -8638,14 +8653,42 @@ var RelocateMediaInputSchema = object({
|
|
|
8638
8653
|
/** Omitted = `move`, the pre-existing behaviour. */
|
|
8639
8654
|
mode: MediaRelocateModeSchema.optional()
|
|
8640
8655
|
});
|
|
8641
|
-
/**
|
|
8642
|
-
*
|
|
8643
|
-
*
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8656
|
+
/**
|
|
8657
|
+
* The unstamped population of ONE collection — split, because the gate and the
|
|
8658
|
+
* operator ask two different questions and only one of them has to be cheap.
|
|
8659
|
+
*
|
|
8660
|
+
* `present` is the GATE: "is there at least one row that would be orphaned by a
|
|
8661
|
+
* repoint". It is a single indexed seek to the first matching row, so it stays
|
|
8662
|
+
* answerable on a saturated disk and answers in O(log n) precisely in the state
|
|
8663
|
+
* that matters — after a seal, when the population is empty.
|
|
8664
|
+
*
|
|
8665
|
+
* `rows` is the NUMBER, for the refusal message and the operator's sense of
|
|
8666
|
+
* scale. It is a second, indexed `COUNT(*)`, and `null` means **not
|
|
8667
|
+
* measurable** — never zero. `{ present: true, rows: null }` is a legitimate
|
|
8668
|
+
* and useful answer: "there are some, and this read could not say how many"
|
|
8669
|
+
* still refuses the cutover, which is the whole job.
|
|
8670
|
+
*/
|
|
8671
|
+
var UnstampedRowsSchema = object({
|
|
8672
|
+
present: boolean(),
|
|
8673
|
+
rows: number().int().nonnegative().nullable()
|
|
8648
8674
|
});
|
|
8675
|
+
/**
|
|
8676
|
+
* How many rows still carry NO `locationId` — the population a repoint would
|
|
8677
|
+
* silently re-aim at a disk that does not hold their bytes.
|
|
8678
|
+
*
|
|
8679
|
+
* **`null` = the count could not be taken**, and it is NOT permission to cut
|
|
8680
|
+
* over. The gate opens on a measured absence and on nothing else; an unread
|
|
8681
|
+
* collection and an empty one are different facts, and this repo has already
|
|
8682
|
+
* paid for conflating them (`RelocateResidueSchema`, D295).
|
|
8683
|
+
*/
|
|
8684
|
+
var UnstampedEventMediaCountSchema = object({
|
|
8685
|
+
media: UnstampedRowsSchema,
|
|
8686
|
+
retrainFrames: UnstampedRowsSchema,
|
|
8687
|
+
/** True when EITHER collection holds one. The refusal reads this. */
|
|
8688
|
+
anyPresent: boolean(),
|
|
8689
|
+
/** Sum across both, or `null` when either lane could not be counted. */
|
|
8690
|
+
total: number().int().nonnegative().nullable()
|
|
8691
|
+
}).nullable();
|
|
8649
8692
|
var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
|
|
8650
8693
|
/** The independently selectable logical storage classes — every class
|
|
8651
8694
|
* `storage.listLocationDeclarations` reports, so an operator never meets a
|
|
@@ -8756,6 +8799,10 @@ var StorageMigrationMoveProgressSchema = object({
|
|
|
8756
8799
|
/** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
|
|
8757
8800
|
filesTotal: number().int().nonnegative().nullable(),
|
|
8758
8801
|
bytesMoved: number().int().nonnegative(),
|
|
8802
|
+
/** Rows the mover corrected while moving them — see `RelocateJob`. Absent on
|
|
8803
|
+
* a lane that cannot reconcile. A migration that silently rewrote durable
|
|
8804
|
+
* rows would be the same failure as one that silently skipped them. */
|
|
8805
|
+
rowsReconciled: number().int().nonnegative().optional(),
|
|
8759
8806
|
/** The MOVER's start, not the migration's: a drain restarted after an addon
|
|
8760
8807
|
* crash gets a new mover, and a rate computed from the migration's start
|
|
8761
8808
|
* would silently average in the time nothing was running. */
|
|
@@ -13496,6 +13543,114 @@ method(object({
|
|
|
13496
13543
|
height: number()
|
|
13497
13544
|
}), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
|
|
13498
13545
|
/**
|
|
13546
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
13547
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
13548
|
+
*
|
|
13549
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
13550
|
+
*
|
|
13551
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
13552
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
13553
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
13554
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
13555
|
+
* somebody to forget to edit.
|
|
13556
|
+
*
|
|
13557
|
+
* They are not merged, because their invariants are opposites:
|
|
13558
|
+
*
|
|
13559
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
13560
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
13561
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
13562
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
13563
|
+
* and it is exactly what an absent entry cannot say.
|
|
13564
|
+
*
|
|
13565
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
13566
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
13567
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
13568
|
+
* has no process.
|
|
13569
|
+
*
|
|
13570
|
+
* ## Why not a log line, since the counters already exist
|
|
13571
|
+
*
|
|
13572
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
13573
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
13574
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
13575
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
13576
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
13577
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
13578
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
13579
|
+
* be READ.
|
|
13580
|
+
*
|
|
13581
|
+
* ## The rate is served with its denominator or not at all
|
|
13582
|
+
*
|
|
13583
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
13584
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
13585
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
13586
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
13587
|
+
* reproduces that mistake on every read.
|
|
13588
|
+
*
|
|
13589
|
+
* ## Shape
|
|
13590
|
+
*
|
|
13591
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
13592
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
13593
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
13594
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
13595
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
13596
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
13597
|
+
* result through `system.getFailureContributions`.
|
|
13598
|
+
*/
|
|
13599
|
+
var FailureReasonCountSchema = object({
|
|
13600
|
+
/**
|
|
13601
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
13602
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
13603
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
13604
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
13605
|
+
* vocabulary for the same loss would make the row and the counter
|
|
13606
|
+
* un-joinable.
|
|
13607
|
+
*/
|
|
13608
|
+
reason: string(),
|
|
13609
|
+
count: number().int().nonnegative()
|
|
13610
|
+
});
|
|
13611
|
+
var FailureContributionSchema = object({
|
|
13612
|
+
/**
|
|
13613
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
13614
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
13615
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
13616
|
+
* is a central list that rots invisibly.
|
|
13617
|
+
*/
|
|
13618
|
+
family: string(),
|
|
13619
|
+
/**
|
|
13620
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
13621
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
13622
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
13623
|
+
* cannot answer the only question anybody asks of this surface.
|
|
13624
|
+
*/
|
|
13625
|
+
deviceId: number().int().positive(),
|
|
13626
|
+
/**
|
|
13627
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
13628
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
13629
|
+
* family has a single variant.
|
|
13630
|
+
*/
|
|
13631
|
+
variant: string().optional(),
|
|
13632
|
+
/**
|
|
13633
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
13634
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
13635
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
13636
|
+
* `LoadContribution.startedAtMs`.
|
|
13637
|
+
*/
|
|
13638
|
+
sinceMs: number(),
|
|
13639
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
13640
|
+
atMs: number(),
|
|
13641
|
+
/**
|
|
13642
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
13643
|
+
* window. A failure count published without it is the mistake this schema
|
|
13644
|
+
* exists to make impossible.
|
|
13645
|
+
*/
|
|
13646
|
+
attempts: number().int().nonnegative(),
|
|
13647
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
13648
|
+
succeeded: number().int().nonnegative(),
|
|
13649
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
13650
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
13651
|
+
});
|
|
13652
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
13653
|
+
/**
|
|
13499
13654
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
13500
13655
|
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
13501
13656
|
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
@@ -14017,6 +14172,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14017
14172
|
kind: "mutation",
|
|
14018
14173
|
auth: "admin"
|
|
14019
14174
|
});
|
|
14175
|
+
var LoadContributionSchema = object({
|
|
14176
|
+
role: _enum([
|
|
14177
|
+
"decode",
|
|
14178
|
+
"transcode",
|
|
14179
|
+
"recording",
|
|
14180
|
+
"streaming",
|
|
14181
|
+
"detection"
|
|
14182
|
+
]),
|
|
14183
|
+
/**
|
|
14184
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
14185
|
+
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14186
|
+
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14187
|
+
* contributor that cannot name its camera must not emit the entry at all,
|
|
14188
|
+
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14189
|
+
* and would quietly turn one camera's cost into everybody's.
|
|
14190
|
+
*/
|
|
14191
|
+
deviceId: number().int().positive().nullable(),
|
|
14192
|
+
attribution: _enum([
|
|
14193
|
+
"measured",
|
|
14194
|
+
"accounted",
|
|
14195
|
+
"unattributable"
|
|
14196
|
+
]),
|
|
14197
|
+
/**
|
|
14198
|
+
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14199
|
+
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14200
|
+
* family and inventing a common one would lose the only information that
|
|
14201
|
+
* makes two entries for the same camera distinguishable.
|
|
14202
|
+
*/
|
|
14203
|
+
unit: string(),
|
|
14204
|
+
/**
|
|
14205
|
+
* The OS process this cost lives in, when there is one. Present so a
|
|
14206
|
+
* consumer can (a) tell two generations of the same unit apart across a
|
|
14207
|
+
* restart, and (b) subtract claimed processes from the node's process
|
|
14208
|
+
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14209
|
+
* process of its own.
|
|
14210
|
+
*/
|
|
14211
|
+
pid: number().int().positive().optional(),
|
|
14212
|
+
/**
|
|
14213
|
+
* When this generation started. The pid's incarnation marker: a consumer
|
|
14214
|
+
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14215
|
+
* window when this changes, because the counter restarted from zero in a new
|
|
14216
|
+
* process.
|
|
14217
|
+
*/
|
|
14218
|
+
startedAtMs: number().optional(),
|
|
14219
|
+
/**
|
|
14220
|
+
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14221
|
+
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14222
|
+
* contribution is asked for.
|
|
14223
|
+
*
|
|
14224
|
+
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14225
|
+
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14226
|
+
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14227
|
+
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14228
|
+
*
|
|
14229
|
+
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14230
|
+
* an entry with no process.
|
|
14231
|
+
*/
|
|
14232
|
+
cpuSeconds: number().optional(),
|
|
14233
|
+
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14234
|
+
rssBytes: number().optional()
|
|
14235
|
+
});
|
|
14236
|
+
method(_void(), array(LoadContributionSchema).readonly());
|
|
14020
14237
|
/**
|
|
14021
14238
|
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
14022
14239
|
* through. It stores nothing.
|
|
@@ -14093,176 +14310,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14093
14310
|
tags: record(string(), string()).optional()
|
|
14094
14311
|
}), array(LogEntrySchema).readonly());
|
|
14095
14312
|
/**
|
|
14096
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14097
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
14098
|
-
*
|
|
14099
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14100
|
-
*
|
|
14101
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14102
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14103
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14104
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14105
|
-
* somebody to forget to edit.
|
|
14106
|
-
*
|
|
14107
|
-
* They are not merged, because their invariants are opposites:
|
|
14108
|
-
*
|
|
14109
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14110
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14111
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14112
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14113
|
-
* and it is exactly what an absent entry cannot say.
|
|
14114
|
-
*
|
|
14115
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14116
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14117
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14118
|
-
* has no process.
|
|
14119
|
-
*
|
|
14120
|
-
* ## Why not a log line, since the counters already exist
|
|
14121
|
-
*
|
|
14122
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14123
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14124
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14125
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14126
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14127
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14128
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14129
|
-
* be READ.
|
|
14130
|
-
*
|
|
14131
|
-
* ## The rate is served with its denominator or not at all
|
|
14132
|
-
*
|
|
14133
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14134
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14135
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14136
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
14137
|
-
* reproduces that mistake on every read.
|
|
14138
|
-
*
|
|
14139
|
-
* ## Shape
|
|
14140
|
-
*
|
|
14141
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14142
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14143
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14144
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14145
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14146
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14147
|
-
* result through `system.getFailureContributions`.
|
|
14148
|
-
*/
|
|
14149
|
-
var FailureReasonCountSchema = object({
|
|
14150
|
-
/**
|
|
14151
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14152
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14153
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
14154
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
14155
|
-
* vocabulary for the same loss would make the row and the counter
|
|
14156
|
-
* un-joinable.
|
|
14157
|
-
*/
|
|
14158
|
-
reason: string(),
|
|
14159
|
-
count: number().int().nonnegative()
|
|
14160
|
-
});
|
|
14161
|
-
var FailureContributionSchema = object({
|
|
14162
|
-
/**
|
|
14163
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14164
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14165
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
14166
|
-
* is a central list that rots invisibly.
|
|
14167
|
-
*/
|
|
14168
|
-
family: string(),
|
|
14169
|
-
/**
|
|
14170
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14171
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14172
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
14173
|
-
* cannot answer the only question anybody asks of this surface.
|
|
14174
|
-
*/
|
|
14175
|
-
deviceId: number().int().positive(),
|
|
14176
|
-
/**
|
|
14177
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
14178
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14179
|
-
* family has a single variant.
|
|
14180
|
-
*/
|
|
14181
|
-
variant: string().optional(),
|
|
14182
|
-
/**
|
|
14183
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14184
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
14185
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14186
|
-
* `LoadContribution.startedAtMs`.
|
|
14187
|
-
*/
|
|
14188
|
-
sinceMs: number(),
|
|
14189
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14190
|
-
atMs: number(),
|
|
14191
|
-
/**
|
|
14192
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14193
|
-
* window. A failure count published without it is the mistake this schema
|
|
14194
|
-
* exists to make impossible.
|
|
14195
|
-
*/
|
|
14196
|
-
attempts: number().int().nonnegative(),
|
|
14197
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14198
|
-
succeeded: number().int().nonnegative(),
|
|
14199
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14200
|
-
reasons: array(FailureReasonCountSchema).readonly()
|
|
14201
|
-
});
|
|
14202
|
-
method(_void(), array(FailureContributionSchema).readonly());
|
|
14203
|
-
var LoadContributionSchema = object({
|
|
14204
|
-
role: _enum([
|
|
14205
|
-
"decode",
|
|
14206
|
-
"transcode",
|
|
14207
|
-
"recording",
|
|
14208
|
-
"streaming",
|
|
14209
|
-
"detection"
|
|
14210
|
-
]),
|
|
14211
|
-
/**
|
|
14212
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14213
|
-
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14214
|
-
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14215
|
-
* contributor that cannot name its camera must not emit the entry at all,
|
|
14216
|
-
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14217
|
-
* and would quietly turn one camera's cost into everybody's.
|
|
14218
|
-
*/
|
|
14219
|
-
deviceId: number().int().positive().nullable(),
|
|
14220
|
-
attribution: _enum([
|
|
14221
|
-
"measured",
|
|
14222
|
-
"accounted",
|
|
14223
|
-
"unattributable"
|
|
14224
|
-
]),
|
|
14225
|
-
/**
|
|
14226
|
-
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14227
|
-
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14228
|
-
* family and inventing a common one would lose the only information that
|
|
14229
|
-
* makes two entries for the same camera distinguishable.
|
|
14230
|
-
*/
|
|
14231
|
-
unit: string(),
|
|
14232
|
-
/**
|
|
14233
|
-
* The OS process this cost lives in, when there is one. Present so a
|
|
14234
|
-
* consumer can (a) tell two generations of the same unit apart across a
|
|
14235
|
-
* restart, and (b) subtract claimed processes from the node's process
|
|
14236
|
-
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14237
|
-
* process of its own.
|
|
14238
|
-
*/
|
|
14239
|
-
pid: number().int().positive().optional(),
|
|
14240
|
-
/**
|
|
14241
|
-
* When this generation started. The pid's incarnation marker: a consumer
|
|
14242
|
-
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14243
|
-
* window when this changes, because the counter restarted from zero in a new
|
|
14244
|
-
* process.
|
|
14245
|
-
*/
|
|
14246
|
-
startedAtMs: number().optional(),
|
|
14247
|
-
/**
|
|
14248
|
-
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14249
|
-
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14250
|
-
* contribution is asked for.
|
|
14251
|
-
*
|
|
14252
|
-
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14253
|
-
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14254
|
-
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14255
|
-
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14256
|
-
*
|
|
14257
|
-
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14258
|
-
* an entry with no process.
|
|
14259
|
-
*/
|
|
14260
|
-
cpuSeconds: number().optional(),
|
|
14261
|
-
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14262
|
-
rssBytes: number().optional()
|
|
14263
|
-
});
|
|
14264
|
-
method(_void(), array(LoadContributionSchema).readonly());
|
|
14265
|
-
/**
|
|
14266
14313
|
* `login-method` — collection cap through which auth addons contribute
|
|
14267
14314
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
14268
14315
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
@@ -18928,12 +18975,53 @@ var MediaFileKindEnum = _enum([
|
|
|
18928
18975
|
"keyFrameSmall",
|
|
18929
18976
|
"thumbnailSmall"
|
|
18930
18977
|
]);
|
|
18978
|
+
/**
|
|
18979
|
+
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
18980
|
+
* ARE — never the bytes themselves.
|
|
18981
|
+
*
|
|
18982
|
+
* ## Why `url` and not `base64`
|
|
18983
|
+
*
|
|
18984
|
+
* Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
|
|
18985
|
+
* with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
|
|
18986
|
+
* was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
|
|
18987
|
+
* wire. Forty events is ~144 MB. Every byte of it was read off disk,
|
|
18988
|
+
* base64-encoded, held whole in a unary tRPC envelope, and materialised in
|
|
18989
|
+
* hub-main's heap on the way past — for an `<img>` that would have cached it.
|
|
18990
|
+
*
|
|
18991
|
+
* `url` points at the `event-media` data plane
|
|
18992
|
+
* (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
|
|
18993
|
+
* with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
|
|
18994
|
+
* render a `?variant=thumb`, and streams. The hub gate in front of it requires
|
|
18995
|
+
* a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
|
|
18996
|
+
* no less protected than they were inside a `view`-level cap response — see
|
|
18997
|
+
* `data-plane-access.ts` for the rule and the one gap it does not close
|
|
18998
|
+
* (per-device scoping).
|
|
18999
|
+
*
|
|
19000
|
+
* The URL is built from the row's **stored** key, which is not always its
|
|
19001
|
+
* published `kind`: a track's face/plate crop is stored as `crop` under
|
|
19002
|
+
* `('face'|'plate', '<prefix>-<trackId>')` and published as
|
|
19003
|
+
* `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
|
|
19004
|
+
*
|
|
19005
|
+
* ## `base64` is TRANSITIONAL and is going away
|
|
19006
|
+
*
|
|
19007
|
+
* It is still populated for one reason: the deployed viewer's track-detail
|
|
19008
|
+
* HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
|
|
19009
|
+
* REQUIRES the field), and a row without it parses as a FAILED read — the red
|
|
19010
|
+
* triangle — not as absence. Removing the field before that viewer ships is an
|
|
19011
|
+
* outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
|
|
19012
|
+
* delete this line and the `withBytes` pass-through in
|
|
19013
|
+
* `analytics-query-facade.ts`; nothing else reads it.
|
|
19014
|
+
*/
|
|
18931
19015
|
var MediaFileSchema = object({
|
|
18932
19016
|
key: string(),
|
|
18933
19017
|
kind: MediaFileKindEnum,
|
|
18934
|
-
base64: string(),
|
|
18935
19018
|
sizeBytes: number(),
|
|
18936
19019
|
timestamp: number()
|
|
19020
|
+
}).extend({
|
|
19021
|
+
/** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
|
|
19022
|
+
url: string(),
|
|
19023
|
+
/** @deprecated Transitional — see the schema docblock. Use {@link url}. */
|
|
19024
|
+
base64: string()
|
|
18937
19025
|
});
|
|
18938
19026
|
/**
|
|
18939
19027
|
* One media row WITHOUT its bytes.
|
|
@@ -18945,7 +19033,9 @@ var MediaFileSchema = object({
|
|
|
18945
19033
|
* blocks the whole view.
|
|
18946
19034
|
*
|
|
18947
19035
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
18948
|
-
* stored blob and a `?variant=thumb` rendering without fetching either
|
|
19036
|
+
* stored blob and a `?variant=thumb` rendering without fetching either, and
|
|
19037
|
+
* `url` because a client that had to build the plane path itself is a second
|
|
19038
|
+
* copy of a route — the embed, the viewer and the admin UI each grew one.
|
|
18949
19039
|
*/
|
|
18950
19040
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
18951
19041
|
/**
|
|
@@ -19634,6 +19724,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19634
19724
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
19635
19725
|
trackId: string(),
|
|
19636
19726
|
deviceId: number()
|
|
19727
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
19728
|
+
eventId: string(),
|
|
19729
|
+
deviceId: number()
|
|
19637
19730
|
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
19638
19731
|
kind: "mutation",
|
|
19639
19732
|
auth: "admin"
|
|
@@ -23894,10 +23987,24 @@ var FaceClusterSchema = object({
|
|
|
23894
23987
|
size: number().int(),
|
|
23895
23988
|
cohesion: number()
|
|
23896
23989
|
});
|
|
23990
|
+
/**
|
|
23991
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
23992
|
+
* are — never the bytes.
|
|
23993
|
+
*
|
|
23994
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
23995
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
23996
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
23997
|
+
* caller is the admin UI's detail modal, which was building
|
|
23998
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
23999
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
24000
|
+
*
|
|
24001
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
24002
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
24003
|
+
*/
|
|
23897
24004
|
var MediaFileLiteSchema$1 = object({
|
|
23898
24005
|
key: string(),
|
|
23899
24006
|
kind: string(),
|
|
23900
|
-
|
|
24007
|
+
url: string(),
|
|
23901
24008
|
sizeBytes: number(),
|
|
23902
24009
|
timestamp: number()
|
|
23903
24010
|
});
|
|
@@ -26149,10 +26256,24 @@ var PlateInfoSchema = object({
|
|
|
26149
26256
|
*/
|
|
26150
26257
|
cropUrl: string().optional()
|
|
26151
26258
|
});
|
|
26259
|
+
/**
|
|
26260
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
26261
|
+
* are — never the bytes.
|
|
26262
|
+
*
|
|
26263
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
26264
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
26265
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
26266
|
+
* caller is the admin UI's detail modal, which was building
|
|
26267
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
26268
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
26269
|
+
*
|
|
26270
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
26271
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
26272
|
+
*/
|
|
26152
26273
|
var MediaFileLiteSchema = object({
|
|
26153
26274
|
key: string(),
|
|
26154
26275
|
kind: string(),
|
|
26155
|
-
|
|
26276
|
+
url: string(),
|
|
26156
26277
|
sizeBytes: number(),
|
|
26157
26278
|
timestamp: number()
|
|
26158
26279
|
});
|
|
@@ -32165,6 +32286,12 @@ Object.freeze({
|
|
|
32165
32286
|
addonId: null,
|
|
32166
32287
|
access: "view"
|
|
32167
32288
|
},
|
|
32289
|
+
"pipelineAnalytics.listEventMedia": {
|
|
32290
|
+
capName: "pipeline-analytics",
|
|
32291
|
+
capScope: "device",
|
|
32292
|
+
addonId: null,
|
|
32293
|
+
access: "view"
|
|
32294
|
+
},
|
|
32168
32295
|
"pipelineAnalytics.listGroups": {
|
|
32169
32296
|
capName: "pipeline-analytics",
|
|
32170
32297
|
capScope: "device",
|
|
@@ -35788,6 +35915,11 @@ Object.freeze({
|
|
|
35788
35915
|
form: "array",
|
|
35789
35916
|
optional: false
|
|
35790
35917
|
}],
|
|
35918
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
35919
|
+
name: "deviceId",
|
|
35920
|
+
form: "single",
|
|
35921
|
+
optional: false
|
|
35922
|
+
}],
|
|
35791
35923
|
"pipelineAnalytics.listGroups": [{
|
|
35792
35924
|
name: "deviceIds",
|
|
35793
35925
|
form: "array",
|