@camstack/types 1.2.119 → 1.2.120
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 +2 -1
- package/dist/addon.mjs +2 -1
- package/dist/capabilities/failure-contribution.cap.d.ts +111 -0
- package/dist/capabilities/index.d.ts +5 -2
- package/dist/capabilities/pipeline-analytics.cap.d.ts +6 -0
- package/dist/capabilities/system.cap.d.ts +57 -1
- package/dist/generated/addon-api.d.ts +23 -0
- package/dist/generated/capability-router-map.d.ts +5 -2
- package/dist/generated/collection-array-methods.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +386 -0
- package/dist/index.mjs +378 -1
- package/dist/metrics/failure-counters.d.ts +173 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2906,6 +2906,190 @@ function reducePoints(points, bucketMs, origin) {
|
|
|
2906
2906
|
return [...buckets.values()].toSorted((a, b) => a.atMs - b.atMs);
|
|
2907
2907
|
}
|
|
2908
2908
|
//#endregion
|
|
2909
|
+
//#region src/metrics/failure-counters.ts
|
|
2910
|
+
/**
|
|
2911
|
+
* `FailureCounters` — the per-camera counter every "how often does this camera
|
|
2912
|
+
* lose work, and why" question is answered from.
|
|
2913
|
+
*
|
|
2914
|
+
* ## Why a primitive and not four counters
|
|
2915
|
+
*
|
|
2916
|
+
* Four open failure modes were being triaged on 2026-08-28 and every one of
|
|
2917
|
+
* them was measured the same way: grep a log line, count it, and then guess at
|
|
2918
|
+
* the denominator. The guess is the defect. `enrichment crop native miss` read
|
|
2919
|
+
* as "35x worse than yesterday" and turned out to be **flat all day** the
|
|
2920
|
+
* moment it was divided by the successes on the same path — 0.25 misses per
|
|
2921
|
+
* landed capture, 0.08–0.33 across twelve hours, no trend. The count moved
|
|
2922
|
+
* because the traffic moved.
|
|
2923
|
+
*
|
|
2924
|
+
* So the unit here is not a counter. It is a **ratio with its denominator
|
|
2925
|
+
* attached**: {@link FailureCounterSample.attempts} is incremented on every
|
|
2926
|
+
* try, {@link FailureCounterSample.succeeded} on the ones that landed, and the
|
|
2927
|
+
* reasons partition the rest. A consumer can always divide; it can never
|
|
2928
|
+
* un-divide a bare count.
|
|
2929
|
+
*
|
|
2930
|
+
* ## Per camera, always
|
|
2931
|
+
*
|
|
2932
|
+
* The key is the numeric `deviceId` — the same value every log line in this
|
|
2933
|
+
* repo carries as `tags.deviceId`. There is no fleet-total mode and no
|
|
2934
|
+
* device-less bucket, because the question is always "why is 617 worse than
|
|
2935
|
+
* 615?" and a fleet total cannot answer it. A caller that cannot name the
|
|
2936
|
+
* camera must not note anything: an unnamed per-camera count is
|
|
2937
|
+
* indistinguishable from a shared one, which is how one camera's failures
|
|
2938
|
+
* quietly become everybody's.
|
|
2939
|
+
*
|
|
2940
|
+
* ## Cumulative, never drained
|
|
2941
|
+
*
|
|
2942
|
+
* A read NEVER resets anything. `load-contribution.cap.ts` already argued this
|
|
2943
|
+
* for CPU seconds and the argument carries over verbatim: *"a rate needs a
|
|
2944
|
+
* window, a window needs a sampler, and a new per-node sampler is the defect
|
|
2945
|
+
* half of `docs/architecture/load-ledger.md` documents. A counter can be
|
|
2946
|
+
* differenced by whoever already keeps a history; a rate cannot be
|
|
2947
|
+
* un-averaged."* A draining read has a second failure this surface cannot
|
|
2948
|
+
* afford — two consumers polling it would each destroy half of the other's
|
|
2949
|
+
* numbers, silently.
|
|
2950
|
+
*
|
|
2951
|
+
* {@link FailureCounterSample.sinceMs} is the incarnation marker: it is when
|
|
2952
|
+
* this counter started, and a consumer differencing two reads must drop the
|
|
2953
|
+
* interval when it changes, because the counter restarted from zero in a new
|
|
2954
|
+
* process.
|
|
2955
|
+
*
|
|
2956
|
+
* ## Bounded, and the bound is the point
|
|
2957
|
+
*
|
|
2958
|
+
* This lives in the memory of a process that is already the subject of an RSS
|
|
2959
|
+
* budget, so both dimensions are capped: {@link MAX_KEYS} counters and
|
|
2960
|
+
* {@link MAX_REASONS_PER_KEY} distinct reasons within one. Past the reason cap
|
|
2961
|
+
* the counts are folded into {@link OVERFLOW_REASON} rather than dropped —
|
|
2962
|
+
* losing them would make `attempts - succeeded` stop equalling the reason
|
|
2963
|
+
* total, and the ratio the whole surface exists to publish would quietly stop
|
|
2964
|
+
* adding up. Past the key cap a new key is refused and
|
|
2965
|
+
* {@link FailureCounters.keysRefused} says so, so the omission is visible
|
|
2966
|
+
* instead of silent.
|
|
2967
|
+
*
|
|
2968
|
+
* ## No timers, no IO, no logging
|
|
2969
|
+
*
|
|
2970
|
+
* Pure. It is read on whatever beat the caller already has. A telemetry
|
|
2971
|
+
* primitive that schedules its own work is a second sampler, and this repo has
|
|
2972
|
+
* paid for one of those already (`docs/architecture/load-ledger.md`).
|
|
2973
|
+
*/
|
|
2974
|
+
/** Distinct reason strings kept per counter before folding. */
|
|
2975
|
+
var MAX_REASONS_PER_KEY = 16;
|
|
2976
|
+
/**
|
|
2977
|
+
* Distinct (device, family, variant) counters one instance will hold.
|
|
2978
|
+
*
|
|
2979
|
+
* A large fleet x the handful of families any single addon reports, with
|
|
2980
|
+
* slack. At ~200 B per counter this is a ~100 KB ceiling on a process that
|
|
2981
|
+
* already declares an RSS budget in the gigabytes.
|
|
2982
|
+
*/
|
|
2983
|
+
var MAX_KEYS = 1024;
|
|
2984
|
+
/**
|
|
2985
|
+
* Where reasons past {@link MAX_REASONS_PER_KEY} go.
|
|
2986
|
+
*
|
|
2987
|
+
* They are FOLDED, never dropped: `attempts - succeeded` must always equal the
|
|
2988
|
+
* sum of the reason counts, or the ratio stops adding up.
|
|
2989
|
+
*/
|
|
2990
|
+
var OVERFLOW_REASON = "other";
|
|
2991
|
+
/** `deviceId` + `family` + optional `variant`, flattened into the map key. */
|
|
2992
|
+
function counterKey(deviceId, family, variant) {
|
|
2993
|
+
return variant === void 0 ? `${deviceId}${family}` : `${deviceId}${family}${variant}`;
|
|
2994
|
+
}
|
|
2995
|
+
/**
|
|
2996
|
+
* A bounded set of per-camera, cumulative failure counters.
|
|
2997
|
+
*
|
|
2998
|
+
* One instance per contributing subsystem. `note` is O(1) and allocation-free
|
|
2999
|
+
* on the steady path; `snapshot` reads without mutating anything.
|
|
3000
|
+
*/
|
|
3001
|
+
var FailureCounters = class {
|
|
3002
|
+
maxKeys;
|
|
3003
|
+
maxReasons;
|
|
3004
|
+
counters = /* @__PURE__ */ new Map();
|
|
3005
|
+
refused = 0;
|
|
3006
|
+
constructor(maxKeys = MAX_KEYS, maxReasons = 16) {
|
|
3007
|
+
this.maxKeys = maxKeys;
|
|
3008
|
+
this.maxReasons = maxReasons;
|
|
3009
|
+
}
|
|
3010
|
+
/**
|
|
3011
|
+
* Counters refused because {@link MAX_KEYS} was already held.
|
|
3012
|
+
*
|
|
3013
|
+
* Cumulative for the life of the instance: a bound that bit is a fact about
|
|
3014
|
+
* the deployment, and a surface that hid it would under-report a fleet
|
|
3015
|
+
* precisely when the fleet got large enough to matter.
|
|
3016
|
+
*/
|
|
3017
|
+
get keysRefused() {
|
|
3018
|
+
return this.refused;
|
|
3019
|
+
}
|
|
3020
|
+
/** Counters currently held. */
|
|
3021
|
+
get size() {
|
|
3022
|
+
return this.counters.size;
|
|
3023
|
+
}
|
|
3024
|
+
/**
|
|
3025
|
+
* Fold one observation in.
|
|
3026
|
+
*
|
|
3027
|
+
* A non-positive or non-integer `deviceId` is REFUSED rather than bucketed:
|
|
3028
|
+
* see the module docblock — an entry that cannot name its camera is worse
|
|
3029
|
+
* than no entry.
|
|
3030
|
+
*/
|
|
3031
|
+
note(observation, nowMs) {
|
|
3032
|
+
if (!Number.isInteger(observation.deviceId) || observation.deviceId <= 0) return;
|
|
3033
|
+
const key = counterKey(observation.deviceId, observation.family, observation.variant);
|
|
3034
|
+
let counter = this.counters.get(key);
|
|
3035
|
+
if (counter === void 0) {
|
|
3036
|
+
if (this.counters.size >= this.maxKeys) {
|
|
3037
|
+
this.refused += 1;
|
|
3038
|
+
return;
|
|
3039
|
+
}
|
|
3040
|
+
counter = {
|
|
3041
|
+
deviceId: observation.deviceId,
|
|
3042
|
+
family: observation.family,
|
|
3043
|
+
variant: observation.variant,
|
|
3044
|
+
sinceMs: nowMs,
|
|
3045
|
+
attempts: 0,
|
|
3046
|
+
succeeded: 0,
|
|
3047
|
+
reasons: /* @__PURE__ */ new Map()
|
|
3048
|
+
};
|
|
3049
|
+
this.counters.set(key, counter);
|
|
3050
|
+
}
|
|
3051
|
+
counter.attempts += 1;
|
|
3052
|
+
if (observation.reason === void 0) {
|
|
3053
|
+
counter.succeeded += 1;
|
|
3054
|
+
return;
|
|
3055
|
+
}
|
|
3056
|
+
const reason = counter.reasons.has(observation.reason) || counter.reasons.size < this.maxReasons ? observation.reason : OVERFLOW_REASON;
|
|
3057
|
+
counter.reasons.set(reason, (counter.reasons.get(reason) ?? 0) + 1);
|
|
3058
|
+
}
|
|
3059
|
+
/** Read every counter. Never mutates — see the module docblock. */
|
|
3060
|
+
snapshot(nowMs) {
|
|
3061
|
+
const out = [];
|
|
3062
|
+
for (const counter of this.counters.values()) out.push({
|
|
3063
|
+
deviceId: counter.deviceId,
|
|
3064
|
+
family: counter.family,
|
|
3065
|
+
...counter.variant !== void 0 ? { variant: counter.variant } : {},
|
|
3066
|
+
sinceMs: counter.sinceMs,
|
|
3067
|
+
atMs: nowMs,
|
|
3068
|
+
attempts: counter.attempts,
|
|
3069
|
+
succeeded: counter.succeeded,
|
|
3070
|
+
reasons: [...counter.reasons.entries()].map(([reason, count]) => ({
|
|
3071
|
+
reason,
|
|
3072
|
+
count
|
|
3073
|
+
})).toSorted((a, b) => b.count - a.count)
|
|
3074
|
+
});
|
|
3075
|
+
return out;
|
|
3076
|
+
}
|
|
3077
|
+
/** Drop everything (host disposal). */
|
|
3078
|
+
clear() {
|
|
3079
|
+
this.counters.clear();
|
|
3080
|
+
}
|
|
3081
|
+
};
|
|
3082
|
+
/**
|
|
3083
|
+
* Losses per attempt, as a ratio — the number the operator actually reads.
|
|
3084
|
+
*
|
|
3085
|
+
* `null` when there were no attempts: a camera nobody asked anything of has no
|
|
3086
|
+
* failure rate, and reporting 0 would say it was perfect.
|
|
3087
|
+
*/
|
|
3088
|
+
function failureRate(sample) {
|
|
3089
|
+
if (sample.attempts <= 0) return null;
|
|
3090
|
+
return (sample.attempts - sample.succeeded) / sample.attempts;
|
|
3091
|
+
}
|
|
3092
|
+
//#endregion
|
|
2909
3093
|
//#region src/types/model-variant-groups.ts
|
|
2910
3094
|
var FORMAT_KEYS = [
|
|
2911
3095
|
"onnx",
|
|
@@ -11149,6 +11333,135 @@ var logDestinationCapability = {
|
|
|
11149
11333
|
mount: { kind: "skip" }
|
|
11150
11334
|
};
|
|
11151
11335
|
//#endregion
|
|
11336
|
+
//#region src/capabilities/failure-contribution.cap.ts
|
|
11337
|
+
/**
|
|
11338
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
11339
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
11340
|
+
*
|
|
11341
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
11342
|
+
*
|
|
11343
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
11344
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
11345
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
11346
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
11347
|
+
* somebody to forget to edit.
|
|
11348
|
+
*
|
|
11349
|
+
* They are not merged, because their invariants are opposites:
|
|
11350
|
+
*
|
|
11351
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
11352
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
11353
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
11354
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
11355
|
+
* and it is exactly what an absent entry cannot say.
|
|
11356
|
+
*
|
|
11357
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
11358
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
11359
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
11360
|
+
* has no process.
|
|
11361
|
+
*
|
|
11362
|
+
* ## Why not a log line, since the counters already exist
|
|
11363
|
+
*
|
|
11364
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
11365
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
11366
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
11367
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
11368
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
11369
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
11370
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
11371
|
+
* be READ.
|
|
11372
|
+
*
|
|
11373
|
+
* ## The rate is served with its denominator or not at all
|
|
11374
|
+
*
|
|
11375
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
11376
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
11377
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
11378
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
11379
|
+
* reproduces that mistake on every read.
|
|
11380
|
+
*
|
|
11381
|
+
* ## Shape
|
|
11382
|
+
*
|
|
11383
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
11384
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
11385
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
11386
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
11387
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
11388
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
11389
|
+
* result through `system.getFailureContributions`.
|
|
11390
|
+
*/
|
|
11391
|
+
var FailureReasonCountSchema = zod.z.object({
|
|
11392
|
+
/**
|
|
11393
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
11394
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
11395
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
11396
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
11397
|
+
* vocabulary for the same loss would make the row and the counter
|
|
11398
|
+
* un-joinable.
|
|
11399
|
+
*/
|
|
11400
|
+
reason: zod.z.string(),
|
|
11401
|
+
count: zod.z.number().int().nonnegative()
|
|
11402
|
+
});
|
|
11403
|
+
var FailureContributionSchema = zod.z.object({
|
|
11404
|
+
/**
|
|
11405
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
11406
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
11407
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
11408
|
+
* is a central list that rots invisibly.
|
|
11409
|
+
*/
|
|
11410
|
+
family: zod.z.string(),
|
|
11411
|
+
/**
|
|
11412
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
11413
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
11414
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
11415
|
+
* cannot answer the only question anybody asks of this surface.
|
|
11416
|
+
*/
|
|
11417
|
+
deviceId: zod.z.number().int().positive(),
|
|
11418
|
+
/**
|
|
11419
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
11420
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
11421
|
+
* family has a single variant.
|
|
11422
|
+
*/
|
|
11423
|
+
variant: zod.z.string().optional(),
|
|
11424
|
+
/**
|
|
11425
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
11426
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
11427
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
11428
|
+
* `LoadContribution.startedAtMs`.
|
|
11429
|
+
*/
|
|
11430
|
+
sinceMs: zod.z.number(),
|
|
11431
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
11432
|
+
atMs: zod.z.number(),
|
|
11433
|
+
/**
|
|
11434
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
11435
|
+
* window. A failure count published without it is the mistake this schema
|
|
11436
|
+
* exists to make impossible.
|
|
11437
|
+
*/
|
|
11438
|
+
attempts: zod.z.number().int().nonnegative(),
|
|
11439
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
11440
|
+
succeeded: zod.z.number().int().nonnegative(),
|
|
11441
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
11442
|
+
reasons: zod.z.array(FailureReasonCountSchema).readonly()
|
|
11443
|
+
});
|
|
11444
|
+
var failureContributionCapability = {
|
|
11445
|
+
name: "failure-contribution",
|
|
11446
|
+
scope: "system",
|
|
11447
|
+
mode: "collection",
|
|
11448
|
+
internal: true,
|
|
11449
|
+
methods: {
|
|
11450
|
+
/**
|
|
11451
|
+
* This addon's per-camera failure counters, read live from bounded in-RAM
|
|
11452
|
+
* state it already keeps. Inert: no persistence, no sampling, no timer.
|
|
11453
|
+
*
|
|
11454
|
+
* READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
|
|
11455
|
+
* consumer that wants a rate differences two reads. A draining read would
|
|
11456
|
+
* make two operators with the page open each destroy half of the other's
|
|
11457
|
+
* numbers, and `load-contribution` already settled the same question the
|
|
11458
|
+
* same way for `cpuSeconds`.
|
|
11459
|
+
*/
|
|
11460
|
+
list: require_sleep.method(zod.z.void(), zod.z.array(FailureContributionSchema).readonly()) },
|
|
11461
|
+
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
11462
|
+
mount: { kind: "skip" }
|
|
11463
|
+
};
|
|
11464
|
+
//#endregion
|
|
11152
11465
|
//#region src/capabilities/load-contribution.cap.ts
|
|
11153
11466
|
/**
|
|
11154
11467
|
* `load-contribution` — the capability an addon reports its OWN cost through,
|
|
@@ -17295,6 +17608,20 @@ var TrackSchema = zod.z.object({
|
|
|
17295
17608
|
* `=== true` and render nothing otherwise — never infer "no rider".
|
|
17296
17609
|
*/
|
|
17297
17610
|
hasRider: zod.z.boolean().optional(),
|
|
17611
|
+
/**
|
|
17612
|
+
* WHY this track ended without a NATIVE best-shot tile
|
|
17613
|
+
* ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
|
|
17614
|
+
* a composed token line (`no-key-frame capture=keyframe:native-missx4`,
|
|
17615
|
+
* `derive-returned-null tile=standin`, …) written at close and CLEARED by
|
|
17616
|
+
* the late-keyFrame upgrade when a native tile lands after all. The
|
|
17617
|
+
* operator-facing answer to "perché manca l'immagine?" on a track whose
|
|
17618
|
+
* tile is a face/plate stand-in, a raster crop, or an icon.
|
|
17619
|
+
*
|
|
17620
|
+
* **Absent ≠ "missed silently"**: a row written before the column, a hub
|
|
17621
|
+
* that predates the field, and every track whose tile landed native all
|
|
17622
|
+
* omit it. Render nothing when absent.
|
|
17623
|
+
*/
|
|
17624
|
+
previewMissReason: zod.z.string().optional(),
|
|
17298
17625
|
...TrackFlagFields,
|
|
17299
17626
|
...TrackRetrainFields
|
|
17300
17627
|
});
|
|
@@ -31829,6 +32156,13 @@ var LoggingSettingsPatchSchema = zod.z.object({
|
|
|
31829
32156
|
* anyone but its owner.
|
|
31830
32157
|
*/
|
|
31831
32158
|
var ReportedLoadContributionSchema = LoadContributionSchema.extend({ addonId: zod.z.string() });
|
|
32159
|
+
/**
|
|
32160
|
+
* One per-camera failure counter, plus WHO reported it.
|
|
32161
|
+
*
|
|
32162
|
+
* Same rule as {@link ReportedLoadContributionSchema}: `addonId` is stamped by
|
|
32163
|
+
* the hub as it enumerates providers, never by the contributor.
|
|
32164
|
+
*/
|
|
32165
|
+
var ReportedFailureContributionSchema = FailureContributionSchema.extend({ addonId: zod.z.string() });
|
|
31832
32166
|
var GetLoggingSettingsInputSchema = zod.z.object({
|
|
31833
32167
|
scopeNodeId: zod.z.string().optional(),
|
|
31834
32168
|
/**
|
|
@@ -31947,6 +32281,28 @@ var systemCapability = {
|
|
|
31947
32281
|
*/
|
|
31948
32282
|
getLoadContributions: require_sleep.method(zod.z.void(), zod.z.array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }),
|
|
31949
32283
|
/**
|
|
32284
|
+
* Every `failure-contribution` an addon on this cluster reports — per
|
|
32285
|
+
* camera, per reason, **with the denominator attached**.
|
|
32286
|
+
*
|
|
32287
|
+
* This is the surface the operator asked for on 2026-08-28 (*"possiamo
|
|
32288
|
+
* armare questi errori intanto? Così al prossimo giro ricontrolliamo tutti
|
|
32289
|
+
* questi punti"*). Before it, four live failure modes could only be counted
|
|
32290
|
+
* by grepping Loki and hand-correlating timestamps, which is exactly how a
|
|
32291
|
+
* 22% thumbnail gap and a 3-hour media blackout were diagnosed — twice.
|
|
32292
|
+
*
|
|
32293
|
+
* Read it as a RATIO, never as a count. `attempts` is on every entry
|
|
32294
|
+
* because the count on its own lies: `enrichment crop native miss` read as
|
|
32295
|
+
* "35x worse than yesterday" and was flat across twelve hours once divided
|
|
32296
|
+
* by the successes on the same path.
|
|
32297
|
+
*
|
|
32298
|
+
* The counters are CUMULATIVE since each entry's `sinceMs`. Reading does
|
|
32299
|
+
* not reset them, and `sinceMs` changing means the reporting runner
|
|
32300
|
+
* respawned — a consumer differencing two reads drops that interval.
|
|
32301
|
+
*
|
|
32302
|
+
* Admin-only: the rows name cameras and the paths that fail on them.
|
|
32303
|
+
*/
|
|
32304
|
+
getFailureContributions: require_sleep.method(zod.z.void(), zod.z.array(ReportedFailureContributionSchema).readonly(), { auth: "admin" }),
|
|
32305
|
+
/**
|
|
31950
32306
|
* The logging settings document — levels and armed diagnostics — resolved
|
|
31951
32307
|
* for `nodeId`, or for the cluster when `nodeId` is absent.
|
|
31952
32308
|
*
|
|
@@ -36281,6 +36637,7 @@ var CAPABILITY_NAMES = {
|
|
|
36281
36637
|
eventEmitter: "event-emitter",
|
|
36282
36638
|
events: "events",
|
|
36283
36639
|
faceGallery: "face-gallery",
|
|
36640
|
+
failureContribution: "failure-contribution",
|
|
36284
36641
|
fanControl: "fan-control",
|
|
36285
36642
|
featureProbe: "feature-probe",
|
|
36286
36643
|
filesystemBrowse: "filesystem-browse",
|
|
@@ -36606,6 +36963,10 @@ var CAPABILITY_ROUTER_KEYS = [
|
|
|
36606
36963
|
key: "faceGallery",
|
|
36607
36964
|
name: "face-gallery"
|
|
36608
36965
|
},
|
|
36966
|
+
{
|
|
36967
|
+
key: "failureContribution",
|
|
36968
|
+
name: "failure-contribution"
|
|
36969
|
+
},
|
|
36609
36970
|
{
|
|
36610
36971
|
key: "fanControl",
|
|
36611
36972
|
name: "fan-control"
|
|
@@ -37050,6 +37411,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
37050
37411
|
eventEmitterCapability,
|
|
37051
37412
|
eventsCapability,
|
|
37052
37413
|
faceGalleryCapability,
|
|
37414
|
+
failureContributionCapability,
|
|
37053
37415
|
fanControlCapability,
|
|
37054
37416
|
featureProbeCapability,
|
|
37055
37417
|
filesystemBrowseCapability,
|
|
@@ -39056,6 +39418,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
39056
39418
|
addonId: null,
|
|
39057
39419
|
access: "create"
|
|
39058
39420
|
},
|
|
39421
|
+
"failureContribution.list": {
|
|
39422
|
+
capName: "failure-contribution",
|
|
39423
|
+
capScope: "system",
|
|
39424
|
+
addonId: null,
|
|
39425
|
+
access: "view"
|
|
39426
|
+
},
|
|
39059
39427
|
"fanControl.setDirection": {
|
|
39060
39428
|
capName: "fan-control",
|
|
39061
39429
|
capScope: "device",
|
|
@@ -42362,6 +42730,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
42362
42730
|
addonId: null,
|
|
42363
42731
|
access: "create"
|
|
42364
42732
|
},
|
|
42733
|
+
"system.getFailureContributions": {
|
|
42734
|
+
capName: "system",
|
|
42735
|
+
capScope: "system",
|
|
42736
|
+
addonId: null,
|
|
42737
|
+
access: "view"
|
|
42738
|
+
},
|
|
42365
42739
|
"system.getLoadContributions": {
|
|
42366
42740
|
capName: "system",
|
|
42367
42741
|
capScope: "system",
|
|
@@ -43052,6 +43426,7 @@ var KNOWN_CAP_NAMES = [
|
|
|
43052
43426
|
"embedding-encoder",
|
|
43053
43427
|
"events",
|
|
43054
43428
|
"face-gallery",
|
|
43429
|
+
"failure-contribution",
|
|
43055
43430
|
"fan-control",
|
|
43056
43431
|
"filesystem-browse",
|
|
43057
43432
|
"humidifier",
|
|
@@ -43218,6 +43593,7 @@ var SYSTEM_CAP_NAMES = [
|
|
|
43218
43593
|
"device-state",
|
|
43219
43594
|
"embedding-encoder",
|
|
43220
43595
|
"face-gallery",
|
|
43596
|
+
"failure-contribution",
|
|
43221
43597
|
"filesystem-browse",
|
|
43222
43598
|
"integrations",
|
|
43223
43599
|
"llm",
|
|
@@ -46166,6 +46542,7 @@ function createSystemProxy(api) {
|
|
|
46166
46542
|
detectSiteLocation: (input) => dispatch("system", "detectSiteLocation", "mutation", input),
|
|
46167
46543
|
getRequestCensus: (input) => dispatch("system", "getRequestCensus", "query", input),
|
|
46168
46544
|
getLoadContributions: (input) => dispatch("system", "getLoadContributions", "query", input),
|
|
46545
|
+
getFailureContributions: (input) => dispatch("system", "getFailureContributions", "query", input),
|
|
46169
46546
|
getLoggingSettings: (input) => dispatch("system", "getLoggingSettings", "query", input),
|
|
46170
46547
|
setLoggingSettings: (input) => dispatch("system", "setLoggingSettings", "mutation", input)
|
|
46171
46548
|
},
|
|
@@ -50498,6 +50875,9 @@ exports.ExpressionParseError = ExpressionParseError;
|
|
|
50498
50875
|
exports.ExpressionSourceSchema = ExpressionSourceSchema;
|
|
50499
50876
|
exports.FIRST_LEVEL_MACRO_CLASSES = FIRST_LEVEL_MACRO_CLASSES;
|
|
50500
50877
|
exports.FULL_IMAGE_BBOX = FULL_IMAGE_BBOX;
|
|
50878
|
+
exports.FailureContributionSchema = FailureContributionSchema;
|
|
50879
|
+
exports.FailureCounters = FailureCounters;
|
|
50880
|
+
exports.FailureReasonCountSchema = FailureReasonCountSchema;
|
|
50501
50881
|
exports.FanControlStatusSchema = FanControlStatusSchema;
|
|
50502
50882
|
exports.FanDirectionSchema = FanDirectionSchema;
|
|
50503
50883
|
exports.FeatureManifestSchema = FeatureManifestSchema;
|
|
@@ -50613,6 +50993,8 @@ exports.MAX_EXPRESSION_BINDINGS = MAX_EXPRESSION_BINDINGS;
|
|
|
50613
50993
|
exports.MAX_EXPRESSION_CALL_ARGS = MAX_EXPRESSION_CALL_ARGS;
|
|
50614
50994
|
exports.MAX_EXPRESSION_EVAL_STEPS = MAX_EXPRESSION_EVAL_STEPS;
|
|
50615
50995
|
exports.MAX_EXPRESSION_SOURCE_LENGTH = MAX_EXPRESSION_SOURCE_LENGTH;
|
|
50996
|
+
exports.MAX_KEYS = MAX_KEYS;
|
|
50997
|
+
exports.MAX_REASONS_PER_KEY = MAX_REASONS_PER_KEY;
|
|
50616
50998
|
exports.MAX_SENSOR_TRIGGER_DEVICES = MAX_SENSOR_TRIGGER_DEVICES;
|
|
50617
50999
|
exports.METHOD_ACCESS_MAP = METHOD_ACCESS_MAP;
|
|
50618
51000
|
exports.METHOD_DEVICE_SELECTORS = METHOD_DEVICE_SELECTORS;
|
|
@@ -50783,6 +51165,7 @@ exports.NumericSensorStatusSchema = NumericSensorStatusSchema;
|
|
|
50783
51165
|
exports.OPERATOR_WRITTEN_STALE_MS = OPERATOR_WRITTEN_STALE_MS;
|
|
50784
51166
|
exports.OPS_LOG_DEFAULT_LIMIT = OPS_LOG_DEFAULT_LIMIT;
|
|
50785
51167
|
exports.OPS_LOG_RING_DEFAULT_MAX = OPS_LOG_RING_DEFAULT_MAX;
|
|
51168
|
+
exports.OVERFLOW_REASON = OVERFLOW_REASON;
|
|
50786
51169
|
exports.OauthIntegrationDescriptorSchema = OauthIntegrationDescriptorSchema;
|
|
50787
51170
|
exports.ObjectEventSchema = ObjectEventSchema;
|
|
50788
51171
|
exports.OpsLogDomainSchema = OpsLogDomainSchema;
|
|
@@ -50904,6 +51287,7 @@ exports.RelocateJobStateSchema = RelocateJobStateSchema;
|
|
|
50904
51287
|
exports.RelocateMediaInputSchema = RelocateMediaInputSchema;
|
|
50905
51288
|
exports.RenderedAsSchema = RenderedAsSchema;
|
|
50906
51289
|
exports.ReportMotionInputSchema = ReportMotionInputSchema;
|
|
51290
|
+
exports.ReportedFailureContributionSchema = ReportedFailureContributionSchema;
|
|
50907
51291
|
exports.ReportedLoadContributionSchema = ReportedLoadContributionSchema;
|
|
50908
51292
|
exports.RequestCensusGroupSchema = RequestCensusGroupSchema;
|
|
50909
51293
|
exports.RequestCensusProcedureSchema = RequestCensusProcedureSchema;
|
|
@@ -51302,6 +51686,8 @@ exports.expandCapMethods = require_sleep.expandCapMethods;
|
|
|
51302
51686
|
exports.extractNestedAddonId = extractNestedAddonId;
|
|
51303
51687
|
exports.extractSourceInfoFromMetadata = extractSourceInfoFromMetadata;
|
|
51304
51688
|
exports.faceGalleryCapability = faceGalleryCapability;
|
|
51689
|
+
exports.failureContributionCapability = failureContributionCapability;
|
|
51690
|
+
exports.failureRate = failureRate;
|
|
51305
51691
|
exports.fanControlCapability = fanControlCapability;
|
|
51306
51692
|
exports.featureProbeCapability = featureProbeCapability;
|
|
51307
51693
|
exports.filesystemBrowseCapability = filesystemBrowseCapability;
|