@camstack/addon-osd-manager 0.1.131 → 0.1.133
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-BEiIAXxX.mjs → MotionZonesSettings-2zsWJZfj.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-CvIg_072.mjs → PrivacyMaskSettings-DrvVVdy1.mjs} +4 -4
- package/dist/{SceneMonitorEditor-JZwBd1Jv.mjs → SceneMonitorEditor-BkvmuOvx.mjs} +3 -3
- package/dist/_stub.js +11 -11
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-NFf3Y4nO.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-DIsyEUg8.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-dpphyADj.mjs +26 -0
- package/dist/{hostInit-CwDM2suA.mjs → hostInit-BnK9fAeZ.mjs} +2 -2
- package/dist/index.js +1425 -971
- package/dist/index.mjs +1425 -971
- package/dist/{player-overlays-9RdwSS8n.mjs → player-overlays-DrhBQRby.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-DOUWrPJ-.mjs → responsive-D3JdB_Kk.mjs} +1 -1
- package/dist/{scene-monitor-copy-Cr8ZNK1p.mjs → scene-monitor-copy-y4eFIlLX.mjs} +1 -1
- package/dist/{square-DLZPuHya.mjs → square-CK1KHJ3v.mjs} +1 -1
- package/dist/{trash-2-DE6KKFYA.mjs → trash-2-jS-4ZOJJ.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-8Z1DwgHL.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DgYdzX1B.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-D23J0_pM.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-PEo0-Fz9.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).
|
|
@@ -6499,6 +6499,24 @@ function normalizeAddonInitResult(result) {
|
|
|
6499
6499
|
if (Array.isArray(result)) return { providers: result };
|
|
6500
6500
|
return result;
|
|
6501
6501
|
}
|
|
6502
|
+
/** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
|
|
6503
|
+
var PeerBytesTicketSchema = object({
|
|
6504
|
+
/** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
|
|
6505
|
+
url: string().min(1),
|
|
6506
|
+
/**
|
|
6507
|
+
* The HOST node this URL means something on — the hub or a named agent,
|
|
6508
|
+
* never a runner. {@link AddonPeerBytes.open} compares it to its own and
|
|
6509
|
+
* refuses `cross-node` by name when they differ, without dialling.
|
|
6510
|
+
*/
|
|
6511
|
+
hostNodeId: string().min(1),
|
|
6512
|
+
expiresAtMs: number().int().nonnegative(),
|
|
6513
|
+
/**
|
|
6514
|
+
* What the producer DECLARED the body to be, when it knows — `null` when it
|
|
6515
|
+
* does not. Never `0` for unknown (D393): a consumer sizing a bound off this
|
|
6516
|
+
* must be able to tell "the producer did not say" from "the body is empty".
|
|
6517
|
+
*/
|
|
6518
|
+
declaredBytes: number().int().nonnegative().nullable()
|
|
6519
|
+
});
|
|
6502
6520
|
/** Shared Zod schemas used across streaming capabilities. */
|
|
6503
6521
|
var CamProfileSchema = _enum([
|
|
6504
6522
|
"high",
|
|
@@ -7740,7 +7758,7 @@ var AdoptionJobSchema = object({
|
|
|
7740
7758
|
* component's original options — detection to the detection-pipeline wrapper
|
|
7741
7759
|
* binding, audio analysis to its own, recording to `RecordingConfig.enabled`
|
|
7742
7760
|
* (which was always first-class; the switch was a veneer over
|
|
7743
|
-
* `
|
|
7761
|
+
* `recordingArchive.setDeviceConfig`), notifications to a notification-center
|
|
7744
7762
|
* per-device setting, the two camera planes to their own components.
|
|
7745
7763
|
*
|
|
7746
7764
|
* What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
|
|
@@ -7766,7 +7784,7 @@ var AdoptionJobSchema = object({
|
|
|
7766
7784
|
* | `stream-broker` | `deviceManager.setDisabled` | `StreamBrokerManager.reconcileAllCatalogs` releases the brokers; `ensureBroker` refuses re-creation |
|
|
7767
7785
|
* | `object-detection` | `deviceManager.setWrapperActive('detection-pipeline')` | `PipelineSettingsStore.resolvePipelineForDevice` returns `{ steps: [], audio: null }` |
|
|
7768
7786
|
* | `audio-analysis` | `deviceManager.setWrapperActive('audio-analysis')` | `AudioSubscriptionController.subscribeAudioStream` returns `null` before opening the stream |
|
|
7769
|
-
* | `recording` | `
|
|
7787
|
+
* | `recording` | `recordingArchive.setDeviceConfig` → `RecordingConfig.enabled` | `band-decision.shouldRecord` returns false; the controller detaches the device |
|
|
7770
7788
|
* | `notifications` | `notificationRules.setDeviceMuted` | `NotificationCenter.evaluateAndEnqueue` returns before any rule is evaluated |
|
|
7771
7789
|
* | `privacy-mask` | `privacyMask.setMask({ enabled })` → the CAMERA | the camera blanks the masked regions itself; every stream and recording carries the black boxes |
|
|
7772
7790
|
* | `device-audio` | `privacyMask.setAudioEnabled` → the CAMERA | the camera stops encoding an audio track at all; every consumer sees silent video |
|
|
@@ -12086,87 +12104,6 @@ var cameraPipelineConfigCapability = {
|
|
|
12086
12104
|
exposesDeviceSettings: true,
|
|
12087
12105
|
methods: {}
|
|
12088
12106
|
};
|
|
12089
|
-
/**
|
|
12090
|
-
* The signals a device can emit to WAKE its own stream.
|
|
12091
|
-
*
|
|
12092
|
-
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
12093
|
-
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
12094
|
-
* puller holds a session open for ever, and treating that as demand would keep
|
|
12095
|
-
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
12096
|
-
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
12097
|
-
* itself, with no stream running.
|
|
12098
|
-
*
|
|
12099
|
-
* ## The vocabulary is the PROVIDER'S, not ours
|
|
12100
|
-
*
|
|
12101
|
-
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
12102
|
-
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
12103
|
-
* Reolink offers motion and camera-native detection; another provider may offer
|
|
12104
|
-
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
12105
|
-
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
12106
|
-
*
|
|
12107
|
-
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
12108
|
-
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
12109
|
-
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
12110
|
-
* binding — but both answer "what drives the detection pipeline", which is a
|
|
12111
|
-
* different question from "what may wake a sleeping stream". A camera can do
|
|
12112
|
-
* the first and not be trusted with the second, and the operator picks per
|
|
12113
|
-
* camera. Two questions, two authorities.
|
|
12114
|
-
*
|
|
12115
|
-
* ## Availability is not permission
|
|
12116
|
-
*
|
|
12117
|
-
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
12118
|
-
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
12119
|
-
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
12120
|
-
* provider declaring a signal is not a provider enabling it.
|
|
12121
|
-
*/
|
|
12122
|
-
/** One signal a device can emit. */
|
|
12123
|
-
var StreamSignalSchema = object({
|
|
12124
|
-
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
12125
|
-
code: string().min(1),
|
|
12126
|
-
/** What an operator reads in the picker. The provider's own wording. */
|
|
12127
|
-
label: string().min(1),
|
|
12128
|
-
/**
|
|
12129
|
-
* Whether the provider recommends this signal ON when a camera is first set
|
|
12130
|
-
* up. A provider knows which of its signals are cheap and reliable; an
|
|
12131
|
-
* operator should not have to discover that by trial. Reolink recommends
|
|
12132
|
-
* both of its own.
|
|
12133
|
-
*/
|
|
12134
|
-
recommended: boolean()
|
|
12135
|
-
});
|
|
12136
|
-
var StreamSignalsStatusSchema = object({
|
|
12137
|
-
signals: array(StreamSignalSchema),
|
|
12138
|
-
lastFetchedAt: number()
|
|
12139
|
-
});
|
|
12140
|
-
var streamSignalsCapability = {
|
|
12141
|
-
name: "stream-signals",
|
|
12142
|
-
scope: "device",
|
|
12143
|
-
deviceNative: true,
|
|
12144
|
-
mode: "singleton",
|
|
12145
|
-
deviceTypes: Object.values(DeviceType),
|
|
12146
|
-
runtimeState: StreamSignalsStatusSchema,
|
|
12147
|
-
/**
|
|
12148
|
-
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
12149
|
-
*
|
|
12150
|
-
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
12151
|
-
* not an operator choice: the provider re-declares it on every registration,
|
|
12152
|
-
* so losing it loses nothing and persisting it would freeze an answer the
|
|
12153
|
-
* camera is entitled to change. Measured the same day on the sibling case —
|
|
12154
|
-
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
12155
|
-
* class the camera really detected stayed missing for the life of the row
|
|
12156
|
-
* because the fix could not reach it.
|
|
12157
|
-
*
|
|
12158
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
12159
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
12160
|
-
*/
|
|
12161
|
-
durability: "session",
|
|
12162
|
-
methods: {
|
|
12163
|
-
/**
|
|
12164
|
-
* What this device can emit. Empty is a valid and common answer — most
|
|
12165
|
-
* cameras have nothing to offer here, and an empty list is what makes the
|
|
12166
|
-
* broker's picker show nothing rather than a false choice.
|
|
12167
|
-
*/
|
|
12168
|
-
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
12169
|
-
};
|
|
12170
12107
|
/** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
|
|
12171
12108
|
var StreamFormatSchema = _enum([
|
|
12172
12109
|
"webrtc",
|
|
@@ -14291,6 +14228,118 @@ var detectionPipelineCapability = {
|
|
|
14291
14228
|
methods: {}
|
|
14292
14229
|
};
|
|
14293
14230
|
/**
|
|
14231
|
+
* device-admin-link — "this device has a management page of its own, and here
|
|
14232
|
+
* is its address".
|
|
14233
|
+
*
|
|
14234
|
+
* ## Why this is not a `deviceConfig` cap
|
|
14235
|
+
*
|
|
14236
|
+
* There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
|
|
14237
|
+
* can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
|
|
14238
|
+
* patch back through a setter; it costs a `builderId` reducer in
|
|
14239
|
+
* `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
|
|
14240
|
+
* renders a form section. This cap answers ONE question with ONE read and
|
|
14241
|
+
* renders a button. Nothing about it is a form, so it carries no `deviceConfig`
|
|
14242
|
+
* block, no `settings`, no `runtimeState` and no reducer — exactly like
|
|
14243
|
+
* `reboot`, the other pure-RPC device-native cap.
|
|
14244
|
+
*
|
|
14245
|
+
* ## Absent, and the difference between "no page" and "we cannot say"
|
|
14246
|
+
*
|
|
14247
|
+
* The two are answered at DIFFERENT layers, on purpose:
|
|
14248
|
+
*
|
|
14249
|
+
* - **"We cannot say"** → the provider never registers the cap for that
|
|
14250
|
+
* device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
|
|
14251
|
+
* fan are reached only through a vendor cloud; there is no address to hand
|
|
14252
|
+
* out and no page to open. A Tuya plug, a Wyze camera and a Gree air
|
|
14253
|
+
* conditioner DO have a LAN IP, and still have no HTTP management page
|
|
14254
|
+
* behind it. None of them register, so `deviceManager.getBindings` never
|
|
14255
|
+
* lists the cap and no surface asks.
|
|
14256
|
+
* - **"This device has no page, and I know that"** → the provider registers
|
|
14257
|
+
* and `getAdminLink` returns `null`. This is the answer for a device whose
|
|
14258
|
+
* sibling DOES have a page: a Reolink battery camera reached over UDP by
|
|
14259
|
+
* `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
|
|
14260
|
+
* transport, a Home Assistant broker authenticated by supervisor token
|
|
14261
|
+
* (which carries no `baseUrl` at all).
|
|
14262
|
+
*
|
|
14263
|
+
* Both draw NOTHING. A button that opens a browser error is worse than no
|
|
14264
|
+
* button, and D62 is the same rule from the other side: an off switch is
|
|
14265
|
+
* reported off, never made to look broken. There is no third state where the
|
|
14266
|
+
* UI renders a disabled button "because the device might have a page".
|
|
14267
|
+
*
|
|
14268
|
+
* ## The URL never carries credentials
|
|
14269
|
+
*
|
|
14270
|
+
* Not in userinfo, not in a query string. Every provider builds through
|
|
14271
|
+
* `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
|
|
14272
|
+
* scheme and path as separate arguments — there is no parameter a secret could
|
|
14273
|
+
* arrive in — and re-checks its own output for the `scheme://user:pass@` shape
|
|
14274
|
+
* that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
|
|
14275
|
+
* output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
|
|
14276
|
+
* keeps providers from hand-rolling one anyway.
|
|
14277
|
+
*
|
|
14278
|
+
* This matters here more than anywhere else in the repo, because every provider
|
|
14279
|
+
* that knows a device's host knows its PASSWORD too: `{ host, port, username,
|
|
14280
|
+
* password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
|
|
14281
|
+
* and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
|
|
14282
|
+
* camera's own page will ask for its own login. That is correct, and pre-
|
|
14283
|
+
* filling it is the operator's business, not ours.
|
|
14284
|
+
*
|
|
14285
|
+
* ## It is a LAN fact
|
|
14286
|
+
*
|
|
14287
|
+
* The URL addresses the device where the NODE can see it. It is not proxied,
|
|
14288
|
+
* not made reachable from outside, and not sent anywhere. A surface renders it
|
|
14289
|
+
* as a link the operator's own browser follows, on the operator's own network,
|
|
14290
|
+
* or renders nothing.
|
|
14291
|
+
*/
|
|
14292
|
+
/**
|
|
14293
|
+
* Whose page is it. The distinction is for the OPERATOR, who needs to know
|
|
14294
|
+
* before clicking whether he is about to land on a camera's own web server or
|
|
14295
|
+
* inside Home Assistant.
|
|
14296
|
+
*/
|
|
14297
|
+
var AdminLinkTargetEnum = _enum(["device", "integration"]);
|
|
14298
|
+
var DeviceAdminLinkSchema = object({
|
|
14299
|
+
/**
|
|
14300
|
+
* Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
|
|
14301
|
+
* free of userinfo and of any credential-shaped query key.
|
|
14302
|
+
*/
|
|
14303
|
+
url: string(),
|
|
14304
|
+
/**
|
|
14305
|
+
* What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
|
|
14306
|
+
* The PROVIDER names it, because only the provider knows what the page is;
|
|
14307
|
+
* a UI that invented the label from the addon id would call the Home
|
|
14308
|
+
* Assistant device page "Provider Homeassistant".
|
|
14309
|
+
*/
|
|
14310
|
+
label: string(),
|
|
14311
|
+
target: AdminLinkTargetEnum,
|
|
14312
|
+
/**
|
|
14313
|
+
* Host the URL points at, without scheme, port or path — for the tooltip, so
|
|
14314
|
+
* an operator can see WHERE the button goes before he follows it. Redundant
|
|
14315
|
+
* with `url` by construction; carried separately so no surface has to parse
|
|
14316
|
+
* a URL to show it.
|
|
14317
|
+
*/
|
|
14318
|
+
host: string()
|
|
14319
|
+
});
|
|
14320
|
+
var deviceAdminLinkCapability = {
|
|
14321
|
+
name: "device-admin-link",
|
|
14322
|
+
scope: "device",
|
|
14323
|
+
deviceNative: true,
|
|
14324
|
+
mode: "singleton",
|
|
14325
|
+
methods: {
|
|
14326
|
+
/**
|
|
14327
|
+
* The device's management page, or `null` when this device has none.
|
|
14328
|
+
*
|
|
14329
|
+
* `auth: 'admin'` deliberately. This is administration, not actuation —
|
|
14330
|
+
* the same bucket as `reboot` and `camera-credentials`, and explicitly NOT
|
|
14331
|
+
* the actuation set `scripts/check-actuation-not-admin.ts` protects (D403).
|
|
14332
|
+
* The URL is also a statement about the LAN, which a household member with
|
|
14333
|
+
* a `view` grant on a light has no reason to be handed.
|
|
14334
|
+
*
|
|
14335
|
+
* The surfaces gate on the QUERY, never on a role they guessed: a caller
|
|
14336
|
+
* without the right loses the query and draws nothing, which is the same
|
|
14337
|
+
* thing a device with no page draws. There is no path on which a button
|
|
14338
|
+
* appears and then fails — the D403 failure mode, from the other end.
|
|
14339
|
+
*/
|
|
14340
|
+
getAdminLink: method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" }) }
|
|
14341
|
+
};
|
|
14342
|
+
/**
|
|
14294
14343
|
* Identity envelope for a device's upstream-system metadata.
|
|
14295
14344
|
*
|
|
14296
14345
|
* Two jobs:
|
|
@@ -14682,118 +14731,6 @@ var deviceAdoptionCapability = {
|
|
|
14682
14731
|
}
|
|
14683
14732
|
};
|
|
14684
14733
|
/**
|
|
14685
|
-
* device-admin-link — "this device has a management page of its own, and here
|
|
14686
|
-
* is its address".
|
|
14687
|
-
*
|
|
14688
|
-
* ## Why this is not a `deviceConfig` cap
|
|
14689
|
-
*
|
|
14690
|
-
* There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
|
|
14691
|
-
* can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
|
|
14692
|
-
* patch back through a setter; it costs a `builderId` reducer in
|
|
14693
|
-
* `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
|
|
14694
|
-
* renders a form section. This cap answers ONE question with ONE read and
|
|
14695
|
-
* renders a button. Nothing about it is a form, so it carries no `deviceConfig`
|
|
14696
|
-
* block, no `settings`, no `runtimeState` and no reducer — exactly like
|
|
14697
|
-
* `reboot`, the other pure-RPC device-native cap.
|
|
14698
|
-
*
|
|
14699
|
-
* ## Absent, and the difference between "no page" and "we cannot say"
|
|
14700
|
-
*
|
|
14701
|
-
* The two are answered at DIFFERENT layers, on purpose:
|
|
14702
|
-
*
|
|
14703
|
-
* - **"We cannot say"** → the provider never registers the cap for that
|
|
14704
|
-
* device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
|
|
14705
|
-
* fan are reached only through a vendor cloud; there is no address to hand
|
|
14706
|
-
* out and no page to open. A Tuya plug, a Wyze camera and a Gree air
|
|
14707
|
-
* conditioner DO have a LAN IP, and still have no HTTP management page
|
|
14708
|
-
* behind it. None of them register, so `deviceManager.getBindings` never
|
|
14709
|
-
* lists the cap and no surface asks.
|
|
14710
|
-
* - **"This device has no page, and I know that"** → the provider registers
|
|
14711
|
-
* and `getAdminLink` returns `null`. This is the answer for a device whose
|
|
14712
|
-
* sibling DOES have a page: a Reolink battery camera reached over UDP by
|
|
14713
|
-
* `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
|
|
14714
|
-
* transport, a Home Assistant broker authenticated by supervisor token
|
|
14715
|
-
* (which carries no `baseUrl` at all).
|
|
14716
|
-
*
|
|
14717
|
-
* Both draw NOTHING. A button that opens a browser error is worse than no
|
|
14718
|
-
* button, and D62 is the same rule from the other side: an off switch is
|
|
14719
|
-
* reported off, never made to look broken. There is no third state where the
|
|
14720
|
-
* UI renders a disabled button "because the device might have a page".
|
|
14721
|
-
*
|
|
14722
|
-
* ## The URL never carries credentials
|
|
14723
|
-
*
|
|
14724
|
-
* Not in userinfo, not in a query string. Every provider builds through
|
|
14725
|
-
* `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
|
|
14726
|
-
* scheme and path as separate arguments — there is no parameter a secret could
|
|
14727
|
-
* arrive in — and re-checks its own output for the `scheme://user:pass@` shape
|
|
14728
|
-
* that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
|
|
14729
|
-
* output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
|
|
14730
|
-
* keeps providers from hand-rolling one anyway.
|
|
14731
|
-
*
|
|
14732
|
-
* This matters here more than anywhere else in the repo, because every provider
|
|
14733
|
-
* that knows a device's host knows its PASSWORD too: `{ host, port, username,
|
|
14734
|
-
* password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
|
|
14735
|
-
* and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
|
|
14736
|
-
* camera's own page will ask for its own login. That is correct, and pre-
|
|
14737
|
-
* filling it is the operator's business, not ours.
|
|
14738
|
-
*
|
|
14739
|
-
* ## It is a LAN fact
|
|
14740
|
-
*
|
|
14741
|
-
* The URL addresses the device where the NODE can see it. It is not proxied,
|
|
14742
|
-
* not made reachable from outside, and not sent anywhere. A surface renders it
|
|
14743
|
-
* as a link the operator's own browser follows, on the operator's own network,
|
|
14744
|
-
* or renders nothing.
|
|
14745
|
-
*/
|
|
14746
|
-
/**
|
|
14747
|
-
* Whose page is it. The distinction is for the OPERATOR, who needs to know
|
|
14748
|
-
* before clicking whether he is about to land on a camera's own web server or
|
|
14749
|
-
* inside Home Assistant.
|
|
14750
|
-
*/
|
|
14751
|
-
var AdminLinkTargetEnum = _enum(["device", "integration"]);
|
|
14752
|
-
var DeviceAdminLinkSchema = object({
|
|
14753
|
-
/**
|
|
14754
|
-
* Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
|
|
14755
|
-
* free of userinfo and of any credential-shaped query key.
|
|
14756
|
-
*/
|
|
14757
|
-
url: string(),
|
|
14758
|
-
/**
|
|
14759
|
-
* What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
|
|
14760
|
-
* The PROVIDER names it, because only the provider knows what the page is;
|
|
14761
|
-
* a UI that invented the label from the addon id would call the Home
|
|
14762
|
-
* Assistant device page "Provider Homeassistant".
|
|
14763
|
-
*/
|
|
14764
|
-
label: string(),
|
|
14765
|
-
target: AdminLinkTargetEnum,
|
|
14766
|
-
/**
|
|
14767
|
-
* Host the URL points at, without scheme, port or path — for the tooltip, so
|
|
14768
|
-
* an operator can see WHERE the button goes before he follows it. Redundant
|
|
14769
|
-
* with `url` by construction; carried separately so no surface has to parse
|
|
14770
|
-
* a URL to show it.
|
|
14771
|
-
*/
|
|
14772
|
-
host: string()
|
|
14773
|
-
});
|
|
14774
|
-
var deviceAdminLinkCapability = {
|
|
14775
|
-
name: "device-admin-link",
|
|
14776
|
-
scope: "device",
|
|
14777
|
-
deviceNative: true,
|
|
14778
|
-
mode: "singleton",
|
|
14779
|
-
methods: {
|
|
14780
|
-
/**
|
|
14781
|
-
* The device's management page, or `null` when this device has none.
|
|
14782
|
-
*
|
|
14783
|
-
* `auth: 'admin'` deliberately. This is administration, not actuation —
|
|
14784
|
-
* the same bucket as `reboot` and `camera-credentials`, and explicitly NOT
|
|
14785
|
-
* the actuation set `scripts/check-actuation-not-admin.ts` protects (D403).
|
|
14786
|
-
* The URL is also a statement about the LAN, which a household member with
|
|
14787
|
-
* a `view` grant on a light has no reason to be handed.
|
|
14788
|
-
*
|
|
14789
|
-
* The surfaces gate on the QUERY, never on a role they guessed: a caller
|
|
14790
|
-
* without the right loses the query and draws nothing, which is the same
|
|
14791
|
-
* thing a device with no page draws. There is no path on which a button
|
|
14792
|
-
* appears and then fails — the D403 failure mode, from the other end.
|
|
14793
|
-
*/
|
|
14794
|
-
getAdminLink: method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" }) }
|
|
14795
|
-
};
|
|
14796
|
-
/**
|
|
14797
14734
|
* `device-export` — collection cap for addons that export camstack
|
|
14798
14735
|
* devices to external ecosystems (HomeAssistant via MQTT discovery,
|
|
14799
14736
|
* HomeKit/HAP, Alexa Smart Home, …).
|
|
@@ -28434,6 +28371,87 @@ var storageProviderCapability = {
|
|
|
28434
28371
|
})
|
|
28435
28372
|
}
|
|
28436
28373
|
};
|
|
28374
|
+
/**
|
|
28375
|
+
* The signals a device can emit to WAKE its own stream.
|
|
28376
|
+
*
|
|
28377
|
+
* A camera whose stream is built on demand sleeps until something asks for it,
|
|
28378
|
+
* and "something" cannot be a consumer that is merely attached — a Frigate-style
|
|
28379
|
+
* puller holds a session open for ever, and treating that as demand would keep
|
|
28380
|
+
* a battery camera awake for ever, which is the whole thing the battery is for
|
|
28381
|
+
* (D173). So the wake has to come from the CAMERA: an event it noticed by
|
|
28382
|
+
* itself, with no stream running.
|
|
28383
|
+
*
|
|
28384
|
+
* ## The vocabulary is the PROVIDER'S, not ours
|
|
28385
|
+
*
|
|
28386
|
+
* Like `consumables`, this cap declares no vocabulary of its own. A provider
|
|
28387
|
+
* names each signal with a `code` it chooses and a `label` an operator reads.
|
|
28388
|
+
* Reolink offers motion and camera-native detection; another provider may offer
|
|
28389
|
+
* a tamper, a doorbell press, a PIR, or something no camera in this fleet has
|
|
28390
|
+
* yet. A fixed enum here would mean every new signal is a framework release.
|
|
28391
|
+
*
|
|
28392
|
+
* It is deliberately NOT derived from the caps a device already binds. Whether
|
|
28393
|
+
* a camera CAN push firmware motion is expressed by `motionSources` containing
|
|
28394
|
+
* `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
|
|
28395
|
+
* binding — but both answer "what drives the detection pipeline", which is a
|
|
28396
|
+
* different question from "what may wake a sleeping stream". A camera can do
|
|
28397
|
+
* the first and not be trusted with the second, and the operator picks per
|
|
28398
|
+
* camera. Two questions, two authorities.
|
|
28399
|
+
*
|
|
28400
|
+
* ## Availability is not permission
|
|
28401
|
+
*
|
|
28402
|
+
* `listSignals` says what the device CAN emit. Whether a given signal actually
|
|
28403
|
+
* wakes the stream is the operator's per-camera choice, held by the broker
|
|
28404
|
+
* alongside the cooldown — see the stream-broker cap's wake settings. A
|
|
28405
|
+
* provider declaring a signal is not a provider enabling it.
|
|
28406
|
+
*/
|
|
28407
|
+
/** One signal a device can emit. */
|
|
28408
|
+
var StreamSignalSchema = object({
|
|
28409
|
+
/** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
|
|
28410
|
+
code: string().min(1),
|
|
28411
|
+
/** What an operator reads in the picker. The provider's own wording. */
|
|
28412
|
+
label: string().min(1),
|
|
28413
|
+
/**
|
|
28414
|
+
* Whether the provider recommends this signal ON when a camera is first set
|
|
28415
|
+
* up. A provider knows which of its signals are cheap and reliable; an
|
|
28416
|
+
* operator should not have to discover that by trial. Reolink recommends
|
|
28417
|
+
* both of its own.
|
|
28418
|
+
*/
|
|
28419
|
+
recommended: boolean()
|
|
28420
|
+
});
|
|
28421
|
+
var StreamSignalsStatusSchema = object({
|
|
28422
|
+
signals: array(StreamSignalSchema),
|
|
28423
|
+
lastFetchedAt: number()
|
|
28424
|
+
});
|
|
28425
|
+
var streamSignalsCapability = {
|
|
28426
|
+
name: "stream-signals",
|
|
28427
|
+
scope: "device",
|
|
28428
|
+
deviceNative: true,
|
|
28429
|
+
mode: "singleton",
|
|
28430
|
+
deviceTypes: Object.values(DeviceType),
|
|
28431
|
+
runtimeState: StreamSignalsStatusSchema,
|
|
28432
|
+
/**
|
|
28433
|
+
* Runtime-state durability: **session** — mirrored in RAM, never written.
|
|
28434
|
+
*
|
|
28435
|
+
* The slice holds what the DEVICE says it can emit. That is a probed fact,
|
|
28436
|
+
* not an operator choice: the provider re-declares it on every registration,
|
|
28437
|
+
* so losing it loses nothing and persisting it would freeze an answer the
|
|
28438
|
+
* camera is entitled to change. Measured the same day on the sibling case —
|
|
28439
|
+
* `native-object-detection.supportedClasses` was persisted, and a firmware
|
|
28440
|
+
* class the camera really detected stayed missing for the life of the row
|
|
28441
|
+
* because the fix could not reach it.
|
|
28442
|
+
*
|
|
28443
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
28444
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
28445
|
+
*/
|
|
28446
|
+
durability: "session",
|
|
28447
|
+
methods: {
|
|
28448
|
+
/**
|
|
28449
|
+
* What this device can emit. Empty is a valid and common answer — most
|
|
28450
|
+
* cameras have nothing to offer here, and an empty list is what makes the
|
|
28451
|
+
* broker's picker show nothing rather than a false choice.
|
|
28452
|
+
*/
|
|
28453
|
+
listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
|
|
28454
|
+
};
|
|
28437
28455
|
/** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
|
|
28438
28456
|
var ProfileSettingsSchemaBridge = unknown().nullable();
|
|
28439
28457
|
var ProfileSettingsBagSchema = record(string(), unknown());
|
|
@@ -29136,6 +29154,7 @@ _enum([
|
|
|
29136
29154
|
"sleeping",
|
|
29137
29155
|
"camera-refused",
|
|
29138
29156
|
"no-keyframe",
|
|
29157
|
+
"decode-failed",
|
|
29139
29158
|
"no-catalog-row",
|
|
29140
29159
|
"unsupported",
|
|
29141
29160
|
"unknown-device",
|
|
@@ -29410,6 +29429,32 @@ var ClipBytesSchema = object({
|
|
|
29410
29429
|
durationMs: number().positive().optional()
|
|
29411
29430
|
});
|
|
29412
29431
|
/**
|
|
29432
|
+
* Where a clip's finished bytes can be TAKEN (D613) — the answer to
|
|
29433
|
+
* {@link videoclipsCapability.methods.offerClipBytes}.
|
|
29434
|
+
*
|
|
29435
|
+
* Everything {@link ClipBytesSchema} carries except the bytes themselves, plus
|
|
29436
|
+
* the one-shot ticket that leads to them. The metadata is answered BEFORE the
|
|
29437
|
+
* transfer on purpose: a consumer learns which twin it got, what to call the
|
|
29438
|
+
* file and how long the clip runs without having to read a byte, so a decision
|
|
29439
|
+
* it would make on that metadata (a wrong twin, an implausible duration) costs
|
|
29440
|
+
* no transfer at all.
|
|
29441
|
+
*/
|
|
29442
|
+
var ClipBytesOfferSchema = object({
|
|
29443
|
+
/**
|
|
29444
|
+
* One shot, seconds-long, loopback, on the PROVIDER's own host. Open it with
|
|
29445
|
+
* `ctx.peerBytes.open(...)`, which refuses a ticket from another node by
|
|
29446
|
+
* name rather than dialling a port that means something else here.
|
|
29447
|
+
*/
|
|
29448
|
+
ticket: PeerBytesTicketSchema,
|
|
29449
|
+
contentType: string(),
|
|
29450
|
+
/** Suggested filename, extension included. */
|
|
29451
|
+
name: string(),
|
|
29452
|
+
/** Which twin was actually served — see {@link ClipBytesSchema.served}. */
|
|
29453
|
+
served: CamProfileSchema,
|
|
29454
|
+
/** See {@link ClipBytesSchema.durationMs}. Absent when nothing measured it. */
|
|
29455
|
+
durationMs: number().positive().optional()
|
|
29456
|
+
});
|
|
29457
|
+
/**
|
|
29413
29458
|
* Where a clip's STREAM can be dialled (D597) — the answer to
|
|
29414
29459
|
* {@link videoclipsCapability.methods.dialClipStream}.
|
|
29415
29460
|
*
|
|
@@ -29485,6 +29530,44 @@ var ClipStreamDialSchema = object({
|
|
|
29485
29530
|
/** Why `servedAudio` is `none` although sound was asked for. */
|
|
29486
29531
|
audioReason: ClipStreamAudioReasonSchema.optional()
|
|
29487
29532
|
});
|
|
29533
|
+
/**
|
|
29534
|
+
* What a surface may DRAW for this provider's clips — the answer to
|
|
29535
|
+
* {@link videoclipsCapability.methods.getPlaybackOptions} (D612).
|
|
29536
|
+
*
|
|
29537
|
+
* The envelope is a PROVIDER fact, not a clip fact, and that is measured, not
|
|
29538
|
+
* assumed: the broker's `chooseClipPath` reads exactly two inputs — whether
|
|
29539
|
+
* `dialClipStream` and `readClipBytes` are wired — and both are constants of
|
|
29540
|
+
* the broker's own closure over the provider's methods. The `profile` it is
|
|
29541
|
+
* handed is explicitly not read. So every clip of a provider is served the
|
|
29542
|
+
* same way, and a per-clip channel carried a value that could not vary. The
|
|
29543
|
+
* per-clip `clipTransport` server message was removed for exactly that reason.
|
|
29544
|
+
*
|
|
29545
|
+
* Queried per camera, before a clip is picked, so a control is rendered or
|
|
29546
|
+
* DISABLED rather than offered and refused at play time (D62: a disabled
|
|
29547
|
+
* control reads as unavailable, one that undoes the gesture reads as broken).
|
|
29548
|
+
*/
|
|
29549
|
+
var ClipPlaybackOptionsSchema = object({
|
|
29550
|
+
/**
|
|
29551
|
+
* How this provider's clips reach the player. `stream` is the provider's
|
|
29552
|
+
* forward-only fMP4 (D597); `file` is one bounded by-handle fetch of the
|
|
29553
|
+
* whole clip, `stbl` indexed (D575).
|
|
29554
|
+
*/
|
|
29555
|
+
transport: _enum(["stream", "file"]),
|
|
29556
|
+
/** `forward` = only ahead of the playhead. `free` = anywhere. */
|
|
29557
|
+
seek: _enum(["forward", "free"]),
|
|
29558
|
+
/** Frame-step BACKWARD is meaningful. Forward always is. */
|
|
29559
|
+
stepBack: boolean(),
|
|
29560
|
+
/** Whether the scrub gesture is served, as opposed to refused by name. */
|
|
29561
|
+
scrub: boolean(),
|
|
29562
|
+
/**
|
|
29563
|
+
* The rates that can be delivered, ascending, always containing `1`. The
|
|
29564
|
+
* viewer draws its picker from this and from nothing else — a constant it
|
|
29565
|
+
* keeps instead is the second authority that produced the defect: `8` and
|
|
29566
|
+
* `16` were offered, the broker clamped them to `4`, and no line anywhere
|
|
29567
|
+
* said so. `0` is not a member: pause is the absence of a rate.
|
|
29568
|
+
*/
|
|
29569
|
+
rates: array(number().positive()).min(1).readonly()
|
|
29570
|
+
});
|
|
29488
29571
|
var ClipSourceAvailabilitySchema = object({
|
|
29489
29572
|
state: _enum([
|
|
29490
29573
|
"ok",
|
|
@@ -29663,14 +29746,18 @@ var videoclipsCapability = {
|
|
|
29663
29746
|
*
|
|
29664
29747
|
* `getClipPlayback` is the right answer for a player: it hands back a URL
|
|
29665
29748
|
* on a plane the hub serves `access:'authenticated'`, which a browser and a
|
|
29666
|
-
* viewer session satisfy. It is the wrong answer for another ADDON
|
|
29667
|
-
*
|
|
29668
|
-
*
|
|
29669
|
-
*
|
|
29670
|
-
*
|
|
29671
|
-
*
|
|
29672
|
-
*
|
|
29673
|
-
*
|
|
29749
|
+
* viewer session satisfy. It is the wrong answer for another ADDON: the
|
|
29750
|
+
* hub's proxy in front of that plane takes only a user credential, which
|
|
29751
|
+
* an addon does not hold, so a recorder that wants a camera's clip cannot
|
|
29752
|
+
* fetch that URL. This method is the shape that answer forced — the same
|
|
29753
|
+
* one (and the same bound) as `recordingExport.readExportBytes`.
|
|
29754
|
+
*
|
|
29755
|
+
* **It is no longer the only seam.** Until D613 there was no addon→addon
|
|
29756
|
+
* byte transport at all; there is now
|
|
29757
|
+
* ({@link offerClipBytes}, over `ctx.peerBytes`), it holds nothing on
|
|
29758
|
+
* either side, and it is what a clip EXPORT uses. This method remains for
|
|
29759
|
+
* a consumer that genuinely wants the bytes in hand, and as the named
|
|
29760
|
+
* fallback for a provider not yet redeployed.
|
|
29674
29761
|
*
|
|
29675
29762
|
* Routing needs no `provider` pin: the id is source-prefixed and
|
|
29676
29763
|
* self-contained, so `device-collection-dispatch.ts` rule 3 hands the call
|
|
@@ -29737,6 +29824,65 @@ var videoclipsCapability = {
|
|
|
29737
29824
|
auth: "protected"
|
|
29738
29825
|
}),
|
|
29739
29826
|
/**
|
|
29827
|
+
* Where this clip's finished bytes can be TAKEN — the by-handle read a
|
|
29828
|
+
* clip EXPORT pulls, over the addon→addon byte transport (D613).
|
|
29829
|
+
*
|
|
29830
|
+
* This is {@link readClipBytes} with the envelope removed. Same gates,
|
|
29831
|
+
* same vocabulary, same completion rules, same `served` contract — the
|
|
29832
|
+
* only difference is that the bytes travel over a one-shot loopback
|
|
29833
|
+
* socket instead of inside a base64 field, so neither side holds the
|
|
29834
|
+
* payload whole and the 50 MiB refusal on a long `high` twin stops
|
|
29835
|
+
* existing. The bound that remains is
|
|
29836
|
+
* {@link VIDEOCLIPS_MAX_OFFER_BYTES}, and it bounds the PRODUCER's own
|
|
29837
|
+
* copy rather than the transport.
|
|
29838
|
+
*
|
|
29839
|
+
* **The ticket is loopback and same-host.** A provider on an agent mints a
|
|
29840
|
+
* URL that means nothing on the hub, and `ctx.peerBytes.open` refuses it
|
|
29841
|
+
* `cross-node` by name rather than dialling whatever else holds that port
|
|
29842
|
+
* here. A consumer that can be on the other side of a node boundary from
|
|
29843
|
+
* its provider must be able to read that refusal and say so; it must not
|
|
29844
|
+
* treat it as "no bytes".
|
|
29845
|
+
*
|
|
29846
|
+
* **A ticket is a one-shot bearer credential with a seconds-long life.**
|
|
29847
|
+
* Take it immediately, never persist it, never log its `url`. An untaken
|
|
29848
|
+
* ticket costs the provider one map entry until its TTL, and outstanding
|
|
29849
|
+
* tickets are bounded — which is also what makes a per-frame misuse of
|
|
29850
|
+
* this method refuse by name rather than work slowly (D9/D18: this is a
|
|
29851
|
+
* by-handle fetch of finished media, not a frame pipe).
|
|
29852
|
+
*
|
|
29853
|
+
* Optional on the provider for the same reason `readClipBytes` is: a
|
|
29854
|
+
* source with no camera socket behind it has no bytes. A provider that
|
|
29855
|
+
* predates this method answers `NOT_IMPLEMENTED`, and a consumer may fall
|
|
29856
|
+
* back to `readClipBytes` — but it says so in the log, with the deploy
|
|
29857
|
+
* hint, because that fallback re-imposes the 50 MiB refusal and an
|
|
29858
|
+
* operator who sees `too-large-to-transfer` after this shipped is looking
|
|
29859
|
+
* at a stale addon, not at a clip that cannot be exported.
|
|
29860
|
+
*/
|
|
29861
|
+
offerClipBytes: optionalMethod(object({
|
|
29862
|
+
deviceId: number(),
|
|
29863
|
+
clipId: string().min(1),
|
|
29864
|
+
/** WHICH provider holds the bytes — see `readClipBytes.provider`. */
|
|
29865
|
+
provider: string().min(1),
|
|
29866
|
+
/** Which twin — `low | mid` → the sub file, `high` → the main twin. */
|
|
29867
|
+
profile: CamProfileSchema.optional(),
|
|
29868
|
+
/**
|
|
29869
|
+
* The CALLER's byte bound, so an over-size clip is refused before the
|
|
29870
|
+
* camera is touched rather than after. Capped by
|
|
29871
|
+
* {@link VIDEOCLIPS_MAX_OFFER_BYTES} whatever is passed; absent means
|
|
29872
|
+
* that ceiling.
|
|
29873
|
+
*/
|
|
29874
|
+
maxBytes: number().int().positive().optional(),
|
|
29875
|
+
/**
|
|
29876
|
+
* The operator's authorisation to wake a sleeping camera for this
|
|
29877
|
+
* read. Absent — the default — means a sleeping standalone battery
|
|
29878
|
+
* camera is REFUSED by name, before any session is opened.
|
|
29879
|
+
*/
|
|
29880
|
+
wake: ClipWakeSchema.optional()
|
|
29881
|
+
}), ClipBytesOfferSchema, {
|
|
29882
|
+
kind: "query",
|
|
29883
|
+
auth: "protected"
|
|
29884
|
+
}),
|
|
29885
|
+
/**
|
|
29740
29886
|
* Where this clip's STREAM can be dialled (D597) — the forward-only
|
|
29741
29887
|
* fMP4 the provider writes from the first muxed byte, for the broker to
|
|
29742
29888
|
* play through the same WebRTC session as recorded footage, with the
|
|
@@ -29773,6 +29919,36 @@ var videoclipsCapability = {
|
|
|
29773
29919
|
}), ClipStreamDialSchema, {
|
|
29774
29920
|
kind: "query",
|
|
29775
29921
|
auth: "protected"
|
|
29922
|
+
}),
|
|
29923
|
+
/**
|
|
29924
|
+
* What a surface may DRAW for this provider's clips: the rates it can be
|
|
29925
|
+
* played at, whether scrub is served, how far a position may be moved,
|
|
29926
|
+
* and whether a backward frame-step means anything (D612).
|
|
29927
|
+
*
|
|
29928
|
+
* **The only authority.** The per-clip `clipTransport` server message
|
|
29929
|
+
* that used to carry the same answer was removed: the broker's transport
|
|
29930
|
+
* choice reads nothing that varies per clip, so the clip level had no
|
|
29931
|
+
* information the provider does not already have, and two channels that
|
|
29932
|
+
* can disagree are worse than one (D62).
|
|
29933
|
+
*
|
|
29934
|
+
* Asked per camera and per provider, so it must stay CHEAP — it is a
|
|
29935
|
+
* statement about wiring, answered from a constant, never a call to the
|
|
29936
|
+
* camera. A provider answers with one of {@link CLIP_PLAYBACK_OPTIONS}
|
|
29937
|
+
* and never composes an envelope of its own.
|
|
29938
|
+
*
|
|
29939
|
+
* Optional, and absence is load-bearing: a provider that has not answered
|
|
29940
|
+
* has not restricted anything, and a viewer reads it as the freedom it
|
|
29941
|
+
* always had. See D612 on the rollout order that absence implies.
|
|
29942
|
+
*/
|
|
29943
|
+
getPlaybackOptions: optionalMethod(object({
|
|
29944
|
+
deviceId: number(),
|
|
29945
|
+
/** WHICH provider to ask — the `addonId` a {@link ClipSourceSchema}
|
|
29946
|
+
* row carries. Required for the same reason `listClips` requires it:
|
|
29947
|
+
* a collection cap has no "the bound one" to resolve to (D554). */
|
|
29948
|
+
provider: string().min(1)
|
|
29949
|
+
}), ClipPlaybackOptionsSchema, {
|
|
29950
|
+
kind: "query",
|
|
29951
|
+
auth: "protected"
|
|
29776
29952
|
})
|
|
29777
29953
|
}
|
|
29778
29954
|
};
|
|
@@ -31509,6 +31685,179 @@ getCredentials: method(object({ deviceId: number() }), CameraCredentialsSchema.n
|
|
|
31509
31685
|
}
|
|
31510
31686
|
};
|
|
31511
31687
|
/**
|
|
31688
|
+
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
31689
|
+
* page.
|
|
31690
|
+
*
|
|
31691
|
+
* ## Why this is a capability and not an addon settings schema
|
|
31692
|
+
*
|
|
31693
|
+
* It was one, and it did not render. The addon declared the editor as a
|
|
31694
|
+
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
31695
|
+
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
31696
|
+
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
31697
|
+
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
31698
|
+
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
31699
|
+
* not on it "falls off silently".
|
|
31700
|
+
*
|
|
31701
|
+
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
31702
|
+
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
31703
|
+
* beside PTZ and motion zones on the camera itself. The device page is
|
|
31704
|
+
* BINDING-driven (D12), so the way in is a capability bound to the device —
|
|
31705
|
+
* and this cap carries its section the way `recording` does, by RETURNING it
|
|
31706
|
+
* from `getDeviceSettingsContribution`.
|
|
31707
|
+
*
|
|
31708
|
+
* Seven other widgets are still declared the other way, through a
|
|
31709
|
+
* `deviceConfig.ui` block the framework derives a section from. That route
|
|
31710
|
+
* gives the addon no say in where its own panel lands and no way to decline
|
|
31711
|
+
* for a device the panel does not suit, which is why this one does not use it.
|
|
31712
|
+
*
|
|
31713
|
+
* ## Why one addon may implement it
|
|
31714
|
+
*
|
|
31715
|
+
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
31716
|
+
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
31717
|
+
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
31718
|
+
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
31719
|
+
* reached only by a caller that already knew the addon id.
|
|
31720
|
+
*
|
|
31721
|
+
* ## The tab
|
|
31722
|
+
*
|
|
31723
|
+
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
31724
|
+
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
31725
|
+
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
31726
|
+
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
31727
|
+
* next to "PTZ").
|
|
31728
|
+
*/
|
|
31729
|
+
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
31730
|
+
var GridNormalizedRectSchema = object({
|
|
31731
|
+
x: number().min(0).max(1),
|
|
31732
|
+
y: number().min(0).max(1),
|
|
31733
|
+
width: number().gt(0).max(1),
|
|
31734
|
+
height: number().gt(0).max(1)
|
|
31735
|
+
});
|
|
31736
|
+
/**
|
|
31737
|
+
* One source camera, the part of its picture taken, and where that part lands.
|
|
31738
|
+
*
|
|
31739
|
+
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
31740
|
+
* — a profile switch, a firmware update, a substream that comes back different
|
|
31741
|
+
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
31742
|
+
* which is the class of bug nobody files.
|
|
31743
|
+
*/
|
|
31744
|
+
var GridLayoutCellSchema = object({
|
|
31745
|
+
deviceId: number().int().positive(),
|
|
31746
|
+
/** The part of the SOURCE taken, normalized against the source. */
|
|
31747
|
+
source: GridNormalizedRectSchema,
|
|
31748
|
+
/** Where it lands, normalized against the CANVAS. */
|
|
31749
|
+
cell: GridNormalizedRectSchema
|
|
31750
|
+
});
|
|
31751
|
+
/**
|
|
31752
|
+
* Which profiles this grid can actually compose, and why not.
|
|
31753
|
+
*
|
|
31754
|
+
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
31755
|
+
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
31756
|
+
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
31757
|
+
* low" is, and it is the one an operator can act on.
|
|
31758
|
+
*/
|
|
31759
|
+
var GridProfileOfferSchema = object({
|
|
31760
|
+
profile: _enum([
|
|
31761
|
+
"high",
|
|
31762
|
+
"mid",
|
|
31763
|
+
"low"
|
|
31764
|
+
]),
|
|
31765
|
+
offered: boolean(),
|
|
31766
|
+
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
31767
|
+
missingSources: array(number().int().positive()),
|
|
31768
|
+
/**
|
|
31769
|
+
* The canvas this profile composes onto, `WxH`, or empty when it is not
|
|
31770
|
+
* offered. DERIVED from the cells and the sources' own size at this profile —
|
|
31771
|
+
* it is reported because nothing else in the system would ever say what the
|
|
31772
|
+
* grid came out as, and because it is the number an operator would otherwise
|
|
31773
|
+
* expect to type.
|
|
31774
|
+
*/
|
|
31775
|
+
canvas: string(),
|
|
31776
|
+
/**
|
|
31777
|
+
* Whether this profile is PUBLISHED, of the ones the grid could serve.
|
|
31778
|
+
*
|
|
31779
|
+
* A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
|
|
31780
|
+
* a 4K canvas built from 4K decodes — something to opt into, not something a
|
|
31781
|
+
* viewer's adaptive should be handed by climbing to the top rung it can see.
|
|
31782
|
+
* Default is `mid` + `low`.
|
|
31783
|
+
*/
|
|
31784
|
+
published: boolean()
|
|
31785
|
+
});
|
|
31786
|
+
var GridLayoutViewSchema = object({
|
|
31787
|
+
/** The persisted grid row this camera was declared from. */
|
|
31788
|
+
instanceId: string(),
|
|
31789
|
+
deviceId: number().int().nonnegative(),
|
|
31790
|
+
name: string(),
|
|
31791
|
+
/**
|
|
31792
|
+
* NO canvas size. A grid's resolution is not authored: each profile derives
|
|
31793
|
+
* its own from the cells and its sources' dimensions. The two numbers that
|
|
31794
|
+
* used to be here were a text field that silently decided both how much the
|
|
31795
|
+
* composite cost and how sharp it was — see `profiles[].canvas` for what it
|
|
31796
|
+
* came out as.
|
|
31797
|
+
*/
|
|
31798
|
+
fps: number().int(),
|
|
31799
|
+
cells: array(GridLayoutCellSchema),
|
|
31800
|
+
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
31801
|
+
profiles: array(GridProfileOfferSchema)
|
|
31802
|
+
});
|
|
31803
|
+
var GridLayoutPatchSchema = object({
|
|
31804
|
+
deviceId: number().int().nonnegative(),
|
|
31805
|
+
name: string().min(1).max(160).optional(),
|
|
31806
|
+
fps: number().int().min(1).max(60).optional(),
|
|
31807
|
+
/** Which profiles to publish. See `GridProfileOffer.published`. */
|
|
31808
|
+
publishedProfiles: array(_enum([
|
|
31809
|
+
"high",
|
|
31810
|
+
"mid",
|
|
31811
|
+
"low"
|
|
31812
|
+
])).max(3).optional(),
|
|
31813
|
+
/**
|
|
31814
|
+
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
31815
|
+
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
31816
|
+
* for.
|
|
31817
|
+
*/
|
|
31818
|
+
cells: array(GridLayoutCellSchema).max(16)
|
|
31819
|
+
});
|
|
31820
|
+
var cameraGridLayoutCapability = {
|
|
31821
|
+
name: "camera-grid-layout",
|
|
31822
|
+
scope: "device",
|
|
31823
|
+
deviceNative: true,
|
|
31824
|
+
mode: "singleton",
|
|
31825
|
+
deviceTypes: [DeviceType.Camera],
|
|
31826
|
+
/**
|
|
31827
|
+
* The section is built by the ADDON and returned from
|
|
31828
|
+
* `getDeviceSettingsContribution`, not derived by the framework from a
|
|
31829
|
+
* `deviceConfig.ui` block.
|
|
31830
|
+
*
|
|
31831
|
+
* Both mechanisms render the same widget. This one hands the addon two
|
|
31832
|
+
* things the framework-derived route cannot give it:
|
|
31833
|
+
*
|
|
31834
|
+
* - it chooses its own section, `tab`, `location` and `order`, the way any
|
|
31835
|
+
* other setting does, instead of receiving them from a cap declaration;
|
|
31836
|
+
* - it can DECLINE per device. A camera that is not a grid gets no section
|
|
31837
|
+
* at all, rather than a widget that renders its own "not a grid" state.
|
|
31838
|
+
*
|
|
31839
|
+
* `recording` is the precedent (`recorder/recording-device-settings.ts`): it
|
|
31840
|
+
* returns `null` for anything that is not a camera, so the Recording tab
|
|
31841
|
+
* never appears there.
|
|
31842
|
+
*/
|
|
31843
|
+
exposesDeviceSettings: true,
|
|
31844
|
+
methods: {
|
|
31845
|
+
/**
|
|
31846
|
+
* The grid behind this device.
|
|
31847
|
+
*
|
|
31848
|
+
* `null` means ANSWERED and this camera is not a grid — not "not yet
|
|
31849
|
+
* known". The widget renders its "this is not a grid camera" state only
|
|
31850
|
+
* from this answer, never from an unresolved query (D315).
|
|
31851
|
+
*/
|
|
31852
|
+
getLayout: method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }),
|
|
31853
|
+
/** Write the geometry back. Returns the grid as it now stands, profiles included. */
|
|
31854
|
+
saveLayout: method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
31855
|
+
kind: "mutation",
|
|
31856
|
+
auth: "admin"
|
|
31857
|
+
})
|
|
31858
|
+
}
|
|
31859
|
+
};
|
|
31860
|
+
/**
|
|
31512
31861
|
* Carbon-monoxide alarm sensor. Drives Home Assistant `binary_sensor`
|
|
31513
31862
|
* entries with `device_class: carbon_monoxide`. Push-driven.
|
|
31514
31863
|
*/
|
|
@@ -32319,346 +32668,6 @@ var dayNightCapability = {
|
|
|
32319
32668
|
volatileStateFields: ["lastFetchedAt"]
|
|
32320
32669
|
};
|
|
32321
32670
|
/**
|
|
32322
|
-
* Vendor-neutral **onboard** recording + storage cap — what the CAMERA
|
|
32323
|
-
* writes to the CAMERA's own card, on the camera's own schedule.
|
|
32324
|
-
*
|
|
32325
|
-
* This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
|
|
32326
|
-
* footage ledger, our storage locations, our retention. This one has a
|
|
32327
|
-
* different authority — the camera's firmware — and per D62 it stores
|
|
32328
|
-
* nothing of its own. Every value here is read from the camera and every
|
|
32329
|
-
* write goes back to the camera; there is no CamStack-side mirror that
|
|
32330
|
-
* could disagree with the device.
|
|
32331
|
-
*
|
|
32332
|
-
* ## One shape, two firmwares
|
|
32333
|
-
*
|
|
32334
|
-
* Measured 2026-09-22 against the live fleet:
|
|
32335
|
-
*
|
|
32336
|
-
* | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
|
|
32337
|
-
* | --- | --- | --- |
|
|
32338
|
-
* | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
|
|
32339
|
-
* | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
|
|
32340
|
-
* | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
|
|
32341
|
-
* | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
|
|
32342
|
-
* | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
|
|
32343
|
-
* | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
|
|
32344
|
-
* | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
|
|
32345
|
-
* | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
|
|
32346
|
-
*
|
|
32347
|
-
* The two schedule models look different and are the same thing in
|
|
32348
|
-
* different coordinates: both answer "for this trigger, during which
|
|
32349
|
-
* weekly windows does the camera record". {@link RecordWindow} is that
|
|
32350
|
-
* question in one shape — Hikvision's ranges map straight onto it,
|
|
32351
|
-
* Reolink's mask expands into hour-aligned windows.
|
|
32352
|
-
*
|
|
32353
|
-
* ## Union, not intersection
|
|
32354
|
-
*
|
|
32355
|
-
* **The same fields exist on every camera.** What differs per device is
|
|
32356
|
-
* which VALUES that device accepts, and that is what {@link
|
|
32357
|
-
* RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
|
|
32358
|
-
* per field plus the schedule's own limits. A control a camera cannot
|
|
32359
|
-
* honour is rendered DISABLED WITH ITS REASON, never missing and never
|
|
32360
|
-
* dead: disabled must not look like broken.
|
|
32361
|
-
*
|
|
32362
|
-
* ## Refusal by name
|
|
32363
|
-
*
|
|
32364
|
-
* A write a camera cannot honour is refused with a sentence the operator
|
|
32365
|
-
* can read — never accepted and dropped. Both providers refuse through
|
|
32366
|
-
* {@link describeOnboardRefusal}, so the vocabulary is one function and
|
|
32367
|
-
* one test, not two hand-written vendor opinions.
|
|
32368
|
-
*
|
|
32369
|
-
* Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
|
|
32370
|
-
* `getOptions` advertises per-camera availability, `getStatus` (auto-
|
|
32371
|
-
* injected from `status`) reports the live values, and a single
|
|
32372
|
-
* `setSettings` mutation applies a partial change. No hand-written
|
|
32373
|
-
* settings-contribution methods.
|
|
32374
|
-
*/
|
|
32375
|
-
/**
|
|
32376
|
-
* What makes the camera start recording during a window.
|
|
32377
|
-
*
|
|
32378
|
-
* The union of both vendors' vocabularies. `continuous` is Hikvision's
|
|
32379
|
-
* `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
|
|
32380
|
-
* object-class triggers are Reolink-only today and the smart-event ones
|
|
32381
|
-
* (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
|
|
32382
|
-
* firmwares measured — a camera that cannot record on a trigger simply
|
|
32383
|
-
* does not list it in `options.schedule.triggers`, and a window naming
|
|
32384
|
-
* it is REFUSED, not dropped.
|
|
32385
|
-
*/
|
|
32386
|
-
var RecordTriggerSchema = _enum([
|
|
32387
|
-
"continuous",
|
|
32388
|
-
"motion",
|
|
32389
|
-
"person",
|
|
32390
|
-
"vehicle",
|
|
32391
|
-
"animal",
|
|
32392
|
-
"lineCrossing",
|
|
32393
|
-
"intrusion",
|
|
32394
|
-
"loitering",
|
|
32395
|
-
"alarmInput"
|
|
32396
|
-
]);
|
|
32397
|
-
/**
|
|
32398
|
-
* One weekly recording window: "on `day`, from `startMinute` to
|
|
32399
|
-
* `endMinute`, record on `trigger`".
|
|
32400
|
-
*
|
|
32401
|
-
* `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
|
|
32402
|
-
* both firmwares enumerate). Minutes are local camera time since
|
|
32403
|
-
* midnight; `endMinute` may be 1440, meaning end of day — that is
|
|
32404
|
-
* Hikvision's literal `24:00` and Reolink's 24th mask slot, and
|
|
32405
|
-
* collapsing it to 0 would turn a whole-day window into an empty one.
|
|
32406
|
-
*/
|
|
32407
|
-
var RecordWindowSchema = object({
|
|
32408
|
-
trigger: RecordTriggerSchema,
|
|
32409
|
-
day: number().int().min(0).max(6),
|
|
32410
|
-
startMinute: number().int().min(0).max(1439),
|
|
32411
|
-
endMinute: number().int().min(1).max(1440)
|
|
32412
|
-
});
|
|
32413
|
-
/** Status of one physical volume, as the camera itself describes it. */
|
|
32414
|
-
var OnboardStorageVolumeSchema = object({
|
|
32415
|
-
/** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
|
|
32416
|
-
id: string(),
|
|
32417
|
-
/** The camera's own name for it, when it gives one (`hddName`). */
|
|
32418
|
-
label: string().optional(),
|
|
32419
|
-
status: _enum([
|
|
32420
|
-
"ok",
|
|
32421
|
-
"unformatted",
|
|
32422
|
-
"error",
|
|
32423
|
-
"offline",
|
|
32424
|
-
"unknown"
|
|
32425
|
-
]),
|
|
32426
|
-
/**
|
|
32427
|
-
* Total size in MB, or **null when the camera did not say**.
|
|
32428
|
-
*
|
|
32429
|
-
* Never 0 for an unreadable value: a measurement that failed is not a
|
|
32430
|
-
* measurement (D393), and a card whose size is unknown must not be
|
|
32431
|
-
* rendered as a card of size zero.
|
|
32432
|
-
*/
|
|
32433
|
-
capacityMb: number().nullable(),
|
|
32434
|
-
/**
|
|
32435
|
-
* Free space in MB, or null when unknown.
|
|
32436
|
-
*
|
|
32437
|
-
* **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
|
|
32438
|
-
* 1439 both report exactly 11776 MB free — the fixed reserve a looping
|
|
32439
|
-
* card converges on once it has wrapped. At loop steady state the
|
|
32440
|
-
* number is identical whether the camera recorded yesterday or stopped
|
|
32441
|
-
* a month ago.
|
|
32442
|
-
*/
|
|
32443
|
-
freeMb: number().nullable(),
|
|
32444
|
-
/** True when the camera reports the volume writable (`property` RW). */
|
|
32445
|
-
writable: boolean().optional()
|
|
32446
|
-
});
|
|
32447
|
-
/**
|
|
32448
|
-
* What the camera is doing with its own storage, right now.
|
|
32449
|
-
*
|
|
32450
|
-
* Every scalar is nullable and **null means the camera did not answer**,
|
|
32451
|
-
* never a default. A form that seeds `0` from an unanswered read invites
|
|
32452
|
-
* the operator to save that 0 back onto the camera.
|
|
32453
|
-
*/
|
|
32454
|
-
var RecordingOnboardStatusSchema = object({
|
|
32455
|
-
storage: discriminatedUnion("kind", [
|
|
32456
|
-
object({
|
|
32457
|
-
kind: literal("present"),
|
|
32458
|
-
volumes: array(OnboardStorageVolumeSchema)
|
|
32459
|
-
}),
|
|
32460
|
-
object({
|
|
32461
|
-
kind: literal("absent"),
|
|
32462
|
-
reason: string()
|
|
32463
|
-
}),
|
|
32464
|
-
object({
|
|
32465
|
-
kind: literal("unknown"),
|
|
32466
|
-
reason: string()
|
|
32467
|
-
})
|
|
32468
|
-
]),
|
|
32469
|
-
tracks: array(object({
|
|
32470
|
-
id: string(),
|
|
32471
|
-
enabled: boolean(),
|
|
32472
|
-
isVideo: boolean(),
|
|
32473
|
-
/** From the camera's own track description. Null when it does not say. */
|
|
32474
|
-
codec: string().nullable(),
|
|
32475
|
-
resolution: string().nullable(),
|
|
32476
|
-
/** Per-track overwrite flag, where the firmware keeps it per track. */
|
|
32477
|
-
overwriteWhenFull: boolean().nullable()
|
|
32478
|
-
})),
|
|
32479
|
-
/**
|
|
32480
|
-
* The track the write path targets — the enabled VIDEO one. Null when
|
|
32481
|
-
* no track could be identified, which is itself a refusal reason.
|
|
32482
|
-
*/
|
|
32483
|
-
primaryTrackId: string().nullable(),
|
|
32484
|
-
/** Master "record to the card at all" switch. */
|
|
32485
|
-
enabled: boolean().nullable(),
|
|
32486
|
-
overwriteWhenFull: boolean().nullable(),
|
|
32487
|
-
preRecordSec: number().nullable(),
|
|
32488
|
-
postRecordSec: number().nullable(),
|
|
32489
|
-
/** Length of one recorded file, in minutes. */
|
|
32490
|
-
segmentMinutes: number().nullable(),
|
|
32491
|
-
/** The primary track's weekly windows, flattened. */
|
|
32492
|
-
windows: array(RecordWindowSchema),
|
|
32493
|
-
/**
|
|
32494
|
-
* How many windows the camera described that CamStack could NOT read —
|
|
32495
|
-
* an unrecognised trigger, an unparseable clock, a weekday it does not
|
|
32496
|
-
* name.
|
|
32497
|
-
*
|
|
32498
|
-
* A dropped window is work the reader threw away, and a schedule that
|
|
32499
|
-
* silently shows fewer rows than the camera holds is how an operator
|
|
32500
|
-
* saves back a schedule shorter than the one they were looking at
|
|
32501
|
-
* (D391). Non-zero means the window list is INCOMPLETE and a write
|
|
32502
|
-
* that replaces it would delete what was not shown — which is why a
|
|
32503
|
-
* provider reporting a non-zero count also reports the schedule as not
|
|
32504
|
-
* writable.
|
|
32505
|
-
*/
|
|
32506
|
-
unreadableWindows: number(),
|
|
32507
|
-
/**
|
|
32508
|
-
* The camera is scheduled to record and has NO usable storage.
|
|
32509
|
-
*
|
|
32510
|
-
* A first-class fact because it is the fleet's most common silent
|
|
32511
|
-
* defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
|
|
32512
|
-
* to a card that is not there. Neither the schedule nor the storage
|
|
32513
|
-
* read says anything wrong on its own; only the pair does.
|
|
32514
|
-
*/
|
|
32515
|
-
recordingToNowhere: boolean(),
|
|
32516
|
-
lastFetchedAt: number()
|
|
32517
|
-
});
|
|
32518
|
-
/** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
|
|
32519
|
-
var RangeSchema = object({
|
|
32520
|
-
min: number(),
|
|
32521
|
-
max: number(),
|
|
32522
|
-
step: number()
|
|
32523
|
-
});
|
|
32524
|
-
/**
|
|
32525
|
-
* The values a camera actually takes for a numeric field, when they are a SET
|
|
32526
|
-
* rather than a range.
|
|
32527
|
-
*
|
|
32528
|
-
* `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
|
|
32529
|
-
* (I91DN) on 2026-09-22 by writing each value and reading it back:
|
|
32530
|
-
*
|
|
32531
|
-
* - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
|
|
32532
|
-
* camera's "no limit" — `-1` and `4294967295` both land on it);
|
|
32533
|
-
* - post-record: `5, 10, 30, 60, 120, 300, 600`.
|
|
32534
|
-
*
|
|
32535
|
-
* Neither is expressible as a step: the first has a sentinel two billion away
|
|
32536
|
-
* from its neighbours, the second doubles and then jumps. A range that tried
|
|
32537
|
-
* would forbid values the camera takes AND permit values it silently replaces
|
|
32538
|
-
* with 5 — wrong in both directions at once.
|
|
32539
|
-
*
|
|
32540
|
-
* `sentinel` names the member that is not a duration, so a surface can render
|
|
32541
|
-
* "no limit" instead of `2147483647` seconds.
|
|
32542
|
-
*/
|
|
32543
|
-
var AllowedValuesSchema = object({
|
|
32544
|
-
values: array(number()).min(1),
|
|
32545
|
-
sentinel: object({
|
|
32546
|
-
value: number(),
|
|
32547
|
-
meaning: _enum(["no-limit", "disabled"])
|
|
32548
|
-
}).optional()
|
|
32549
|
-
});
|
|
32550
|
-
/**
|
|
32551
|
-
* Per-field availability on ONE camera.
|
|
32552
|
-
*
|
|
32553
|
-
* The field exists on every camera — this says whether this one can be
|
|
32554
|
-
* read and whether it can be written, and `reason` says why not when
|
|
32555
|
-
* either is false. The UI renders the control DISABLED with the reason
|
|
32556
|
-
* rather than hiding it, so a limitation is legible instead of looking
|
|
32557
|
-
* like a missing feature.
|
|
32558
|
-
*/
|
|
32559
|
-
var OnboardFieldSupportSchema = object({
|
|
32560
|
-
readable: boolean(),
|
|
32561
|
-
writable: boolean(),
|
|
32562
|
-
/** Required whenever `readable` or `writable` is false. */
|
|
32563
|
-
reason: string().optional()
|
|
32564
|
-
});
|
|
32565
|
-
/** What this camera's schedule model can express. */
|
|
32566
|
-
var OnboardScheduleSupportSchema = object({
|
|
32567
|
-
support: OnboardFieldSupportSchema,
|
|
32568
|
-
/**
|
|
32569
|
-
* The smallest time step the camera can express, in minutes.
|
|
32570
|
-
*
|
|
32571
|
-
* Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
|
|
32572
|
-
* 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
|
|
32573
|
-
* window whose edges are not a multiple of this is REFUSED rather than
|
|
32574
|
-
* quietly rounded — rounding is how an operator's 06:30 becomes 06:00
|
|
32575
|
-
* and nothing says so.
|
|
32576
|
-
*/
|
|
32577
|
-
granularityMinutes: number(),
|
|
32578
|
-
/** Triggers this camera can record on. A window naming another is refused. */
|
|
32579
|
-
triggers: array(RecordTriggerSchema),
|
|
32580
|
-
/**
|
|
32581
|
-
* False when the camera stores ONE trigger per time range, so two
|
|
32582
|
-
* windows overlapping on the same day cannot carry different triggers.
|
|
32583
|
-
* True on Reolink, whose mask is per-trigger and independent.
|
|
32584
|
-
*/
|
|
32585
|
-
supportsOverlappingTriggers: boolean()
|
|
32586
|
-
});
|
|
32587
|
-
var RecordingOnboardOptionsSchema = object({
|
|
32588
|
-
enabled: OnboardFieldSupportSchema,
|
|
32589
|
-
overwriteWhenFull: OnboardFieldSupportSchema,
|
|
32590
|
-
preRecordSec: OnboardFieldSupportSchema,
|
|
32591
|
-
preRecordSecRange: RangeSchema.optional(),
|
|
32592
|
-
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
32593
|
-
preRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
32594
|
-
postRecordSec: OnboardFieldSupportSchema,
|
|
32595
|
-
postRecordSecRange: RangeSchema.optional(),
|
|
32596
|
-
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
32597
|
-
postRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
32598
|
-
segmentMinutes: OnboardFieldSupportSchema,
|
|
32599
|
-
segmentMinutesRange: RangeSchema.optional(),
|
|
32600
|
-
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
32601
|
-
segmentMinutesAllowed: AllowedValuesSchema.optional(),
|
|
32602
|
-
schedule: OnboardScheduleSupportSchema
|
|
32603
|
-
});
|
|
32604
|
-
/**
|
|
32605
|
-
* A partial change. Every field optional.
|
|
32606
|
-
*
|
|
32607
|
-
* Unlike the other `deviceConfig` caps, a provider here does **NOT**
|
|
32608
|
-
* silently ignore a field it cannot support — it refuses, by name,
|
|
32609
|
-
* through {@link describeOnboardRefusal}. Silence on a recording setting
|
|
32610
|
-
* is the failure D62 exists to prevent: the operator believes the camera
|
|
32611
|
-
* is recording the way the form says, and it is not.
|
|
32612
|
-
*/
|
|
32613
|
-
var RecordingOnboardPatchSchema = object({
|
|
32614
|
-
enabled: boolean().optional(),
|
|
32615
|
-
overwriteWhenFull: boolean().optional(),
|
|
32616
|
-
preRecordSec: number().optional(),
|
|
32617
|
-
postRecordSec: number().optional(),
|
|
32618
|
-
segmentMinutes: number().optional(),
|
|
32619
|
-
/** The complete new window set for the primary track — not a delta. */
|
|
32620
|
-
windows: array(RecordWindowSchema).optional()
|
|
32621
|
-
});
|
|
32622
|
-
var recordingOnboardCapability = {
|
|
32623
|
-
name: "recording-onboard",
|
|
32624
|
-
scope: "device",
|
|
32625
|
-
deviceNative: true,
|
|
32626
|
-
mode: "singleton",
|
|
32627
|
-
deviceTypes: [DeviceType.Camera],
|
|
32628
|
-
deviceConfig: { ui: {
|
|
32629
|
-
kind: "derived-form",
|
|
32630
|
-
builderId: "recording-onboard",
|
|
32631
|
-
tab: "recording"
|
|
32632
|
-
} },
|
|
32633
|
-
methods: {
|
|
32634
|
-
getOptions: method(object({ deviceId: number() }), RecordingOnboardOptionsSchema),
|
|
32635
|
-
setSettings: method(object({
|
|
32636
|
-
deviceId: number(),
|
|
32637
|
-
settings: RecordingOnboardPatchSchema
|
|
32638
|
-
}), _void(), {
|
|
32639
|
-
kind: "mutation",
|
|
32640
|
-
auth: "admin"
|
|
32641
|
-
})
|
|
32642
|
-
},
|
|
32643
|
-
status: {
|
|
32644
|
-
schema: RecordingOnboardStatusSchema,
|
|
32645
|
-
kind: "poll"
|
|
32646
|
-
},
|
|
32647
|
-
runtimeState: RecordingOnboardStatusSchema,
|
|
32648
|
-
/**
|
|
32649
|
-
* Runtime-state durability: **restored** — operator-set camera-side
|
|
32650
|
-
* recording config; mutation-driven, and the storage half is the last
|
|
32651
|
-
* thing the camera said about its own card.
|
|
32652
|
-
*
|
|
32653
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
32654
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
32655
|
-
*/
|
|
32656
|
-
durability: "restored",
|
|
32657
|
-
/** Clock fields: written, but excluded from the compare that decides
|
|
32658
|
-
* whether persisting is worth a SQLite commit. */
|
|
32659
|
-
volatileStateFields: ["lastFetchedAt"]
|
|
32660
|
-
};
|
|
32661
|
-
/**
|
|
32662
32671
|
* Generic device-level status snapshot. Auto-registered by `BaseDevice`
|
|
32663
32672
|
* for every device, regardless of provider — the kernel needs a uniform
|
|
32664
32673
|
* cap-keyed slice for the basic device flags every consumer expects to
|
|
@@ -32877,40 +32886,6 @@ var eventEmitterCapability = {
|
|
|
32877
32886
|
*/
|
|
32878
32887
|
durability: "session"
|
|
32879
32888
|
};
|
|
32880
|
-
var EventItemSchema = object({
|
|
32881
|
-
id: string(),
|
|
32882
|
-
type: string(),
|
|
32883
|
-
timestamp: number(),
|
|
32884
|
-
label: string().optional(),
|
|
32885
|
-
thumbnailUrl: string().optional(),
|
|
32886
|
-
clipUrl: string().optional(),
|
|
32887
|
-
metadata: record(string(), unknown()).optional()
|
|
32888
|
-
});
|
|
32889
|
-
var eventsCapability = {
|
|
32890
|
-
name: "events",
|
|
32891
|
-
scope: "device",
|
|
32892
|
-
mode: "singleton",
|
|
32893
|
-
deviceTypes: [DeviceType.Camera],
|
|
32894
|
-
methods: {
|
|
32895
|
-
getEvents: method(object({
|
|
32896
|
-
deviceId: number(),
|
|
32897
|
-
from: number().optional(),
|
|
32898
|
-
to: number().optional(),
|
|
32899
|
-
limit: number().optional()
|
|
32900
|
-
}), array(EventItemSchema)),
|
|
32901
|
-
getEventThumbnail: method(object({
|
|
32902
|
-
deviceId: number(),
|
|
32903
|
-
eventId: string()
|
|
32904
|
-
}), object({
|
|
32905
|
-
base64: string(),
|
|
32906
|
-
contentType: string()
|
|
32907
|
-
}).nullable()),
|
|
32908
|
-
getEventClipUrl: method(object({
|
|
32909
|
-
deviceId: number(),
|
|
32910
|
-
eventId: string()
|
|
32911
|
-
}), string().nullable())
|
|
32912
|
-
}
|
|
32913
|
-
};
|
|
32914
32889
|
var IdentitySchema = object({
|
|
32915
32890
|
id: string(),
|
|
32916
32891
|
name: string(),
|
|
@@ -35398,179 +35373,6 @@ var motionTriggerCapability = {
|
|
|
35398
35373
|
durability: "session"
|
|
35399
35374
|
};
|
|
35400
35375
|
/**
|
|
35401
|
-
* camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
|
|
35402
|
-
* page.
|
|
35403
|
-
*
|
|
35404
|
-
* ## Why this is a capability and not an addon settings schema
|
|
35405
|
-
*
|
|
35406
|
-
* It was one, and it did not render. The addon declared the editor as a
|
|
35407
|
-
* `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
|
|
35408
|
-
* returned that section correctly and `ConfigFormField` renders `type:'widget'`
|
|
35409
|
-
* perfectly well — and nothing ever asked camera-grid for it. The Cluster →
|
|
35410
|
-
* Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
|
|
35411
|
-
* addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
|
|
35412
|
-
* not on it "falls off silently".
|
|
35413
|
-
*
|
|
35414
|
-
* Adding a fifth name to that list would have been the wrong fix twice over:
|
|
35415
|
-
* that page is per-camera DETECTION tuning, and a grid's geometry belongs
|
|
35416
|
-
* beside PTZ and motion zones on the camera itself. The device page is
|
|
35417
|
-
* BINDING-driven (D12), so the way in is a capability bound to the device —
|
|
35418
|
-
* and this cap carries its section the way `recording` does, by RETURNING it
|
|
35419
|
-
* from `getDeviceSettingsContribution`.
|
|
35420
|
-
*
|
|
35421
|
-
* Seven other widgets are still declared the other way, through a
|
|
35422
|
-
* `deviceConfig.ui` block the framework derives a section from. That route
|
|
35423
|
-
* gives the addon no say in where its own panel lands and no way to decline
|
|
35424
|
-
* for a device the panel does not suit, which is why this one does not use it.
|
|
35425
|
-
*
|
|
35426
|
-
* ## Why one addon may implement it
|
|
35427
|
-
*
|
|
35428
|
-
* It is a device-scoped NATIVE cap, registered by the grid camera device
|
|
35429
|
-
* itself. Nothing else declares a composite camera, so nothing else has a
|
|
35430
|
-
* layout — and the device-scoped route means the widget asks THE camera, not
|
|
35431
|
-
* "the camera-grid addon", which is what let the old custom-action pair be
|
|
35432
|
-
* reached only by a caller that already knew the addon id.
|
|
35433
|
-
*
|
|
35434
|
-
* ## The tab
|
|
35435
|
-
*
|
|
35436
|
-
* `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
|
|
35437
|
-
* is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
|
|
35438
|
-
* entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
|
|
35439
|
-
* label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
|
|
35440
|
-
* next to "PTZ").
|
|
35441
|
-
*/
|
|
35442
|
-
/** A rectangle in normalized [0,1] coordinates of whatever contains it. */
|
|
35443
|
-
var GridNormalizedRectSchema = object({
|
|
35444
|
-
x: number().min(0).max(1),
|
|
35445
|
-
y: number().min(0).max(1),
|
|
35446
|
-
width: number().gt(0).max(1),
|
|
35447
|
-
height: number().gt(0).max(1)
|
|
35448
|
-
});
|
|
35449
|
-
/**
|
|
35450
|
-
* One source camera, the part of its picture taken, and where that part lands.
|
|
35451
|
-
*
|
|
35452
|
-
* Both rectangles are NORMALIZED (D519): a source camera can change resolution
|
|
35453
|
-
* — a profile switch, a firmware update, a substream that comes back different
|
|
35454
|
-
* — and a stored PIXEL rectangle would quietly start cutting the wrong region,
|
|
35455
|
-
* which is the class of bug nobody files.
|
|
35456
|
-
*/
|
|
35457
|
-
var GridLayoutCellSchema = object({
|
|
35458
|
-
deviceId: number().int().positive(),
|
|
35459
|
-
/** The part of the SOURCE taken, normalized against the source. */
|
|
35460
|
-
source: GridNormalizedRectSchema,
|
|
35461
|
-
/** Where it lands, normalized against the CANVAS. */
|
|
35462
|
-
cell: GridNormalizedRectSchema
|
|
35463
|
-
});
|
|
35464
|
-
/**
|
|
35465
|
-
* Which profiles this grid can actually compose, and why not.
|
|
35466
|
-
*
|
|
35467
|
-
* A grid's `high` composes its sources' `high` and its `low` their `low`, so a
|
|
35468
|
-
* profile is on offer only when EVERY source can serve it. The refusal NAMES
|
|
35469
|
-
* the sources, because "this grid has no low" is not a finding — "615 has no
|
|
35470
|
-
* low" is, and it is the one an operator can act on.
|
|
35471
|
-
*/
|
|
35472
|
-
var GridProfileOfferSchema = object({
|
|
35473
|
-
profile: _enum([
|
|
35474
|
-
"high",
|
|
35475
|
-
"mid",
|
|
35476
|
-
"low"
|
|
35477
|
-
]),
|
|
35478
|
-
offered: boolean(),
|
|
35479
|
-
/** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
|
|
35480
|
-
missingSources: array(number().int().positive()),
|
|
35481
|
-
/**
|
|
35482
|
-
* The canvas this profile composes onto, `WxH`, or empty when it is not
|
|
35483
|
-
* offered. DERIVED from the cells and the sources' own size at this profile —
|
|
35484
|
-
* it is reported because nothing else in the system would ever say what the
|
|
35485
|
-
* grid came out as, and because it is the number an operator would otherwise
|
|
35486
|
-
* expect to type.
|
|
35487
|
-
*/
|
|
35488
|
-
canvas: string(),
|
|
35489
|
-
/**
|
|
35490
|
-
* Whether this profile is PUBLISHED, of the ones the grid could serve.
|
|
35491
|
-
*
|
|
35492
|
-
* A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
|
|
35493
|
-
* a 4K canvas built from 4K decodes — something to opt into, not something a
|
|
35494
|
-
* viewer's adaptive should be handed by climbing to the top rung it can see.
|
|
35495
|
-
* Default is `mid` + `low`.
|
|
35496
|
-
*/
|
|
35497
|
-
published: boolean()
|
|
35498
|
-
});
|
|
35499
|
-
var GridLayoutViewSchema = object({
|
|
35500
|
-
/** The persisted grid row this camera was declared from. */
|
|
35501
|
-
instanceId: string(),
|
|
35502
|
-
deviceId: number().int().nonnegative(),
|
|
35503
|
-
name: string(),
|
|
35504
|
-
/**
|
|
35505
|
-
* NO canvas size. A grid's resolution is not authored: each profile derives
|
|
35506
|
-
* its own from the cells and its sources' dimensions. The two numbers that
|
|
35507
|
-
* used to be here were a text field that silently decided both how much the
|
|
35508
|
-
* composite cost and how sharp it was — see `profiles[].canvas` for what it
|
|
35509
|
-
* came out as.
|
|
35510
|
-
*/
|
|
35511
|
-
fps: number().int(),
|
|
35512
|
-
cells: array(GridLayoutCellSchema),
|
|
35513
|
-
/** What the catalog will publish, and what it refuses to. Read-only. */
|
|
35514
|
-
profiles: array(GridProfileOfferSchema)
|
|
35515
|
-
});
|
|
35516
|
-
var GridLayoutPatchSchema = object({
|
|
35517
|
-
deviceId: number().int().nonnegative(),
|
|
35518
|
-
name: string().min(1).max(160).optional(),
|
|
35519
|
-
fps: number().int().min(1).max(60).optional(),
|
|
35520
|
-
/** Which profiles to publish. See `GridProfileOffer.published`. */
|
|
35521
|
-
publishedProfiles: array(_enum([
|
|
35522
|
-
"high",
|
|
35523
|
-
"mid",
|
|
35524
|
-
"low"
|
|
35525
|
-
])).max(3).optional(),
|
|
35526
|
-
/**
|
|
35527
|
-
* The whole cell list at once. A per-cell patch would need an ordering the
|
|
35528
|
-
* editor does not have, and a half-applied layout is a picture nobody asked
|
|
35529
|
-
* for.
|
|
35530
|
-
*/
|
|
35531
|
-
cells: array(GridLayoutCellSchema).max(16)
|
|
35532
|
-
});
|
|
35533
|
-
var cameraGridLayoutCapability = {
|
|
35534
|
-
name: "camera-grid-layout",
|
|
35535
|
-
scope: "device",
|
|
35536
|
-
deviceNative: true,
|
|
35537
|
-
mode: "singleton",
|
|
35538
|
-
deviceTypes: [DeviceType.Camera],
|
|
35539
|
-
/**
|
|
35540
|
-
* The section is built by the ADDON and returned from
|
|
35541
|
-
* `getDeviceSettingsContribution`, not derived by the framework from a
|
|
35542
|
-
* `deviceConfig.ui` block.
|
|
35543
|
-
*
|
|
35544
|
-
* Both mechanisms render the same widget. This one hands the addon two
|
|
35545
|
-
* things the framework-derived route cannot give it:
|
|
35546
|
-
*
|
|
35547
|
-
* - it chooses its own section, `tab`, `location` and `order`, the way any
|
|
35548
|
-
* other setting does, instead of receiving them from a cap declaration;
|
|
35549
|
-
* - it can DECLINE per device. A camera that is not a grid gets no section
|
|
35550
|
-
* at all, rather than a widget that renders its own "not a grid" state.
|
|
35551
|
-
*
|
|
35552
|
-
* `recording` is the precedent (`recorder/recording-device-settings.ts`): it
|
|
35553
|
-
* returns `null` for anything that is not a camera, so the Recording tab
|
|
35554
|
-
* never appears there.
|
|
35555
|
-
*/
|
|
35556
|
-
exposesDeviceSettings: true,
|
|
35557
|
-
methods: {
|
|
35558
|
-
/**
|
|
35559
|
-
* The grid behind this device.
|
|
35560
|
-
*
|
|
35561
|
-
* `null` means ANSWERED and this camera is not a grid — not "not yet
|
|
35562
|
-
* known". The widget renders its "this is not a grid camera" state only
|
|
35563
|
-
* from this answer, never from an unresolved query (D315).
|
|
35564
|
-
*/
|
|
35565
|
-
getLayout: method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }),
|
|
35566
|
-
/** Write the geometry back. Returns the grid as it now stands, profiles included. */
|
|
35567
|
-
saveLayout: method(GridLayoutPatchSchema, GridLayoutViewSchema, {
|
|
35568
|
-
kind: "mutation",
|
|
35569
|
-
auth: "admin"
|
|
35570
|
-
})
|
|
35571
|
-
}
|
|
35572
|
-
};
|
|
35573
|
-
/**
|
|
35574
35376
|
* Motion-zones share the same MaskShape vocabulary as privacy-mask — the
|
|
35575
35377
|
* on-camera motion-detection mask is a single `grid` region (a row-major
|
|
35576
35378
|
* boolean cell lattice the camera's onboard VMD evaluates). Composing it as
|
|
@@ -38240,37 +38042,37 @@ var rebootCapability = {
|
|
|
38240
38042
|
auth: "admin"
|
|
38241
38043
|
}) }
|
|
38242
38044
|
};
|
|
38243
|
-
/**
|
|
38244
|
-
* `recording` cap — footage availability + HLS playback manifests + per-device
|
|
38245
|
-
* recording config. NOTE on events (source of truth, R5/C3): this cap carries
|
|
38246
|
-
* NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
|
|
38247
|
-
* events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
|
|
38248
|
-
* rows) and are the ONLY event surface — the recorder has none. The in-RAM
|
|
38249
|
-
* playback markers it used to build were deleted on 2026-08-29 because nothing
|
|
38250
|
-
* ever read them. Event<->footage joins are by time, padded with the shared
|
|
38251
|
-
* `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
|
|
38252
|
-
*/
|
|
38253
|
-
var RecordingStatusSchema = object({
|
|
38254
|
-
deviceId: number(),
|
|
38255
|
-
enabled: boolean(),
|
|
38256
|
-
/** THE derived storage mode, from the one definition
|
|
38257
|
-
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
38258
|
-
* `on-device-decision` could have reached the recorder and not the status. */
|
|
38259
|
-
activeMode: RecordingStorageModeSchema,
|
|
38260
|
-
nodeId: string(),
|
|
38261
|
-
storageBytes: number()
|
|
38262
|
-
});
|
|
38263
38045
|
var RecordingRangeSchema = object({
|
|
38264
38046
|
profile: string(),
|
|
38265
38047
|
startMs: number(),
|
|
38266
38048
|
endMs: number()
|
|
38267
38049
|
});
|
|
38050
|
+
/**
|
|
38051
|
+
* How a source ANSWERED, on every singular read of this cap.
|
|
38052
|
+
*
|
|
38053
|
+
* `'read'` — it looked. `ranges: []` / `days: []` is then a real claim: this
|
|
38054
|
+
* source has no coverage in the window. `'unreadable'` — nobody could look
|
|
38055
|
+
* (the camera was unreachable, the calendar rung threw, the location is
|
|
38056
|
+
* unmounted, the node is still on the old build), and the emptiness beside it
|
|
38057
|
+
* means NOTHING.
|
|
38058
|
+
*
|
|
38059
|
+
* The batch rows have carried this since the grid existed; the SINGULAR
|
|
38060
|
+
* answers gained it with the collection (D625 §10.4), because they are the
|
|
38061
|
+
* ones the single-camera picker uses and because a half-converted fleet makes
|
|
38062
|
+
* "nobody looked" common for the length of a deploy. Without it the timeline
|
|
38063
|
+
* has no vocabulary for it, and `(data ?? [])` in a viewer turns a rollout into
|
|
38064
|
+
* a fleet of cameras that appear to have lost their recordings (D315, D393).
|
|
38065
|
+
*/
|
|
38066
|
+
var RecordingReadSchema = _enum(["read", "unreadable"]);
|
|
38268
38067
|
var RecordingAvailabilitySchema = object({
|
|
38269
38068
|
deviceId: number(),
|
|
38069
|
+
/** See {@link RecordingReadSchema}. An `'unreadable'` answer carries an empty
|
|
38070
|
+
* `ranges` that means nothing — never draw it as "no footage". */
|
|
38071
|
+
read: RecordingReadSchema,
|
|
38270
38072
|
ranges: array(RecordingRangeSchema),
|
|
38271
38073
|
/**
|
|
38272
|
-
* Every profile this camera has footage in — not only the one
|
|
38273
|
-
* describes (D433).
|
|
38074
|
+
* Every profile this camera has footage in AT THIS SOURCE — not only the one
|
|
38075
|
+
* `ranges` describes (D433).
|
|
38274
38076
|
*
|
|
38275
38077
|
* `ranges` answers for ONE profile by design: the timeline is a single bar,
|
|
38276
38078
|
* and enumerating all of them triples the directory reads for a bar that
|
|
@@ -38287,15 +38089,344 @@ var RecordingAvailabilitySchema = object({
|
|
|
38287
38089
|
});
|
|
38288
38090
|
var RecordingDaysSchema = object({
|
|
38289
38091
|
deviceId: number(),
|
|
38092
|
+
/** See {@link RecordingReadSchema}. `days: []` on an `'unreadable'` answer is
|
|
38093
|
+
* "nobody could look", and the date-picker must not spell it the same as
|
|
38094
|
+
* "no footage this month". */
|
|
38095
|
+
read: RecordingReadSchema,
|
|
38290
38096
|
/** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
|
|
38291
38097
|
days: array(number())
|
|
38292
38098
|
});
|
|
38099
|
+
var RecordingManifestSchema = object({
|
|
38100
|
+
deviceId: number(),
|
|
38101
|
+
/** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
|
|
38102
|
+
localMasterPath: string().nullable(),
|
|
38103
|
+
/** HTTP(S) URL to the master playlist on the recording node's playback server
|
|
38104
|
+
* (the PRIMARY candidate); null when no recording / server. Carries the
|
|
38105
|
+
* scoped playback token in its path. */
|
|
38106
|
+
playbackUrl: string().nullable(),
|
|
38107
|
+
/**
|
|
38108
|
+
* Candidate master-playlist URLs the client tries in order (LAN first, then
|
|
38109
|
+
* remote — Tailscale/Cloudflare if the operator configured extra hosts), each
|
|
38110
|
+
* carrying the same scoped token. `playbackUrl` is the first entry. Empty when
|
|
38111
|
+
* there is no recording / server.
|
|
38112
|
+
*/
|
|
38113
|
+
playbackEndpoints: array(string())
|
|
38114
|
+
});
|
|
38115
|
+
var RecordingSourceAvailabilitySchema = object({
|
|
38116
|
+
state: _enum([
|
|
38117
|
+
"ok",
|
|
38118
|
+
"sleeping",
|
|
38119
|
+
"unreachable",
|
|
38120
|
+
"no-storage",
|
|
38121
|
+
"index-empty"
|
|
38122
|
+
]),
|
|
38123
|
+
/** Free text, shown verbatim. Names the camera's own refusal when there is one. */
|
|
38124
|
+
reason: string().optional(),
|
|
38125
|
+
/** When this source's coverage was last CONFIRMED. A cached answer is never
|
|
38126
|
+
* drawn as current: the surface shows the age whenever it is older than the
|
|
38127
|
+
* refresh interval. The clip catalog's `catalogAsOf`, under the name the
|
|
38128
|
+
* timeline uses for it. */
|
|
38129
|
+
coverageAsOf: number().optional()
|
|
38130
|
+
});
|
|
38131
|
+
/**
|
|
38132
|
+
* One SOURCE of recorded coverage for a camera — a row of the picker.
|
|
38133
|
+
*
|
|
38134
|
+
* A provider lists the sources IT serves for that device, and answers for each
|
|
38135
|
+
* of them whether it can answer at all. A provider with nothing to offer on a
|
|
38136
|
+
* camera returns `[]` — it is not that camera's business. The five availability
|
|
38137
|
+
* states are `ClipSourceAvailability`'s verbatim: they mean exactly the same
|
|
38138
|
+
* things about a coverage index as about a clip catalog, and `sleeping` in
|
|
38139
|
+
* particular is what stops a battery camera being woken to paint a bar.
|
|
38140
|
+
*/
|
|
38141
|
+
var RecordingSourceSchema = object({
|
|
38142
|
+
/** The source id. {@link RECORDING_SOURCE_CAMSTACK} for ours (RESERVED), a
|
|
38143
|
+
* vendor namespace (`native:reolink:onboard`, …) for a camera's own store. */
|
|
38144
|
+
source: string(),
|
|
38145
|
+
/** Operator-facing name of the source ("CamStack recordings", "SD card"). */
|
|
38146
|
+
label: string(),
|
|
38147
|
+
/**
|
|
38148
|
+
* The addon that SERVES this row, and the value a later call passes as
|
|
38149
|
+
* `provider`.
|
|
38150
|
+
*
|
|
38151
|
+
* Optional for version skew only. The collection dispatcher stamps it from
|
|
38152
|
+
* the registry, so a row that travelled through the fan-out carries the
|
|
38153
|
+
* authoritative id whatever the provider filled in (D557 §4).
|
|
38154
|
+
*/
|
|
38155
|
+
addonId: string().optional(),
|
|
38156
|
+
availability: RecordingSourceAvailabilitySchema
|
|
38157
|
+
});
|
|
38158
|
+
/**
|
|
38159
|
+
* What a surface may DRAW for this (camera, source) — D612's rule applied to a
|
|
38160
|
+
* timeline: **the source declares what it can do, and the surface draws what
|
|
38161
|
+
* was declared. It never assumes, and never offers a gesture it will then
|
|
38162
|
+
* refuse.** D612 exists because `8` and `16` were offered as clip rates, the
|
|
38163
|
+
* broker clamped them to `4`, and no line anywhere said so.
|
|
38164
|
+
*
|
|
38165
|
+
* Asked once per (camera, source) before anything is drawn — never replaced by
|
|
38166
|
+
* a constant the surface keeps, which is the second authority D612 ends.
|
|
38167
|
+
*/
|
|
38168
|
+
var RecordingSourceOptionsSchema = object({
|
|
38169
|
+
/** How this source's media reaches the player.
|
|
38170
|
+
* `archive` = our own indexed segment tree; `stream` = the provider's
|
|
38171
|
+
* forward-only fMP4 (D597); `realtime` = a replay bound to wall clock. */
|
|
38172
|
+
transport: _enum([
|
|
38173
|
+
"archive",
|
|
38174
|
+
"stream",
|
|
38175
|
+
"realtime"
|
|
38176
|
+
]),
|
|
38177
|
+
/** What the BAR means. `continuous` = gaps are holes in a recording;
|
|
38178
|
+
* `sparse` = gaps are the absence of one, and must be drawn as such.
|
|
38179
|
+
*
|
|
38180
|
+
* Not an onboard-only concession: measured 2026-09-24, OUR bar covers 98.8 %
|
|
38181
|
+
* of 592's day and 1.2 % of 1436's. It is a fact about a (source, camera)
|
|
38182
|
+
* pair, and ours answers it per camera from `deriveRecordingMode`. */
|
|
38183
|
+
coverage: _enum(["continuous", "sparse"]),
|
|
38184
|
+
/** Where the playhead may be put.
|
|
38185
|
+
* `free` — anywhere, to the frame.
|
|
38186
|
+
* `forward` — only ahead of the current position.
|
|
38187
|
+
* `segment` — a position SNAPS to the head of the covering segment; a finer
|
|
38188
|
+
* ask is accepted by the camera and SILENTLY IGNORED. Measured
|
|
38189
|
+
* on 1436 (Hikvision V5.7.1, 2026-09-23): a window-narrowed
|
|
38190
|
+
* `ContentMgmt/search` returns a row and a `playbackURI`, the
|
|
38191
|
+
* replay opens 200 and delivers media — and the burned-in OSD of
|
|
38192
|
+
* the first frame reads the SEGMENT HEAD every time. Calling
|
|
38193
|
+
* that `forward` would tell the surface it may move the playhead
|
|
38194
|
+
* ahead within a loaded segment, which it may not. */
|
|
38195
|
+
seek: _enum([
|
|
38196
|
+
"free",
|
|
38197
|
+
"forward",
|
|
38198
|
+
"segment"
|
|
38199
|
+
]),
|
|
38200
|
+
/** Frame-step BACKWARD is meaningful. */
|
|
38201
|
+
stepBack: boolean(),
|
|
38202
|
+
/** Whether the drag-scrub gesture is served, as opposed to refused by name. */
|
|
38203
|
+
scrub: boolean(),
|
|
38204
|
+
/** Deliverable rates, ascending, always containing `1`. The surface draws its
|
|
38205
|
+
* picker from this and from NOTHING else (D612, D620, D621). `0` is not a
|
|
38206
|
+
* member: pause is the absence of a rate. */
|
|
38207
|
+
rates: array(number().positive()).min(1).readonly(),
|
|
38208
|
+
/** TRUE when a read of this source HOLDS the camera's only playback session.
|
|
38209
|
+
* A surface with this set makes at most ONE read at a time and draws no
|
|
38210
|
+
* scrub-thumbnail strip, no hover preview, no prefetch and no background
|
|
38211
|
+
* refresh. The precedent is exact and expensive: filling one screen of
|
|
38212
|
+
* Hikvision thumbnails at 1.01× realtime consumed fifteen minutes of that
|
|
38213
|
+
* camera's only playback session (1.2.126, reported within minutes), and a
|
|
38214
|
+
* timeline is a screenful of reads by construction. */
|
|
38215
|
+
exclusive: boolean()
|
|
38216
|
+
});
|
|
38217
|
+
/**
|
|
38218
|
+
* How to PLAY the instant that was asked for, from the chosen source.
|
|
38219
|
+
*
|
|
38220
|
+
* No new media transport is built for onboard sources: the `clip` arm is a
|
|
38221
|
+
* DELEGATION to the `videoclips` transport that vendor already has (D597 /
|
|
38222
|
+
* D616 / D617). The onboard half of this collection is a PROJECTION of
|
|
38223
|
+
* `videoclips` for coverage and a delegation to it for bytes.
|
|
38224
|
+
*/
|
|
38225
|
+
var RecordingPlaybackSchema = discriminatedUnion("kind", [
|
|
38226
|
+
object({
|
|
38227
|
+
kind: literal("hls"),
|
|
38228
|
+
manifest: RecordingManifestSchema
|
|
38229
|
+
}),
|
|
38230
|
+
object({
|
|
38231
|
+
kind: literal("clip"),
|
|
38232
|
+
/** The `videoclips` source namespace this clip id belongs to. */
|
|
38233
|
+
source: string(),
|
|
38234
|
+
clipId: string(),
|
|
38235
|
+
/** Where this clip actually STARTS. On a `seek: 'segment'` source the
|
|
38236
|
+
* playhead lands here, not at the requested instant — the surface must be
|
|
38237
|
+
* TOLD, not left to discover it from a burned-in OSD. */
|
|
38238
|
+
startsAtMs: number()
|
|
38239
|
+
}),
|
|
38240
|
+
object({
|
|
38241
|
+
kind: literal("none"),
|
|
38242
|
+
reason: string()
|
|
38243
|
+
})
|
|
38244
|
+
]);
|
|
38245
|
+
var recordingCapability = {
|
|
38246
|
+
name: "recording",
|
|
38247
|
+
scope: "device",
|
|
38248
|
+
/** Several sources per camera, listed beside each other. The mount stays
|
|
38249
|
+
* `device-scoped` — see `resolveCapMount`'s ordering and D554: per-device
|
|
38250
|
+
* wins over the global collection fan-out. */
|
|
38251
|
+
mode: "collection",
|
|
38252
|
+
kind: "wrapper",
|
|
38253
|
+
defaultActive: true,
|
|
38254
|
+
/** Recorded coverage is a property of a camera — the cap is meaningless on a
|
|
38255
|
+
* sensor, a button or an event emitter, and the `defaultActive` auto-bind
|
|
38256
|
+
* reads this to decide which devices it may claim. */
|
|
38257
|
+
deviceTypes: [DeviceType.Camera],
|
|
38258
|
+
methods: {
|
|
38259
|
+
/**
|
|
38260
|
+
* The sources this camera has, WITH the reason any of them cannot answer.
|
|
38261
|
+
*
|
|
38262
|
+
* Asked separately from `getAvailability` because an empty bar is
|
|
38263
|
+
* ambiguous and this is the only place the ambiguity is resolved: every
|
|
38264
|
+
* bound provider contributes its own rows, and a provider that could not be
|
|
38265
|
+
* reached at all still produces one row saying so. A surface that draws "no
|
|
38266
|
+
* recordings" without reading this is drawing a guess.
|
|
38267
|
+
*
|
|
38268
|
+
* The ONLY method here without a `provider` — it is the call that tells the
|
|
38269
|
+
* caller what to put there.
|
|
38270
|
+
*/
|
|
38271
|
+
listSources: method(object({ deviceId: number() }), array(RecordingSourceSchema).readonly(), {
|
|
38272
|
+
kind: "query",
|
|
38273
|
+
auth: "protected"
|
|
38274
|
+
}),
|
|
38275
|
+
/**
|
|
38276
|
+
* Recorded coverage of `[fromMs, toMs)` at ONE source — the timeline bar.
|
|
38277
|
+
*
|
|
38278
|
+
* `protected`, not `admin`: a per-camera read is exactly what a camera
|
|
38279
|
+
* viewer is FOR, and the device-scoped mount routes through
|
|
38280
|
+
* `getProviderForDevice`, so a camera outside the caller's scope is refused
|
|
38281
|
+
* before a provider is reached.
|
|
38282
|
+
*/
|
|
38283
|
+
getAvailability: method(object({
|
|
38284
|
+
deviceId: number(),
|
|
38285
|
+
/**
|
|
38286
|
+
* WHICH provider to ask — the `addonId` a {@link RecordingSourceSchema}
|
|
38287
|
+
* row carries, never a source id and never a list. **REQUIRED**, in the
|
|
38288
|
+
* schema, where the generated types make it unomittable rather than
|
|
38289
|
+
* merely discouraged (D554 amended).
|
|
38290
|
+
*
|
|
38291
|
+
* It was learned the expensive way on `videoclips.listClips`: measured
|
|
38292
|
+
* on the live hub 2026-09-20, device 592 bound to `recorder` AND
|
|
38293
|
+
* `provider-reolink`, a bare call with `limit: 3` answered SIX rows,
|
|
38294
|
+
* three from each source, merged — `device-collection-dispatch.ts`
|
|
38295
|
+
* leaves an unpinned fan-out un-narrowed, so absence buys the union the
|
|
38296
|
+
* method exists not to be. An un-narrowed `getAvailability` would do
|
|
38297
|
+
* that to a TIMELINE: our ranges and the card's clips unioned into one
|
|
38298
|
+
* bar, which is "two sources are never drawn together" broken in the
|
|
38299
|
+
* one place it matters most.
|
|
38300
|
+
*
|
|
38301
|
+
* A provider the device is not bound to is refused BY NAME (D552's
|
|
38302
|
+
* `rejectUnresolvedAddonPin`), never answered by another one.
|
|
38303
|
+
*/
|
|
38304
|
+
provider: string().min(1),
|
|
38305
|
+
fromMs: number(),
|
|
38306
|
+
toMs: number(),
|
|
38307
|
+
/**
|
|
38308
|
+
* Answer for THIS profile instead of the source's preferred one (D433).
|
|
38309
|
+
* Absent keeps the timeline's behaviour — one bar, one profile, one set
|
|
38310
|
+
* of reads. `profilesWithFootage` on the answer says what may be asked
|
|
38311
|
+
* for.
|
|
38312
|
+
*/
|
|
38313
|
+
profile: string().optional()
|
|
38314
|
+
}), RecordingAvailabilitySchema, {
|
|
38315
|
+
kind: "query",
|
|
38316
|
+
auth: "protected"
|
|
38317
|
+
}),
|
|
38318
|
+
/** Which calendar days in [fromMs,toMs) this source has ≥1 recording in,
|
|
38319
|
+
* bucketed by the client's local day (`tzOffsetMinutes` = minutes to add
|
|
38320
|
+
* to UTC). Drives the theater date-picker's day dots. `provider` is
|
|
38321
|
+
* REQUIRED for the reason `getAvailability` states. */
|
|
38322
|
+
getDaysWithRecordings: method(object({
|
|
38323
|
+
deviceId: number(),
|
|
38324
|
+
provider: string().min(1),
|
|
38325
|
+
fromMs: number(),
|
|
38326
|
+
toMs: number(),
|
|
38327
|
+
tzOffsetMinutes: number()
|
|
38328
|
+
}), RecordingDaysSchema, {
|
|
38329
|
+
kind: "query",
|
|
38330
|
+
auth: "protected"
|
|
38331
|
+
}),
|
|
38332
|
+
/**
|
|
38333
|
+
* How to PLAY `[fromMs, toMs)` at this source.
|
|
38334
|
+
*
|
|
38335
|
+
* It was `getPlaybackManifest`, and the rename is not cosmetic: a
|
|
38336
|
+
* "manifest" is an HLS master playlist, which is a property of OUR recorder
|
|
38337
|
+
* and of nothing else. Keeping the name would make every onboard
|
|
38338
|
+
* implementation a lie in its signature. The old shape survives verbatim
|
|
38339
|
+
* inside the union's `hls` arm, so the recorder's implementation is
|
|
38340
|
+
* unchanged behind it.
|
|
38341
|
+
*/
|
|
38342
|
+
getPlayback: method(object({
|
|
38343
|
+
deviceId: number(),
|
|
38344
|
+
provider: string().min(1),
|
|
38345
|
+
fromMs: number(),
|
|
38346
|
+
toMs: number(),
|
|
38347
|
+
profile: CamProfileSchema.optional()
|
|
38348
|
+
}), RecordingPlaybackSchema, {
|
|
38349
|
+
kind: "query",
|
|
38350
|
+
auth: "protected"
|
|
38351
|
+
}),
|
|
38352
|
+
/**
|
|
38353
|
+
* What this (camera, source) can actually DO — asked before anything is
|
|
38354
|
+
* drawn. See {@link RecordingSourceOptionsSchema}; a constant the surface
|
|
38355
|
+
* keeps instead is the second authority D612 exists to end.
|
|
38356
|
+
*/
|
|
38357
|
+
getPlaybackOptions: method(object({
|
|
38358
|
+
deviceId: number(),
|
|
38359
|
+
provider: string().min(1)
|
|
38360
|
+
}), RecordingSourceOptionsSchema, {
|
|
38361
|
+
kind: "query",
|
|
38362
|
+
auth: "protected"
|
|
38363
|
+
})
|
|
38364
|
+
}
|
|
38365
|
+
};
|
|
38366
|
+
/**
|
|
38367
|
+
* `recording-archive` — OUR archive, and the intent that fills it.
|
|
38368
|
+
*
|
|
38369
|
+
* The system-singleton half of the 2026-09-24 cut (D625). `recording` used to
|
|
38370
|
+
* be one 33-method system singleton holding two unrelated subjects: three
|
|
38371
|
+
* per-camera READS about coverage and playback, and everything else — storage
|
|
38372
|
+
* locations, retention, relocation, rebalance, the ops log, the placement
|
|
38373
|
+
* table and the byte-plane primitives our scrub and export are built on.
|
|
38374
|
+
*
|
|
38375
|
+
* The reads became a device-scoped COLLECTION, so a camera's own card can be a
|
|
38376
|
+
* source beside ours (`recording.cap.ts`). Everything that is about OUR store,
|
|
38377
|
+
* or unimplementable by a camera, stayed here.
|
|
38378
|
+
*
|
|
38379
|
+
* ## On the name
|
|
38380
|
+
*
|
|
38381
|
+
* `recording-storage` was the obvious choice and is wrong: this cap also holds
|
|
38382
|
+
* `getDeviceConfig`/`setDeviceConfig`, which are recording INTENT — bands,
|
|
38383
|
+
* retention, the D62 switch authority — and a name that says "storage" invites
|
|
38384
|
+
* the next reader to move them out again. An archive is a thing we keep, and
|
|
38385
|
+
* what we keep it under is a policy; the name covers both halves honestly and
|
|
38386
|
+
* sits in the existing family (`recording-onboard`, `recording-export`,
|
|
38387
|
+
* `recording-signal`).
|
|
38388
|
+
*
|
|
38389
|
+
* ## What must NOT happen to it
|
|
38390
|
+
*
|
|
38391
|
+
* It stays a SINGLETON. It is registered by `recorder`, which is
|
|
38392
|
+
* `placement: 'any-node'` and runs on every recording node; the hub dispatches
|
|
38393
|
+
* to one of them. Putting the ledger, the placement table or the relocation
|
|
38394
|
+
* jobs behind a fan-out is the one genuinely dangerous move in this cut.
|
|
38395
|
+
*
|
|
38396
|
+
* `getDeviceConfig` / `setDeviceConfig` in particular are the D62 recording
|
|
38397
|
+
* authority (`CameraSwitch.authority`). If a write reached a different provider
|
|
38398
|
+
* than the read — which a collection fan-out permits — two authorities would
|
|
38399
|
+
* decide when one camera records, and the symptom (recording silently off, or
|
|
38400
|
+
* a `bands` array clobbered by a partial write) is durable and silent. Keeping
|
|
38401
|
+
* them here means the worst case during a rollout is a 412: the switch refuses
|
|
38402
|
+
* to flip and SAYS so. **Do not move them into the collection, at any point,
|
|
38403
|
+
* for any reason.**
|
|
38404
|
+
*
|
|
38405
|
+
* ## The two batch reads
|
|
38406
|
+
*
|
|
38407
|
+
* `getAvailabilityBatch` / `getDaysWithRecordingsBatch` take `deviceIds:
|
|
38408
|
+
* number[]` with no single `deviceId`, and a device-scoped mount routes
|
|
38409
|
+
* through `getProviderForDevice(deviceId)` — there is nothing for it to route
|
|
38410
|
+
* on. They stay here, and on this cap the batch is explicitly OURS: a grid has
|
|
38411
|
+
* no per-camera picker, and a caller that wants another source's coverage asks
|
|
38412
|
+
* `recording.getAvailability` per device with that source's `provider`.
|
|
38413
|
+
*/
|
|
38414
|
+
var RecordingStatusSchema = object({
|
|
38415
|
+
deviceId: number(),
|
|
38416
|
+
enabled: boolean(),
|
|
38417
|
+
/** THE derived storage mode, from the one definition
|
|
38418
|
+
* (`deriveRecordingMode`) — never a second enum. A duplicated list is how
|
|
38419
|
+
* `on-device-decision` could have reached the recorder and not the status. */
|
|
38420
|
+
activeMode: RecordingStorageModeSchema,
|
|
38421
|
+
nodeId: string(),
|
|
38422
|
+
storageBytes: number()
|
|
38423
|
+
});
|
|
38293
38424
|
/**
|
|
38294
38425
|
* One camera's row in a `getAvailabilityBatch` answer.
|
|
38295
38426
|
*
|
|
38296
|
-
* `ranges` is EXACTLY what `getAvailability` returns for that camera
|
|
38297
|
-
* batch collapses the transport, not the work — plus the
|
|
38298
|
-
*
|
|
38427
|
+
* `ranges` is EXACTLY what `recording.getAvailability` returns for that camera
|
|
38428
|
+
* at OUR source — the batch collapses the transport, not the work — plus the
|
|
38429
|
+
* `read` mark the singular answer now carries too (D625):
|
|
38299
38430
|
*
|
|
38300
38431
|
* - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
|
|
38301
38432
|
* no footage in the window", which is a real claim.
|
|
@@ -38327,22 +38458,6 @@ var RecordingDaysForDeviceSchema = object({
|
|
|
38327
38458
|
/** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
|
|
38328
38459
|
days: array(number()).readonly()
|
|
38329
38460
|
});
|
|
38330
|
-
var RecordingManifestSchema = object({
|
|
38331
|
-
deviceId: number(),
|
|
38332
|
-
/** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
|
|
38333
|
-
localMasterPath: string().nullable(),
|
|
38334
|
-
/** HTTP(S) URL to the master playlist on the recording node's playback server
|
|
38335
|
-
* (the PRIMARY candidate); null when no recording / server. Carries the
|
|
38336
|
-
* scoped playback token in its path. */
|
|
38337
|
-
playbackUrl: string().nullable(),
|
|
38338
|
-
/**
|
|
38339
|
-
* Candidate master-playlist URLs the client tries in order (LAN first, then
|
|
38340
|
-
* remote — Tailscale/Cloudflare if the operator configured extra hosts), each
|
|
38341
|
-
* carrying the same scoped token. `playbackUrl` is the first entry. Empty when
|
|
38342
|
-
* there is no recording / server.
|
|
38343
|
-
*/
|
|
38344
|
-
playbackEndpoints: array(string())
|
|
38345
|
-
});
|
|
38346
38461
|
/**
|
|
38347
38462
|
* Recording storage usage for one camera — what the ARCHIVE holds for it,
|
|
38348
38463
|
* across every profile and every resolvable location on this node.
|
|
@@ -38600,33 +38715,22 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
|
|
|
38600
38715
|
* not a retry hint (retrying the same window would refuse again). */
|
|
38601
38716
|
segmentEndMs: number()
|
|
38602
38717
|
})]);
|
|
38603
|
-
var
|
|
38604
|
-
name: "recording",
|
|
38718
|
+
var recordingArchiveCapability = {
|
|
38719
|
+
name: "recording-archive",
|
|
38605
38720
|
scope: "system",
|
|
38606
38721
|
mode: "singleton",
|
|
38722
|
+
/** Moves here with the config pair — the derived Recording settings
|
|
38723
|
+
* section is a view over `getDeviceConfig`/`setDeviceConfig` (D14), and
|
|
38724
|
+
* those did not move (D625). */
|
|
38607
38725
|
exposesDeviceSettings: true,
|
|
38608
38726
|
status: {
|
|
38609
38727
|
schema: RecordingStatusSchema,
|
|
38610
38728
|
kind: "command-driven"
|
|
38611
38729
|
},
|
|
38612
38730
|
methods: {
|
|
38613
|
-
getAvailability: method(object({
|
|
38614
|
-
deviceId: number(),
|
|
38615
|
-
fromMs: number(),
|
|
38616
|
-
toMs: number(),
|
|
38617
|
-
/**
|
|
38618
|
-
* Answer for THIS profile instead of the preferred one (D433). Absent
|
|
38619
|
-
* keeps the timeline's behaviour — one bar, one profile, one set of
|
|
38620
|
-
* reads. `profilesWithFootage` on the answer says what may be asked
|
|
38621
|
-
* for.
|
|
38622
|
-
*/
|
|
38623
|
-
profile: string().optional()
|
|
38624
|
-
}), RecordingAvailabilitySchema, {
|
|
38625
|
-
kind: "query",
|
|
38626
|
-
auth: "protected"
|
|
38627
|
-
}),
|
|
38628
38731
|
/**
|
|
38629
|
-
* `getAvailability` for a SET of cameras, in one round trip
|
|
38732
|
+
* `recording.getAvailability` for a SET of cameras, in one round trip, at
|
|
38733
|
+
* OUR source.
|
|
38630
38734
|
*
|
|
38631
38735
|
* A multi-camera timeline re-asks availability for every camera in the grid
|
|
38632
38736
|
* on every day change; fanned out that is one request per camera for N
|
|
@@ -38634,6 +38738,13 @@ var recordingCapability = {
|
|
|
38634
38738
|
* `availabilityProfileFor` + `rangesIn`, run concurrently inside the
|
|
38635
38739
|
* recorder) — only the transport collapses.
|
|
38636
38740
|
*
|
|
38741
|
+
* It lives on the ARCHIVE, not on the `recording` collection, because it
|
|
38742
|
+
* takes `deviceIds` with no single `deviceId` and a device-scoped mount has
|
|
38743
|
+
* nothing to route on (D625 §10.2). The consequence is stated rather than
|
|
38744
|
+
* hidden: the batch answers for OURS. A caller that needs another source's
|
|
38745
|
+
* coverage asks `recording.getAvailability` per device, naming that
|
|
38746
|
+
* source's provider.
|
|
38747
|
+
*
|
|
38637
38748
|
* `protected` for the same reason the singular method is: every id in
|
|
38638
38749
|
* `deviceIds` is a device reference, so the F1 #3 gate refuses any camera
|
|
38639
38750
|
* outside the caller's scope — one id out of scope refuses the CALL, it
|
|
@@ -38651,20 +38762,10 @@ var recordingCapability = {
|
|
|
38651
38762
|
kind: "query",
|
|
38652
38763
|
auth: "protected"
|
|
38653
38764
|
}),
|
|
38654
|
-
/** Which calendar days in [fromMs,toMs) have ≥1 recorded segment, bucketed by
|
|
38655
|
-
* the client's local day (`tzOffsetMinutes` = minutes to add to UTC). Drives
|
|
38656
|
-
* the theater date-picker's day dots. */
|
|
38657
|
-
getDaysWithRecordings: method(object({
|
|
38658
|
-
deviceId: number(),
|
|
38659
|
-
fromMs: number(),
|
|
38660
|
-
toMs: number(),
|
|
38661
|
-
tzOffsetMinutes: number()
|
|
38662
|
-
}), RecordingDaysSchema, {
|
|
38663
|
-
kind: "query",
|
|
38664
|
-
auth: "protected"
|
|
38665
|
-
}),
|
|
38666
38765
|
/**
|
|
38667
|
-
* `getDaysWithRecordings` for a SET of cameras, in one round
|
|
38766
|
+
* `recording.getDaysWithRecordings` for a SET of cameras, in one round
|
|
38767
|
+
* trip, at OUR source. Same placement argument as
|
|
38768
|
+
* {@link getAvailabilityBatch}.
|
|
38668
38769
|
*
|
|
38669
38770
|
* The cheapest question in the product, asked once per camera per month
|
|
38670
38771
|
* change. One directory read per day per camera at the owner, unchanged;
|
|
@@ -38683,14 +38784,6 @@ var recordingCapability = {
|
|
|
38683
38784
|
kind: "query",
|
|
38684
38785
|
auth: "protected"
|
|
38685
38786
|
}),
|
|
38686
|
-
getPlaybackManifest: method(object({
|
|
38687
|
-
deviceId: number(),
|
|
38688
|
-
fromMs: number(),
|
|
38689
|
-
toMs: number()
|
|
38690
|
-
}), RecordingManifestSchema, {
|
|
38691
|
-
kind: "query",
|
|
38692
|
-
auth: "protected"
|
|
38693
|
-
}),
|
|
38694
38787
|
getStorageUsage: method(object({}), RecordingStorageUsageSchema, {
|
|
38695
38788
|
kind: "query",
|
|
38696
38789
|
auth: "admin"
|
|
@@ -38706,6 +38799,10 @@ var recordingCapability = {
|
|
|
38706
38799
|
* value (D315, D393, D590). It carries schedules and retention, no secret,
|
|
38707
38800
|
* and the per-device gate in `scope-access.ts` still applies; `setDeviceConfig`
|
|
38708
38801
|
* stays `admin`.
|
|
38802
|
+
*
|
|
38803
|
+
* It is a SINGLETON method and stays one (D625 §16.2): it is the D62
|
|
38804
|
+
* recording authority, and an authority that several providers could answer
|
|
38805
|
+
* is the "two knobs over one decision" D62 forbids.
|
|
38709
38806
|
*/
|
|
38710
38807
|
getDeviceConfig: method(object({ deviceId: number() }), RecordingConfigSchema, {
|
|
38711
38808
|
kind: "query",
|
|
@@ -38713,7 +38810,13 @@ var recordingCapability = {
|
|
|
38713
38810
|
}),
|
|
38714
38811
|
/** Locate footage at a wall-clock instant: the covering segment's window,
|
|
38715
38812
|
* or a gap with the forward nearest covered edge. Used by a feeder running
|
|
38716
|
-
* in another addon process to seek recorded footage over tRPC.
|
|
38813
|
+
* in another addon process to seek recorded footage over tRPC.
|
|
38814
|
+
*
|
|
38815
|
+
* BYTE PLANE: defined by `mfra` byte ranges over OUR own MP4 segment tree.
|
|
38816
|
+
* There is no vendor-neutral statement of it, its only callers are feeders
|
|
38817
|
+
* in other addon processes (the stream broker, the replay-clip source),
|
|
38818
|
+
* and an onboard source that ever needs bytes delegates to the
|
|
38819
|
+
* `videoclips` transport its vendor already has (D625 §9.3, §10.5). */
|
|
38717
38820
|
locateSegment: method(object({
|
|
38718
38821
|
deviceId: number(),
|
|
38719
38822
|
profile: string(),
|
|
@@ -39328,6 +39431,346 @@ var recordingExportCapability = {
|
|
|
39328
39431
|
}
|
|
39329
39432
|
};
|
|
39330
39433
|
/**
|
|
39434
|
+
* Vendor-neutral **onboard** recording + storage cap — what the CAMERA
|
|
39435
|
+
* writes to the CAMERA's own card, on the camera's own schedule.
|
|
39436
|
+
*
|
|
39437
|
+
* This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
|
|
39438
|
+
* footage ledger, our storage locations, our retention. This one has a
|
|
39439
|
+
* different authority — the camera's firmware — and per D62 it stores
|
|
39440
|
+
* nothing of its own. Every value here is read from the camera and every
|
|
39441
|
+
* write goes back to the camera; there is no CamStack-side mirror that
|
|
39442
|
+
* could disagree with the device.
|
|
39443
|
+
*
|
|
39444
|
+
* ## One shape, two firmwares
|
|
39445
|
+
*
|
|
39446
|
+
* Measured 2026-09-22 against the live fleet:
|
|
39447
|
+
*
|
|
39448
|
+
* | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
|
|
39449
|
+
* | --- | --- | --- |
|
|
39450
|
+
* | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
|
|
39451
|
+
* | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
|
|
39452
|
+
* | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
|
|
39453
|
+
* | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
|
|
39454
|
+
* | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
|
|
39455
|
+
* | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
|
|
39456
|
+
* | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
|
|
39457
|
+
* | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
|
|
39458
|
+
*
|
|
39459
|
+
* The two schedule models look different and are the same thing in
|
|
39460
|
+
* different coordinates: both answer "for this trigger, during which
|
|
39461
|
+
* weekly windows does the camera record". {@link RecordWindow} is that
|
|
39462
|
+
* question in one shape — Hikvision's ranges map straight onto it,
|
|
39463
|
+
* Reolink's mask expands into hour-aligned windows.
|
|
39464
|
+
*
|
|
39465
|
+
* ## Union, not intersection
|
|
39466
|
+
*
|
|
39467
|
+
* **The same fields exist on every camera.** What differs per device is
|
|
39468
|
+
* which VALUES that device accepts, and that is what {@link
|
|
39469
|
+
* RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
|
|
39470
|
+
* per field plus the schedule's own limits. A control a camera cannot
|
|
39471
|
+
* honour is rendered DISABLED WITH ITS REASON, never missing and never
|
|
39472
|
+
* dead: disabled must not look like broken.
|
|
39473
|
+
*
|
|
39474
|
+
* ## Refusal by name
|
|
39475
|
+
*
|
|
39476
|
+
* A write a camera cannot honour is refused with a sentence the operator
|
|
39477
|
+
* can read — never accepted and dropped. Both providers refuse through
|
|
39478
|
+
* {@link describeOnboardRefusal}, so the vocabulary is one function and
|
|
39479
|
+
* one test, not two hand-written vendor opinions.
|
|
39480
|
+
*
|
|
39481
|
+
* Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
|
|
39482
|
+
* `getOptions` advertises per-camera availability, `getStatus` (auto-
|
|
39483
|
+
* injected from `status`) reports the live values, and a single
|
|
39484
|
+
* `setSettings` mutation applies a partial change. No hand-written
|
|
39485
|
+
* settings-contribution methods.
|
|
39486
|
+
*/
|
|
39487
|
+
/**
|
|
39488
|
+
* What makes the camera start recording during a window.
|
|
39489
|
+
*
|
|
39490
|
+
* The union of both vendors' vocabularies. `continuous` is Hikvision's
|
|
39491
|
+
* `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
|
|
39492
|
+
* object-class triggers are Reolink-only today and the smart-event ones
|
|
39493
|
+
* (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
|
|
39494
|
+
* firmwares measured — a camera that cannot record on a trigger simply
|
|
39495
|
+
* does not list it in `options.schedule.triggers`, and a window naming
|
|
39496
|
+
* it is REFUSED, not dropped.
|
|
39497
|
+
*/
|
|
39498
|
+
var RecordTriggerSchema = _enum([
|
|
39499
|
+
"continuous",
|
|
39500
|
+
"motion",
|
|
39501
|
+
"person",
|
|
39502
|
+
"vehicle",
|
|
39503
|
+
"animal",
|
|
39504
|
+
"lineCrossing",
|
|
39505
|
+
"intrusion",
|
|
39506
|
+
"loitering",
|
|
39507
|
+
"alarmInput"
|
|
39508
|
+
]);
|
|
39509
|
+
/**
|
|
39510
|
+
* One weekly recording window: "on `day`, from `startMinute` to
|
|
39511
|
+
* `endMinute`, record on `trigger`".
|
|
39512
|
+
*
|
|
39513
|
+
* `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
|
|
39514
|
+
* both firmwares enumerate). Minutes are local camera time since
|
|
39515
|
+
* midnight; `endMinute` may be 1440, meaning end of day — that is
|
|
39516
|
+
* Hikvision's literal `24:00` and Reolink's 24th mask slot, and
|
|
39517
|
+
* collapsing it to 0 would turn a whole-day window into an empty one.
|
|
39518
|
+
*/
|
|
39519
|
+
var RecordWindowSchema = object({
|
|
39520
|
+
trigger: RecordTriggerSchema,
|
|
39521
|
+
day: number().int().min(0).max(6),
|
|
39522
|
+
startMinute: number().int().min(0).max(1439),
|
|
39523
|
+
endMinute: number().int().min(1).max(1440)
|
|
39524
|
+
});
|
|
39525
|
+
/** Status of one physical volume, as the camera itself describes it. */
|
|
39526
|
+
var OnboardStorageVolumeSchema = object({
|
|
39527
|
+
/** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
|
|
39528
|
+
id: string(),
|
|
39529
|
+
/** The camera's own name for it, when it gives one (`hddName`). */
|
|
39530
|
+
label: string().optional(),
|
|
39531
|
+
status: _enum([
|
|
39532
|
+
"ok",
|
|
39533
|
+
"unformatted",
|
|
39534
|
+
"error",
|
|
39535
|
+
"offline",
|
|
39536
|
+
"unknown"
|
|
39537
|
+
]),
|
|
39538
|
+
/**
|
|
39539
|
+
* Total size in MB, or **null when the camera did not say**.
|
|
39540
|
+
*
|
|
39541
|
+
* Never 0 for an unreadable value: a measurement that failed is not a
|
|
39542
|
+
* measurement (D393), and a card whose size is unknown must not be
|
|
39543
|
+
* rendered as a card of size zero.
|
|
39544
|
+
*/
|
|
39545
|
+
capacityMb: number().nullable(),
|
|
39546
|
+
/**
|
|
39547
|
+
* Free space in MB, or null when unknown.
|
|
39548
|
+
*
|
|
39549
|
+
* **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
|
|
39550
|
+
* 1439 both report exactly 11776 MB free — the fixed reserve a looping
|
|
39551
|
+
* card converges on once it has wrapped. At loop steady state the
|
|
39552
|
+
* number is identical whether the camera recorded yesterday or stopped
|
|
39553
|
+
* a month ago.
|
|
39554
|
+
*/
|
|
39555
|
+
freeMb: number().nullable(),
|
|
39556
|
+
/** True when the camera reports the volume writable (`property` RW). */
|
|
39557
|
+
writable: boolean().optional()
|
|
39558
|
+
});
|
|
39559
|
+
/**
|
|
39560
|
+
* What the camera is doing with its own storage, right now.
|
|
39561
|
+
*
|
|
39562
|
+
* Every scalar is nullable and **null means the camera did not answer**,
|
|
39563
|
+
* never a default. A form that seeds `0` from an unanswered read invites
|
|
39564
|
+
* the operator to save that 0 back onto the camera.
|
|
39565
|
+
*/
|
|
39566
|
+
var RecordingOnboardStatusSchema = object({
|
|
39567
|
+
storage: discriminatedUnion("kind", [
|
|
39568
|
+
object({
|
|
39569
|
+
kind: literal("present"),
|
|
39570
|
+
volumes: array(OnboardStorageVolumeSchema)
|
|
39571
|
+
}),
|
|
39572
|
+
object({
|
|
39573
|
+
kind: literal("absent"),
|
|
39574
|
+
reason: string()
|
|
39575
|
+
}),
|
|
39576
|
+
object({
|
|
39577
|
+
kind: literal("unknown"),
|
|
39578
|
+
reason: string()
|
|
39579
|
+
})
|
|
39580
|
+
]),
|
|
39581
|
+
tracks: array(object({
|
|
39582
|
+
id: string(),
|
|
39583
|
+
enabled: boolean(),
|
|
39584
|
+
isVideo: boolean(),
|
|
39585
|
+
/** From the camera's own track description. Null when it does not say. */
|
|
39586
|
+
codec: string().nullable(),
|
|
39587
|
+
resolution: string().nullable(),
|
|
39588
|
+
/** Per-track overwrite flag, where the firmware keeps it per track. */
|
|
39589
|
+
overwriteWhenFull: boolean().nullable()
|
|
39590
|
+
})),
|
|
39591
|
+
/**
|
|
39592
|
+
* The track the write path targets — the enabled VIDEO one. Null when
|
|
39593
|
+
* no track could be identified, which is itself a refusal reason.
|
|
39594
|
+
*/
|
|
39595
|
+
primaryTrackId: string().nullable(),
|
|
39596
|
+
/** Master "record to the card at all" switch. */
|
|
39597
|
+
enabled: boolean().nullable(),
|
|
39598
|
+
overwriteWhenFull: boolean().nullable(),
|
|
39599
|
+
preRecordSec: number().nullable(),
|
|
39600
|
+
postRecordSec: number().nullable(),
|
|
39601
|
+
/** Length of one recorded file, in minutes. */
|
|
39602
|
+
segmentMinutes: number().nullable(),
|
|
39603
|
+
/** The primary track's weekly windows, flattened. */
|
|
39604
|
+
windows: array(RecordWindowSchema),
|
|
39605
|
+
/**
|
|
39606
|
+
* How many windows the camera described that CamStack could NOT read —
|
|
39607
|
+
* an unrecognised trigger, an unparseable clock, a weekday it does not
|
|
39608
|
+
* name.
|
|
39609
|
+
*
|
|
39610
|
+
* A dropped window is work the reader threw away, and a schedule that
|
|
39611
|
+
* silently shows fewer rows than the camera holds is how an operator
|
|
39612
|
+
* saves back a schedule shorter than the one they were looking at
|
|
39613
|
+
* (D391). Non-zero means the window list is INCOMPLETE and a write
|
|
39614
|
+
* that replaces it would delete what was not shown — which is why a
|
|
39615
|
+
* provider reporting a non-zero count also reports the schedule as not
|
|
39616
|
+
* writable.
|
|
39617
|
+
*/
|
|
39618
|
+
unreadableWindows: number(),
|
|
39619
|
+
/**
|
|
39620
|
+
* The camera is scheduled to record and has NO usable storage.
|
|
39621
|
+
*
|
|
39622
|
+
* A first-class fact because it is the fleet's most common silent
|
|
39623
|
+
* defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
|
|
39624
|
+
* to a card that is not there. Neither the schedule nor the storage
|
|
39625
|
+
* read says anything wrong on its own; only the pair does.
|
|
39626
|
+
*/
|
|
39627
|
+
recordingToNowhere: boolean(),
|
|
39628
|
+
lastFetchedAt: number()
|
|
39629
|
+
});
|
|
39630
|
+
/** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
|
|
39631
|
+
var RangeSchema = object({
|
|
39632
|
+
min: number(),
|
|
39633
|
+
max: number(),
|
|
39634
|
+
step: number()
|
|
39635
|
+
});
|
|
39636
|
+
/**
|
|
39637
|
+
* The values a camera actually takes for a numeric field, when they are a SET
|
|
39638
|
+
* rather than a range.
|
|
39639
|
+
*
|
|
39640
|
+
* `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
|
|
39641
|
+
* (I91DN) on 2026-09-22 by writing each value and reading it back:
|
|
39642
|
+
*
|
|
39643
|
+
* - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
|
|
39644
|
+
* camera's "no limit" — `-1` and `4294967295` both land on it);
|
|
39645
|
+
* - post-record: `5, 10, 30, 60, 120, 300, 600`.
|
|
39646
|
+
*
|
|
39647
|
+
* Neither is expressible as a step: the first has a sentinel two billion away
|
|
39648
|
+
* from its neighbours, the second doubles and then jumps. A range that tried
|
|
39649
|
+
* would forbid values the camera takes AND permit values it silently replaces
|
|
39650
|
+
* with 5 — wrong in both directions at once.
|
|
39651
|
+
*
|
|
39652
|
+
* `sentinel` names the member that is not a duration, so a surface can render
|
|
39653
|
+
* "no limit" instead of `2147483647` seconds.
|
|
39654
|
+
*/
|
|
39655
|
+
var AllowedValuesSchema = object({
|
|
39656
|
+
values: array(number()).min(1),
|
|
39657
|
+
sentinel: object({
|
|
39658
|
+
value: number(),
|
|
39659
|
+
meaning: _enum(["no-limit", "disabled"])
|
|
39660
|
+
}).optional()
|
|
39661
|
+
});
|
|
39662
|
+
/**
|
|
39663
|
+
* Per-field availability on ONE camera.
|
|
39664
|
+
*
|
|
39665
|
+
* The field exists on every camera — this says whether this one can be
|
|
39666
|
+
* read and whether it can be written, and `reason` says why not when
|
|
39667
|
+
* either is false. The UI renders the control DISABLED with the reason
|
|
39668
|
+
* rather than hiding it, so a limitation is legible instead of looking
|
|
39669
|
+
* like a missing feature.
|
|
39670
|
+
*/
|
|
39671
|
+
var OnboardFieldSupportSchema = object({
|
|
39672
|
+
readable: boolean(),
|
|
39673
|
+
writable: boolean(),
|
|
39674
|
+
/** Required whenever `readable` or `writable` is false. */
|
|
39675
|
+
reason: string().optional()
|
|
39676
|
+
});
|
|
39677
|
+
/** What this camera's schedule model can express. */
|
|
39678
|
+
var OnboardScheduleSupportSchema = object({
|
|
39679
|
+
support: OnboardFieldSupportSchema,
|
|
39680
|
+
/**
|
|
39681
|
+
* The smallest time step the camera can express, in minutes.
|
|
39682
|
+
*
|
|
39683
|
+
* Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
|
|
39684
|
+
* 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
|
|
39685
|
+
* window whose edges are not a multiple of this is REFUSED rather than
|
|
39686
|
+
* quietly rounded — rounding is how an operator's 06:30 becomes 06:00
|
|
39687
|
+
* and nothing says so.
|
|
39688
|
+
*/
|
|
39689
|
+
granularityMinutes: number(),
|
|
39690
|
+
/** Triggers this camera can record on. A window naming another is refused. */
|
|
39691
|
+
triggers: array(RecordTriggerSchema),
|
|
39692
|
+
/**
|
|
39693
|
+
* False when the camera stores ONE trigger per time range, so two
|
|
39694
|
+
* windows overlapping on the same day cannot carry different triggers.
|
|
39695
|
+
* True on Reolink, whose mask is per-trigger and independent.
|
|
39696
|
+
*/
|
|
39697
|
+
supportsOverlappingTriggers: boolean()
|
|
39698
|
+
});
|
|
39699
|
+
var RecordingOnboardOptionsSchema = object({
|
|
39700
|
+
enabled: OnboardFieldSupportSchema,
|
|
39701
|
+
overwriteWhenFull: OnboardFieldSupportSchema,
|
|
39702
|
+
preRecordSec: OnboardFieldSupportSchema,
|
|
39703
|
+
preRecordSecRange: RangeSchema.optional(),
|
|
39704
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
39705
|
+
preRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
39706
|
+
postRecordSec: OnboardFieldSupportSchema,
|
|
39707
|
+
postRecordSecRange: RangeSchema.optional(),
|
|
39708
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
39709
|
+
postRecordSecAllowed: AllowedValuesSchema.optional(),
|
|
39710
|
+
segmentMinutes: OnboardFieldSupportSchema,
|
|
39711
|
+
segmentMinutesRange: RangeSchema.optional(),
|
|
39712
|
+
/** Preferred over the range when the camera takes a SET, not a span. */
|
|
39713
|
+
segmentMinutesAllowed: AllowedValuesSchema.optional(),
|
|
39714
|
+
schedule: OnboardScheduleSupportSchema
|
|
39715
|
+
});
|
|
39716
|
+
/**
|
|
39717
|
+
* A partial change. Every field optional.
|
|
39718
|
+
*
|
|
39719
|
+
* Unlike the other `deviceConfig` caps, a provider here does **NOT**
|
|
39720
|
+
* silently ignore a field it cannot support — it refuses, by name,
|
|
39721
|
+
* through {@link describeOnboardRefusal}. Silence on a recording setting
|
|
39722
|
+
* is the failure D62 exists to prevent: the operator believes the camera
|
|
39723
|
+
* is recording the way the form says, and it is not.
|
|
39724
|
+
*/
|
|
39725
|
+
var RecordingOnboardPatchSchema = object({
|
|
39726
|
+
enabled: boolean().optional(),
|
|
39727
|
+
overwriteWhenFull: boolean().optional(),
|
|
39728
|
+
preRecordSec: number().optional(),
|
|
39729
|
+
postRecordSec: number().optional(),
|
|
39730
|
+
segmentMinutes: number().optional(),
|
|
39731
|
+
/** The complete new window set for the primary track — not a delta. */
|
|
39732
|
+
windows: array(RecordWindowSchema).optional()
|
|
39733
|
+
});
|
|
39734
|
+
var recordingOnboardCapability = {
|
|
39735
|
+
name: "recording-onboard",
|
|
39736
|
+
scope: "device",
|
|
39737
|
+
deviceNative: true,
|
|
39738
|
+
mode: "singleton",
|
|
39739
|
+
deviceTypes: [DeviceType.Camera],
|
|
39740
|
+
deviceConfig: { ui: {
|
|
39741
|
+
kind: "derived-form",
|
|
39742
|
+
builderId: "recording-onboard",
|
|
39743
|
+
tab: "recording"
|
|
39744
|
+
} },
|
|
39745
|
+
methods: {
|
|
39746
|
+
getOptions: method(object({ deviceId: number() }), RecordingOnboardOptionsSchema),
|
|
39747
|
+
setSettings: method(object({
|
|
39748
|
+
deviceId: number(),
|
|
39749
|
+
settings: RecordingOnboardPatchSchema
|
|
39750
|
+
}), _void(), {
|
|
39751
|
+
kind: "mutation",
|
|
39752
|
+
auth: "admin"
|
|
39753
|
+
})
|
|
39754
|
+
},
|
|
39755
|
+
status: {
|
|
39756
|
+
schema: RecordingOnboardStatusSchema,
|
|
39757
|
+
kind: "poll"
|
|
39758
|
+
},
|
|
39759
|
+
runtimeState: RecordingOnboardStatusSchema,
|
|
39760
|
+
/**
|
|
39761
|
+
* Runtime-state durability: **restored** — operator-set camera-side
|
|
39762
|
+
* recording config; mutation-driven, and the storage half is the last
|
|
39763
|
+
* thing the camera said about its own card.
|
|
39764
|
+
*
|
|
39765
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
39766
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
39767
|
+
*/
|
|
39768
|
+
durability: "restored",
|
|
39769
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
39770
|
+
* whether persisting is worth a SQLite commit. */
|
|
39771
|
+
volatileStateFields: ["lastFetchedAt"]
|
|
39772
|
+
};
|
|
39773
|
+
/**
|
|
39331
39774
|
* A camera's own "record me NOW" LEVEL — a signal the device raises while
|
|
39332
39775
|
* something it knows about is happening (a robot vacuum cleaning, a machine
|
|
39333
39776
|
* running, a gate open) and lowers when it stops.
|
|
@@ -43411,7 +43854,6 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
43411
43854
|
embeddingEncoderCapability,
|
|
43412
43855
|
enumSensorCapability,
|
|
43413
43856
|
eventEmitterCapability,
|
|
43414
|
-
eventsCapability,
|
|
43415
43857
|
faceGalleryCapability,
|
|
43416
43858
|
failureContributionCapability,
|
|
43417
43859
|
fanControlCapability,
|
|
@@ -43472,6 +43914,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
|
|
|
43472
43914
|
ptzAutotrackCapability,
|
|
43473
43915
|
rebootCapability,
|
|
43474
43916
|
recordingCapability,
|
|
43917
|
+
recordingArchiveCapability,
|
|
43475
43918
|
recordingExportCapability,
|
|
43476
43919
|
recordingOnboardCapability,
|
|
43477
43920
|
recordingSignalCapability,
|
|
@@ -45706,24 +46149,6 @@ Object.freeze({
|
|
|
45706
46149
|
addonId: null,
|
|
45707
46150
|
access: "view"
|
|
45708
46151
|
},
|
|
45709
|
-
"events.getEventClipUrl": {
|
|
45710
|
-
capName: "events",
|
|
45711
|
-
capScope: "device",
|
|
45712
|
-
addonId: null,
|
|
45713
|
-
access: "view"
|
|
45714
|
-
},
|
|
45715
|
-
"events.getEvents": {
|
|
45716
|
-
capName: "events",
|
|
45717
|
-
capScope: "device",
|
|
45718
|
-
addonId: null,
|
|
45719
|
-
access: "view"
|
|
45720
|
-
},
|
|
45721
|
-
"events.getEventThumbnail": {
|
|
45722
|
-
capName: "events",
|
|
45723
|
-
capScope: "device",
|
|
45724
|
-
addonId: null,
|
|
45725
|
-
access: "view"
|
|
45726
|
-
},
|
|
45727
46152
|
"faceGallery.assignFace": {
|
|
45728
46153
|
capName: "face-gallery",
|
|
45729
46154
|
capScope: "system",
|
|
@@ -48598,224 +49023,236 @@ Object.freeze({
|
|
|
48598
49023
|
addonId: null,
|
|
48599
49024
|
access: "create"
|
|
48600
49025
|
},
|
|
48601
|
-
"recording.
|
|
49026
|
+
"recording.getAvailability": {
|
|
48602
49027
|
capName: "recording",
|
|
48603
|
-
capScope: "
|
|
49028
|
+
capScope: "device",
|
|
48604
49029
|
addonId: null,
|
|
48605
|
-
access: "
|
|
49030
|
+
access: "view"
|
|
48606
49031
|
},
|
|
48607
|
-
"recording.
|
|
49032
|
+
"recording.getDaysWithRecordings": {
|
|
48608
49033
|
capName: "recording",
|
|
48609
|
-
capScope: "
|
|
49034
|
+
capScope: "device",
|
|
48610
49035
|
addonId: null,
|
|
48611
|
-
access: "
|
|
49036
|
+
access: "view"
|
|
48612
49037
|
},
|
|
48613
|
-
"recording.
|
|
49038
|
+
"recording.getPlayback": {
|
|
48614
49039
|
capName: "recording",
|
|
48615
|
-
capScope: "
|
|
49040
|
+
capScope: "device",
|
|
48616
49041
|
addonId: null,
|
|
48617
|
-
access: "
|
|
49042
|
+
access: "view"
|
|
48618
49043
|
},
|
|
48619
|
-
"recording.
|
|
49044
|
+
"recording.getPlaybackOptions": {
|
|
48620
49045
|
capName: "recording",
|
|
48621
|
-
capScope: "
|
|
49046
|
+
capScope: "device",
|
|
48622
49047
|
addonId: null,
|
|
48623
|
-
access: "
|
|
49048
|
+
access: "view"
|
|
48624
49049
|
},
|
|
48625
|
-
"recording.
|
|
49050
|
+
"recording.listSources": {
|
|
48626
49051
|
capName: "recording",
|
|
48627
|
-
capScope: "
|
|
49052
|
+
capScope: "device",
|
|
48628
49053
|
addonId: null,
|
|
48629
49054
|
access: "view"
|
|
48630
49055
|
},
|
|
48631
|
-
"
|
|
48632
|
-
capName: "recording",
|
|
49056
|
+
"recordingArchive.applyDeviceSettingsPatch": {
|
|
49057
|
+
capName: "recording-archive",
|
|
48633
49058
|
capScope: "system",
|
|
48634
49059
|
addonId: null,
|
|
48635
|
-
access: "
|
|
49060
|
+
access: "create"
|
|
48636
49061
|
},
|
|
48637
|
-
"
|
|
48638
|
-
capName: "recording",
|
|
49062
|
+
"recordingArchive.cancelRelocateJob": {
|
|
49063
|
+
capName: "recording-archive",
|
|
48639
49064
|
capScope: "system",
|
|
48640
49065
|
addonId: null,
|
|
48641
|
-
access: "
|
|
49066
|
+
access: "create"
|
|
48642
49067
|
},
|
|
48643
|
-
"
|
|
48644
|
-
capName: "recording",
|
|
49068
|
+
"recordingArchive.cancelStorageMigrationMove": {
|
|
49069
|
+
capName: "recording-archive",
|
|
49070
|
+
capScope: "system",
|
|
49071
|
+
addonId: null,
|
|
49072
|
+
access: "create"
|
|
49073
|
+
},
|
|
49074
|
+
"recordingArchive.deleteFootprint": {
|
|
49075
|
+
capName: "recording-archive",
|
|
49076
|
+
capScope: "system",
|
|
49077
|
+
addonId: null,
|
|
49078
|
+
access: "delete"
|
|
49079
|
+
},
|
|
49080
|
+
"recordingArchive.getAvailabilityBatch": {
|
|
49081
|
+
capName: "recording-archive",
|
|
48645
49082
|
capScope: "system",
|
|
48646
49083
|
addonId: null,
|
|
48647
49084
|
access: "view"
|
|
48648
49085
|
},
|
|
48649
|
-
"
|
|
48650
|
-
capName: "recording",
|
|
49086
|
+
"recordingArchive.getDaysWithRecordingsBatch": {
|
|
49087
|
+
capName: "recording-archive",
|
|
48651
49088
|
capScope: "system",
|
|
48652
49089
|
addonId: null,
|
|
48653
49090
|
access: "view"
|
|
48654
49091
|
},
|
|
48655
|
-
"
|
|
48656
|
-
capName: "recording",
|
|
49092
|
+
"recordingArchive.getDeviceConfig": {
|
|
49093
|
+
capName: "recording-archive",
|
|
48657
49094
|
capScope: "system",
|
|
48658
49095
|
addonId: null,
|
|
48659
49096
|
access: "view"
|
|
48660
49097
|
},
|
|
48661
|
-
"
|
|
48662
|
-
capName: "recording",
|
|
49098
|
+
"recordingArchive.getDeviceLiveContribution": {
|
|
49099
|
+
capName: "recording-archive",
|
|
48663
49100
|
capScope: "system",
|
|
48664
49101
|
addonId: null,
|
|
48665
49102
|
access: "view"
|
|
48666
49103
|
},
|
|
48667
|
-
"
|
|
48668
|
-
capName: "recording",
|
|
49104
|
+
"recordingArchive.getDeviceSettingsContribution": {
|
|
49105
|
+
capName: "recording-archive",
|
|
48669
49106
|
capScope: "system",
|
|
48670
49107
|
addonId: null,
|
|
48671
49108
|
access: "view"
|
|
48672
49109
|
},
|
|
48673
|
-
"
|
|
48674
|
-
capName: "recording",
|
|
49110
|
+
"recordingArchive.getPlacement": {
|
|
49111
|
+
capName: "recording-archive",
|
|
48675
49112
|
capScope: "system",
|
|
48676
49113
|
addonId: null,
|
|
48677
49114
|
access: "view"
|
|
48678
49115
|
},
|
|
48679
|
-
"
|
|
48680
|
-
capName: "recording",
|
|
49116
|
+
"recordingArchive.getRelocateResidue": {
|
|
49117
|
+
capName: "recording-archive",
|
|
48681
49118
|
capScope: "system",
|
|
48682
49119
|
addonId: null,
|
|
48683
49120
|
access: "view"
|
|
48684
49121
|
},
|
|
48685
|
-
"
|
|
48686
|
-
capName: "recording",
|
|
49122
|
+
"recordingArchive.getStatus": {
|
|
49123
|
+
capName: "recording-archive",
|
|
48687
49124
|
capScope: "system",
|
|
48688
49125
|
addonId: null,
|
|
48689
49126
|
access: "view"
|
|
48690
49127
|
},
|
|
48691
|
-
"
|
|
48692
|
-
capName: "recording",
|
|
49128
|
+
"recordingArchive.getStorageMigrationMoveStatus": {
|
|
49129
|
+
capName: "recording-archive",
|
|
48693
49130
|
capScope: "system",
|
|
48694
49131
|
addonId: null,
|
|
48695
49132
|
access: "view"
|
|
48696
49133
|
},
|
|
48697
|
-
"
|
|
48698
|
-
capName: "recording",
|
|
49134
|
+
"recordingArchive.getStorageUsage": {
|
|
49135
|
+
capName: "recording-archive",
|
|
48699
49136
|
capScope: "system",
|
|
48700
49137
|
addonId: null,
|
|
48701
49138
|
access: "view"
|
|
48702
49139
|
},
|
|
48703
|
-
"
|
|
48704
|
-
capName: "recording",
|
|
49140
|
+
"recordingArchive.listOpsLog": {
|
|
49141
|
+
capName: "recording-archive",
|
|
48705
49142
|
capScope: "system",
|
|
48706
49143
|
addonId: null,
|
|
48707
49144
|
access: "view"
|
|
48708
49145
|
},
|
|
48709
|
-
"
|
|
48710
|
-
capName: "recording",
|
|
49146
|
+
"recordingArchive.listRelocateJobs": {
|
|
49147
|
+
capName: "recording-archive",
|
|
48711
49148
|
capScope: "system",
|
|
48712
49149
|
addonId: null,
|
|
48713
49150
|
access: "view"
|
|
48714
49151
|
},
|
|
48715
|
-
"
|
|
48716
|
-
capName: "recording",
|
|
49152
|
+
"recordingArchive.locateSegment": {
|
|
49153
|
+
capName: "recording-archive",
|
|
48717
49154
|
capScope: "system",
|
|
48718
49155
|
addonId: null,
|
|
48719
49156
|
access: "view"
|
|
48720
49157
|
},
|
|
48721
|
-
"
|
|
48722
|
-
capName: "recording",
|
|
49158
|
+
"recordingArchive.pauseForStorageMigration": {
|
|
49159
|
+
capName: "recording-archive",
|
|
48723
49160
|
capScope: "system",
|
|
48724
49161
|
addonId: null,
|
|
48725
49162
|
access: "create"
|
|
48726
49163
|
},
|
|
48727
|
-
"
|
|
48728
|
-
capName: "recording",
|
|
49164
|
+
"recordingArchive.planStorageRebalance": {
|
|
49165
|
+
capName: "recording-archive",
|
|
48729
49166
|
capScope: "system",
|
|
48730
49167
|
addonId: null,
|
|
48731
49168
|
access: "view"
|
|
48732
49169
|
},
|
|
48733
|
-
"
|
|
48734
|
-
capName: "recording",
|
|
49170
|
+
"recordingArchive.pruneFootage": {
|
|
49171
|
+
capName: "recording-archive",
|
|
48735
49172
|
capScope: "system",
|
|
48736
49173
|
addonId: null,
|
|
48737
49174
|
access: "create"
|
|
48738
49175
|
},
|
|
48739
|
-
"
|
|
48740
|
-
capName: "recording",
|
|
49176
|
+
"recordingArchive.readGopBytes": {
|
|
49177
|
+
capName: "recording-archive",
|
|
48741
49178
|
capScope: "system",
|
|
48742
49179
|
addonId: null,
|
|
48743
49180
|
access: "view"
|
|
48744
49181
|
},
|
|
48745
|
-
"
|
|
48746
|
-
capName: "recording",
|
|
49182
|
+
"recordingArchive.readSegmentBytes": {
|
|
49183
|
+
capName: "recording-archive",
|
|
48747
49184
|
capScope: "system",
|
|
48748
49185
|
addonId: null,
|
|
48749
49186
|
access: "view"
|
|
48750
49187
|
},
|
|
48751
|
-
"
|
|
48752
|
-
capName: "recording",
|
|
49188
|
+
"recordingArchive.readWindowBytes": {
|
|
49189
|
+
capName: "recording-archive",
|
|
48753
49190
|
capScope: "system",
|
|
48754
49191
|
addonId: null,
|
|
48755
49192
|
access: "view"
|
|
48756
49193
|
},
|
|
48757
|
-
"
|
|
48758
|
-
capName: "recording",
|
|
49194
|
+
"recordingArchive.reconcileLedgerAgainstDisk": {
|
|
49195
|
+
capName: "recording-archive",
|
|
48759
49196
|
capScope: "system",
|
|
48760
49197
|
addonId: null,
|
|
48761
49198
|
access: "create"
|
|
48762
49199
|
},
|
|
48763
|
-
"
|
|
48764
|
-
capName: "recording",
|
|
49200
|
+
"recordingArchive.refreshStorageLocationsForMigration": {
|
|
49201
|
+
capName: "recording-archive",
|
|
48765
49202
|
capScope: "system",
|
|
48766
49203
|
addonId: null,
|
|
48767
49204
|
access: "create"
|
|
48768
49205
|
},
|
|
48769
|
-
"
|
|
48770
|
-
capName: "recording",
|
|
49206
|
+
"recordingArchive.relocateFootage": {
|
|
49207
|
+
capName: "recording-archive",
|
|
48771
49208
|
capScope: "system",
|
|
48772
49209
|
addonId: null,
|
|
48773
49210
|
access: "create"
|
|
48774
49211
|
},
|
|
48775
|
-
"
|
|
48776
|
-
capName: "recording",
|
|
49212
|
+
"recordingArchive.renderClip": {
|
|
49213
|
+
capName: "recording-archive",
|
|
48777
49214
|
capScope: "system",
|
|
48778
49215
|
addonId: null,
|
|
48779
49216
|
access: "create"
|
|
48780
49217
|
},
|
|
48781
|
-
"
|
|
48782
|
-
capName: "recording",
|
|
49218
|
+
"recordingArchive.renderGif": {
|
|
49219
|
+
capName: "recording-archive",
|
|
48783
49220
|
capScope: "system",
|
|
48784
49221
|
addonId: null,
|
|
48785
49222
|
access: "create"
|
|
48786
49223
|
},
|
|
48787
|
-
"
|
|
48788
|
-
capName: "recording",
|
|
49224
|
+
"recordingArchive.rescanStorage": {
|
|
49225
|
+
capName: "recording-archive",
|
|
48789
49226
|
capScope: "system",
|
|
48790
49227
|
addonId: null,
|
|
48791
49228
|
access: "create"
|
|
48792
49229
|
},
|
|
48793
|
-
"
|
|
48794
|
-
capName: "recording",
|
|
49230
|
+
"recordingArchive.resumeForStorageMigration": {
|
|
49231
|
+
capName: "recording-archive",
|
|
48795
49232
|
capScope: "system",
|
|
48796
49233
|
addonId: null,
|
|
48797
49234
|
access: "create"
|
|
48798
49235
|
},
|
|
48799
|
-
"
|
|
48800
|
-
capName: "recording",
|
|
49236
|
+
"recordingArchive.setDeviceConfig": {
|
|
49237
|
+
capName: "recording-archive",
|
|
48801
49238
|
capScope: "system",
|
|
48802
49239
|
addonId: null,
|
|
48803
49240
|
access: "create"
|
|
48804
49241
|
},
|
|
48805
|
-
"
|
|
48806
|
-
capName: "recording",
|
|
49242
|
+
"recordingArchive.setDevicePlacement": {
|
|
49243
|
+
capName: "recording-archive",
|
|
48807
49244
|
capScope: "system",
|
|
48808
49245
|
addonId: null,
|
|
48809
49246
|
access: "create"
|
|
48810
49247
|
},
|
|
48811
|
-
"
|
|
48812
|
-
capName: "recording",
|
|
49248
|
+
"recordingArchive.startStorageMigrationMove": {
|
|
49249
|
+
capName: "recording-archive",
|
|
48813
49250
|
capScope: "system",
|
|
48814
49251
|
addonId: null,
|
|
48815
49252
|
access: "create"
|
|
48816
49253
|
},
|
|
48817
|
-
"
|
|
48818
|
-
capName: "recording",
|
|
49254
|
+
"recordingArchive.startStorageRebalance": {
|
|
49255
|
+
capName: "recording-archive",
|
|
48819
49256
|
capScope: "system",
|
|
48820
49257
|
addonId: null,
|
|
48821
49258
|
access: "create"
|
|
@@ -50344,6 +50781,12 @@ Object.freeze({
|
|
|
50344
50781
|
addonId: null,
|
|
50345
50782
|
access: "view"
|
|
50346
50783
|
},
|
|
50784
|
+
"videoclips.getPlaybackOptions": {
|
|
50785
|
+
capName: "videoclips",
|
|
50786
|
+
capScope: "device",
|
|
50787
|
+
addonId: null,
|
|
50788
|
+
access: "view"
|
|
50789
|
+
},
|
|
50347
50790
|
"videoclips.listClips": {
|
|
50348
50791
|
capName: "videoclips",
|
|
50349
50792
|
capScope: "device",
|
|
@@ -50356,6 +50799,12 @@ Object.freeze({
|
|
|
50356
50799
|
addonId: null,
|
|
50357
50800
|
access: "view"
|
|
50358
50801
|
},
|
|
50802
|
+
"videoclips.offerClipBytes": {
|
|
50803
|
+
capName: "videoclips",
|
|
50804
|
+
capScope: "device",
|
|
50805
|
+
addonId: null,
|
|
50806
|
+
access: "view"
|
|
50807
|
+
},
|
|
50359
50808
|
"videoclips.readClipBytes": {
|
|
50360
50809
|
capName: "videoclips",
|
|
50361
50810
|
capScope: "device",
|
|
@@ -51108,21 +51557,6 @@ Object.freeze({
|
|
|
51108
51557
|
form: "single",
|
|
51109
51558
|
optional: false
|
|
51110
51559
|
}],
|
|
51111
|
-
"events.getEventClipUrl": [{
|
|
51112
|
-
name: "deviceId",
|
|
51113
|
-
form: "single",
|
|
51114
|
-
optional: false
|
|
51115
|
-
}],
|
|
51116
|
-
"events.getEvents": [{
|
|
51117
|
-
name: "deviceId",
|
|
51118
|
-
form: "single",
|
|
51119
|
-
optional: false
|
|
51120
|
-
}],
|
|
51121
|
-
"events.getEventThumbnail": [{
|
|
51122
|
-
name: "deviceId",
|
|
51123
|
-
form: "single",
|
|
51124
|
-
optional: false
|
|
51125
|
-
}],
|
|
51126
51560
|
"faceGallery.getFaceByTrack": [{
|
|
51127
51561
|
name: "deviceId",
|
|
51128
51562
|
form: "single",
|
|
@@ -52041,107 +52475,117 @@ Object.freeze({
|
|
|
52041
52475
|
form: "single",
|
|
52042
52476
|
optional: false
|
|
52043
52477
|
}],
|
|
52044
|
-
"recording.
|
|
52478
|
+
"recording.getAvailability": [{
|
|
52045
52479
|
name: "deviceId",
|
|
52046
52480
|
form: "single",
|
|
52047
52481
|
optional: false
|
|
52048
52482
|
}],
|
|
52049
|
-
"recording.
|
|
52483
|
+
"recording.getDaysWithRecordings": [{
|
|
52050
52484
|
name: "deviceId",
|
|
52051
52485
|
form: "single",
|
|
52052
52486
|
optional: false
|
|
52053
52487
|
}],
|
|
52054
|
-
"recording.
|
|
52055
|
-
name: "
|
|
52056
|
-
form: "
|
|
52488
|
+
"recording.getPlayback": [{
|
|
52489
|
+
name: "deviceId",
|
|
52490
|
+
form: "single",
|
|
52057
52491
|
optional: false
|
|
52058
52492
|
}],
|
|
52059
|
-
"recording.
|
|
52493
|
+
"recording.getPlaybackOptions": [{
|
|
52060
52494
|
name: "deviceId",
|
|
52061
52495
|
form: "single",
|
|
52062
52496
|
optional: false
|
|
52063
52497
|
}],
|
|
52064
|
-
"recording.
|
|
52065
|
-
name: "
|
|
52066
|
-
form: "
|
|
52498
|
+
"recording.listSources": [{
|
|
52499
|
+
name: "deviceId",
|
|
52500
|
+
form: "single",
|
|
52067
52501
|
optional: false
|
|
52068
52502
|
}],
|
|
52069
|
-
"
|
|
52503
|
+
"recordingArchive.deleteFootprint": [{
|
|
52070
52504
|
name: "deviceId",
|
|
52071
52505
|
form: "single",
|
|
52072
52506
|
optional: false
|
|
52073
52507
|
}],
|
|
52074
|
-
"
|
|
52508
|
+
"recordingArchive.getAvailabilityBatch": [{
|
|
52509
|
+
name: "deviceIds",
|
|
52510
|
+
form: "array",
|
|
52511
|
+
optional: false
|
|
52512
|
+
}],
|
|
52513
|
+
"recordingArchive.getDaysWithRecordingsBatch": [{
|
|
52514
|
+
name: "deviceIds",
|
|
52515
|
+
form: "array",
|
|
52516
|
+
optional: false
|
|
52517
|
+
}],
|
|
52518
|
+
"recordingArchive.getDeviceConfig": [{
|
|
52075
52519
|
name: "deviceId",
|
|
52076
52520
|
form: "single",
|
|
52077
52521
|
optional: false
|
|
52078
52522
|
}],
|
|
52079
|
-
"
|
|
52523
|
+
"recordingArchive.listOpsLog": [{
|
|
52080
52524
|
name: "deviceId",
|
|
52081
52525
|
form: "single",
|
|
52082
52526
|
optional: true
|
|
52083
52527
|
}],
|
|
52084
|
-
"
|
|
52528
|
+
"recordingArchive.locateSegment": [{
|
|
52085
52529
|
name: "deviceId",
|
|
52086
52530
|
form: "single",
|
|
52087
52531
|
optional: false
|
|
52088
52532
|
}],
|
|
52089
|
-
"
|
|
52533
|
+
"recordingArchive.pruneFootage": [{
|
|
52090
52534
|
name: "deviceId",
|
|
52091
52535
|
form: "single",
|
|
52092
52536
|
optional: false
|
|
52093
52537
|
}],
|
|
52094
|
-
"
|
|
52538
|
+
"recordingArchive.readGopBytes": [{
|
|
52095
52539
|
name: "deviceId",
|
|
52096
52540
|
form: "single",
|
|
52097
52541
|
optional: false
|
|
52098
52542
|
}],
|
|
52099
|
-
"
|
|
52543
|
+
"recordingArchive.readSegmentBytes": [{
|
|
52100
52544
|
name: "deviceId",
|
|
52101
52545
|
form: "single",
|
|
52102
52546
|
optional: false
|
|
52103
52547
|
}],
|
|
52104
|
-
"
|
|
52548
|
+
"recordingArchive.readWindowBytes": [{
|
|
52105
52549
|
name: "deviceId",
|
|
52106
52550
|
form: "single",
|
|
52107
52551
|
optional: false
|
|
52108
52552
|
}],
|
|
52109
|
-
"
|
|
52553
|
+
"recordingArchive.reconcileLedgerAgainstDisk": [{
|
|
52110
52554
|
name: "deviceId",
|
|
52111
52555
|
form: "single",
|
|
52112
52556
|
optional: true
|
|
52113
52557
|
}],
|
|
52114
|
-
"
|
|
52558
|
+
"recordingArchive.relocateFootage": [{
|
|
52115
52559
|
name: "deviceId",
|
|
52116
52560
|
form: "single",
|
|
52117
52561
|
optional: true
|
|
52118
52562
|
}],
|
|
52119
|
-
"
|
|
52563
|
+
"recordingArchive.renderClip": [{
|
|
52120
52564
|
name: "deviceId",
|
|
52121
52565
|
form: "single",
|
|
52122
52566
|
optional: false
|
|
52123
52567
|
}],
|
|
52124
|
-
"
|
|
52568
|
+
"recordingArchive.renderGif": [{
|
|
52125
52569
|
name: "deviceId",
|
|
52126
52570
|
form: "single",
|
|
52127
52571
|
optional: false
|
|
52128
52572
|
}],
|
|
52129
|
-
"
|
|
52573
|
+
"recordingArchive.rescanStorage": [{
|
|
52130
52574
|
name: "deviceId",
|
|
52131
52575
|
form: "single",
|
|
52132
52576
|
optional: false
|
|
52133
52577
|
}],
|
|
52134
|
-
"
|
|
52578
|
+
"recordingArchive.setDeviceConfig": [{
|
|
52135
52579
|
name: "deviceId",
|
|
52136
52580
|
form: "single",
|
|
52137
52581
|
optional: false
|
|
52138
52582
|
}],
|
|
52139
|
-
"
|
|
52583
|
+
"recordingArchive.setDevicePlacement": [{
|
|
52140
52584
|
name: "deviceId",
|
|
52141
52585
|
form: "single",
|
|
52142
52586
|
optional: false
|
|
52143
52587
|
}],
|
|
52144
|
-
"
|
|
52588
|
+
"recordingArchive.startStorageMigrationMove": [{
|
|
52145
52589
|
name: "deviceId",
|
|
52146
52590
|
form: "single",
|
|
52147
52591
|
optional: true
|
|
@@ -52402,6 +52846,11 @@ Object.freeze({
|
|
|
52402
52846
|
form: "single",
|
|
52403
52847
|
optional: false
|
|
52404
52848
|
}],
|
|
52849
|
+
"videoclips.getPlaybackOptions": [{
|
|
52850
|
+
name: "deviceId",
|
|
52851
|
+
form: "single",
|
|
52852
|
+
optional: false
|
|
52853
|
+
}],
|
|
52405
52854
|
"videoclips.listClips": [{
|
|
52406
52855
|
name: "deviceId",
|
|
52407
52856
|
form: "single",
|
|
@@ -52412,6 +52861,11 @@ Object.freeze({
|
|
|
52412
52861
|
form: "single",
|
|
52413
52862
|
optional: false
|
|
52414
52863
|
}],
|
|
52864
|
+
"videoclips.offerClipBytes": [{
|
|
52865
|
+
name: "deviceId",
|
|
52866
|
+
form: "single",
|
|
52867
|
+
optional: false
|
|
52868
|
+
}],
|
|
52415
52869
|
"videoclips.readClipBytes": [{
|
|
52416
52870
|
name: "deviceId",
|
|
52417
52871
|
form: "single",
|