@camstack/addon-decoder-ffmpeg 1.2.37 → 1.2.38

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/index.js CHANGED
@@ -13334,6 +13334,114 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
13334
13334
  limit: number().optional(),
13335
13335
  tags: record(string(), string()).optional()
13336
13336
  }), array(LogEntrySchema).readonly());
13337
+ /**
13338
+ * `failure-contribution` — the capability an addon reports its OWN losses
13339
+ * through, per camera, with the denominator attached. It stores nothing.
13340
+ *
13341
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13342
+ *
13343
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13344
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13345
+ * copied: the contributor reports what it already knows, hub-main adds only
13346
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13347
+ * somebody to forget to edit.
13348
+ *
13349
+ * They are not merged, because their invariants are opposites:
13350
+ *
13351
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13352
+ * claim a camera cost nothing, which is a measurement nobody made;
13353
+ * - a `failure-contribution` zero is the **most valuable value on the
13354
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13355
+ * and it is exactly what an absent entry cannot say.
13356
+ *
13357
+ * Putting a loss counter on a cost entry would also break the reconciliation
13358
+ * that gives `load-contribution` its point: contributions are subtracted from
13359
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13360
+ * has no process.
13361
+ *
13362
+ * ## Why not a log line, since the counters already exist
13363
+ *
13364
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13365
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13366
+ * ends in a log line, and a log line is the thing the operator asked to stop
13367
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13368
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13369
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13370
+ * media blackout were both diagnosed. The counters stay; this is where they can
13371
+ * be READ.
13372
+ *
13373
+ * ## The rate is served with its denominator or not at all
13374
+ *
13375
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13376
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13377
+ * than yesterday" and was **flat across twelve hours** once divided by the
13378
+ * successes on the same path. A surface that publishes only the numerator
13379
+ * reproduces that mistake on every read.
13380
+ *
13381
+ * ## Shape
13382
+ *
13383
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13384
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13385
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13386
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13387
+ * a forked runner's entries reach hub-main over transport that already exists.
13388
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13389
+ * result through `system.getFailureContributions`.
13390
+ */
13391
+ var FailureReasonCountSchema = object({
13392
+ /**
13393
+ * Why the attempt did not land, in the contributor's own vocabulary —
13394
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13395
+ * strings that already appear in this repo's logs and, where one exists, the
13396
+ * same string the per-track `previewMissReason` records (D276): a second
13397
+ * vocabulary for the same loss would make the row and the counter
13398
+ * un-joinable.
13399
+ */
13400
+ reason: string(),
13401
+ count: number().int().nonnegative()
13402
+ });
13403
+ var FailureContributionSchema = object({
13404
+ /**
13405
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13406
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13407
+ * `unit` free: the families are owned by different addons and a shared enum
13408
+ * is a central list that rots invisibly.
13409
+ */
13410
+ family: string(),
13411
+ /**
13412
+ * The NUMERIC device id — the same value every log line carries as
13413
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13414
+ * cannot name the camera must not emit the entry, because a fleet total
13415
+ * cannot answer the only question anybody asks of this surface.
13416
+ */
13417
+ deviceId: number().int().positive(),
13418
+ /**
13419
+ * A second dimension inside the family: the model / step id for an inference
13420
+ * timeout, so "which camera AND which model" is one read. Absent when the
13421
+ * family has a single variant.
13422
+ */
13423
+ variant: string().optional(),
13424
+ /**
13425
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13426
+ * differencing two reads must drop the interval when it changes, because the
13427
+ * counter restarted from zero in a respawned runner. Same discipline as
13428
+ * `LoadContribution.startedAtMs`.
13429
+ */
13430
+ sinceMs: number(),
13431
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13432
+ atMs: number(),
13433
+ /**
13434
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13435
+ * window. A failure count published without it is the mistake this schema
13436
+ * exists to make impossible.
13437
+ */
13438
+ attempts: number().int().nonnegative(),
13439
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13440
+ succeeded: number().int().nonnegative(),
13441
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13442
+ reasons: array(FailureReasonCountSchema).readonly()
13443
+ });
13444
+ method(_void(), array(FailureContributionSchema).readonly());
13337
13445
  var LoadContributionSchema = object({
13338
13446
  role: _enum([
13339
13447
  "decode",
@@ -17846,6 +17954,20 @@ var TrackSchema = object({
17846
17954
  * `=== true` and render nothing otherwise — never infer "no rider".
17847
17955
  */
17848
17956
  hasRider: boolean().optional(),
17957
+ /**
17958
+ * WHY this track ended without a NATIVE best-shot tile
17959
+ * ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
17960
+ * a composed token line (`no-key-frame capture=keyframe:native-missx4`,
17961
+ * `derive-returned-null tile=standin`, …) written at close and CLEARED by
17962
+ * the late-keyFrame upgrade when a native tile lands after all. The
17963
+ * operator-facing answer to "perché manca l'immagine?" on a track whose
17964
+ * tile is a face/plate stand-in, a raster crop, or an icon.
17965
+ *
17966
+ * **Absent ≠ "missed silently"**: a row written before the column, a hub
17967
+ * that predates the field, and every track whose tile landed native all
17968
+ * omit it. Render nothing when absent.
17969
+ */
17970
+ previewMissReason: string().optional(),
17849
17971
  ...TrackFlagFields,
17850
17972
  ...TrackRetrainFields
17851
17973
  });
@@ -27072,6 +27194,13 @@ var LoggingSettingsPatchSchema = object({
27072
27194
  * anyone but its owner.
27073
27195
  */
27074
27196
  var ReportedLoadContributionSchema = LoadContributionSchema.extend({ addonId: string() });
27197
+ /**
27198
+ * One per-camera failure counter, plus WHO reported it.
27199
+ *
27200
+ * Same rule as {@link ReportedLoadContributionSchema}: `addonId` is stamped by
27201
+ * the hub as it enumerates providers, never by the contributor.
27202
+ */
27203
+ var ReportedFailureContributionSchema = FailureContributionSchema.extend({ addonId: string() });
27075
27204
  var GetLoggingSettingsInputSchema = object({
27076
27205
  scopeNodeId: string().optional(),
27077
27206
  /**
@@ -27130,7 +27259,7 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
27130
27259
  }), method(_void(), SiteLocationStatusSchema, {
27131
27260
  kind: "mutation",
27132
27261
  auth: "admin"
27133
- }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
27262
+ }), 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, {
27134
27263
  kind: "mutation",
27135
27264
  auth: "admin"
27136
27265
  });
@@ -29712,6 +29841,12 @@ Object.freeze({
29712
29841
  addonId: null,
29713
29842
  access: "create"
29714
29843
  },
29844
+ "failureContribution.list": {
29845
+ capName: "failure-contribution",
29846
+ capScope: "system",
29847
+ addonId: null,
29848
+ access: "view"
29849
+ },
29715
29850
  "fanControl.setDirection": {
29716
29851
  capName: "fan-control",
29717
29852
  capScope: "device",
@@ -33018,6 +33153,12 @@ Object.freeze({
33018
33153
  addonId: null,
33019
33154
  access: "create"
33020
33155
  },
33156
+ "system.getFailureContributions": {
33157
+ capName: "system",
33158
+ capScope: "system",
33159
+ addonId: null,
33160
+ access: "view"
33161
+ },
33021
33162
  "system.getLoadContributions": {
33022
33163
  capName: "system",
33023
33164
  capScope: "system",
package/dist/index.mjs CHANGED
@@ -13330,6 +13330,114 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
13330
13330
  limit: number().optional(),
13331
13331
  tags: record(string(), string()).optional()
13332
13332
  }), array(LogEntrySchema).readonly());
13333
+ /**
13334
+ * `failure-contribution` — the capability an addon reports its OWN losses
13335
+ * through, per camera, with the denominator attached. It stores nothing.
13336
+ *
13337
+ * ## The twin of `load-contribution`, and why it is a twin and not a field
13338
+ *
13339
+ * `load-contribution` answers *what did this camera COST*. This answers *what
13340
+ * did this camera LOSE*. The reporting discipline is identical and deliberately
13341
+ * copied: the contributor reports what it already knows, hub-main adds only
13342
+ * `addonId`, nothing needs global knowledge, and there is no central list for
13343
+ * somebody to forget to edit.
13344
+ *
13345
+ * They are not merged, because their invariants are opposites:
13346
+ *
13347
+ * - a `load-contribution` measurement is **absent, never zero** — a zero would
13348
+ * claim a camera cost nothing, which is a measurement nobody made;
13349
+ * - a `failure-contribution` zero is the **most valuable value on the
13350
+ * surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
13351
+ * and it is exactly what an absent entry cannot say.
13352
+ *
13353
+ * Putting a loss counter on a cost entry would also break the reconciliation
13354
+ * that gives `load-contribution` its point: contributions are subtracted from
13355
+ * `metrics.node-processes-snapshot` to find processes nobody claims. A failure
13356
+ * has no process.
13357
+ *
13358
+ * ## Why not a log line, since the counters already exist
13359
+ *
13360
+ * Several of these paths already counted themselves — `CaptureScheduler`'s
13361
+ * per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
13362
+ * ends in a log line, and a log line is the thing the operator asked to stop
13363
+ * needing: *"possiamo armare questi errori intanto? Così al prossimo giro
13364
+ * ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
13365
+ * hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
13366
+ * media blackout were both diagnosed. The counters stay; this is where they can
13367
+ * be READ.
13368
+ *
13369
+ * ## The rate is served with its denominator or not at all
13370
+ *
13371
+ * Every entry carries `attempts` and `succeeded`. A miss count alone is
13372
+ * unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
13373
+ * than yesterday" and was **flat across twelve hours** once divided by the
13374
+ * successes on the same path. A surface that publishes only the numerator
13375
+ * reproduces that mistake on every read.
13376
+ *
13377
+ * ## Shape
13378
+ *
13379
+ * Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
13380
+ * `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
13381
+ * generated hooks, while `addons.listCapabilityProviders` still enumerates it
13382
+ * and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
13383
+ * a forked runner's entries reach hub-main over transport that already exists.
13384
+ * No new UDS message, no second registry (D3). The operator reads the assembled
13385
+ * result through `system.getFailureContributions`.
13386
+ */
13387
+ var FailureReasonCountSchema = object({
13388
+ /**
13389
+ * Why the attempt did not land, in the contributor's own vocabulary —
13390
+ * `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
13391
+ * strings that already appear in this repo's logs and, where one exists, the
13392
+ * same string the per-track `previewMissReason` records (D276): a second
13393
+ * vocabulary for the same loss would make the row and the counter
13394
+ * un-joinable.
13395
+ */
13396
+ reason: string(),
13397
+ count: number().int().nonnegative()
13398
+ });
13399
+ var FailureContributionSchema = object({
13400
+ /**
13401
+ * The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
13402
+ * `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
13403
+ * `unit` free: the families are owned by different addons and a shared enum
13404
+ * is a central list that rots invisibly.
13405
+ */
13406
+ family: string(),
13407
+ /**
13408
+ * The NUMERIC device id — the same value every log line carries as
13409
+ * `tags.deviceId`. Never nullable and never absent: a contributor that
13410
+ * cannot name the camera must not emit the entry, because a fleet total
13411
+ * cannot answer the only question anybody asks of this surface.
13412
+ */
13413
+ deviceId: number().int().positive(),
13414
+ /**
13415
+ * A second dimension inside the family: the model / step id for an inference
13416
+ * timeout, so "which camera AND which model" is one read. Absent when the
13417
+ * family has a single variant.
13418
+ */
13419
+ variant: string().optional(),
13420
+ /**
13421
+ * Epoch ms this counter started — the INCARNATION MARKER. A consumer
13422
+ * differencing two reads must drop the interval when it changes, because the
13423
+ * counter restarted from zero in a respawned runner. Same discipline as
13424
+ * `LoadContribution.startedAtMs`.
13425
+ */
13426
+ sinceMs: number(),
13427
+ /** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
13428
+ atMs: number(),
13429
+ /**
13430
+ * THE DENOMINATOR — every attempt on this path for this camera in the
13431
+ * window. A failure count published without it is the mistake this schema
13432
+ * exists to make impossible.
13433
+ */
13434
+ attempts: number().int().nonnegative(),
13435
+ /** Attempts that landed. `attempts - succeeded` is the loss. */
13436
+ succeeded: number().int().nonnegative(),
13437
+ /** The loss, partitioned. Sums to `attempts - succeeded`. */
13438
+ reasons: array(FailureReasonCountSchema).readonly()
13439
+ });
13440
+ method(_void(), array(FailureContributionSchema).readonly());
13333
13441
  var LoadContributionSchema = object({
13334
13442
  role: _enum([
13335
13443
  "decode",
@@ -17842,6 +17950,20 @@ var TrackSchema = object({
17842
17950
  * `=== true` and render nothing otherwise — never infer "no rider".
17843
17951
  */
17844
17952
  hasRider: boolean().optional(),
17953
+ /**
17954
+ * WHY this track ended without a NATIVE best-shot tile
17955
+ * ([D276](../decisions/adr-0276-a-stand-in-tile-is-provisional-and-a-close-says-why.md)) —
17956
+ * a composed token line (`no-key-frame capture=keyframe:native-missx4`,
17957
+ * `derive-returned-null tile=standin`, …) written at close and CLEARED by
17958
+ * the late-keyFrame upgrade when a native tile lands after all. The
17959
+ * operator-facing answer to "perché manca l'immagine?" on a track whose
17960
+ * tile is a face/plate stand-in, a raster crop, or an icon.
17961
+ *
17962
+ * **Absent ≠ "missed silently"**: a row written before the column, a hub
17963
+ * that predates the field, and every track whose tile landed native all
17964
+ * omit it. Render nothing when absent.
17965
+ */
17966
+ previewMissReason: string().optional(),
17845
17967
  ...TrackFlagFields,
17846
17968
  ...TrackRetrainFields
17847
17969
  });
@@ -27068,6 +27190,13 @@ var LoggingSettingsPatchSchema = object({
27068
27190
  * anyone but its owner.
27069
27191
  */
27070
27192
  var ReportedLoadContributionSchema = LoadContributionSchema.extend({ addonId: string() });
27193
+ /**
27194
+ * One per-camera failure counter, plus WHO reported it.
27195
+ *
27196
+ * Same rule as {@link ReportedLoadContributionSchema}: `addonId` is stamped by
27197
+ * the hub as it enumerates providers, never by the contributor.
27198
+ */
27199
+ var ReportedFailureContributionSchema = FailureContributionSchema.extend({ addonId: string() });
27071
27200
  var GetLoggingSettingsInputSchema = object({
27072
27201
  scopeNodeId: string().optional(),
27073
27202
  /**
@@ -27126,7 +27255,7 @@ method(_void(), FeatureManifestSchema), method(_void(), HealthStatusSchema), met
27126
27255
  }), method(_void(), SiteLocationStatusSchema, {
27127
27256
  kind: "mutation",
27128
27257
  auth: "admin"
27129
- }), method(_void(), RequestCensusStatusSchema, { auth: "admin" }), method(_void(), array(ReportedLoadContributionSchema).readonly(), { auth: "admin" }), method(GetLoggingSettingsInputSchema, LoggingSettingsStateSchema, { auth: "admin" }), method(SetLoggingSettingsInputSchema, LoggingSettingsStateSchema, {
27258
+ }), 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, {
27130
27259
  kind: "mutation",
27131
27260
  auth: "admin"
27132
27261
  });
@@ -29708,6 +29837,12 @@ Object.freeze({
29708
29837
  addonId: null,
29709
29838
  access: "create"
29710
29839
  },
29840
+ "failureContribution.list": {
29841
+ capName: "failure-contribution",
29842
+ capScope: "system",
29843
+ addonId: null,
29844
+ access: "view"
29845
+ },
29711
29846
  "fanControl.setDirection": {
29712
29847
  capName: "fan-control",
29713
29848
  capScope: "device",
@@ -33014,6 +33149,12 @@ Object.freeze({
33014
33149
  addonId: null,
33015
33150
  access: "create"
33016
33151
  },
33152
+ "system.getFailureContributions": {
33153
+ capName: "system",
33154
+ capScope: "system",
33155
+ addonId: null,
33156
+ access: "view"
33157
+ },
33017
33158
  "system.getLoadContributions": {
33018
33159
  capName: "system",
33019
33160
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-decoder-ffmpeg",
3
- "version": "1.2.37",
3
+ "version": "1.2.38",
4
4
  "description": "Standalone ffmpeg-subprocess decoder fallback addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",