@camstack/types 1.2.127 → 1.2.129
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 +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/face-gallery.cap.d.ts +1 -1
- package/dist/capabilities/index.d.ts +8 -8
- package/dist/capabilities/pipeline-analytics.cap.d.ts +237 -5
- package/dist/capabilities/plate-gallery.cap.d.ts +1 -1
- package/dist/capabilities/storage.cap.d.ts +2 -1
- package/dist/generated/addon-api.d.ts +14 -0
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +1 -1
- package/dist/index.js +445 -246
- package/dist/index.mjs +444 -247
- package/dist/{sleep-bm0x6zZF.mjs → sleep-BS40IUZZ.mjs} +2 -0
- package/dist/{sleep-CWWLTM6W.js → sleep-D5821NGq.js} +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_event_category = require("./event-category-BaEgqJNv.js");
|
|
3
|
-
const require_sleep = require("./sleep-
|
|
3
|
+
const require_sleep = require("./sleep-D5821NGq.js");
|
|
4
4
|
const require_canonical_hash = require("./canonical-hash-DNV8S5ET.js");
|
|
5
5
|
const require_enums = require("./enums.js");
|
|
6
6
|
const require_err_msg = require("./err-msg-COpsHMw2.js");
|
|
@@ -11004,6 +11004,135 @@ var embeddingEncoderCapability = {
|
|
|
11004
11004
|
}
|
|
11005
11005
|
};
|
|
11006
11006
|
//#endregion
|
|
11007
|
+
//#region src/capabilities/failure-contribution.cap.ts
|
|
11008
|
+
/**
|
|
11009
|
+
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
11010
|
+
* through, per camera, with the denominator attached. It stores nothing.
|
|
11011
|
+
*
|
|
11012
|
+
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
11013
|
+
*
|
|
11014
|
+
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
11015
|
+
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
11016
|
+
* copied: the contributor reports what it already knows, hub-main adds only
|
|
11017
|
+
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
11018
|
+
* somebody to forget to edit.
|
|
11019
|
+
*
|
|
11020
|
+
* They are not merged, because their invariants are opposites:
|
|
11021
|
+
*
|
|
11022
|
+
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
11023
|
+
* claim a camera cost nothing, which is a measurement nobody made;
|
|
11024
|
+
* - a `failure-contribution` zero is the **most valuable value on the
|
|
11025
|
+
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
11026
|
+
* and it is exactly what an absent entry cannot say.
|
|
11027
|
+
*
|
|
11028
|
+
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
11029
|
+
* that gives `load-contribution` its point: contributions are subtracted from
|
|
11030
|
+
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
11031
|
+
* has no process.
|
|
11032
|
+
*
|
|
11033
|
+
* ## Why not a log line, since the counters already exist
|
|
11034
|
+
*
|
|
11035
|
+
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
11036
|
+
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
11037
|
+
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
11038
|
+
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
11039
|
+
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
11040
|
+
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
11041
|
+
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
11042
|
+
* be READ.
|
|
11043
|
+
*
|
|
11044
|
+
* ## The rate is served with its denominator or not at all
|
|
11045
|
+
*
|
|
11046
|
+
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
11047
|
+
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
11048
|
+
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
11049
|
+
* successes on the same path. A surface that publishes only the numerator
|
|
11050
|
+
* reproduces that mistake on every read.
|
|
11051
|
+
*
|
|
11052
|
+
* ## Shape
|
|
11053
|
+
*
|
|
11054
|
+
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
11055
|
+
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
11056
|
+
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
11057
|
+
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
11058
|
+
* a forked runner's entries reach hub-main over transport that already exists.
|
|
11059
|
+
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
11060
|
+
* result through `system.getFailureContributions`.
|
|
11061
|
+
*/
|
|
11062
|
+
var FailureReasonCountSchema = zod.z.object({
|
|
11063
|
+
/**
|
|
11064
|
+
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
11065
|
+
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
11066
|
+
* strings that already appear in this repo's logs and, where one exists, the
|
|
11067
|
+
* same string the per-track `previewMissReason` records (D276): a second
|
|
11068
|
+
* vocabulary for the same loss would make the row and the counter
|
|
11069
|
+
* un-joinable.
|
|
11070
|
+
*/
|
|
11071
|
+
reason: zod.z.string(),
|
|
11072
|
+
count: zod.z.number().int().nonnegative()
|
|
11073
|
+
});
|
|
11074
|
+
var FailureContributionSchema = zod.z.object({
|
|
11075
|
+
/**
|
|
11076
|
+
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
11077
|
+
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
11078
|
+
* `unit` free: the families are owned by different addons and a shared enum
|
|
11079
|
+
* is a central list that rots invisibly.
|
|
11080
|
+
*/
|
|
11081
|
+
family: zod.z.string(),
|
|
11082
|
+
/**
|
|
11083
|
+
* The NUMERIC device id — the same value every log line carries as
|
|
11084
|
+
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
11085
|
+
* cannot name the camera must not emit the entry, because a fleet total
|
|
11086
|
+
* cannot answer the only question anybody asks of this surface.
|
|
11087
|
+
*/
|
|
11088
|
+
deviceId: zod.z.number().int().positive(),
|
|
11089
|
+
/**
|
|
11090
|
+
* A second dimension inside the family: the model / step id for an inference
|
|
11091
|
+
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
11092
|
+
* family has a single variant.
|
|
11093
|
+
*/
|
|
11094
|
+
variant: zod.z.string().optional(),
|
|
11095
|
+
/**
|
|
11096
|
+
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
11097
|
+
* differencing two reads must drop the interval when it changes, because the
|
|
11098
|
+
* counter restarted from zero in a respawned runner. Same discipline as
|
|
11099
|
+
* `LoadContribution.startedAtMs`.
|
|
11100
|
+
*/
|
|
11101
|
+
sinceMs: zod.z.number(),
|
|
11102
|
+
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
11103
|
+
atMs: zod.z.number(),
|
|
11104
|
+
/**
|
|
11105
|
+
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
11106
|
+
* window. A failure count published without it is the mistake this schema
|
|
11107
|
+
* exists to make impossible.
|
|
11108
|
+
*/
|
|
11109
|
+
attempts: zod.z.number().int().nonnegative(),
|
|
11110
|
+
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
11111
|
+
succeeded: zod.z.number().int().nonnegative(),
|
|
11112
|
+
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
11113
|
+
reasons: zod.z.array(FailureReasonCountSchema).readonly()
|
|
11114
|
+
});
|
|
11115
|
+
var failureContributionCapability = {
|
|
11116
|
+
name: "failure-contribution",
|
|
11117
|
+
scope: "system",
|
|
11118
|
+
mode: "collection",
|
|
11119
|
+
internal: true,
|
|
11120
|
+
methods: {
|
|
11121
|
+
/**
|
|
11122
|
+
* This addon's per-camera failure counters, read live from bounded in-RAM
|
|
11123
|
+
* state it already keeps. Inert: no persistence, no sampling, no timer.
|
|
11124
|
+
*
|
|
11125
|
+
* READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
|
|
11126
|
+
* consumer that wants a rate differences two reads. A draining read would
|
|
11127
|
+
* make two operators with the page open each destroy half of the other's
|
|
11128
|
+
* numbers, and `load-contribution` already settled the same question the
|
|
11129
|
+
* same way for `cpuSeconds`.
|
|
11130
|
+
*/
|
|
11131
|
+
list: require_sleep.method(zod.z.void(), zod.z.array(FailureContributionSchema).readonly()) },
|
|
11132
|
+
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
11133
|
+
mount: { kind: "skip" }
|
|
11134
|
+
};
|
|
11135
|
+
//#endregion
|
|
11007
11136
|
//#region src/capabilities/filesystem-browse.cap.ts
|
|
11008
11137
|
/**
|
|
11009
11138
|
* filesystem-browse — per-node capability for browsing the node's local
|
|
@@ -11644,246 +11773,6 @@ var llmCapability = {
|
|
|
11644
11773
|
}
|
|
11645
11774
|
};
|
|
11646
11775
|
//#endregion
|
|
11647
|
-
//#region src/capabilities/log-channels.cap.ts
|
|
11648
|
-
/**
|
|
11649
|
-
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
11650
|
-
* through. It stores nothing.
|
|
11651
|
-
*
|
|
11652
|
-
* ## Why a capability at all, and why this shape
|
|
11653
|
-
*
|
|
11654
|
-
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
11655
|
-
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
11656
|
-
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
11657
|
-
* fails, an operator just never sees the channel somebody added. So the list
|
|
11658
|
-
* is assembled from declarations at runtime.
|
|
11659
|
-
*
|
|
11660
|
-
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
11661
|
-
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
11662
|
-
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
11663
|
-
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
11664
|
-
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
11665
|
-
* runner's declarations reach hub-main over the transport that already exists.
|
|
11666
|
-
* No new UDS message, no second registry.
|
|
11667
|
-
*
|
|
11668
|
-
* ## What it deliberately does NOT own
|
|
11669
|
-
*
|
|
11670
|
-
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
11671
|
-
* ONE place: the logging settings document on the `system` cap
|
|
11672
|
-
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
11673
|
-
* value is the defect the plan behind this work exists to remove, and
|
|
11674
|
-
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
11675
|
-
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
11676
|
-
* setter for a window and no persistence of any kind.
|
|
11677
|
-
*
|
|
11678
|
-
* ## Why `apply` is here even so
|
|
11679
|
-
*
|
|
11680
|
-
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
11681
|
-
* seam has to carry the value from the authority to the mirror, and a channel
|
|
11682
|
-
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
11683
|
-
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
11684
|
-
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
11685
|
-
* persists nothing, it is never the source of a value, and it is called only
|
|
11686
|
-
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
11687
|
-
* at all, so no channel is silently disarmed by a bad read).
|
|
11688
|
-
*/
|
|
11689
|
-
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
11690
|
-
var LogChannelApplyResultSchema = zod.z.object({
|
|
11691
|
-
/** How many declared channels are armed in this process after the call. */
|
|
11692
|
-
armed: zod.z.number().int().min(0),
|
|
11693
|
-
/**
|
|
11694
|
-
* Names the document armed that this process does not declare. Reported
|
|
11695
|
-
* rather than swallowed: a name here is either a typo or an addon that has
|
|
11696
|
-
* not booted, and both deserve a line instead of silence.
|
|
11697
|
-
*/
|
|
11698
|
-
unknown: zod.z.array(zod.z.string()).readonly()
|
|
11699
|
-
});
|
|
11700
|
-
var logChannelsCapability = {
|
|
11701
|
-
name: "log-channels",
|
|
11702
|
-
scope: "system",
|
|
11703
|
-
mode: "collection",
|
|
11704
|
-
internal: true,
|
|
11705
|
-
methods: {
|
|
11706
|
-
/** The channels this addon declares. Inert: no value, no state. */
|
|
11707
|
-
list: require_sleep.method(zod.z.void(), zod.z.array(LogChannelDescriptorSchema).readonly()),
|
|
11708
|
-
/**
|
|
11709
|
-
* Refresh this process's mirror from the document's FULL set of armed
|
|
11710
|
-
* windows.
|
|
11711
|
-
*
|
|
11712
|
-
* Full and not incremental on purpose: the document is the authority, so a
|
|
11713
|
-
* channel it does not name is disarmed here. An incremental apply would
|
|
11714
|
-
* let a disarm get lost in transit and leave a channel running that
|
|
11715
|
-
* nobody can see is running.
|
|
11716
|
-
*/
|
|
11717
|
-
apply: require_sleep.method(zod.z.object({ windows: zod.z.array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" })
|
|
11718
|
-
},
|
|
11719
|
-
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
11720
|
-
mount: { kind: "skip" }
|
|
11721
|
-
};
|
|
11722
|
-
//#endregion
|
|
11723
|
-
//#region src/capabilities/log-destination.cap.ts
|
|
11724
|
-
var LogLevelSchema = zod.z.enum([
|
|
11725
|
-
"debug",
|
|
11726
|
-
"info",
|
|
11727
|
-
"warn",
|
|
11728
|
-
"error"
|
|
11729
|
-
]);
|
|
11730
|
-
var LogEntrySchema = zod.z.object({
|
|
11731
|
-
timestamp: zod.z.date(),
|
|
11732
|
-
level: LogLevelSchema,
|
|
11733
|
-
scope: zod.z.array(zod.z.string()),
|
|
11734
|
-
message: zod.z.string(),
|
|
11735
|
-
meta: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
11736
|
-
tags: zod.z.record(zod.z.string(), zod.z.string()).optional()
|
|
11737
|
-
});
|
|
11738
|
-
var logDestinationCapability = {
|
|
11739
|
-
name: "log-destination",
|
|
11740
|
-
scope: "system",
|
|
11741
|
-
mode: "collection",
|
|
11742
|
-
internal: true,
|
|
11743
|
-
methods: {
|
|
11744
|
-
write: require_sleep.method(LogEntrySchema, zod.z.void(), { kind: "mutation" }),
|
|
11745
|
-
query: require_sleep.method(zod.z.object({
|
|
11746
|
-
scope: zod.z.array(zod.z.string()).optional(),
|
|
11747
|
-
level: LogLevelSchema.optional(),
|
|
11748
|
-
since: zod.z.date().optional(),
|
|
11749
|
-
until: zod.z.date().optional(),
|
|
11750
|
-
limit: zod.z.number().optional(),
|
|
11751
|
-
tags: zod.z.record(zod.z.string(), zod.z.string()).optional()
|
|
11752
|
-
}), zod.z.array(LogEntrySchema).readonly())
|
|
11753
|
-
},
|
|
11754
|
-
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
11755
|
-
mount: { kind: "skip" }
|
|
11756
|
-
};
|
|
11757
|
-
//#endregion
|
|
11758
|
-
//#region src/capabilities/failure-contribution.cap.ts
|
|
11759
|
-
/**
|
|
11760
|
-
* `failure-contribution` — the capability an addon reports its OWN losses
|
|
11761
|
-
* through, per camera, with the denominator attached. It stores nothing.
|
|
11762
|
-
*
|
|
11763
|
-
* ## The twin of `load-contribution`, and why it is a twin and not a field
|
|
11764
|
-
*
|
|
11765
|
-
* `load-contribution` answers *what did this camera COST*. This answers *what
|
|
11766
|
-
* did this camera LOSE*. The reporting discipline is identical and deliberately
|
|
11767
|
-
* copied: the contributor reports what it already knows, hub-main adds only
|
|
11768
|
-
* `addonId`, nothing needs global knowledge, and there is no central list for
|
|
11769
|
-
* somebody to forget to edit.
|
|
11770
|
-
*
|
|
11771
|
-
* They are not merged, because their invariants are opposites:
|
|
11772
|
-
*
|
|
11773
|
-
* - a `load-contribution` measurement is **absent, never zero** — a zero would
|
|
11774
|
-
* claim a camera cost nothing, which is a measurement nobody made;
|
|
11775
|
-
* - a `failure-contribution` zero is the **most valuable value on the
|
|
11776
|
-
* surface** — `attempts: 400, succeeded: 400` is the proof a fix landed,
|
|
11777
|
-
* and it is exactly what an absent entry cannot say.
|
|
11778
|
-
*
|
|
11779
|
-
* Putting a loss counter on a cost entry would also break the reconciliation
|
|
11780
|
-
* that gives `load-contribution` its point: contributions are subtracted from
|
|
11781
|
-
* `metrics.node-processes-snapshot` to find processes nobody claims. A failure
|
|
11782
|
-
* has no process.
|
|
11783
|
-
*
|
|
11784
|
-
* ## Why not a log line, since the counters already exist
|
|
11785
|
-
*
|
|
11786
|
-
* Several of these paths already counted themselves — `CaptureScheduler`'s
|
|
11787
|
-
* per-device window, `KeyFrameCaptureLog`, `bumpCropMetric`. Every one of them
|
|
11788
|
-
* ends in a log line, and a log line is the thing the operator asked to stop
|
|
11789
|
-
* needing: *"possiamo armare questi errori intanto? Così al prossimo giro
|
|
11790
|
-
* ricontrolliamo tutti questi punti"*. Reading them meant grepping Loki and
|
|
11791
|
-
* hand-correlating timestamps, which is how a 22% thumbnail gap and a 3-hour
|
|
11792
|
-
* media blackout were both diagnosed. The counters stay; this is where they can
|
|
11793
|
-
* be READ.
|
|
11794
|
-
*
|
|
11795
|
-
* ## The rate is served with its denominator or not at all
|
|
11796
|
-
*
|
|
11797
|
-
* Every entry carries `attempts` and `succeeded`. A miss count alone is
|
|
11798
|
-
* unreadable: on 2026-08-28 the enrichment-crop miss count read as "35x worse
|
|
11799
|
-
* than yesterday" and was **flat across twelve hours** once divided by the
|
|
11800
|
-
* successes on the same path. A surface that publishes only the numerator
|
|
11801
|
-
* reproduces that mistake on every read.
|
|
11802
|
-
*
|
|
11803
|
-
* ## Shape
|
|
11804
|
-
*
|
|
11805
|
-
* Copied from `load-contribution.cap.ts` (`mode: 'collection'`,
|
|
11806
|
-
* `internal: true`, `mount: { kind: 'skip' }`): no tRPC route of its own and no
|
|
11807
|
-
* generated hooks, while `addons.listCapabilityProviders` still enumerates it
|
|
11808
|
-
* and the hub's `CapabilityRegistry` still holds an RPC proxy per provider — so
|
|
11809
|
-
* a forked runner's entries reach hub-main over transport that already exists.
|
|
11810
|
-
* No new UDS message, no second registry (D3). The operator reads the assembled
|
|
11811
|
-
* result through `system.getFailureContributions`.
|
|
11812
|
-
*/
|
|
11813
|
-
var FailureReasonCountSchema = zod.z.object({
|
|
11814
|
-
/**
|
|
11815
|
-
* Why the attempt did not land, in the contributor's own vocabulary —
|
|
11816
|
-
* `worker-lease-gone`, `queue-overflow`, `timeout`, `empty-read`. The same
|
|
11817
|
-
* strings that already appear in this repo's logs and, where one exists, the
|
|
11818
|
-
* same string the per-track `previewMissReason` records (D276): a second
|
|
11819
|
-
* vocabulary for the same loss would make the row and the counter
|
|
11820
|
-
* un-joinable.
|
|
11821
|
-
*/
|
|
11822
|
-
reason: zod.z.string(),
|
|
11823
|
-
count: zod.z.number().int().nonnegative()
|
|
11824
|
-
});
|
|
11825
|
-
var FailureContributionSchema = zod.z.object({
|
|
11826
|
-
/**
|
|
11827
|
-
* The failing path — `enrichment-crop`, `inference`, `plate-ocr`,
|
|
11828
|
-
* `person-over-vehicle`. Free text, for the reason `load-contribution` keeps
|
|
11829
|
-
* `unit` free: the families are owned by different addons and a shared enum
|
|
11830
|
-
* is a central list that rots invisibly.
|
|
11831
|
-
*/
|
|
11832
|
-
family: zod.z.string(),
|
|
11833
|
-
/**
|
|
11834
|
-
* The NUMERIC device id — the same value every log line carries as
|
|
11835
|
-
* `tags.deviceId`. Never nullable and never absent: a contributor that
|
|
11836
|
-
* cannot name the camera must not emit the entry, because a fleet total
|
|
11837
|
-
* cannot answer the only question anybody asks of this surface.
|
|
11838
|
-
*/
|
|
11839
|
-
deviceId: zod.z.number().int().positive(),
|
|
11840
|
-
/**
|
|
11841
|
-
* A second dimension inside the family: the model / step id for an inference
|
|
11842
|
-
* timeout, so "which camera AND which model" is one read. Absent when the
|
|
11843
|
-
* family has a single variant.
|
|
11844
|
-
*/
|
|
11845
|
-
variant: zod.z.string().optional(),
|
|
11846
|
-
/**
|
|
11847
|
-
* Epoch ms this counter started — the INCARNATION MARKER. A consumer
|
|
11848
|
-
* differencing two reads must drop the interval when it changes, because the
|
|
11849
|
-
* counter restarted from zero in a respawned runner. Same discipline as
|
|
11850
|
-
* `LoadContribution.startedAtMs`.
|
|
11851
|
-
*/
|
|
11852
|
-
sinceMs: zod.z.number(),
|
|
11853
|
-
/** Epoch ms it was read. `atMs - sinceMs` is the interval this covers. */
|
|
11854
|
-
atMs: zod.z.number(),
|
|
11855
|
-
/**
|
|
11856
|
-
* THE DENOMINATOR — every attempt on this path for this camera in the
|
|
11857
|
-
* window. A failure count published without it is the mistake this schema
|
|
11858
|
-
* exists to make impossible.
|
|
11859
|
-
*/
|
|
11860
|
-
attempts: zod.z.number().int().nonnegative(),
|
|
11861
|
-
/** Attempts that landed. `attempts - succeeded` is the loss. */
|
|
11862
|
-
succeeded: zod.z.number().int().nonnegative(),
|
|
11863
|
-
/** The loss, partitioned. Sums to `attempts - succeeded`. */
|
|
11864
|
-
reasons: zod.z.array(FailureReasonCountSchema).readonly()
|
|
11865
|
-
});
|
|
11866
|
-
var failureContributionCapability = {
|
|
11867
|
-
name: "failure-contribution",
|
|
11868
|
-
scope: "system",
|
|
11869
|
-
mode: "collection",
|
|
11870
|
-
internal: true,
|
|
11871
|
-
methods: {
|
|
11872
|
-
/**
|
|
11873
|
-
* This addon's per-camera failure counters, read live from bounded in-RAM
|
|
11874
|
-
* state it already keeps. Inert: no persistence, no sampling, no timer.
|
|
11875
|
-
*
|
|
11876
|
-
* READING NEVER RESETS. The counters are CUMULATIVE since `sinceMs`, and a
|
|
11877
|
-
* consumer that wants a rate differences two reads. A draining read would
|
|
11878
|
-
* make two operators with the page open each destroy half of the other's
|
|
11879
|
-
* numbers, and `load-contribution` already settled the same question the
|
|
11880
|
-
* same way for `cpuSeconds`.
|
|
11881
|
-
*/
|
|
11882
|
-
list: require_sleep.method(zod.z.void(), zod.z.array(FailureContributionSchema).readonly()) },
|
|
11883
|
-
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
11884
|
-
mount: { kind: "skip" }
|
|
11885
|
-
};
|
|
11886
|
-
//#endregion
|
|
11887
11776
|
//#region src/capabilities/load-contribution.cap.ts
|
|
11888
11777
|
/**
|
|
11889
11778
|
* `load-contribution` — the capability an addon reports its OWN cost through,
|
|
@@ -12044,6 +11933,117 @@ list: require_sleep.method(zod.z.void(), zod.z.array(LoadContributionSchema).rea
|
|
|
12044
11933
|
mount: { kind: "skip" }
|
|
12045
11934
|
};
|
|
12046
11935
|
//#endregion
|
|
11936
|
+
//#region src/capabilities/log-channels.cap.ts
|
|
11937
|
+
/**
|
|
11938
|
+
* `log-channels` — the capability an addon DECLARES its diagnostic channels
|
|
11939
|
+
* through. It stores nothing.
|
|
11940
|
+
*
|
|
11941
|
+
* ## Why a capability at all, and why this shape
|
|
11942
|
+
*
|
|
11943
|
+
* Which channels exist is knowledge only the addon has: `stream-broker` knows
|
|
11944
|
+
* webrtc/ICE/RTP, `provider-reolink` knows baichuan/handshake. A central list
|
|
11945
|
+
* maintained by hand rots at the first addition and rots INVISIBLY — nothing
|
|
11946
|
+
* fails, an operator just never sees the channel somebody added. So the list
|
|
11947
|
+
* is assembled from declarations at runtime.
|
|
11948
|
+
*
|
|
11949
|
+
* The shape is copied from `log-destination.cap.ts`, which already does
|
|
11950
|
+
* exactly this job: `mode: 'collection'`, `internal: true`,
|
|
11951
|
+
* `mount: { kind: 'skip' }` — no tRPC route, no generated hooks — while
|
|
11952
|
+
* `addons.listCapabilityProviders` still enumerates it, and the hub's
|
|
11953
|
+
* `CapabilityRegistry` still holds an RPC proxy per provider so a forked
|
|
11954
|
+
* runner's declarations reach hub-main over the transport that already exists.
|
|
11955
|
+
* No new UDS message, no second registry.
|
|
11956
|
+
*
|
|
11957
|
+
* ## What it deliberately does NOT own
|
|
11958
|
+
*
|
|
11959
|
+
* The VALUES — which channel is armed, for which cameras, until when — live in
|
|
11960
|
+
* ONE place: the logging settings document on the `system` cap
|
|
11961
|
+
* (`getLoggingSettings` / `setLoggingSettings`). Two authorities over the same
|
|
11962
|
+
* value is the defect the plan behind this work exists to remove, and
|
|
11963
|
+
* `setRequestCensus` was retired (D245) rather than allowed to be a second
|
|
11964
|
+
* one. {@link logChannelsCapability} therefore has no getter for a level, no
|
|
11965
|
+
* setter for a window and no persistence of any kind.
|
|
11966
|
+
*
|
|
11967
|
+
* ## Why `apply` is here even so
|
|
11968
|
+
*
|
|
11969
|
+
* The gate lives in the addon's PROCESS; the document lives in hub-main. Some
|
|
11970
|
+
* seam has to carry the value from the authority to the mirror, and a channel
|
|
11971
|
+
* that cannot be reached is precisely the dead knob this whole slice exists to
|
|
11972
|
+
* make impossible (D62 — `audioThresholdDbfs`, the HA entities with no source).
|
|
11973
|
+
* `apply` is that seam and nothing more: it writes an in-memory mirror, it
|
|
11974
|
+
* persists nothing, it is never the source of a value, and it is called only
|
|
11975
|
+
* with a set the hub actually read (D49 — a read that fails does not call it
|
|
11976
|
+
* at all, so no channel is silently disarmed by a bad read).
|
|
11977
|
+
*/
|
|
11978
|
+
/** What `apply` reports back — enough to log, not enough to be a second state. */
|
|
11979
|
+
var LogChannelApplyResultSchema = zod.z.object({
|
|
11980
|
+
/** How many declared channels are armed in this process after the call. */
|
|
11981
|
+
armed: zod.z.number().int().min(0),
|
|
11982
|
+
/**
|
|
11983
|
+
* Names the document armed that this process does not declare. Reported
|
|
11984
|
+
* rather than swallowed: a name here is either a typo or an addon that has
|
|
11985
|
+
* not booted, and both deserve a line instead of silence.
|
|
11986
|
+
*/
|
|
11987
|
+
unknown: zod.z.array(zod.z.string()).readonly()
|
|
11988
|
+
});
|
|
11989
|
+
var logChannelsCapability = {
|
|
11990
|
+
name: "log-channels",
|
|
11991
|
+
scope: "system",
|
|
11992
|
+
mode: "collection",
|
|
11993
|
+
internal: true,
|
|
11994
|
+
methods: {
|
|
11995
|
+
/** The channels this addon declares. Inert: no value, no state. */
|
|
11996
|
+
list: require_sleep.method(zod.z.void(), zod.z.array(LogChannelDescriptorSchema).readonly()),
|
|
11997
|
+
/**
|
|
11998
|
+
* Refresh this process's mirror from the document's FULL set of armed
|
|
11999
|
+
* windows.
|
|
12000
|
+
*
|
|
12001
|
+
* Full and not incremental on purpose: the document is the authority, so a
|
|
12002
|
+
* channel it does not name is disarmed here. An incremental apply would
|
|
12003
|
+
* let a disarm get lost in transit and leave a channel running that
|
|
12004
|
+
* nobody can see is running.
|
|
12005
|
+
*/
|
|
12006
|
+
apply: require_sleep.method(zod.z.object({ windows: zod.z.array(LogChannelWindowSchema).readonly() }), LogChannelApplyResultSchema, { kind: "mutation" })
|
|
12007
|
+
},
|
|
12008
|
+
/** In-process only — enumerated through `addons.listCapabilityProviders`. */
|
|
12009
|
+
mount: { kind: "skip" }
|
|
12010
|
+
};
|
|
12011
|
+
//#endregion
|
|
12012
|
+
//#region src/capabilities/log-destination.cap.ts
|
|
12013
|
+
var LogLevelSchema = zod.z.enum([
|
|
12014
|
+
"debug",
|
|
12015
|
+
"info",
|
|
12016
|
+
"warn",
|
|
12017
|
+
"error"
|
|
12018
|
+
]);
|
|
12019
|
+
var LogEntrySchema = zod.z.object({
|
|
12020
|
+
timestamp: zod.z.date(),
|
|
12021
|
+
level: LogLevelSchema,
|
|
12022
|
+
scope: zod.z.array(zod.z.string()),
|
|
12023
|
+
message: zod.z.string(),
|
|
12024
|
+
meta: zod.z.record(zod.z.string(), zod.z.unknown()).optional(),
|
|
12025
|
+
tags: zod.z.record(zod.z.string(), zod.z.string()).optional()
|
|
12026
|
+
});
|
|
12027
|
+
var logDestinationCapability = {
|
|
12028
|
+
name: "log-destination",
|
|
12029
|
+
scope: "system",
|
|
12030
|
+
mode: "collection",
|
|
12031
|
+
internal: true,
|
|
12032
|
+
methods: {
|
|
12033
|
+
write: require_sleep.method(LogEntrySchema, zod.z.void(), { kind: "mutation" }),
|
|
12034
|
+
query: require_sleep.method(zod.z.object({
|
|
12035
|
+
scope: zod.z.array(zod.z.string()).optional(),
|
|
12036
|
+
level: LogLevelSchema.optional(),
|
|
12037
|
+
since: zod.z.date().optional(),
|
|
12038
|
+
until: zod.z.date().optional(),
|
|
12039
|
+
limit: zod.z.number().optional(),
|
|
12040
|
+
tags: zod.z.record(zod.z.string(), zod.z.string()).optional()
|
|
12041
|
+
}), zod.z.array(LogEntrySchema).readonly())
|
|
12042
|
+
},
|
|
12043
|
+
/** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
|
|
12044
|
+
mount: { kind: "skip" }
|
|
12045
|
+
};
|
|
12046
|
+
//#endregion
|
|
12047
12047
|
//#region src/capabilities/login-method.cap.ts
|
|
12048
12048
|
/**
|
|
12049
12049
|
* `login-method` — collection cap through which auth addons contribute
|
|
@@ -18248,14 +18248,65 @@ var MediaFileKindEnum = zod.z.enum([
|
|
|
18248
18248
|
"keyFrameSmall",
|
|
18249
18249
|
"thumbnailSmall"
|
|
18250
18250
|
]);
|
|
18251
|
-
|
|
18251
|
+
/**
|
|
18252
|
+
* One media row's IDENTITY and shape, with no representation of its bytes.
|
|
18253
|
+
*
|
|
18254
|
+
* This is the half of a media row that is cheap: it comes out of the index
|
|
18255
|
+
* without opening a blob, and it is everything a client needs to decide what
|
|
18256
|
+
* to render before it renders anything. Both wire shapes below are this plus
|
|
18257
|
+
* an address; the STORE's own read-back shape ({@link MediaFileBytes}) is this
|
|
18258
|
+
* plus the bytes.
|
|
18259
|
+
*/
|
|
18260
|
+
var MediaFileRefSchema = zod.z.object({
|
|
18252
18261
|
key: zod.z.string(),
|
|
18253
18262
|
kind: MediaFileKindEnum,
|
|
18254
|
-
base64: zod.z.string(),
|
|
18255
18263
|
sizeBytes: zod.z.number(),
|
|
18256
18264
|
timestamp: zod.z.number()
|
|
18257
18265
|
});
|
|
18258
18266
|
/**
|
|
18267
|
+
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
18268
|
+
* ARE — never the bytes themselves.
|
|
18269
|
+
*
|
|
18270
|
+
* ## Why `url` and not `base64`
|
|
18271
|
+
*
|
|
18272
|
+
* Measured on the live hub 2026-08-30: `getTrackMedia {trackId, deviceId}`
|
|
18273
|
+
* with no `kinds` returned 6 rows / **3 597 219 B**, of which `keyFrame` alone
|
|
18274
|
+
* was **2 824 077 B** — one full-resolution frame, base64, so +33 % on the
|
|
18275
|
+
* wire. Forty events is ~144 MB. Every byte of it was read off disk,
|
|
18276
|
+
* base64-encoded, held whole in a unary tRPC envelope, and materialised in
|
|
18277
|
+
* hub-main's heap on the way past — for an `<img>` that would have cached it.
|
|
18278
|
+
*
|
|
18279
|
+
* `url` points at the `event-media` data plane
|
|
18280
|
+
* (`/addon/<addonId>/event-media/<storedKey>`), which serves the same blob
|
|
18281
|
+
* with an ETag and `Cache-Control: immutable`, honours conditional GETs, can
|
|
18282
|
+
* render a `?variant=thumb`, and streams. The hub gate in front of it requires
|
|
18283
|
+
* a bearer or the session cookie (`access: 'authenticated'`), so the bytes are
|
|
18284
|
+
* no less protected than they were inside a `view`-level cap response — see
|
|
18285
|
+
* `data-plane-access.ts` for the rule and the one gap it does not close
|
|
18286
|
+
* (per-device scoping).
|
|
18287
|
+
*
|
|
18288
|
+
* The URL is built from the row's **stored** key, which is not always its
|
|
18289
|
+
* published `kind`: a track's face/plate crop is stored as `crop` under
|
|
18290
|
+
* `('face'|'plate', '<prefix>-<trackId>')` and published as
|
|
18291
|
+
* `faceCrop`/`plateCrop`. `MediaStore.getByKey` knows only the stored key.
|
|
18292
|
+
*
|
|
18293
|
+
* ## `base64` is TRANSITIONAL and is going away
|
|
18294
|
+
*
|
|
18295
|
+
* It is still populated for one reason: the deployed viewer's track-detail
|
|
18296
|
+
* HERO tile reads it (`use-track-media-entry.ts` → `parseMediaFiles`, which
|
|
18297
|
+
* REQUIRES the field), and a row without it parses as a FAILED read — the red
|
|
18298
|
+
* triangle — not as absence. Removing the field before that viewer ships is an
|
|
18299
|
+
* outage, not a cleanup. Once the viewer takes its hero bytes from `url`,
|
|
18300
|
+
* delete this line and the `withBytes` pass-through in
|
|
18301
|
+
* `analytics-query-facade.ts`; nothing else reads it.
|
|
18302
|
+
*/
|
|
18303
|
+
var MediaFileSchema = MediaFileRefSchema.extend({
|
|
18304
|
+
/** `/addon/<addonId>/event-media/<encoded stored key>`. Always present. */
|
|
18305
|
+
url: zod.z.string(),
|
|
18306
|
+
/** @deprecated Transitional — see the schema docblock. Use {@link url}. */
|
|
18307
|
+
base64: zod.z.string()
|
|
18308
|
+
});
|
|
18309
|
+
/**
|
|
18259
18310
|
* One media row WITHOUT its bytes.
|
|
18260
18311
|
*
|
|
18261
18312
|
* A track's media is 5-8 MB of base64 (measured: 7.67 MB across 23 files for a
|
|
@@ -18265,7 +18316,9 @@ var MediaFileSchema = zod.z.object({
|
|
|
18265
18316
|
* blocks the whole view.
|
|
18266
18317
|
*
|
|
18267
18318
|
* `sizeBytes` is carried because it is what lets a client decide between the
|
|
18268
|
-
* stored blob and a `?variant=thumb` rendering without fetching either
|
|
18319
|
+
* stored blob and a `?variant=thumb` rendering without fetching either, and
|
|
18320
|
+
* `url` because a client that had to build the plane path itself is a second
|
|
18321
|
+
* copy of a route — the embed, the viewer and the admin UI each grew one.
|
|
18269
18322
|
*/
|
|
18270
18323
|
var MediaFileInfoSchema = MediaFileSchema.omit({ base64: true });
|
|
18271
18324
|
/**
|
|
@@ -18612,6 +18665,50 @@ var EventStoreFootprintSchema = zod.z.object({
|
|
|
18612
18665
|
totalBytes: zod.z.number().int(),
|
|
18613
18666
|
devices: zod.z.array(EventStoreDeviceFootprintSchema).readonly()
|
|
18614
18667
|
});
|
|
18668
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
18669
|
+
var EventMediaKindFootprintSchema = zod.z.object({
|
|
18670
|
+
kind: MediaFileKindEnum,
|
|
18671
|
+
/** Media rows of this kind. */
|
|
18672
|
+
rows: zod.z.number().int(),
|
|
18673
|
+
/** Bytes on disk held by those rows. */
|
|
18674
|
+
bytes: zod.z.number().int()
|
|
18675
|
+
});
|
|
18676
|
+
/**
|
|
18677
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
18678
|
+
* actually turns on.
|
|
18679
|
+
*
|
|
18680
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
18681
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
18682
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
18683
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
18684
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
18685
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
18686
|
+
*
|
|
18687
|
+
* ## Why `unaccounted*` exists
|
|
18688
|
+
*
|
|
18689
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
18690
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
18691
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
18692
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
18693
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
18694
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
18695
|
+
* against a denominator smaller than the disk.
|
|
18696
|
+
*
|
|
18697
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
18698
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
18699
|
+
*/
|
|
18700
|
+
var EventMediaKindBreakdownSchema = zod.z.object({
|
|
18701
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
18702
|
+
totalRows: zod.z.number().int(),
|
|
18703
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
18704
|
+
totalBytes: zod.z.number().int(),
|
|
18705
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
18706
|
+
kinds: zod.z.array(EventMediaKindFootprintSchema).readonly(),
|
|
18707
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
18708
|
+
unaccountedRows: zod.z.number().int(),
|
|
18709
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
18710
|
+
unaccountedBytes: zod.z.number().int()
|
|
18711
|
+
});
|
|
18615
18712
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
18616
18713
|
var EventPruneCountsSchema = zod.z.object({
|
|
18617
18714
|
motion: zod.z.number().int(),
|
|
@@ -18994,6 +19091,22 @@ var pipelineAnalyticsCapability = {
|
|
|
18994
19091
|
auth: "admin"
|
|
18995
19092
|
}),
|
|
18996
19093
|
/**
|
|
19094
|
+
* The same media footprint, broken down by {@link MediaFileKind} instead of
|
|
19095
|
+
* by camera — fleet-wide, or for one camera with `deviceId`.
|
|
19096
|
+
*
|
|
19097
|
+
* Separate from {@link getEventStoreFootprint} rather than a field on it:
|
|
19098
|
+
* the two answer different questions on different axes, the per-camera one
|
|
19099
|
+
* is what the management table renders on every open, and nothing should
|
|
19100
|
+
* pay for a per-kind pass to draw it. See
|
|
19101
|
+
* {@link EventMediaKindBreakdownSchema} for why `unaccounted*` exists —
|
|
19102
|
+
* `kinds` is enumerated, `totalBytes` is not, and the gap must be visible
|
|
19103
|
+
* to anyone sizing a deletion against it.
|
|
19104
|
+
*/
|
|
19105
|
+
getEventMediaFootprintByKind: require_sleep.method(zod.z.object({ deviceId: zod.z.number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19106
|
+
kind: "query",
|
|
19107
|
+
auth: "admin"
|
|
19108
|
+
}),
|
|
19109
|
+
/**
|
|
18997
19110
|
* Cluster-wide prune of events older than `olderThanMs` (exclusive) across
|
|
18998
19111
|
* every camera, deleting each event's media in lockstep. Logged to the
|
|
18999
19112
|
* events ops-log with `reason` (default `'retention'`). Returns the summed
|
|
@@ -19398,6 +19511,26 @@ var pipelineAnalyticsCapability = {
|
|
|
19398
19511
|
deviceId: zod.z.number()
|
|
19399
19512
|
}), zod.z.array(MediaFileInfoSchema).readonly()),
|
|
19400
19513
|
/**
|
|
19514
|
+
* What media an EVENT has, without any of it — the twin `getEventMedia`
|
|
19515
|
+
* never had.
|
|
19516
|
+
*
|
|
19517
|
+
* `listTrackMedia` above got this treatment because a track's media is
|
|
19518
|
+
* 5-8 MB. An event's is worse per row, not better: an old-style event owns
|
|
19519
|
+
* a `crop` AND a native-resolution `fullFrameBoxed`, and the track DETAIL
|
|
19520
|
+
* modal — the one surface that legitimately shows the big kinds — unions
|
|
19521
|
+
* both listings to build its filmstrip. It then renders every tile from
|
|
19522
|
+
* the `event-media` plane by key and throws the bytes away. Measured on
|
|
19523
|
+
* the live hub: one event's `fullFrameBoxed` is 2 824 077 B, base64'd to
|
|
19524
|
+
* ~3.8 MB, allocated whole in hub-main's heap, for a list of keys.
|
|
19525
|
+
*
|
|
19526
|
+
* Same `deviceId` authorization subject as `getEventMedia`, and the same
|
|
19527
|
+
* rows — this is a projection of that method, never a different question.
|
|
19528
|
+
*/
|
|
19529
|
+
listEventMedia: require_sleep.method(zod.z.object({
|
|
19530
|
+
eventId: zod.z.string(),
|
|
19531
|
+
deviceId: zod.z.number()
|
|
19532
|
+
}), zod.z.array(MediaFileInfoSchema).readonly()),
|
|
19533
|
+
/**
|
|
19401
19534
|
* Search object events by text query using CLIP cosine similarity.
|
|
19402
19535
|
* Encodes `text` via the `embedding-encoder` cap, queries the
|
|
19403
19536
|
* `ObjectEmbeddingStore` with optional prefilters, ranks all matching
|
|
@@ -22192,6 +22325,20 @@ var storageCapability = {
|
|
|
22192
22325
|
listProviders: require_sleep.method(zod.z.void(), zod.z.array(ProviderListEntrySchema).readonly()),
|
|
22193
22326
|
testConfig: require_sleep.method(zod.z.object({
|
|
22194
22327
|
providerId: zod.z.string(),
|
|
22328
|
+
/**
|
|
22329
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
22330
|
+
*
|
|
22331
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
22332
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
22333
|
+
* credential the operator did not retype — and posting that here
|
|
22334
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
22335
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
22336
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
22337
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
22338
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
22339
|
+
* every value was typed just now and nothing is stored yet.
|
|
22340
|
+
*/
|
|
22341
|
+
locationId: zod.z.string().optional(),
|
|
22195
22342
|
config: zod.z.record(zod.z.string(), zod.z.unknown())
|
|
22196
22343
|
}), zod.z.object({
|
|
22197
22344
|
ok: zod.z.boolean(),
|
|
@@ -26223,10 +26370,24 @@ var FaceClusterSchema = zod.z.object({
|
|
|
26223
26370
|
size: zod.z.number().int(),
|
|
26224
26371
|
cohesion: zod.z.number()
|
|
26225
26372
|
});
|
|
26373
|
+
/**
|
|
26374
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
26375
|
+
* are — never the bytes.
|
|
26376
|
+
*
|
|
26377
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
26378
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
26379
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
26380
|
+
* caller is the admin UI's detail modal, which was building
|
|
26381
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
26382
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
26383
|
+
*
|
|
26384
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
26385
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
26386
|
+
*/
|
|
26226
26387
|
var MediaFileLiteSchema$1 = zod.z.object({
|
|
26227
26388
|
key: zod.z.string(),
|
|
26228
26389
|
kind: zod.z.string(),
|
|
26229
|
-
|
|
26390
|
+
url: zod.z.string(),
|
|
26230
26391
|
sizeBytes: zod.z.number(),
|
|
26231
26392
|
timestamp: zod.z.number()
|
|
26232
26393
|
});
|
|
@@ -29724,10 +29885,24 @@ var PlateInfoSchema = zod.z.object({
|
|
|
29724
29885
|
*/
|
|
29725
29886
|
cropUrl: zod.z.string().optional()
|
|
29726
29887
|
});
|
|
29888
|
+
/**
|
|
29889
|
+
* One gallery media row: what the crop is, how big it is, and WHERE its bytes
|
|
29890
|
+
* are — never the bytes.
|
|
29891
|
+
*
|
|
29892
|
+
* `base64` was deleted here rather than deprecated. `MediaFile.base64` (the
|
|
29893
|
+
* track/event contract) is still populated because a deployed viewer requires
|
|
29894
|
+
* the field to parse a row at all; this method has no such reader. Its ONE
|
|
29895
|
+
* caller is the admin UI's detail modal, which was building
|
|
29896
|
+
* `data:image/jpeg;base64,…` from a row whose `key` sat right beside it, in a
|
|
29897
|
+
* dialog already rendering its key FRAME from the `event-media` plane.
|
|
29898
|
+
*
|
|
29899
|
+
* `url` is `/addon/<addonId>/event-media/<encoded key>`. The plane resolves a
|
|
29900
|
+
* media key directly, so this needed no new plane and no new access decision.
|
|
29901
|
+
*/
|
|
29727
29902
|
var MediaFileLiteSchema = zod.z.object({
|
|
29728
29903
|
key: zod.z.string(),
|
|
29729
29904
|
kind: zod.z.string(),
|
|
29730
|
-
|
|
29905
|
+
url: zod.z.string(),
|
|
29731
29906
|
sizeBytes: zod.z.number(),
|
|
29732
29907
|
timestamp: zod.z.number()
|
|
29733
29908
|
});
|
|
@@ -41420,6 +41595,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
41420
41595
|
addonId: null,
|
|
41421
41596
|
access: "view"
|
|
41422
41597
|
},
|
|
41598
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
41599
|
+
capName: "pipeline-analytics",
|
|
41600
|
+
capScope: "device",
|
|
41601
|
+
addonId: null,
|
|
41602
|
+
access: "view"
|
|
41603
|
+
},
|
|
41423
41604
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
41424
41605
|
capName: "pipeline-analytics",
|
|
41425
41606
|
capScope: "device",
|
|
@@ -41516,6 +41697,12 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
41516
41697
|
addonId: null,
|
|
41517
41698
|
access: "view"
|
|
41518
41699
|
},
|
|
41700
|
+
"pipelineAnalytics.listEventMedia": {
|
|
41701
|
+
capName: "pipeline-analytics",
|
|
41702
|
+
capScope: "device",
|
|
41703
|
+
addonId: null,
|
|
41704
|
+
access: "view"
|
|
41705
|
+
},
|
|
41519
41706
|
"pipelineAnalytics.listGroups": {
|
|
41520
41707
|
capName: "pipeline-analytics",
|
|
41521
41708
|
capScope: "device",
|
|
@@ -45342,6 +45529,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
45342
45529
|
form: "single",
|
|
45343
45530
|
optional: false
|
|
45344
45531
|
}],
|
|
45532
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
45533
|
+
name: "deviceId",
|
|
45534
|
+
form: "single",
|
|
45535
|
+
optional: true
|
|
45536
|
+
}],
|
|
45345
45537
|
"pipelineAnalytics.getGroup": [{
|
|
45346
45538
|
name: "deviceId",
|
|
45347
45539
|
form: "single",
|
|
@@ -45402,6 +45594,11 @@ var METHOD_DEVICE_SELECTORS = Object.freeze({
|
|
|
45402
45594
|
form: "array",
|
|
45403
45595
|
optional: false
|
|
45404
45596
|
}],
|
|
45597
|
+
"pipelineAnalytics.listEventMedia": [{
|
|
45598
|
+
name: "deviceId",
|
|
45599
|
+
form: "single",
|
|
45600
|
+
optional: false
|
|
45601
|
+
}],
|
|
45405
45602
|
"pipelineAnalytics.listGroups": [{
|
|
45406
45603
|
name: "deviceIds",
|
|
45407
45604
|
form: "array",
|
|
@@ -51779,6 +51976,8 @@ exports.MaskRectShapeSchema = MaskRectShapeSchema;
|
|
|
51779
51976
|
exports.MaskShapeKindSchema = MaskShapeKindSchema;
|
|
51780
51977
|
exports.MaskShapeSchema = MaskShapeSchema;
|
|
51781
51978
|
exports.MediaFileInfoSchema = MediaFileInfoSchema;
|
|
51979
|
+
exports.MediaFileKindEnum = MediaFileKindEnum;
|
|
51980
|
+
exports.MediaFileRefSchema = MediaFileRefSchema;
|
|
51782
51981
|
exports.MediaFileSchema = MediaFileSchema;
|
|
51783
51982
|
exports.MediaPlayerRepeatSchema = MediaPlayerRepeatSchema;
|
|
51784
51983
|
exports.MediaPlayerStateSchema = MediaPlayerStateSchema;
|