@camstack/addon-osd-manager 0.1.122 → 0.1.124
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/{MotionZonesSettings-De9jWRua.mjs → MotionZonesSettings-DOFOB5MX.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-DTroGBjn.mjs → PrivacyMaskSettings-9rCXAZlR.mjs} +4 -4
- package/dist/{SceneMonitorEditor-CmAP9oBX.mjs → SceneMonitorEditor-D2ATIIZD.mjs} +3 -3
- package/dist/_stub.js +12 -12
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-DHyei7uF.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-B2cBM7jE.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BK-eslgm.mjs +26 -0
- package/dist/addon-osd-manager.css +1 -1
- package/dist/{hostInit-Boz2o85e.mjs → hostInit-Du2Me1GR.mjs} +2 -2
- package/dist/index.js +403 -18
- package/dist/index.mjs +403 -18
- package/dist/{player-overlays-B4bQG7Zk.mjs → player-overlays-CMeXfcep.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-BQ-roliB.mjs → responsive-CC0j2h-d.mjs} +1 -1
- package/dist/{scene-monitor-copy-a2fD65-t.mjs → scene-monitor-copy-CjiHJ4pT.mjs} +1 -1
- package/dist/{square-BnphANwM.mjs → square-hvOcBhdH.mjs} +1 -1
- package/dist/{trash-2-UWP69ygY.mjs → trash-2-rb-x3jwf.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-CWN5igsE.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-D8j_yb3G.mjs} +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C1Dujrj5.mjs +0 -26
package/dist/index.js
CHANGED
|
@@ -5363,7 +5363,7 @@ var ZodIssueCode = {
|
|
|
5363
5363
|
var ZodFirstPartyTypeKind;
|
|
5364
5364
|
ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
|
|
5365
5365
|
//#endregion
|
|
5366
|
-
//#region ../types/dist/sleep-
|
|
5366
|
+
//#region ../types/dist/sleep-CopaBJss.mjs
|
|
5367
5367
|
/**
|
|
5368
5368
|
* The audio chunk plane's byte format, and the ONE expansion from a coded
|
|
5369
5369
|
* window to float samples (D455).
|
|
@@ -5563,6 +5563,12 @@ Object.fromEntries([
|
|
|
5563
5563
|
icon: "circle-dot",
|
|
5564
5564
|
order: 40
|
|
5565
5565
|
},
|
|
5566
|
+
{
|
|
5567
|
+
id: "clips",
|
|
5568
|
+
label: "Clips",
|
|
5569
|
+
icon: "clapperboard",
|
|
5570
|
+
order: 41
|
|
5571
|
+
},
|
|
5566
5572
|
{
|
|
5567
5573
|
id: "engine",
|
|
5568
5574
|
label: "Inference Engine",
|
|
@@ -8307,11 +8313,31 @@ var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
|
8307
8313
|
* band engine's `applies` rule). `start`/`end` are `HH:MM`; an `end <= start`
|
|
8308
8314
|
* span wraps past midnight (handled by the band engine).
|
|
8309
8315
|
*/
|
|
8316
|
+
/**
|
|
8317
|
+
* Whether a band's footage carries sound.
|
|
8318
|
+
*
|
|
8319
|
+
* The recorder has always attached with `audio: 'aac'`, so every band of every
|
|
8320
|
+
* camera recorded sound whether anyone wanted it or not. The broker already
|
|
8321
|
+
* serves the other answer — `audio: 'none'` takes the video-only `/muted`
|
|
8322
|
+
* restream — so this was a choice the product could always have offered.
|
|
8323
|
+
*
|
|
8324
|
+
* It belongs on the BAND rather than the camera because one camera can want
|
|
8325
|
+
* both: silent across the shop floor during opening hours, sound overnight.
|
|
8326
|
+
* And it applies to BOTH modes — an events band firing on motion has the same
|
|
8327
|
+
* question to answer as a continuous one.
|
|
8328
|
+
*/
|
|
8329
|
+
var RecordingBandAudioSchema = _enum(["on", "muted"]);
|
|
8310
8330
|
var RecordingBandSchema = object({
|
|
8311
8331
|
days: array(RecordingWeekdaySchema),
|
|
8312
8332
|
start: string().regex(HHMM),
|
|
8313
8333
|
end: string().regex(HHMM),
|
|
8314
8334
|
mode: RecordingBandModeSchema,
|
|
8335
|
+
/**
|
|
8336
|
+
* Sound, or silence. OPTIONAL and absent-means-`on`: every recording
|
|
8337
|
+
* written before this existed carried sound, and a band whose key is
|
|
8338
|
+
* missing must keep meaning what it meant. See {@link RecordingBandAudioSchema}.
|
|
8339
|
+
*/
|
|
8340
|
+
audio: RecordingBandAudioSchema.optional(),
|
|
8315
8341
|
triggers: RecordingBandTriggersSchema.optional(),
|
|
8316
8342
|
/**
|
|
8317
8343
|
* RETIRED (D381). A band no longer carries a pre-buffer of its own.
|
|
@@ -15920,14 +15946,30 @@ var deviceManagerCapability = {
|
|
|
15920
15946
|
*/
|
|
15921
15947
|
getAllBindings: method(object({}), array(DeviceBindingsForDeviceSchema)),
|
|
15922
15948
|
/**
|
|
15923
|
-
* Activate (or deactivate) a wrapper addon
|
|
15924
|
-
*
|
|
15925
|
-
*
|
|
15949
|
+
* Activate (or deactivate) a wrapper addon — or ONE of its sources — for a
|
|
15950
|
+
* (device, cap) pair.
|
|
15951
|
+
*
|
|
15952
|
+
* Persists the binding via ctx.settings; `active: false` on a SINGLETON cap
|
|
15953
|
+
* clears the wrapper (falling back to native if one is registered). On a
|
|
15954
|
+
* COLLECTION cap it adds to the per-device DENY set instead, and the
|
|
15955
|
+
* wrapper binding is left exactly as it was — a cap with several sources
|
|
15956
|
+
* has no "which one" for `getBindings` to answer (D556).
|
|
15957
|
+
*
|
|
15958
|
+
* `sourceId` is what makes the switch match its label. One addon can serve
|
|
15959
|
+
* several of a device's sources (`addon-provider-reolink` answers a hub
|
|
15960
|
+
* child with `native:reolink:onboard` AND `native:reolink:hub`), so a
|
|
15961
|
+
* toggle keyed by addon would turn off both while saying it turned off one
|
|
15962
|
+
* — the D62 defect with the polarity reversed (D557). Naming the source
|
|
15963
|
+
* denies exactly that source. OMITTING it keeps the cap-wide meaning
|
|
15964
|
+
* D556 shipped: every source this addon serves for this device, which is
|
|
15965
|
+
* also how a deny entry persisted before the re-key is still read.
|
|
15926
15966
|
*/
|
|
15927
15967
|
setWrapperActive: method(object({
|
|
15928
15968
|
deviceId: number(),
|
|
15929
15969
|
capName: string(),
|
|
15930
15970
|
wrapperAddonId: string(),
|
|
15971
|
+
/** The `ClipSource.source` id to toggle. Absent = all of the addon's. */
|
|
15972
|
+
sourceId: string().optional(),
|
|
15931
15973
|
active: boolean()
|
|
15932
15974
|
}), _void(), {
|
|
15933
15975
|
kind: "mutation",
|
|
@@ -27089,10 +27131,9 @@ var ServerBootModeSchema = _enum([
|
|
|
27089
27131
|
* - `idle` / `checking` / `staging` — steady / in-flight registry work.
|
|
27090
27132
|
* - `pending-restart` — a version is staged and the node has NOT yet
|
|
27091
27133
|
* restarted onto it (still running the OLD version).
|
|
27092
|
-
* - `awaiting-confirmation` —
|
|
27093
|
-
*
|
|
27094
|
-
*
|
|
27095
|
-
* manually restarted, or the probation boot auto-rolls-back.
|
|
27134
|
+
* - `awaiting-confirmation` — RETIRED with the probation boot (single-copy
|
|
27135
|
+
* collapse, 2026-07-18). Kept in the enum so an older client still parses;
|
|
27136
|
+
* no provider emits it.
|
|
27096
27137
|
*/
|
|
27097
27138
|
var ServerUpdateStateSchema = _enum([
|
|
27098
27139
|
"idle",
|
|
@@ -27181,12 +27222,35 @@ var ServerRollbackInfoSchema = object({
|
|
|
27181
27222
|
var ServerPackageStatusSchema = object({
|
|
27182
27223
|
/** Root package name (`@camstack/server` on the hub). */
|
|
27183
27224
|
packageName: string(),
|
|
27184
|
-
/**
|
|
27225
|
+
/**
|
|
27226
|
+
* Version of the code THIS PROCESS loaded — captured once, at boot, from the
|
|
27227
|
+
* package.json of the copy the code was loaded from, and never re-read. A
|
|
27228
|
+
* copy replaced on disk under a live process must not move this number;
|
|
27229
|
+
* that divergence is what `installedVersion` is for. Before 2026-09-20 this
|
|
27230
|
+
* was a lazy disk read that would have followed such a swap silently.
|
|
27231
|
+
*/
|
|
27185
27232
|
runningVersion: string().nullable(),
|
|
27186
27233
|
/** Node.js runtime version the node's process runs on (`process.versions.node`). */
|
|
27187
27234
|
nodeRuntimeVersion: string().nullable(),
|
|
27188
27235
|
/** Active data-dir root version; null when booted from seed/workspace. */
|
|
27189
27236
|
activeVersion: string().nullable(),
|
|
27237
|
+
/**
|
|
27238
|
+
* Version of the root package in the data-root `current/` copy RIGHT NOW —
|
|
27239
|
+
* what the next boot would load if nothing is staged. Normally equal to
|
|
27240
|
+
* `runningVersion`; differs only when the copy on disk changed under the
|
|
27241
|
+
* live process. `null` when there is no data-root copy (baked seed or
|
|
27242
|
+
* workspace boot). Optional for version skew: an older provider omits it.
|
|
27243
|
+
*/
|
|
27244
|
+
installedVersion: string().nullable().optional(),
|
|
27245
|
+
/**
|
|
27246
|
+
* True when the code that would run after a restart is NOT the code running
|
|
27247
|
+
* now: a version is staged (`pendingVersion`), or `installedVersion` differs
|
|
27248
|
+
* from `runningVersion`. Derived on every read, never stored. This is the
|
|
27249
|
+
* one field that lets an operator or a script say "1.2.353 is installed and
|
|
27250
|
+
* will run after a restart" instead of reading it off a number that means
|
|
27251
|
+
* "installed". Optional for version skew.
|
|
27252
|
+
*/
|
|
27253
|
+
restartRequired: boolean().optional(),
|
|
27190
27254
|
/** N-1 version kept for rollback; null when no previous version exists. */
|
|
27191
27255
|
previousVersion: string().nullable(),
|
|
27192
27256
|
/** Version of the immutable baked seed closure (image fallback). */
|
|
@@ -27221,19 +27285,71 @@ var ServerPackageStatusSchema = object({
|
|
|
27221
27285
|
});
|
|
27222
27286
|
var ServerUpdateCheckResultSchema = object({
|
|
27223
27287
|
packageName: string(),
|
|
27288
|
+
/** Same meaning as on the status payload: what THIS process loaded. */
|
|
27224
27289
|
runningVersion: string().nullable(),
|
|
27225
27290
|
latestVersion: string().nullable(),
|
|
27291
|
+
/**
|
|
27292
|
+
* `latestVersion` is newer than `runningVersion` AND is not the version
|
|
27293
|
+
* already staged on this node. A staged-and-waiting version is not "an
|
|
27294
|
+
* update available" — applying it again is refused (`already-staged`), and
|
|
27295
|
+
* a button that announced "updating…" on this boolean then got refused
|
|
27296
|
+
* would be lying. It is reported through `pendingVersion` instead.
|
|
27297
|
+
*/
|
|
27226
27298
|
updateAvailable: boolean(),
|
|
27227
27299
|
checkedAtMs: number(),
|
|
27228
27300
|
/** Non-null when the registry lookup failed (offline, bad registry, …). */
|
|
27229
|
-
error: string().nullable()
|
|
27301
|
+
error: string().nullable(),
|
|
27302
|
+
/**
|
|
27303
|
+
* Version staged on this node and awaiting its restart, when one is. Before
|
|
27304
|
+
* 2026-09-20 a check answered `{runningVersion, updateAvailable:false}` for a
|
|
27305
|
+
* node whose staged closure had never booted, and the caller had no way to
|
|
27306
|
+
* see the difference. Optional for version skew.
|
|
27307
|
+
*/
|
|
27308
|
+
pendingVersion: string().nullable().optional(),
|
|
27309
|
+
/** See the status payload: staged, or installed-on-disk ≠ running. Optional for skew. */
|
|
27310
|
+
restartRequired: boolean().optional()
|
|
27230
27311
|
});
|
|
27312
|
+
/**
|
|
27313
|
+
* What an action DID — the discriminant `accepted` cannot carry. Before
|
|
27314
|
+
* 2026-09-20 `applyServerUpdate` answered `accepted:false` both for a refusal
|
|
27315
|
+
* where nothing was wrong (already current, already staged) and for a staging
|
|
27316
|
+
* install that died on `npm error code ECONNRESET`; the only difference was
|
|
27317
|
+
* prose in `message`, and an operator restarted a container on the strength of
|
|
27318
|
+
* it, booting the previous version.
|
|
27319
|
+
*
|
|
27320
|
+
* - `staged` — the closure is installed and validated; the node
|
|
27321
|
+
* restarts to apply it (`restarting:true`). NOTHING
|
|
27322
|
+
* runs the new code until that restart completes.
|
|
27323
|
+
* - `restart-scheduled` — a plain, version-preserving restart was accepted.
|
|
27324
|
+
* - `already-current` — the target IS the running version; nothing done.
|
|
27325
|
+
* - `refused` — dropped by a gate; `reason` names which.
|
|
27326
|
+
* - `failed` — attempted and did not land; `error` says why.
|
|
27327
|
+
*/
|
|
27328
|
+
var ServerUpdateOutcomeSchema = _enum([
|
|
27329
|
+
"staged",
|
|
27330
|
+
"restart-scheduled",
|
|
27331
|
+
"already-current",
|
|
27332
|
+
"refused",
|
|
27333
|
+
"failed"
|
|
27334
|
+
]);
|
|
27231
27335
|
var ServerUpdateActionResultSchema = object({
|
|
27232
27336
|
accepted: boolean(),
|
|
27233
27337
|
targetVersion: string().nullable(),
|
|
27234
27338
|
/** True when a graceful restart was scheduled to apply the change. */
|
|
27235
27339
|
restarting: boolean(),
|
|
27236
|
-
message: string()
|
|
27340
|
+
message: string(),
|
|
27341
|
+
/** See {@link ServerUpdateOutcomeSchema}. Optional for version skew. */
|
|
27342
|
+
outcome: ServerUpdateOutcomeSchema.optional(),
|
|
27343
|
+
/**
|
|
27344
|
+
* Stable, greppable cause for `refused` / `failed` (the engine's
|
|
27345
|
+
* `UpdateRefusalReason`, `staging-failed`, …). `null` on success.
|
|
27346
|
+
*/
|
|
27347
|
+
reason: string().nullable().optional(),
|
|
27348
|
+
/**
|
|
27349
|
+
* The failure itself, verbatim enough to act on (the npm output for a
|
|
27350
|
+
* staging install). Non-null only for `failed`.
|
|
27351
|
+
*/
|
|
27352
|
+
error: string().nullable().optional()
|
|
27237
27353
|
});
|
|
27238
27354
|
var serverManagementCapability = {
|
|
27239
27355
|
name: "server-management",
|
|
@@ -28924,41 +29040,299 @@ var ClipSchema = object({
|
|
|
28924
29040
|
holes: array(object({
|
|
28925
29041
|
startMs: number(),
|
|
28926
29042
|
endMs: number()
|
|
28927
|
-
})).optional()
|
|
29043
|
+
})).optional(),
|
|
29044
|
+
/**
|
|
29045
|
+
* A URL that MAY produce this clip's still, asked only for rows actually on
|
|
29046
|
+
* screen. The opposite of {@link ClipSchema.thumbnail}: that one is VOUCHED
|
|
29047
|
+
* (a JPEG is already on disk), this one is an offer. The route answers 200
|
|
29048
|
+
* with the image, or 204 with `x-camstack-reason` when it could not mint one
|
|
29049
|
+
* — a surface latches that refusal to the instant rather than retrying.
|
|
29050
|
+
*
|
|
29051
|
+
* Never both: a clip with a vouched `thumbnail` needs no mint.
|
|
29052
|
+
*/
|
|
29053
|
+
thumbnailMint: string().optional(),
|
|
29054
|
+
/**
|
|
29055
|
+
* Why no still will be produced for this clip RIGHT NOW — set when the
|
|
29056
|
+
* provider already knows, so the surface draws the glyph and the reason
|
|
29057
|
+
* instead of firing a mint that cannot succeed.
|
|
29058
|
+
*
|
|
29059
|
+
* `sleeping` — a standalone battery camera; a read would be a wake (D549 4).
|
|
29060
|
+
* `camera-refused` — the camera answered the CoverPreview with a refusal.
|
|
29061
|
+
* `no-keyframe` — the window holds no decodable I-frame (an event that sits
|
|
29062
|
+
* inside no file is the measured case).
|
|
29063
|
+
* `unsupported` — this source cannot mint stills at all.
|
|
29064
|
+
*/
|
|
29065
|
+
thumbnailUnavailable: object({ reason: _enum([
|
|
29066
|
+
"sleeping",
|
|
29067
|
+
"camera-refused",
|
|
29068
|
+
"no-keyframe",
|
|
29069
|
+
"unsupported"
|
|
29070
|
+
]) }).optional(),
|
|
29071
|
+
/**
|
|
29072
|
+
* When the catalog this row came from was last CONFIRMED against the device.
|
|
29073
|
+
* Absent means "this row was read live". A persisted catalog served while a
|
|
29074
|
+
* camera sleeps carries the age it really has — a cached list is never drawn
|
|
29075
|
+
* as current (D549 13).
|
|
29076
|
+
*/
|
|
29077
|
+
catalogAsOf: number().optional(),
|
|
29078
|
+
/**
|
|
29079
|
+
* The camera's OWN type strings for this clip, all of them, unmapped
|
|
29080
|
+
* (`md`, `people`, `dog_cat`, `sched`, …). Kept beside {@link labels}
|
|
29081
|
+
* because a firmware inventing a type must not vanish: the mapping into our
|
|
29082
|
+
* filter vocabulary is lossy on purpose and this is the lossless copy
|
|
29083
|
+
* (D549 20).
|
|
29084
|
+
*/
|
|
29085
|
+
nativeTypes: array(string()).optional(),
|
|
29086
|
+
/**
|
|
29087
|
+
* What the subject DID — `crossline`, `intrude`, `loitering`. A behaviour
|
|
29088
|
+
* travels BESIDE a class, never instead of one, and the class filter ignores
|
|
29089
|
+
* it: "a person crossed a line" is still a person (D549 20).
|
|
29090
|
+
*/
|
|
29091
|
+
behaviours: array(string()).optional(),
|
|
29092
|
+
/**
|
|
29093
|
+
* The same recording as two files — the sub twin (what the row and its
|
|
29094
|
+
* thumbnail are) and its main twin, matched at listing time so a quality
|
|
29095
|
+
* change never re-searches the camera (D549 15). `getClipPlayback`'s
|
|
29096
|
+
* `profile` picks between them: `low | mid` → sub, `high` → main.
|
|
29097
|
+
*/
|
|
29098
|
+
streams: object({
|
|
29099
|
+
sub: object({
|
|
29100
|
+
id: string(),
|
|
29101
|
+
bytes: number().optional()
|
|
29102
|
+
}).optional(),
|
|
29103
|
+
main: object({
|
|
29104
|
+
id: string(),
|
|
29105
|
+
bytes: number().optional()
|
|
29106
|
+
}).optional()
|
|
29107
|
+
}).optional(),
|
|
29108
|
+
/** The camera says it holds a sub-stream copy of this recording. */
|
|
29109
|
+
supportSub: boolean().optional(),
|
|
29110
|
+
/**
|
|
29111
|
+
* Whether this row has bytes behind it. ABSENT means yes — every clip that
|
|
29112
|
+
* IS a file is playable, and only a source that lists EVENTS can produce a
|
|
29113
|
+
* row with nothing to play (the measured case: 1 of 29 hub events on 3628
|
|
29114
|
+
* fell inside no file). Such a row is shown, never dropped and never offered
|
|
29115
|
+
* as playable-then-failing (D549 19).
|
|
29116
|
+
*/
|
|
29117
|
+
playable: boolean().optional(),
|
|
29118
|
+
/** Why {@link playable} is false, verbatim (`no-file-for-window`). */
|
|
29119
|
+
unplayableReason: string().optional()
|
|
28928
29120
|
});
|
|
28929
29121
|
var ClipPlaybackSchema = object({
|
|
28930
|
-
/**
|
|
29122
|
+
/**
|
|
29123
|
+
* A media URL through the hub data-plane. {@link ClipPlaybackSchema.format}
|
|
29124
|
+
* says what kind — an HLS master playlist for a recording-derived clip, a
|
|
29125
|
+
* progressive MP4 for a native file the vendor addon muxed and serves with
|
|
29126
|
+
* `Range`. The URL is NOT a credential: both planes are registered
|
|
29127
|
+
* `access: 'authenticated'` and the hub's `/addon/<id>/<prefix>` proxy takes
|
|
29128
|
+
* the session cookie, so nothing is appended to it (D549 22).
|
|
29129
|
+
*/
|
|
28931
29130
|
playbackUrl: string(),
|
|
29131
|
+
/**
|
|
29132
|
+
* How to play {@link playbackUrl}. Absent means `hls` — the shape every
|
|
29133
|
+
* existing consumer already assumes. A player that branches on this is the
|
|
29134
|
+
* one change a native clip needs; a player that ignores it will hand an MP4
|
|
29135
|
+
* to hls.js and fail parsing it as a manifest.
|
|
29136
|
+
*/
|
|
29137
|
+
format: _enum(["hls", "mp4"]).optional(),
|
|
29138
|
+
/**
|
|
29139
|
+
* Which twin was actually served. A clip that holds only one stream answers
|
|
29140
|
+
* with the one it has, and the surface SAYS so — a missing main twin is
|
|
29141
|
+
* never served silently as if it were the asked-for quality (D549 15).
|
|
29142
|
+
*/
|
|
29143
|
+
served: CamProfileSchema.optional(),
|
|
28932
29144
|
/** Optional LAN/remote alternates for the same clip. */
|
|
28933
29145
|
playbackEndpoints: array(string()).optional(),
|
|
28934
29146
|
token: string().optional()
|
|
28935
29147
|
});
|
|
29148
|
+
/**
|
|
29149
|
+
* Why a source cannot answer right now — per SOURCE, never fleet-wide.
|
|
29150
|
+
*
|
|
29151
|
+
* `ok` is the only state whose clip list may be read as complete. The other
|
|
29152
|
+
* three exist because an empty list from a sleeping camera reads as "this
|
|
29153
|
+
* camera has no recordings", which is the defect this whole line of work is
|
|
29154
|
+
* about: a battery camera nobody woke (`sleeping`), a camera that could not be
|
|
29155
|
+
* reached at all (`unreachable`, also what a provider that THREW reports), a
|
|
29156
|
+
* camera whose SD card is not mounted (`no-storage`, measured on 640 —
|
|
29157
|
+
* `HddInfo mount 0`, honestly nothing to list rather than "no clips"), and a
|
|
29158
|
+
* camera whose OWN index disagrees with its OWN calendar (`index-empty`,
|
|
29159
|
+
* measured on 618: the calendar marks 3–20 September, days 6–20 list zero
|
|
29160
|
+
* files on both streams and both filters, with 177 GB free). That last one is
|
|
29161
|
+
* a defect ON THE CAMERA, and the only honest thing a provider can do is say
|
|
29162
|
+
* which days it asked for and got nothing — "no clips" would be a lie about a
|
|
29163
|
+
* card that is full of them.
|
|
29164
|
+
*/
|
|
29165
|
+
var ClipSourceAvailabilitySchema = object({
|
|
29166
|
+
state: _enum([
|
|
29167
|
+
"ok",
|
|
29168
|
+
"sleeping",
|
|
29169
|
+
"unreachable",
|
|
29170
|
+
"no-storage",
|
|
29171
|
+
"index-empty"
|
|
29172
|
+
]),
|
|
29173
|
+
/** Free text, shown verbatim. Names the camera's own refusal when there is one. */
|
|
29174
|
+
reason: string().optional(),
|
|
29175
|
+
/** When this source's catalog was last CONFIRMED. A cached list is never
|
|
29176
|
+
* drawn as current: the surface shows the age whenever it is older than the
|
|
29177
|
+
* refresh interval. */
|
|
29178
|
+
catalogAsOf: number().optional()
|
|
29179
|
+
});
|
|
29180
|
+
/**
|
|
29181
|
+
* One SOURCE of clips for a camera — a row of the picker, and the namespace
|
|
29182
|
+
* every clip id from it is prefixed with (`analytics`,
|
|
29183
|
+
* `native:reolink:onboard`, `hksv`, …).
|
|
29184
|
+
*
|
|
29185
|
+
* A provider lists the sources IT serves for that device, and answers for each
|
|
29186
|
+
* of them whether it can answer at all. A provider with nothing to offer on a
|
|
29187
|
+
* camera returns `[]` — it is not that camera's business.
|
|
29188
|
+
*/
|
|
29189
|
+
var ClipSourceSchema = object({
|
|
29190
|
+
/** The value this source stamps on {@link ClipSchema.source}, and the prefix
|
|
29191
|
+
* of every clip id it mints. `getClipPlayback` routes on it. */
|
|
29192
|
+
source: string(),
|
|
29193
|
+
/** Operator-facing name of the source ("CamStack recordings", "SD card"). */
|
|
29194
|
+
label: string(),
|
|
29195
|
+
/**
|
|
29196
|
+
* The addon that SERVES this row.
|
|
29197
|
+
*
|
|
29198
|
+
* A surface cannot otherwise resolve a source to who answers it, and the
|
|
29199
|
+
* alternative — a `native:reolink:* → provider-reolink` table inside the
|
|
29200
|
+
* widget — is a second authority on provider identity living in the one
|
|
29201
|
+
* package with no business knowing it, wrong the day a third source appears
|
|
29202
|
+
* (D557). One addon may serve SEVERAL sources: `addon-provider-reolink`
|
|
29203
|
+
* answers a hub child with both `native:reolink:onboard` and
|
|
29204
|
+
* `native:reolink:hub`, which is why the per-device switch is keyed by
|
|
29205
|
+
* SOURCE and not by this (D555).
|
|
29206
|
+
*
|
|
29207
|
+
* Optional for version skew only. The collection dispatcher stamps it from
|
|
29208
|
+
* the registry, so a row that travelled through the fan-out carries the
|
|
29209
|
+
* authoritative id whatever the provider filled in.
|
|
29210
|
+
*/
|
|
29211
|
+
addonId: string().optional(),
|
|
29212
|
+
/**
|
|
29213
|
+
* Which API this source resolved to FOR THIS CAMERA, when it has a choice.
|
|
29214
|
+
*
|
|
29215
|
+
* A source may cover one store through more than one surface — the Reolink
|
|
29216
|
+
* provider reads a hub child through the parent's event log and a standalone
|
|
29217
|
+
* through its own file list, because that is what each camera answers. The
|
|
29218
|
+
* CHOICE is the provider's, made from what the camera is, and is never a row
|
|
29219
|
+
* the operator has to understand; but it is REPORTED, because a source that
|
|
29220
|
+
* silently reads a different API on two cameras and then behaves differently
|
|
29221
|
+
* is the thing nobody can debug later. Absent when the source has only one
|
|
29222
|
+
* way to read its store.
|
|
29223
|
+
*/
|
|
29224
|
+
via: string().optional(),
|
|
29225
|
+
availability: ClipSourceAvailabilitySchema,
|
|
29226
|
+
/**
|
|
29227
|
+
* The operator switched this source OFF for this camera.
|
|
29228
|
+
*
|
|
29229
|
+
* Deliberately NOT a member of {@link ClipSourceAvailabilitySchema}'s
|
|
29230
|
+
* vocabulary. That enum models what the source CAN do — a sleeping camera, an
|
|
29231
|
+
* unmounted card, an index that disagrees with its own calendar — and a
|
|
29232
|
+
* switched-off source could answer perfectly well; the operator decided it
|
|
29233
|
+
* should not. Folding the choice in is how `disabled` and `broken` stop being
|
|
29234
|
+
* distinguishable, which is the D62 rule this repo has already paid for twice:
|
|
29235
|
+
* an off switch is REPORTED off (`CameraStatus.switchedOff`, the same word),
|
|
29236
|
+
* and disabled must never look like broken. It is also what lets every
|
|
29237
|
+
* exhaustive consumer of the availability enum keep compiling.
|
|
29238
|
+
*
|
|
29239
|
+
* A switched-off source contributes NO clips (`listClips` never calls it) and
|
|
29240
|
+
* its row carries no `catalogAsOf`: nothing confirms a catalog it is not
|
|
29241
|
+
* allowed to serve, and a frozen age that can only grow draws a stalling
|
|
29242
|
+
* source rather than an off switch.
|
|
29243
|
+
*
|
|
29244
|
+
* The row survives BECAUSE it is the control the operator switches the source
|
|
29245
|
+
* back on from — D554 decision 4's rule ("a source that cannot answer
|
|
29246
|
+
* produces a ROW, not an absence") applied to the one case D556 carved out of
|
|
29247
|
+
* it, and D557's own kept property ("a source is never hidden, only its
|
|
29248
|
+
* rows"). Absent means on.
|
|
29249
|
+
*
|
|
29250
|
+
* A provider never sets this — like {@link ClipSourceSchema.addonId} it is
|
|
29251
|
+
* stamped by the collection dispatcher, which holds the registry's projection
|
|
29252
|
+
* of the persisted authority (D556) and is the only place that knows it.
|
|
29253
|
+
*/
|
|
29254
|
+
switchedOff: boolean().optional()
|
|
29255
|
+
});
|
|
28936
29256
|
var videoclipsCapability = {
|
|
28937
29257
|
name: "videoclips",
|
|
28938
29258
|
scope: "device",
|
|
28939
|
-
mode: "
|
|
29259
|
+
mode: "collection",
|
|
28940
29260
|
kind: "wrapper",
|
|
28941
29261
|
defaultActive: true,
|
|
28942
29262
|
/** A clip is a window over a camera's footage — the cap is meaningless on a
|
|
28943
29263
|
* sensor, a button or an event emitter, and the `defaultActive` auto-bind
|
|
28944
29264
|
* reads this to decide which devices it may claim. */
|
|
28945
29265
|
deviceTypes: [DeviceType.Camera],
|
|
29266
|
+
/**
|
|
29267
|
+
* The Clips section of a camera's device details is FRAMEWORK-DERIVED (D14):
|
|
29268
|
+
* the aggregator turns this declaration into the `type:'widget'` section and
|
|
29269
|
+
* `DeviceDetail.tsx` is never edited. `videoclips` is the first WRAPPER cap
|
|
29270
|
+
* to declare one — every previous `host/` widget cap is `deviceNative` — so
|
|
29271
|
+
* `device-config-widget-wrapped-binding.spec.ts` pins that a `kind:'wrapped'`
|
|
29272
|
+
* binding entry derives the same section a native one does.
|
|
29273
|
+
*
|
|
29274
|
+
* `topTab` because the browser owns the whole pane (a day's clips, a source
|
|
29275
|
+
* list and a player), exactly as `ptz` does; the widget itself is
|
|
29276
|
+
* `host/clips-browser` in ui-library's `HOST_WIDGETS`.
|
|
29277
|
+
*/
|
|
29278
|
+
deviceConfig: { ui: {
|
|
29279
|
+
kind: "widget",
|
|
29280
|
+
widgetId: "host/clips-browser",
|
|
29281
|
+
tab: "clips",
|
|
29282
|
+
topTab: true,
|
|
29283
|
+
label: "Clips",
|
|
29284
|
+
order: 0
|
|
29285
|
+
} },
|
|
28946
29286
|
methods: {
|
|
28947
29287
|
listClips: method(object({
|
|
28948
29288
|
deviceId: number(),
|
|
28949
29289
|
since: number(),
|
|
28950
29290
|
until: number(),
|
|
28951
|
-
limit: number().int().positive().optional()
|
|
29291
|
+
limit: number().int().positive().optional(),
|
|
29292
|
+
/**
|
|
29293
|
+
* View filter over {@link ClipSourceSchema.source} values — the
|
|
29294
|
+
* picker's selection, forwarded so a provider need not list what
|
|
29295
|
+
* nobody is looking at. ABSENT means every source this camera has,
|
|
29296
|
+
* which is the honest default for a surface whose whole point is that
|
|
29297
|
+
* nothing is hidden (D554 3). A provider with one source ignores it.
|
|
29298
|
+
*/
|
|
29299
|
+
sources: array(string()).optional()
|
|
28952
29300
|
}), array(ClipSchema).readonly(), {
|
|
28953
29301
|
kind: "query",
|
|
28954
|
-
auth: "
|
|
29302
|
+
auth: "protected"
|
|
29303
|
+
}),
|
|
29304
|
+
/**
|
|
29305
|
+
* The sources this camera has, WITH the reason any of them cannot answer.
|
|
29306
|
+
*
|
|
29307
|
+
* Asked separately from `listClips` because an empty clip list is
|
|
29308
|
+
* ambiguous and this is the only place the ambiguity is resolved: every
|
|
29309
|
+
* bound provider contributes its own rows, and a provider that could not
|
|
29310
|
+
* be reached at all still produces one row saying so. A surface that draws
|
|
29311
|
+
* "no clips" without reading this is drawing a guess.
|
|
29312
|
+
*/
|
|
29313
|
+
listSources: method(object({ deviceId: number() }), array(ClipSourceSchema).readonly(), {
|
|
29314
|
+
kind: "query",
|
|
29315
|
+
auth: "protected"
|
|
28955
29316
|
}),
|
|
28956
29317
|
getClipPlayback: method(object({
|
|
28957
29318
|
deviceId: number(),
|
|
28958
|
-
clipId: string()
|
|
29319
|
+
clipId: string(),
|
|
29320
|
+
/**
|
|
29321
|
+
* Which twin to serve, on the ONE quality scale the system already has
|
|
29322
|
+
* (`CamProfileSchema`). `low | mid` → the sub file, `high` → the main
|
|
29323
|
+
* twin; both ids are already on the row so this never re-searches the
|
|
29324
|
+
* camera. Absent means the provider's own default (the sub file, which
|
|
29325
|
+
* every source is measured to hold).
|
|
29326
|
+
*
|
|
29327
|
+
* `auto` is deliberately NOT accepted here: a stored file has no
|
|
29328
|
+
* broker session, so the adaptive tier cannot be resolved for it. The
|
|
29329
|
+
* viewer resolves `auto` to a profile the same way live does, before
|
|
29330
|
+
* it calls (D549 15).
|
|
29331
|
+
*/
|
|
29332
|
+
profile: CamProfileSchema.optional()
|
|
28959
29333
|
}), ClipPlaybackSchema, {
|
|
28960
29334
|
kind: "query",
|
|
28961
|
-
auth: "
|
|
29335
|
+
auth: "protected"
|
|
28962
29336
|
})
|
|
28963
29337
|
}
|
|
28964
29338
|
};
|
|
@@ -47052,6 +47426,12 @@ Object.freeze({
|
|
|
47052
47426
|
addonId: null,
|
|
47053
47427
|
access: "view"
|
|
47054
47428
|
},
|
|
47429
|
+
"videoclips.listSources": {
|
|
47430
|
+
capName: "videoclips",
|
|
47431
|
+
capScope: "device",
|
|
47432
|
+
addonId: null,
|
|
47433
|
+
access: "view"
|
|
47434
|
+
},
|
|
47055
47435
|
"viewerUi.getStaticDir": {
|
|
47056
47436
|
capName: "viewer-ui",
|
|
47057
47437
|
capScope: "system",
|
|
@@ -49060,6 +49440,11 @@ Object.freeze({
|
|
|
49060
49440
|
form: "single",
|
|
49061
49441
|
optional: false
|
|
49062
49442
|
}],
|
|
49443
|
+
"videoclips.listSources": [{
|
|
49444
|
+
name: "deviceId",
|
|
49445
|
+
form: "single",
|
|
49446
|
+
optional: false
|
|
49447
|
+
}],
|
|
49063
49448
|
"waterHeater.setAway": [{
|
|
49064
49449
|
name: "deviceId",
|
|
49065
49450
|
form: "single",
|