@camstack/addon-admin-ui 1.2.118 → 1.2.119
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/assets/{AddLocationWizard-Bf2d5QJC.js → AddLocationWizard-BcscyeiT.js} +1 -1
- package/dist/assets/{AddonCollectionPage-BKFXFcwj.js → AddonCollectionPage-B03rWwOK.js} +1 -1
- package/dist/assets/{Addons-BE4c7Eft.js → Addons-BDWcu7bj.js} +1 -1
- package/dist/assets/{AdminTabs-CW5SZp7Y.js → AdminTabs-BhVFfu-V.js} +1 -1
- package/dist/assets/{AiProfiles-DtrI9DHP.js → AiProfiles-CmIRcCjv.js} +1 -1
- package/dist/assets/{BrokerForm-BGjBv1to.js → BrokerForm-CGbxdxp0.js} +1 -1
- package/dist/assets/{Build-mA9Ywcki.js → Build-Bneqa83Z.js} +1 -1
- package/dist/assets/{Capabilities-DVGShQpV.js → Capabilities-Bd7XskC7.js} +1 -1
- package/dist/assets/{CapabilityBadges-B_jIPQNS.js → CapabilityBadges-KMhMCn1k.js} +1 -1
- package/dist/assets/{Cluster-CZGyMZZq.js → Cluster-CS-NJ6OS.js} +1 -1
- package/dist/assets/{Data-DuyRytLu.js → Data-Dr3p27zg.js} +1 -1
- package/dist/assets/{DetectionIntelligence-tpYFIJC0.js → DetectionIntelligence-BziKZgjR.js} +1 -1
- package/dist/assets/{DeviceAggregateSection-BhDnF-0R.js → DeviceAggregateSection-CheBdbsr.js} +1 -1
- package/dist/assets/DeviceDetail-Br1qPJ6r.js +2 -0
- package/dist/assets/{Devices-19N1vFVC.js → Devices-BV1t7-g5.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-uNDQHMOY.js → EmbedPlayerPage-n4oktMWk.js} +1 -1
- package/dist/assets/Events-CkGijCDG.js +1 -0
- package/dist/assets/{FormBuilder-Bw_BfLct.js → FormBuilder-D7eVmgZJ.js} +1 -1
- package/dist/assets/{Identity-ChUC1Yzb.js → Identity-Cb2GAD5w.js} +1 -1
- package/dist/assets/{IntegrationDetail-uhUiJaKD.js → IntegrationDetail-B4uov2Kt.js} +1 -1
- package/dist/assets/{Integrations-CDpK4Iya.js → Integrations-SNPkOFhA.js} +1 -1
- package/dist/assets/Integrations-_7bjpG_5.js +1 -0
- package/dist/assets/{Logs-QkSAbBaP.js → Logs-pNO26-_g.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DEJj0tIr.js → MotionZonesSettings-DikN9JEQ.js} +1 -1
- package/dist/assets/{MyAccess-Dq5B9DXE.js → MyAccess-BnULhZgR.js} +1 -1
- package/dist/assets/{Network-CdFVF0Bh.js → Network-Bv3jrJ1-.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-BpV4vZ3y.js → NodeAddonsSettingsPanel-DvTRBvQl.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-fUGmh21X.js → NodeInferenceDevices-BaRmgURr.js} +1 -1
- package/dist/assets/{Notifications-BXPxGe8Q.js → Notifications-DXzfB7Iv.js} +1 -1
- package/dist/assets/{Pipeline-Dul0Xxvp.js → Pipeline-DCSX_1o6.js} +1 -1
- package/dist/assets/Plates-BEU4sAqP.js +1 -0
- package/dist/assets/PrivacyMaskSettings-CZLQzQgv.js +1 -0
- package/dist/assets/{ProviderIcon-BXczeeUa.js → ProviderIcon-aFjOxP4_.js} +1 -1
- package/dist/assets/{Recordings-BqpIOzrs.js → Recordings-b6zC1cWE.js} +1 -1
- package/dist/assets/{ScanNetworkModal-D3jJwqnQ.js → ScanNetworkModal-DFZ9sM0F.js} +1 -1
- package/dist/assets/SceneMonitorEditor-BN655weg.js +1 -0
- package/dist/assets/{Scenes-DC0f71cu.js → Scenes-C0y2uk0j.js} +1 -1
- package/dist/assets/{Settings-BpKwlBs0.js → Settings-DpIKYRlm.js} +1 -1
- package/dist/assets/{Showroom-DqOzeQMg.js → Showroom-CWbwspFj.js} +1 -1
- package/dist/assets/{Terminal-BDB9l80Z.js → Terminal-ykBOga6k.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-B3MkFUBK.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BYhH6kE0.js} +1 -1
- package/dist/assets/{bell-ring-DXlqoV-n.js → bell-ring-CXoCKJnn.js} +1 -1
- package/dist/assets/{boxes-D5TGZrSv.js → boxes-Bw4b1Wc1.js} +1 -1
- package/dist/assets/circle-check-big-D_Kt6W2W.js +1 -0
- package/dist/assets/{circle-x-zj-Y8V0g.js → circle-x-DDabN2KD.js} +1 -1
- package/dist/assets/clock-BeIF3nWG.js +1 -0
- package/dist/assets/{copy-DVYoqFlk.js → copy-C-EqjmDP.js} +1 -1
- package/dist/assets/{debounced-invalidate-DKj6sAUn.js → debounced-invalidate-Bfd2Qzzn.js} +1 -1
- package/dist/assets/dist-D-Tiwsk7.js +349 -0
- package/dist/assets/{dist-D_qQ3ZLb.js → dist-D_lTK4xz.js} +1 -1
- package/dist/assets/{download-BifPfhIt.js → download-Cuj1maBm.js} +1 -1
- package/dist/assets/{face-bbox-DaCckiPf.js → face-bbox-y-km4dI8.js} +1 -1
- package/dist/assets/{hostInit-C203P4lS.js → hostInit-Cym8Rr5d.js} +1 -1
- package/dist/assets/index-BTGQKEEA.js +4 -0
- package/dist/assets/{key-round-9MDNzuSJ.js → key-round-DvhPSBSH.js} +1 -1
- package/dist/assets/{layers-ZG2sPM2X.js → layers-B7No2bw_.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-81aebfb2.js → mf-entry-bootstrap-0-ae9b3119.js} +2 -2
- package/dist/assets/{pencil-CZejwlRX.js → pencil-BJxboIbx.js} +1 -1
- package/dist/assets/play-CeohfaKf.js +1 -0
- package/dist/assets/player-overlays-RwoCa548.js +1 -0
- package/dist/assets/plus-Brv4i72u.js +1 -0
- package/dist/assets/power-DmJawhTF.js +1 -0
- package/dist/assets/{radio-DNUWRE34.js → radio-klp_ubdd.js} +1 -1
- package/dist/assets/{refresh-cw-DTXYyRHZ.js → refresh-cw-OR1QZ198.js} +1 -1
- package/dist/assets/remoteEntry-CRo49mol.js +1 -0
- package/dist/assets/rotate-ccw-Dzp5z5a_.js +1 -0
- package/dist/assets/rotate-cw-6dMVo8-E.js +1 -0
- package/dist/assets/{send-B7H6pAaP.js → send-vc4Psyt4.js} +1 -1
- package/dist/assets/{server-BxzOan8u.js → server-BXgYajYr.js} +1 -1
- package/dist/assets/{shield-CEP1YgoU.js → shield-Y4WSkvsK.js} +1 -1
- package/dist/assets/square-Dd2LMGtj.js +1 -0
- package/dist/assets/{square-check-big-Cx7mXraC.js → square-check-big-hQzwD37R.js} +1 -1
- package/dist/assets/src-CDVm70oc.js +67 -0
- package/dist/assets/src-ijaeX4aR.js +349 -0
- package/dist/assets/{star-Bf7LBoXR.js → star-BM5cPk35.js} +1 -1
- package/dist/assets/{undo-2-Cx6lwzFn.js → undo-2-C4NHExfy.js} +1 -1
- package/dist/assets/{use-scenes-feed-C2I8IX9W.js → use-scenes-feed-BsYnn_Rq.js} +1 -1
- package/dist/assets/useEventInvalidation-D4KUD_Rr.js +1 -0
- package/dist/assets/{useNodeUrlSelection-ClAXDXQJ.js → useNodeUrlSelection-DbuPo174.js} +1 -1
- package/dist/assets/{video-Bdo0_RSo.js → video-DIbJOXgM.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CA7Bimee.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DbvhoXKV.js} +2 -2
- package/dist/assets/{wifi-sJIjMU2Y.js → wifi-CMg5tM5x.js} +1 -1
- package/dist/assets/{zap-CRMTcuGs.js → zap-Dnw48_IY.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/server/addon.js +260 -175
- package/package.json +1 -1
- package/dist/assets/DeviceDetail-B_T4KUCH.js +0 -2
- package/dist/assets/Events-CeYY81EE.js +0 -1
- package/dist/assets/Integrations-DasmVT6a.js +0 -1
- package/dist/assets/Plates-vm8v4CX0.js +0 -1
- package/dist/assets/PrivacyMaskSettings-Dyh3C1Gc.js +0 -1
- package/dist/assets/SceneMonitorEditor-CMdf9veT.js +0 -1
- package/dist/assets/circle-check-big-THS7TOUg.js +0 -1
- package/dist/assets/clock-sO6o_mjY.js +0 -1
- package/dist/assets/dist-NbQ5dxwG.js +0 -349
- package/dist/assets/index-lupFu8MS.js +0 -4
- package/dist/assets/play-Dj5XCwJ4.js +0 -1
- package/dist/assets/player-overlays-9UuGjKRi.js +0 -1
- package/dist/assets/plus-DyGAblLU.js +0 -1
- package/dist/assets/power-DoFXllOi.js +0 -1
- package/dist/assets/remoteEntry-Bds4bwsC.js +0 -1
- package/dist/assets/rotate-ccw-Dp-SmUgt.js +0 -1
- package/dist/assets/rotate-cw-CHNi--Cf.js +0 -1
- package/dist/assets/square-De580U5i.js +0 -1
- package/dist/assets/src-DbUPImmO.js +0 -349
- package/dist/assets/src-eNwyjio2.js +0 -67
- package/dist/assets/useEventInvalidation-C3I3KCPD.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -12923,6 +12923,114 @@ method(object({
|
|
|
12923
12923
|
height: number()
|
|
12924
12924
|
}), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
|
|
12925
12925
|
/**
|
|
12926
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
12927
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
12928
|
+
*
|
|
12929
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
12930
|
+
*
|
|
12931
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
12932
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
12933
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
12934
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
12935
|
+
* somebody to forget to edit.
|
|
12936
|
+
*
|
|
12937
|
+
* They are not merged, because their invariants are opposites:
|
|
12938
|
+
*
|
|
12939
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
12940
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
12941
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
12942
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
12943
|
+
* and it is exactly what an absent entry cannot say.
|
|
12944
|
+
*
|
|
12945
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
12946
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
12947
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
12948
|
+
* has no process.
|
|
12949
|
+
*
|
|
12950
|
+
* ## Why not a log line, since the counters already exist
|
|
12951
|
+
*
|
|
12952
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
12953
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
12954
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
12955
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
12956
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
12957
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
12958
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
12959
|
+
* be READ.
|
|
12960
|
+
*
|
|
12961
|
+
* ## The rate is served with its denominator or not at all
|
|
12962
|
+
*
|
|
12963
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
12964
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
12965
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
12966
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
12967
|
+
* reproduces that mistake on every read.
|
|
12968
|
+
*
|
|
12969
|
+
* ## Shape
|
|
12970
|
+
*
|
|
12971
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
12972
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
12973
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
12974
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
12975
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
12976
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
12977
|
+
* result through `system.getFailureContributions`.
|
|
12978
|
+
*/
|
|
12979
|
+
var FailureReasonCountSchema = object({
|
|
12980
|
+
/**
|
|
12981
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
12982
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
12983
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
12984
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
12985
|
+
* vocabulary for the same loss would make the row and the counter
|
|
12986
|
+
* un-joinable.
|
|
12987
|
+
*/
|
|
12988
|
+
reason: string(),
|
|
12989
|
+
count: number().int().nonnegative()
|
|
12990
|
+
});
|
|
12991
|
+
var FailureContributionSchema = object({
|
|
12992
|
+
/**
|
|
12993
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
12994
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
12995
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
12996
|
+
* is a central list that rots invisibly.
|
|
12997
|
+
*/
|
|
12998
|
+
family: string(),
|
|
12999
|
+
/**
|
|
13000
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
13001
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
13002
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
13003
|
+
* cannot answer the only question anybody asks of this surface.
|
|
13004
|
+
*/
|
|
13005
|
+
deviceId: number().int().positive(),
|
|
13006
|
+
/**
|
|
13007
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
13008
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
13009
|
+
* family has a single variant.
|
|
13010
|
+
*/
|
|
13011
|
+
variant: string().optional(),
|
|
13012
|
+
/**
|
|
13013
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
13014
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
13015
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
13016
|
+
* `LoadContribution.startedAtMs`.
|
|
13017
|
+
*/
|
|
13018
|
+
sinceMs: number(),
|
|
13019
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
13020
|
+
atMs: number(),
|
|
13021
|
+
/**
|
|
13022
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
13023
|
+
* window. A failure count published without it is the mistake this schema
|
|
13024
|
+
* exists to make impossible.
|
|
13025
|
+
*/
|
|
13026
|
+
attempts: number().int().nonnegative(),
|
|
13027
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
13028
|
+
succeeded: number().int().nonnegative(),
|
|
13029
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
13030
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
13031
|
+
});
|
|
13032
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
13033
|
+
/**
|
|
12926
13034
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
12927
13035
|
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
12928
13036
|
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
@@ -13444,6 +13552,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13444
13552
|
kind: "mutation",
|
|
13445
13553
|
auth: "admin"
|
|
13446
13554
|
});
|
|
13555
|
+
var LoadContributionSchema = object({
|
|
13556
|
+
role: _enum([
|
|
13557
|
+
"decode",
|
|
13558
|
+
"transcode",
|
|
13559
|
+
"recording",
|
|
13560
|
+
"streaming",
|
|
13561
|
+
"detection"
|
|
13562
|
+
]),
|
|
13563
|
+
/**
|
|
13564
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
13565
|
+
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
13566
|
+
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
13567
|
+
* contributor that cannot name its camera must not emit the entry at all,
|
|
13568
|
+
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
13569
|
+
* and would quietly turn one camera's cost into everybody's.
|
|
13570
|
+
*/
|
|
13571
|
+
deviceId: number().int().positive().nullable(),
|
|
13572
|
+
attribution: _enum([
|
|
13573
|
+
"measured",
|
|
13574
|
+
"accounted",
|
|
13575
|
+
"unattributable"
|
|
13576
|
+
]),
|
|
13577
|
+
/**
|
|
13578
|
+
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
13579
|
+
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
13580
|
+
* family and inventing a common one would lose the only information that
|
|
13581
|
+
* makes two entries for the same camera distinguishable.
|
|
13582
|
+
*/
|
|
13583
|
+
unit: string(),
|
|
13584
|
+
/**
|
|
13585
|
+
* The OS process this cost lives in, when there is one. Present so a
|
|
13586
|
+
* consumer can (a) tell two generations of the same unit apart across a
|
|
13587
|
+
* restart, and (b) subtract claimed processes from the node's process
|
|
13588
|
+
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
13589
|
+
* process of its own.
|
|
13590
|
+
*/
|
|
13591
|
+
pid: number().int().positive().optional(),
|
|
13592
|
+
/**
|
|
13593
|
+
* When this generation started. The pid's incarnation marker: a consumer
|
|
13594
|
+
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
13595
|
+
* window when this changes, because the counter restarted from zero in a new
|
|
13596
|
+
* process.
|
|
13597
|
+
*/
|
|
13598
|
+
startedAtMs: number().optional(),
|
|
13599
|
+
/**
|
|
13600
|
+
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
13601
|
+
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
13602
|
+
* contribution is asked for.
|
|
13603
|
+
*
|
|
13604
|
+
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
13605
|
+
* needs a sampler, and a new per-node sampler is the defect half of
|
|
13606
|
+
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
13607
|
+
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
13608
|
+
*
|
|
13609
|
+
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
13610
|
+
* an entry with no process.
|
|
13611
|
+
*/
|
|
13612
|
+
cpuSeconds: number().optional(),
|
|
13613
|
+
/** Resident bytes of this unit's process, same source and same rules. */
|
|
13614
|
+
rssBytes: number().optional()
|
|
13615
|
+
});
|
|
13616
|
+
method(_void(), array(LoadContributionSchema).readonly());
|
|
13447
13617
|
/**
|
|
13448
13618
|
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13449
13619
|
* through. It stores nothing.
|
|
@@ -13520,176 +13690,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
13520
13690
|
tags: record(string(), string()).optional()
|
|
13521
13691
|
}), array(LogEntrySchema).readonly());
|
|
13522
13692
|
/**
|
|
13523
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
13524
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
13525
|
-
*
|
|
13526
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
13527
|
-
*
|
|
13528
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
13529
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
13530
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
13531
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
13532
|
-
* somebody to forget to edit.
|
|
13533
|
-
*
|
|
13534
|
-
* They are not merged, because their invariants are opposites:
|
|
13535
|
-
*
|
|
13536
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
13537
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
13538
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
13539
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
13540
|
-
* and it is exactly what an absent entry cannot say.
|
|
13541
|
-
*
|
|
13542
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
13543
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
13544
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
13545
|
-
* has no process.
|
|
13546
|
-
*
|
|
13547
|
-
* ## Why not a log line, since the counters already exist
|
|
13548
|
-
*
|
|
13549
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
13550
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
13551
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
13552
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
13553
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
13554
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
13555
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
13556
|
-
* be READ.
|
|
13557
|
-
*
|
|
13558
|
-
* ## The rate is served with its denominator or not at all
|
|
13559
|
-
*
|
|
13560
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
13561
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
13562
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
13563
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
13564
|
-
* reproduces that mistake on every read.
|
|
13565
|
-
*
|
|
13566
|
-
* ## Shape
|
|
13567
|
-
*
|
|
13568
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
13569
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
13570
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
13571
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
13572
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
13573
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
13574
|
-
* result through `system.getFailureContributions`.
|
|
13575
|
-
*/
|
|
13576
|
-
var FailureReasonCountSchema = object({
|
|
13577
|
-
/**
|
|
13578
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
13579
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
13580
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
13581
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
13582
|
-
* vocabulary for the same loss would make the row and the counter
|
|
13583
|
-
* un-joinable.
|
|
13584
|
-
*/
|
|
13585
|
-
reason: string(),
|
|
13586
|
-
count: number().int().nonnegative()
|
|
13587
|
-
});
|
|
13588
|
-
var FailureContributionSchema = object({
|
|
13589
|
-
/**
|
|
13590
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
13591
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
13592
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
13593
|
-
* is a central list that rots invisibly.
|
|
13594
|
-
*/
|
|
13595
|
-
family: string(),
|
|
13596
|
-
/**
|
|
13597
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
13598
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
13599
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
13600
|
-
* cannot answer the only question anybody asks of this surface.
|
|
13601
|
-
*/
|
|
13602
|
-
deviceId: number().int().positive(),
|
|
13603
|
-
/**
|
|
13604
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
13605
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
13606
|
-
* family has a single variant.
|
|
13607
|
-
*/
|
|
13608
|
-
variant: string().optional(),
|
|
13609
|
-
/**
|
|
13610
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
13611
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
13612
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
13613
|
-
* `LoadContribution.startedAtMs`.
|
|
13614
|
-
*/
|
|
13615
|
-
sinceMs: number(),
|
|
13616
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
13617
|
-
atMs: number(),
|
|
13618
|
-
/**
|
|
13619
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
13620
|
-
* window. A failure count published without it is the mistake this schema
|
|
13621
|
-
* exists to make impossible.
|
|
13622
|
-
*/
|
|
13623
|
-
attempts: number().int().nonnegative(),
|
|
13624
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
13625
|
-
succeeded: number().int().nonnegative(),
|
|
13626
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
13627
|
-
reasons: array(FailureReasonCountSchema).readonly()
|
|
13628
|
-
});
|
|
13629
|
-
method(_void(), array(FailureContributionSchema).readonly());
|
|
13630
|
-
var LoadContributionSchema = object({
|
|
13631
|
-
role: _enum([
|
|
13632
|
-
"decode",
|
|
13633
|
-
"transcode",
|
|
13634
|
-
"recording",
|
|
13635
|
-
"streaming",
|
|
13636
|
-
"detection"
|
|
13637
|
-
]),
|
|
13638
|
-
/**
|
|
13639
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
13640
|
-
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
13641
|
-
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
13642
|
-
* contributor that cannot name its camera must not emit the entry at all,
|
|
13643
|
-
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
13644
|
-
* and would quietly turn one camera's cost into everybody's.
|
|
13645
|
-
*/
|
|
13646
|
-
deviceId: number().int().positive().nullable(),
|
|
13647
|
-
attribution: _enum([
|
|
13648
|
-
"measured",
|
|
13649
|
-
"accounted",
|
|
13650
|
-
"unattributable"
|
|
13651
|
-
]),
|
|
13652
|
-
/**
|
|
13653
|
-
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
13654
|
-
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
13655
|
-
* family and inventing a common one would lose the only information that
|
|
13656
|
-
* makes two entries for the same camera distinguishable.
|
|
13657
|
-
*/
|
|
13658
|
-
unit: string(),
|
|
13659
|
-
/**
|
|
13660
|
-
* The OS process this cost lives in, when there is one. Present so a
|
|
13661
|
-
* consumer can (a) tell two generations of the same unit apart across a
|
|
13662
|
-
* restart, and (b) subtract claimed processes from the node's process
|
|
13663
|
-
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
13664
|
-
* process of its own.
|
|
13665
|
-
*/
|
|
13666
|
-
pid: number().int().positive().optional(),
|
|
13667
|
-
/**
|
|
13668
|
-
* When this generation started. The pid's incarnation marker: a consumer
|
|
13669
|
-
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
13670
|
-
* window when this changes, because the counter restarted from zero in a new
|
|
13671
|
-
* process.
|
|
13672
|
-
*/
|
|
13673
|
-
startedAtMs: number().optional(),
|
|
13674
|
-
/**
|
|
13675
|
-
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
13676
|
-
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
13677
|
-
* contribution is asked for.
|
|
13678
|
-
*
|
|
13679
|
-
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
13680
|
-
* needs a sampler, and a new per-node sampler is the defect half of
|
|
13681
|
-
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
13682
|
-
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
13683
|
-
*
|
|
13684
|
-
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
13685
|
-
* an entry with no process.
|
|
13686
|
-
*/
|
|
13687
|
-
cpuSeconds: number().optional(),
|
|
13688
|
-
/** Resident bytes of this unit's process, same source and same rules. */
|
|
13689
|
-
rssBytes: number().optional()
|
|
13690
|
-
});
|
|
13691
|
-
method(_void(), array(LoadContributionSchema).readonly());
|
|
13692
|
-
/**
|
|
13693
13693
|
* `login-method` — collection cap through which auth addons contribute
|
|
13694
13694
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
13695
13695
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
@@ -18349,12 +18349,53 @@ var MediaFileKindEnum = _enum([
|
|
|
18349
18349
|
"keyFrameSmall",
|
|
18350
18350
|
"thumbnailSmall"
|
|
18351
18351
|
]);
|
|
18352
|
+
/**
|
|
18353
|
+
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
18354
|
+
* ARE — never the bytes themselves.
|
|
18355
|
+
*
|
|
18356
|
+
* ## Why `url` and not `base64`
|
|
18357
|
+
*
|
|
18358
|
+
* Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
|
|
18359
|
+
* with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
|
|
18360
|
+
* was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
|
|
18361
|
+
* wire. Forty events is ~144 MB. Every byte of it was read off disk,
|
|
18362
|
+
* base64-encoded, held whole in a unary tRPC envelope, and materialised in
|
|
18363
|
+
* hub-main's heap on the way past — for an `<img>` that would have cached it.
|
|
18364
|
+
*
|
|
18365
|
+
* `url` points at the `event-media` data plane
|
|
18366
|
+
* (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
|
|
18367
|
+
* with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
|
|
18368
|
+
* render a `?variant=thumb`, and streams. The hub gate in front of it requires
|
|
18369
|
+
* a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
|
|
18370
|
+
* no less protected than they were inside a `view`-level cap response — see
|
|
18371
|
+
* `data-plane-access.ts` for the rule and the one gap it does not close
|
|
18372
|
+
* (per-device scoping).
|
|
18373
|
+
*
|
|
18374
|
+
* The URL is built from the row's **stored** key, which is not always its
|
|
18375
|
+
* published `kind`: a track's face/plate crop is stored as `crop` under
|
|
18376
|
+
* `('face'|'plate', '<prefix>-<trackId>')` and published as
|
|
18377
|
+
* `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
|
|
18378
|
+
*
|
|
18379
|
+
* ## `base64` is TRANSITIONAL and is going away
|
|
18380
|
+
*
|
|
18381
|
+
* It is still populated for one reason: the deployed viewer's track-detail
|
|
18382
|
+
* HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
|
|
18383
|
+
* REQUIRES the field), and a row without it parses as a FAILED read — the red
|
|
18384
|
+
* triangle — not as absence. Removing the field before that viewer ships is an
|
|
18385
|
+
* outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
|
|
18386
|
+
* delete this line and the `withBytes` pass-through in
|
|
18387
|
+
* `analytics-query-facade.ts`; nothing else reads it.
|
|
18388
|
+
*/
|
|
18352
18389
|
var MediaFileSchema = object({
|
|
18353
18390
|
key: string(),
|
|
18354
18391
|
kind: MediaFileKindEnum,
|
|
18355
|
-
base64: string(),
|
|
18356
18392
|
sizeBytes: number(),
|
|
18357
18393
|
timestamp: number()
|
|
18394
|
+
}).extend({
|
|
18395
|
+
/** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
|
|
18396
|
+
url: string(),
|
|
18397
|
+
/** @deprecated Transitional — see the schema docblock. Use {@link url}. */
|
|
18398
|
+
base64: string()
|
|
18358
18399
|
});
|
|
18359
18400
|
/**
|
|
18360
18401
|
* One media row WITHOUT its bytes.
|
|
@@ -18366,7 +18407,9 @@ var MediaFileSchema = object({
|
|
|
18366
18407
|
* blocks the whole view.
|
|
18367
18408
|
*
|
|
18368
18409
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
18369
|
-
* stored blob and a `?variant=thumb` rendering without fetching either
|
|
18410
|
+
* stored blob and a `?variant=thumb` rendering without fetching either, and
|
|
18411
|
+
* `url` because a client that had to build the plane path itself is a second
|
|
18412
|
+
* copy of a route — the embed, the viewer and the admin UI each grew one.
|
|
18370
18413
|
*/
|
|
18371
18414
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
18372
18415
|
/**
|
|
@@ -19055,6 +19098,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19055
19098
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
19056
19099
|
trackId: string(),
|
|
19057
19100
|
deviceId: number()
|
|
19101
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
19102
|
+
eventId: string(),
|
|
19103
|
+
deviceId: number()
|
|
19058
19104
|
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
19059
19105
|
kind: "mutation",
|
|
19060
19106
|
auth: "admin"
|
|
@@ -23315,10 +23361,24 @@ var FaceClusterSchema = object({
|
|
|
23315
23361
|
size: number().int(),
|
|
23316
23362
|
cohesion: number()
|
|
23317
23363
|
});
|
|
23364
|
+
/**
|
|
23365
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
23366
|
+
* are — never the bytes.
|
|
23367
|
+
*
|
|
23368
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
23369
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
23370
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
23371
|
+
* caller is the admin UI's detail modal, which was building
|
|
23372
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
23373
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
23374
|
+
*
|
|
23375
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
23376
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
23377
|
+
*/
|
|
23318
23378
|
var MediaFileLiteSchema$1 = object({
|
|
23319
23379
|
key: string(),
|
|
23320
23380
|
kind: string(),
|
|
23321
|
-
|
|
23381
|
+
url: string(),
|
|
23322
23382
|
sizeBytes: number(),
|
|
23323
23383
|
timestamp: number()
|
|
23324
23384
|
});
|
|
@@ -25570,10 +25630,24 @@ var PlateInfoSchema = object({
|
|
|
25570
25630
|
*/
|
|
25571
25631
|
cropUrl: string().optional()
|
|
25572
25632
|
});
|
|
25633
|
+
/**
|
|
25634
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
25635
|
+
* are — never the bytes.
|
|
25636
|
+
*
|
|
25637
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
25638
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
25639
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
25640
|
+
* caller is the admin UI's detail modal, which was building
|
|
25641
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
25642
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
25643
|
+
*
|
|
25644
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
25645
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
25646
|
+
*/
|
|
25573
25647
|
var MediaFileLiteSchema = object({
|
|
25574
25648
|
key: string(),
|
|
25575
25649
|
kind: string(),
|
|
25576
|
-
|
|
25650
|
+
url: string(),
|
|
25577
25651
|
sizeBytes: number(),
|
|
25578
25652
|
timestamp: number()
|
|
25579
25653
|
});
|
|
@@ -31586,6 +31660,12 @@ Object.freeze({
|
|
|
31586
31660
|
addonId: null,
|
|
31587
31661
|
access: "view"
|
|
31588
31662
|
},
|
|
31663
|
+
"pipelineAnalytics.listEventMedia": {
|
|
31664
|
+
capName: "pipeline-analytics",
|
|
31665
|
+
capScope: "device",
|
|
31666
|
+
addonId: null,
|
|
31667
|
+
access: "view"
|
|
31668
|
+
},
|
|
31589
31669
|
"pipelineAnalytics.listGroups": {
|
|
31590
31670
|
capName: "pipeline-analytics",
|
|
31591
31671
|
capScope: "device",
|
|
@@ -35209,6 +35289,11 @@ Object.freeze({
|
|
|
35209
35289
|
form: "array",
|
|
35210
35290
|
optional: false
|
|
35211
35291
|
}],
|
|
35292
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
35293
|
+
name: "deviceId",
|
|
35294
|
+
form: "single",
|
|
35295
|
+
optional: false
|
|
35296
|
+
}],
|
|
35212
35297
|
"pipelineAnalytics.listGroups": [{
|
|
35213
35298
|
name: "deviceIds",
|
|
35214
35299
|
form: "array",
|
|
@@ -36471,7 +36556,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
36471
36556
|
capability: adminUiCapability,
|
|
36472
36557
|
provider: {
|
|
36473
36558
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
36474
|
-
getVersion: async () => ({ version: "1.2.
|
|
36559
|
+
getVersion: async () => ({ version: "1.2.119" })
|
|
36475
36560
|
}
|
|
36476
36561
|
}];
|
|
36477
36562
|
}
|