@camstack/addon-osd-manager 0.1.132 → 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.
Files changed (18) hide show
  1. package/dist/{MotionZonesSettings-BVKF49rs.mjs → MotionZonesSettings-2zsWJZfj.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-DoIRAuP_.mjs → PrivacyMaskSettings-DrvVVdy1.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-3ApQNn3a.mjs → SceneMonitorEditor-BkvmuOvx.mjs} +3 -3
  4. package/dist/_stub.js +11 -11
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-mIgOkpXI.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-DIsyEUg8.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-dpphyADj.mjs +26 -0
  7. package/dist/{hostInit-vbrbPLQg.mjs → hostInit-BnK9fAeZ.mjs} +2 -2
  8. package/dist/index.js +1237 -981
  9. package/dist/index.mjs +1237 -981
  10. package/dist/{player-overlays-BPpRI9aB.mjs → player-overlays-DrhBQRby.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-BEcoyxvC.mjs → responsive-D3JdB_Kk.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-1LhlrkfK.mjs → scene-monitor-copy-y4eFIlLX.mjs} +1 -1
  14. package/dist/{square-Bw9o8y6p.mjs → square-CK1KHJ3v.mjs} +1 -1
  15. package/dist/{trash-2-ClX9SCS6.mjs → trash-2-jS-4ZOJJ.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-BNiwvK5v.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-DgYdzX1B.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D47POQ8_.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-COWaSCAi.mjs
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",
@@ -7629,24 +7647,6 @@ object({
7629
7647
  unreachable: number()
7630
7648
  })
7631
7649
  });
7632
- /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7633
- var PeerBytesTicketSchema = object({
7634
- /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
7635
- url: string().min(1),
7636
- /**
7637
- * The HOST node this URL means something on — the hub or a named agent,
7638
- * never a runner. {@link AddonPeerBytes.open} compares it to its own and
7639
- * refuses `cross-node` by name when they differ, without dialling.
7640
- */
7641
- hostNodeId: string().min(1),
7642
- expiresAtMs: number().int().nonnegative(),
7643
- /**
7644
- * What the producer DECLARED the body to be, when it knows — `null` when it
7645
- * does not. Never `0` for unknown (D393): a consumer sizing a bound off this
7646
- * must be able to tell "the producer did not say" from "the body is empty".
7647
- */
7648
- declaredBytes: number().int().nonnegative().nullable()
7649
- });
7650
7650
  /**
7651
7651
  * Adoption job — the background form of `device-adoption.adopt`.
7652
7652
  *
@@ -7758,7 +7758,7 @@ var AdoptionJobSchema = object({
7758
7758
  * component's original options — detection to the detection-pipeline wrapper
7759
7759
  * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
7760
7760
  * (which was always first-class; the switch was a veneer over
7761
- * `recording.setDeviceConfig`), notifications to a notification-center
7761
+ * `recordingArchive.setDeviceConfig`), notifications to a notification-center
7762
7762
  * per-device setting, the two camera planes to their own components.
7763
7763
  *
7764
7764
  * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
@@ -7784,7 +7784,7 @@ var AdoptionJobSchema = object({
7784
7784
  * | `stream-broker` | `deviceManager.setDisabled` | `StreamBrokerManager.reconcileAllCatalogs` releases the brokers; `ensureBroker` refuses re-creation |
7785
7785
  * | `object-detection` | `deviceManager.setWrapperActive('detection-pipeline')` | `PipelineSettingsStore.resolvePipelineForDevice` returns `{ steps: [], audio: null }` |
7786
7786
  * | `audio-analysis` | `deviceManager.setWrapperActive('audio-analysis')` | `AudioSubscriptionController.subscribeAudioStream` returns `null` before opening the stream |
7787
- * | `recording` | `recording.setDeviceConfig` → `RecordingConfig.enabled` | `band-decision.shouldRecord` returns false; the controller detaches the device |
7787
+ * | `recording` | `recordingArchive.setDeviceConfig` → `RecordingConfig.enabled` | `band-decision.shouldRecord` returns false; the controller detaches the device |
7788
7788
  * | `notifications` | `notificationRules.setDeviceMuted` | `NotificationCenter.evaluateAndEnqueue` returns before any rule is evaluated |
7789
7789
  * | `privacy-mask` | `privacyMask.setMask({ enabled })` → the CAMERA | the camera blanks the masked regions itself; every stream and recording carries the black boxes |
7790
7790
  * | `device-audio` | `privacyMask.setAudioEnabled` → the CAMERA | the camera stops encoding an audio track at all; every consumer sees silent video |
@@ -12104,87 +12104,6 @@ var cameraPipelineConfigCapability = {
12104
12104
  exposesDeviceSettings: true,
12105
12105
  methods: {}
12106
12106
  };
12107
- /**
12108
- * The signals a device can emit to WAKE its own stream.
12109
- *
12110
- * A camera whose stream is built on demand sleeps until something asks for it,
12111
- * and "something" cannot be a consumer that is merely attached — a Frigate-style
12112
- * puller holds a session open for ever, and treating that as demand would keep
12113
- * a battery camera awake for ever, which is the whole thing the battery is for
12114
- * (D173). So the wake has to come from the CAMERA: an event it noticed by
12115
- * itself, with no stream running.
12116
- *
12117
- * ## The vocabulary is the PROVIDER'S, not ours
12118
- *
12119
- * Like `consumables`, this cap declares no vocabulary of its own. A provider
12120
- * names each signal with a `code` it chooses and a `label` an operator reads.
12121
- * Reolink offers motion and camera-native detection; another provider may offer
12122
- * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
12123
- * yet. A fixed enum here would mean every new signal is a framework release.
12124
- *
12125
- * It is deliberately NOT derived from the caps a device already binds. Whether
12126
- * a camera CAN push firmware motion is expressed by `motionSources` containing
12127
- * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
12128
- * binding — but both answer "what drives the detection pipeline", which is a
12129
- * different question from "what may wake a sleeping stream". A camera can do
12130
- * the first and not be trusted with the second, and the operator picks per
12131
- * camera. Two questions, two authorities.
12132
- *
12133
- * ## Availability is not permission
12134
- *
12135
- * `listSignals` says what the device CAN emit. Whether a given signal actually
12136
- * wakes the stream is the operator's per-camera choice, held by the broker
12137
- * alongside the cooldown — see the stream-broker cap's wake settings. A
12138
- * provider declaring a signal is not a provider enabling it.
12139
- */
12140
- /** One signal a device can emit. */
12141
- var StreamSignalSchema = object({
12142
- /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
12143
- code: string().min(1),
12144
- /** What an operator reads in the picker. The provider's own wording. */
12145
- label: string().min(1),
12146
- /**
12147
- * Whether the provider recommends this signal ON when a camera is first set
12148
- * up. A provider knows which of its signals are cheap and reliable; an
12149
- * operator should not have to discover that by trial. Reolink recommends
12150
- * both of its own.
12151
- */
12152
- recommended: boolean()
12153
- });
12154
- var StreamSignalsStatusSchema = object({
12155
- signals: array(StreamSignalSchema),
12156
- lastFetchedAt: number()
12157
- });
12158
- var streamSignalsCapability = {
12159
- name: "stream-signals",
12160
- scope: "device",
12161
- deviceNative: true,
12162
- mode: "singleton",
12163
- deviceTypes: Object.values(DeviceType),
12164
- runtimeState: StreamSignalsStatusSchema,
12165
- /**
12166
- * Runtime-state durability: **session** — mirrored in RAM, never written.
12167
- *
12168
- * The slice holds what the DEVICE says it can emit. That is a probed fact,
12169
- * not an operator choice: the provider re-declares it on every registration,
12170
- * so losing it loses nothing and persisting it would freeze an answer the
12171
- * camera is entitled to change. Measured the same day on the sibling case —
12172
- * `native-object-detection.supportedClasses` was persisted, and a firmware
12173
- * class the camera really detected stayed missing for the life of the row
12174
- * because the fix could not reach it.
12175
- *
12176
- * See `RuntimeStateDurability`. Enforced by
12177
- * `scripts/check-runtime-state-durability.ts`.
12178
- */
12179
- durability: "session",
12180
- methods: {
12181
- /**
12182
- * What this device can emit. Empty is a valid and common answer — most
12183
- * cameras have nothing to offer here, and an empty list is what makes the
12184
- * broker's picker show nothing rather than a false choice.
12185
- */
12186
- listSignals: method(_void(), array(StreamSignalSchema).readonly()) }
12187
- };
12188
12107
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
12189
12108
  var StreamFormatSchema = _enum([
12190
12109
  "webrtc",
@@ -14309,6 +14228,118 @@ var detectionPipelineCapability = {
14309
14228
  methods: {}
14310
14229
  };
14311
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
+ /**
14312
14343
  * Identity envelope for a device's upstream-system metadata.
14313
14344
  *
14314
14345
  * Two jobs:
@@ -14700,118 +14731,6 @@ var deviceAdoptionCapability = {
14700
14731
  }
14701
14732
  };
14702
14733
  /**
14703
- * device-admin-link — "this device has a management page of its own, and here
14704
- * is its address".
14705
- *
14706
- * ## Why this is not a `deviceConfig` cap
14707
- *
14708
- * There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
14709
- * can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
14710
- * patch back through a setter; it costs a `builderId` reducer in
14711
- * `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
14712
- * renders a form section. This cap answers ONE question with ONE read and
14713
- * renders a button. Nothing about it is a form, so it carries no `deviceConfig`
14714
- * block, no `settings`, no `runtimeState` and no reducer — exactly like
14715
- * `reboot`, the other pure-RPC device-native cap.
14716
- *
14717
- * ## Absent, and the difference between "no page" and "we cannot say"
14718
- *
14719
- * The two are answered at DIFFERENT layers, on purpose:
14720
- *
14721
- * - **"We cannot say"** → the provider never registers the cap for that
14722
- * device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
14723
- * fan are reached only through a vendor cloud; there is no address to hand
14724
- * out and no page to open. A Tuya plug, a Wyze camera and a Gree air
14725
- * conditioner DO have a LAN IP, and still have no HTTP management page
14726
- * behind it. None of them register, so `deviceManager.getBindings` never
14727
- * lists the cap and no surface asks.
14728
- * - **"This device has no page, and I know that"** → the provider registers
14729
- * and `getAdminLink` returns `null`. This is the answer for a device whose
14730
- * sibling DOES have a page: a Reolink battery camera reached over UDP by
14731
- * `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
14732
- * transport, a Home Assistant broker authenticated by supervisor token
14733
- * (which carries no `baseUrl` at all).
14734
- *
14735
- * Both draw NOTHING. A button that opens a browser error is worse than no
14736
- * button, and D62 is the same rule from the other side: an off switch is
14737
- * reported off, never made to look broken. There is no third state where the
14738
- * UI renders a disabled button "because the device might have a page".
14739
- *
14740
- * ## The URL never carries credentials
14741
- *
14742
- * Not in userinfo, not in a query string. Every provider builds through
14743
- * `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
14744
- * scheme and path as separate arguments — there is no parameter a secret could
14745
- * arrive in — and re-checks its own output for the `scheme://user:pass@` shape
14746
- * that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
14747
- * output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
14748
- * keeps providers from hand-rolling one anyway.
14749
- *
14750
- * This matters here more than anywhere else in the repo, because every provider
14751
- * that knows a device's host knows its PASSWORD too: `{ host, port, username,
14752
- * password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
14753
- * and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
14754
- * camera's own page will ask for its own login. That is correct, and pre-
14755
- * filling it is the operator's business, not ours.
14756
- *
14757
- * ## It is a LAN fact
14758
- *
14759
- * The URL addresses the device where the NODE can see it. It is not proxied,
14760
- * not made reachable from outside, and not sent anywhere. A surface renders it
14761
- * as a link the operator's own browser follows, on the operator's own network,
14762
- * or renders nothing.
14763
- */
14764
- /**
14765
- * Whose page is it. The distinction is for the OPERATOR, who needs to know
14766
- * before clicking whether he is about to land on a camera's own web server or
14767
- * inside Home Assistant.
14768
- */
14769
- var AdminLinkTargetEnum = _enum(["device", "integration"]);
14770
- var DeviceAdminLinkSchema = object({
14771
- /**
14772
- * Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
14773
- * free of userinfo and of any credential-shaped query key.
14774
- */
14775
- url: string(),
14776
- /**
14777
- * What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
14778
- * The PROVIDER names it, because only the provider knows what the page is;
14779
- * a UI that invented the label from the addon id would call the Home
14780
- * Assistant device page "Provider Homeassistant".
14781
- */
14782
- label: string(),
14783
- target: AdminLinkTargetEnum,
14784
- /**
14785
- * Host the URL points at, without scheme, port or path — for the tooltip, so
14786
- * an operator can see WHERE the button goes before he follows it. Redundant
14787
- * with `url` by construction; carried separately so no surface has to parse
14788
- * a URL to show it.
14789
- */
14790
- host: string()
14791
- });
14792
- var deviceAdminLinkCapability = {
14793
- name: "device-admin-link",
14794
- scope: "device",
14795
- deviceNative: true,
14796
- mode: "singleton",
14797
- methods: {
14798
- /**
14799
- * The device's management page, or `null` when this device has none.
14800
- *
14801
- * `auth: 'admin'` deliberately. This is administration, not actuation —
14802
- * the same bucket as `reboot` and `camera-credentials`, and explicitly NOT
14803
- * the actuation set `scripts/check-actuation-not-admin.ts` protects (D403).
14804
- * The URL is also a statement about the LAN, which a household member with
14805
- * a `view` grant on a light has no reason to be handed.
14806
- *
14807
- * The surfaces gate on the QUERY, never on a role they guessed: a caller
14808
- * without the right loses the query and draws nothing, which is the same
14809
- * thing a device with no page draws. There is no path on which a button
14810
- * appears and then fails — the D403 failure mode, from the other end.
14811
- */
14812
- getAdminLink: method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" }) }
14813
- };
14814
- /**
14815
14734
  * `device-export` — collection cap for addons that export camstack
14816
14735
  * devices to external ecosystems (HomeAssistant via MQTT discovery,
14817
14736
  * HomeKit/HAP, Alexa Smart Home, …).
@@ -28452,6 +28371,87 @@ var storageProviderCapability = {
28452
28371
  })
28453
28372
  }
28454
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
+ };
28455
28455
  /** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
28456
28456
  var ProfileSettingsSchemaBridge = unknown().nullable();
28457
28457
  var ProfileSettingsBagSchema = record(string(), unknown());
@@ -31685,6 +31685,179 @@ getCredentials: method(object({ deviceId: number() }), CameraCredentialsSchema.n
31685
31685
  }
31686
31686
  };
31687
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
+ /**
31688
31861
  * Carbon-monoxide alarm sensor. Drives Home Assistant `binary_sensor`
31689
31862
  * entries with `device_class: carbon_monoxide`. Push-driven.
31690
31863
  */
@@ -32495,346 +32668,6 @@ var dayNightCapability = {
32495
32668
  volatileStateFields: ["lastFetchedAt"]
32496
32669
  };
32497
32670
  /**
32498
- * Vendor-neutral **onboard** recording + storage cap — what the CAMERA
32499
- * writes to the CAMERA's own card, on the camera's own schedule.
32500
- *
32501
- * This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
32502
- * footage ledger, our storage locations, our retention. This one has a
32503
- * different authority — the camera's firmware — and per D62 it stores
32504
- * nothing of its own. Every value here is read from the camera and every
32505
- * write goes back to the camera; there is no CamStack-side mirror that
32506
- * could disagree with the device.
32507
- *
32508
- * ## One shape, two firmwares
32509
- *
32510
- * Measured 2026-09-22 against the live fleet:
32511
- *
32512
- * | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
32513
- * | --- | --- | --- |
32514
- * | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
32515
- * | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
32516
- * | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
32517
- * | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
32518
- * | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
32519
- * | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
32520
- * | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
32521
- * | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
32522
- *
32523
- * The two schedule models look different and are the same thing in
32524
- * different coordinates: both answer "for this trigger, during which
32525
- * weekly windows does the camera record". {@link RecordWindow} is that
32526
- * question in one shape — Hikvision's ranges map straight onto it,
32527
- * Reolink's mask expands into hour-aligned windows.
32528
- *
32529
- * ## Union, not intersection
32530
- *
32531
- * **The same fields exist on every camera.** What differs per device is
32532
- * which VALUES that device accepts, and that is what {@link
32533
- * RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
32534
- * per field plus the schedule's own limits. A control a camera cannot
32535
- * honour is rendered DISABLED WITH ITS REASON, never missing and never
32536
- * dead: disabled must not look like broken.
32537
- *
32538
- * ## Refusal by name
32539
- *
32540
- * A write a camera cannot honour is refused with a sentence the operator
32541
- * can read — never accepted and dropped. Both providers refuse through
32542
- * {@link describeOnboardRefusal}, so the vocabulary is one function and
32543
- * one test, not two hand-written vendor opinions.
32544
- *
32545
- * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
32546
- * `getOptions` advertises per-camera availability, `getStatus` (auto-
32547
- * injected from `status`) reports the live values, and a single
32548
- * `setSettings` mutation applies a partial change. No hand-written
32549
- * settings-contribution methods.
32550
- */
32551
- /**
32552
- * What makes the camera start recording during a window.
32553
- *
32554
- * The union of both vendors' vocabularies. `continuous` is Hikvision's
32555
- * `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
32556
- * object-class triggers are Reolink-only today and the smart-event ones
32557
- * (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
32558
- * firmwares measured — a camera that cannot record on a trigger simply
32559
- * does not list it in `options.schedule.triggers`, and a window naming
32560
- * it is REFUSED, not dropped.
32561
- */
32562
- var RecordTriggerSchema = _enum([
32563
- "continuous",
32564
- "motion",
32565
- "person",
32566
- "vehicle",
32567
- "animal",
32568
- "lineCrossing",
32569
- "intrusion",
32570
- "loitering",
32571
- "alarmInput"
32572
- ]);
32573
- /**
32574
- * One weekly recording window: "on `day`, from `startMinute` to
32575
- * `endMinute`, record on `trigger`".
32576
- *
32577
- * `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
32578
- * both firmwares enumerate). Minutes are local camera time since
32579
- * midnight; `endMinute` may be 1440, meaning end of day — that is
32580
- * Hikvision's literal `24:00` and Reolink's 24th mask slot, and
32581
- * collapsing it to 0 would turn a whole-day window into an empty one.
32582
- */
32583
- var RecordWindowSchema = object({
32584
- trigger: RecordTriggerSchema,
32585
- day: number().int().min(0).max(6),
32586
- startMinute: number().int().min(0).max(1439),
32587
- endMinute: number().int().min(1).max(1440)
32588
- });
32589
- /** Status of one physical volume, as the camera itself describes it. */
32590
- var OnboardStorageVolumeSchema = object({
32591
- /** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
32592
- id: string(),
32593
- /** The camera's own name for it, when it gives one (`hddName`). */
32594
- label: string().optional(),
32595
- status: _enum([
32596
- "ok",
32597
- "unformatted",
32598
- "error",
32599
- "offline",
32600
- "unknown"
32601
- ]),
32602
- /**
32603
- * Total size in MB, or **null when the camera did not say**.
32604
- *
32605
- * Never 0 for an unreadable value: a measurement that failed is not a
32606
- * measurement (D393), and a card whose size is unknown must not be
32607
- * rendered as a card of size zero.
32608
- */
32609
- capacityMb: number().nullable(),
32610
- /**
32611
- * Free space in MB, or null when unknown.
32612
- *
32613
- * **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
32614
- * 1439 both report exactly 11776 MB free — the fixed reserve a looping
32615
- * card converges on once it has wrapped. At loop steady state the
32616
- * number is identical whether the camera recorded yesterday or stopped
32617
- * a month ago.
32618
- */
32619
- freeMb: number().nullable(),
32620
- /** True when the camera reports the volume writable (`property` RW). */
32621
- writable: boolean().optional()
32622
- });
32623
- /**
32624
- * What the camera is doing with its own storage, right now.
32625
- *
32626
- * Every scalar is nullable and **null means the camera did not answer**,
32627
- * never a default. A form that seeds `0` from an unanswered read invites
32628
- * the operator to save that 0 back onto the camera.
32629
- */
32630
- var RecordingOnboardStatusSchema = object({
32631
- storage: discriminatedUnion("kind", [
32632
- object({
32633
- kind: literal("present"),
32634
- volumes: array(OnboardStorageVolumeSchema)
32635
- }),
32636
- object({
32637
- kind: literal("absent"),
32638
- reason: string()
32639
- }),
32640
- object({
32641
- kind: literal("unknown"),
32642
- reason: string()
32643
- })
32644
- ]),
32645
- tracks: array(object({
32646
- id: string(),
32647
- enabled: boolean(),
32648
- isVideo: boolean(),
32649
- /** From the camera's own track description. Null when it does not say. */
32650
- codec: string().nullable(),
32651
- resolution: string().nullable(),
32652
- /** Per-track overwrite flag, where the firmware keeps it per track. */
32653
- overwriteWhenFull: boolean().nullable()
32654
- })),
32655
- /**
32656
- * The track the write path targets — the enabled VIDEO one. Null when
32657
- * no track could be identified, which is itself a refusal reason.
32658
- */
32659
- primaryTrackId: string().nullable(),
32660
- /** Master "record to the card at all" switch. */
32661
- enabled: boolean().nullable(),
32662
- overwriteWhenFull: boolean().nullable(),
32663
- preRecordSec: number().nullable(),
32664
- postRecordSec: number().nullable(),
32665
- /** Length of one recorded file, in minutes. */
32666
- segmentMinutes: number().nullable(),
32667
- /** The primary track's weekly windows, flattened. */
32668
- windows: array(RecordWindowSchema),
32669
- /**
32670
- * How many windows the camera described that CamStack could NOT read —
32671
- * an unrecognised trigger, an unparseable clock, a weekday it does not
32672
- * name.
32673
- *
32674
- * A dropped window is work the reader threw away, and a schedule that
32675
- * silently shows fewer rows than the camera holds is how an operator
32676
- * saves back a schedule shorter than the one they were looking at
32677
- * (D391). Non-zero means the window list is INCOMPLETE and a write
32678
- * that replaces it would delete what was not shown — which is why a
32679
- * provider reporting a non-zero count also reports the schedule as not
32680
- * writable.
32681
- */
32682
- unreadableWindows: number(),
32683
- /**
32684
- * The camera is scheduled to record and has NO usable storage.
32685
- *
32686
- * A first-class fact because it is the fleet's most common silent
32687
- * defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
32688
- * to a card that is not there. Neither the schedule nor the storage
32689
- * read says anything wrong on its own; only the pair does.
32690
- */
32691
- recordingToNowhere: boolean(),
32692
- lastFetchedAt: number()
32693
- });
32694
- /** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
32695
- var RangeSchema = object({
32696
- min: number(),
32697
- max: number(),
32698
- step: number()
32699
- });
32700
- /**
32701
- * The values a camera actually takes for a numeric field, when they are a SET
32702
- * rather than a range.
32703
- *
32704
- * `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
32705
- * (I91DN) on 2026-09-22 by writing each value and reading it back:
32706
- *
32707
- * - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
32708
- * camera's "no limit" — `-1` and `4294967295` both land on it);
32709
- * - post-record: `5, 10, 30, 60, 120, 300, 600`.
32710
- *
32711
- * Neither is expressible as a step: the first has a sentinel two billion away
32712
- * from its neighbours, the second doubles and then jumps. A range that tried
32713
- * would forbid values the camera takes AND permit values it silently replaces
32714
- * with 5 — wrong in both directions at once.
32715
- *
32716
- * `sentinel` names the member that is not a duration, so a surface can render
32717
- * "no limit" instead of `2147483647` seconds.
32718
- */
32719
- var AllowedValuesSchema = object({
32720
- values: array(number()).min(1),
32721
- sentinel: object({
32722
- value: number(),
32723
- meaning: _enum(["no-limit", "disabled"])
32724
- }).optional()
32725
- });
32726
- /**
32727
- * Per-field availability on ONE camera.
32728
- *
32729
- * The field exists on every camera — this says whether this one can be
32730
- * read and whether it can be written, and `reason` says why not when
32731
- * either is false. The UI renders the control DISABLED with the reason
32732
- * rather than hiding it, so a limitation is legible instead of looking
32733
- * like a missing feature.
32734
- */
32735
- var OnboardFieldSupportSchema = object({
32736
- readable: boolean(),
32737
- writable: boolean(),
32738
- /** Required whenever `readable` or `writable` is false. */
32739
- reason: string().optional()
32740
- });
32741
- /** What this camera's schedule model can express. */
32742
- var OnboardScheduleSupportSchema = object({
32743
- support: OnboardFieldSupportSchema,
32744
- /**
32745
- * The smallest time step the camera can express, in minutes.
32746
- *
32747
- * Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
32748
- * 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
32749
- * window whose edges are not a multiple of this is REFUSED rather than
32750
- * quietly rounded — rounding is how an operator's 06:30 becomes 06:00
32751
- * and nothing says so.
32752
- */
32753
- granularityMinutes: number(),
32754
- /** Triggers this camera can record on. A window naming another is refused. */
32755
- triggers: array(RecordTriggerSchema),
32756
- /**
32757
- * False when the camera stores ONE trigger per time range, so two
32758
- * windows overlapping on the same day cannot carry different triggers.
32759
- * True on Reolink, whose mask is per-trigger and independent.
32760
- */
32761
- supportsOverlappingTriggers: boolean()
32762
- });
32763
- var RecordingOnboardOptionsSchema = object({
32764
- enabled: OnboardFieldSupportSchema,
32765
- overwriteWhenFull: OnboardFieldSupportSchema,
32766
- preRecordSec: OnboardFieldSupportSchema,
32767
- preRecordSecRange: RangeSchema.optional(),
32768
- /** Preferred over the range when the camera takes a SET, not a span. */
32769
- preRecordSecAllowed: AllowedValuesSchema.optional(),
32770
- postRecordSec: OnboardFieldSupportSchema,
32771
- postRecordSecRange: RangeSchema.optional(),
32772
- /** Preferred over the range when the camera takes a SET, not a span. */
32773
- postRecordSecAllowed: AllowedValuesSchema.optional(),
32774
- segmentMinutes: OnboardFieldSupportSchema,
32775
- segmentMinutesRange: RangeSchema.optional(),
32776
- /** Preferred over the range when the camera takes a SET, not a span. */
32777
- segmentMinutesAllowed: AllowedValuesSchema.optional(),
32778
- schedule: OnboardScheduleSupportSchema
32779
- });
32780
- /**
32781
- * A partial change. Every field optional.
32782
- *
32783
- * Unlike the other `deviceConfig` caps, a provider here does **NOT**
32784
- * silently ignore a field it cannot support — it refuses, by name,
32785
- * through {@link describeOnboardRefusal}. Silence on a recording setting
32786
- * is the failure D62 exists to prevent: the operator believes the camera
32787
- * is recording the way the form says, and it is not.
32788
- */
32789
- var RecordingOnboardPatchSchema = object({
32790
- enabled: boolean().optional(),
32791
- overwriteWhenFull: boolean().optional(),
32792
- preRecordSec: number().optional(),
32793
- postRecordSec: number().optional(),
32794
- segmentMinutes: number().optional(),
32795
- /** The complete new window set for the primary track — not a delta. */
32796
- windows: array(RecordWindowSchema).optional()
32797
- });
32798
- var recordingOnboardCapability = {
32799
- name: "recording-onboard",
32800
- scope: "device",
32801
- deviceNative: true,
32802
- mode: "singleton",
32803
- deviceTypes: [DeviceType.Camera],
32804
- deviceConfig: { ui: {
32805
- kind: "derived-form",
32806
- builderId: "recording-onboard",
32807
- tab: "recording"
32808
- } },
32809
- methods: {
32810
- getOptions: method(object({ deviceId: number() }), RecordingOnboardOptionsSchema),
32811
- setSettings: method(object({
32812
- deviceId: number(),
32813
- settings: RecordingOnboardPatchSchema
32814
- }), _void(), {
32815
- kind: "mutation",
32816
- auth: "admin"
32817
- })
32818
- },
32819
- status: {
32820
- schema: RecordingOnboardStatusSchema,
32821
- kind: "poll"
32822
- },
32823
- runtimeState: RecordingOnboardStatusSchema,
32824
- /**
32825
- * Runtime-state durability: **restored** — operator-set camera-side
32826
- * recording config; mutation-driven, and the storage half is the last
32827
- * thing the camera said about its own card.
32828
- *
32829
- * See `RuntimeStateDurability`. Enforced by
32830
- * `scripts/check-runtime-state-durability.ts`.
32831
- */
32832
- durability: "restored",
32833
- /** Clock fields: written, but excluded from the compare that decides
32834
- * whether persisting is worth a SQLite commit. */
32835
- volatileStateFields: ["lastFetchedAt"]
32836
- };
32837
- /**
32838
32671
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
32839
32672
  * for every device, regardless of provider — the kernel needs a uniform
32840
32673
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -33053,40 +32886,6 @@ var eventEmitterCapability = {
33053
32886
  */
33054
32887
  durability: "session"
33055
32888
  };
33056
- var EventItemSchema = object({
33057
- id: string(),
33058
- type: string(),
33059
- timestamp: number(),
33060
- label: string().optional(),
33061
- thumbnailUrl: string().optional(),
33062
- clipUrl: string().optional(),
33063
- metadata: record(string(), unknown()).optional()
33064
- });
33065
- var eventsCapability = {
33066
- name: "events",
33067
- scope: "device",
33068
- mode: "singleton",
33069
- deviceTypes: [DeviceType.Camera],
33070
- methods: {
33071
- getEvents: method(object({
33072
- deviceId: number(),
33073
- from: number().optional(),
33074
- to: number().optional(),
33075
- limit: number().optional()
33076
- }), array(EventItemSchema)),
33077
- getEventThumbnail: method(object({
33078
- deviceId: number(),
33079
- eventId: string()
33080
- }), object({
33081
- base64: string(),
33082
- contentType: string()
33083
- }).nullable()),
33084
- getEventClipUrl: method(object({
33085
- deviceId: number(),
33086
- eventId: string()
33087
- }), string().nullable())
33088
- }
33089
- };
33090
32889
  var IdentitySchema = object({
33091
32890
  id: string(),
33092
32891
  name: string(),
@@ -35574,179 +35373,6 @@ var motionTriggerCapability = {
35574
35373
  durability: "session"
35575
35374
  };
35576
35375
  /**
35577
- * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
35578
- * page.
35579
- *
35580
- * ## Why this is a capability and not an addon settings schema
35581
- *
35582
- * It was one, and it did not render. The addon declared the editor as a
35583
- * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
35584
- * returned that section correctly and `ConfigFormField` renders `type:'widget'`
35585
- * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
35586
- * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
35587
- * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
35588
- * not on it "falls off silently".
35589
- *
35590
- * Adding a fifth name to that list would have been the wrong fix twice over:
35591
- * that page is per-camera DETECTION tuning, and a grid's geometry belongs
35592
- * beside PTZ and motion zones on the camera itself. The device page is
35593
- * BINDING-driven (D12), so the way in is a capability bound to the device —
35594
- * and this cap carries its section the way `recording` does, by RETURNING it
35595
- * from `getDeviceSettingsContribution`.
35596
- *
35597
- * Seven other widgets are still declared the other way, through a
35598
- * `deviceConfig.ui` block the framework derives a section from. That route
35599
- * gives the addon no say in where its own panel lands and no way to decline
35600
- * for a device the panel does not suit, which is why this one does not use it.
35601
- *
35602
- * ## Why one addon may implement it
35603
- *
35604
- * It is a device-scoped NATIVE cap, registered by the grid camera device
35605
- * itself. Nothing else declares a composite camera, so nothing else has a
35606
- * layout — and the device-scoped route means the widget asks THE camera, not
35607
- * "the camera-grid addon", which is what let the old custom-action pair be
35608
- * reached only by a caller that already knew the addon id.
35609
- *
35610
- * ## The tab
35611
- *
35612
- * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
35613
- * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
35614
- * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
35615
- * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
35616
- * next to "PTZ").
35617
- */
35618
- /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
35619
- var GridNormalizedRectSchema = object({
35620
- x: number().min(0).max(1),
35621
- y: number().min(0).max(1),
35622
- width: number().gt(0).max(1),
35623
- height: number().gt(0).max(1)
35624
- });
35625
- /**
35626
- * One source camera, the part of its picture taken, and where that part lands.
35627
- *
35628
- * Both rectangles are NORMALIZED (D519): a source camera can change resolution
35629
- * — a profile switch, a firmware update, a substream that comes back different
35630
- * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
35631
- * which is the class of bug nobody files.
35632
- */
35633
- var GridLayoutCellSchema = object({
35634
- deviceId: number().int().positive(),
35635
- /** The part of the SOURCE taken, normalized against the source. */
35636
- source: GridNormalizedRectSchema,
35637
- /** Where it lands, normalized against the CANVAS. */
35638
- cell: GridNormalizedRectSchema
35639
- });
35640
- /**
35641
- * Which profiles this grid can actually compose, and why not.
35642
- *
35643
- * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
35644
- * profile is on offer only when EVERY source can serve it. The refusal NAMES
35645
- * the sources, because "this grid has no low" is not a finding — "615 has no
35646
- * low" is, and it is the one an operator can act on.
35647
- */
35648
- var GridProfileOfferSchema = object({
35649
- profile: _enum([
35650
- "high",
35651
- "mid",
35652
- "low"
35653
- ]),
35654
- offered: boolean(),
35655
- /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
35656
- missingSources: array(number().int().positive()),
35657
- /**
35658
- * The canvas this profile composes onto, `WxH`, or empty when it is not
35659
- * offered. DERIVED from the cells and the sources' own size at this profile —
35660
- * it is reported because nothing else in the system would ever say what the
35661
- * grid came out as, and because it is the number an operator would otherwise
35662
- * expect to type.
35663
- */
35664
- canvas: string(),
35665
- /**
35666
- * Whether this profile is PUBLISHED, of the ones the grid could serve.
35667
- *
35668
- * A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
35669
- * a 4K canvas built from 4K decodes — something to opt into, not something a
35670
- * viewer's adaptive should be handed by climbing to the top rung it can see.
35671
- * Default is `mid` + `low`.
35672
- */
35673
- published: boolean()
35674
- });
35675
- var GridLayoutViewSchema = object({
35676
- /** The persisted grid row this camera was declared from. */
35677
- instanceId: string(),
35678
- deviceId: number().int().nonnegative(),
35679
- name: string(),
35680
- /**
35681
- * NO canvas size. A grid's resolution is not authored: each profile derives
35682
- * its own from the cells and its sources' dimensions. The two numbers that
35683
- * used to be here were a text field that silently decided both how much the
35684
- * composite cost and how sharp it was — see `profiles[].canvas` for what it
35685
- * came out as.
35686
- */
35687
- fps: number().int(),
35688
- cells: array(GridLayoutCellSchema),
35689
- /** What the catalog will publish, and what it refuses to. Read-only. */
35690
- profiles: array(GridProfileOfferSchema)
35691
- });
35692
- var GridLayoutPatchSchema = object({
35693
- deviceId: number().int().nonnegative(),
35694
- name: string().min(1).max(160).optional(),
35695
- fps: number().int().min(1).max(60).optional(),
35696
- /** Which profiles to publish. See `GridProfileOffer.published`. */
35697
- publishedProfiles: array(_enum([
35698
- "high",
35699
- "mid",
35700
- "low"
35701
- ])).max(3).optional(),
35702
- /**
35703
- * The whole cell list at once. A per-cell patch would need an ordering the
35704
- * editor does not have, and a half-applied layout is a picture nobody asked
35705
- * for.
35706
- */
35707
- cells: array(GridLayoutCellSchema).max(16)
35708
- });
35709
- var cameraGridLayoutCapability = {
35710
- name: "camera-grid-layout",
35711
- scope: "device",
35712
- deviceNative: true,
35713
- mode: "singleton",
35714
- deviceTypes: [DeviceType.Camera],
35715
- /**
35716
- * The section is built by the ADDON and returned from
35717
- * `getDeviceSettingsContribution`, not derived by the framework from a
35718
- * `deviceConfig.ui` block.
35719
- *
35720
- * Both mechanisms render the same widget. This one hands the addon two
35721
- * things the framework-derived route cannot give it:
35722
- *
35723
- * - it chooses its own section, `tab`, `location` and `order`, the way any
35724
- * other setting does, instead of receiving them from a cap declaration;
35725
- * - it can DECLINE per device. A camera that is not a grid gets no section
35726
- * at all, rather than a widget that renders its own "not a grid" state.
35727
- *
35728
- * `recording` is the precedent (`recorder/recording-device-settings.ts`): it
35729
- * returns `null` for anything that is not a camera, so the Recording tab
35730
- * never appears there.
35731
- */
35732
- exposesDeviceSettings: true,
35733
- methods: {
35734
- /**
35735
- * The grid behind this device.
35736
- *
35737
- * `null` means ANSWERED and this camera is not a grid — not "not yet
35738
- * known". The widget renders its "this is not a grid camera" state only
35739
- * from this answer, never from an unresolved query (D315).
35740
- */
35741
- getLayout: method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }),
35742
- /** Write the geometry back. Returns the grid as it now stands, profiles included. */
35743
- saveLayout: method(GridLayoutPatchSchema, GridLayoutViewSchema, {
35744
- kind: "mutation",
35745
- auth: "admin"
35746
- })
35747
- }
35748
- };
35749
- /**
35750
35376
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
35751
35377
  * on-camera motion-detection mask is a single `grid` region (a row-major
35752
35378
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -38416,37 +38042,37 @@ var rebootCapability = {
38416
38042
  auth: "admin"
38417
38043
  }) }
38418
38044
  };
38419
- /**
38420
- * `recording` cap — footage availability + HLS playback manifests + per-device
38421
- * recording config. NOTE on events (source of truth, R5/C3): this cap carries
38422
- * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
38423
- * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
38424
- * rows) and are the ONLY event surface — the recorder has none. The in-RAM
38425
- * playback markers it used to build were deleted on 2026-08-29 because nothing
38426
- * ever read them. Event<->footage joins are by time, padded with the shared
38427
- * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
38428
- */
38429
- var RecordingStatusSchema = object({
38430
- deviceId: number(),
38431
- enabled: boolean(),
38432
- /** THE derived storage mode, from the one definition
38433
- * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
38434
- * `on-device-decision` could have reached the recorder and not the status. */
38435
- activeMode: RecordingStorageModeSchema,
38436
- nodeId: string(),
38437
- storageBytes: number()
38438
- });
38439
38045
  var RecordingRangeSchema = object({
38440
38046
  profile: string(),
38441
38047
  startMs: number(),
38442
38048
  endMs: number()
38443
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"]);
38444
38067
  var RecordingAvailabilitySchema = object({
38445
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,
38446
38072
  ranges: array(RecordingRangeSchema),
38447
38073
  /**
38448
- * Every profile this camera has footage in — not only the one `ranges`
38449
- * describes (D433).
38074
+ * Every profile this camera has footage in AT THIS SOURCE — not only the one
38075
+ * `ranges` describes (D433).
38450
38076
  *
38451
38077
  * `ranges` answers for ONE profile by design: the timeline is a single bar,
38452
38078
  * and enumerating all of them triples the directory reads for a bar that
@@ -38463,15 +38089,344 @@ var RecordingAvailabilitySchema = object({
38463
38089
  });
38464
38090
  var RecordingDaysSchema = object({
38465
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,
38466
38096
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
38467
38097
  days: array(number())
38468
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
+ });
38469
38424
  /**
38470
38425
  * One camera's row in a `getAvailabilityBatch` answer.
38471
38426
  *
38472
- * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
38473
- * batch collapses the transport, not the work — plus the one thing the singular
38474
- * method never had to say:
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):
38475
38430
  *
38476
38431
  * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
38477
38432
  * no footage in the window", which is a real claim.
@@ -38503,22 +38458,6 @@ var RecordingDaysForDeviceSchema = object({
38503
38458
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
38504
38459
  days: array(number()).readonly()
38505
38460
  });
38506
- var RecordingManifestSchema = object({
38507
- deviceId: number(),
38508
- /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
38509
- localMasterPath: string().nullable(),
38510
- /** HTTP(S) URL to the master playlist on the recording node's playback server
38511
- * (the PRIMARY candidate); null when no recording / server. Carries the
38512
- * scoped playback token in its path. */
38513
- playbackUrl: string().nullable(),
38514
- /**
38515
- * Candidate master-playlist URLs the client tries in order (LAN first, then
38516
- * remote — Tailscale/Cloudflare if the operator configured extra hosts), each
38517
- * carrying the same scoped token. `playbackUrl` is the first entry. Empty when
38518
- * there is no recording / server.
38519
- */
38520
- playbackEndpoints: array(string())
38521
- });
38522
38461
  /**
38523
38462
  * Recording storage usage for one camera — what the ARCHIVE holds for it,
38524
38463
  * across every profile and every resolvable location on this node.
@@ -38776,33 +38715,22 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
38776
38715
  * not a retry hint (retrying the same window would refuse again). */
38777
38716
  segmentEndMs: number()
38778
38717
  })]);
38779
- var recordingCapability = {
38780
- name: "recording",
38718
+ var recordingArchiveCapability = {
38719
+ name: "recording-archive",
38781
38720
  scope: "system",
38782
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). */
38783
38725
  exposesDeviceSettings: true,
38784
38726
  status: {
38785
38727
  schema: RecordingStatusSchema,
38786
38728
  kind: "command-driven"
38787
38729
  },
38788
38730
  methods: {
38789
- getAvailability: method(object({
38790
- deviceId: number(),
38791
- fromMs: number(),
38792
- toMs: number(),
38793
- /**
38794
- * Answer for THIS profile instead of the preferred one (D433). Absent
38795
- * keeps the timeline's behaviour — one bar, one profile, one set of
38796
- * reads. `profilesWithFootage` on the answer says what may be asked
38797
- * for.
38798
- */
38799
- profile: string().optional()
38800
- }), RecordingAvailabilitySchema, {
38801
- kind: "query",
38802
- auth: "protected"
38803
- }),
38804
38731
  /**
38805
- * `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.
38806
38734
  *
38807
38735
  * A multi-camera timeline re-asks availability for every camera in the grid
38808
38736
  * on every day change; fanned out that is one request per camera for N
@@ -38810,6 +38738,13 @@ var recordingCapability = {
38810
38738
  * `availabilityProfileFor` + `rangesIn`, run concurrently inside the
38811
38739
  * recorder) — only the transport collapses.
38812
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
+ *
38813
38748
  * `protected` for the same reason the singular method is: every id in
38814
38749
  * `deviceIds` is a device reference, so the F1 #3 gate refuses any camera
38815
38750
  * outside the caller's scope — one id out of scope refuses the CALL, it
@@ -38827,20 +38762,10 @@ var recordingCapability = {
38827
38762
  kind: "query",
38828
38763
  auth: "protected"
38829
38764
  }),
38830
- /** Which calendar days in [fromMs,toMs) have ≥1 recorded segment, bucketed by
38831
- * the client's local day (`tzOffsetMinutes` = minutes to add to UTC). Drives
38832
- * the theater date-picker's day dots. */
38833
- getDaysWithRecordings: method(object({
38834
- deviceId: number(),
38835
- fromMs: number(),
38836
- toMs: number(),
38837
- tzOffsetMinutes: number()
38838
- }), RecordingDaysSchema, {
38839
- kind: "query",
38840
- auth: "protected"
38841
- }),
38842
38765
  /**
38843
- * `getDaysWithRecordings` for a SET of cameras, in one round trip.
38766
+ * `recording.getDaysWithRecordings` for a SET of cameras, in one round
38767
+ * trip, at OUR source. Same placement argument as
38768
+ * {@link getAvailabilityBatch}.
38844
38769
  *
38845
38770
  * The cheapest question in the product, asked once per camera per month
38846
38771
  * change. One directory read per day per camera at the owner, unchanged;
@@ -38859,14 +38784,6 @@ var recordingCapability = {
38859
38784
  kind: "query",
38860
38785
  auth: "protected"
38861
38786
  }),
38862
- getPlaybackManifest: method(object({
38863
- deviceId: number(),
38864
- fromMs: number(),
38865
- toMs: number()
38866
- }), RecordingManifestSchema, {
38867
- kind: "query",
38868
- auth: "protected"
38869
- }),
38870
38787
  getStorageUsage: method(object({}), RecordingStorageUsageSchema, {
38871
38788
  kind: "query",
38872
38789
  auth: "admin"
@@ -38882,6 +38799,10 @@ var recordingCapability = {
38882
38799
  * value (D315, D393, D590). It carries schedules and retention, no secret,
38883
38800
  * and the per-device gate in `scope-access.ts` still applies; `setDeviceConfig`
38884
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.
38885
38806
  */
38886
38807
  getDeviceConfig: method(object({ deviceId: number() }), RecordingConfigSchema, {
38887
38808
  kind: "query",
@@ -38889,7 +38810,13 @@ var recordingCapability = {
38889
38810
  }),
38890
38811
  /** Locate footage at a wall-clock instant: the covering segment's window,
38891
38812
  * or a gap with the forward nearest covered edge. Used by a feeder running
38892
- * 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). */
38893
38820
  locateSegment: method(object({
38894
38821
  deviceId: number(),
38895
38822
  profile: string(),
@@ -39504,6 +39431,346 @@ var recordingExportCapability = {
39504
39431
  }
39505
39432
  };
39506
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
+ /**
39507
39774
  * A camera's own "record me NOW" LEVEL — a signal the device raises while
39508
39775
  * something it knows about is happening (a robot vacuum cleaning, a machine
39509
39776
  * running, a gate open) and lowers when it stops.
@@ -43587,7 +43854,6 @@ var ALL_CAPABILITY_DEFINITIONS = [
43587
43854
  embeddingEncoderCapability,
43588
43855
  enumSensorCapability,
43589
43856
  eventEmitterCapability,
43590
- eventsCapability,
43591
43857
  faceGalleryCapability,
43592
43858
  failureContributionCapability,
43593
43859
  fanControlCapability,
@@ -43648,6 +43914,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
43648
43914
  ptzAutotrackCapability,
43649
43915
  rebootCapability,
43650
43916
  recordingCapability,
43917
+ recordingArchiveCapability,
43651
43918
  recordingExportCapability,
43652
43919
  recordingOnboardCapability,
43653
43920
  recordingSignalCapability,
@@ -45882,24 +46149,6 @@ Object.freeze({
45882
46149
  addonId: null,
45883
46150
  access: "view"
45884
46151
  },
45885
- "events.getEventClipUrl": {
45886
- capName: "events",
45887
- capScope: "device",
45888
- addonId: null,
45889
- access: "view"
45890
- },
45891
- "events.getEvents": {
45892
- capName: "events",
45893
- capScope: "device",
45894
- addonId: null,
45895
- access: "view"
45896
- },
45897
- "events.getEventThumbnail": {
45898
- capName: "events",
45899
- capScope: "device",
45900
- addonId: null,
45901
- access: "view"
45902
- },
45903
46152
  "faceGallery.assignFace": {
45904
46153
  capName: "face-gallery",
45905
46154
  capScope: "system",
@@ -48774,224 +49023,236 @@ Object.freeze({
48774
49023
  addonId: null,
48775
49024
  access: "create"
48776
49025
  },
48777
- "recording.applyDeviceSettingsPatch": {
49026
+ "recording.getAvailability": {
48778
49027
  capName: "recording",
48779
- capScope: "system",
49028
+ capScope: "device",
48780
49029
  addonId: null,
48781
- access: "create"
49030
+ access: "view"
48782
49031
  },
48783
- "recording.cancelRelocateJob": {
49032
+ "recording.getDaysWithRecordings": {
48784
49033
  capName: "recording",
48785
- capScope: "system",
49034
+ capScope: "device",
48786
49035
  addonId: null,
48787
- access: "create"
49036
+ access: "view"
48788
49037
  },
48789
- "recording.cancelStorageMigrationMove": {
49038
+ "recording.getPlayback": {
48790
49039
  capName: "recording",
48791
- capScope: "system",
49040
+ capScope: "device",
48792
49041
  addonId: null,
48793
- access: "create"
49042
+ access: "view"
48794
49043
  },
48795
- "recording.deleteFootprint": {
49044
+ "recording.getPlaybackOptions": {
48796
49045
  capName: "recording",
48797
- capScope: "system",
49046
+ capScope: "device",
48798
49047
  addonId: null,
48799
- access: "delete"
49048
+ access: "view"
48800
49049
  },
48801
- "recording.getAvailability": {
49050
+ "recording.listSources": {
48802
49051
  capName: "recording",
48803
- capScope: "system",
49052
+ capScope: "device",
48804
49053
  addonId: null,
48805
49054
  access: "view"
48806
49055
  },
48807
- "recording.getAvailabilityBatch": {
48808
- capName: "recording",
49056
+ "recordingArchive.applyDeviceSettingsPatch": {
49057
+ capName: "recording-archive",
48809
49058
  capScope: "system",
48810
49059
  addonId: null,
48811
- access: "view"
49060
+ access: "create"
48812
49061
  },
48813
- "recording.getDaysWithRecordings": {
48814
- capName: "recording",
49062
+ "recordingArchive.cancelRelocateJob": {
49063
+ capName: "recording-archive",
48815
49064
  capScope: "system",
48816
49065
  addonId: null,
48817
- access: "view"
49066
+ access: "create"
48818
49067
  },
48819
- "recording.getDaysWithRecordingsBatch": {
48820
- 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",
48821
49082
  capScope: "system",
48822
49083
  addonId: null,
48823
49084
  access: "view"
48824
49085
  },
48825
- "recording.getDeviceConfig": {
48826
- capName: "recording",
49086
+ "recordingArchive.getDaysWithRecordingsBatch": {
49087
+ capName: "recording-archive",
48827
49088
  capScope: "system",
48828
49089
  addonId: null,
48829
49090
  access: "view"
48830
49091
  },
48831
- "recording.getDeviceLiveContribution": {
48832
- capName: "recording",
49092
+ "recordingArchive.getDeviceConfig": {
49093
+ capName: "recording-archive",
48833
49094
  capScope: "system",
48834
49095
  addonId: null,
48835
49096
  access: "view"
48836
49097
  },
48837
- "recording.getDeviceSettingsContribution": {
48838
- capName: "recording",
49098
+ "recordingArchive.getDeviceLiveContribution": {
49099
+ capName: "recording-archive",
48839
49100
  capScope: "system",
48840
49101
  addonId: null,
48841
49102
  access: "view"
48842
49103
  },
48843
- "recording.getPlacement": {
48844
- capName: "recording",
49104
+ "recordingArchive.getDeviceSettingsContribution": {
49105
+ capName: "recording-archive",
48845
49106
  capScope: "system",
48846
49107
  addonId: null,
48847
49108
  access: "view"
48848
49109
  },
48849
- "recording.getPlaybackManifest": {
48850
- capName: "recording",
49110
+ "recordingArchive.getPlacement": {
49111
+ capName: "recording-archive",
48851
49112
  capScope: "system",
48852
49113
  addonId: null,
48853
49114
  access: "view"
48854
49115
  },
48855
- "recording.getRelocateResidue": {
48856
- capName: "recording",
49116
+ "recordingArchive.getRelocateResidue": {
49117
+ capName: "recording-archive",
48857
49118
  capScope: "system",
48858
49119
  addonId: null,
48859
49120
  access: "view"
48860
49121
  },
48861
- "recording.getStatus": {
48862
- capName: "recording",
49122
+ "recordingArchive.getStatus": {
49123
+ capName: "recording-archive",
48863
49124
  capScope: "system",
48864
49125
  addonId: null,
48865
49126
  access: "view"
48866
49127
  },
48867
- "recording.getStorageMigrationMoveStatus": {
48868
- capName: "recording",
49128
+ "recordingArchive.getStorageMigrationMoveStatus": {
49129
+ capName: "recording-archive",
48869
49130
  capScope: "system",
48870
49131
  addonId: null,
48871
49132
  access: "view"
48872
49133
  },
48873
- "recording.getStorageUsage": {
48874
- capName: "recording",
49134
+ "recordingArchive.getStorageUsage": {
49135
+ capName: "recording-archive",
48875
49136
  capScope: "system",
48876
49137
  addonId: null,
48877
49138
  access: "view"
48878
49139
  },
48879
- "recording.listOpsLog": {
48880
- capName: "recording",
49140
+ "recordingArchive.listOpsLog": {
49141
+ capName: "recording-archive",
48881
49142
  capScope: "system",
48882
49143
  addonId: null,
48883
49144
  access: "view"
48884
49145
  },
48885
- "recording.listRelocateJobs": {
48886
- capName: "recording",
49146
+ "recordingArchive.listRelocateJobs": {
49147
+ capName: "recording-archive",
48887
49148
  capScope: "system",
48888
49149
  addonId: null,
48889
49150
  access: "view"
48890
49151
  },
48891
- "recording.locateSegment": {
48892
- capName: "recording",
49152
+ "recordingArchive.locateSegment": {
49153
+ capName: "recording-archive",
48893
49154
  capScope: "system",
48894
49155
  addonId: null,
48895
49156
  access: "view"
48896
49157
  },
48897
- "recording.pauseForStorageMigration": {
48898
- capName: "recording",
49158
+ "recordingArchive.pauseForStorageMigration": {
49159
+ capName: "recording-archive",
48899
49160
  capScope: "system",
48900
49161
  addonId: null,
48901
49162
  access: "create"
48902
49163
  },
48903
- "recording.planStorageRebalance": {
48904
- capName: "recording",
49164
+ "recordingArchive.planStorageRebalance": {
49165
+ capName: "recording-archive",
48905
49166
  capScope: "system",
48906
49167
  addonId: null,
48907
49168
  access: "view"
48908
49169
  },
48909
- "recording.pruneFootage": {
48910
- capName: "recording",
49170
+ "recordingArchive.pruneFootage": {
49171
+ capName: "recording-archive",
48911
49172
  capScope: "system",
48912
49173
  addonId: null,
48913
49174
  access: "create"
48914
49175
  },
48915
- "recording.readGopBytes": {
48916
- capName: "recording",
49176
+ "recordingArchive.readGopBytes": {
49177
+ capName: "recording-archive",
48917
49178
  capScope: "system",
48918
49179
  addonId: null,
48919
49180
  access: "view"
48920
49181
  },
48921
- "recording.readSegmentBytes": {
48922
- capName: "recording",
49182
+ "recordingArchive.readSegmentBytes": {
49183
+ capName: "recording-archive",
48923
49184
  capScope: "system",
48924
49185
  addonId: null,
48925
49186
  access: "view"
48926
49187
  },
48927
- "recording.readWindowBytes": {
48928
- capName: "recording",
49188
+ "recordingArchive.readWindowBytes": {
49189
+ capName: "recording-archive",
48929
49190
  capScope: "system",
48930
49191
  addonId: null,
48931
49192
  access: "view"
48932
49193
  },
48933
- "recording.reconcileLedgerAgainstDisk": {
48934
- capName: "recording",
49194
+ "recordingArchive.reconcileLedgerAgainstDisk": {
49195
+ capName: "recording-archive",
48935
49196
  capScope: "system",
48936
49197
  addonId: null,
48937
49198
  access: "create"
48938
49199
  },
48939
- "recording.refreshStorageLocationsForMigration": {
48940
- capName: "recording",
49200
+ "recordingArchive.refreshStorageLocationsForMigration": {
49201
+ capName: "recording-archive",
48941
49202
  capScope: "system",
48942
49203
  addonId: null,
48943
49204
  access: "create"
48944
49205
  },
48945
- "recording.relocateFootage": {
48946
- capName: "recording",
49206
+ "recordingArchive.relocateFootage": {
49207
+ capName: "recording-archive",
48947
49208
  capScope: "system",
48948
49209
  addonId: null,
48949
49210
  access: "create"
48950
49211
  },
48951
- "recording.renderClip": {
48952
- capName: "recording",
49212
+ "recordingArchive.renderClip": {
49213
+ capName: "recording-archive",
48953
49214
  capScope: "system",
48954
49215
  addonId: null,
48955
49216
  access: "create"
48956
49217
  },
48957
- "recording.renderGif": {
48958
- capName: "recording",
49218
+ "recordingArchive.renderGif": {
49219
+ capName: "recording-archive",
48959
49220
  capScope: "system",
48960
49221
  addonId: null,
48961
49222
  access: "create"
48962
49223
  },
48963
- "recording.rescanStorage": {
48964
- capName: "recording",
49224
+ "recordingArchive.rescanStorage": {
49225
+ capName: "recording-archive",
48965
49226
  capScope: "system",
48966
49227
  addonId: null,
48967
49228
  access: "create"
48968
49229
  },
48969
- "recording.resumeForStorageMigration": {
48970
- capName: "recording",
49230
+ "recordingArchive.resumeForStorageMigration": {
49231
+ capName: "recording-archive",
48971
49232
  capScope: "system",
48972
49233
  addonId: null,
48973
49234
  access: "create"
48974
49235
  },
48975
- "recording.setDeviceConfig": {
48976
- capName: "recording",
49236
+ "recordingArchive.setDeviceConfig": {
49237
+ capName: "recording-archive",
48977
49238
  capScope: "system",
48978
49239
  addonId: null,
48979
49240
  access: "create"
48980
49241
  },
48981
- "recording.setDevicePlacement": {
48982
- capName: "recording",
49242
+ "recordingArchive.setDevicePlacement": {
49243
+ capName: "recording-archive",
48983
49244
  capScope: "system",
48984
49245
  addonId: null,
48985
49246
  access: "create"
48986
49247
  },
48987
- "recording.startStorageMigrationMove": {
48988
- capName: "recording",
49248
+ "recordingArchive.startStorageMigrationMove": {
49249
+ capName: "recording-archive",
48989
49250
  capScope: "system",
48990
49251
  addonId: null,
48991
49252
  access: "create"
48992
49253
  },
48993
- "recording.startStorageRebalance": {
48994
- capName: "recording",
49254
+ "recordingArchive.startStorageRebalance": {
49255
+ capName: "recording-archive",
48995
49256
  capScope: "system",
48996
49257
  addonId: null,
48997
49258
  access: "create"
@@ -51296,21 +51557,6 @@ Object.freeze({
51296
51557
  form: "single",
51297
51558
  optional: false
51298
51559
  }],
51299
- "events.getEventClipUrl": [{
51300
- name: "deviceId",
51301
- form: "single",
51302
- optional: false
51303
- }],
51304
- "events.getEvents": [{
51305
- name: "deviceId",
51306
- form: "single",
51307
- optional: false
51308
- }],
51309
- "events.getEventThumbnail": [{
51310
- name: "deviceId",
51311
- form: "single",
51312
- optional: false
51313
- }],
51314
51560
  "faceGallery.getFaceByTrack": [{
51315
51561
  name: "deviceId",
51316
51562
  form: "single",
@@ -52229,107 +52475,117 @@ Object.freeze({
52229
52475
  form: "single",
52230
52476
  optional: false
52231
52477
  }],
52232
- "recording.deleteFootprint": [{
52478
+ "recording.getAvailability": [{
52233
52479
  name: "deviceId",
52234
52480
  form: "single",
52235
52481
  optional: false
52236
52482
  }],
52237
- "recording.getAvailability": [{
52483
+ "recording.getDaysWithRecordings": [{
52238
52484
  name: "deviceId",
52239
52485
  form: "single",
52240
52486
  optional: false
52241
52487
  }],
52242
- "recording.getAvailabilityBatch": [{
52243
- name: "deviceIds",
52244
- form: "array",
52488
+ "recording.getPlayback": [{
52489
+ name: "deviceId",
52490
+ form: "single",
52245
52491
  optional: false
52246
52492
  }],
52247
- "recording.getDaysWithRecordings": [{
52493
+ "recording.getPlaybackOptions": [{
52248
52494
  name: "deviceId",
52249
52495
  form: "single",
52250
52496
  optional: false
52251
52497
  }],
52252
- "recording.getDaysWithRecordingsBatch": [{
52253
- name: "deviceIds",
52254
- form: "array",
52498
+ "recording.listSources": [{
52499
+ name: "deviceId",
52500
+ form: "single",
52255
52501
  optional: false
52256
52502
  }],
52257
- "recording.getDeviceConfig": [{
52503
+ "recordingArchive.deleteFootprint": [{
52258
52504
  name: "deviceId",
52259
52505
  form: "single",
52260
52506
  optional: false
52261
52507
  }],
52262
- "recording.getPlaybackManifest": [{
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": [{
52263
52519
  name: "deviceId",
52264
52520
  form: "single",
52265
52521
  optional: false
52266
52522
  }],
52267
- "recording.listOpsLog": [{
52523
+ "recordingArchive.listOpsLog": [{
52268
52524
  name: "deviceId",
52269
52525
  form: "single",
52270
52526
  optional: true
52271
52527
  }],
52272
- "recording.locateSegment": [{
52528
+ "recordingArchive.locateSegment": [{
52273
52529
  name: "deviceId",
52274
52530
  form: "single",
52275
52531
  optional: false
52276
52532
  }],
52277
- "recording.pruneFootage": [{
52533
+ "recordingArchive.pruneFootage": [{
52278
52534
  name: "deviceId",
52279
52535
  form: "single",
52280
52536
  optional: false
52281
52537
  }],
52282
- "recording.readGopBytes": [{
52538
+ "recordingArchive.readGopBytes": [{
52283
52539
  name: "deviceId",
52284
52540
  form: "single",
52285
52541
  optional: false
52286
52542
  }],
52287
- "recording.readSegmentBytes": [{
52543
+ "recordingArchive.readSegmentBytes": [{
52288
52544
  name: "deviceId",
52289
52545
  form: "single",
52290
52546
  optional: false
52291
52547
  }],
52292
- "recording.readWindowBytes": [{
52548
+ "recordingArchive.readWindowBytes": [{
52293
52549
  name: "deviceId",
52294
52550
  form: "single",
52295
52551
  optional: false
52296
52552
  }],
52297
- "recording.reconcileLedgerAgainstDisk": [{
52553
+ "recordingArchive.reconcileLedgerAgainstDisk": [{
52298
52554
  name: "deviceId",
52299
52555
  form: "single",
52300
52556
  optional: true
52301
52557
  }],
52302
- "recording.relocateFootage": [{
52558
+ "recordingArchive.relocateFootage": [{
52303
52559
  name: "deviceId",
52304
52560
  form: "single",
52305
52561
  optional: true
52306
52562
  }],
52307
- "recording.renderClip": [{
52563
+ "recordingArchive.renderClip": [{
52308
52564
  name: "deviceId",
52309
52565
  form: "single",
52310
52566
  optional: false
52311
52567
  }],
52312
- "recording.renderGif": [{
52568
+ "recordingArchive.renderGif": [{
52313
52569
  name: "deviceId",
52314
52570
  form: "single",
52315
52571
  optional: false
52316
52572
  }],
52317
- "recording.rescanStorage": [{
52573
+ "recordingArchive.rescanStorage": [{
52318
52574
  name: "deviceId",
52319
52575
  form: "single",
52320
52576
  optional: false
52321
52577
  }],
52322
- "recording.setDeviceConfig": [{
52578
+ "recordingArchive.setDeviceConfig": [{
52323
52579
  name: "deviceId",
52324
52580
  form: "single",
52325
52581
  optional: false
52326
52582
  }],
52327
- "recording.setDevicePlacement": [{
52583
+ "recordingArchive.setDevicePlacement": [{
52328
52584
  name: "deviceId",
52329
52585
  form: "single",
52330
52586
  optional: false
52331
52587
  }],
52332
- "recording.startStorageMigrationMove": [{
52588
+ "recordingArchive.startStorageMigrationMove": [{
52333
52589
  name: "deviceId",
52334
52590
  form: "single",
52335
52591
  optional: true