@camstack/addon-pipeline-orchestrator 1.2.126 → 1.2.127
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/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-CXhvoqSz.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BbK-mPCs.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Cb3dN7Fo.mjs +26 -0
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-B4f8pBZg.mjs +26 -0
- package/dist/{hostInit-TesSFjYU.mjs → hostInit-C7JAXCVu.mjs} +3 -3
- package/dist/index.js +259 -174
- package/dist/index.mjs +259 -174
- package/dist/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CJq8bXZN.mjs +0 -26
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Cg19xcCo.mjs +0 -26
package/dist/index.js
CHANGED
|
@@ -13875,6 +13875,114 @@ method(object({
|
|
|
13875
13875
|
height: number()
|
|
13876
13876
|
}), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
|
|
13877
13877
|
/**
|
|
13878
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
13879
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
13880
|
+
*
|
|
13881
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
13882
|
+
*
|
|
13883
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
13884
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
13885
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
13886
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
13887
|
+
* somebody to forget to edit.
|
|
13888
|
+
*
|
|
13889
|
+
* They are not merged, because their invariants are opposites:
|
|
13890
|
+
*
|
|
13891
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
13892
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
13893
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
13894
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
13895
|
+
* and it is exactly what an absent entry cannot say.
|
|
13896
|
+
*
|
|
13897
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
13898
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
13899
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
13900
|
+
* has no process.
|
|
13901
|
+
*
|
|
13902
|
+
* ## Why not a log line, since the counters already exist
|
|
13903
|
+
*
|
|
13904
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
13905
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
13906
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
13907
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
13908
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
13909
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
13910
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
13911
|
+
* be READ.
|
|
13912
|
+
*
|
|
13913
|
+
* ## The rate is served with its denominator or not at all
|
|
13914
|
+
*
|
|
13915
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
13916
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
13917
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
13918
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
13919
|
+
* reproduces that mistake on every read.
|
|
13920
|
+
*
|
|
13921
|
+
* ## Shape
|
|
13922
|
+
*
|
|
13923
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
13924
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
13925
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
13926
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
13927
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
13928
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
13929
|
+
* result through `system.getFailureContributions`.
|
|
13930
|
+
*/
|
|
13931
|
+
var FailureReasonCountSchema = object({
|
|
13932
|
+
/**
|
|
13933
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
13934
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
13935
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
13936
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
13937
|
+
* vocabulary for the same loss would make the row and the counter
|
|
13938
|
+
* un-joinable.
|
|
13939
|
+
*/
|
|
13940
|
+
reason: string(),
|
|
13941
|
+
count: number().int().nonnegative()
|
|
13942
|
+
});
|
|
13943
|
+
var FailureContributionSchema = object({
|
|
13944
|
+
/**
|
|
13945
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
13946
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
13947
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
13948
|
+
* is a central list that rots invisibly.
|
|
13949
|
+
*/
|
|
13950
|
+
family: string(),
|
|
13951
|
+
/**
|
|
13952
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
13953
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
13954
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
13955
|
+
* cannot answer the only question anybody asks of this surface.
|
|
13956
|
+
*/
|
|
13957
|
+
deviceId: number().int().positive(),
|
|
13958
|
+
/**
|
|
13959
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
13960
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
13961
|
+
* family has a single variant.
|
|
13962
|
+
*/
|
|
13963
|
+
variant: string().optional(),
|
|
13964
|
+
/**
|
|
13965
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
13966
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
13967
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
13968
|
+
* `LoadContribution.startedAtMs`.
|
|
13969
|
+
*/
|
|
13970
|
+
sinceMs: number(),
|
|
13971
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
13972
|
+
atMs: number(),
|
|
13973
|
+
/**
|
|
13974
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
13975
|
+
* window. A failure count published without it is the mistake this schema
|
|
13976
|
+
* exists to make impossible.
|
|
13977
|
+
*/
|
|
13978
|
+
attempts: number().int().nonnegative(),
|
|
13979
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
13980
|
+
succeeded: number().int().nonnegative(),
|
|
13981
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
13982
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
13983
|
+
});
|
|
13984
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
13985
|
+
/**
|
|
13878
13986
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
13879
13987
|
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
13880
13988
|
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
@@ -14396,6 +14504,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14396
14504
|
kind: "mutation",
|
|
14397
14505
|
auth: "admin"
|
|
14398
14506
|
});
|
|
14507
|
+
var LoadContributionSchema = object({
|
|
14508
|
+
role: _enum([
|
|
14509
|
+
"decode",
|
|
14510
|
+
"transcode",
|
|
14511
|
+
"recording",
|
|
14512
|
+
"streaming",
|
|
14513
|
+
"detection"
|
|
14514
|
+
]),
|
|
14515
|
+
/**
|
|
14516
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
14517
|
+
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14518
|
+
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14519
|
+
* contributor that cannot name its camera must not emit the entry at all,
|
|
14520
|
+
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14521
|
+
* and would quietly turn one camera's cost into everybody's.
|
|
14522
|
+
*/
|
|
14523
|
+
deviceId: number().int().positive().nullable(),
|
|
14524
|
+
attribution: _enum([
|
|
14525
|
+
"measured",
|
|
14526
|
+
"accounted",
|
|
14527
|
+
"unattributable"
|
|
14528
|
+
]),
|
|
14529
|
+
/**
|
|
14530
|
+
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14531
|
+
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14532
|
+
* family and inventing a common one would lose the only information that
|
|
14533
|
+
* makes two entries for the same camera distinguishable.
|
|
14534
|
+
*/
|
|
14535
|
+
unit: string(),
|
|
14536
|
+
/**
|
|
14537
|
+
* The OS process this cost lives in, when there is one. Present so a
|
|
14538
|
+
* consumer can (a) tell two generations of the same unit apart across a
|
|
14539
|
+
* restart, and (b) subtract claimed processes from the node's process
|
|
14540
|
+
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14541
|
+
* process of its own.
|
|
14542
|
+
*/
|
|
14543
|
+
pid: number().int().positive().optional(),
|
|
14544
|
+
/**
|
|
14545
|
+
* When this generation started. The pid's incarnation marker: a consumer
|
|
14546
|
+
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14547
|
+
* window when this changes, because the counter restarted from zero in a new
|
|
14548
|
+
* process.
|
|
14549
|
+
*/
|
|
14550
|
+
startedAtMs: number().optional(),
|
|
14551
|
+
/**
|
|
14552
|
+
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14553
|
+
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14554
|
+
* contribution is asked for.
|
|
14555
|
+
*
|
|
14556
|
+
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14557
|
+
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14558
|
+
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14559
|
+
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14560
|
+
*
|
|
14561
|
+
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14562
|
+
* an entry with no process.
|
|
14563
|
+
*/
|
|
14564
|
+
cpuSeconds: number().optional(),
|
|
14565
|
+
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14566
|
+
rssBytes: number().optional()
|
|
14567
|
+
});
|
|
14568
|
+
method(_void(), array(LoadContributionSchema).readonly());
|
|
14399
14569
|
/**
|
|
14400
14570
|
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
14401
14571
|
* through. It stores nothing.
|
|
@@ -14472,176 +14642,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14472
14642
|
tags: record(string(), string()).optional()
|
|
14473
14643
|
}), array(LogEntrySchema).readonly());
|
|
14474
14644
|
/**
|
|
14475
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14476
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
14477
|
-
*
|
|
14478
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14479
|
-
*
|
|
14480
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14481
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14482
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14483
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14484
|
-
* somebody to forget to edit.
|
|
14485
|
-
*
|
|
14486
|
-
* They are not merged, because their invariants are opposites:
|
|
14487
|
-
*
|
|
14488
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14489
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14490
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14491
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14492
|
-
* and it is exactly what an absent entry cannot say.
|
|
14493
|
-
*
|
|
14494
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14495
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14496
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14497
|
-
* has no process.
|
|
14498
|
-
*
|
|
14499
|
-
* ## Why not a log line, since the counters already exist
|
|
14500
|
-
*
|
|
14501
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14502
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14503
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14504
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14505
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14506
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14507
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14508
|
-
* be READ.
|
|
14509
|
-
*
|
|
14510
|
-
* ## The rate is served with its denominator or not at all
|
|
14511
|
-
*
|
|
14512
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14513
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14514
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14515
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
14516
|
-
* reproduces that mistake on every read.
|
|
14517
|
-
*
|
|
14518
|
-
* ## Shape
|
|
14519
|
-
*
|
|
14520
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14521
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14522
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14523
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14524
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14525
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14526
|
-
* result through `system.getFailureContributions`.
|
|
14527
|
-
*/
|
|
14528
|
-
var FailureReasonCountSchema = object({
|
|
14529
|
-
/**
|
|
14530
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14531
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14532
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
14533
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
14534
|
-
* vocabulary for the same loss would make the row and the counter
|
|
14535
|
-
* un-joinable.
|
|
14536
|
-
*/
|
|
14537
|
-
reason: string(),
|
|
14538
|
-
count: number().int().nonnegative()
|
|
14539
|
-
});
|
|
14540
|
-
var FailureContributionSchema = object({
|
|
14541
|
-
/**
|
|
14542
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14543
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14544
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
14545
|
-
* is a central list that rots invisibly.
|
|
14546
|
-
*/
|
|
14547
|
-
family: string(),
|
|
14548
|
-
/**
|
|
14549
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14550
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14551
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
14552
|
-
* cannot answer the only question anybody asks of this surface.
|
|
14553
|
-
*/
|
|
14554
|
-
deviceId: number().int().positive(),
|
|
14555
|
-
/**
|
|
14556
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
14557
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14558
|
-
* family has a single variant.
|
|
14559
|
-
*/
|
|
14560
|
-
variant: string().optional(),
|
|
14561
|
-
/**
|
|
14562
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14563
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
14564
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14565
|
-
* `LoadContribution.startedAtMs`.
|
|
14566
|
-
*/
|
|
14567
|
-
sinceMs: number(),
|
|
14568
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14569
|
-
atMs: number(),
|
|
14570
|
-
/**
|
|
14571
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14572
|
-
* window. A failure count published without it is the mistake this schema
|
|
14573
|
-
* exists to make impossible.
|
|
14574
|
-
*/
|
|
14575
|
-
attempts: number().int().nonnegative(),
|
|
14576
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14577
|
-
succeeded: number().int().nonnegative(),
|
|
14578
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14579
|
-
reasons: array(FailureReasonCountSchema).readonly()
|
|
14580
|
-
});
|
|
14581
|
-
method(_void(), array(FailureContributionSchema).readonly());
|
|
14582
|
-
var LoadContributionSchema = object({
|
|
14583
|
-
role: _enum([
|
|
14584
|
-
"decode",
|
|
14585
|
-
"transcode",
|
|
14586
|
-
"recording",
|
|
14587
|
-
"streaming",
|
|
14588
|
-
"detection"
|
|
14589
|
-
]),
|
|
14590
|
-
/**
|
|
14591
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14592
|
-
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14593
|
-
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14594
|
-
* contributor that cannot name its camera must not emit the entry at all,
|
|
14595
|
-
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14596
|
-
* and would quietly turn one camera's cost into everybody's.
|
|
14597
|
-
*/
|
|
14598
|
-
deviceId: number().int().positive().nullable(),
|
|
14599
|
-
attribution: _enum([
|
|
14600
|
-
"measured",
|
|
14601
|
-
"accounted",
|
|
14602
|
-
"unattributable"
|
|
14603
|
-
]),
|
|
14604
|
-
/**
|
|
14605
|
-
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14606
|
-
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14607
|
-
* family and inventing a common one would lose the only information that
|
|
14608
|
-
* makes two entries for the same camera distinguishable.
|
|
14609
|
-
*/
|
|
14610
|
-
unit: string(),
|
|
14611
|
-
/**
|
|
14612
|
-
* The OS process this cost lives in, when there is one. Present so a
|
|
14613
|
-
* consumer can (a) tell two generations of the same unit apart across a
|
|
14614
|
-
* restart, and (b) subtract claimed processes from the node's process
|
|
14615
|
-
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14616
|
-
* process of its own.
|
|
14617
|
-
*/
|
|
14618
|
-
pid: number().int().positive().optional(),
|
|
14619
|
-
/**
|
|
14620
|
-
* When this generation started. The pid's incarnation marker: a consumer
|
|
14621
|
-
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14622
|
-
* window when this changes, because the counter restarted from zero in a new
|
|
14623
|
-
* process.
|
|
14624
|
-
*/
|
|
14625
|
-
startedAtMs: number().optional(),
|
|
14626
|
-
/**
|
|
14627
|
-
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14628
|
-
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14629
|
-
* contribution is asked for.
|
|
14630
|
-
*
|
|
14631
|
-
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14632
|
-
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14633
|
-
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14634
|
-
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14635
|
-
*
|
|
14636
|
-
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14637
|
-
* an entry with no process.
|
|
14638
|
-
*/
|
|
14639
|
-
cpuSeconds: number().optional(),
|
|
14640
|
-
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14641
|
-
rssBytes: number().optional()
|
|
14642
|
-
});
|
|
14643
|
-
method(_void(), array(LoadContributionSchema).readonly());
|
|
14644
|
-
/**
|
|
14645
14645
|
* `login-method` — collection cap through which auth addons contribute
|
|
14646
14646
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
14647
14647
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
@@ -19525,12 +19525,53 @@ var MediaFileKindEnum = _enum([
|
|
|
19525
19525
|
"keyFrameSmall",
|
|
19526
19526
|
"thumbnailSmall"
|
|
19527
19527
|
]);
|
|
19528
|
+
/**
|
|
19529
|
+
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
19530
|
+
* ARE — never the bytes themselves.
|
|
19531
|
+
*
|
|
19532
|
+
* ## Why `url` and not `base64`
|
|
19533
|
+
*
|
|
19534
|
+
* Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
|
|
19535
|
+
* with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
|
|
19536
|
+
* was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
|
|
19537
|
+
* wire. Forty events is ~144 MB. Every byte of it was read off disk,
|
|
19538
|
+
* base64-encoded, held whole in a unary tRPC envelope, and materialised in
|
|
19539
|
+
* hub-main's heap on the way past — for an `<img>` that would have cached it.
|
|
19540
|
+
*
|
|
19541
|
+
* `url` points at the `event-media` data plane
|
|
19542
|
+
* (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
|
|
19543
|
+
* with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
|
|
19544
|
+
* render a `?variant=thumb`, and streams. The hub gate in front of it requires
|
|
19545
|
+
* a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
|
|
19546
|
+
* no less protected than they were inside a `view`-level cap response — see
|
|
19547
|
+
* `data-plane-access.ts` for the rule and the one gap it does not close
|
|
19548
|
+
* (per-device scoping).
|
|
19549
|
+
*
|
|
19550
|
+
* The URL is built from the row's **stored** key, which is not always its
|
|
19551
|
+
* published `kind`: a track's face/plate crop is stored as `crop` under
|
|
19552
|
+
* `('face'|'plate', '<prefix>-<trackId>')` and published as
|
|
19553
|
+
* `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
|
|
19554
|
+
*
|
|
19555
|
+
* ## `base64` is TRANSITIONAL and is going away
|
|
19556
|
+
*
|
|
19557
|
+
* It is still populated for one reason: the deployed viewer's track-detail
|
|
19558
|
+
* HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
|
|
19559
|
+
* REQUIRES the field), and a row without it parses as a FAILED read — the red
|
|
19560
|
+
* triangle — not as absence. Removing the field before that viewer ships is an
|
|
19561
|
+
* outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
|
|
19562
|
+
* delete this line and the `withBytes` pass-through in
|
|
19563
|
+
* `analytics-query-facade.ts`; nothing else reads it.
|
|
19564
|
+
*/
|
|
19528
19565
|
var MediaFileSchema = object({
|
|
19529
19566
|
key: string(),
|
|
19530
19567
|
kind: MediaFileKindEnum,
|
|
19531
|
-
base64: string(),
|
|
19532
19568
|
sizeBytes: number(),
|
|
19533
19569
|
timestamp: number()
|
|
19570
|
+
}).extend({
|
|
19571
|
+
/** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
|
|
19572
|
+
url: string(),
|
|
19573
|
+
/** @deprecated Transitional — see the schema docblock. Use {@link url}. */
|
|
19574
|
+
base64: string()
|
|
19534
19575
|
});
|
|
19535
19576
|
/**
|
|
19536
19577
|
* One media row WITHOUT its bytes.
|
|
@@ -19542,7 +19583,9 @@ var MediaFileSchema = object({
|
|
|
19542
19583
|
* blocks the whole view.
|
|
19543
19584
|
*
|
|
19544
19585
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
19545
|
-
* stored blob and a `?variant=thumb` rendering without fetching either
|
|
19586
|
+
* stored blob and a `?variant=thumb` rendering without fetching either, and
|
|
19587
|
+
* `url` because a client that had to build the plane path itself is a second
|
|
19588
|
+
* copy of a route — the embed, the viewer and the admin UI each grew one.
|
|
19546
19589
|
*/
|
|
19547
19590
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
19548
19591
|
/**
|
|
@@ -20231,6 +20274,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20231
20274
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
20232
20275
|
trackId: string(),
|
|
20233
20276
|
deviceId: number()
|
|
20277
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
20278
|
+
eventId: string(),
|
|
20279
|
+
deviceId: number()
|
|
20234
20280
|
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
20235
20281
|
kind: "mutation",
|
|
20236
20282
|
auth: "admin"
|
|
@@ -24972,10 +25018,24 @@ var FaceClusterSchema = object({
|
|
|
24972
25018
|
size: number().int(),
|
|
24973
25019
|
cohesion: number()
|
|
24974
25020
|
});
|
|
25021
|
+
/**
|
|
25022
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
25023
|
+
* are — never the bytes.
|
|
25024
|
+
*
|
|
25025
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
25026
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
25027
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
25028
|
+
* caller is the admin UI's detail modal, which was building
|
|
25029
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
25030
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
25031
|
+
*
|
|
25032
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
25033
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
25034
|
+
*/
|
|
24975
25035
|
var MediaFileLiteSchema$1 = object({
|
|
24976
25036
|
key: string(),
|
|
24977
25037
|
kind: string(),
|
|
24978
|
-
|
|
25038
|
+
url: string(),
|
|
24979
25039
|
sizeBytes: number(),
|
|
24980
25040
|
timestamp: number()
|
|
24981
25041
|
});
|
|
@@ -27227,10 +27287,24 @@ var PlateInfoSchema = object({
|
|
|
27227
27287
|
*/
|
|
27228
27288
|
cropUrl: string().optional()
|
|
27229
27289
|
});
|
|
27290
|
+
/**
|
|
27291
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
27292
|
+
* are — never the bytes.
|
|
27293
|
+
*
|
|
27294
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
27295
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
27296
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
27297
|
+
* caller is the admin UI's detail modal, which was building
|
|
27298
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
27299
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
27300
|
+
*
|
|
27301
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
27302
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
27303
|
+
*/
|
|
27230
27304
|
var MediaFileLiteSchema = object({
|
|
27231
27305
|
key: string(),
|
|
27232
27306
|
kind: string(),
|
|
27233
|
-
|
|
27307
|
+
url: string(),
|
|
27234
27308
|
sizeBytes: number(),
|
|
27235
27309
|
timestamp: number()
|
|
27236
27310
|
});
|
|
@@ -33327,6 +33401,12 @@ Object.freeze({
|
|
|
33327
33401
|
addonId: null,
|
|
33328
33402
|
access: "view"
|
|
33329
33403
|
},
|
|
33404
|
+
"pipelineAnalytics.listEventMedia": {
|
|
33405
|
+
capName: "pipeline-analytics",
|
|
33406
|
+
capScope: "device",
|
|
33407
|
+
addonId: null,
|
|
33408
|
+
access: "view"
|
|
33409
|
+
},
|
|
33330
33410
|
"pipelineAnalytics.listGroups": {
|
|
33331
33411
|
capName: "pipeline-analytics",
|
|
33332
33412
|
capScope: "device",
|
|
@@ -36950,6 +37030,11 @@ Object.freeze({
|
|
|
36950
37030
|
form: "array",
|
|
36951
37031
|
optional: false
|
|
36952
37032
|
}],
|
|
37033
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
37034
|
+
name: "deviceId",
|
|
37035
|
+
form: "single",
|
|
37036
|
+
optional: false
|
|
37037
|
+
}],
|
|
36953
37038
|
"pipelineAnalytics.listGroups": [{
|
|
36954
37039
|
name: "deviceIds",
|
|
36955
37040
|
form: "array",
|