@camstack/addon-pipeline-orchestrator 1.2.125 → 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-B6alraGf.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-0RYUtalm.mjs → hostInit-C7JAXCVu.mjs} +3 -3
- package/dist/index.js +313 -181
- package/dist/index.mjs +313 -181
- 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-DcyBSHIn.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.mjs
CHANGED
|
@@ -8851,6 +8851,21 @@ var RelocateJobSchema = object({
|
|
|
8851
8851
|
bytesMoved: number().int(),
|
|
8852
8852
|
/** Total files discovered up front; null while (or when) unknown. */
|
|
8853
8853
|
filesTotal: number().int().nullable(),
|
|
8854
|
+
/**
|
|
8855
|
+
* Rows this run CORRECTED while moving them — a durable mutation the move
|
|
8856
|
+
* made that nobody asked for, so it is reported where the operator reads the
|
|
8857
|
+
* job rather than only in a log line.
|
|
8858
|
+
*
|
|
8859
|
+
* A footage segment records its byte count in its own NAME, and the durable
|
|
8860
|
+
* hour row derives its aggregates from those names. A file that does not
|
|
8861
|
+
* match its name therefore makes the ledger's sums — and with them quota and
|
|
8862
|
+
* pressure eviction — wrong by the difference, and only a rename can fix it.
|
|
8863
|
+
* On 2026-08-30 one such row also stalled a 110 749-file drain permanently.
|
|
8864
|
+
*
|
|
8865
|
+
* Absent on lanes where the question has no meaning: a media blob's size is
|
|
8866
|
+
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8867
|
+
*/
|
|
8868
|
+
rowsReconciled: number().int().nonnegative().optional(),
|
|
8854
8869
|
startedAt: number(),
|
|
8855
8870
|
finishedAt: number().nullable(),
|
|
8856
8871
|
error: string().nullable()
|
|
@@ -8919,14 +8934,42 @@ var RelocateMediaInputSchema = object({
|
|
|
8919
8934
|
/** Omitted = `move`, the pre-existing behaviour. */
|
|
8920
8935
|
mode: MediaRelocateModeSchema.optional()
|
|
8921
8936
|
});
|
|
8922
|
-
/**
|
|
8923
|
-
*
|
|
8924
|
-
*
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8937
|
+
/**
|
|
8938
|
+
* The unstamped population of ONE collection — split, because the gate and the
|
|
8939
|
+
* operator ask two different questions and only one of them has to be cheap.
|
|
8940
|
+
*
|
|
8941
|
+
* `present` is the GATE: "is there at least one row that would be orphaned by a
|
|
8942
|
+
* repoint". It is a single indexed seek to the first matching row, so it stays
|
|
8943
|
+
* answerable on a saturated disk and answers in O(log n) precisely in the state
|
|
8944
|
+
* that matters — after a seal, when the population is empty.
|
|
8945
|
+
*
|
|
8946
|
+
* `rows` is the NUMBER, for the refusal message and the operator's sense of
|
|
8947
|
+
* scale. It is a second, indexed `COUNT(*)`, and `null` means **not
|
|
8948
|
+
* measurable** — never zero. `{ present: true, rows: null }` is a legitimate
|
|
8949
|
+
* and useful answer: "there are some, and this read could not say how many"
|
|
8950
|
+
* still refuses the cutover, which is the whole job.
|
|
8951
|
+
*/
|
|
8952
|
+
var UnstampedRowsSchema = object({
|
|
8953
|
+
present: boolean(),
|
|
8954
|
+
rows: number().int().nonnegative().nullable()
|
|
8929
8955
|
});
|
|
8956
|
+
/**
|
|
8957
|
+
* How many rows still carry NO `locationId` — the population a repoint would
|
|
8958
|
+
* silently re-aim at a disk that does not hold their bytes.
|
|
8959
|
+
*
|
|
8960
|
+
* **`null` = the count could not be taken**, and it is NOT permission to cut
|
|
8961
|
+
* over. The gate opens on a measured absence and on nothing else; an unread
|
|
8962
|
+
* collection and an empty one are different facts, and this repo has already
|
|
8963
|
+
* paid for conflating them (`RelocateResidueSchema`, D295).
|
|
8964
|
+
*/
|
|
8965
|
+
var UnstampedEventMediaCountSchema = object({
|
|
8966
|
+
media: UnstampedRowsSchema,
|
|
8967
|
+
retrainFrames: UnstampedRowsSchema,
|
|
8968
|
+
/** True when EITHER collection holds one. The refusal reads this. */
|
|
8969
|
+
anyPresent: boolean(),
|
|
8970
|
+
/** Sum across both, or `null` when either lane could not be counted. */
|
|
8971
|
+
total: number().int().nonnegative().nullable()
|
|
8972
|
+
}).nullable();
|
|
8930
8973
|
var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
|
|
8931
8974
|
/** The independently selectable logical storage classes — every class
|
|
8932
8975
|
* `storage.listLocationDeclarations` reports, so an operator never meets a
|
|
@@ -9037,6 +9080,10 @@ var StorageMigrationMoveProgressSchema = object({
|
|
|
9037
9080
|
/** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
|
|
9038
9081
|
filesTotal: number().int().nonnegative().nullable(),
|
|
9039
9082
|
bytesMoved: number().int().nonnegative(),
|
|
9083
|
+
/** Rows the mover corrected while moving them — see `RelocateJob`. Absent on
|
|
9084
|
+
* a lane that cannot reconcile. A migration that silently rewrote durable
|
|
9085
|
+
* rows would be the same failure as one that silently skipped them. */
|
|
9086
|
+
rowsReconciled: number().int().nonnegative().optional(),
|
|
9040
9087
|
/** The MOVER's start, not the migration's: a drain restarted after an addon
|
|
9041
9088
|
* crash gets a new mover, and a rate computed from the migration's start
|
|
9042
9089
|
* would silently average in the time nothing was running. */
|
|
@@ -13800,6 +13847,114 @@ method(object({
|
|
|
13800
13847
|
height: number()
|
|
13801
13848
|
}), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
|
|
13802
13849
|
/**
|
|
13850
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
13851
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
13852
|
+
*
|
|
13853
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
13854
|
+
*
|
|
13855
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
13856
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
13857
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
13858
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
13859
|
+
* somebody to forget to edit.
|
|
13860
|
+
*
|
|
13861
|
+
* They are not merged, because their invariants are opposites:
|
|
13862
|
+
*
|
|
13863
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
13864
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
13865
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
13866
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
13867
|
+
* and it is exactly what an absent entry cannot say.
|
|
13868
|
+
*
|
|
13869
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
13870
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
13871
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
13872
|
+
* has no process.
|
|
13873
|
+
*
|
|
13874
|
+
* ## Why not a log line, since the counters already exist
|
|
13875
|
+
*
|
|
13876
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
13877
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
13878
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
13879
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
13880
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
13881
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
13882
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
13883
|
+
* be READ.
|
|
13884
|
+
*
|
|
13885
|
+
* ## The rate is served with its denominator or not at all
|
|
13886
|
+
*
|
|
13887
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
13888
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
13889
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
13890
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
13891
|
+
* reproduces that mistake on every read.
|
|
13892
|
+
*
|
|
13893
|
+
* ## Shape
|
|
13894
|
+
*
|
|
13895
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
13896
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
13897
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
13898
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
13899
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
13900
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
13901
|
+
* result through `system.getFailureContributions`.
|
|
13902
|
+
*/
|
|
13903
|
+
var FailureReasonCountSchema = object({
|
|
13904
|
+
/**
|
|
13905
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
13906
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
13907
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
13908
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
13909
|
+
* vocabulary for the same loss would make the row and the counter
|
|
13910
|
+
* un-joinable.
|
|
13911
|
+
*/
|
|
13912
|
+
reason: string(),
|
|
13913
|
+
count: number().int().nonnegative()
|
|
13914
|
+
});
|
|
13915
|
+
var FailureContributionSchema = object({
|
|
13916
|
+
/**
|
|
13917
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
13918
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
13919
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
13920
|
+
* is a central list that rots invisibly.
|
|
13921
|
+
*/
|
|
13922
|
+
family: string(),
|
|
13923
|
+
/**
|
|
13924
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
13925
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
13926
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
13927
|
+
* cannot answer the only question anybody asks of this surface.
|
|
13928
|
+
*/
|
|
13929
|
+
deviceId: number().int().positive(),
|
|
13930
|
+
/**
|
|
13931
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
13932
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
13933
|
+
* family has a single variant.
|
|
13934
|
+
*/
|
|
13935
|
+
variant: string().optional(),
|
|
13936
|
+
/**
|
|
13937
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
13938
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
13939
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
13940
|
+
* `LoadContribution.startedAtMs`.
|
|
13941
|
+
*/
|
|
13942
|
+
sinceMs: number(),
|
|
13943
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
13944
|
+
atMs: number(),
|
|
13945
|
+
/**
|
|
13946
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
13947
|
+
* window. A failure count published without it is the mistake this schema
|
|
13948
|
+
* exists to make impossible.
|
|
13949
|
+
*/
|
|
13950
|
+
attempts: number().int().nonnegative(),
|
|
13951
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
13952
|
+
succeeded: number().int().nonnegative(),
|
|
13953
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
13954
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
13955
|
+
});
|
|
13956
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
13957
|
+
/**
|
|
13803
13958
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
13804
13959
|
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
13805
13960
|
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
@@ -14321,6 +14476,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14321
14476
|
kind: "mutation",
|
|
14322
14477
|
auth: "admin"
|
|
14323
14478
|
});
|
|
14479
|
+
var LoadContributionSchema = object({
|
|
14480
|
+
role: _enum([
|
|
14481
|
+
"decode",
|
|
14482
|
+
"transcode",
|
|
14483
|
+
"recording",
|
|
14484
|
+
"streaming",
|
|
14485
|
+
"detection"
|
|
14486
|
+
]),
|
|
14487
|
+
/**
|
|
14488
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
14489
|
+
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14490
|
+
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14491
|
+
* contributor that cannot name its camera must not emit the entry at all,
|
|
14492
|
+
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14493
|
+
* and would quietly turn one camera's cost into everybody's.
|
|
14494
|
+
*/
|
|
14495
|
+
deviceId: number().int().positive().nullable(),
|
|
14496
|
+
attribution: _enum([
|
|
14497
|
+
"measured",
|
|
14498
|
+
"accounted",
|
|
14499
|
+
"unattributable"
|
|
14500
|
+
]),
|
|
14501
|
+
/**
|
|
14502
|
+
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14503
|
+
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14504
|
+
* family and inventing a common one would lose the only information that
|
|
14505
|
+
* makes two entries for the same camera distinguishable.
|
|
14506
|
+
*/
|
|
14507
|
+
unit: string(),
|
|
14508
|
+
/**
|
|
14509
|
+
* The OS process this cost lives in, when there is one. Present so a
|
|
14510
|
+
* consumer can (a) tell two generations of the same unit apart across a
|
|
14511
|
+
* restart, and (b) subtract claimed processes from the node's process
|
|
14512
|
+
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14513
|
+
* process of its own.
|
|
14514
|
+
*/
|
|
14515
|
+
pid: number().int().positive().optional(),
|
|
14516
|
+
/**
|
|
14517
|
+
* When this generation started. The pid's incarnation marker: a consumer
|
|
14518
|
+
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14519
|
+
* window when this changes, because the counter restarted from zero in a new
|
|
14520
|
+
* process.
|
|
14521
|
+
*/
|
|
14522
|
+
startedAtMs: number().optional(),
|
|
14523
|
+
/**
|
|
14524
|
+
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14525
|
+
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14526
|
+
* contribution is asked for.
|
|
14527
|
+
*
|
|
14528
|
+
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14529
|
+
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14530
|
+
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14531
|
+
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14532
|
+
*
|
|
14533
|
+
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14534
|
+
* an entry with no process.
|
|
14535
|
+
*/
|
|
14536
|
+
cpuSeconds: number().optional(),
|
|
14537
|
+
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14538
|
+
rssBytes: number().optional()
|
|
14539
|
+
});
|
|
14540
|
+
method(_void(), array(LoadContributionSchema).readonly());
|
|
14324
14541
|
/**
|
|
14325
14542
|
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
14326
14543
|
* through. It stores nothing.
|
|
@@ -14397,176 +14614,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14397
14614
|
tags: record(string(), string()).optional()
|
|
14398
14615
|
}), array(LogEntrySchema).readonly());
|
|
14399
14616
|
/**
|
|
14400
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14401
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
14402
|
-
*
|
|
14403
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14404
|
-
*
|
|
14405
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14406
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14407
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14408
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14409
|
-
* somebody to forget to edit.
|
|
14410
|
-
*
|
|
14411
|
-
* They are not merged, because their invariants are opposites:
|
|
14412
|
-
*
|
|
14413
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14414
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14415
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14416
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14417
|
-
* and it is exactly what an absent entry cannot say.
|
|
14418
|
-
*
|
|
14419
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14420
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14421
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14422
|
-
* has no process.
|
|
14423
|
-
*
|
|
14424
|
-
* ## Why not a log line, since the counters already exist
|
|
14425
|
-
*
|
|
14426
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14427
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14428
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14429
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14430
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14431
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14432
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14433
|
-
* be READ.
|
|
14434
|
-
*
|
|
14435
|
-
* ## The rate is served with its denominator or not at all
|
|
14436
|
-
*
|
|
14437
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14438
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14439
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14440
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
14441
|
-
* reproduces that mistake on every read.
|
|
14442
|
-
*
|
|
14443
|
-
* ## Shape
|
|
14444
|
-
*
|
|
14445
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14446
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14447
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14448
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14449
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14450
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14451
|
-
* result through `system.getFailureContributions`.
|
|
14452
|
-
*/
|
|
14453
|
-
var FailureReasonCountSchema = object({
|
|
14454
|
-
/**
|
|
14455
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14456
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14457
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
14458
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
14459
|
-
* vocabulary for the same loss would make the row and the counter
|
|
14460
|
-
* un-joinable.
|
|
14461
|
-
*/
|
|
14462
|
-
reason: string(),
|
|
14463
|
-
count: number().int().nonnegative()
|
|
14464
|
-
});
|
|
14465
|
-
var FailureContributionSchema = object({
|
|
14466
|
-
/**
|
|
14467
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14468
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14469
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
14470
|
-
* is a central list that rots invisibly.
|
|
14471
|
-
*/
|
|
14472
|
-
family: string(),
|
|
14473
|
-
/**
|
|
14474
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14475
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14476
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
14477
|
-
* cannot answer the only question anybody asks of this surface.
|
|
14478
|
-
*/
|
|
14479
|
-
deviceId: number().int().positive(),
|
|
14480
|
-
/**
|
|
14481
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
14482
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14483
|
-
* family has a single variant.
|
|
14484
|
-
*/
|
|
14485
|
-
variant: string().optional(),
|
|
14486
|
-
/**
|
|
14487
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14488
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
14489
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14490
|
-
* `LoadContribution.startedAtMs`.
|
|
14491
|
-
*/
|
|
14492
|
-
sinceMs: number(),
|
|
14493
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14494
|
-
atMs: number(),
|
|
14495
|
-
/**
|
|
14496
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14497
|
-
* window. A failure count published without it is the mistake this schema
|
|
14498
|
-
* exists to make impossible.
|
|
14499
|
-
*/
|
|
14500
|
-
attempts: number().int().nonnegative(),
|
|
14501
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14502
|
-
succeeded: number().int().nonnegative(),
|
|
14503
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14504
|
-
reasons: array(FailureReasonCountSchema).readonly()
|
|
14505
|
-
});
|
|
14506
|
-
method(_void(), array(FailureContributionSchema).readonly());
|
|
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());
|
|
14569
|
-
/**
|
|
14570
14617
|
* `login-method` — collection cap through which auth addons contribute
|
|
14571
14618
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
14572
14619
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
@@ -19450,12 +19497,53 @@ var MediaFileKindEnum = _enum([
|
|
|
19450
19497
|
"keyFrameSmall",
|
|
19451
19498
|
"thumbnailSmall"
|
|
19452
19499
|
]);
|
|
19500
|
+
/**
|
|
19501
|
+
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
19502
|
+
* ARE — never the bytes themselves.
|
|
19503
|
+
*
|
|
19504
|
+
* ## Why `url` and not `base64`
|
|
19505
|
+
*
|
|
19506
|
+
* Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
|
|
19507
|
+
* with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
|
|
19508
|
+
* was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
|
|
19509
|
+
* wire. Forty events is ~144 MB. Every byte of it was read off disk,
|
|
19510
|
+
* base64-encoded, held whole in a unary tRPC envelope, and materialised in
|
|
19511
|
+
* hub-main's heap on the way past — for an `<img>` that would have cached it.
|
|
19512
|
+
*
|
|
19513
|
+
* `url` points at the `event-media` data plane
|
|
19514
|
+
* (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
|
|
19515
|
+
* with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
|
|
19516
|
+
* render a `?variant=thumb`, and streams. The hub gate in front of it requires
|
|
19517
|
+
* a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
|
|
19518
|
+
* no less protected than they were inside a `view`-level cap response — see
|
|
19519
|
+
* `data-plane-access.ts` for the rule and the one gap it does not close
|
|
19520
|
+
* (per-device scoping).
|
|
19521
|
+
*
|
|
19522
|
+
* The URL is built from the row's **stored** key, which is not always its
|
|
19523
|
+
* published `kind`: a track's face/plate crop is stored as `crop` under
|
|
19524
|
+
* `('face'|'plate', '<prefix>-<trackId>')` and published as
|
|
19525
|
+
* `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
|
|
19526
|
+
*
|
|
19527
|
+
* ## `base64` is TRANSITIONAL and is going away
|
|
19528
|
+
*
|
|
19529
|
+
* It is still populated for one reason: the deployed viewer's track-detail
|
|
19530
|
+
* HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
|
|
19531
|
+
* REQUIRES the field), and a row without it parses as a FAILED read — the red
|
|
19532
|
+
* triangle — not as absence. Removing the field before that viewer ships is an
|
|
19533
|
+
* outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
|
|
19534
|
+
* delete this line and the `withBytes` pass-through in
|
|
19535
|
+
* `analytics-query-facade.ts`; nothing else reads it.
|
|
19536
|
+
*/
|
|
19453
19537
|
var MediaFileSchema = object({
|
|
19454
19538
|
key: string(),
|
|
19455
19539
|
kind: MediaFileKindEnum,
|
|
19456
|
-
base64: string(),
|
|
19457
19540
|
sizeBytes: number(),
|
|
19458
19541
|
timestamp: number()
|
|
19542
|
+
}).extend({
|
|
19543
|
+
/** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
|
|
19544
|
+
url: string(),
|
|
19545
|
+
/** @deprecated Transitional — see the schema docblock. Use {@link url}. */
|
|
19546
|
+
base64: string()
|
|
19459
19547
|
});
|
|
19460
19548
|
/**
|
|
19461
19549
|
* One media row WITHOUT its bytes.
|
|
@@ -19467,7 +19555,9 @@ var MediaFileSchema = object({
|
|
|
19467
19555
|
* blocks the whole view.
|
|
19468
19556
|
*
|
|
19469
19557
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
19470
|
-
* stored blob and a `?variant=thumb` rendering without fetching either
|
|
19558
|
+
* stored blob and a `?variant=thumb` rendering without fetching either, and
|
|
19559
|
+
* `url` because a client that had to build the plane path itself is a second
|
|
19560
|
+
* copy of a route — the embed, the viewer and the admin UI each grew one.
|
|
19471
19561
|
*/
|
|
19472
19562
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
19473
19563
|
/**
|
|
@@ -20156,6 +20246,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
20156
20246
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
20157
20247
|
trackId: string(),
|
|
20158
20248
|
deviceId: number()
|
|
20249
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
20250
|
+
eventId: string(),
|
|
20251
|
+
deviceId: number()
|
|
20159
20252
|
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
20160
20253
|
kind: "mutation",
|
|
20161
20254
|
auth: "admin"
|
|
@@ -24897,10 +24990,24 @@ var FaceClusterSchema = object({
|
|
|
24897
24990
|
size: number().int(),
|
|
24898
24991
|
cohesion: number()
|
|
24899
24992
|
});
|
|
24993
|
+
/**
|
|
24994
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
24995
|
+
* are — never the bytes.
|
|
24996
|
+
*
|
|
24997
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
24998
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
24999
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
25000
|
+
* caller is the admin UI's detail modal, which was building
|
|
25001
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
25002
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
25003
|
+
*
|
|
25004
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
25005
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
25006
|
+
*/
|
|
24900
25007
|
var MediaFileLiteSchema$1 = object({
|
|
24901
25008
|
key: string(),
|
|
24902
25009
|
kind: string(),
|
|
24903
|
-
|
|
25010
|
+
url: string(),
|
|
24904
25011
|
sizeBytes: number(),
|
|
24905
25012
|
timestamp: number()
|
|
24906
25013
|
});
|
|
@@ -27152,10 +27259,24 @@ var PlateInfoSchema = object({
|
|
|
27152
27259
|
*/
|
|
27153
27260
|
cropUrl: string().optional()
|
|
27154
27261
|
});
|
|
27262
|
+
/**
|
|
27263
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
27264
|
+
* are — never the bytes.
|
|
27265
|
+
*
|
|
27266
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
27267
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
27268
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
27269
|
+
* caller is the admin UI's detail modal, which was building
|
|
27270
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
27271
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
27272
|
+
*
|
|
27273
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
27274
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
27275
|
+
*/
|
|
27155
27276
|
var MediaFileLiteSchema = object({
|
|
27156
27277
|
key: string(),
|
|
27157
27278
|
kind: string(),
|
|
27158
|
-
|
|
27279
|
+
url: string(),
|
|
27159
27280
|
sizeBytes: number(),
|
|
27160
27281
|
timestamp: number()
|
|
27161
27282
|
});
|
|
@@ -33252,6 +33373,12 @@ Object.freeze({
|
|
|
33252
33373
|
addonId: null,
|
|
33253
33374
|
access: "view"
|
|
33254
33375
|
},
|
|
33376
|
+
"pipelineAnalytics.listEventMedia": {
|
|
33377
|
+
capName: "pipeline-analytics",
|
|
33378
|
+
capScope: "device",
|
|
33379
|
+
addonId: null,
|
|
33380
|
+
access: "view"
|
|
33381
|
+
},
|
|
33255
33382
|
"pipelineAnalytics.listGroups": {
|
|
33256
33383
|
capName: "pipeline-analytics",
|
|
33257
33384
|
capScope: "device",
|
|
@@ -36875,6 +37002,11 @@ Object.freeze({
|
|
|
36875
37002
|
form: "array",
|
|
36876
37003
|
optional: false
|
|
36877
37004
|
}],
|
|
37005
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
37006
|
+
name: "deviceId",
|
|
37007
|
+
form: "single",
|
|
37008
|
+
optional: false
|
|
37009
|
+
}],
|
|
36878
37010
|
"pipelineAnalytics.listGroups": [{
|
|
36879
37011
|
name: "deviceIds",
|
|
36880
37012
|
form: "array",
|
package/dist/remoteEntry.js
CHANGED
|
@@ -30,7 +30,7 @@ async function d(e) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
async function f() {
|
|
33
|
-
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-
|
|
33
|
+
return l ||= d(() => import("./_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-BbK-mPCs.mjs")).catch((e) => {
|
|
34
34
|
throw l = void 0, e;
|
|
35
35
|
}), l;
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-pipeline-orchestrator",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.127",
|
|
4
4
|
"description": "Hub-side camera-to-agent load balancer — tracks runner capacity and dispatches attachCamera calls to the optimal pipeline-runner instance",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|