@camstack/addon-osd-manager 0.1.39 → 0.1.41
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-CIXOIaxJ.mjs → MotionZonesSettings-hMNx3Qpj.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-BXVb51kq.mjs → PrivacyMaskSettings-MIhKDmPK.mjs} +4 -4
- package/dist/{SceneMonitorEditor-DYRLvvVA.mjs → SceneMonitorEditor-B8pt-jD2.mjs} +3 -3
- package/dist/_stub.js +11 -11
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-BfqPLLgE.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-rT4-eHVE.mjs} +4 -4
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DlF8X-2e.mjs +26 -0
- package/dist/{hostInit-C5XnMBDh.mjs → hostInit-z_uCJFvY.mjs} +3 -3
- package/dist/index.js +394 -207
- package/dist/index.mjs +394 -207
- package/dist/{player-overlays-BuhAo_Es.mjs → player-overlays-HnQaIRs1.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-BAE2Alvc.mjs → responsive-BL3-GUiC.mjs} +1 -1
- package/dist/{square-7AGHps0Y.mjs → square-DRMyGlbx.mjs} +1 -1
- package/dist/{trash-2-CeWvoLug.mjs → trash-2-XOIFr3OP.mjs} +1 -1
- package/dist/{use-device-snapshot-DW8FBhRd.mjs → use-device-snapshot-BbvCpg91.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-hPck03Nc.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-C3kUCA_S.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CnoMYUFR.mjs +0 -26
package/dist/index.mjs
CHANGED
|
@@ -14724,6 +14724,133 @@ var embeddingEncoderCapability = {
|
|
|
14724
14724
|
}
|
|
14725
14725
|
};
|
|
14726
14726
|
/**
|
|
14727
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14728
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
14729
|
+
*
|
|
14730
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14731
|
+
*
|
|
14732
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14733
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14734
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14735
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14736
|
+
* somebody to forget to edit.
|
|
14737
|
+
*
|
|
14738
|
+
* They are not merged, because their invariants are opposites:
|
|
14739
|
+
*
|
|
14740
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14741
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14742
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14743
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14744
|
+
* and it is exactly what an absent entry cannot say.
|
|
14745
|
+
*
|
|
14746
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14747
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14748
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14749
|
+
* has no process.
|
|
14750
|
+
*
|
|
14751
|
+
* ## Why not a log line, since the counters already exist
|
|
14752
|
+
*
|
|
14753
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14754
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14755
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14756
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14757
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14758
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14759
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14760
|
+
* be READ.
|
|
14761
|
+
*
|
|
14762
|
+
* ## The rate is served with its denominator or not at all
|
|
14763
|
+
*
|
|
14764
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14765
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14766
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14767
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
14768
|
+
* reproduces that mistake on every read.
|
|
14769
|
+
*
|
|
14770
|
+
* ## Shape
|
|
14771
|
+
*
|
|
14772
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14773
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14774
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14775
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14776
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14777
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14778
|
+
* result through `system.getFailureContributions`.
|
|
14779
|
+
*/
|
|
14780
|
+
var FailureReasonCountSchema = object({
|
|
14781
|
+
/**
|
|
14782
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14783
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14784
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
14785
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
14786
|
+
* vocabulary for the same loss would make the row and the counter
|
|
14787
|
+
* un-joinable.
|
|
14788
|
+
*/
|
|
14789
|
+
reason: string(),
|
|
14790
|
+
count: number().int().nonnegative()
|
|
14791
|
+
});
|
|
14792
|
+
var FailureContributionSchema = object({
|
|
14793
|
+
/**
|
|
14794
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14795
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14796
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
14797
|
+
* is a central list that rots invisibly.
|
|
14798
|
+
*/
|
|
14799
|
+
family: string(),
|
|
14800
|
+
/**
|
|
14801
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
14802
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14803
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
14804
|
+
* cannot answer the only question anybody asks of this surface.
|
|
14805
|
+
*/
|
|
14806
|
+
deviceId: number().int().positive(),
|
|
14807
|
+
/**
|
|
14808
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
14809
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14810
|
+
* family has a single variant.
|
|
14811
|
+
*/
|
|
14812
|
+
variant: string().optional(),
|
|
14813
|
+
/**
|
|
14814
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14815
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
14816
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14817
|
+
* `LoadContribution.startedAtMs`.
|
|
14818
|
+
*/
|
|
14819
|
+
sinceMs: number(),
|
|
14820
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14821
|
+
atMs: number(),
|
|
14822
|
+
/**
|
|
14823
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14824
|
+
* window. A failure count published without it is the mistake this schema
|
|
14825
|
+
* exists to make impossible.
|
|
14826
|
+
*/
|
|
14827
|
+
attempts: number().int().nonnegative(),
|
|
14828
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14829
|
+
succeeded: number().int().nonnegative(),
|
|
14830
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14831
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
14832
|
+
});
|
|
14833
|
+
var failureContributionCapability = {
|
|
14834
|
+
name: "failure-contribution",
|
|
14835
|
+
scope: "system",
|
|
14836
|
+
mode: "collection",
|
|
14837
|
+
internal: true,
|
|
14838
|
+
methods: {
|
|
14839
|
+
/**
|
|
14840
|
+
* This addon's per-camera failure counters, read live from bounded in-RAM
|
|
14841
|
+
* state it already keeps. Inert: no persistence, no sampling, no timer.
|
|
14842
|
+
*
|
|
14843
|
+
* READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
|
|
14844
|
+
* consumer that wants a rate differences two reads. A draining read would
|
|
14845
|
+
* make two operators with the page open each destroy half of the other's
|
|
14846
|
+
* numbers, and `load-contribution` already settled the same question the
|
|
14847
|
+
* same way for `cpuSeconds`.
|
|
14848
|
+
*/
|
|
14849
|
+
list: method(_void(), array(FailureContributionSchema).readonly()) },
|
|
14850
|
+
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
14851
|
+
mount: { kind: "skip" }
|
|
14852
|
+
};
|
|
14853
|
+
/**
|
|
14727
14854
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
14728
14855
|
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
14729
14856
|
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
@@ -15334,6 +15461,82 @@ var llmCapability = {
|
|
|
15334
15461
|
})
|
|
15335
15462
|
}
|
|
15336
15463
|
};
|
|
15464
|
+
var LoadContributionSchema = object({
|
|
15465
|
+
role: _enum([
|
|
15466
|
+
"decode",
|
|
15467
|
+
"transcode",
|
|
15468
|
+
"recording",
|
|
15469
|
+
"streaming",
|
|
15470
|
+
"detection"
|
|
15471
|
+
]),
|
|
15472
|
+
/**
|
|
15473
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
15474
|
+
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
15475
|
+
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
15476
|
+
* contributor that cannot name its camera must not emit the entry at all,
|
|
15477
|
+
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
15478
|
+
* and would quietly turn one camera's cost into everybody's.
|
|
15479
|
+
*/
|
|
15480
|
+
deviceId: number().int().positive().nullable(),
|
|
15481
|
+
attribution: _enum([
|
|
15482
|
+
"measured",
|
|
15483
|
+
"accounted",
|
|
15484
|
+
"unattributable"
|
|
15485
|
+
]),
|
|
15486
|
+
/**
|
|
15487
|
+
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
15488
|
+
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
15489
|
+
* family and inventing a common one would lose the only information that
|
|
15490
|
+
* makes two entries for the same camera distinguishable.
|
|
15491
|
+
*/
|
|
15492
|
+
unit: string(),
|
|
15493
|
+
/**
|
|
15494
|
+
* The OS process this cost lives in, when there is one. Present so a
|
|
15495
|
+
* consumer can (a) tell two generations of the same unit apart across a
|
|
15496
|
+
* restart, and (b) subtract claimed processes from the node's process
|
|
15497
|
+
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
15498
|
+
* process of its own.
|
|
15499
|
+
*/
|
|
15500
|
+
pid: number().int().positive().optional(),
|
|
15501
|
+
/**
|
|
15502
|
+
* When this generation started. The pid's incarnation marker: a consumer
|
|
15503
|
+
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
15504
|
+
* window when this changes, because the counter restarted from zero in a new
|
|
15505
|
+
* process.
|
|
15506
|
+
*/
|
|
15507
|
+
startedAtMs: number().optional(),
|
|
15508
|
+
/**
|
|
15509
|
+
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
15510
|
+
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
15511
|
+
* contribution is asked for.
|
|
15512
|
+
*
|
|
15513
|
+
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
15514
|
+
* needs a sampler, and a new per-node sampler is the defect half of
|
|
15515
|
+
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
15516
|
+
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
15517
|
+
*
|
|
15518
|
+
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
15519
|
+
* an entry with no process.
|
|
15520
|
+
*/
|
|
15521
|
+
cpuSeconds: number().optional(),
|
|
15522
|
+
/** Resident bytes of this unit's process, same source and same rules. */
|
|
15523
|
+
rssBytes: number().optional()
|
|
15524
|
+
});
|
|
15525
|
+
var loadContributionCapability = {
|
|
15526
|
+
name: "load-contribution",
|
|
15527
|
+
scope: "system",
|
|
15528
|
+
mode: "collection",
|
|
15529
|
+
internal: true,
|
|
15530
|
+
methods: {
|
|
15531
|
+
/**
|
|
15532
|
+
* This addon's own cost entries, computed live from state it already
|
|
15533
|
+
* holds. Inert: no persistence, no sampling, no timer. It is answered on
|
|
15534
|
+
* whatever beat the caller already has.
|
|
15535
|
+
*/
|
|
15536
|
+
list: method(_void(), array(LoadContributionSchema).readonly()) },
|
|
15537
|
+
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
15538
|
+
mount: { kind: "skip" }
|
|
15539
|
+
};
|
|
15337
15540
|
/**
|
|
15338
15541
|
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
15339
15542
|
* through. It stores nothing.
|
|
@@ -15442,209 +15645,6 @@ var logDestinationCapability = {
|
|
|
15442
15645
|
mount: { kind: "skip" }
|
|
15443
15646
|
};
|
|
15444
15647
|
/**
|
|
15445
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
15446
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
15447
|
-
*
|
|
15448
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
15449
|
-
*
|
|
15450
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
15451
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
15452
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
15453
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
15454
|
-
* somebody to forget to edit.
|
|
15455
|
-
*
|
|
15456
|
-
* They are not merged, because their invariants are opposites:
|
|
15457
|
-
*
|
|
15458
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
15459
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
15460
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
15461
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
15462
|
-
* and it is exactly what an absent entry cannot say.
|
|
15463
|
-
*
|
|
15464
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
15465
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
15466
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
15467
|
-
* has no process.
|
|
15468
|
-
*
|
|
15469
|
-
* ## Why not a log line, since the counters already exist
|
|
15470
|
-
*
|
|
15471
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
15472
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
15473
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
15474
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
15475
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
15476
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
15477
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
15478
|
-
* be READ.
|
|
15479
|
-
*
|
|
15480
|
-
* ## The rate is served with its denominator or not at all
|
|
15481
|
-
*
|
|
15482
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
15483
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
15484
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
15485
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
15486
|
-
* reproduces that mistake on every read.
|
|
15487
|
-
*
|
|
15488
|
-
* ## Shape
|
|
15489
|
-
*
|
|
15490
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
15491
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
15492
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
15493
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
15494
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
15495
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
15496
|
-
* result through `system.getFailureContributions`.
|
|
15497
|
-
*/
|
|
15498
|
-
var FailureReasonCountSchema = object({
|
|
15499
|
-
/**
|
|
15500
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
15501
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
15502
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
15503
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
15504
|
-
* vocabulary for the same loss would make the row and the counter
|
|
15505
|
-
* un-joinable.
|
|
15506
|
-
*/
|
|
15507
|
-
reason: string(),
|
|
15508
|
-
count: number().int().nonnegative()
|
|
15509
|
-
});
|
|
15510
|
-
var FailureContributionSchema = object({
|
|
15511
|
-
/**
|
|
15512
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
15513
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
15514
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
15515
|
-
* is a central list that rots invisibly.
|
|
15516
|
-
*/
|
|
15517
|
-
family: string(),
|
|
15518
|
-
/**
|
|
15519
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
15520
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
15521
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
15522
|
-
* cannot answer the only question anybody asks of this surface.
|
|
15523
|
-
*/
|
|
15524
|
-
deviceId: number().int().positive(),
|
|
15525
|
-
/**
|
|
15526
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
15527
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
15528
|
-
* family has a single variant.
|
|
15529
|
-
*/
|
|
15530
|
-
variant: string().optional(),
|
|
15531
|
-
/**
|
|
15532
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
15533
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
15534
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
15535
|
-
* `LoadContribution.startedAtMs`.
|
|
15536
|
-
*/
|
|
15537
|
-
sinceMs: number(),
|
|
15538
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
15539
|
-
atMs: number(),
|
|
15540
|
-
/**
|
|
15541
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
15542
|
-
* window. A failure count published without it is the mistake this schema
|
|
15543
|
-
* exists to make impossible.
|
|
15544
|
-
*/
|
|
15545
|
-
attempts: number().int().nonnegative(),
|
|
15546
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
15547
|
-
succeeded: number().int().nonnegative(),
|
|
15548
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
15549
|
-
reasons: array(FailureReasonCountSchema).readonly()
|
|
15550
|
-
});
|
|
15551
|
-
var failureContributionCapability = {
|
|
15552
|
-
name: "failure-contribution",
|
|
15553
|
-
scope: "system",
|
|
15554
|
-
mode: "collection",
|
|
15555
|
-
internal: true,
|
|
15556
|
-
methods: {
|
|
15557
|
-
/**
|
|
15558
|
-
* This addon's per-camera failure counters, read live from bounded in-RAM
|
|
15559
|
-
* state it already keeps. Inert: no persistence, no sampling, no timer.
|
|
15560
|
-
*
|
|
15561
|
-
* READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
|
|
15562
|
-
* consumer that wants a rate differences two reads. A draining read would
|
|
15563
|
-
* make two operators with the page open each destroy half of the other's
|
|
15564
|
-
* numbers, and `load-contribution` already settled the same question the
|
|
15565
|
-
* same way for `cpuSeconds`.
|
|
15566
|
-
*/
|
|
15567
|
-
list: method(_void(), array(FailureContributionSchema).readonly()) },
|
|
15568
|
-
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
15569
|
-
mount: { kind: "skip" }
|
|
15570
|
-
};
|
|
15571
|
-
var LoadContributionSchema = object({
|
|
15572
|
-
role: _enum([
|
|
15573
|
-
"decode",
|
|
15574
|
-
"transcode",
|
|
15575
|
-
"recording",
|
|
15576
|
-
"streaming",
|
|
15577
|
-
"detection"
|
|
15578
|
-
]),
|
|
15579
|
-
/**
|
|
15580
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
15581
|
-
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
15582
|
-
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
15583
|
-
* contributor that cannot name its camera must not emit the entry at all,
|
|
15584
|
-
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
15585
|
-
* and would quietly turn one camera's cost into everybody's.
|
|
15586
|
-
*/
|
|
15587
|
-
deviceId: number().int().positive().nullable(),
|
|
15588
|
-
attribution: _enum([
|
|
15589
|
-
"measured",
|
|
15590
|
-
"accounted",
|
|
15591
|
-
"unattributable"
|
|
15592
|
-
]),
|
|
15593
|
-
/**
|
|
15594
|
-
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
15595
|
-
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
15596
|
-
* family and inventing a common one would lose the only information that
|
|
15597
|
-
* makes two entries for the same camera distinguishable.
|
|
15598
|
-
*/
|
|
15599
|
-
unit: string(),
|
|
15600
|
-
/**
|
|
15601
|
-
* The OS process this cost lives in, when there is one. Present so a
|
|
15602
|
-
* consumer can (a) tell two generations of the same unit apart across a
|
|
15603
|
-
* restart, and (b) subtract claimed processes from the node's process
|
|
15604
|
-
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
15605
|
-
* process of its own.
|
|
15606
|
-
*/
|
|
15607
|
-
pid: number().int().positive().optional(),
|
|
15608
|
-
/**
|
|
15609
|
-
* When this generation started. The pid's incarnation marker: a consumer
|
|
15610
|
-
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
15611
|
-
* window when this changes, because the counter restarted from zero in a new
|
|
15612
|
-
* process.
|
|
15613
|
-
*/
|
|
15614
|
-
startedAtMs: number().optional(),
|
|
15615
|
-
/**
|
|
15616
|
-
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
15617
|
-
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
15618
|
-
* contribution is asked for.
|
|
15619
|
-
*
|
|
15620
|
-
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
15621
|
-
* needs a sampler, and a new per-node sampler is the defect half of
|
|
15622
|
-
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
15623
|
-
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
15624
|
-
*
|
|
15625
|
-
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
15626
|
-
* an entry with no process.
|
|
15627
|
-
*/
|
|
15628
|
-
cpuSeconds: number().optional(),
|
|
15629
|
-
/** Resident bytes of this unit's process, same source and same rules. */
|
|
15630
|
-
rssBytes: number().optional()
|
|
15631
|
-
});
|
|
15632
|
-
var loadContributionCapability = {
|
|
15633
|
-
name: "load-contribution",
|
|
15634
|
-
scope: "system",
|
|
15635
|
-
mode: "collection",
|
|
15636
|
-
internal: true,
|
|
15637
|
-
methods: {
|
|
15638
|
-
/**
|
|
15639
|
-
* This addon's own cost entries, computed live from state it already
|
|
15640
|
-
* holds. Inert: no persistence, no sampling, no timer. It is answered on
|
|
15641
|
-
* whatever beat the caller already has.
|
|
15642
|
-
*/
|
|
15643
|
-
list: method(_void(), array(LoadContributionSchema).readonly()) },
|
|
15644
|
-
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
15645
|
-
mount: { kind: "skip" }
|
|
15646
|
-
};
|
|
15647
|
-
/**
|
|
15648
15648
|
* `login-method` — collection cap through which auth addons contribute
|
|
15649
15649
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
15650
15650
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
@@ -21304,12 +21304,53 @@ var MediaFileKindEnum = _enum([
|
|
|
21304
21304
|
"keyFrameSmall",
|
|
21305
21305
|
"thumbnailSmall"
|
|
21306
21306
|
]);
|
|
21307
|
+
/**
|
|
21308
|
+
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
21309
|
+
* ARE — never the bytes themselves.
|
|
21310
|
+
*
|
|
21311
|
+
* ## Why `url` and not `base64`
|
|
21312
|
+
*
|
|
21313
|
+
* Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
|
|
21314
|
+
* with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
|
|
21315
|
+
* was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
|
|
21316
|
+
* wire. Forty events is ~144 MB. Every byte of it was read off disk,
|
|
21317
|
+
* base64-encoded, held whole in a unary tRPC envelope, and materialised in
|
|
21318
|
+
* hub-main's heap on the way past — for an `<img>` that would have cached it.
|
|
21319
|
+
*
|
|
21320
|
+
* `url` points at the `event-media` data plane
|
|
21321
|
+
* (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
|
|
21322
|
+
* with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
|
|
21323
|
+
* render a `?variant=thumb`, and streams. The hub gate in front of it requires
|
|
21324
|
+
* a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
|
|
21325
|
+
* no less protected than they were inside a `view`-level cap response — see
|
|
21326
|
+
* `data-plane-access.ts` for the rule and the one gap it does not close
|
|
21327
|
+
* (per-device scoping).
|
|
21328
|
+
*
|
|
21329
|
+
* The URL is built from the row's **stored** key, which is not always its
|
|
21330
|
+
* published `kind`: a track's face/plate crop is stored as `crop` under
|
|
21331
|
+
* `('face'|'plate', '<prefix>-<trackId>')` and published as
|
|
21332
|
+
* `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
|
|
21333
|
+
*
|
|
21334
|
+
* ## `base64` is TRANSITIONAL and is going away
|
|
21335
|
+
*
|
|
21336
|
+
* It is still populated for one reason: the deployed viewer's track-detail
|
|
21337
|
+
* HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
|
|
21338
|
+
* REQUIRES the field), and a row without it parses as a FAILED read — the red
|
|
21339
|
+
* triangle — not as absence. Removing the field before that viewer ships is an
|
|
21340
|
+
* outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
|
|
21341
|
+
* delete this line and the `withBytes` pass-through in
|
|
21342
|
+
* `analytics-query-facade.ts`; nothing else reads it.
|
|
21343
|
+
*/
|
|
21307
21344
|
var MediaFileSchema = object({
|
|
21308
21345
|
key: string(),
|
|
21309
21346
|
kind: MediaFileKindEnum,
|
|
21310
|
-
base64: string(),
|
|
21311
21347
|
sizeBytes: number(),
|
|
21312
21348
|
timestamp: number()
|
|
21349
|
+
}).extend({
|
|
21350
|
+
/** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
|
|
21351
|
+
url: string(),
|
|
21352
|
+
/** @deprecated Transitional — see the schema docblock. Use {@link url}. */
|
|
21353
|
+
base64: string()
|
|
21313
21354
|
});
|
|
21314
21355
|
/**
|
|
21315
21356
|
* One media row WITHOUT its bytes.
|
|
@@ -21321,7 +21362,9 @@ var MediaFileSchema = object({
|
|
|
21321
21362
|
* blocks the whole view.
|
|
21322
21363
|
*
|
|
21323
21364
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
21324
|
-
* stored blob and a `?variant=thumb` rendering without fetching either
|
|
21365
|
+
* stored blob and a `?variant=thumb` rendering without fetching either, and
|
|
21366
|
+
* `url` because a client that had to build the plane path itself is a second
|
|
21367
|
+
* copy of a route — the embed, the viewer and the admin UI each grew one.
|
|
21325
21368
|
*/
|
|
21326
21369
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
21327
21370
|
/**
|
|
@@ -21668,6 +21711,50 @@ var EventStoreFootprintSchema = object({
|
|
|
21668
21711
|
totalBytes: number().int(),
|
|
21669
21712
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
21670
21713
|
});
|
|
21714
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
21715
|
+
var EventMediaKindFootprintSchema = object({
|
|
21716
|
+
kind: MediaFileKindEnum,
|
|
21717
|
+
/** Media rows of this kind. */
|
|
21718
|
+
rows: number().int(),
|
|
21719
|
+
/** Bytes on disk held by those rows. */
|
|
21720
|
+
bytes: number().int()
|
|
21721
|
+
});
|
|
21722
|
+
/**
|
|
21723
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
21724
|
+
* actually turns on.
|
|
21725
|
+
*
|
|
21726
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
21727
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
21728
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
21729
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
21730
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
21731
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
21732
|
+
*
|
|
21733
|
+
* ## Why `unaccounted*` exists
|
|
21734
|
+
*
|
|
21735
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
21736
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
21737
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
21738
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
21739
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
21740
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
21741
|
+
* against a denominator smaller than the disk.
|
|
21742
|
+
*
|
|
21743
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
21744
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
21745
|
+
*/
|
|
21746
|
+
var EventMediaKindBreakdownSchema = object({
|
|
21747
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
21748
|
+
totalRows: number().int(),
|
|
21749
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
21750
|
+
totalBytes: number().int(),
|
|
21751
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
21752
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
21753
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
21754
|
+
unaccountedRows: number().int(),
|
|
21755
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
21756
|
+
unaccountedBytes: number().int()
|
|
21757
|
+
});
|
|
21671
21758
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
21672
21759
|
var EventPruneCountsSchema = object({
|
|
21673
21760
|
motion: number().int(),
|
|
@@ -22049,6 +22136,22 @@ var pipelineAnalyticsCapability = {
|
|
|
22049
22136
|
auth: "admin"
|
|
22050
22137
|
}),
|
|
22051
22138
|
/**
|
|
22139
|
+
* The same media footprint, broken down by {@link MediaFileKind} instead of
|
|
22140
|
+
* by camera — fleet-wide, or for one camera with `deviceId`.
|
|
22141
|
+
*
|
|
22142
|
+
* Separate from {@link getEventStoreFootprint} rather than a field on it:
|
|
22143
|
+
* the two answer different questions on different axes, the per-camera one
|
|
22144
|
+
* is what the management table renders on every open, and nothing should
|
|
22145
|
+
* pay for a per-kind pass to draw it. See
|
|
22146
|
+
* {@link EventMediaKindBreakdownSchema} for why `unaccounted*` exists —
|
|
22147
|
+
* `kinds` is enumerated, `totalBytes` is not, and the gap must be visible
|
|
22148
|
+
* to anyone sizing a deletion against it.
|
|
22149
|
+
*/
|
|
22150
|
+
getEventMediaFootprintByKind: method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
22151
|
+
kind: "query",
|
|
22152
|
+
auth: "admin"
|
|
22153
|
+
}),
|
|
22154
|
+
/**
|
|
22052
22155
|
* Cluster-wide prune of events older than `olderThanMs` (exclusive) across
|
|
22053
22156
|
* every camera, deleting each event's media in lockstep. Logged to the
|
|
22054
22157
|
* events ops-log with `reason` (default `'retention'`). Returns the summed
|
|
@@ -22453,6 +22556,26 @@ var pipelineAnalyticsCapability = {
|
|
|
22453
22556
|
deviceId: number()
|
|
22454
22557
|
}), array(MediaFileInfoSchema).readonly()),
|
|
22455
22558
|
/**
|
|
22559
|
+
* What media an EVENT has, without any of it — the twin `getEventMedia`
|
|
22560
|
+
* never had.
|
|
22561
|
+
*
|
|
22562
|
+
* `listTrackMedia` above got this treatment because a track's media is
|
|
22563
|
+
* 5-8 MB. An event's is worse per row, not better: an old-style event owns
|
|
22564
|
+
* a `crop` AND a native-resolution `fullFrameBoxed`, and the track DETAIL
|
|
22565
|
+
* modal — the one surface that legitimately shows the big kinds — unions
|
|
22566
|
+
* both listings to build its filmstrip. It then renders every tile from
|
|
22567
|
+
* the `event-media` plane by key and throws the bytes away. Measured on
|
|
22568
|
+
* the live hub: one event's `fullFrameBoxed` is 2 824 077 B, base64'd to
|
|
22569
|
+
* ~3.8 MB, allocated whole in hub-main's heap, for a list of keys.
|
|
22570
|
+
*
|
|
22571
|
+
* Same `deviceId` authorization subject as `getEventMedia`, and the same
|
|
22572
|
+
* rows — this is a projection of that method, never a different question.
|
|
22573
|
+
*/
|
|
22574
|
+
listEventMedia: method(object({
|
|
22575
|
+
eventId: string(),
|
|
22576
|
+
deviceId: number()
|
|
22577
|
+
}), array(MediaFileInfoSchema).readonly()),
|
|
22578
|
+
/**
|
|
22456
22579
|
* Search object events by text query using CLIP cosine similarity.
|
|
22457
22580
|
* Encodes `text` via the `embedding-encoder` cap, queries the
|
|
22458
22581
|
* `ObjectEmbeddingStore` with optional prefilters, ranks all matching
|
|
@@ -24974,6 +25097,20 @@ var storageCapability = {
|
|
|
24974
25097
|
listProviders: method(_void(), array(ProviderListEntrySchema).readonly()),
|
|
24975
25098
|
testConfig: method(object({
|
|
24976
25099
|
providerId: string(),
|
|
25100
|
+
/**
|
|
25101
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
25102
|
+
*
|
|
25103
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
25104
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
25105
|
+
* credential the operator did not retype — and posting that here
|
|
25106
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
25107
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
25108
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
25109
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
25110
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
25111
|
+
* every value was typed just now and nothing is stored yet.
|
|
25112
|
+
*/
|
|
25113
|
+
locationId: string().optional(),
|
|
24977
25114
|
config: record(string(), unknown())
|
|
24978
25115
|
}), object({
|
|
24979
25116
|
ok: boolean(),
|
|
@@ -28799,10 +28936,24 @@ var FaceClusterSchema = object({
|
|
|
28799
28936
|
size: number().int(),
|
|
28800
28937
|
cohesion: number()
|
|
28801
28938
|
});
|
|
28939
|
+
/**
|
|
28940
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
28941
|
+
* are — never the bytes.
|
|
28942
|
+
*
|
|
28943
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
28944
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
28945
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
28946
|
+
* caller is the admin UI's detail modal, which was building
|
|
28947
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
28948
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
28949
|
+
*
|
|
28950
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
28951
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
28952
|
+
*/
|
|
28802
28953
|
var MediaFileLiteSchema$1 = object({
|
|
28803
28954
|
key: string(),
|
|
28804
28955
|
kind: string(),
|
|
28805
|
-
|
|
28956
|
+
url: string(),
|
|
28806
28957
|
sizeBytes: number(),
|
|
28807
28958
|
timestamp: number()
|
|
28808
28959
|
});
|
|
@@ -32192,10 +32343,24 @@ var PlateInfoSchema = object({
|
|
|
32192
32343
|
*/
|
|
32193
32344
|
cropUrl: string().optional()
|
|
32194
32345
|
});
|
|
32346
|
+
/**
|
|
32347
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
32348
|
+
* are — never the bytes.
|
|
32349
|
+
*
|
|
32350
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
32351
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
32352
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
32353
|
+
* caller is the admin UI's detail modal, which was building
|
|
32354
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
32355
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
32356
|
+
*
|
|
32357
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
32358
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
32359
|
+
*/
|
|
32195
32360
|
var MediaFileLiteSchema = object({
|
|
32196
32361
|
key: string(),
|
|
32197
32362
|
kind: string(),
|
|
32198
|
-
|
|
32363
|
+
url: string(),
|
|
32199
32364
|
sizeBytes: number(),
|
|
32200
32365
|
timestamp: number()
|
|
32201
32366
|
});
|
|
@@ -39589,6 +39754,12 @@ Object.freeze({
|
|
|
39589
39754
|
addonId: null,
|
|
39590
39755
|
access: "view"
|
|
39591
39756
|
},
|
|
39757
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
39758
|
+
capName: "pipeline-analytics",
|
|
39759
|
+
capScope: "device",
|
|
39760
|
+
addonId: null,
|
|
39761
|
+
access: "view"
|
|
39762
|
+
},
|
|
39592
39763
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
39593
39764
|
capName: "pipeline-analytics",
|
|
39594
39765
|
capScope: "device",
|
|
@@ -39685,6 +39856,12 @@ Object.freeze({
|
|
|
39685
39856
|
addonId: null,
|
|
39686
39857
|
access: "view"
|
|
39687
39858
|
},
|
|
39859
|
+
"pipelineAnalytics.listEventMedia": {
|
|
39860
|
+
capName: "pipeline-analytics",
|
|
39861
|
+
capScope: "device",
|
|
39862
|
+
addonId: null,
|
|
39863
|
+
access: "view"
|
|
39864
|
+
},
|
|
39688
39865
|
"pipelineAnalytics.listGroups": {
|
|
39689
39866
|
capName: "pipeline-analytics",
|
|
39690
39867
|
capScope: "device",
|
|
@@ -43248,6 +43425,11 @@ Object.freeze({
|
|
|
43248
43425
|
form: "single",
|
|
43249
43426
|
optional: false
|
|
43250
43427
|
}],
|
|
43428
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
43429
|
+
name: "deviceId",
|
|
43430
|
+
form: "single",
|
|
43431
|
+
optional: true
|
|
43432
|
+
}],
|
|
43251
43433
|
"pipelineAnalytics.getGroup": [{
|
|
43252
43434
|
name: "deviceId",
|
|
43253
43435
|
form: "single",
|
|
@@ -43308,6 +43490,11 @@ Object.freeze({
|
|
|
43308
43490
|
form: "array",
|
|
43309
43491
|
optional: false
|
|
43310
43492
|
}],
|
|
43493
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
43494
|
+
name: "deviceId",
|
|
43495
|
+
form: "single",
|
|
43496
|
+
optional: false
|
|
43497
|
+
}],
|
|
43311
43498
|
"pipelineAnalytics.listGroups": [{
|
|
43312
43499
|
name: "deviceIds",
|
|
43313
43500
|
form: "array",
|