@camstack/addon-pipeline 1.2.152 → 1.2.153
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/audio-analyzer/index.js +2 -2
- package/dist/audio-analyzer/index.mjs +2 -2
- package/dist/detection-pipeline/index.js +5 -5
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-BpofTthV.js → dist-DnVnWACi.js} +292 -207
- package/dist/{dist-DoaR6NDJ.mjs → dist-Dsritt4-.mjs} +292 -207
- package/dist/{lazy-sharp-D6sSNL-G.js → lazy-sharp-DZWYKdV2.js} +1 -1
- package/dist/{local-frame-registry-4MCvZQ2t.js → local-frame-registry-BpFLRfbw.js} +1 -1
- package/dist/{local-frame-registry-Dr8irbU_.mjs → local-frame-registry-Yf-uIxbS.mjs} +1 -1
- package/dist/motion-wasm/index.js +2 -2
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-DG_kTYFM.js → node-C5xmFvjS.js} +1 -1
- package/dist/{node-CeSZTDKV.mjs → node-CNGxkfes.mjs} +1 -1
- package/dist/pipeline-runner/index.js +5 -5
- package/dist/pipeline-runner/index.mjs +4 -4
- package/dist/{process-memory-DglWLA3J.js → process-memory-COT8rA8L.js} +1 -1
- package/dist/{process-memory-DJoquJSu.mjs → process-memory-DX_KCfdx.mjs} +1 -1
- package/dist/recorder/index.js +2 -2
- package/dist/recorder/index.mjs +2 -2
- package/dist/{segment-demux-js-Clx6DzLe.mjs → segment-demux-js-CTFSl-b9.mjs} +1 -1
- package/dist/{segment-demux-js-DUSMkFTq.js → segment-demux-js-Dwg9Jq5_.js} +1 -1
- package/dist/session-decode/decode-worker-child.js +2 -2
- package/dist/session-decode/decode-worker-child.mjs +1 -1
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BntoKYim.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-ZucA907q.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B14Zc1oq.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DO6LkN6o.mjs +26 -0
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit--5tl1XaO.mjs → hostInit-BqUcM0Fh.mjs} +3 -3
- package/dist/stream-broker/index.js +3 -3
- package/dist/stream-broker/index.mjs +3 -3
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/{worker-protocol-C8bHw-bu.js → worker-protocol-BsvaPb-G.js} +1 -1
- package/dist/{worker-protocol-Ar0-GAh5.mjs → worker-protocol-CDBQXOIu.mjs} +1 -1
- package/package.json +1 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C-HJX19g.mjs +0 -26
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Cyyhy_D8.mjs +0 -26
|
@@ -14813,6 +14813,133 @@ method(object({
|
|
|
14813
14813
|
height: number()
|
|
14814
14814
|
}), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
|
|
14815
14815
|
/**
|
|
14816
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14817
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
14818
|
+
*
|
|
14819
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14820
|
+
*
|
|
14821
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14822
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14823
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14824
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14825
|
+
* somebody to forget to edit.
|
|
14826
|
+
*
|
|
14827
|
+
* They are not merged, because their invariants are opposites:
|
|
14828
|
+
*
|
|
14829
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14830
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14831
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14832
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14833
|
+
* and it is exactly what an absent entry cannot say.
|
|
14834
|
+
*
|
|
14835
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14836
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14837
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14838
|
+
* has no process.
|
|
14839
|
+
*
|
|
14840
|
+
* ## Why not a log line, since the counters already exist
|
|
14841
|
+
*
|
|
14842
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14843
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14844
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14845
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14846
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14847
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14848
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14849
|
+
* be READ.
|
|
14850
|
+
*
|
|
14851
|
+
* ## The rate is served with its denominator or not at all
|
|
14852
|
+
*
|
|
14853
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14854
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14855
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14856
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
14857
|
+
* reproduces that mistake on every read.
|
|
14858
|
+
*
|
|
14859
|
+
* ## Shape
|
|
14860
|
+
*
|
|
14861
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14862
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14863
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14864
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14865
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14866
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14867
|
+
* result through `system.getFailureContributions`.
|
|
14868
|
+
*/
|
|
14869
|
+
var FailureReasonCountSchema = object({
|
|
14870
|
+
/**
|
|
14871
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14872
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14873
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
14874
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
14875
|
+
* vocabulary for the same loss would make the row and the counter
|
|
14876
|
+
* un-joinable.
|
|
14877
|
+
*/
|
|
14878
|
+
reason: string(),
|
|
14879
|
+
count: number().int().nonnegative()
|
|
14880
|
+
});
|
|
14881
|
+
var FailureContributionSchema = object({
|
|
14882
|
+
/**
|
|
14883
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14884
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14885
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
14886
|
+
* is a central list that rots invisibly.
|
|
14887
|
+
*/
|
|
14888
|
+
family: string(),
|
|
14889
|
+
/**
|
|
14890
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
14891
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14892
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
14893
|
+
* cannot answer the only question anybody asks of this surface.
|
|
14894
|
+
*/
|
|
14895
|
+
deviceId: number().int().positive(),
|
|
14896
|
+
/**
|
|
14897
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
14898
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14899
|
+
* family has a single variant.
|
|
14900
|
+
*/
|
|
14901
|
+
variant: string().optional(),
|
|
14902
|
+
/**
|
|
14903
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14904
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
14905
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14906
|
+
* `LoadContribution.startedAtMs`.
|
|
14907
|
+
*/
|
|
14908
|
+
sinceMs: number(),
|
|
14909
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14910
|
+
atMs: number(),
|
|
14911
|
+
/**
|
|
14912
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14913
|
+
* window. A failure count published without it is the mistake this schema
|
|
14914
|
+
* exists to make impossible.
|
|
14915
|
+
*/
|
|
14916
|
+
attempts: number().int().nonnegative(),
|
|
14917
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14918
|
+
succeeded: number().int().nonnegative(),
|
|
14919
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14920
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
14921
|
+
});
|
|
14922
|
+
var failureContributionCapability = {
|
|
14923
|
+
name: "failure-contribution",
|
|
14924
|
+
scope: "system",
|
|
14925
|
+
mode: "collection",
|
|
14926
|
+
internal: true,
|
|
14927
|
+
methods: {
|
|
14928
|
+
/**
|
|
14929
|
+
* This addon's per-camera failure counters, read live from bounded in-RAM
|
|
14930
|
+
* state it already keeps. Inert: no persistence, no sampling, no timer.
|
|
14931
|
+
*
|
|
14932
|
+
* READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
|
|
14933
|
+
* consumer that wants a rate differences two reads. A draining read would
|
|
14934
|
+
* make two operators with the page open each destroy half of the other's
|
|
14935
|
+
* numbers, and `load-contribution` already settled the same question the
|
|
14936
|
+
* same way for `cpuSeconds`.
|
|
14937
|
+
*/
|
|
14938
|
+
list: method(_void(), array(FailureContributionSchema).readonly()) },
|
|
14939
|
+
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
14940
|
+
mount: { kind: "skip" }
|
|
14941
|
+
};
|
|
14942
|
+
/**
|
|
14816
14943
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
14817
14944
|
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
14818
14945
|
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
@@ -15334,6 +15461,82 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
15334
15461
|
kind: "mutation",
|
|
15335
15462
|
auth: "admin"
|
|
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.
|
|
@@ -15431,209 +15634,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
15431
15634
|
tags: record(string(), string()).optional()
|
|
15432
15635
|
}), array(LogEntrySchema).readonly());
|
|
15433
15636
|
/**
|
|
15434
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
15435
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
15436
|
-
*
|
|
15437
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
15438
|
-
*
|
|
15439
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
15440
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
15441
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
15442
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
15443
|
-
* somebody to forget to edit.
|
|
15444
|
-
*
|
|
15445
|
-
* They are not merged, because their invariants are opposites:
|
|
15446
|
-
*
|
|
15447
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
15448
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
15449
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
15450
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
15451
|
-
* and it is exactly what an absent entry cannot say.
|
|
15452
|
-
*
|
|
15453
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
15454
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
15455
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
15456
|
-
* has no process.
|
|
15457
|
-
*
|
|
15458
|
-
* ## Why not a log line, since the counters already exist
|
|
15459
|
-
*
|
|
15460
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
15461
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
15462
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
15463
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
15464
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
15465
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
15466
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
15467
|
-
* be READ.
|
|
15468
|
-
*
|
|
15469
|
-
* ## The rate is served with its denominator or not at all
|
|
15470
|
-
*
|
|
15471
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
15472
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
15473
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
15474
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
15475
|
-
* reproduces that mistake on every read.
|
|
15476
|
-
*
|
|
15477
|
-
* ## Shape
|
|
15478
|
-
*
|
|
15479
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
15480
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
15481
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
15482
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
15483
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
15484
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
15485
|
-
* result through `system.getFailureContributions`.
|
|
15486
|
-
*/
|
|
15487
|
-
var FailureReasonCountSchema = object({
|
|
15488
|
-
/**
|
|
15489
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
15490
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
15491
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
15492
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
15493
|
-
* vocabulary for the same loss would make the row and the counter
|
|
15494
|
-
* un-joinable.
|
|
15495
|
-
*/
|
|
15496
|
-
reason: string(),
|
|
15497
|
-
count: number().int().nonnegative()
|
|
15498
|
-
});
|
|
15499
|
-
var FailureContributionSchema = object({
|
|
15500
|
-
/**
|
|
15501
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
15502
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
15503
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
15504
|
-
* is a central list that rots invisibly.
|
|
15505
|
-
*/
|
|
15506
|
-
family: string(),
|
|
15507
|
-
/**
|
|
15508
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
15509
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
15510
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
15511
|
-
* cannot answer the only question anybody asks of this surface.
|
|
15512
|
-
*/
|
|
15513
|
-
deviceId: number().int().positive(),
|
|
15514
|
-
/**
|
|
15515
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
15516
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
15517
|
-
* family has a single variant.
|
|
15518
|
-
*/
|
|
15519
|
-
variant: string().optional(),
|
|
15520
|
-
/**
|
|
15521
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
15522
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
15523
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
15524
|
-
* `LoadContribution.startedAtMs`.
|
|
15525
|
-
*/
|
|
15526
|
-
sinceMs: number(),
|
|
15527
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
15528
|
-
atMs: number(),
|
|
15529
|
-
/**
|
|
15530
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
15531
|
-
* window. A failure count published without it is the mistake this schema
|
|
15532
|
-
* exists to make impossible.
|
|
15533
|
-
*/
|
|
15534
|
-
attempts: number().int().nonnegative(),
|
|
15535
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
15536
|
-
succeeded: number().int().nonnegative(),
|
|
15537
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
15538
|
-
reasons: array(FailureReasonCountSchema).readonly()
|
|
15539
|
-
});
|
|
15540
|
-
var failureContributionCapability = {
|
|
15541
|
-
name: "failure-contribution",
|
|
15542
|
-
scope: "system",
|
|
15543
|
-
mode: "collection",
|
|
15544
|
-
internal: true,
|
|
15545
|
-
methods: {
|
|
15546
|
-
/**
|
|
15547
|
-
* This addon's per-camera failure counters, read live from bounded in-RAM
|
|
15548
|
-
* state it already keeps. Inert: no persistence, no sampling, no timer.
|
|
15549
|
-
*
|
|
15550
|
-
* READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
|
|
15551
|
-
* consumer that wants a rate differences two reads. A draining read would
|
|
15552
|
-
* make two operators with the page open each destroy half of the other's
|
|
15553
|
-
* numbers, and `load-contribution` already settled the same question the
|
|
15554
|
-
* same way for `cpuSeconds`.
|
|
15555
|
-
*/
|
|
15556
|
-
list: method(_void(), array(FailureContributionSchema).readonly()) },
|
|
15557
|
-
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
15558
|
-
mount: { kind: "skip" }
|
|
15559
|
-
};
|
|
15560
|
-
var LoadContributionSchema = object({
|
|
15561
|
-
role: _enum([
|
|
15562
|
-
"decode",
|
|
15563
|
-
"transcode",
|
|
15564
|
-
"recording",
|
|
15565
|
-
"streaming",
|
|
15566
|
-
"detection"
|
|
15567
|
-
]),
|
|
15568
|
-
/**
|
|
15569
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
15570
|
-
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
15571
|
-
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
15572
|
-
* contributor that cannot name its camera must not emit the entry at all,
|
|
15573
|
-
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
15574
|
-
* and would quietly turn one camera's cost into everybody's.
|
|
15575
|
-
*/
|
|
15576
|
-
deviceId: number().int().positive().nullable(),
|
|
15577
|
-
attribution: _enum([
|
|
15578
|
-
"measured",
|
|
15579
|
-
"accounted",
|
|
15580
|
-
"unattributable"
|
|
15581
|
-
]),
|
|
15582
|
-
/**
|
|
15583
|
-
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
15584
|
-
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
15585
|
-
* family and inventing a common one would lose the only information that
|
|
15586
|
-
* makes two entries for the same camera distinguishable.
|
|
15587
|
-
*/
|
|
15588
|
-
unit: string(),
|
|
15589
|
-
/**
|
|
15590
|
-
* The OS process this cost lives in, when there is one. Present so a
|
|
15591
|
-
* consumer can (a) tell two generations of the same unit apart across a
|
|
15592
|
-
* restart, and (b) subtract claimed processes from the node's process
|
|
15593
|
-
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
15594
|
-
* process of its own.
|
|
15595
|
-
*/
|
|
15596
|
-
pid: number().int().positive().optional(),
|
|
15597
|
-
/**
|
|
15598
|
-
* When this generation started. The pid's incarnation marker: a consumer
|
|
15599
|
-
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
15600
|
-
* window when this changes, because the counter restarted from zero in a new
|
|
15601
|
-
* process.
|
|
15602
|
-
*/
|
|
15603
|
-
startedAtMs: number().optional(),
|
|
15604
|
-
/**
|
|
15605
|
-
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
15606
|
-
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
15607
|
-
* contribution is asked for.
|
|
15608
|
-
*
|
|
15609
|
-
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
15610
|
-
* needs a sampler, and a new per-node sampler is the defect half of
|
|
15611
|
-
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
15612
|
-
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
15613
|
-
*
|
|
15614
|
-
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
15615
|
-
* an entry with no process.
|
|
15616
|
-
*/
|
|
15617
|
-
cpuSeconds: number().optional(),
|
|
15618
|
-
/** Resident bytes of this unit's process, same source and same rules. */
|
|
15619
|
-
rssBytes: number().optional()
|
|
15620
|
-
});
|
|
15621
|
-
var loadContributionCapability = {
|
|
15622
|
-
name: "load-contribution",
|
|
15623
|
-
scope: "system",
|
|
15624
|
-
mode: "collection",
|
|
15625
|
-
internal: true,
|
|
15626
|
-
methods: {
|
|
15627
|
-
/**
|
|
15628
|
-
* This addon's own cost entries, computed live from state it already
|
|
15629
|
-
* holds. Inert: no persistence, no sampling, no timer. It is answered on
|
|
15630
|
-
* whatever beat the caller already has.
|
|
15631
|
-
*/
|
|
15632
|
-
list: method(_void(), array(LoadContributionSchema).readonly()) },
|
|
15633
|
-
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
15634
|
-
mount: { kind: "skip" }
|
|
15635
|
-
};
|
|
15636
|
-
/**
|
|
15637
15637
|
* `login-method` — collection cap through which auth addons contribute
|
|
15638
15638
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
15639
15639
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
@@ -20820,12 +20820,53 @@ var MediaFileKindEnum = _enum([
|
|
|
20820
20820
|
"keyFrameSmall",
|
|
20821
20821
|
"thumbnailSmall"
|
|
20822
20822
|
]);
|
|
20823
|
+
/**
|
|
20824
|
+
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
20825
|
+
* ARE — never the bytes themselves.
|
|
20826
|
+
*
|
|
20827
|
+
* ## Why `url` and not `base64`
|
|
20828
|
+
*
|
|
20829
|
+
* Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
|
|
20830
|
+
* with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
|
|
20831
|
+
* was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
|
|
20832
|
+
* wire. Forty events is ~144 MB. Every byte of it was read off disk,
|
|
20833
|
+
* base64-encoded, held whole in a unary tRPC envelope, and materialised in
|
|
20834
|
+
* hub-main's heap on the way past — for an `<img>` that would have cached it.
|
|
20835
|
+
*
|
|
20836
|
+
* `url` points at the `event-media` data plane
|
|
20837
|
+
* (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
|
|
20838
|
+
* with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
|
|
20839
|
+
* render a `?variant=thumb`, and streams. The hub gate in front of it requires
|
|
20840
|
+
* a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
|
|
20841
|
+
* no less protected than they were inside a `view`-level cap response — see
|
|
20842
|
+
* `data-plane-access.ts` for the rule and the one gap it does not close
|
|
20843
|
+
* (per-device scoping).
|
|
20844
|
+
*
|
|
20845
|
+
* The URL is built from the row's **stored** key, which is not always its
|
|
20846
|
+
* published `kind`: a track's face/plate crop is stored as `crop` under
|
|
20847
|
+
* `('face'|'plate', '<prefix>-<trackId>')` and published as
|
|
20848
|
+
* `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
|
|
20849
|
+
*
|
|
20850
|
+
* ## `base64` is TRANSITIONAL and is going away
|
|
20851
|
+
*
|
|
20852
|
+
* It is still populated for one reason: the deployed viewer's track-detail
|
|
20853
|
+
* HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
|
|
20854
|
+
* REQUIRES the field), and a row without it parses as a FAILED read — the red
|
|
20855
|
+
* triangle — not as absence. Removing the field before that viewer ships is an
|
|
20856
|
+
* outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
|
|
20857
|
+
* delete this line and the `withBytes` pass-through in
|
|
20858
|
+
* `analytics-query-facade.ts`; nothing else reads it.
|
|
20859
|
+
*/
|
|
20823
20860
|
var MediaFileSchema = object({
|
|
20824
20861
|
key: string(),
|
|
20825
20862
|
kind: MediaFileKindEnum,
|
|
20826
|
-
base64: string(),
|
|
20827
20863
|
sizeBytes: number(),
|
|
20828
20864
|
timestamp: number()
|
|
20865
|
+
}).extend({
|
|
20866
|
+
/** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
|
|
20867
|
+
url: string(),
|
|
20868
|
+
/** @deprecated Transitional — see the schema docblock. Use {@link url}. */
|
|
20869
|
+
base64: string()
|
|
20829
20870
|
});
|
|
20830
20871
|
/**
|
|
20831
20872
|
* One media row WITHOUT its bytes.
|
|
@@ -20837,7 +20878,9 @@ var MediaFileSchema = object({
|
|
|
20837
20878
|
* blocks the whole view.
|
|
20838
20879
|
*
|
|
20839
20880
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
20840
|
-
* stored blob and a `?variant=thumb` rendering without fetching either
|
|
20881
|
+
* stored blob and a `?variant=thumb` rendering without fetching either, and
|
|
20882
|
+
* `url` because a client that had to build the plane path itself is a second
|
|
20883
|
+
* copy of a route — the embed, the viewer and the admin UI each grew one.
|
|
20841
20884
|
*/
|
|
20842
20885
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
20843
20886
|
/**
|
|
@@ -21526,6 +21569,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
21526
21569
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
21527
21570
|
trackId: string(),
|
|
21528
21571
|
deviceId: number()
|
|
21572
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
21573
|
+
eventId: string(),
|
|
21574
|
+
deviceId: number()
|
|
21529
21575
|
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
21530
21576
|
kind: "mutation",
|
|
21531
21577
|
auth: "admin"
|
|
@@ -26097,10 +26143,24 @@ var FaceClusterSchema = object({
|
|
|
26097
26143
|
size: number().int(),
|
|
26098
26144
|
cohesion: number()
|
|
26099
26145
|
});
|
|
26146
|
+
/**
|
|
26147
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
26148
|
+
* are — never the bytes.
|
|
26149
|
+
*
|
|
26150
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
26151
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
26152
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
26153
|
+
* caller is the admin UI's detail modal, which was building
|
|
26154
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
26155
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
26156
|
+
*
|
|
26157
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
26158
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
26159
|
+
*/
|
|
26100
26160
|
var MediaFileLiteSchema$1 = object({
|
|
26101
26161
|
key: string(),
|
|
26102
26162
|
kind: string(),
|
|
26103
|
-
|
|
26163
|
+
url: string(),
|
|
26104
26164
|
sizeBytes: number(),
|
|
26105
26165
|
timestamp: number()
|
|
26106
26166
|
});
|
|
@@ -28352,10 +28412,24 @@ var PlateInfoSchema = object({
|
|
|
28352
28412
|
*/
|
|
28353
28413
|
cropUrl: string().optional()
|
|
28354
28414
|
});
|
|
28415
|
+
/**
|
|
28416
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
28417
|
+
* are — never the bytes.
|
|
28418
|
+
*
|
|
28419
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
28420
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
28421
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
28422
|
+
* caller is the admin UI's detail modal, which was building
|
|
28423
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
28424
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
28425
|
+
*
|
|
28426
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
28427
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
28428
|
+
*/
|
|
28355
28429
|
var MediaFileLiteSchema = object({
|
|
28356
28430
|
key: string(),
|
|
28357
28431
|
kind: string(),
|
|
28358
|
-
|
|
28432
|
+
url: string(),
|
|
28359
28433
|
sizeBytes: number(),
|
|
28360
28434
|
timestamp: number()
|
|
28361
28435
|
});
|
|
@@ -34697,6 +34771,12 @@ Object.freeze({
|
|
|
34697
34771
|
addonId: null,
|
|
34698
34772
|
access: "view"
|
|
34699
34773
|
},
|
|
34774
|
+
"pipelineAnalytics.listEventMedia": {
|
|
34775
|
+
capName: "pipeline-analytics",
|
|
34776
|
+
capScope: "device",
|
|
34777
|
+
addonId: null,
|
|
34778
|
+
access: "view"
|
|
34779
|
+
},
|
|
34700
34780
|
"pipelineAnalytics.listGroups": {
|
|
34701
34781
|
capName: "pipeline-analytics",
|
|
34702
34782
|
capScope: "device",
|
|
@@ -38320,6 +38400,11 @@ Object.freeze({
|
|
|
38320
38400
|
form: "array",
|
|
38321
38401
|
optional: false
|
|
38322
38402
|
}],
|
|
38403
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
38404
|
+
name: "deviceId",
|
|
38405
|
+
form: "single",
|
|
38406
|
+
optional: false
|
|
38407
|
+
}],
|
|
38323
38408
|
"pipelineAnalytics.listGroups": [{
|
|
38324
38409
|
name: "deviceIds",
|
|
38325
38410
|
form: "array",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as audioKindId, Z as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-
|
|
1
|
+
import { M as audioKindId, Z as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-Dsritt4-.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
//#region src/detection-pipeline/registry/model-catalogs.ts
|
|
4
4
|
var HF_REPO = "camstack/camstack-models";
|
|
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
5
|
+
const require_dist = require("../dist-DnVnWACi.js");
|
|
6
|
+
const require_lazy_sharp = require("../lazy-sharp-DZWYKdV2.js");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
8
8
|
let node_path = require("node:path");
|
|
9
9
|
//#region src/motion-wasm/wasm-motion-detector.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { It as hydrateSchema, Pt as DeviceType, Y as evaluateZoneRules, it as motionDetectionCapability, jt as BaseAddon } from "../dist-
|
|
1
|
+
import { It as hydrateSchema, Pt as DeviceType, Y as evaluateZoneRules, it as motionDetectionCapability, jt as BaseAddon } from "../dist-Dsritt4-.mjs";
|
|
2
2
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dt as buildFfmpegArgs, Et as Fmp4BoxSplitter, kt as isSoftwareDecode, wt as errMsg } from "./dist-
|
|
1
|
+
import { Dt as buildFfmpegArgs, Et as Fmp4BoxSplitter, kt as isSoftwareDecode, wt as errMsg } from "./dist-Dsritt4-.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import "node:fs";
|
|
4
4
|
import "node:path";
|
|
@@ -2,12 +2,12 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
const require_node = require("../node-
|
|
7
|
-
const require_local_frame_registry = require("../local-frame-registry-
|
|
8
|
-
const require_worker_protocol = require("../worker-protocol-
|
|
5
|
+
const require_dist = require("../dist-DnVnWACi.js");
|
|
6
|
+
const require_node = require("../node-C5xmFvjS.js");
|
|
7
|
+
const require_local_frame_registry = require("../local-frame-registry-BpFLRfbw.js");
|
|
8
|
+
const require_worker_protocol = require("../worker-protocol-BsvaPb-G.js");
|
|
9
9
|
const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
|
|
10
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
10
|
+
const require_lazy_sharp = require("../lazy-sharp-DZWYKdV2.js");
|
|
11
11
|
const require_restream_intent = require("../restream-intent-Cv9x3jmu.js");
|
|
12
12
|
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
|
|
13
13
|
const require_remote_restream = require("../remote-restream-CO36Sr30.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { B as defineCustomActions, Bt as nodePin, Ft as createEvent, Gt as _enum, H as deriveDetailCropRect, Kt as array, L as customAction, Qt as object, X as failureContributionCapability, Xt as literal, Yt as lazy, Zt as number, _ as FailureCounters, en as string, et as loadContributionCapability, ft as pipelineRunnerCapability, jt as BaseAddon, lt as pickDetailCropConvention, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, p as DEFAULT_NATIVE_LEASE_SETTINGS, qt as boolean, u as DEFAULT_DETAIL_CROP_CONVENTION, ut as pickNativeLeaseOverride, wt as errMsg } from "../dist-
|
|
2
|
-
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-
|
|
3
|
-
import { c as getStepDefinition, n as resolveFrameViewGeometry, t as localFrameRegistry } from "../local-frame-registry-
|
|
4
|
-
import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-
|
|
1
|
+
import { B as defineCustomActions, Bt as nodePin, Ft as createEvent, Gt as _enum, H as deriveDetailCropRect, Kt as array, L as customAction, Qt as object, X as failureContributionCapability, Xt as literal, Yt as lazy, Zt as number, _ as FailureCounters, en as string, et as loadContributionCapability, ft as pipelineRunnerCapability, jt as BaseAddon, lt as pickDetailCropConvention, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, p as DEFAULT_NATIVE_LEASE_SETTINGS, qt as boolean, u as DEFAULT_DETAIL_CROP_CONVENTION, ut as pickNativeLeaseOverride, wt as errMsg } from "../dist-Dsritt4-.mjs";
|
|
2
|
+
import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-CNGxkfes.mjs";
|
|
3
|
+
import { c as getStepDefinition, n as resolveFrameViewGeometry, t as localFrameRegistry } from "../local-frame-registry-Yf-uIxbS.mjs";
|
|
4
|
+
import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-CDBQXOIu.mjs";
|
|
5
5
|
import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
|
|
6
6
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
7
7
|
import { n as withDetectionIntent } from "../restream-intent-B4BXZra7.mjs";
|