@camstack/addon-model-studio 1.1.63 → 1.1.65
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-B_OmCAXn.mjs → MotionZonesSettings-CSCscEA_.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-rewJAGm0.mjs → PrivacyMaskSettings-DSQAiDGn.mjs} +4 -4
- package/dist/{SceneMonitorEditor-BY4tJte_.mjs → SceneMonitorEditor-DtQhcKSo.mjs} +3 -3
- package/dist/_stub.js +11 -11
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BUHSjtFq.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DfRzGW52.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BpnVF-LU.mjs +26 -0
- package/dist/{hostInit-BqDhrCXu.mjs → hostInit-jqpYQcCX.mjs} +3 -3
- package/dist/model-studio.addon.js +331 -174
- package/dist/model-studio.addon.mjs +331 -174
- package/dist/{player-overlays-DN9nqGXk.mjs → player-overlays-VHxUWGXW.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DdrSu5QF.mjs → responsive-CL6N6yeH.mjs} +1 -1
- package/dist/{square-BVmTlLTE.mjs → square-N3Udlp-x.mjs} +1 -1
- package/dist/{trash-2-BxEQ66D3.mjs → trash-2-B_yvxJJq.mjs} +1 -1
- package/dist/{use-device-snapshot-CbpsFwcI.mjs → use-device-snapshot-Dxqt0y0z.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CQ_gHSHU.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-BT6OEgJQ.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-D0yi4BW4.mjs +0 -26
|
@@ -13522,6 +13522,114 @@ method(object({
|
|
|
13522
13522
|
height: number()
|
|
13523
13523
|
}), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
|
|
13524
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
|
+
/**
|
|
13525
13633
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
13526
13634
|
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
13527
13635
|
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
@@ -14043,6 +14151,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14043
14151
|
kind: "mutation",
|
|
14044
14152
|
auth: "admin"
|
|
14045
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());
|
|
14046
14216
|
/**
|
|
14047
14217
|
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
14048
14218
|
* through. It stores nothing.
|
|
@@ -14119,176 +14289,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14119
14289
|
tags: record(string(), string()).optional()
|
|
14120
14290
|
}), array(LogEntrySchema).readonly());
|
|
14121
14291
|
/**
|
|
14122
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14123
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
14124
|
-
*
|
|
14125
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14126
|
-
*
|
|
14127
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14128
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14129
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14130
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14131
|
-
* somebody to forget to edit.
|
|
14132
|
-
*
|
|
14133
|
-
* They are not merged, because their invariants are opposites:
|
|
14134
|
-
*
|
|
14135
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14136
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14137
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14138
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14139
|
-
* and it is exactly what an absent entry cannot say.
|
|
14140
|
-
*
|
|
14141
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14142
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14143
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14144
|
-
* has no process.
|
|
14145
|
-
*
|
|
14146
|
-
* ## Why not a log line, since the counters already exist
|
|
14147
|
-
*
|
|
14148
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14149
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14150
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14151
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14152
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14153
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14154
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14155
|
-
* be READ.
|
|
14156
|
-
*
|
|
14157
|
-
* ## The rate is served with its denominator or not at all
|
|
14158
|
-
*
|
|
14159
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14160
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14161
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14162
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
14163
|
-
* reproduces that mistake on every read.
|
|
14164
|
-
*
|
|
14165
|
-
* ## Shape
|
|
14166
|
-
*
|
|
14167
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14168
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14169
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14170
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14171
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14172
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14173
|
-
* result through `system.getFailureContributions`.
|
|
14174
|
-
*/
|
|
14175
|
-
var FailureReasonCountSchema = object({
|
|
14176
|
-
/**
|
|
14177
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14178
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14179
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
14180
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
14181
|
-
* vocabulary for the same loss would make the row and the counter
|
|
14182
|
-
* un-joinable.
|
|
14183
|
-
*/
|
|
14184
|
-
reason: string(),
|
|
14185
|
-
count: number().int().nonnegative()
|
|
14186
|
-
});
|
|
14187
|
-
var FailureContributionSchema = object({
|
|
14188
|
-
/**
|
|
14189
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14190
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14191
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
14192
|
-
* is a central list that rots invisibly.
|
|
14193
|
-
*/
|
|
14194
|
-
family: string(),
|
|
14195
|
-
/**
|
|
14196
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14197
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14198
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
14199
|
-
* cannot answer the only question anybody asks of this surface.
|
|
14200
|
-
*/
|
|
14201
|
-
deviceId: number().int().positive(),
|
|
14202
|
-
/**
|
|
14203
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
14204
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14205
|
-
* family has a single variant.
|
|
14206
|
-
*/
|
|
14207
|
-
variant: string().optional(),
|
|
14208
|
-
/**
|
|
14209
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14210
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
14211
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14212
|
-
* `LoadContribution.startedAtMs`.
|
|
14213
|
-
*/
|
|
14214
|
-
sinceMs: number(),
|
|
14215
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14216
|
-
atMs: number(),
|
|
14217
|
-
/**
|
|
14218
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14219
|
-
* window. A failure count published without it is the mistake this schema
|
|
14220
|
-
* exists to make impossible.
|
|
14221
|
-
*/
|
|
14222
|
-
attempts: number().int().nonnegative(),
|
|
14223
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14224
|
-
succeeded: number().int().nonnegative(),
|
|
14225
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14226
|
-
reasons: array(FailureReasonCountSchema).readonly()
|
|
14227
|
-
});
|
|
14228
|
-
method(_void(), array(FailureContributionSchema).readonly());
|
|
14229
|
-
var LoadContributionSchema = object({
|
|
14230
|
-
role: _enum([
|
|
14231
|
-
"decode",
|
|
14232
|
-
"transcode",
|
|
14233
|
-
"recording",
|
|
14234
|
-
"streaming",
|
|
14235
|
-
"detection"
|
|
14236
|
-
]),
|
|
14237
|
-
/**
|
|
14238
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14239
|
-
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14240
|
-
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14241
|
-
* contributor that cannot name its camera must not emit the entry at all,
|
|
14242
|
-
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14243
|
-
* and would quietly turn one camera's cost into everybody's.
|
|
14244
|
-
*/
|
|
14245
|
-
deviceId: number().int().positive().nullable(),
|
|
14246
|
-
attribution: _enum([
|
|
14247
|
-
"measured",
|
|
14248
|
-
"accounted",
|
|
14249
|
-
"unattributable"
|
|
14250
|
-
]),
|
|
14251
|
-
/**
|
|
14252
|
-
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14253
|
-
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14254
|
-
* family and inventing a common one would lose the only information that
|
|
14255
|
-
* makes two entries for the same camera distinguishable.
|
|
14256
|
-
*/
|
|
14257
|
-
unit: string(),
|
|
14258
|
-
/**
|
|
14259
|
-
* The OS process this cost lives in, when there is one. Present so a
|
|
14260
|
-
* consumer can (a) tell two generations of the same unit apart across a
|
|
14261
|
-
* restart, and (b) subtract claimed processes from the node's process
|
|
14262
|
-
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14263
|
-
* process of its own.
|
|
14264
|
-
*/
|
|
14265
|
-
pid: number().int().positive().optional(),
|
|
14266
|
-
/**
|
|
14267
|
-
* When this generation started. The pid's incarnation marker: a consumer
|
|
14268
|
-
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14269
|
-
* window when this changes, because the counter restarted from zero in a new
|
|
14270
|
-
* process.
|
|
14271
|
-
*/
|
|
14272
|
-
startedAtMs: number().optional(),
|
|
14273
|
-
/**
|
|
14274
|
-
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14275
|
-
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14276
|
-
* contribution is asked for.
|
|
14277
|
-
*
|
|
14278
|
-
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14279
|
-
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14280
|
-
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14281
|
-
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14282
|
-
*
|
|
14283
|
-
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14284
|
-
* an entry with no process.
|
|
14285
|
-
*/
|
|
14286
|
-
cpuSeconds: number().optional(),
|
|
14287
|
-
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14288
|
-
rssBytes: number().optional()
|
|
14289
|
-
});
|
|
14290
|
-
method(_void(), array(LoadContributionSchema).readonly());
|
|
14291
|
-
/**
|
|
14292
14292
|
* `login-method` — collection cap through which auth addons contribute
|
|
14293
14293
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
14294
14294
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
@@ -18954,12 +18954,53 @@ var MediaFileKindEnum = _enum([
|
|
|
18954
18954
|
"keyFrameSmall",
|
|
18955
18955
|
"thumbnailSmall"
|
|
18956
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
|
+
*/
|
|
18957
18994
|
var MediaFileSchema = object({
|
|
18958
18995
|
key: string(),
|
|
18959
18996
|
kind: MediaFileKindEnum,
|
|
18960
|
-
base64: string(),
|
|
18961
18997
|
sizeBytes: number(),
|
|
18962
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()
|
|
18963
19004
|
});
|
|
18964
19005
|
/**
|
|
18965
19006
|
* One media row WITHOUT its bytes.
|
|
@@ -18971,7 +19012,9 @@ var MediaFileSchema = object({
|
|
|
18971
19012
|
* blocks the whole view.
|
|
18972
19013
|
*
|
|
18973
19014
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
18974
|
-
* 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.
|
|
18975
19018
|
*/
|
|
18976
19019
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
18977
19020
|
/**
|
|
@@ -19318,6 +19361,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19318
19361
|
totalBytes: number().int(),
|
|
19319
19362
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19320
19363
|
});
|
|
19364
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19365
|
+
var EventMediaKindFootprintSchema = object({
|
|
19366
|
+
kind: MediaFileKindEnum,
|
|
19367
|
+
/** Media rows of this kind. */
|
|
19368
|
+
rows: number().int(),
|
|
19369
|
+
/** Bytes on disk held by those rows. */
|
|
19370
|
+
bytes: number().int()
|
|
19371
|
+
});
|
|
19372
|
+
/**
|
|
19373
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19374
|
+
* actually turns on.
|
|
19375
|
+
*
|
|
19376
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19377
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19378
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19379
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19380
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19381
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19382
|
+
*
|
|
19383
|
+
* ## Why `unaccounted*` exists
|
|
19384
|
+
*
|
|
19385
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19386
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19387
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19388
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19389
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19390
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19391
|
+
* against a denominator smaller than the disk.
|
|
19392
|
+
*
|
|
19393
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19394
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19395
|
+
*/
|
|
19396
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19397
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19398
|
+
totalRows: number().int(),
|
|
19399
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19400
|
+
totalBytes: number().int(),
|
|
19401
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19402
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19403
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19404
|
+
unaccountedRows: number().int(),
|
|
19405
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19406
|
+
unaccountedBytes: number().int()
|
|
19407
|
+
});
|
|
19321
19408
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19322
19409
|
var EventPruneCountsSchema = object({
|
|
19323
19410
|
motion: number().int(),
|
|
@@ -19521,6 +19608,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19521
19608
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19522
19609
|
kind: "query",
|
|
19523
19610
|
auth: "admin"
|
|
19611
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19612
|
+
kind: "query",
|
|
19613
|
+
auth: "admin"
|
|
19524
19614
|
}), method(object({
|
|
19525
19615
|
olderThanMs: number(),
|
|
19526
19616
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -19660,6 +19750,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19660
19750
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
19661
19751
|
trackId: string(),
|
|
19662
19752
|
deviceId: number()
|
|
19753
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
19754
|
+
eventId: string(),
|
|
19755
|
+
deviceId: number()
|
|
19663
19756
|
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
19664
19757
|
kind: "mutation",
|
|
19665
19758
|
auth: "admin"
|
|
@@ -21469,6 +21562,20 @@ method(object({
|
|
|
21469
21562
|
error: string().optional()
|
|
21470
21563
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21471
21564
|
providerId: string(),
|
|
21565
|
+
/**
|
|
21566
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21567
|
+
*
|
|
21568
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21569
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21570
|
+
* credential the operator did not retype — and posting that here
|
|
21571
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21572
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21573
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21574
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21575
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21576
|
+
* every value was typed just now and nothing is stored yet.
|
|
21577
|
+
*/
|
|
21578
|
+
locationId: string().optional(),
|
|
21472
21579
|
config: record(string(), unknown())
|
|
21473
21580
|
}), object({
|
|
21474
21581
|
ok: boolean(),
|
|
@@ -23920,10 +24027,24 @@ var FaceClusterSchema = object({
|
|
|
23920
24027
|
size: number().int(),
|
|
23921
24028
|
cohesion: number()
|
|
23922
24029
|
});
|
|
24030
|
+
/**
|
|
24031
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
24032
|
+
* are — never the bytes.
|
|
24033
|
+
*
|
|
24034
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
24035
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
24036
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
24037
|
+
* caller is the admin UI's detail modal, which was building
|
|
24038
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
24039
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
24040
|
+
*
|
|
24041
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
24042
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
24043
|
+
*/
|
|
23923
24044
|
var MediaFileLiteSchema$1 = object({
|
|
23924
24045
|
key: string(),
|
|
23925
24046
|
kind: string(),
|
|
23926
|
-
|
|
24047
|
+
url: string(),
|
|
23927
24048
|
sizeBytes: number(),
|
|
23928
24049
|
timestamp: number()
|
|
23929
24050
|
});
|
|
@@ -26175,10 +26296,24 @@ var PlateInfoSchema = object({
|
|
|
26175
26296
|
*/
|
|
26176
26297
|
cropUrl: string().optional()
|
|
26177
26298
|
});
|
|
26299
|
+
/**
|
|
26300
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
26301
|
+
* are — never the bytes.
|
|
26302
|
+
*
|
|
26303
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
26304
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
26305
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
26306
|
+
* caller is the admin UI's detail modal, which was building
|
|
26307
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
26308
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
26309
|
+
*
|
|
26310
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
26311
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
26312
|
+
*/
|
|
26178
26313
|
var MediaFileLiteSchema = object({
|
|
26179
26314
|
key: string(),
|
|
26180
26315
|
kind: string(),
|
|
26181
|
-
|
|
26316
|
+
url: string(),
|
|
26182
26317
|
sizeBytes: number(),
|
|
26183
26318
|
timestamp: number()
|
|
26184
26319
|
});
|
|
@@ -32095,6 +32230,12 @@ Object.freeze({
|
|
|
32095
32230
|
addonId: null,
|
|
32096
32231
|
access: "view"
|
|
32097
32232
|
},
|
|
32233
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
32234
|
+
capName: "pipeline-analytics",
|
|
32235
|
+
capScope: "device",
|
|
32236
|
+
addonId: null,
|
|
32237
|
+
access: "view"
|
|
32238
|
+
},
|
|
32098
32239
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
32099
32240
|
capName: "pipeline-analytics",
|
|
32100
32241
|
capScope: "device",
|
|
@@ -32191,6 +32332,12 @@ Object.freeze({
|
|
|
32191
32332
|
addonId: null,
|
|
32192
32333
|
access: "view"
|
|
32193
32334
|
},
|
|
32335
|
+
"pipelineAnalytics.listEventMedia": {
|
|
32336
|
+
capName: "pipeline-analytics",
|
|
32337
|
+
capScope: "device",
|
|
32338
|
+
addonId: null,
|
|
32339
|
+
access: "view"
|
|
32340
|
+
},
|
|
32194
32341
|
"pipelineAnalytics.listGroups": {
|
|
32195
32342
|
capName: "pipeline-analytics",
|
|
32196
32343
|
capScope: "device",
|
|
@@ -35754,6 +35901,11 @@ Object.freeze({
|
|
|
35754
35901
|
form: "single",
|
|
35755
35902
|
optional: false
|
|
35756
35903
|
}],
|
|
35904
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
35905
|
+
name: "deviceId",
|
|
35906
|
+
form: "single",
|
|
35907
|
+
optional: true
|
|
35908
|
+
}],
|
|
35757
35909
|
"pipelineAnalytics.getGroup": [{
|
|
35758
35910
|
name: "deviceId",
|
|
35759
35911
|
form: "single",
|
|
@@ -35814,6 +35966,11 @@ Object.freeze({
|
|
|
35814
35966
|
form: "array",
|
|
35815
35967
|
optional: false
|
|
35816
35968
|
}],
|
|
35969
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
35970
|
+
name: "deviceId",
|
|
35971
|
+
form: "single",
|
|
35972
|
+
optional: false
|
|
35973
|
+
}],
|
|
35817
35974
|
"pipelineAnalytics.listGroups": [{
|
|
35818
35975
|
name: "deviceIds",
|
|
35819
35976
|
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-
|
|
2
|
+
import { o as i, s as a } from "./responsive-CL6N6yeH.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",
|
package/dist/remoteEntry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-
|
|
1
|
+
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-BT6OEgJQ.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-
|
|
3
|
+
import { n as u } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BpnVF-LU.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,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-
|
|
2
|
+
import { s as i } from "./responsive-CL6N6yeH.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-
|
|
2756
|
+
return tr ||= rr(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-DfRzGW52.mjs")).catch((e) => {
|
|
2757
2757
|
throw tr = void 0, e;
|
|
2758
2758
|
}), tr;
|
|
2759
2759
|
}
|