@camstack/addon-provider-tuya 0.2.38 → 0.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon.js +205 -5
- package/dist/addon.mjs +205 -5
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -14304,6 +14304,114 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14304
14304
|
limit: number().optional(),
|
|
14305
14305
|
tags: record(string(), string()).optional()
|
|
14306
14306
|
}), array(LogEntrySchema).readonly());
|
|
14307
|
+
/**
|
|
14308
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14309
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
14310
|
+
*
|
|
14311
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14312
|
+
*
|
|
14313
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14314
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14315
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14316
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14317
|
+
* somebody to forget to edit.
|
|
14318
|
+
*
|
|
14319
|
+
* They are not merged, because their invariants are opposites:
|
|
14320
|
+
*
|
|
14321
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14322
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14323
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14324
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14325
|
+
* and it is exactly what an absent entry cannot say.
|
|
14326
|
+
*
|
|
14327
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14328
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14329
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14330
|
+
* has no process.
|
|
14331
|
+
*
|
|
14332
|
+
* ## Why not a log line, since the counters already exist
|
|
14333
|
+
*
|
|
14334
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14335
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14336
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14337
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14338
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14339
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14340
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14341
|
+
* be READ.
|
|
14342
|
+
*
|
|
14343
|
+
* ## The rate is served with its denominator or not at all
|
|
14344
|
+
*
|
|
14345
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14346
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14347
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14348
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
14349
|
+
* reproduces that mistake on every read.
|
|
14350
|
+
*
|
|
14351
|
+
* ## Shape
|
|
14352
|
+
*
|
|
14353
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14354
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14355
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14356
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14357
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14358
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14359
|
+
* result through `system.getFailureContributions`.
|
|
14360
|
+
*/
|
|
14361
|
+
var FailureReasonCountSchema = object({
|
|
14362
|
+
/**
|
|
14363
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14364
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14365
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
14366
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
14367
|
+
* vocabulary for the same loss would make the row and the counter
|
|
14368
|
+
* un-joinable.
|
|
14369
|
+
*/
|
|
14370
|
+
reason: string(),
|
|
14371
|
+
count: number().int().nonnegative()
|
|
14372
|
+
});
|
|
14373
|
+
var FailureContributionSchema = object({
|
|
14374
|
+
/**
|
|
14375
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14376
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14377
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
14378
|
+
* is a central list that rots invisibly.
|
|
14379
|
+
*/
|
|
14380
|
+
family: string(),
|
|
14381
|
+
/**
|
|
14382
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
14383
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14384
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
14385
|
+
* cannot answer the only question anybody asks of this surface.
|
|
14386
|
+
*/
|
|
14387
|
+
deviceId: number().int().positive(),
|
|
14388
|
+
/**
|
|
14389
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
14390
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14391
|
+
* family has a single variant.
|
|
14392
|
+
*/
|
|
14393
|
+
variant: string().optional(),
|
|
14394
|
+
/**
|
|
14395
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14396
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
14397
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14398
|
+
* `LoadContribution.startedAtMs`.
|
|
14399
|
+
*/
|
|
14400
|
+
sinceMs: number(),
|
|
14401
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14402
|
+
atMs: number(),
|
|
14403
|
+
/**
|
|
14404
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14405
|
+
* window. A failure count published without it is the mistake this schema
|
|
14406
|
+
* exists to make impossible.
|
|
14407
|
+
*/
|
|
14408
|
+
attempts: number().int().nonnegative(),
|
|
14409
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14410
|
+
succeeded: number().int().nonnegative(),
|
|
14411
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14412
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
14413
|
+
});
|
|
14414
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
14307
14415
|
var LoadContributionSchema = object({
|
|
14308
14416
|
role: _enum([
|
|
14309
14417
|
"decode",
|
|
@@ -14611,6 +14719,50 @@ var NodeProcessSchema = object({
|
|
|
14611
14719
|
/** Wall-clock uptime (seconds). Parsed from `ps etime`. */
|
|
14612
14720
|
uptimeSec: number()
|
|
14613
14721
|
});
|
|
14722
|
+
/**
|
|
14723
|
+
* One retained container-memory reading.
|
|
14724
|
+
*
|
|
14725
|
+
* `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
|
|
14726
|
+
* a second clock: that is what makes "processes sum to X, container says Y"
|
|
14727
|
+
* subtractable per point rather than an eyeballed comparison of two series
|
|
14728
|
+
* sampled at different instants.
|
|
14729
|
+
*
|
|
14730
|
+
* A reduced window keeps the sample with the LARGEST `currentBytes` in each
|
|
14731
|
+
* bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
|
|
14732
|
+
* never coexisted, and a mean would smear away the peak this exists to find.
|
|
14733
|
+
*/
|
|
14734
|
+
var ContainerMemoryPointSchema = object({
|
|
14735
|
+
/** Which hierarchy answered, so a reading is never ambiguous. */
|
|
14736
|
+
source: _enum(["cgroup-v2", "cgroup-v1"]),
|
|
14737
|
+
/** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
|
|
14738
|
+
currentBytes: number(),
|
|
14739
|
+
/** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
|
|
14740
|
+
limitBytes: number().nullable(),
|
|
14741
|
+
/** Anonymous pages: the closest thing to "what the processes allocated". */
|
|
14742
|
+
anonBytes: number().nullable(),
|
|
14743
|
+
/** Page cache. Charged to the cgroup, owned by no process. */
|
|
14744
|
+
fileBytes: number().nullable(),
|
|
14745
|
+
/**
|
|
14746
|
+
* Shared memory — and the field that explained the largest single surprise.
|
|
14747
|
+
* The i915 driver backs GPU buffers with shmem, so an inference pool or a
|
|
14748
|
+
* hardware-decode session holding DRM objects is charged HERE and appears
|
|
14749
|
+
* nowhere in a `ps` scan.
|
|
14750
|
+
*/
|
|
14751
|
+
shmemBytes: number().nullable(),
|
|
14752
|
+
/** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
|
|
14753
|
+
slabBytes: number().nullable(),
|
|
14754
|
+
/**
|
|
14755
|
+
* Shrinkable i915 GEM object bytes, from debugfs.
|
|
14756
|
+
*
|
|
14757
|
+
* **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
|
|
14758
|
+
* component of `currentBytes` and must not be subtracted from it; it says
|
|
14759
|
+
* what put the shmem there, where `shmemBytes` only says how much.
|
|
14760
|
+
*
|
|
14761
|
+
* `null` wherever debugfs is not mounted — which is inside every camstack
|
|
14762
|
+
* container today — and on any node with no Intel GPU.
|
|
14763
|
+
*/
|
|
14764
|
+
gpuShmemBytes: number().nullable()
|
|
14765
|
+
}).extend({ atMs: number() });
|
|
14614
14766
|
var DumpHeapSnapshotInputSchema = object({
|
|
14615
14767
|
/** The addon whose runner should dump a heap snapshot. */
|
|
14616
14768
|
addonId: string() });
|
|
@@ -14674,6 +14826,21 @@ var NodeLoadSeriesSchema = object({
|
|
|
14674
14826
|
/** One entry per function seen in the window, heaviest-first. */
|
|
14675
14827
|
series: array(LoadFunctionSeriesSchema).readonly(),
|
|
14676
14828
|
/**
|
|
14829
|
+
* The CONTAINER's memory over the same window, oldest-first.
|
|
14830
|
+
*
|
|
14831
|
+
* Sits next to `series` rather than in a method of its own because the whole
|
|
14832
|
+
* question is a subtraction: the per-process rows in `series` sum to one
|
|
14833
|
+
* number and this one is another, and an operator who has to issue two calls
|
|
14834
|
+
* to compare them will compare two different instants. Same reader, same
|
|
14835
|
+
* `sinceMs`, same `bucketMs`, same timestamps.
|
|
14836
|
+
*
|
|
14837
|
+
* **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
|
|
14838
|
+
* Mac, a bare-metal host, a container with the hierarchy hidden — reports no
|
|
14839
|
+
* points at all. A zero here would be indistinguishable from a healthy
|
|
14840
|
+
* container and is precisely the lie this field exists to avoid.
|
|
14841
|
+
*/
|
|
14842
|
+
containerMemory: array(ContainerMemoryPointSchema).readonly(),
|
|
14843
|
+
/**
|
|
14677
14844
|
* Width of one returned bucket, in ms. Equals the sampling cadence when no
|
|
14678
14845
|
* reduction was needed — so a caller can always say what one point covers
|
|
14679
14846
|
* without having to know whether it was reduced.
|
|
@@ -18894,6 +19061,20 @@ var TrackSchema = object({
|
|
|
18894
19061
|
* `=== true` and render nothing otherwise — never infer "no rider".
|
|
18895
19062
|
*/
|
|
18896
19063
|
hasRider: boolean().optional(),
|
|
19064
|
+
/**
|
|
19065
|
+
* WHY this track ended without a NATIVE best-shot tile
|
|
19066
|
+
* ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
|
|
19067
|
+
* a composed token line (`no-key-frame capture=keyframe:native-missx4`,
|
|
19068
|
+
* `derive-returned-null tile=standin`, …) written at close and CLEARED by
|
|
19069
|
+
* the late-keyFrame upgrade when a native tile lands after all. The
|
|
19070
|
+
* operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
19071
|
+
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
19072
|
+
*
|
|
19073
|
+
* **Absent ≠ "missed silently"**: a row written before the column, a hub
|
|
19074
|
+
* that predates the field, and every track whose tile landed native all
|
|
19075
|
+
* omit it. Render nothing when absent.
|
|
19076
|
+
*/
|
|
19077
|
+
previewMissReason: string().optional(),
|
|
18897
19078
|
...TrackFlagFields,
|
|
18898
19079
|
...TrackRetrainFields
|
|
18899
19080
|
});
|
|
@@ -28363,10 +28544,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
28363
28544
|
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
28364
28545
|
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
28365
28546
|
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
28366
|
-
* rows)
|
|
28367
|
-
*
|
|
28368
|
-
*
|
|
28369
|
-
* (`interfaces/recording-config.ts`).
|
|
28547
|
+
* rows) and are the ONLY event surface — the recorder has none. The in-RAM
|
|
28548
|
+
* playback markers it used to build were deleted on 2026-08-29 because nothing
|
|
28549
|
+
* ever read them. Event<->footage joins are by time, padded with the shared
|
|
28550
|
+
* `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
|
|
28370
28551
|
*/
|
|
28371
28552
|
var RecordingStatusSchema = object({
|
|
28372
28553
|
deviceId: number(),
|
|
@@ -30077,6 +30258,13 @@ var LoggingSettingsPatchSchema = object({
|
|
|
30077
30258
|
* anyone but its owner.
|
|
30078
30259
|
*/
|
|
30079
30260
|
var ReportedLoadContributionSchema = LoadContributionSchema.extend({ addonId: string() });
|
|
30261
|
+
/**
|
|
30262
|
+
* One per-camera failure counter, plus WHO reported it.
|
|
30263
|
+
*
|
|
30264
|
+
* Same rule as {@link ReportedLoadContributionSchema}: `addonId` is stamped by
|
|
30265
|
+
* the hub as it enumerates providers, never by the contributor.
|
|
30266
|
+
*/
|
|
30267
|
+
var ReportedFailureContributionSchema = FailureContributionSchema.extend({ addonId: string() });
|
|
30080
30268
|
var GetLoggingSettingsInputSchema = object({
|
|
30081
30269
|
scopeNodeId: string().optional(),
|
|
30082
30270
|
/**
|
|
@@ -30135,7 +30323,7 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
30135
30323
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
30136
30324
|
kind: "mutation",
|
|
30137
30325
|
auth: "admin"
|
|
30138
|
-
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
30326
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(_void(), array(ReportedFailureContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
30139
30327
|
kind: "mutation",
|
|
30140
30328
|
auth: "admin"
|
|
30141
30329
|
});
|
|
@@ -34125,6 +34313,12 @@ Object.freeze({
|
|
|
34125
34313
|
addonId: null,
|
|
34126
34314
|
access: "create"
|
|
34127
34315
|
},
|
|
34316
|
+
"failureContribution.list": {
|
|
34317
|
+
capName: "failure-contribution",
|
|
34318
|
+
capScope: "system",
|
|
34319
|
+
addonId: null,
|
|
34320
|
+
access: "view"
|
|
34321
|
+
},
|
|
34128
34322
|
"fanControl.setDirection": {
|
|
34129
34323
|
capName: "fan-control",
|
|
34130
34324
|
capScope: "device",
|
|
@@ -37431,6 +37625,12 @@ Object.freeze({
|
|
|
37431
37625
|
addonId: null,
|
|
37432
37626
|
access: "create"
|
|
37433
37627
|
},
|
|
37628
|
+
"system.getFailureContributions": {
|
|
37629
|
+
capName: "system",
|
|
37630
|
+
capScope: "system",
|
|
37631
|
+
addonId: null,
|
|
37632
|
+
access: "view"
|
|
37633
|
+
},
|
|
37434
37634
|
"system.getLoadContributions": {
|
|
37435
37635
|
capName: "system",
|
|
37436
37636
|
capScope: "system",
|
package/dist/addon.mjs
CHANGED
|
@@ -14303,6 +14303,114 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14303
14303
|
limit: number().optional(),
|
|
14304
14304
|
tags: record(string(), string()).optional()
|
|
14305
14305
|
}), array(LogEntrySchema).readonly());
|
|
14306
|
+
/**
|
|
14307
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14308
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
14309
|
+
*
|
|
14310
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14311
|
+
*
|
|
14312
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14313
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14314
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14315
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14316
|
+
* somebody to forget to edit.
|
|
14317
|
+
*
|
|
14318
|
+
* They are not merged, because their invariants are opposites:
|
|
14319
|
+
*
|
|
14320
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14321
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14322
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14323
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14324
|
+
* and it is exactly what an absent entry cannot say.
|
|
14325
|
+
*
|
|
14326
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14327
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14328
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14329
|
+
* has no process.
|
|
14330
|
+
*
|
|
14331
|
+
* ## Why not a log line, since the counters already exist
|
|
14332
|
+
*
|
|
14333
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14334
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14335
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14336
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14337
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14338
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14339
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14340
|
+
* be READ.
|
|
14341
|
+
*
|
|
14342
|
+
* ## The rate is served with its denominator or not at all
|
|
14343
|
+
*
|
|
14344
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14345
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14346
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14347
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
14348
|
+
* reproduces that mistake on every read.
|
|
14349
|
+
*
|
|
14350
|
+
* ## Shape
|
|
14351
|
+
*
|
|
14352
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14353
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14354
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14355
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14356
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14357
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14358
|
+
* result through `system.getFailureContributions`.
|
|
14359
|
+
*/
|
|
14360
|
+
var FailureReasonCountSchema = object({
|
|
14361
|
+
/**
|
|
14362
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14363
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14364
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
14365
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
14366
|
+
* vocabulary for the same loss would make the row and the counter
|
|
14367
|
+
* un-joinable.
|
|
14368
|
+
*/
|
|
14369
|
+
reason: string(),
|
|
14370
|
+
count: number().int().nonnegative()
|
|
14371
|
+
});
|
|
14372
|
+
var FailureContributionSchema = object({
|
|
14373
|
+
/**
|
|
14374
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14375
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14376
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
14377
|
+
* is a central list that rots invisibly.
|
|
14378
|
+
*/
|
|
14379
|
+
family: string(),
|
|
14380
|
+
/**
|
|
14381
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
14382
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14383
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
14384
|
+
* cannot answer the only question anybody asks of this surface.
|
|
14385
|
+
*/
|
|
14386
|
+
deviceId: number().int().positive(),
|
|
14387
|
+
/**
|
|
14388
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
14389
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14390
|
+
* family has a single variant.
|
|
14391
|
+
*/
|
|
14392
|
+
variant: string().optional(),
|
|
14393
|
+
/**
|
|
14394
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14395
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
14396
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14397
|
+
* `LoadContribution.startedAtMs`.
|
|
14398
|
+
*/
|
|
14399
|
+
sinceMs: number(),
|
|
14400
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14401
|
+
atMs: number(),
|
|
14402
|
+
/**
|
|
14403
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14404
|
+
* window. A failure count published without it is the mistake this schema
|
|
14405
|
+
* exists to make impossible.
|
|
14406
|
+
*/
|
|
14407
|
+
attempts: number().int().nonnegative(),
|
|
14408
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14409
|
+
succeeded: number().int().nonnegative(),
|
|
14410
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14411
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
14412
|
+
});
|
|
14413
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
14306
14414
|
var LoadContributionSchema = object({
|
|
14307
14415
|
role: _enum([
|
|
14308
14416
|
"decode",
|
|
@@ -14610,6 +14718,50 @@ var NodeProcessSchema = object({
|
|
|
14610
14718
|
/** Wall-clock uptime (seconds). Parsed from `ps etime`. */
|
|
14611
14719
|
uptimeSec: number()
|
|
14612
14720
|
});
|
|
14721
|
+
/**
|
|
14722
|
+
* One retained container-memory reading.
|
|
14723
|
+
*
|
|
14724
|
+
* `atMs` is the timestamp of the PROCESS snapshot taken in the same tick, not
|
|
14725
|
+
* a second clock: that is what makes "processes sum to X, container says Y"
|
|
14726
|
+
* subtractable per point rather than an eyeballed comparison of two series
|
|
14727
|
+
* sampled at different instants.
|
|
14728
|
+
*
|
|
14729
|
+
* A reduced window keeps the sample with the LARGEST `currentBytes` in each
|
|
14730
|
+
* bucket, WHOLE. Taking a per-field maximum would synthesise a row whose parts
|
|
14731
|
+
* never coexisted, and a mean would smear away the peak this exists to find.
|
|
14732
|
+
*/
|
|
14733
|
+
var ContainerMemoryPointSchema = object({
|
|
14734
|
+
/** Which hierarchy answered, so a reading is never ambiguous. */
|
|
14735
|
+
source: _enum(["cgroup-v2", "cgroup-v1"]),
|
|
14736
|
+
/** `memory.current` (v2) / `memory.usage_in_bytes` (v1). Always known. */
|
|
14737
|
+
currentBytes: number(),
|
|
14738
|
+
/** The cgroup's ceiling. `null` = NO LIMIT — never a sentinel, never zero. */
|
|
14739
|
+
limitBytes: number().nullable(),
|
|
14740
|
+
/** Anonymous pages: the closest thing to "what the processes allocated". */
|
|
14741
|
+
anonBytes: number().nullable(),
|
|
14742
|
+
/** Page cache. Charged to the cgroup, owned by no process. */
|
|
14743
|
+
fileBytes: number().nullable(),
|
|
14744
|
+
/**
|
|
14745
|
+
* Shared memory — and the field that explained the largest single surprise.
|
|
14746
|
+
* The i915 driver backs GPU buffers with shmem, so an inference pool or a
|
|
14747
|
+
* hardware-decode session holding DRM objects is charged HERE and appears
|
|
14748
|
+
* nowhere in a `ps` scan.
|
|
14749
|
+
*/
|
|
14750
|
+
shmemBytes: number().nullable(),
|
|
14751
|
+
/** Kernel slab charged to this cgroup. `null` on v1, which never publishes it. */
|
|
14752
|
+
slabBytes: number().nullable(),
|
|
14753
|
+
/**
|
|
14754
|
+
* Shrinkable i915 GEM object bytes, from debugfs.
|
|
14755
|
+
*
|
|
14756
|
+
* **Host-wide across every DRM client, NOT cgroup-scoped.** It is not a
|
|
14757
|
+
* component of `currentBytes` and must not be subtracted from it; it says
|
|
14758
|
+
* what put the shmem there, where `shmemBytes` only says how much.
|
|
14759
|
+
*
|
|
14760
|
+
* `null` wherever debugfs is not mounted — which is inside every camstack
|
|
14761
|
+
* container today — and on any node with no Intel GPU.
|
|
14762
|
+
*/
|
|
14763
|
+
gpuShmemBytes: number().nullable()
|
|
14764
|
+
}).extend({ atMs: number() });
|
|
14613
14765
|
var DumpHeapSnapshotInputSchema = object({
|
|
14614
14766
|
/** The addon whose runner should dump a heap snapshot. */
|
|
14615
14767
|
addonId: string() });
|
|
@@ -14673,6 +14825,21 @@ var NodeLoadSeriesSchema = object({
|
|
|
14673
14825
|
/** One entry per function seen in the window, heaviest-first. */
|
|
14674
14826
|
series: array(LoadFunctionSeriesSchema).readonly(),
|
|
14675
14827
|
/**
|
|
14828
|
+
* The CONTAINER's memory over the same window, oldest-first.
|
|
14829
|
+
*
|
|
14830
|
+
* Sits next to `series` rather than in a method of its own because the whole
|
|
14831
|
+
* question is a subtraction: the per-process rows in `series` sum to one
|
|
14832
|
+
* number and this one is another, and an operator who has to issue two calls
|
|
14833
|
+
* to compare them will compare two different instants. Same reader, same
|
|
14834
|
+
* `sinceMs`, same `bucketMs`, same timestamps.
|
|
14835
|
+
*
|
|
14836
|
+
* **EMPTY means ABSENT, never zero.** A node with no cgroup — a developer
|
|
14837
|
+
* Mac, a bare-metal host, a container with the hierarchy hidden — reports no
|
|
14838
|
+
* points at all. A zero here would be indistinguishable from a healthy
|
|
14839
|
+
* container and is precisely the lie this field exists to avoid.
|
|
14840
|
+
*/
|
|
14841
|
+
containerMemory: array(ContainerMemoryPointSchema).readonly(),
|
|
14842
|
+
/**
|
|
14676
14843
|
* Width of one returned bucket, in ms. Equals the sampling cadence when no
|
|
14677
14844
|
* reduction was needed — so a caller can always say what one point covers
|
|
14678
14845
|
* without having to know whether it was reduced.
|
|
@@ -18893,6 +19060,20 @@ var TrackSchema = object({
|
|
|
18893
19060
|
* `=== true` and render nothing otherwise — never infer "no rider".
|
|
18894
19061
|
*/
|
|
18895
19062
|
hasRider: boolean().optional(),
|
|
19063
|
+
/**
|
|
19064
|
+
* WHY this track ended without a NATIVE best-shot tile
|
|
19065
|
+
* ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
|
|
19066
|
+
* a composed token line (`no-key-frame capture=keyframe:native-missx4`,
|
|
19067
|
+
* `derive-returned-null tile=standin`, …) written at close and CLEARED by
|
|
19068
|
+
* the late-keyFrame upgrade when a native tile lands after all. The
|
|
19069
|
+
* operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
19070
|
+
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
19071
|
+
*
|
|
19072
|
+
* **Absent ≠ "missed silently"**: a row written before the column, a hub
|
|
19073
|
+
* that predates the field, and every track whose tile landed native all
|
|
19074
|
+
* omit it. Render nothing when absent.
|
|
19075
|
+
*/
|
|
19076
|
+
previewMissReason: string().optional(),
|
|
18896
19077
|
...TrackFlagFields,
|
|
18897
19078
|
...TrackRetrainFields
|
|
18898
19079
|
});
|
|
@@ -28362,10 +28543,10 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
|
|
|
28362
28543
|
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
28363
28544
|
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
28364
28545
|
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
28365
|
-
* rows)
|
|
28366
|
-
*
|
|
28367
|
-
*
|
|
28368
|
-
* (`interfaces/recording-config.ts`).
|
|
28546
|
+
* rows) and are the ONLY event surface — the recorder has none. The in-RAM
|
|
28547
|
+
* playback markers it used to build were deleted on 2026-08-29 because nothing
|
|
28548
|
+
* ever read them. Event<->footage joins are by time, padded with the shared
|
|
28549
|
+
* `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
|
|
28369
28550
|
*/
|
|
28370
28551
|
var RecordingStatusSchema = object({
|
|
28371
28552
|
deviceId: number(),
|
|
@@ -30076,6 +30257,13 @@ var LoggingSettingsPatchSchema = object({
|
|
|
30076
30257
|
* anyone but its owner.
|
|
30077
30258
|
*/
|
|
30078
30259
|
var ReportedLoadContributionSchema = LoadContributionSchema.extend({ addonId: string() });
|
|
30260
|
+
/**
|
|
30261
|
+
* One per-camera failure counter, plus WHO reported it.
|
|
30262
|
+
*
|
|
30263
|
+
* Same rule as {@link ReportedLoadContributionSchema}: `addonId` is stamped by
|
|
30264
|
+
* the hub as it enumerates providers, never by the contributor.
|
|
30265
|
+
*/
|
|
30266
|
+
var ReportedFailureContributionSchema = FailureContributionSchema.extend({ addonId: string() });
|
|
30079
30267
|
var GetLoggingSettingsInputSchema = object({
|
|
30080
30268
|
scopeNodeId: string().optional(),
|
|
30081
30269
|
/**
|
|
@@ -30134,7 +30322,7 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
|
|
|
30134
30322
|
}), method(_void(), SiteLocationStatusSchema, {
|
|
30135
30323
|
kind: "mutation",
|
|
30136
30324
|
auth: "admin"
|
|
30137
|
-
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
30325
|
+
}), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(_void(), array(ReportedFailureContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
|
|
30138
30326
|
kind: "mutation",
|
|
30139
30327
|
auth: "admin"
|
|
30140
30328
|
});
|
|
@@ -34124,6 +34312,12 @@ Object.freeze({
|
|
|
34124
34312
|
addonId: null,
|
|
34125
34313
|
access: "create"
|
|
34126
34314
|
},
|
|
34315
|
+
"failureContribution.list": {
|
|
34316
|
+
capName: "failure-contribution",
|
|
34317
|
+
capScope: "system",
|
|
34318
|
+
addonId: null,
|
|
34319
|
+
access: "view"
|
|
34320
|
+
},
|
|
34127
34321
|
"fanControl.setDirection": {
|
|
34128
34322
|
capName: "fan-control",
|
|
34129
34323
|
capScope: "device",
|
|
@@ -37430,6 +37624,12 @@ Object.freeze({
|
|
|
37430
37624
|
addonId: null,
|
|
37431
37625
|
access: "create"
|
|
37432
37626
|
},
|
|
37627
|
+
"system.getFailureContributions": {
|
|
37628
|
+
capName: "system",
|
|
37629
|
+
capScope: "system",
|
|
37630
|
+
addonId: null,
|
|
37631
|
+
access: "view"
|
|
37632
|
+
},
|
|
37433
37633
|
"system.getLoadContributions": {
|
|
37434
37634
|
capName: "system",
|
|
37435
37635
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-tuya",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.41",
|
|
4
4
|
"description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|