@camstack/addon-import-alexa 0.2.45 → 0.2.47
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 +331 -174
- package/dist/addon.mjs +331 -174
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -13427,6 +13427,114 @@ method(object({
|
|
|
13427
13427
|
height: number()
|
|
13428
13428
|
}), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
|
|
13429
13429
|
/**
|
|
13430
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
13431
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
13432
|
+
*
|
|
13433
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
13434
|
+
*
|
|
13435
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
13436
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
13437
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
13438
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
13439
|
+
* somebody to forget to edit.
|
|
13440
|
+
*
|
|
13441
|
+
* They are not merged, because their invariants are opposites:
|
|
13442
|
+
*
|
|
13443
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
13444
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
13445
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
13446
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
13447
|
+
* and it is exactly what an absent entry cannot say.
|
|
13448
|
+
*
|
|
13449
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
13450
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
13451
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
13452
|
+
* has no process.
|
|
13453
|
+
*
|
|
13454
|
+
* ## Why not a log line, since the counters already exist
|
|
13455
|
+
*
|
|
13456
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
13457
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
13458
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
13459
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
13460
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
13461
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
13462
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
13463
|
+
* be READ.
|
|
13464
|
+
*
|
|
13465
|
+
* ## The rate is served with its denominator or not at all
|
|
13466
|
+
*
|
|
13467
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
13468
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
13469
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
13470
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
13471
|
+
* reproduces that mistake on every read.
|
|
13472
|
+
*
|
|
13473
|
+
* ## Shape
|
|
13474
|
+
*
|
|
13475
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
13476
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
13477
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
13478
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
13479
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
13480
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
13481
|
+
* result through `system.getFailureContributions`.
|
|
13482
|
+
*/
|
|
13483
|
+
var FailureReasonCountSchema = object({
|
|
13484
|
+
/**
|
|
13485
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
13486
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
13487
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
13488
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
13489
|
+
* vocabulary for the same loss would make the row and the counter
|
|
13490
|
+
* un-joinable.
|
|
13491
|
+
*/
|
|
13492
|
+
reason: string(),
|
|
13493
|
+
count: number().int().nonnegative()
|
|
13494
|
+
});
|
|
13495
|
+
var FailureContributionSchema = object({
|
|
13496
|
+
/**
|
|
13497
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
13498
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
13499
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
13500
|
+
* is a central list that rots invisibly.
|
|
13501
|
+
*/
|
|
13502
|
+
family: string(),
|
|
13503
|
+
/**
|
|
13504
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
13505
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
13506
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
13507
|
+
* cannot answer the only question anybody asks of this surface.
|
|
13508
|
+
*/
|
|
13509
|
+
deviceId: number().int().positive(),
|
|
13510
|
+
/**
|
|
13511
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
13512
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
13513
|
+
* family has a single variant.
|
|
13514
|
+
*/
|
|
13515
|
+
variant: string().optional(),
|
|
13516
|
+
/**
|
|
13517
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
13518
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
13519
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
13520
|
+
* `LoadContribution.startedAtMs`.
|
|
13521
|
+
*/
|
|
13522
|
+
sinceMs: number(),
|
|
13523
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
13524
|
+
atMs: number(),
|
|
13525
|
+
/**
|
|
13526
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
13527
|
+
* window. A failure count published without it is the mistake this schema
|
|
13528
|
+
* exists to make impossible.
|
|
13529
|
+
*/
|
|
13530
|
+
attempts: number().int().nonnegative(),
|
|
13531
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
13532
|
+
succeeded: number().int().nonnegative(),
|
|
13533
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
13534
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
13535
|
+
});
|
|
13536
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
13537
|
+
/**
|
|
13430
13538
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
13431
13539
|
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
13432
13540
|
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
@@ -13948,6 +14056,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13948
14056
|
kind: "mutation",
|
|
13949
14057
|
auth: "admin"
|
|
13950
14058
|
});
|
|
14059
|
+
var LoadContributionSchema = object({
|
|
14060
|
+
role: _enum([
|
|
14061
|
+
"decode",
|
|
14062
|
+
"transcode",
|
|
14063
|
+
"recording",
|
|
14064
|
+
"streaming",
|
|
14065
|
+
"detection"
|
|
14066
|
+
]),
|
|
14067
|
+
/**
|
|
14068
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
14069
|
+
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14070
|
+
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14071
|
+
* contributor that cannot name its camera must not emit the entry at all,
|
|
14072
|
+
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14073
|
+
* and would quietly turn one camera's cost into everybody's.
|
|
14074
|
+
*/
|
|
14075
|
+
deviceId: number().int().positive().nullable(),
|
|
14076
|
+
attribution: _enum([
|
|
14077
|
+
"measured",
|
|
14078
|
+
"accounted",
|
|
14079
|
+
"unattributable"
|
|
14080
|
+
]),
|
|
14081
|
+
/**
|
|
14082
|
+
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14083
|
+
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14084
|
+
* family and inventing a common one would lose the only information that
|
|
14085
|
+
* makes two entries for the same camera distinguishable.
|
|
14086
|
+
*/
|
|
14087
|
+
unit: string(),
|
|
14088
|
+
/**
|
|
14089
|
+
* The OS process this cost lives in, when there is one. Present so a
|
|
14090
|
+
* consumer can (a) tell two generations of the same unit apart across a
|
|
14091
|
+
* restart, and (b) subtract claimed processes from the node's process
|
|
14092
|
+
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14093
|
+
* process of its own.
|
|
14094
|
+
*/
|
|
14095
|
+
pid: number().int().positive().optional(),
|
|
14096
|
+
/**
|
|
14097
|
+
* When this generation started. The pid's incarnation marker: a consumer
|
|
14098
|
+
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14099
|
+
* window when this changes, because the counter restarted from zero in a new
|
|
14100
|
+
* process.
|
|
14101
|
+
*/
|
|
14102
|
+
startedAtMs: number().optional(),
|
|
14103
|
+
/**
|
|
14104
|
+
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14105
|
+
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14106
|
+
* contribution is asked for.
|
|
14107
|
+
*
|
|
14108
|
+
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14109
|
+
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14110
|
+
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14111
|
+
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14112
|
+
*
|
|
14113
|
+
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14114
|
+
* an entry with no process.
|
|
14115
|
+
*/
|
|
14116
|
+
cpuSeconds: number().optional(),
|
|
14117
|
+
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14118
|
+
rssBytes: number().optional()
|
|
14119
|
+
});
|
|
14120
|
+
method(_void(), array(LoadContributionSchema).readonly());
|
|
13951
14121
|
/**
|
|
13952
14122
|
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13953
14123
|
* through. It stores nothing.
|
|
@@ -14024,176 +14194,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14024
14194
|
tags: record(string(), string()).optional()
|
|
14025
14195
|
}), array(LogEntrySchema).readonly());
|
|
14026
14196
|
/**
|
|
14027
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14028
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
14029
|
-
*
|
|
14030
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14031
|
-
*
|
|
14032
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14033
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14034
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14035
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14036
|
-
* somebody to forget to edit.
|
|
14037
|
-
*
|
|
14038
|
-
* They are not merged, because their invariants are opposites:
|
|
14039
|
-
*
|
|
14040
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14041
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14042
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14043
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14044
|
-
* and it is exactly what an absent entry cannot say.
|
|
14045
|
-
*
|
|
14046
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14047
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14048
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14049
|
-
* has no process.
|
|
14050
|
-
*
|
|
14051
|
-
* ## Why not a log line, since the counters already exist
|
|
14052
|
-
*
|
|
14053
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14054
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14055
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14056
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14057
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14058
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14059
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14060
|
-
* be READ.
|
|
14061
|
-
*
|
|
14062
|
-
* ## The rate is served with its denominator or not at all
|
|
14063
|
-
*
|
|
14064
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14065
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14066
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14067
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
14068
|
-
* reproduces that mistake on every read.
|
|
14069
|
-
*
|
|
14070
|
-
* ## Shape
|
|
14071
|
-
*
|
|
14072
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14073
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14074
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14075
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14076
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14077
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14078
|
-
* result through `system.getFailureContributions`.
|
|
14079
|
-
*/
|
|
14080
|
-
var FailureReasonCountSchema = object({
|
|
14081
|
-
/**
|
|
14082
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14083
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14084
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
14085
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
14086
|
-
* vocabulary for the same loss would make the row and the counter
|
|
14087
|
-
* un-joinable.
|
|
14088
|
-
*/
|
|
14089
|
-
reason: string(),
|
|
14090
|
-
count: number().int().nonnegative()
|
|
14091
|
-
});
|
|
14092
|
-
var FailureContributionSchema = object({
|
|
14093
|
-
/**
|
|
14094
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14095
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14096
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
14097
|
-
* is a central list that rots invisibly.
|
|
14098
|
-
*/
|
|
14099
|
-
family: string(),
|
|
14100
|
-
/**
|
|
14101
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14102
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14103
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
14104
|
-
* cannot answer the only question anybody asks of this surface.
|
|
14105
|
-
*/
|
|
14106
|
-
deviceId: number().int().positive(),
|
|
14107
|
-
/**
|
|
14108
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
14109
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14110
|
-
* family has a single variant.
|
|
14111
|
-
*/
|
|
14112
|
-
variant: string().optional(),
|
|
14113
|
-
/**
|
|
14114
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14115
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
14116
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14117
|
-
* `LoadContribution.startedAtMs`.
|
|
14118
|
-
*/
|
|
14119
|
-
sinceMs: number(),
|
|
14120
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14121
|
-
atMs: number(),
|
|
14122
|
-
/**
|
|
14123
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14124
|
-
* window. A failure count published without it is the mistake this schema
|
|
14125
|
-
* exists to make impossible.
|
|
14126
|
-
*/
|
|
14127
|
-
attempts: number().int().nonnegative(),
|
|
14128
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14129
|
-
succeeded: number().int().nonnegative(),
|
|
14130
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14131
|
-
reasons: array(FailureReasonCountSchema).readonly()
|
|
14132
|
-
});
|
|
14133
|
-
method(_void(), array(FailureContributionSchema).readonly());
|
|
14134
|
-
var LoadContributionSchema = object({
|
|
14135
|
-
role: _enum([
|
|
14136
|
-
"decode",
|
|
14137
|
-
"transcode",
|
|
14138
|
-
"recording",
|
|
14139
|
-
"streaming",
|
|
14140
|
-
"detection"
|
|
14141
|
-
]),
|
|
14142
|
-
/**
|
|
14143
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14144
|
-
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14145
|
-
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14146
|
-
* contributor that cannot name its camera must not emit the entry at all,
|
|
14147
|
-
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14148
|
-
* and would quietly turn one camera's cost into everybody's.
|
|
14149
|
-
*/
|
|
14150
|
-
deviceId: number().int().positive().nullable(),
|
|
14151
|
-
attribution: _enum([
|
|
14152
|
-
"measured",
|
|
14153
|
-
"accounted",
|
|
14154
|
-
"unattributable"
|
|
14155
|
-
]),
|
|
14156
|
-
/**
|
|
14157
|
-
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14158
|
-
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14159
|
-
* family and inventing a common one would lose the only information that
|
|
14160
|
-
* makes two entries for the same camera distinguishable.
|
|
14161
|
-
*/
|
|
14162
|
-
unit: string(),
|
|
14163
|
-
/**
|
|
14164
|
-
* The OS process this cost lives in, when there is one. Present so a
|
|
14165
|
-
* consumer can (a) tell two generations of the same unit apart across a
|
|
14166
|
-
* restart, and (b) subtract claimed processes from the node's process
|
|
14167
|
-
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14168
|
-
* process of its own.
|
|
14169
|
-
*/
|
|
14170
|
-
pid: number().int().positive().optional(),
|
|
14171
|
-
/**
|
|
14172
|
-
* When this generation started. The pid's incarnation marker: a consumer
|
|
14173
|
-
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14174
|
-
* window when this changes, because the counter restarted from zero in a new
|
|
14175
|
-
* process.
|
|
14176
|
-
*/
|
|
14177
|
-
startedAtMs: number().optional(),
|
|
14178
|
-
/**
|
|
14179
|
-
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14180
|
-
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14181
|
-
* contribution is asked for.
|
|
14182
|
-
*
|
|
14183
|
-
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14184
|
-
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14185
|
-
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14186
|
-
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14187
|
-
*
|
|
14188
|
-
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14189
|
-
* an entry with no process.
|
|
14190
|
-
*/
|
|
14191
|
-
cpuSeconds: number().optional(),
|
|
14192
|
-
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14193
|
-
rssBytes: number().optional()
|
|
14194
|
-
});
|
|
14195
|
-
method(_void(), array(LoadContributionSchema).readonly());
|
|
14196
|
-
/**
|
|
14197
14197
|
* `login-method` — collection cap through which auth addons contribute
|
|
14198
14198
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
14199
14199
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
@@ -18931,12 +18931,53 @@ var MediaFileKindEnum = _enum([
|
|
|
18931
18931
|
"keyFrameSmall",
|
|
18932
18932
|
"thumbnailSmall"
|
|
18933
18933
|
]);
|
|
18934
|
+
/**
|
|
18935
|
+
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
18936
|
+
* ARE — never the bytes themselves.
|
|
18937
|
+
*
|
|
18938
|
+
* ## Why `url` and not `base64`
|
|
18939
|
+
*
|
|
18940
|
+
* Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
|
|
18941
|
+
* with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
|
|
18942
|
+
* was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
|
|
18943
|
+
* wire. Forty events is ~144 MB. Every byte of it was read off disk,
|
|
18944
|
+
* base64-encoded, held whole in a unary tRPC envelope, and materialised in
|
|
18945
|
+
* hub-main's heap on the way past — for an `<img>` that would have cached it.
|
|
18946
|
+
*
|
|
18947
|
+
* `url` points at the `event-media` data plane
|
|
18948
|
+
* (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
|
|
18949
|
+
* with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
|
|
18950
|
+
* render a `?variant=thumb`, and streams. The hub gate in front of it requires
|
|
18951
|
+
* a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
|
|
18952
|
+
* no less protected than they were inside a `view`-level cap response — see
|
|
18953
|
+
* `data-plane-access.ts` for the rule and the one gap it does not close
|
|
18954
|
+
* (per-device scoping).
|
|
18955
|
+
*
|
|
18956
|
+
* The URL is built from the row's **stored** key, which is not always its
|
|
18957
|
+
* published `kind`: a track's face/plate crop is stored as `crop` under
|
|
18958
|
+
* `('face'|'plate', '<prefix>-<trackId>')` and published as
|
|
18959
|
+
* `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
|
|
18960
|
+
*
|
|
18961
|
+
* ## `base64` is TRANSITIONAL and is going away
|
|
18962
|
+
*
|
|
18963
|
+
* It is still populated for one reason: the deployed viewer's track-detail
|
|
18964
|
+
* HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
|
|
18965
|
+
* REQUIRES the field), and a row without it parses as a FAILED read — the red
|
|
18966
|
+
* triangle — not as absence. Removing the field before that viewer ships is an
|
|
18967
|
+
* outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
|
|
18968
|
+
* delete this line and the `withBytes` pass-through in
|
|
18969
|
+
* `analytics-query-facade.ts`; nothing else reads it.
|
|
18970
|
+
*/
|
|
18934
18971
|
var MediaFileSchema = object({
|
|
18935
18972
|
key: string(),
|
|
18936
18973
|
kind: MediaFileKindEnum,
|
|
18937
|
-
base64: string(),
|
|
18938
18974
|
sizeBytes: number(),
|
|
18939
18975
|
timestamp: number()
|
|
18976
|
+
}).extend({
|
|
18977
|
+
/** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
|
|
18978
|
+
url: string(),
|
|
18979
|
+
/** @deprecated Transitional — see the schema docblock. Use {@link url}. */
|
|
18980
|
+
base64: string()
|
|
18940
18981
|
});
|
|
18941
18982
|
/**
|
|
18942
18983
|
* One media row WITHOUT its bytes.
|
|
@@ -18948,7 +18989,9 @@ var MediaFileSchema = object({
|
|
|
18948
18989
|
* blocks the whole view.
|
|
18949
18990
|
*
|
|
18950
18991
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
18951
|
-
* stored blob and a `?variant=thumb` rendering without fetching either
|
|
18992
|
+
* stored blob and a `?variant=thumb` rendering without fetching either, and
|
|
18993
|
+
* `url` because a client that had to build the plane path itself is a second
|
|
18994
|
+
* copy of a route — the embed, the viewer and the admin UI each grew one.
|
|
18952
18995
|
*/
|
|
18953
18996
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
18954
18997
|
/**
|
|
@@ -19295,6 +19338,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19295
19338
|
totalBytes: number().int(),
|
|
19296
19339
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19297
19340
|
});
|
|
19341
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19342
|
+
var EventMediaKindFootprintSchema = object({
|
|
19343
|
+
kind: MediaFileKindEnum,
|
|
19344
|
+
/** Media rows of this kind. */
|
|
19345
|
+
rows: number().int(),
|
|
19346
|
+
/** Bytes on disk held by those rows. */
|
|
19347
|
+
bytes: number().int()
|
|
19348
|
+
});
|
|
19349
|
+
/**
|
|
19350
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19351
|
+
* actually turns on.
|
|
19352
|
+
*
|
|
19353
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19354
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19355
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19356
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19357
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19358
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19359
|
+
*
|
|
19360
|
+
* ## Why `unaccounted*` exists
|
|
19361
|
+
*
|
|
19362
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19363
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19364
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19365
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19366
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19367
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19368
|
+
* against a denominator smaller than the disk.
|
|
19369
|
+
*
|
|
19370
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19371
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19372
|
+
*/
|
|
19373
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19374
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19375
|
+
totalRows: number().int(),
|
|
19376
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19377
|
+
totalBytes: number().int(),
|
|
19378
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19379
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19380
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19381
|
+
unaccountedRows: number().int(),
|
|
19382
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19383
|
+
unaccountedBytes: number().int()
|
|
19384
|
+
});
|
|
19298
19385
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19299
19386
|
var EventPruneCountsSchema = object({
|
|
19300
19387
|
motion: number().int(),
|
|
@@ -19498,6 +19585,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19498
19585
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19499
19586
|
kind: "query",
|
|
19500
19587
|
auth: "admin"
|
|
19588
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19589
|
+
kind: "query",
|
|
19590
|
+
auth: "admin"
|
|
19501
19591
|
}), method(object({
|
|
19502
19592
|
olderThanMs: number(),
|
|
19503
19593
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -19637,6 +19727,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19637
19727
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
19638
19728
|
trackId: string(),
|
|
19639
19729
|
deviceId: number()
|
|
19730
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
19731
|
+
eventId: string(),
|
|
19732
|
+
deviceId: number()
|
|
19640
19733
|
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
19641
19734
|
kind: "mutation",
|
|
19642
19735
|
auth: "admin"
|
|
@@ -21446,6 +21539,20 @@ method(object({
|
|
|
21446
21539
|
error: string().optional()
|
|
21447
21540
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21448
21541
|
providerId: string(),
|
|
21542
|
+
/**
|
|
21543
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21544
|
+
*
|
|
21545
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21546
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21547
|
+
* credential the operator did not retype — and posting that here
|
|
21548
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21549
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21550
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21551
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21552
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21553
|
+
* every value was typed just now and nothing is stored yet.
|
|
21554
|
+
*/
|
|
21555
|
+
locationId: string().optional(),
|
|
21449
21556
|
config: record(string(), unknown())
|
|
21450
21557
|
}), object({
|
|
21451
21558
|
ok: boolean(),
|
|
@@ -24644,10 +24751,24 @@ var FaceClusterSchema = object({
|
|
|
24644
24751
|
size: number().int(),
|
|
24645
24752
|
cohesion: number()
|
|
24646
24753
|
});
|
|
24754
|
+
/**
|
|
24755
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
24756
|
+
* are — never the bytes.
|
|
24757
|
+
*
|
|
24758
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
24759
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
24760
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
24761
|
+
* caller is the admin UI's detail modal, which was building
|
|
24762
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
24763
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
24764
|
+
*
|
|
24765
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
24766
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
24767
|
+
*/
|
|
24647
24768
|
var MediaFileLiteSchema$1 = object({
|
|
24648
24769
|
key: string(),
|
|
24649
24770
|
kind: string(),
|
|
24650
|
-
|
|
24771
|
+
url: string(),
|
|
24651
24772
|
sizeBytes: number(),
|
|
24652
24773
|
timestamp: number()
|
|
24653
24774
|
});
|
|
@@ -27669,10 +27790,24 @@ var PlateInfoSchema = object({
|
|
|
27669
27790
|
*/
|
|
27670
27791
|
cropUrl: string().optional()
|
|
27671
27792
|
});
|
|
27793
|
+
/**
|
|
27794
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
27795
|
+
* are — never the bytes.
|
|
27796
|
+
*
|
|
27797
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
27798
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
27799
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
27800
|
+
* caller is the admin UI's detail modal, which was building
|
|
27801
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
27802
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
27803
|
+
*
|
|
27804
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
27805
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
27806
|
+
*/
|
|
27672
27807
|
var MediaFileLiteSchema = object({
|
|
27673
27808
|
key: string(),
|
|
27674
27809
|
kind: string(),
|
|
27675
|
-
|
|
27810
|
+
url: string(),
|
|
27676
27811
|
sizeBytes: number(),
|
|
27677
27812
|
timestamp: number()
|
|
27678
27813
|
});
|
|
@@ -35473,6 +35608,12 @@ Object.freeze({
|
|
|
35473
35608
|
addonId: null,
|
|
35474
35609
|
access: "view"
|
|
35475
35610
|
},
|
|
35611
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35612
|
+
capName: "pipeline-analytics",
|
|
35613
|
+
capScope: "device",
|
|
35614
|
+
addonId: null,
|
|
35615
|
+
access: "view"
|
|
35616
|
+
},
|
|
35476
35617
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35477
35618
|
capName: "pipeline-analytics",
|
|
35478
35619
|
capScope: "device",
|
|
@@ -35569,6 +35710,12 @@ Object.freeze({
|
|
|
35569
35710
|
addonId: null,
|
|
35570
35711
|
access: "view"
|
|
35571
35712
|
},
|
|
35713
|
+
"pipelineAnalytics.listEventMedia": {
|
|
35714
|
+
capName: "pipeline-analytics",
|
|
35715
|
+
capScope: "device",
|
|
35716
|
+
addonId: null,
|
|
35717
|
+
access: "view"
|
|
35718
|
+
},
|
|
35572
35719
|
"pipelineAnalytics.listGroups": {
|
|
35573
35720
|
capName: "pipeline-analytics",
|
|
35574
35721
|
capScope: "device",
|
|
@@ -39132,6 +39279,11 @@ Object.freeze({
|
|
|
39132
39279
|
form: "single",
|
|
39133
39280
|
optional: false
|
|
39134
39281
|
}],
|
|
39282
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39283
|
+
name: "deviceId",
|
|
39284
|
+
form: "single",
|
|
39285
|
+
optional: true
|
|
39286
|
+
}],
|
|
39135
39287
|
"pipelineAnalytics.getGroup": [{
|
|
39136
39288
|
name: "deviceId",
|
|
39137
39289
|
form: "single",
|
|
@@ -39192,6 +39344,11 @@ Object.freeze({
|
|
|
39192
39344
|
form: "array",
|
|
39193
39345
|
optional: false
|
|
39194
39346
|
}],
|
|
39347
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
39348
|
+
name: "deviceId",
|
|
39349
|
+
form: "single",
|
|
39350
|
+
optional: false
|
|
39351
|
+
}],
|
|
39195
39352
|
"pipelineAnalytics.listGroups": [{
|
|
39196
39353
|
name: "deviceIds",
|
|
39197
39354
|
form: "array",
|
package/dist/addon.mjs
CHANGED
|
@@ -13427,6 +13427,114 @@ method(object({
|
|
|
13427
13427
|
height: number()
|
|
13428
13428
|
}), EmbeddingResultSchema, { auth: "admin" }), method(object({ text: string() }), EmbeddingResultSchema, { auth: "admin" }), method(_void(), EmbeddingInfoSchema, { auth: "admin" });
|
|
13429
13429
|
/**
|
|
13430
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
13431
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
13432
|
+
*
|
|
13433
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
13434
|
+
*
|
|
13435
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
13436
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
13437
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
13438
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
13439
|
+
* somebody to forget to edit.
|
|
13440
|
+
*
|
|
13441
|
+
* They are not merged, because their invariants are opposites:
|
|
13442
|
+
*
|
|
13443
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
13444
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
13445
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
13446
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
13447
|
+
* and it is exactly what an absent entry cannot say.
|
|
13448
|
+
*
|
|
13449
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
13450
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
13451
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
13452
|
+
* has no process.
|
|
13453
|
+
*
|
|
13454
|
+
* ## Why not a log line, since the counters already exist
|
|
13455
|
+
*
|
|
13456
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
13457
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
13458
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
13459
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
13460
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
13461
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
13462
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
13463
|
+
* be READ.
|
|
13464
|
+
*
|
|
13465
|
+
* ## The rate is served with its denominator or not at all
|
|
13466
|
+
*
|
|
13467
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
13468
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
13469
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
13470
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
13471
|
+
* reproduces that mistake on every read.
|
|
13472
|
+
*
|
|
13473
|
+
* ## Shape
|
|
13474
|
+
*
|
|
13475
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
13476
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
13477
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
13478
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
13479
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
13480
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
13481
|
+
* result through `system.getFailureContributions`.
|
|
13482
|
+
*/
|
|
13483
|
+
var FailureReasonCountSchema = object({
|
|
13484
|
+
/**
|
|
13485
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
13486
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
13487
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
13488
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
13489
|
+
* vocabulary for the same loss would make the row and the counter
|
|
13490
|
+
* un-joinable.
|
|
13491
|
+
*/
|
|
13492
|
+
reason: string(),
|
|
13493
|
+
count: number().int().nonnegative()
|
|
13494
|
+
});
|
|
13495
|
+
var FailureContributionSchema = object({
|
|
13496
|
+
/**
|
|
13497
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
13498
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
13499
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
13500
|
+
* is a central list that rots invisibly.
|
|
13501
|
+
*/
|
|
13502
|
+
family: string(),
|
|
13503
|
+
/**
|
|
13504
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
13505
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
13506
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
13507
|
+
* cannot answer the only question anybody asks of this surface.
|
|
13508
|
+
*/
|
|
13509
|
+
deviceId: number().int().positive(),
|
|
13510
|
+
/**
|
|
13511
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
13512
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
13513
|
+
* family has a single variant.
|
|
13514
|
+
*/
|
|
13515
|
+
variant: string().optional(),
|
|
13516
|
+
/**
|
|
13517
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
13518
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
13519
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
13520
|
+
* `LoadContribution.startedAtMs`.
|
|
13521
|
+
*/
|
|
13522
|
+
sinceMs: number(),
|
|
13523
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
13524
|
+
atMs: number(),
|
|
13525
|
+
/**
|
|
13526
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
13527
|
+
* window. A failure count published without it is the mistake this schema
|
|
13528
|
+
* exists to make impossible.
|
|
13529
|
+
*/
|
|
13530
|
+
attempts: number().int().nonnegative(),
|
|
13531
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
13532
|
+
succeeded: number().int().nonnegative(),
|
|
13533
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
13534
|
+
reasons: array(FailureReasonCountSchema).readonly()
|
|
13535
|
+
});
|
|
13536
|
+
method(_void(), array(FailureContributionSchema).readonly());
|
|
13537
|
+
/**
|
|
13430
13538
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
13431
13539
|
* filesystem. Reads are unconfined (whole filesystem, from `/` down); WRITES
|
|
13432
13540
|
* are sandboxed to operator-configured allowed roots (D115). Used by the
|
|
@@ -13948,6 +14056,68 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
13948
14056
|
kind: "mutation",
|
|
13949
14057
|
auth: "admin"
|
|
13950
14058
|
});
|
|
14059
|
+
var LoadContributionSchema = object({
|
|
14060
|
+
role: _enum([
|
|
14061
|
+
"decode",
|
|
14062
|
+
"transcode",
|
|
14063
|
+
"recording",
|
|
14064
|
+
"streaming",
|
|
14065
|
+
"detection"
|
|
14066
|
+
]),
|
|
14067
|
+
/**
|
|
14068
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
14069
|
+
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14070
|
+
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14071
|
+
* contributor that cannot name its camera must not emit the entry at all,
|
|
14072
|
+
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14073
|
+
* and would quietly turn one camera's cost into everybody's.
|
|
14074
|
+
*/
|
|
14075
|
+
deviceId: number().int().positive().nullable(),
|
|
14076
|
+
attribution: _enum([
|
|
14077
|
+
"measured",
|
|
14078
|
+
"accounted",
|
|
14079
|
+
"unattributable"
|
|
14080
|
+
]),
|
|
14081
|
+
/**
|
|
14082
|
+
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14083
|
+
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14084
|
+
* family and inventing a common one would lose the only information that
|
|
14085
|
+
* makes two entries for the same camera distinguishable.
|
|
14086
|
+
*/
|
|
14087
|
+
unit: string(),
|
|
14088
|
+
/**
|
|
14089
|
+
* The OS process this cost lives in, when there is one. Present so a
|
|
14090
|
+
* consumer can (a) tell two generations of the same unit apart across a
|
|
14091
|
+
* restart, and (b) subtract claimed processes from the node's process
|
|
14092
|
+
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14093
|
+
* process of its own.
|
|
14094
|
+
*/
|
|
14095
|
+
pid: number().int().positive().optional(),
|
|
14096
|
+
/**
|
|
14097
|
+
* When this generation started. The pid's incarnation marker: a consumer
|
|
14098
|
+
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14099
|
+
* window when this changes, because the counter restarted from zero in a new
|
|
14100
|
+
* process.
|
|
14101
|
+
*/
|
|
14102
|
+
startedAtMs: number().optional(),
|
|
14103
|
+
/**
|
|
14104
|
+
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14105
|
+
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14106
|
+
* contribution is asked for.
|
|
14107
|
+
*
|
|
14108
|
+
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14109
|
+
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14110
|
+
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14111
|
+
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14112
|
+
*
|
|
14113
|
+
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14114
|
+
* an entry with no process.
|
|
14115
|
+
*/
|
|
14116
|
+
cpuSeconds: number().optional(),
|
|
14117
|
+
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14118
|
+
rssBytes: number().optional()
|
|
14119
|
+
});
|
|
14120
|
+
method(_void(), array(LoadContributionSchema).readonly());
|
|
13951
14121
|
/**
|
|
13952
14122
|
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
13953
14123
|
* through. It stores nothing.
|
|
@@ -14024,176 +14194,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
14024
14194
|
tags: record(string(), string()).optional()
|
|
14025
14195
|
}), array(LogEntrySchema).readonly());
|
|
14026
14196
|
/**
|
|
14027
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
14028
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
14029
|
-
*
|
|
14030
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
14031
|
-
*
|
|
14032
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
14033
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
14034
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
14035
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
14036
|
-
* somebody to forget to edit.
|
|
14037
|
-
*
|
|
14038
|
-
* They are not merged, because their invariants are opposites:
|
|
14039
|
-
*
|
|
14040
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
14041
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
14042
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
14043
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
14044
|
-
* and it is exactly what an absent entry cannot say.
|
|
14045
|
-
*
|
|
14046
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
14047
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
14048
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
14049
|
-
* has no process.
|
|
14050
|
-
*
|
|
14051
|
-
* ## Why not a log line, since the counters already exist
|
|
14052
|
-
*
|
|
14053
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
14054
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
14055
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
14056
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
14057
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
14058
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
14059
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
14060
|
-
* be READ.
|
|
14061
|
-
*
|
|
14062
|
-
* ## The rate is served with its denominator or not at all
|
|
14063
|
-
*
|
|
14064
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
14065
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
14066
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
14067
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
14068
|
-
* reproduces that mistake on every read.
|
|
14069
|
-
*
|
|
14070
|
-
* ## Shape
|
|
14071
|
-
*
|
|
14072
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
14073
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
14074
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
14075
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
14076
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
14077
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
14078
|
-
* result through `system.getFailureContributions`.
|
|
14079
|
-
*/
|
|
14080
|
-
var FailureReasonCountSchema = object({
|
|
14081
|
-
/**
|
|
14082
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
14083
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
14084
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
14085
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
14086
|
-
* vocabulary for the same loss would make the row and the counter
|
|
14087
|
-
* un-joinable.
|
|
14088
|
-
*/
|
|
14089
|
-
reason: string(),
|
|
14090
|
-
count: number().int().nonnegative()
|
|
14091
|
-
});
|
|
14092
|
-
var FailureContributionSchema = object({
|
|
14093
|
-
/**
|
|
14094
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
14095
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
14096
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
14097
|
-
* is a central list that rots invisibly.
|
|
14098
|
-
*/
|
|
14099
|
-
family: string(),
|
|
14100
|
-
/**
|
|
14101
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14102
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
14103
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
14104
|
-
* cannot answer the only question anybody asks of this surface.
|
|
14105
|
-
*/
|
|
14106
|
-
deviceId: number().int().positive(),
|
|
14107
|
-
/**
|
|
14108
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
14109
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
14110
|
-
* family has a single variant.
|
|
14111
|
-
*/
|
|
14112
|
-
variant: string().optional(),
|
|
14113
|
-
/**
|
|
14114
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
14115
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
14116
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
14117
|
-
* `LoadContribution.startedAtMs`.
|
|
14118
|
-
*/
|
|
14119
|
-
sinceMs: number(),
|
|
14120
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
14121
|
-
atMs: number(),
|
|
14122
|
-
/**
|
|
14123
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
14124
|
-
* window. A failure count published without it is the mistake this schema
|
|
14125
|
-
* exists to make impossible.
|
|
14126
|
-
*/
|
|
14127
|
-
attempts: number().int().nonnegative(),
|
|
14128
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
14129
|
-
succeeded: number().int().nonnegative(),
|
|
14130
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
14131
|
-
reasons: array(FailureReasonCountSchema).readonly()
|
|
14132
|
-
});
|
|
14133
|
-
method(_void(), array(FailureContributionSchema).readonly());
|
|
14134
|
-
var LoadContributionSchema = object({
|
|
14135
|
-
role: _enum([
|
|
14136
|
-
"decode",
|
|
14137
|
-
"transcode",
|
|
14138
|
-
"recording",
|
|
14139
|
-
"streaming",
|
|
14140
|
-
"detection"
|
|
14141
|
-
]),
|
|
14142
|
-
/**
|
|
14143
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
14144
|
-
* `tags.deviceId`. `null` means this cost genuinely belongs to no single
|
|
14145
|
-
* camera (a shared pool), NOT that the contributor forgot to look it up: a
|
|
14146
|
-
* contributor that cannot name its camera must not emit the entry at all,
|
|
14147
|
-
* because an unnamed per-camera entry is indistinguishable from a shared one
|
|
14148
|
-
* and would quietly turn one camera's cost into everybody's.
|
|
14149
|
-
*/
|
|
14150
|
-
deviceId: number().int().positive().nullable(),
|
|
14151
|
-
attribution: _enum([
|
|
14152
|
-
"measured",
|
|
14153
|
-
"accounted",
|
|
14154
|
-
"unattributable"
|
|
14155
|
-
]),
|
|
14156
|
-
/**
|
|
14157
|
-
* What ONE entry is, in the contributor's own words — `615/high`,
|
|
14158
|
-
* `617/native`, `cuda:0 shared pool`. Free text because the unit differs per
|
|
14159
|
-
* family and inventing a common one would lose the only information that
|
|
14160
|
-
* makes two entries for the same camera distinguishable.
|
|
14161
|
-
*/
|
|
14162
|
-
unit: string(),
|
|
14163
|
-
/**
|
|
14164
|
-
* The OS process this cost lives in, when there is one. Present so a
|
|
14165
|
-
* consumer can (a) tell two generations of the same unit apart across a
|
|
14166
|
-
* restart, and (b) subtract claimed processes from the node's process
|
|
14167
|
-
* snapshot to see what NOBODY claimed. Absent for an entry that owns no
|
|
14168
|
-
* process of its own.
|
|
14169
|
-
*/
|
|
14170
|
-
pid: number().int().positive().optional(),
|
|
14171
|
-
/**
|
|
14172
|
-
* When this generation started. The pid's incarnation marker: a consumer
|
|
14173
|
-
* differencing {@link LoadContributionSchema.shape.cpuSeconds} must drop the
|
|
14174
|
-
* window when this changes, because the counter restarted from zero in a new
|
|
14175
|
-
* process.
|
|
14176
|
-
*/
|
|
14177
|
-
startedAtMs: number().optional(),
|
|
14178
|
-
/**
|
|
14179
|
-
* CUMULATIVE CPU seconds this unit has consumed since it started — user +
|
|
14180
|
-
* system, read from the child's own `/proc/<pid>/stat` at the moment the
|
|
14181
|
-
* contribution is asked for.
|
|
14182
|
-
*
|
|
14183
|
-
* Cumulative and not a rate on purpose: a rate needs a window, a window
|
|
14184
|
-
* needs a sampler, and a new per-node sampler is the defect half of
|
|
14185
|
-
* `docs/architecture/load-ledger.md` documents. A counter can be differenced
|
|
14186
|
-
* by whoever already keeps a history; a rate cannot be un-averaged.
|
|
14187
|
-
*
|
|
14188
|
-
* Absent — never zero — on a node with no `/proc`, on a read failure, and on
|
|
14189
|
-
* an entry with no process.
|
|
14190
|
-
*/
|
|
14191
|
-
cpuSeconds: number().optional(),
|
|
14192
|
-
/** Resident bytes of this unit's process, same source and same rules. */
|
|
14193
|
-
rssBytes: number().optional()
|
|
14194
|
-
});
|
|
14195
|
-
method(_void(), array(LoadContributionSchema).readonly());
|
|
14196
|
-
/**
|
|
14197
14197
|
* `login-method` — collection cap through which auth addons contribute
|
|
14198
14198
|
* their pre-auth login surfaces to the login page. This is the SINGLE,
|
|
14199
14199
|
* generic mechanism that supersedes the dead `auth.listProviders` reader:
|
|
@@ -18931,12 +18931,53 @@ var MediaFileKindEnum = _enum([
|
|
|
18931
18931
|
"keyFrameSmall",
|
|
18932
18932
|
"thumbnailSmall"
|
|
18933
18933
|
]);
|
|
18934
|
+
/**
|
|
18935
|
+
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
18936
|
+
* ARE — never the bytes themselves.
|
|
18937
|
+
*
|
|
18938
|
+
* ## Why `url` and not `base64`
|
|
18939
|
+
*
|
|
18940
|
+
* Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
|
|
18941
|
+
* with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
|
|
18942
|
+
* was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
|
|
18943
|
+
* wire. Forty events is ~144 MB. Every byte of it was read off disk,
|
|
18944
|
+
* base64-encoded, held whole in a unary tRPC envelope, and materialised in
|
|
18945
|
+
* hub-main's heap on the way past — for an `<img>` that would have cached it.
|
|
18946
|
+
*
|
|
18947
|
+
* `url` points at the `event-media` data plane
|
|
18948
|
+
* (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
|
|
18949
|
+
* with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
|
|
18950
|
+
* render a `?variant=thumb`, and streams. The hub gate in front of it requires
|
|
18951
|
+
* a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
|
|
18952
|
+
* no less protected than they were inside a `view`-level cap response — see
|
|
18953
|
+
* `data-plane-access.ts` for the rule and the one gap it does not close
|
|
18954
|
+
* (per-device scoping).
|
|
18955
|
+
*
|
|
18956
|
+
* The URL is built from the row's **stored** key, which is not always its
|
|
18957
|
+
* published `kind`: a track's face/plate crop is stored as `crop` under
|
|
18958
|
+
* `('face'|'plate', '<prefix>-<trackId>')` and published as
|
|
18959
|
+
* `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
|
|
18960
|
+
*
|
|
18961
|
+
* ## `base64` is TRANSITIONAL and is going away
|
|
18962
|
+
*
|
|
18963
|
+
* It is still populated for one reason: the deployed viewer's track-detail
|
|
18964
|
+
* HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
|
|
18965
|
+
* REQUIRES the field), and a row without it parses as a FAILED read — the red
|
|
18966
|
+
* triangle — not as absence. Removing the field before that viewer ships is an
|
|
18967
|
+
* outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
|
|
18968
|
+
* delete this line and the `withBytes` pass-through in
|
|
18969
|
+
* `analytics-query-facade.ts`; nothing else reads it.
|
|
18970
|
+
*/
|
|
18934
18971
|
var MediaFileSchema = object({
|
|
18935
18972
|
key: string(),
|
|
18936
18973
|
kind: MediaFileKindEnum,
|
|
18937
|
-
base64: string(),
|
|
18938
18974
|
sizeBytes: number(),
|
|
18939
18975
|
timestamp: number()
|
|
18976
|
+
}).extend({
|
|
18977
|
+
/** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
|
|
18978
|
+
url: string(),
|
|
18979
|
+
/** @deprecated Transitional — see the schema docblock. Use {@link url}. */
|
|
18980
|
+
base64: string()
|
|
18940
18981
|
});
|
|
18941
18982
|
/**
|
|
18942
18983
|
* One media row WITHOUT its bytes.
|
|
@@ -18948,7 +18989,9 @@ var MediaFileSchema = object({
|
|
|
18948
18989
|
* blocks the whole view.
|
|
18949
18990
|
*
|
|
18950
18991
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
18951
|
-
* stored blob and a `?variant=thumb` rendering without fetching either
|
|
18992
|
+
* stored blob and a `?variant=thumb` rendering without fetching either, and
|
|
18993
|
+
* `url` because a client that had to build the plane path itself is a second
|
|
18994
|
+
* copy of a route — the embed, the viewer and the admin UI each grew one.
|
|
18952
18995
|
*/
|
|
18953
18996
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
18954
18997
|
/**
|
|
@@ -19295,6 +19338,50 @@ var EventStoreFootprintSchema = object({
|
|
|
19295
19338
|
totalBytes: number().int(),
|
|
19296
19339
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
19297
19340
|
});
|
|
19341
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
19342
|
+
var EventMediaKindFootprintSchema = object({
|
|
19343
|
+
kind: MediaFileKindEnum,
|
|
19344
|
+
/** Media rows of this kind. */
|
|
19345
|
+
rows: number().int(),
|
|
19346
|
+
/** Bytes on disk held by those rows. */
|
|
19347
|
+
bytes: number().int()
|
|
19348
|
+
});
|
|
19349
|
+
/**
|
|
19350
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
19351
|
+
* actually turns on.
|
|
19352
|
+
*
|
|
19353
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
19354
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
19355
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
19356
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
19357
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
19358
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
19359
|
+
*
|
|
19360
|
+
* ## Why `unaccounted*` exists
|
|
19361
|
+
*
|
|
19362
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
19363
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
19364
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
19365
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
19366
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
19367
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
19368
|
+
* against a denominator smaller than the disk.
|
|
19369
|
+
*
|
|
19370
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
19371
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
19372
|
+
*/
|
|
19373
|
+
var EventMediaKindBreakdownSchema = object({
|
|
19374
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
19375
|
+
totalRows: number().int(),
|
|
19376
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
19377
|
+
totalBytes: number().int(),
|
|
19378
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
19379
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
19380
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
19381
|
+
unaccountedRows: number().int(),
|
|
19382
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
19383
|
+
unaccountedBytes: number().int()
|
|
19384
|
+
});
|
|
19298
19385
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
19299
19386
|
var EventPruneCountsSchema = object({
|
|
19300
19387
|
motion: number().int(),
|
|
@@ -19498,6 +19585,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19498
19585
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
19499
19586
|
kind: "query",
|
|
19500
19587
|
auth: "admin"
|
|
19588
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19589
|
+
kind: "query",
|
|
19590
|
+
auth: "admin"
|
|
19501
19591
|
}), method(object({
|
|
19502
19592
|
olderThanMs: number(),
|
|
19503
19593
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -19637,6 +19727,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19637
19727
|
}), array(MediaFileSchema).readonly()), method(object({
|
|
19638
19728
|
trackId: string(),
|
|
19639
19729
|
deviceId: number()
|
|
19730
|
+
}), array(MediaFileInfoSchema).readonly()), method(object({
|
|
19731
|
+
eventId: string(),
|
|
19732
|
+
deviceId: number()
|
|
19640
19733
|
}), array(MediaFileInfoSchema).readonly()), method(SearchObjectEventsInput, array(ScoredObjectEventSchema).readonly()), method(object({}), WipeObjectEmbeddingsResultSchema, {
|
|
19641
19734
|
kind: "mutation",
|
|
19642
19735
|
auth: "admin"
|
|
@@ -21446,6 +21539,20 @@ method(object({
|
|
|
21446
21539
|
error: string().optional()
|
|
21447
21540
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
21448
21541
|
providerId: string(),
|
|
21542
|
+
/**
|
|
21543
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21544
|
+
*
|
|
21545
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21546
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21547
|
+
* credential the operator did not retype — and posting that here
|
|
21548
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21549
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21550
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21551
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21552
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21553
|
+
* every value was typed just now and nothing is stored yet.
|
|
21554
|
+
*/
|
|
21555
|
+
locationId: string().optional(),
|
|
21449
21556
|
config: record(string(), unknown())
|
|
21450
21557
|
}), object({
|
|
21451
21558
|
ok: boolean(),
|
|
@@ -24644,10 +24751,24 @@ var FaceClusterSchema = object({
|
|
|
24644
24751
|
size: number().int(),
|
|
24645
24752
|
cohesion: number()
|
|
24646
24753
|
});
|
|
24754
|
+
/**
|
|
24755
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
24756
|
+
* are — never the bytes.
|
|
24757
|
+
*
|
|
24758
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
24759
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
24760
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
24761
|
+
* caller is the admin UI's detail modal, which was building
|
|
24762
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
24763
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
24764
|
+
*
|
|
24765
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
24766
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
24767
|
+
*/
|
|
24647
24768
|
var MediaFileLiteSchema$1 = object({
|
|
24648
24769
|
key: string(),
|
|
24649
24770
|
kind: string(),
|
|
24650
|
-
|
|
24771
|
+
url: string(),
|
|
24651
24772
|
sizeBytes: number(),
|
|
24652
24773
|
timestamp: number()
|
|
24653
24774
|
});
|
|
@@ -27669,10 +27790,24 @@ var PlateInfoSchema = object({
|
|
|
27669
27790
|
*/
|
|
27670
27791
|
cropUrl: string().optional()
|
|
27671
27792
|
});
|
|
27793
|
+
/**
|
|
27794
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
27795
|
+
* are — never the bytes.
|
|
27796
|
+
*
|
|
27797
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
27798
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
27799
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
27800
|
+
* caller is the admin UI's detail modal, which was building
|
|
27801
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
27802
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
27803
|
+
*
|
|
27804
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
27805
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
27806
|
+
*/
|
|
27672
27807
|
var MediaFileLiteSchema = object({
|
|
27673
27808
|
key: string(),
|
|
27674
27809
|
kind: string(),
|
|
27675
|
-
|
|
27810
|
+
url: string(),
|
|
27676
27811
|
sizeBytes: number(),
|
|
27677
27812
|
timestamp: number()
|
|
27678
27813
|
});
|
|
@@ -35473,6 +35608,12 @@ Object.freeze({
|
|
|
35473
35608
|
addonId: null,
|
|
35474
35609
|
access: "view"
|
|
35475
35610
|
},
|
|
35611
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
35612
|
+
capName: "pipeline-analytics",
|
|
35613
|
+
capScope: "device",
|
|
35614
|
+
addonId: null,
|
|
35615
|
+
access: "view"
|
|
35616
|
+
},
|
|
35476
35617
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
35477
35618
|
capName: "pipeline-analytics",
|
|
35478
35619
|
capScope: "device",
|
|
@@ -35569,6 +35710,12 @@ Object.freeze({
|
|
|
35569
35710
|
addonId: null,
|
|
35570
35711
|
access: "view"
|
|
35571
35712
|
},
|
|
35713
|
+
"pipelineAnalytics.listEventMedia": {
|
|
35714
|
+
capName: "pipeline-analytics",
|
|
35715
|
+
capScope: "device",
|
|
35716
|
+
addonId: null,
|
|
35717
|
+
access: "view"
|
|
35718
|
+
},
|
|
35572
35719
|
"pipelineAnalytics.listGroups": {
|
|
35573
35720
|
capName: "pipeline-analytics",
|
|
35574
35721
|
capScope: "device",
|
|
@@ -39132,6 +39279,11 @@ Object.freeze({
|
|
|
39132
39279
|
form: "single",
|
|
39133
39280
|
optional: false
|
|
39134
39281
|
}],
|
|
39282
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
39283
|
+
name: "deviceId",
|
|
39284
|
+
form: "single",
|
|
39285
|
+
optional: true
|
|
39286
|
+
}],
|
|
39135
39287
|
"pipelineAnalytics.getGroup": [{
|
|
39136
39288
|
name: "deviceId",
|
|
39137
39289
|
form: "single",
|
|
@@ -39192,6 +39344,11 @@ Object.freeze({
|
|
|
39192
39344
|
form: "array",
|
|
39193
39345
|
optional: false
|
|
39194
39346
|
}],
|
|
39347
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
39348
|
+
name: "deviceId",
|
|
39349
|
+
form: "single",
|
|
39350
|
+
optional: false
|
|
39351
|
+
}],
|
|
39195
39352
|
"pipelineAnalytics.listGroups": [{
|
|
39196
39353
|
name: "deviceIds",
|
|
39197
39354
|
form: "array",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-import-alexa",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.47",
|
|
4
4
|
"description": "Alexa device-import provider for CamStack — imports the smart-home devices in a user's Alexa account via the unofficial alexa-remote2 cookie/token client (the inverse of the Alexa exporter)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|