@camstack/addon-admin-ui 1.2.257 → 1.2.259

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 (97) hide show
  1. package/dist/assets/{AddonCollectionPage-oFwDegrV.js → AddonCollectionPage-jmmQbNlm.js} +1 -1
  2. package/dist/assets/Addons-BsSGWb_z.js +1 -0
  3. package/dist/assets/{AdminTabs-D1Bvbmbt.js → AdminTabs-DPQzm8ja.js} +1 -1
  4. package/dist/assets/AiProfiles-W9aPBPZe.js +3 -0
  5. package/dist/assets/{BrokerForm-D5lXIlIS.js → BrokerForm-CVQ-rA2N.js} +1 -1
  6. package/dist/assets/Build-DKhq3ZPS.js +32 -0
  7. package/dist/assets/{Capabilities-WQ8O3ayt.js → Capabilities-66Fkb86a.js} +1 -1
  8. package/dist/assets/{CapabilityBadges-DTpEqzLy.js → CapabilityBadges-BxsPe5Zv.js} +1 -1
  9. package/dist/assets/Cluster-D_iZDJn0.js +11 -0
  10. package/dist/assets/{Data-Cravakzr.js → Data-DWc_uUjG.js} +1 -1
  11. package/dist/assets/DetectionIntelligence-7vWzLsQf.js +1 -0
  12. package/dist/assets/{DeviceAggregateSection-DCkH7ABu.js → DeviceAggregateSection-CKoUTomJ.js} +1 -1
  13. package/dist/assets/DeviceDetail-D8Wt4euP.js +2 -0
  14. package/dist/assets/{Devices-DnAgwibm.js → Devices-DPQUPRve.js} +1 -1
  15. package/dist/assets/{EmbedPlayerPage-jufauCof.js → EmbedPlayerPage-CwCK4H7y.js} +1 -1
  16. package/dist/assets/Events-Ckv4KkpG.js +1 -0
  17. package/dist/assets/{FormBuilder-BZ3XPRt5.js → FormBuilder-OQj-b3vo.js} +1 -1
  18. package/dist/assets/Identity-DimZNUxf.js +1 -0
  19. package/dist/assets/IntegrationDetail-C-DRNloj.js +1 -0
  20. package/dist/assets/Integrations-B9OOxvsb.js +1 -0
  21. package/dist/assets/Integrations-BqzMaD-1.js +1 -0
  22. package/dist/assets/Locations-B4yncwki.js +2 -0
  23. package/dist/assets/{Logs-BB0gdoZm.js → Logs-DWmSJIzl.js} +1 -1
  24. package/dist/assets/{MotionZonesSettings-DkAN9zbM.js → MotionZonesSettings-BJ4XzX38.js} +1 -1
  25. package/dist/assets/{MyAccess-CJ3Nkgba.js → MyAccess-BaioSuA9.js} +1 -1
  26. package/dist/assets/{Network-CO2gTkFD.js → Network-sYvTsGXU.js} +1 -1
  27. package/dist/assets/{NodeAddonsSettingsPanel-ChLAdtp6.js → NodeAddonsSettingsPanel-CNk8xstc.js} +1 -1
  28. package/dist/assets/{NodeInferenceDevices-MxS5FyAl.js → NodeInferenceDevices-DvkNwX7-.js} +1 -1
  29. package/dist/assets/Notifications-DNjGTYu9.js +1 -0
  30. package/dist/assets/Pipeline-KySyNzp2.js +1 -0
  31. package/dist/assets/Plates-DAsfL6eC.js +1 -0
  32. package/dist/assets/{PrivacyMaskSettings-48XR8Nmz.js → PrivacyMaskSettings-P1egG4Gq.js} +1 -1
  33. package/dist/assets/{ProviderIcon-BJpqilAh.js → ProviderIcon-vyz-QK1L.js} +1 -1
  34. package/dist/assets/Recordings-CNgGUlGk.js +1 -0
  35. package/dist/assets/{ScanNetworkModal-B6JL8qZ8.js → ScanNetworkModal-BvSevznk.js} +1 -1
  36. package/dist/assets/{SceneMonitorEditor-WhFAhYsj.js → SceneMonitorEditor-MEJ8MP4m.js} +1 -1
  37. package/dist/assets/{Scenes-CpDprMlF.js → Scenes-D8UmCN0j.js} +1 -1
  38. package/dist/assets/{Settings-DatSXa9J.js → Settings-YaOCkIql.js} +1 -1
  39. package/dist/assets/{Showroom-BEtAbaTy.js → Showroom-Bg4x9Lzt.js} +1 -1
  40. package/dist/assets/{StorageLocationsPanel-BwHsY2Hk.js → StorageLocationsPanel-BE5hB2Aa.js} +1 -1
  41. package/dist/assets/{Terminal-885gd2M1.js → Terminal-CHm5FlVJ.js} +5 -5
  42. package/dist/assets/{Viewer-CHd-qole.js → Viewer-DLAPFaHz.js} +1 -1
  43. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DCnMkoi4.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BiTKILzZ.js} +1 -1
  44. package/dist/assets/{archive-BgrDkf1c.js → archive-DydHm7oC.js} +1 -1
  45. package/dist/assets/{authed-media-D0IXK0mL.js → authed-media-Cpcnxxci.js} +1 -1
  46. package/dist/assets/{boxes-xaYvWYLM.js → boxes-Tzjsnk2Q.js} +1 -1
  47. package/dist/assets/circle-slash-P5b6wYJL.js +1 -0
  48. package/dist/assets/{debounced-invalidate-D6Lu_4cv.js → debounced-invalidate-BShXPTRg.js} +1 -1
  49. package/dist/assets/dist--FGB4WO5.js +349 -0
  50. package/dist/assets/{dist-B-YZDmNh.js → dist-4gnU2Lg3.js} +1 -1
  51. package/dist/assets/{face-bbox-CrKmpz54.js → face-bbox-B7yuZrNl.js} +1 -1
  52. package/dist/assets/{hard-drive-download-CbekwsV-.js → hard-drive-download-PRhNyH2U.js} +1 -1
  53. package/dist/assets/{hostInit-BxCv3w7Y.js → hostInit-C4xQoYJ9.js} +1 -1
  54. package/dist/assets/index-BtoTwa3A.js +4 -0
  55. package/dist/assets/{layers-UWbo_iqn.js → layers-l0ePwwTT.js} +1 -1
  56. package/dist/assets/{location-owned-usage-BRw8gL3p.js → location-owned-usage-DLAg7bui.js} +1 -1
  57. package/dist/assets/{mf-entry-bootstrap-0-e9392efe.js → mf-entry-bootstrap-0-f9201282.js} +2 -2
  58. package/dist/assets/{player-overlays-BJZIKp3S.js → player-overlays-BAhe5OxX.js} +1 -1
  59. package/dist/assets/remoteEntry-DTRY01rz.js +1 -0
  60. package/dist/assets/{send-DYcnfYqt.js → send-CR2WbB-q.js} +1 -1
  61. package/dist/assets/{settings-2-C1WjTvfn.js → settings-2-DamfG3Rr.js} +1 -1
  62. package/dist/assets/{square-check-big-ee6ZRD-4.js → square-check-big-CyRsLf9w.js} +1 -1
  63. package/dist/assets/src-CUaqZLmc.js +349 -0
  64. package/dist/assets/src-DrOD3ogD.js +67 -0
  65. package/dist/assets/{use-scenes-feed-CGLjjS97.js → use-scenes-feed-CzKPS2XP.js} +1 -1
  66. package/dist/assets/{use-stationary-objects-DVIM6sGa.js → use-stationary-objects-CldTVGD6.js} +1 -1
  67. package/dist/assets/useEventInvalidation-Clg20sS7.js +1 -0
  68. package/dist/assets/{useNodeUrlSelection-Bnp1BAKl.js → useNodeUrlSelection-BrPudXce.js} +1 -1
  69. package/dist/assets/user-round-DONmU94i.js +1 -0
  70. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DoR41wjb.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-erVC1v4l.js} +2 -2
  71. package/dist/index.html +5 -5
  72. package/dist/server/addon.js +1025 -835
  73. package/package.json +1 -1
  74. package/dist/assets/Addons-C5RuZCTl.js +0 -1
  75. package/dist/assets/AiProfiles-Bs0UamvP.js +0 -3
  76. package/dist/assets/Build-NlKRRfZe.js +0 -32
  77. package/dist/assets/Cluster-D-fOZGVu.js +0 -11
  78. package/dist/assets/DetectionIntelligence-C4_a3Emz.js +0 -1
  79. package/dist/assets/DeviceDetail-CGrGfmz3.js +0 -2
  80. package/dist/assets/Events-BdP7tahi.js +0 -1
  81. package/dist/assets/Identity-ChWjpINB.js +0 -1
  82. package/dist/assets/IntegrationDetail-u5bVPzvc.js +0 -1
  83. package/dist/assets/Integrations-BNUITXw4.js +0 -1
  84. package/dist/assets/Integrations-D67MVEIU.js +0 -1
  85. package/dist/assets/Locations-Ci1hQUX0.js +0 -1
  86. package/dist/assets/Notifications-BV3IU7hE.js +0 -1
  87. package/dist/assets/Pipeline-BunYYdKq.js +0 -1
  88. package/dist/assets/Plates-Cf9AX06s.js +0 -1
  89. package/dist/assets/Recordings-CqJpzh7y.js +0 -1
  90. package/dist/assets/circle-slash--V8wErxL.js +0 -1
  91. package/dist/assets/dist-B9J0Zexg.js +0 -349
  92. package/dist/assets/index-Lpc8mq_Q.js +0 -4
  93. package/dist/assets/remoteEntry-BHLL9GnP.js +0 -1
  94. package/dist/assets/src-CI4oP9wQ.js +0 -67
  95. package/dist/assets/src-DG85Ct2l.js +0 -349
  96. package/dist/assets/useEventInvalidation-DTdu-EUQ.js +0 -1
  97. package/dist/assets/user-round-Dx_2w7o7.js +0 -1
@@ -5361,7 +5361,7 @@ var ZodIssueCode = {
5361
5361
  var ZodFirstPartyTypeKind;
5362
5362
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5363
5363
  //#endregion
5364
- //#region ../types/dist/sleep-COWaSCAi.mjs
5364
+ //#region ../types/dist/sleep-PEo0-Fz9.mjs
5365
5365
  /**
5366
5366
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5367
5367
  * window to float samples (D455).
@@ -6497,6 +6497,24 @@ function normalizeAddonInitResult(result) {
6497
6497
  if (Array.isArray(result)) return { providers: result };
6498
6498
  return result;
6499
6499
  }
6500
+ /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
6501
+ var PeerBytesTicketSchema = object({
6502
+ /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
6503
+ url: string().min(1),
6504
+ /**
6505
+ * The HOST node this URL means something on — the hub or a named agent,
6506
+ * never a runner. {@link AddonPeerBytes.open} compares it to its own and
6507
+ * refuses `cross-node` by name when they differ, without dialling.
6508
+ */
6509
+ hostNodeId: string().min(1),
6510
+ expiresAtMs: number().int().nonnegative(),
6511
+ /**
6512
+ * What the producer DECLARED the body to be, when it knows — `null` when it
6513
+ * does not. Never `0` for unknown (D393): a consumer sizing a bound off this
6514
+ * must be able to tell "the producer did not say" from "the body is empty".
6515
+ */
6516
+ declaredBytes: number().int().nonnegative().nullable()
6517
+ });
6500
6518
  /** Shared Zod schemas used across streaming capabilities. */
6501
6519
  var CamProfileSchema = _enum([
6502
6520
  "high",
@@ -7533,24 +7551,6 @@ object({
7533
7551
  unreachable: number()
7534
7552
  })
7535
7553
  });
7536
- /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7537
- var PeerBytesTicketSchema = object({
7538
- /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
7539
- url: string().min(1),
7540
- /**
7541
- * The HOST node this URL means something on — the hub or a named agent,
7542
- * never a runner. {@link AddonPeerBytes.open} compares it to its own and
7543
- * refuses `cross-node` by name when they differ, without dialling.
7544
- */
7545
- hostNodeId: string().min(1),
7546
- expiresAtMs: number().int().nonnegative(),
7547
- /**
7548
- * What the producer DECLARED the body to be, when it knows — `null` when it
7549
- * does not. Never `0` for unknown (D393): a consumer sizing a bound off this
7550
- * must be able to tell "the producer did not say" from "the body is empty".
7551
- */
7552
- declaredBytes: number().int().nonnegative().nullable()
7553
- });
7554
7554
  /**
7555
7555
  * Adoption job — the background form of `device-adoption.adopt`.
7556
7556
  *
@@ -7662,7 +7662,7 @@ var AdoptionJobSchema = object({
7662
7662
  * component's original options — detection to the detection-pipeline wrapper
7663
7663
  * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
7664
7664
  * (which was always first-class; the switch was a veneer over
7665
- * `recording.setDeviceConfig`), notifications to a notification-center
7665
+ * `recordingArchive.setDeviceConfig`), notifications to a notification-center
7666
7666
  * per-device setting, the two camera planes to their own components.
7667
7667
  *
7668
7668
  * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
@@ -7688,7 +7688,7 @@ var AdoptionJobSchema = object({
7688
7688
  * | `stream-broker` | `deviceManager.setDisabled` | `StreamBrokerManager.reconcileAllCatalogs` releases the brokers; `ensureBroker` refuses re-creation |
7689
7689
  * | `object-detection` | `deviceManager.setWrapperActive('detection-pipeline')` | `PipelineSettingsStore.resolvePipelineForDevice` returns `{ steps: [], audio: null }` |
7690
7690
  * | `audio-analysis` | `deviceManager.setWrapperActive('audio-analysis')` | `AudioSubscriptionController.subscribeAudioStream` returns `null` before opening the stream |
7691
- * | `recording` | `recording.setDeviceConfig` → `RecordingConfig.enabled` | `band-decision.shouldRecord` returns false; the controller detaches the device |
7691
+ * | `recording` | `recordingArchive.setDeviceConfig` → `RecordingConfig.enabled` | `band-decision.shouldRecord` returns false; the controller detaches the device |
7692
7692
  * | `notifications` | `notificationRules.setDeviceMuted` | `NotificationCenter.evaluateAndEnqueue` returns before any rule is evaluated |
7693
7693
  * | `privacy-mask` | `privacyMask.setMask({ enabled })` → the CAMERA | the camera blanks the masked regions itself; every stream and recording carries the black boxes |
7694
7694
  * | `device-audio` | `privacyMask.setAudioEnabled` → the CAMERA | the camera stops encoding an audio track at all; every consumer sees silent video |
@@ -11586,58 +11586,6 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
11586
11586
  auth: "admin"
11587
11587
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
11588
11588
  DeviceType.Camera;
11589
- /**
11590
- * The signals a device can emit to WAKE its own stream.
11591
- *
11592
- * A camera whose stream is built on demand sleeps until something asks for it,
11593
- * and "something" cannot be a consumer that is merely attached — a Frigate-style
11594
- * puller holds a session open for ever, and treating that as demand would keep
11595
- * a battery camera awake for ever, which is the whole thing the battery is for
11596
- * (D173). So the wake has to come from the CAMERA: an event it noticed by
11597
- * itself, with no stream running.
11598
- *
11599
- * ## The vocabulary is the PROVIDER'S, not ours
11600
- *
11601
- * Like `consumables`, this cap declares no vocabulary of its own. A provider
11602
- * names each signal with a `code` it chooses and a `label` an operator reads.
11603
- * Reolink offers motion and camera-native detection; another provider may offer
11604
- * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
11605
- * yet. A fixed enum here would mean every new signal is a framework release.
11606
- *
11607
- * It is deliberately NOT derived from the caps a device already binds. Whether
11608
- * a camera CAN push firmware motion is expressed by `motionSources` containing
11609
- * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
11610
- * binding — but both answer "what drives the detection pipeline", which is a
11611
- * different question from "what may wake a sleeping stream". A camera can do
11612
- * the first and not be trusted with the second, and the operator picks per
11613
- * camera. Two questions, two authorities.
11614
- *
11615
- * ## Availability is not permission
11616
- *
11617
- * `listSignals` says what the device CAN emit. Whether a given signal actually
11618
- * wakes the stream is the operator's per-camera choice, held by the broker
11619
- * alongside the cooldown — see the stream-broker cap's wake settings. A
11620
- * provider declaring a signal is not a provider enabling it.
11621
- */
11622
- /** One signal a device can emit. */
11623
- var StreamSignalSchema = object({
11624
- /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
11625
- code: string().min(1),
11626
- /** What an operator reads in the picker. The provider's own wording. */
11627
- label: string().min(1),
11628
- /**
11629
- * Whether the provider recommends this signal ON when a camera is first set
11630
- * up. A provider knows which of its signals are cheap and reliable; an
11631
- * operator should not have to discover that by trial. Reolink recommends
11632
- * both of its own.
11633
- */
11634
- recommended: boolean()
11635
- });
11636
- object({
11637
- signals: array(StreamSignalSchema),
11638
- lastFetchedAt: number()
11639
- });
11640
- Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
11641
11589
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
11642
11590
  var StreamFormatSchema = _enum([
11643
11591
  "webrtc",
@@ -13001,6 +12949,97 @@ method(object({ codec: string() }), boolean()), method(_void(), object({
13001
12949
  });
13002
12950
  DeviceType.Camera;
13003
12951
  /**
12952
+ * device-admin-link — "this device has a management page of its own, and here
12953
+ * is its address".
12954
+ *
12955
+ * ## Why this is not a `deviceConfig` cap
12956
+ *
12957
+ * There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
12958
+ * can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
12959
+ * patch back through a setter; it costs a `builderId` reducer in
12960
+ * `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
12961
+ * renders a form section. This cap answers ONE question with ONE read and
12962
+ * renders a button. Nothing about it is a form, so it carries no `deviceConfig`
12963
+ * block, no `settings`, no `runtimeState` and no reducer — exactly like
12964
+ * `reboot`, the other pure-RPC device-native cap.
12965
+ *
12966
+ * ## Absent, and the difference between "no page" and "we cannot say"
12967
+ *
12968
+ * The two are answered at DIFFERENT layers, on purpose:
12969
+ *
12970
+ * - **"We cannot say"** → the provider never registers the cap for that
12971
+ * device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
12972
+ * fan are reached only through a vendor cloud; there is no address to hand
12973
+ * out and no page to open. A Tuya plug, a Wyze camera and a Gree air
12974
+ * conditioner DO have a LAN IP, and still have no HTTP management page
12975
+ * behind it. None of them register, so `deviceManager.getBindings` never
12976
+ * lists the cap and no surface asks.
12977
+ * - **"This device has no page, and I know that"** → the provider registers
12978
+ * and `getAdminLink` returns `null`. This is the answer for a device whose
12979
+ * sibling DOES have a page: a Reolink battery camera reached over UDP by
12980
+ * `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
12981
+ * transport, a Home Assistant broker authenticated by supervisor token
12982
+ * (which carries no `baseUrl` at all).
12983
+ *
12984
+ * Both draw NOTHING. A button that opens a browser error is worse than no
12985
+ * button, and D62 is the same rule from the other side: an off switch is
12986
+ * reported off, never made to look broken. There is no third state where the
12987
+ * UI renders a disabled button "because the device might have a page".
12988
+ *
12989
+ * ## The URL never carries credentials
12990
+ *
12991
+ * Not in userinfo, not in a query string. Every provider builds through
12992
+ * `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
12993
+ * scheme and path as separate arguments — there is no parameter a secret could
12994
+ * arrive in — and re-checks its own output for the `scheme://user:pass@` shape
12995
+ * that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
12996
+ * output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
12997
+ * keeps providers from hand-rolling one anyway.
12998
+ *
12999
+ * This matters here more than anywhere else in the repo, because every provider
13000
+ * that knows a device's host knows its PASSWORD too: `{ host, port, username,
13001
+ * password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
13002
+ * and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
13003
+ * camera's own page will ask for its own login. That is correct, and pre-
13004
+ * filling it is the operator's business, not ours.
13005
+ *
13006
+ * ## It is a LAN fact
13007
+ *
13008
+ * The URL addresses the device where the NODE can see it. It is not proxied,
13009
+ * not made reachable from outside, and not sent anywhere. A surface renders it
13010
+ * as a link the operator's own browser follows, on the operator's own network,
13011
+ * or renders nothing.
13012
+ */
13013
+ /**
13014
+ * Whose page is it. The distinction is for the OPERATOR, who needs to know
13015
+ * before clicking whether he is about to land on a camera's own web server or
13016
+ * inside Home Assistant.
13017
+ */
13018
+ var AdminLinkTargetEnum = _enum(["device", "integration"]);
13019
+ var DeviceAdminLinkSchema = object({
13020
+ /**
13021
+ * Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
13022
+ * free of userinfo and of any credential-shaped query key.
13023
+ */
13024
+ url: string(),
13025
+ /**
13026
+ * What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
13027
+ * The PROVIDER names it, because only the provider knows what the page is;
13028
+ * a UI that invented the label from the addon id would call the Home
13029
+ * Assistant device page "Provider Homeassistant".
13030
+ */
13031
+ label: string(),
13032
+ target: AdminLinkTargetEnum,
13033
+ /**
13034
+ * Host the URL points at, without scheme, port or path — for the tooltip, so
13035
+ * an operator can see WHERE the button goes before he follows it. Redundant
13036
+ * with `url` by construction; carried separately so no surface has to parse
13037
+ * a URL to show it.
13038
+ */
13039
+ host: string()
13040
+ });
13041
+ method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
13042
+ /**
13004
13043
  * Identity envelope for a device's upstream-system metadata.
13005
13044
  *
13006
13045
  * Two jobs:
@@ -13328,97 +13367,6 @@ method(object({ integrationId: string() }), object({ filters: array(AdoptionFilt
13328
13367
  auth: "admin"
13329
13368
  });
13330
13369
  /**
13331
- * device-admin-link — "this device has a management page of its own, and here
13332
- * is its address".
13333
- *
13334
- * ## Why this is not a `deviceConfig` cap
13335
- *
13336
- * There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
13337
- * can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
13338
- * patch back through a setter; it costs a `builderId` reducer in
13339
- * `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
13340
- * renders a form section. This cap answers ONE question with ONE read and
13341
- * renders a button. Nothing about it is a form, so it carries no `deviceConfig`
13342
- * block, no `settings`, no `runtimeState` and no reducer — exactly like
13343
- * `reboot`, the other pure-RPC device-native cap.
13344
- *
13345
- * ## Absent, and the difference between "no page" and "we cannot say"
13346
- *
13347
- * The two are answered at DIFFERENT layers, on purpose:
13348
- *
13349
- * - **"We cannot say"** → the provider never registers the cap for that
13350
- * device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
13351
- * fan are reached only through a vendor cloud; there is no address to hand
13352
- * out and no page to open. A Tuya plug, a Wyze camera and a Gree air
13353
- * conditioner DO have a LAN IP, and still have no HTTP management page
13354
- * behind it. None of them register, so `deviceManager.getBindings` never
13355
- * lists the cap and no surface asks.
13356
- * - **"This device has no page, and I know that"** → the provider registers
13357
- * and `getAdminLink` returns `null`. This is the answer for a device whose
13358
- * sibling DOES have a page: a Reolink battery camera reached over UDP by
13359
- * `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
13360
- * transport, a Home Assistant broker authenticated by supervisor token
13361
- * (which carries no `baseUrl` at all).
13362
- *
13363
- * Both draw NOTHING. A button that opens a browser error is worse than no
13364
- * button, and D62 is the same rule from the other side: an off switch is
13365
- * reported off, never made to look broken. There is no third state where the
13366
- * UI renders a disabled button "because the device might have a page".
13367
- *
13368
- * ## The URL never carries credentials
13369
- *
13370
- * Not in userinfo, not in a query string. Every provider builds through
13371
- * `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
13372
- * scheme and path as separate arguments — there is no parameter a secret could
13373
- * arrive in — and re-checks its own output for the `scheme://user:pass@` shape
13374
- * that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
13375
- * output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
13376
- * keeps providers from hand-rolling one anyway.
13377
- *
13378
- * This matters here more than anywhere else in the repo, because every provider
13379
- * that knows a device's host knows its PASSWORD too: `{ host, port, username,
13380
- * password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
13381
- * and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
13382
- * camera's own page will ask for its own login. That is correct, and pre-
13383
- * filling it is the operator's business, not ours.
13384
- *
13385
- * ## It is a LAN fact
13386
- *
13387
- * The URL addresses the device where the NODE can see it. It is not proxied,
13388
- * not made reachable from outside, and not sent anywhere. A surface renders it
13389
- * as a link the operator's own browser follows, on the operator's own network,
13390
- * or renders nothing.
13391
- */
13392
- /**
13393
- * Whose page is it. The distinction is for the OPERATOR, who needs to know
13394
- * before clicking whether he is about to land on a camera's own web server or
13395
- * inside Home Assistant.
13396
- */
13397
- var AdminLinkTargetEnum = _enum(["device", "integration"]);
13398
- var DeviceAdminLinkSchema = object({
13399
- /**
13400
- * Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
13401
- * free of userinfo and of any credential-shaped query key.
13402
- */
13403
- url: string(),
13404
- /**
13405
- * What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
13406
- * The PROVIDER names it, because only the provider knows what the page is;
13407
- * a UI that invented the label from the addon id would call the Home
13408
- * Assistant device page "Provider Homeassistant".
13409
- */
13410
- label: string(),
13411
- target: AdminLinkTargetEnum,
13412
- /**
13413
- * Host the URL points at, without scheme, port or path — for the tooltip, so
13414
- * an operator can see WHERE the button goes before he follows it. Redundant
13415
- * with `url` by construction; carried separately so no surface has to parse
13416
- * a URL to show it.
13417
- */
13418
- host: string()
13419
- });
13420
- method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
13421
- /**
13422
13370
  * `device-export` — collection cap for addons that export camstack
13423
13371
  * devices to external ecosystems (HomeAssistant via MQTT discovery,
13424
13372
  * HomeKit/HAP, Alexa Smart Home, …).
@@ -23538,6 +23486,58 @@ method(_void(), ProviderInfoSchema, { auth: "admin" }), method(object({ config:
23538
23486
  kind: "mutation",
23539
23487
  auth: "admin"
23540
23488
  });
23489
+ /**
23490
+ * The signals a device can emit to WAKE its own stream.
23491
+ *
23492
+ * A camera whose stream is built on demand sleeps until something asks for it,
23493
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
23494
+ * puller holds a session open for ever, and treating that as demand would keep
23495
+ * a battery camera awake for ever, which is the whole thing the battery is for
23496
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
23497
+ * itself, with no stream running.
23498
+ *
23499
+ * ## The vocabulary is the PROVIDER'S, not ours
23500
+ *
23501
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
23502
+ * names each signal with a `code` it chooses and a `label` an operator reads.
23503
+ * Reolink offers motion and camera-native detection; another provider may offer
23504
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
23505
+ * yet. A fixed enum here would mean every new signal is a framework release.
23506
+ *
23507
+ * It is deliberately NOT derived from the caps a device already binds. Whether
23508
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
23509
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
23510
+ * binding — but both answer "what drives the detection pipeline", which is a
23511
+ * different question from "what may wake a sleeping stream". A camera can do
23512
+ * the first and not be trusted with the second, and the operator picks per
23513
+ * camera. Two questions, two authorities.
23514
+ *
23515
+ * ## Availability is not permission
23516
+ *
23517
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
23518
+ * wakes the stream is the operator's per-camera choice, held by the broker
23519
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
23520
+ * provider declaring a signal is not a provider enabling it.
23521
+ */
23522
+ /** One signal a device can emit. */
23523
+ var StreamSignalSchema = object({
23524
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
23525
+ code: string().min(1),
23526
+ /** What an operator reads in the picker. The provider's own wording. */
23527
+ label: string().min(1),
23528
+ /**
23529
+ * Whether the provider recommends this signal ON when a camera is first set
23530
+ * up. A provider knows which of its signals are cheap and reliable; an
23531
+ * operator should not have to discover that by trial. Reolink recommends
23532
+ * both of its own.
23533
+ */
23534
+ recommended: boolean()
23535
+ });
23536
+ object({
23537
+ signals: array(StreamSignalSchema),
23538
+ lastFetchedAt: number()
23539
+ });
23540
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
23541
23541
  /** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
23542
23542
  var ProfileSettingsSchemaBridge = unknown().nullable();
23543
23543
  var ProfileSettingsBagSchema = record(string(), unknown());
@@ -25820,6 +25820,143 @@ DeviceType.Camera, method(object({ deviceId: number() }), CameraCredentialsSchem
25820
25820
  kind: "query",
25821
25821
  auth: "admin"
25822
25822
  });
25823
+ /**
25824
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
25825
+ * page.
25826
+ *
25827
+ * ## Why this is a capability and not an addon settings schema
25828
+ *
25829
+ * It was one, and it did not render. The addon declared the editor as a
25830
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
25831
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
25832
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
25833
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
25834
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
25835
+ * not on it "falls off silently".
25836
+ *
25837
+ * Adding a fifth name to that list would have been the wrong fix twice over:
25838
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
25839
+ * beside PTZ and motion zones on the camera itself. The device page is
25840
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
25841
+ * and this cap carries its section the way `recording` does, by RETURNING it
25842
+ * from `getDeviceSettingsContribution`.
25843
+ *
25844
+ * Seven other widgets are still declared the other way, through a
25845
+ * `deviceConfig.ui` block the framework derives a section from. That route
25846
+ * gives the addon no say in where its own panel lands and no way to decline
25847
+ * for a device the panel does not suit, which is why this one does not use it.
25848
+ *
25849
+ * ## Why one addon may implement it
25850
+ *
25851
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
25852
+ * itself. Nothing else declares a composite camera, so nothing else has a
25853
+ * layout — and the device-scoped route means the widget asks THE camera, not
25854
+ * "the camera-grid addon", which is what let the old custom-action pair be
25855
+ * reached only by a caller that already knew the addon id.
25856
+ *
25857
+ * ## The tab
25858
+ *
25859
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
25860
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
25861
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
25862
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
25863
+ * next to "PTZ").
25864
+ */
25865
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
25866
+ var GridNormalizedRectSchema = object({
25867
+ x: number().min(0).max(1),
25868
+ y: number().min(0).max(1),
25869
+ width: number().gt(0).max(1),
25870
+ height: number().gt(0).max(1)
25871
+ });
25872
+ /**
25873
+ * One source camera, the part of its picture taken, and where that part lands.
25874
+ *
25875
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
25876
+ * — a profile switch, a firmware update, a substream that comes back different
25877
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
25878
+ * which is the class of bug nobody files.
25879
+ */
25880
+ var GridLayoutCellSchema = object({
25881
+ deviceId: number().int().positive(),
25882
+ /** The part of the SOURCE taken, normalized against the source. */
25883
+ source: GridNormalizedRectSchema,
25884
+ /** Where it lands, normalized against the CANVAS. */
25885
+ cell: GridNormalizedRectSchema
25886
+ });
25887
+ /**
25888
+ * Which profiles this grid can actually compose, and why not.
25889
+ *
25890
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
25891
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
25892
+ * the sources, because "this grid has no low" is not a finding — "615 has no
25893
+ * low" is, and it is the one an operator can act on.
25894
+ */
25895
+ var GridProfileOfferSchema = object({
25896
+ profile: _enum([
25897
+ "high",
25898
+ "mid",
25899
+ "low"
25900
+ ]),
25901
+ offered: boolean(),
25902
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
25903
+ missingSources: array(number().int().positive()),
25904
+ /**
25905
+ * The canvas this profile composes onto, `WxH`, or empty when it is not
25906
+ * offered. DERIVED from the cells and the sources' own size at this profile —
25907
+ * it is reported because nothing else in the system would ever say what the
25908
+ * grid came out as, and because it is the number an operator would otherwise
25909
+ * expect to type.
25910
+ */
25911
+ canvas: string(),
25912
+ /**
25913
+ * Whether this profile is PUBLISHED, of the ones the grid could serve.
25914
+ *
25915
+ * A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
25916
+ * a 4K canvas built from 4K decodes — something to opt into, not something a
25917
+ * viewer's adaptive should be handed by climbing to the top rung it can see.
25918
+ * Default is `mid` + `low`.
25919
+ */
25920
+ published: boolean()
25921
+ });
25922
+ var GridLayoutViewSchema = object({
25923
+ /** The persisted grid row this camera was declared from. */
25924
+ instanceId: string(),
25925
+ deviceId: number().int().nonnegative(),
25926
+ name: string(),
25927
+ /**
25928
+ * NO canvas size. A grid's resolution is not authored: each profile derives
25929
+ * its own from the cells and its sources' dimensions. The two numbers that
25930
+ * used to be here were a text field that silently decided both how much the
25931
+ * composite cost and how sharp it was — see `profiles[].canvas` for what it
25932
+ * came out as.
25933
+ */
25934
+ fps: number().int(),
25935
+ cells: array(GridLayoutCellSchema),
25936
+ /** What the catalog will publish, and what it refuses to. Read-only. */
25937
+ profiles: array(GridProfileOfferSchema)
25938
+ });
25939
+ var GridLayoutPatchSchema = object({
25940
+ deviceId: number().int().nonnegative(),
25941
+ name: string().min(1).max(160).optional(),
25942
+ fps: number().int().min(1).max(60).optional(),
25943
+ /** Which profiles to publish. See `GridProfileOffer.published`. */
25944
+ publishedProfiles: array(_enum([
25945
+ "high",
25946
+ "mid",
25947
+ "low"
25948
+ ])).max(3).optional(),
25949
+ /**
25950
+ * The whole cell list at once. A per-cell patch would need an ordering the
25951
+ * editor does not have, and a half-applied layout is a picture nobody asked
25952
+ * for.
25953
+ */
25954
+ cells: array(GridLayoutCellSchema).max(16)
25955
+ });
25956
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
25957
+ kind: "mutation",
25958
+ auth: "admin"
25959
+ });
25823
25960
  object({
25824
25961
  detected: boolean(),
25825
25962
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26293,307 +26430,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
26293
26430
  auth: "admin"
26294
26431
  });
26295
26432
  /**
26296
- * Vendor-neutral **onboard** recording + storage cap — what the CAMERA
26297
- * writes to the CAMERA's own card, on the camera's own schedule.
26298
- *
26299
- * This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
26300
- * footage ledger, our storage locations, our retention. This one has a
26301
- * different authority — the camera's firmware — and per D62 it stores
26302
- * nothing of its own. Every value here is read from the camera and every
26303
- * write goes back to the camera; there is no CamStack-side mirror that
26304
- * could disagree with the device.
26305
- *
26306
- * ## One shape, two firmwares
26307
- *
26308
- * Measured 2026-09-22 against the live fleet:
26309
- *
26310
- * | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
26311
- * | --- | --- | --- |
26312
- * | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
26313
- * | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
26314
- * | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
26315
- * | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
26316
- * | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
26317
- * | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
26318
- * | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
26319
- * | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
26320
- *
26321
- * The two schedule models look different and are the same thing in
26322
- * different coordinates: both answer "for this trigger, during which
26323
- * weekly windows does the camera record". {@link RecordWindow} is that
26324
- * question in one shape — Hikvision's ranges map straight onto it,
26325
- * Reolink's mask expands into hour-aligned windows.
26326
- *
26327
- * ## Union, not intersection
26328
- *
26329
- * **The same fields exist on every camera.** What differs per device is
26330
- * which VALUES that device accepts, and that is what {@link
26331
- * RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
26332
- * per field plus the schedule's own limits. A control a camera cannot
26333
- * honour is rendered DISABLED WITH ITS REASON, never missing and never
26334
- * dead: disabled must not look like broken.
26335
- *
26336
- * ## Refusal by name
26337
- *
26338
- * A write a camera cannot honour is refused with a sentence the operator
26339
- * can read — never accepted and dropped. Both providers refuse through
26340
- * {@link describeOnboardRefusal}, so the vocabulary is one function and
26341
- * one test, not two hand-written vendor opinions.
26342
- *
26343
- * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
26344
- * `getOptions` advertises per-camera availability, `getStatus` (auto-
26345
- * injected from `status`) reports the live values, and a single
26346
- * `setSettings` mutation applies a partial change. No hand-written
26347
- * settings-contribution methods.
26348
- */
26349
- /**
26350
- * What makes the camera start recording during a window.
26351
- *
26352
- * The union of both vendors' vocabularies. `continuous` is Hikvision's
26353
- * `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
26354
- * object-class triggers are Reolink-only today and the smart-event ones
26355
- * (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
26356
- * firmwares measured — a camera that cannot record on a trigger simply
26357
- * does not list it in `options.schedule.triggers`, and a window naming
26358
- * it is REFUSED, not dropped.
26359
- */
26360
- var RecordTriggerSchema = _enum([
26361
- "continuous",
26362
- "motion",
26363
- "person",
26364
- "vehicle",
26365
- "animal",
26366
- "lineCrossing",
26367
- "intrusion",
26368
- "loitering",
26369
- "alarmInput"
26370
- ]);
26371
- /**
26372
- * One weekly recording window: "on `day`, from `startMinute` to
26373
- * `endMinute`, record on `trigger`".
26374
- *
26375
- * `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
26376
- * both firmwares enumerate). Minutes are local camera time since
26377
- * midnight; `endMinute` may be 1440, meaning end of day — that is
26378
- * Hikvision's literal `24:00` and Reolink's 24th mask slot, and
26379
- * collapsing it to 0 would turn a whole-day window into an empty one.
26380
- */
26381
- var RecordWindowSchema = object({
26382
- trigger: RecordTriggerSchema,
26383
- day: number().int().min(0).max(6),
26384
- startMinute: number().int().min(0).max(1439),
26385
- endMinute: number().int().min(1).max(1440)
26386
- });
26387
- /** Status of one physical volume, as the camera itself describes it. */
26388
- var OnboardStorageVolumeSchema = object({
26389
- /** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
26390
- id: string(),
26391
- /** The camera's own name for it, when it gives one (`hddName`). */
26392
- label: string().optional(),
26393
- status: _enum([
26394
- "ok",
26395
- "unformatted",
26396
- "error",
26397
- "offline",
26398
- "unknown"
26399
- ]),
26400
- /**
26401
- * Total size in MB, or **null when the camera did not say**.
26402
- *
26403
- * Never 0 for an unreadable value: a measurement that failed is not a
26404
- * measurement (D393), and a card whose size is unknown must not be
26405
- * rendered as a card of size zero.
26406
- */
26407
- capacityMb: number().nullable(),
26408
- /**
26409
- * Free space in MB, or null when unknown.
26410
- *
26411
- * **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
26412
- * 1439 both report exactly 11776 MB free — the fixed reserve a looping
26413
- * card converges on once it has wrapped. At loop steady state the
26414
- * number is identical whether the camera recorded yesterday or stopped
26415
- * a month ago.
26416
- */
26417
- freeMb: number().nullable(),
26418
- /** True when the camera reports the volume writable (`property` RW). */
26419
- writable: boolean().optional()
26420
- });
26421
- object({
26422
- storage: discriminatedUnion("kind", [
26423
- object({
26424
- kind: literal("present"),
26425
- volumes: array(OnboardStorageVolumeSchema)
26426
- }),
26427
- object({
26428
- kind: literal("absent"),
26429
- reason: string()
26430
- }),
26431
- object({
26432
- kind: literal("unknown"),
26433
- reason: string()
26434
- })
26435
- ]),
26436
- tracks: array(object({
26437
- id: string(),
26438
- enabled: boolean(),
26439
- isVideo: boolean(),
26440
- /** From the camera's own track description. Null when it does not say. */
26441
- codec: string().nullable(),
26442
- resolution: string().nullable(),
26443
- /** Per-track overwrite flag, where the firmware keeps it per track. */
26444
- overwriteWhenFull: boolean().nullable()
26445
- })),
26446
- /**
26447
- * The track the write path targets — the enabled VIDEO one. Null when
26448
- * no track could be identified, which is itself a refusal reason.
26449
- */
26450
- primaryTrackId: string().nullable(),
26451
- /** Master "record to the card at all" switch. */
26452
- enabled: boolean().nullable(),
26453
- overwriteWhenFull: boolean().nullable(),
26454
- preRecordSec: number().nullable(),
26455
- postRecordSec: number().nullable(),
26456
- /** Length of one recorded file, in minutes. */
26457
- segmentMinutes: number().nullable(),
26458
- /** The primary track's weekly windows, flattened. */
26459
- windows: array(RecordWindowSchema),
26460
- /**
26461
- * How many windows the camera described that CamStack could NOT read —
26462
- * an unrecognised trigger, an unparseable clock, a weekday it does not
26463
- * name.
26464
- *
26465
- * A dropped window is work the reader threw away, and a schedule that
26466
- * silently shows fewer rows than the camera holds is how an operator
26467
- * saves back a schedule shorter than the one they were looking at
26468
- * (D391). Non-zero means the window list is INCOMPLETE and a write
26469
- * that replaces it would delete what was not shown — which is why a
26470
- * provider reporting a non-zero count also reports the schedule as not
26471
- * writable.
26472
- */
26473
- unreadableWindows: number(),
26474
- /**
26475
- * The camera is scheduled to record and has NO usable storage.
26476
- *
26477
- * A first-class fact because it is the fleet's most common silent
26478
- * defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
26479
- * to a card that is not there. Neither the schedule nor the storage
26480
- * read says anything wrong on its own; only the pair does.
26481
- */
26482
- recordingToNowhere: boolean(),
26483
- lastFetchedAt: number()
26484
- });
26485
- /** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
26486
- var RangeSchema = object({
26487
- min: number(),
26488
- max: number(),
26489
- step: number()
26490
- });
26491
- /**
26492
- * The values a camera actually takes for a numeric field, when they are a SET
26493
- * rather than a range.
26494
- *
26495
- * `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
26496
- * (I91DN) on 2026-09-22 by writing each value and reading it back:
26497
- *
26498
- * - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
26499
- * camera's "no limit" — `-1` and `4294967295` both land on it);
26500
- * - post-record: `5, 10, 30, 60, 120, 300, 600`.
26501
- *
26502
- * Neither is expressible as a step: the first has a sentinel two billion away
26503
- * from its neighbours, the second doubles and then jumps. A range that tried
26504
- * would forbid values the camera takes AND permit values it silently replaces
26505
- * with 5 — wrong in both directions at once.
26506
- *
26507
- * `sentinel` names the member that is not a duration, so a surface can render
26508
- * "no limit" instead of `2147483647` seconds.
26509
- */
26510
- var AllowedValuesSchema = object({
26511
- values: array(number()).min(1),
26512
- sentinel: object({
26513
- value: number(),
26514
- meaning: _enum(["no-limit", "disabled"])
26515
- }).optional()
26516
- });
26517
- /**
26518
- * Per-field availability on ONE camera.
26519
- *
26520
- * The field exists on every camera — this says whether this one can be
26521
- * read and whether it can be written, and `reason` says why not when
26522
- * either is false. The UI renders the control DISABLED with the reason
26523
- * rather than hiding it, so a limitation is legible instead of looking
26524
- * like a missing feature.
26525
- */
26526
- var OnboardFieldSupportSchema = object({
26527
- readable: boolean(),
26528
- writable: boolean(),
26529
- /** Required whenever `readable` or `writable` is false. */
26530
- reason: string().optional()
26531
- });
26532
- /** What this camera's schedule model can express. */
26533
- var OnboardScheduleSupportSchema = object({
26534
- support: OnboardFieldSupportSchema,
26535
- /**
26536
- * The smallest time step the camera can express, in minutes.
26537
- *
26538
- * Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
26539
- * 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
26540
- * window whose edges are not a multiple of this is REFUSED rather than
26541
- * quietly rounded — rounding is how an operator's 06:30 becomes 06:00
26542
- * and nothing says so.
26543
- */
26544
- granularityMinutes: number(),
26545
- /** Triggers this camera can record on. A window naming another is refused. */
26546
- triggers: array(RecordTriggerSchema),
26547
- /**
26548
- * False when the camera stores ONE trigger per time range, so two
26549
- * windows overlapping on the same day cannot carry different triggers.
26550
- * True on Reolink, whose mask is per-trigger and independent.
26551
- */
26552
- supportsOverlappingTriggers: boolean()
26553
- });
26554
- var RecordingOnboardOptionsSchema = object({
26555
- enabled: OnboardFieldSupportSchema,
26556
- overwriteWhenFull: OnboardFieldSupportSchema,
26557
- preRecordSec: OnboardFieldSupportSchema,
26558
- preRecordSecRange: RangeSchema.optional(),
26559
- /** Preferred over the range when the camera takes a SET, not a span. */
26560
- preRecordSecAllowed: AllowedValuesSchema.optional(),
26561
- postRecordSec: OnboardFieldSupportSchema,
26562
- postRecordSecRange: RangeSchema.optional(),
26563
- /** Preferred over the range when the camera takes a SET, not a span. */
26564
- postRecordSecAllowed: AllowedValuesSchema.optional(),
26565
- segmentMinutes: OnboardFieldSupportSchema,
26566
- segmentMinutesRange: RangeSchema.optional(),
26567
- /** Preferred over the range when the camera takes a SET, not a span. */
26568
- segmentMinutesAllowed: AllowedValuesSchema.optional(),
26569
- schedule: OnboardScheduleSupportSchema
26570
- });
26571
- /**
26572
- * A partial change. Every field optional.
26573
- *
26574
- * Unlike the other `deviceConfig` caps, a provider here does **NOT**
26575
- * silently ignore a field it cannot support — it refuses, by name,
26576
- * through {@link describeOnboardRefusal}. Silence on a recording setting
26577
- * is the failure D62 exists to prevent: the operator believes the camera
26578
- * is recording the way the form says, and it is not.
26579
- */
26580
- var RecordingOnboardPatchSchema = object({
26581
- enabled: boolean().optional(),
26582
- overwriteWhenFull: boolean().optional(),
26583
- preRecordSec: number().optional(),
26584
- postRecordSec: number().optional(),
26585
- segmentMinutes: number().optional(),
26586
- /** The complete new window set for the primary track — not a delta. */
26587
- windows: array(RecordWindowSchema).optional()
26588
- });
26589
- DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
26590
- deviceId: number(),
26591
- settings: RecordingOnboardPatchSchema
26592
- }), _void(), {
26593
- kind: "mutation",
26594
- auth: "admin"
26595
- });
26596
- /**
26597
26433
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
26598
26434
  * for every device, regardless of provider — the kernel needs a uniform
26599
26435
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -26687,30 +26523,6 @@ object({
26687
26523
  eventCountSinceStart: number()
26688
26524
  });
26689
26525
  DeviceType.EventEmitter;
26690
- var EventItemSchema = object({
26691
- id: string(),
26692
- type: string(),
26693
- timestamp: number(),
26694
- label: string().optional(),
26695
- thumbnailUrl: string().optional(),
26696
- clipUrl: string().optional(),
26697
- metadata: record(string(), unknown()).optional()
26698
- });
26699
- DeviceType.Camera, method(object({
26700
- deviceId: number(),
26701
- from: number().optional(),
26702
- to: number().optional(),
26703
- limit: number().optional()
26704
- }), array(EventItemSchema)), method(object({
26705
- deviceId: number(),
26706
- eventId: string()
26707
- }), object({
26708
- base64: string(),
26709
- contentType: string()
26710
- }).nullable()), method(object({
26711
- deviceId: number(),
26712
- eventId: string()
26713
- }), string().nullable());
26714
26526
  var IdentitySchema = object({
26715
26527
  id: string(),
26716
26528
  name: string(),
@@ -28382,143 +28194,6 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
28382
28194
  lastChangedAt: number()
28383
28195
  });
28384
28196
  /**
28385
- * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28386
- * page.
28387
- *
28388
- * ## Why this is a capability and not an addon settings schema
28389
- *
28390
- * It was one, and it did not render. The addon declared the editor as a
28391
- * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28392
- * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28393
- * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28394
- * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28395
- * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
28396
- * not on it "falls off silently".
28397
- *
28398
- * Adding a fifth name to that list would have been the wrong fix twice over:
28399
- * that page is per-camera DETECTION tuning, and a grid's geometry belongs
28400
- * beside PTZ and motion zones on the camera itself. The device page is
28401
- * BINDING-driven (D12), so the way in is a capability bound to the device —
28402
- * and this cap carries its section the way `recording` does, by RETURNING it
28403
- * from `getDeviceSettingsContribution`.
28404
- *
28405
- * Seven other widgets are still declared the other way, through a
28406
- * `deviceConfig.ui` block the framework derives a section from. That route
28407
- * gives the addon no say in where its own panel lands and no way to decline
28408
- * for a device the panel does not suit, which is why this one does not use it.
28409
- *
28410
- * ## Why one addon may implement it
28411
- *
28412
- * It is a device-scoped NATIVE cap, registered by the grid camera device
28413
- * itself. Nothing else declares a composite camera, so nothing else has a
28414
- * layout — and the device-scoped route means the widget asks THE camera, not
28415
- * "the camera-grid addon", which is what let the old custom-action pair be
28416
- * reached only by a caller that already knew the addon id.
28417
- *
28418
- * ## The tab
28419
- *
28420
- * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28421
- * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28422
- * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28423
- * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28424
- * next to "PTZ").
28425
- */
28426
- /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28427
- var GridNormalizedRectSchema = object({
28428
- x: number().min(0).max(1),
28429
- y: number().min(0).max(1),
28430
- width: number().gt(0).max(1),
28431
- height: number().gt(0).max(1)
28432
- });
28433
- /**
28434
- * One source camera, the part of its picture taken, and where that part lands.
28435
- *
28436
- * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28437
- * — a profile switch, a firmware update, a substream that comes back different
28438
- * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28439
- * which is the class of bug nobody files.
28440
- */
28441
- var GridLayoutCellSchema = object({
28442
- deviceId: number().int().positive(),
28443
- /** The part of the SOURCE taken, normalized against the source. */
28444
- source: GridNormalizedRectSchema,
28445
- /** Where it lands, normalized against the CANVAS. */
28446
- cell: GridNormalizedRectSchema
28447
- });
28448
- /**
28449
- * Which profiles this grid can actually compose, and why not.
28450
- *
28451
- * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28452
- * profile is on offer only when EVERY source can serve it. The refusal NAMES
28453
- * the sources, because "this grid has no low" is not a finding — "615 has no
28454
- * low" is, and it is the one an operator can act on.
28455
- */
28456
- var GridProfileOfferSchema = object({
28457
- profile: _enum([
28458
- "high",
28459
- "mid",
28460
- "low"
28461
- ]),
28462
- offered: boolean(),
28463
- /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28464
- missingSources: array(number().int().positive()),
28465
- /**
28466
- * The canvas this profile composes onto, `WxH`, or empty when it is not
28467
- * offered. DERIVED from the cells and the sources' own size at this profile —
28468
- * it is reported because nothing else in the system would ever say what the
28469
- * grid came out as, and because it is the number an operator would otherwise
28470
- * expect to type.
28471
- */
28472
- canvas: string(),
28473
- /**
28474
- * Whether this profile is PUBLISHED, of the ones the grid could serve.
28475
- *
28476
- * A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
28477
- * a 4K canvas built from 4K decodes — something to opt into, not something a
28478
- * viewer's adaptive should be handed by climbing to the top rung it can see.
28479
- * Default is `mid` + `low`.
28480
- */
28481
- published: boolean()
28482
- });
28483
- var GridLayoutViewSchema = object({
28484
- /** The persisted grid row this camera was declared from. */
28485
- instanceId: string(),
28486
- deviceId: number().int().nonnegative(),
28487
- name: string(),
28488
- /**
28489
- * NO canvas size. A grid's resolution is not authored: each profile derives
28490
- * its own from the cells and its sources' dimensions. The two numbers that
28491
- * used to be here were a text field that silently decided both how much the
28492
- * composite cost and how sharp it was — see `profiles[].canvas` for what it
28493
- * came out as.
28494
- */
28495
- fps: number().int(),
28496
- cells: array(GridLayoutCellSchema),
28497
- /** What the catalog will publish, and what it refuses to. Read-only. */
28498
- profiles: array(GridProfileOfferSchema)
28499
- });
28500
- var GridLayoutPatchSchema = object({
28501
- deviceId: number().int().nonnegative(),
28502
- name: string().min(1).max(160).optional(),
28503
- fps: number().int().min(1).max(60).optional(),
28504
- /** Which profiles to publish. See `GridProfileOffer.published`. */
28505
- publishedProfiles: array(_enum([
28506
- "high",
28507
- "mid",
28508
- "low"
28509
- ])).max(3).optional(),
28510
- /**
28511
- * The whole cell list at once. A per-cell patch would need an ordering the
28512
- * editor does not have, and a half-applied layout is a picture nobody asked
28513
- * for.
28514
- */
28515
- cells: array(GridLayoutCellSchema).max(16)
28516
- });
28517
- DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
28518
- kind: "mutation",
28519
- auth: "admin"
28520
- });
28521
- /**
28522
28197
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
28523
28198
  * on-camera motion-detection mask is a single `grid` region (a row-major
28524
28199
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -30330,37 +30005,37 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
30330
30005
  kind: "mutation",
30331
30006
  auth: "admin"
30332
30007
  });
30333
- /**
30334
- * `recording` cap — footage availability + HLS playback manifests + per-device
30335
- * recording config. NOTE on events (source of truth, R5/C3): this cap carries
30336
- * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
30337
- * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
30338
- * rows) and are the ONLY event surface — the recorder has none. The in-RAM
30339
- * playback markers it used to build were deleted on 2026-08-29 because nothing
30340
- * ever read them. Event<->footage joins are by time, padded with the shared
30341
- * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
30342
- */
30343
- var RecordingStatusSchema = object({
30344
- deviceId: number(),
30345
- enabled: boolean(),
30346
- /** THE derived storage mode, from the one definition
30347
- * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
30348
- * `on-device-decision` could have reached the recorder and not the status. */
30349
- activeMode: RecordingStorageModeSchema,
30350
- nodeId: string(),
30351
- storageBytes: number()
30352
- });
30353
30008
  var RecordingRangeSchema = object({
30354
30009
  profile: string(),
30355
30010
  startMs: number(),
30356
30011
  endMs: number()
30357
30012
  });
30013
+ /**
30014
+ * How a source ANSWERED, on every singular read of this cap.
30015
+ *
30016
+ * `'read'` — it looked. `ranges: []` / `days: []` is then a real claim: this
30017
+ * source has no coverage in the window. `'unreadable'` — nobody could look
30018
+ * (the camera was unreachable, the calendar rung threw, the location is
30019
+ * unmounted, the node is still on the old build), and the emptiness beside it
30020
+ * means NOTHING.
30021
+ *
30022
+ * The batch rows have carried this since the grid existed; the SINGULAR
30023
+ * answers gained it with the collection (D625 §10.4), because they are the
30024
+ * ones the single-camera picker uses and because a half-converted fleet makes
30025
+ * "nobody looked" common for the length of a deploy. Without it the timeline
30026
+ * has no vocabulary for it, and `(data ?? [])` in a viewer turns a rollout into
30027
+ * a fleet of cameras that appear to have lost their recordings (D315, D393).
30028
+ */
30029
+ var RecordingReadSchema = _enum(["read", "unreadable"]);
30358
30030
  var RecordingAvailabilitySchema = object({
30359
30031
  deviceId: number(),
30032
+ /** See {@link RecordingReadSchema}. An `'unreadable'` answer carries an empty
30033
+ * `ranges` that means nothing — never draw it as "no footage". */
30034
+ read: RecordingReadSchema,
30360
30035
  ranges: array(RecordingRangeSchema),
30361
30036
  /**
30362
- * Every profile this camera has footage in — not only the one `ranges`
30363
- * describes (D433).
30037
+ * Every profile this camera has footage in AT THIS SOURCE — not only the one
30038
+ * `ranges` describes (D433).
30364
30039
  *
30365
30040
  * `ranges` answers for ONE profile by design: the timeline is a single bar,
30366
30041
  * and enumerating all of them triples the directory reads for a bar that
@@ -30377,15 +30052,285 @@ var RecordingAvailabilitySchema = object({
30377
30052
  });
30378
30053
  var RecordingDaysSchema = object({
30379
30054
  deviceId: number(),
30055
+ /** See {@link RecordingReadSchema}. `days: []` on an `'unreadable'` answer is
30056
+ * "nobody could look", and the date-picker must not spell it the same as
30057
+ * "no footage this month". */
30058
+ read: RecordingReadSchema,
30380
30059
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
30381
30060
  days: array(number())
30382
30061
  });
30062
+ var RecordingManifestSchema = object({
30063
+ deviceId: number(),
30064
+ /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
30065
+ localMasterPath: string().nullable(),
30066
+ /** HTTP(S) URL to the master playlist on the recording node's playback server
30067
+ * (the PRIMARY candidate); null when no recording / server. Carries the
30068
+ * scoped playback token in its path. */
30069
+ playbackUrl: string().nullable(),
30070
+ /**
30071
+ * Candidate master-playlist URLs the client tries in order (LAN first, then
30072
+ * remote — Tailscale/Cloudflare if the operator configured extra hosts), each
30073
+ * carrying the same scoped token. `playbackUrl` is the first entry. Empty when
30074
+ * there is no recording / server.
30075
+ */
30076
+ playbackEndpoints: array(string())
30077
+ });
30078
+ var RecordingSourceAvailabilitySchema = object({
30079
+ state: _enum([
30080
+ "ok",
30081
+ "sleeping",
30082
+ "unreachable",
30083
+ "no-storage",
30084
+ "index-empty"
30085
+ ]),
30086
+ /** Free text, shown verbatim. Names the camera's own refusal when there is one. */
30087
+ reason: string().optional(),
30088
+ /** When this source's coverage was last CONFIRMED. A cached answer is never
30089
+ * drawn as current: the surface shows the age whenever it is older than the
30090
+ * refresh interval. The clip catalog's `catalogAsOf`, under the name the
30091
+ * timeline uses for it. */
30092
+ coverageAsOf: number().optional()
30093
+ });
30094
+ /**
30095
+ * One SOURCE of recorded coverage for a camera — a row of the picker.
30096
+ *
30097
+ * A provider lists the sources IT serves for that device, and answers for each
30098
+ * of them whether it can answer at all. A provider with nothing to offer on a
30099
+ * camera returns `[]` — it is not that camera's business. The five availability
30100
+ * states are `ClipSourceAvailability`'s verbatim: they mean exactly the same
30101
+ * things about a coverage index as about a clip catalog, and `sleeping` in
30102
+ * particular is what stops a battery camera being woken to paint a bar.
30103
+ */
30104
+ var RecordingSourceSchema = object({
30105
+ /** The source id. {@link RECORDING_SOURCE_CAMSTACK} for ours (RESERVED), a
30106
+ * vendor namespace (`native:reolink:onboard`, …) for a camera's own store. */
30107
+ source: string(),
30108
+ /** Operator-facing name of the source ("CamStack recordings", "SD card"). */
30109
+ label: string(),
30110
+ /**
30111
+ * The addon that SERVES this row, and the value a later call passes as
30112
+ * `provider`.
30113
+ *
30114
+ * Optional for version skew only. The collection dispatcher stamps it from
30115
+ * the registry, so a row that travelled through the fan-out carries the
30116
+ * authoritative id whatever the provider filled in (D557 §4).
30117
+ */
30118
+ addonId: string().optional(),
30119
+ availability: RecordingSourceAvailabilitySchema
30120
+ });
30121
+ /**
30122
+ * What a surface may DRAW for this (camera, source) — D612's rule applied to a
30123
+ * timeline: **the source declares what it can do, and the surface draws what
30124
+ * was declared. It never assumes, and never offers a gesture it will then
30125
+ * refuse.** D612 exists because `8` and `16` were offered as clip rates, the
30126
+ * broker clamped them to `4`, and no line anywhere said so.
30127
+ *
30128
+ * Asked once per (camera, source) before anything is drawn — never replaced by
30129
+ * a constant the surface keeps, which is the second authority D612 ends.
30130
+ */
30131
+ var RecordingSourceOptionsSchema = object({
30132
+ /** How this source's media reaches the player.
30133
+ * `archive` = our own indexed segment tree; `stream` = the provider's
30134
+ * forward-only fMP4 (D597); `realtime` = a replay bound to wall clock. */
30135
+ transport: _enum([
30136
+ "archive",
30137
+ "stream",
30138
+ "realtime"
30139
+ ]),
30140
+ /** What the BAR means. `continuous` = gaps are holes in a recording;
30141
+ * `sparse` = gaps are the absence of one, and must be drawn as such.
30142
+ *
30143
+ * Not an onboard-only concession: measured 2026-09-24, OUR bar covers 98.8 %
30144
+ * of 592's day and 1.2 % of 1436's. It is a fact about a (source, camera)
30145
+ * pair, and ours answers it per camera from `deriveRecordingMode`. */
30146
+ coverage: _enum(["continuous", "sparse"]),
30147
+ /** Where the playhead may be put.
30148
+ * `free` — anywhere, to the frame.
30149
+ * `forward` — only ahead of the current position.
30150
+ * `segment` — a position SNAPS to the head of the covering segment; a finer
30151
+ * ask is accepted by the camera and SILENTLY IGNORED. Measured
30152
+ * on 1436 (Hikvision V5.7.1, 2026-09-23): a window-narrowed
30153
+ * `ContentMgmt/search` returns a row and a `playbackURI`, the
30154
+ * replay opens 200 and delivers media — and the burned-in OSD of
30155
+ * the first frame reads the SEGMENT HEAD every time. Calling
30156
+ * that `forward` would tell the surface it may move the playhead
30157
+ * ahead within a loaded segment, which it may not. */
30158
+ seek: _enum([
30159
+ "free",
30160
+ "forward",
30161
+ "segment"
30162
+ ]),
30163
+ /** Frame-step BACKWARD is meaningful. */
30164
+ stepBack: boolean(),
30165
+ /** Whether the drag-scrub gesture is served, as opposed to refused by name. */
30166
+ scrub: boolean(),
30167
+ /** Deliverable rates, ascending, always containing `1`. The surface draws its
30168
+ * picker from this and from NOTHING else (D612, D620, D621). `0` is not a
30169
+ * member: pause is the absence of a rate. */
30170
+ rates: array(number().positive()).min(1).readonly(),
30171
+ /** TRUE when a read of this source HOLDS the camera's only playback session.
30172
+ * A surface with this set makes at most ONE read at a time and draws no
30173
+ * scrub-thumbnail strip, no hover preview, no prefetch and no background
30174
+ * refresh. The precedent is exact and expensive: filling one screen of
30175
+ * Hikvision thumbnails at 1.01× realtime consumed fifteen minutes of that
30176
+ * camera's only playback session (1.2.126, reported within minutes), and a
30177
+ * timeline is a screenful of reads by construction. */
30178
+ exclusive: boolean()
30179
+ });
30180
+ /**
30181
+ * How to PLAY the instant that was asked for, from the chosen source.
30182
+ *
30183
+ * No new media transport is built for onboard sources: the `clip` arm is a
30184
+ * DELEGATION to the `videoclips` transport that vendor already has (D597 /
30185
+ * D616 / D617). The onboard half of this collection is a PROJECTION of
30186
+ * `videoclips` for coverage and a delegation to it for bytes.
30187
+ */
30188
+ var RecordingPlaybackSchema = discriminatedUnion("kind", [
30189
+ object({
30190
+ kind: literal("hls"),
30191
+ manifest: RecordingManifestSchema
30192
+ }),
30193
+ object({
30194
+ kind: literal("clip"),
30195
+ /** The `videoclips` source namespace this clip id belongs to. */
30196
+ source: string(),
30197
+ clipId: string(),
30198
+ /** Where this clip actually STARTS. On a `seek: 'segment'` source the
30199
+ * playhead lands here, not at the requested instant — the surface must be
30200
+ * TOLD, not left to discover it from a burned-in OSD. */
30201
+ startsAtMs: number()
30202
+ }),
30203
+ object({
30204
+ kind: literal("none"),
30205
+ reason: string()
30206
+ })
30207
+ ]);
30208
+ DeviceType.Camera, method(object({ deviceId: number() }), array(RecordingSourceSchema).readonly(), {
30209
+ kind: "query",
30210
+ auth: "protected"
30211
+ }), method(object({
30212
+ deviceId: number(),
30213
+ /**
30214
+ * WHICH provider to ask — the `addonId` a {@link RecordingSourceSchema}
30215
+ * row carries, never a source id and never a list. **REQUIRED**, in the
30216
+ * schema, where the generated types make it unomittable rather than
30217
+ * merely discouraged (D554 amended).
30218
+ *
30219
+ * It was learned the expensive way on `videoclips.listClips`: measured
30220
+ * on the live hub 2026-09-20, device 592 bound to `recorder` AND
30221
+ * `provider-reolink`, a bare call with `limit: 3` answered SIX rows,
30222
+ * three from each source, merged — `device-collection-dispatch.ts`
30223
+ * leaves an unpinned fan-out un-narrowed, so absence buys the union the
30224
+ * method exists not to be. An un-narrowed `getAvailability` would do
30225
+ * that to a TIMELINE: our ranges and the card's clips unioned into one
30226
+ * bar, which is "two sources are never drawn together" broken in the
30227
+ * one place it matters most.
30228
+ *
30229
+ * A provider the device is not bound to is refused BY NAME (D552's
30230
+ * `rejectUnresolvedAddonPin`), never answered by another one.
30231
+ */
30232
+ provider: string().min(1),
30233
+ fromMs: number(),
30234
+ toMs: number(),
30235
+ /**
30236
+ * Answer for THIS profile instead of the source's preferred one (D433).
30237
+ * Absent keeps the timeline's behaviour — one bar, one profile, one set
30238
+ * of reads. `profilesWithFootage` on the answer says what may be asked
30239
+ * for.
30240
+ */
30241
+ profile: string().optional()
30242
+ }), RecordingAvailabilitySchema, {
30243
+ kind: "query",
30244
+ auth: "protected"
30245
+ }), method(object({
30246
+ deviceId: number(),
30247
+ provider: string().min(1),
30248
+ fromMs: number(),
30249
+ toMs: number(),
30250
+ tzOffsetMinutes: number()
30251
+ }), RecordingDaysSchema, {
30252
+ kind: "query",
30253
+ auth: "protected"
30254
+ }), method(object({
30255
+ deviceId: number(),
30256
+ provider: string().min(1),
30257
+ fromMs: number(),
30258
+ toMs: number(),
30259
+ profile: CamProfileSchema.optional()
30260
+ }), RecordingPlaybackSchema, {
30261
+ kind: "query",
30262
+ auth: "protected"
30263
+ }), method(object({
30264
+ deviceId: number(),
30265
+ provider: string().min(1)
30266
+ }), RecordingSourceOptionsSchema, {
30267
+ kind: "query",
30268
+ auth: "protected"
30269
+ });
30270
+ /**
30271
+ * `recording-archive` — OUR archive, and the intent that fills it.
30272
+ *
30273
+ * The system-singleton half of the 2026-09-24 cut (D625). `recording` used to
30274
+ * be one 33-method system singleton holding two unrelated subjects: three
30275
+ * per-camera READS about coverage and playback, and everything else — storage
30276
+ * locations, retention, relocation, rebalance, the ops log, the placement
30277
+ * table and the byte-plane primitives our scrub and export are built on.
30278
+ *
30279
+ * The reads became a device-scoped COLLECTION, so a camera's own card can be a
30280
+ * source beside ours (`recording.cap.ts`). Everything that is about OUR store,
30281
+ * or unimplementable by a camera, stayed here.
30282
+ *
30283
+ * ## On the name
30284
+ *
30285
+ * `recording-storage` was the obvious choice and is wrong: this cap also holds
30286
+ * `getDeviceConfig`/`setDeviceConfig`, which are recording INTENT — bands,
30287
+ * retention, the D62 switch authority — and a name that says "storage" invites
30288
+ * the next reader to move them out again. An archive is a thing we keep, and
30289
+ * what we keep it under is a policy; the name covers both halves honestly and
30290
+ * sits in the existing family (`recording-onboard`, `recording-export`,
30291
+ * `recording-signal`).
30292
+ *
30293
+ * ## What must NOT happen to it
30294
+ *
30295
+ * It stays a SINGLETON. It is registered by `recorder`, which is
30296
+ * `placement: 'any-node'` and runs on every recording node; the hub dispatches
30297
+ * to one of them. Putting the ledger, the placement table or the relocation
30298
+ * jobs behind a fan-out is the one genuinely dangerous move in this cut.
30299
+ *
30300
+ * `getDeviceConfig` / `setDeviceConfig` in particular are the D62 recording
30301
+ * authority (`CameraSwitch.authority`). If a write reached a different provider
30302
+ * than the read — which a collection fan-out permits — two authorities would
30303
+ * decide when one camera records, and the symptom (recording silently off, or
30304
+ * a `bands` array clobbered by a partial write) is durable and silent. Keeping
30305
+ * them here means the worst case during a rollout is a 412: the switch refuses
30306
+ * to flip and SAYS so. **Do not move them into the collection, at any point,
30307
+ * for any reason.**
30308
+ *
30309
+ * ## The two batch reads
30310
+ *
30311
+ * `getAvailabilityBatch` / `getDaysWithRecordingsBatch` take `deviceIds:
30312
+ * number[]` with no single `deviceId`, and a device-scoped mount routes
30313
+ * through `getProviderForDevice(deviceId)` — there is nothing for it to route
30314
+ * on. They stay here, and on this cap the batch is explicitly OURS: a grid has
30315
+ * no per-camera picker, and a caller that wants another source's coverage asks
30316
+ * `recording.getAvailability` per device with that source's `provider`.
30317
+ */
30318
+ var RecordingStatusSchema = object({
30319
+ deviceId: number(),
30320
+ enabled: boolean(),
30321
+ /** THE derived storage mode, from the one definition
30322
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
30323
+ * `on-device-decision` could have reached the recorder and not the status. */
30324
+ activeMode: RecordingStorageModeSchema,
30325
+ nodeId: string(),
30326
+ storageBytes: number()
30327
+ });
30383
30328
  /**
30384
30329
  * One camera's row in a `getAvailabilityBatch` answer.
30385
30330
  *
30386
- * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
30387
- * batch collapses the transport, not the work — plus the one thing the singular
30388
- * method never had to say:
30331
+ * `ranges` is EXACTLY what `recording.getAvailability` returns for that camera
30332
+ * at OUR source — the batch collapses the transport, not the work — plus the
30333
+ * `read` mark the singular answer now carries too (D625):
30389
30334
  *
30390
30335
  * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
30391
30336
  * no footage in the window", which is a real claim.
@@ -30417,22 +30362,6 @@ var RecordingDaysForDeviceSchema = object({
30417
30362
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
30418
30363
  days: array(number()).readonly()
30419
30364
  });
30420
- var RecordingManifestSchema = object({
30421
- deviceId: number(),
30422
- /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
30423
- localMasterPath: string().nullable(),
30424
- /** HTTP(S) URL to the master playlist on the recording node's playback server
30425
- * (the PRIMARY candidate); null when no recording / server. Carries the
30426
- * scoped playback token in its path. */
30427
- playbackUrl: string().nullable(),
30428
- /**
30429
- * Candidate master-playlist URLs the client tries in order (LAN first, then
30430
- * remote — Tailscale/Cloudflare if the operator configured extra hosts), each
30431
- * carrying the same scoped token. `playbackUrl` is the first entry. Empty when
30432
- * there is no recording / server.
30433
- */
30434
- playbackEndpoints: array(string())
30435
- });
30436
30365
  /**
30437
30366
  * Recording storage usage for one camera — what the ARCHIVE holds for it,
30438
30367
  * across every profile and every resolvable location on this node.
@@ -30691,34 +30620,12 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
30691
30620
  segmentEndMs: number()
30692
30621
  })]);
30693
30622
  method(object({
30694
- deviceId: number(),
30695
- fromMs: number(),
30696
- toMs: number(),
30697
- /**
30698
- * Answer for THIS profile instead of the preferred one (D433). Absent
30699
- * keeps the timeline's behaviour — one bar, one profile, one set of
30700
- * reads. `profilesWithFootage` on the answer says what may be asked
30701
- * for.
30702
- */
30703
- profile: string().optional()
30704
- }), RecordingAvailabilitySchema, {
30705
- kind: "query",
30706
- auth: "protected"
30707
- }), method(object({
30708
30623
  deviceIds: array(number()).min(1).max(200),
30709
30624
  fromMs: number(),
30710
30625
  toMs: number()
30711
30626
  }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
30712
30627
  kind: "query",
30713
30628
  auth: "protected"
30714
- }), method(object({
30715
- deviceId: number(),
30716
- fromMs: number(),
30717
- toMs: number(),
30718
- tzOffsetMinutes: number()
30719
- }), RecordingDaysSchema, {
30720
- kind: "query",
30721
- auth: "protected"
30722
30629
  }), method(object({
30723
30630
  deviceIds: array(number()).min(1).max(200),
30724
30631
  fromMs: number(),
@@ -30727,13 +30634,6 @@ method(object({
30727
30634
  }), array(RecordingDaysForDeviceSchema).readonly(), {
30728
30635
  kind: "query",
30729
30636
  auth: "protected"
30730
- }), method(object({
30731
- deviceId: number(),
30732
- fromMs: number(),
30733
- toMs: number()
30734
- }), RecordingManifestSchema, {
30735
- kind: "query",
30736
- auth: "protected"
30737
30637
  }), method(object({}), RecordingStorageUsageSchema, {
30738
30638
  kind: "query",
30739
30639
  auth: "admin"
@@ -31181,6 +31081,307 @@ method(object({
31181
31081
  auth: "protected"
31182
31082
  });
31183
31083
  /**
31084
+ * Vendor-neutral **onboard** recording + storage cap — what the CAMERA
31085
+ * writes to the CAMERA's own card, on the camera's own schedule.
31086
+ *
31087
+ * This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
31088
+ * footage ledger, our storage locations, our retention. This one has a
31089
+ * different authority — the camera's firmware — and per D62 it stores
31090
+ * nothing of its own. Every value here is read from the camera and every
31091
+ * write goes back to the camera; there is no CamStack-side mirror that
31092
+ * could disagree with the device.
31093
+ *
31094
+ * ## One shape, two firmwares
31095
+ *
31096
+ * Measured 2026-09-22 against the live fleet:
31097
+ *
31098
+ * | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
31099
+ * | --- | --- | --- |
31100
+ * | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
31101
+ * | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
31102
+ * | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
31103
+ * | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
31104
+ * | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
31105
+ * | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
31106
+ * | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
31107
+ * | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
31108
+ *
31109
+ * The two schedule models look different and are the same thing in
31110
+ * different coordinates: both answer "for this trigger, during which
31111
+ * weekly windows does the camera record". {@link RecordWindow} is that
31112
+ * question in one shape — Hikvision's ranges map straight onto it,
31113
+ * Reolink's mask expands into hour-aligned windows.
31114
+ *
31115
+ * ## Union, not intersection
31116
+ *
31117
+ * **The same fields exist on every camera.** What differs per device is
31118
+ * which VALUES that device accepts, and that is what {@link
31119
+ * RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
31120
+ * per field plus the schedule's own limits. A control a camera cannot
31121
+ * honour is rendered DISABLED WITH ITS REASON, never missing and never
31122
+ * dead: disabled must not look like broken.
31123
+ *
31124
+ * ## Refusal by name
31125
+ *
31126
+ * A write a camera cannot honour is refused with a sentence the operator
31127
+ * can read — never accepted and dropped. Both providers refuse through
31128
+ * {@link describeOnboardRefusal}, so the vocabulary is one function and
31129
+ * one test, not two hand-written vendor opinions.
31130
+ *
31131
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
31132
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
31133
+ * injected from `status`) reports the live values, and a single
31134
+ * `setSettings` mutation applies a partial change. No hand-written
31135
+ * settings-contribution methods.
31136
+ */
31137
+ /**
31138
+ * What makes the camera start recording during a window.
31139
+ *
31140
+ * The union of both vendors' vocabularies. `continuous` is Hikvision's
31141
+ * `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
31142
+ * object-class triggers are Reolink-only today and the smart-event ones
31143
+ * (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
31144
+ * firmwares measured — a camera that cannot record on a trigger simply
31145
+ * does not list it in `options.schedule.triggers`, and a window naming
31146
+ * it is REFUSED, not dropped.
31147
+ */
31148
+ var RecordTriggerSchema = _enum([
31149
+ "continuous",
31150
+ "motion",
31151
+ "person",
31152
+ "vehicle",
31153
+ "animal",
31154
+ "lineCrossing",
31155
+ "intrusion",
31156
+ "loitering",
31157
+ "alarmInput"
31158
+ ]);
31159
+ /**
31160
+ * One weekly recording window: "on `day`, from `startMinute` to
31161
+ * `endMinute`, record on `trigger`".
31162
+ *
31163
+ * `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
31164
+ * both firmwares enumerate). Minutes are local camera time since
31165
+ * midnight; `endMinute` may be 1440, meaning end of day — that is
31166
+ * Hikvision's literal `24:00` and Reolink's 24th mask slot, and
31167
+ * collapsing it to 0 would turn a whole-day window into an empty one.
31168
+ */
31169
+ var RecordWindowSchema = object({
31170
+ trigger: RecordTriggerSchema,
31171
+ day: number().int().min(0).max(6),
31172
+ startMinute: number().int().min(0).max(1439),
31173
+ endMinute: number().int().min(1).max(1440)
31174
+ });
31175
+ /** Status of one physical volume, as the camera itself describes it. */
31176
+ var OnboardStorageVolumeSchema = object({
31177
+ /** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
31178
+ id: string(),
31179
+ /** The camera's own name for it, when it gives one (`hddName`). */
31180
+ label: string().optional(),
31181
+ status: _enum([
31182
+ "ok",
31183
+ "unformatted",
31184
+ "error",
31185
+ "offline",
31186
+ "unknown"
31187
+ ]),
31188
+ /**
31189
+ * Total size in MB, or **null when the camera did not say**.
31190
+ *
31191
+ * Never 0 for an unreadable value: a measurement that failed is not a
31192
+ * measurement (D393), and a card whose size is unknown must not be
31193
+ * rendered as a card of size zero.
31194
+ */
31195
+ capacityMb: number().nullable(),
31196
+ /**
31197
+ * Free space in MB, or null when unknown.
31198
+ *
31199
+ * **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
31200
+ * 1439 both report exactly 11776 MB free — the fixed reserve a looping
31201
+ * card converges on once it has wrapped. At loop steady state the
31202
+ * number is identical whether the camera recorded yesterday or stopped
31203
+ * a month ago.
31204
+ */
31205
+ freeMb: number().nullable(),
31206
+ /** True when the camera reports the volume writable (`property` RW). */
31207
+ writable: boolean().optional()
31208
+ });
31209
+ object({
31210
+ storage: discriminatedUnion("kind", [
31211
+ object({
31212
+ kind: literal("present"),
31213
+ volumes: array(OnboardStorageVolumeSchema)
31214
+ }),
31215
+ object({
31216
+ kind: literal("absent"),
31217
+ reason: string()
31218
+ }),
31219
+ object({
31220
+ kind: literal("unknown"),
31221
+ reason: string()
31222
+ })
31223
+ ]),
31224
+ tracks: array(object({
31225
+ id: string(),
31226
+ enabled: boolean(),
31227
+ isVideo: boolean(),
31228
+ /** From the camera's own track description. Null when it does not say. */
31229
+ codec: string().nullable(),
31230
+ resolution: string().nullable(),
31231
+ /** Per-track overwrite flag, where the firmware keeps it per track. */
31232
+ overwriteWhenFull: boolean().nullable()
31233
+ })),
31234
+ /**
31235
+ * The track the write path targets — the enabled VIDEO one. Null when
31236
+ * no track could be identified, which is itself a refusal reason.
31237
+ */
31238
+ primaryTrackId: string().nullable(),
31239
+ /** Master "record to the card at all" switch. */
31240
+ enabled: boolean().nullable(),
31241
+ overwriteWhenFull: boolean().nullable(),
31242
+ preRecordSec: number().nullable(),
31243
+ postRecordSec: number().nullable(),
31244
+ /** Length of one recorded file, in minutes. */
31245
+ segmentMinutes: number().nullable(),
31246
+ /** The primary track's weekly windows, flattened. */
31247
+ windows: array(RecordWindowSchema),
31248
+ /**
31249
+ * How many windows the camera described that CamStack could NOT read —
31250
+ * an unrecognised trigger, an unparseable clock, a weekday it does not
31251
+ * name.
31252
+ *
31253
+ * A dropped window is work the reader threw away, and a schedule that
31254
+ * silently shows fewer rows than the camera holds is how an operator
31255
+ * saves back a schedule shorter than the one they were looking at
31256
+ * (D391). Non-zero means the window list is INCOMPLETE and a write
31257
+ * that replaces it would delete what was not shown — which is why a
31258
+ * provider reporting a non-zero count also reports the schedule as not
31259
+ * writable.
31260
+ */
31261
+ unreadableWindows: number(),
31262
+ /**
31263
+ * The camera is scheduled to record and has NO usable storage.
31264
+ *
31265
+ * A first-class fact because it is the fleet's most common silent
31266
+ * defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
31267
+ * to a card that is not there. Neither the schedule nor the storage
31268
+ * read says anything wrong on its own; only the pair does.
31269
+ */
31270
+ recordingToNowhere: boolean(),
31271
+ lastFetchedAt: number()
31272
+ });
31273
+ /** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
31274
+ var RangeSchema = object({
31275
+ min: number(),
31276
+ max: number(),
31277
+ step: number()
31278
+ });
31279
+ /**
31280
+ * The values a camera actually takes for a numeric field, when they are a SET
31281
+ * rather than a range.
31282
+ *
31283
+ * `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
31284
+ * (I91DN) on 2026-09-22 by writing each value and reading it back:
31285
+ *
31286
+ * - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
31287
+ * camera's "no limit" — `-1` and `4294967295` both land on it);
31288
+ * - post-record: `5, 10, 30, 60, 120, 300, 600`.
31289
+ *
31290
+ * Neither is expressible as a step: the first has a sentinel two billion away
31291
+ * from its neighbours, the second doubles and then jumps. A range that tried
31292
+ * would forbid values the camera takes AND permit values it silently replaces
31293
+ * with 5 — wrong in both directions at once.
31294
+ *
31295
+ * `sentinel` names the member that is not a duration, so a surface can render
31296
+ * "no limit" instead of `2147483647` seconds.
31297
+ */
31298
+ var AllowedValuesSchema = object({
31299
+ values: array(number()).min(1),
31300
+ sentinel: object({
31301
+ value: number(),
31302
+ meaning: _enum(["no-limit", "disabled"])
31303
+ }).optional()
31304
+ });
31305
+ /**
31306
+ * Per-field availability on ONE camera.
31307
+ *
31308
+ * The field exists on every camera — this says whether this one can be
31309
+ * read and whether it can be written, and `reason` says why not when
31310
+ * either is false. The UI renders the control DISABLED with the reason
31311
+ * rather than hiding it, so a limitation is legible instead of looking
31312
+ * like a missing feature.
31313
+ */
31314
+ var OnboardFieldSupportSchema = object({
31315
+ readable: boolean(),
31316
+ writable: boolean(),
31317
+ /** Required whenever `readable` or `writable` is false. */
31318
+ reason: string().optional()
31319
+ });
31320
+ /** What this camera's schedule model can express. */
31321
+ var OnboardScheduleSupportSchema = object({
31322
+ support: OnboardFieldSupportSchema,
31323
+ /**
31324
+ * The smallest time step the camera can express, in minutes.
31325
+ *
31326
+ * Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
31327
+ * 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
31328
+ * window whose edges are not a multiple of this is REFUSED rather than
31329
+ * quietly rounded — rounding is how an operator's 06:30 becomes 06:00
31330
+ * and nothing says so.
31331
+ */
31332
+ granularityMinutes: number(),
31333
+ /** Triggers this camera can record on. A window naming another is refused. */
31334
+ triggers: array(RecordTriggerSchema),
31335
+ /**
31336
+ * False when the camera stores ONE trigger per time range, so two
31337
+ * windows overlapping on the same day cannot carry different triggers.
31338
+ * True on Reolink, whose mask is per-trigger and independent.
31339
+ */
31340
+ supportsOverlappingTriggers: boolean()
31341
+ });
31342
+ var RecordingOnboardOptionsSchema = object({
31343
+ enabled: OnboardFieldSupportSchema,
31344
+ overwriteWhenFull: OnboardFieldSupportSchema,
31345
+ preRecordSec: OnboardFieldSupportSchema,
31346
+ preRecordSecRange: RangeSchema.optional(),
31347
+ /** Preferred over the range when the camera takes a SET, not a span. */
31348
+ preRecordSecAllowed: AllowedValuesSchema.optional(),
31349
+ postRecordSec: OnboardFieldSupportSchema,
31350
+ postRecordSecRange: RangeSchema.optional(),
31351
+ /** Preferred over the range when the camera takes a SET, not a span. */
31352
+ postRecordSecAllowed: AllowedValuesSchema.optional(),
31353
+ segmentMinutes: OnboardFieldSupportSchema,
31354
+ segmentMinutesRange: RangeSchema.optional(),
31355
+ /** Preferred over the range when the camera takes a SET, not a span. */
31356
+ segmentMinutesAllowed: AllowedValuesSchema.optional(),
31357
+ schedule: OnboardScheduleSupportSchema
31358
+ });
31359
+ /**
31360
+ * A partial change. Every field optional.
31361
+ *
31362
+ * Unlike the other `deviceConfig` caps, a provider here does **NOT**
31363
+ * silently ignore a field it cannot support — it refuses, by name,
31364
+ * through {@link describeOnboardRefusal}. Silence on a recording setting
31365
+ * is the failure D62 exists to prevent: the operator believes the camera
31366
+ * is recording the way the form says, and it is not.
31367
+ */
31368
+ var RecordingOnboardPatchSchema = object({
31369
+ enabled: boolean().optional(),
31370
+ overwriteWhenFull: boolean().optional(),
31371
+ preRecordSec: number().optional(),
31372
+ postRecordSec: number().optional(),
31373
+ segmentMinutes: number().optional(),
31374
+ /** The complete new window set for the primary track — not a delta. */
31375
+ windows: array(RecordWindowSchema).optional()
31376
+ });
31377
+ DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
31378
+ deviceId: number(),
31379
+ settings: RecordingOnboardPatchSchema
31380
+ }), _void(), {
31381
+ kind: "mutation",
31382
+ auth: "admin"
31383
+ });
31384
+ /**
31184
31385
  * A camera's own "record me NOW" LEVEL — a signal the device raises while
31185
31386
  * something it knows about is happening (a robot vacuum cleaning, a machine
31186
31387
  * running, a gate open) and lowers when it stops.
@@ -36474,24 +36675,6 @@ Object.freeze({
36474
36675
  addonId: null,
36475
36676
  access: "view"
36476
36677
  },
36477
- "events.getEventClipUrl": {
36478
- capName: "events",
36479
- capScope: "device",
36480
- addonId: null,
36481
- access: "view"
36482
- },
36483
- "events.getEvents": {
36484
- capName: "events",
36485
- capScope: "device",
36486
- addonId: null,
36487
- access: "view"
36488
- },
36489
- "events.getEventThumbnail": {
36490
- capName: "events",
36491
- capScope: "device",
36492
- addonId: null,
36493
- access: "view"
36494
- },
36495
36678
  "faceGallery.assignFace": {
36496
36679
  capName: "face-gallery",
36497
36680
  capScope: "system",
@@ -39366,224 +39549,236 @@ Object.freeze({
39366
39549
  addonId: null,
39367
39550
  access: "create"
39368
39551
  },
39369
- "recording.applyDeviceSettingsPatch": {
39552
+ "recording.getAvailability": {
39370
39553
  capName: "recording",
39371
- capScope: "system",
39554
+ capScope: "device",
39372
39555
  addonId: null,
39373
- access: "create"
39556
+ access: "view"
39374
39557
  },
39375
- "recording.cancelRelocateJob": {
39558
+ "recording.getDaysWithRecordings": {
39376
39559
  capName: "recording",
39377
- capScope: "system",
39560
+ capScope: "device",
39378
39561
  addonId: null,
39379
- access: "create"
39562
+ access: "view"
39380
39563
  },
39381
- "recording.cancelStorageMigrationMove": {
39564
+ "recording.getPlayback": {
39382
39565
  capName: "recording",
39383
- capScope: "system",
39566
+ capScope: "device",
39384
39567
  addonId: null,
39385
- access: "create"
39568
+ access: "view"
39386
39569
  },
39387
- "recording.deleteFootprint": {
39570
+ "recording.getPlaybackOptions": {
39388
39571
  capName: "recording",
39389
- capScope: "system",
39572
+ capScope: "device",
39390
39573
  addonId: null,
39391
- access: "delete"
39574
+ access: "view"
39392
39575
  },
39393
- "recording.getAvailability": {
39576
+ "recording.listSources": {
39394
39577
  capName: "recording",
39395
- capScope: "system",
39578
+ capScope: "device",
39396
39579
  addonId: null,
39397
39580
  access: "view"
39398
39581
  },
39399
- "recording.getAvailabilityBatch": {
39400
- capName: "recording",
39582
+ "recordingArchive.applyDeviceSettingsPatch": {
39583
+ capName: "recording-archive",
39401
39584
  capScope: "system",
39402
39585
  addonId: null,
39403
- access: "view"
39586
+ access: "create"
39404
39587
  },
39405
- "recording.getDaysWithRecordings": {
39406
- capName: "recording",
39588
+ "recordingArchive.cancelRelocateJob": {
39589
+ capName: "recording-archive",
39407
39590
  capScope: "system",
39408
39591
  addonId: null,
39409
- access: "view"
39592
+ access: "create"
39410
39593
  },
39411
- "recording.getDaysWithRecordingsBatch": {
39412
- capName: "recording",
39594
+ "recordingArchive.cancelStorageMigrationMove": {
39595
+ capName: "recording-archive",
39596
+ capScope: "system",
39597
+ addonId: null,
39598
+ access: "create"
39599
+ },
39600
+ "recordingArchive.deleteFootprint": {
39601
+ capName: "recording-archive",
39602
+ capScope: "system",
39603
+ addonId: null,
39604
+ access: "delete"
39605
+ },
39606
+ "recordingArchive.getAvailabilityBatch": {
39607
+ capName: "recording-archive",
39413
39608
  capScope: "system",
39414
39609
  addonId: null,
39415
39610
  access: "view"
39416
39611
  },
39417
- "recording.getDeviceConfig": {
39418
- capName: "recording",
39612
+ "recordingArchive.getDaysWithRecordingsBatch": {
39613
+ capName: "recording-archive",
39419
39614
  capScope: "system",
39420
39615
  addonId: null,
39421
39616
  access: "view"
39422
39617
  },
39423
- "recording.getDeviceLiveContribution": {
39424
- capName: "recording",
39618
+ "recordingArchive.getDeviceConfig": {
39619
+ capName: "recording-archive",
39425
39620
  capScope: "system",
39426
39621
  addonId: null,
39427
39622
  access: "view"
39428
39623
  },
39429
- "recording.getDeviceSettingsContribution": {
39430
- capName: "recording",
39624
+ "recordingArchive.getDeviceLiveContribution": {
39625
+ capName: "recording-archive",
39431
39626
  capScope: "system",
39432
39627
  addonId: null,
39433
39628
  access: "view"
39434
39629
  },
39435
- "recording.getPlacement": {
39436
- capName: "recording",
39630
+ "recordingArchive.getDeviceSettingsContribution": {
39631
+ capName: "recording-archive",
39437
39632
  capScope: "system",
39438
39633
  addonId: null,
39439
39634
  access: "view"
39440
39635
  },
39441
- "recording.getPlaybackManifest": {
39442
- capName: "recording",
39636
+ "recordingArchive.getPlacement": {
39637
+ capName: "recording-archive",
39443
39638
  capScope: "system",
39444
39639
  addonId: null,
39445
39640
  access: "view"
39446
39641
  },
39447
- "recording.getRelocateResidue": {
39448
- capName: "recording",
39642
+ "recordingArchive.getRelocateResidue": {
39643
+ capName: "recording-archive",
39449
39644
  capScope: "system",
39450
39645
  addonId: null,
39451
39646
  access: "view"
39452
39647
  },
39453
- "recording.getStatus": {
39454
- capName: "recording",
39648
+ "recordingArchive.getStatus": {
39649
+ capName: "recording-archive",
39455
39650
  capScope: "system",
39456
39651
  addonId: null,
39457
39652
  access: "view"
39458
39653
  },
39459
- "recording.getStorageMigrationMoveStatus": {
39460
- capName: "recording",
39654
+ "recordingArchive.getStorageMigrationMoveStatus": {
39655
+ capName: "recording-archive",
39461
39656
  capScope: "system",
39462
39657
  addonId: null,
39463
39658
  access: "view"
39464
39659
  },
39465
- "recording.getStorageUsage": {
39466
- capName: "recording",
39660
+ "recordingArchive.getStorageUsage": {
39661
+ capName: "recording-archive",
39467
39662
  capScope: "system",
39468
39663
  addonId: null,
39469
39664
  access: "view"
39470
39665
  },
39471
- "recording.listOpsLog": {
39472
- capName: "recording",
39666
+ "recordingArchive.listOpsLog": {
39667
+ capName: "recording-archive",
39473
39668
  capScope: "system",
39474
39669
  addonId: null,
39475
39670
  access: "view"
39476
39671
  },
39477
- "recording.listRelocateJobs": {
39478
- capName: "recording",
39672
+ "recordingArchive.listRelocateJobs": {
39673
+ capName: "recording-archive",
39479
39674
  capScope: "system",
39480
39675
  addonId: null,
39481
39676
  access: "view"
39482
39677
  },
39483
- "recording.locateSegment": {
39484
- capName: "recording",
39678
+ "recordingArchive.locateSegment": {
39679
+ capName: "recording-archive",
39485
39680
  capScope: "system",
39486
39681
  addonId: null,
39487
39682
  access: "view"
39488
39683
  },
39489
- "recording.pauseForStorageMigration": {
39490
- capName: "recording",
39684
+ "recordingArchive.pauseForStorageMigration": {
39685
+ capName: "recording-archive",
39491
39686
  capScope: "system",
39492
39687
  addonId: null,
39493
39688
  access: "create"
39494
39689
  },
39495
- "recording.planStorageRebalance": {
39496
- capName: "recording",
39690
+ "recordingArchive.planStorageRebalance": {
39691
+ capName: "recording-archive",
39497
39692
  capScope: "system",
39498
39693
  addonId: null,
39499
39694
  access: "view"
39500
39695
  },
39501
- "recording.pruneFootage": {
39502
- capName: "recording",
39696
+ "recordingArchive.pruneFootage": {
39697
+ capName: "recording-archive",
39503
39698
  capScope: "system",
39504
39699
  addonId: null,
39505
39700
  access: "create"
39506
39701
  },
39507
- "recording.readGopBytes": {
39508
- capName: "recording",
39702
+ "recordingArchive.readGopBytes": {
39703
+ capName: "recording-archive",
39509
39704
  capScope: "system",
39510
39705
  addonId: null,
39511
39706
  access: "view"
39512
39707
  },
39513
- "recording.readSegmentBytes": {
39514
- capName: "recording",
39708
+ "recordingArchive.readSegmentBytes": {
39709
+ capName: "recording-archive",
39515
39710
  capScope: "system",
39516
39711
  addonId: null,
39517
39712
  access: "view"
39518
39713
  },
39519
- "recording.readWindowBytes": {
39520
- capName: "recording",
39714
+ "recordingArchive.readWindowBytes": {
39715
+ capName: "recording-archive",
39521
39716
  capScope: "system",
39522
39717
  addonId: null,
39523
39718
  access: "view"
39524
39719
  },
39525
- "recording.reconcileLedgerAgainstDisk": {
39526
- capName: "recording",
39720
+ "recordingArchive.reconcileLedgerAgainstDisk": {
39721
+ capName: "recording-archive",
39527
39722
  capScope: "system",
39528
39723
  addonId: null,
39529
39724
  access: "create"
39530
39725
  },
39531
- "recording.refreshStorageLocationsForMigration": {
39532
- capName: "recording",
39726
+ "recordingArchive.refreshStorageLocationsForMigration": {
39727
+ capName: "recording-archive",
39533
39728
  capScope: "system",
39534
39729
  addonId: null,
39535
39730
  access: "create"
39536
39731
  },
39537
- "recording.relocateFootage": {
39538
- capName: "recording",
39732
+ "recordingArchive.relocateFootage": {
39733
+ capName: "recording-archive",
39539
39734
  capScope: "system",
39540
39735
  addonId: null,
39541
39736
  access: "create"
39542
39737
  },
39543
- "recording.renderClip": {
39544
- capName: "recording",
39738
+ "recordingArchive.renderClip": {
39739
+ capName: "recording-archive",
39545
39740
  capScope: "system",
39546
39741
  addonId: null,
39547
39742
  access: "create"
39548
39743
  },
39549
- "recording.renderGif": {
39550
- capName: "recording",
39744
+ "recordingArchive.renderGif": {
39745
+ capName: "recording-archive",
39551
39746
  capScope: "system",
39552
39747
  addonId: null,
39553
39748
  access: "create"
39554
39749
  },
39555
- "recording.rescanStorage": {
39556
- capName: "recording",
39750
+ "recordingArchive.rescanStorage": {
39751
+ capName: "recording-archive",
39557
39752
  capScope: "system",
39558
39753
  addonId: null,
39559
39754
  access: "create"
39560
39755
  },
39561
- "recording.resumeForStorageMigration": {
39562
- capName: "recording",
39756
+ "recordingArchive.resumeForStorageMigration": {
39757
+ capName: "recording-archive",
39563
39758
  capScope: "system",
39564
39759
  addonId: null,
39565
39760
  access: "create"
39566
39761
  },
39567
- "recording.setDeviceConfig": {
39568
- capName: "recording",
39762
+ "recordingArchive.setDeviceConfig": {
39763
+ capName: "recording-archive",
39569
39764
  capScope: "system",
39570
39765
  addonId: null,
39571
39766
  access: "create"
39572
39767
  },
39573
- "recording.setDevicePlacement": {
39574
- capName: "recording",
39768
+ "recordingArchive.setDevicePlacement": {
39769
+ capName: "recording-archive",
39575
39770
  capScope: "system",
39576
39771
  addonId: null,
39577
39772
  access: "create"
39578
39773
  },
39579
- "recording.startStorageMigrationMove": {
39580
- capName: "recording",
39774
+ "recordingArchive.startStorageMigrationMove": {
39775
+ capName: "recording-archive",
39581
39776
  capScope: "system",
39582
39777
  addonId: null,
39583
39778
  access: "create"
39584
39779
  },
39585
- "recording.startStorageRebalance": {
39586
- capName: "recording",
39780
+ "recordingArchive.startStorageRebalance": {
39781
+ capName: "recording-archive",
39587
39782
  capScope: "system",
39588
39783
  addonId: null,
39589
39784
  access: "create"
@@ -41888,21 +42083,6 @@ Object.freeze({
41888
42083
  form: "single",
41889
42084
  optional: false
41890
42085
  }],
41891
- "events.getEventClipUrl": [{
41892
- name: "deviceId",
41893
- form: "single",
41894
- optional: false
41895
- }],
41896
- "events.getEvents": [{
41897
- name: "deviceId",
41898
- form: "single",
41899
- optional: false
41900
- }],
41901
- "events.getEventThumbnail": [{
41902
- name: "deviceId",
41903
- form: "single",
41904
- optional: false
41905
- }],
41906
42086
  "faceGallery.getFaceByTrack": [{
41907
42087
  name: "deviceId",
41908
42088
  form: "single",
@@ -42821,107 +43001,117 @@ Object.freeze({
42821
43001
  form: "single",
42822
43002
  optional: false
42823
43003
  }],
42824
- "recording.deleteFootprint": [{
43004
+ "recording.getAvailability": [{
42825
43005
  name: "deviceId",
42826
43006
  form: "single",
42827
43007
  optional: false
42828
43008
  }],
42829
- "recording.getAvailability": [{
43009
+ "recording.getDaysWithRecordings": [{
42830
43010
  name: "deviceId",
42831
43011
  form: "single",
42832
43012
  optional: false
42833
43013
  }],
42834
- "recording.getAvailabilityBatch": [{
42835
- name: "deviceIds",
42836
- form: "array",
43014
+ "recording.getPlayback": [{
43015
+ name: "deviceId",
43016
+ form: "single",
42837
43017
  optional: false
42838
43018
  }],
42839
- "recording.getDaysWithRecordings": [{
43019
+ "recording.getPlaybackOptions": [{
42840
43020
  name: "deviceId",
42841
43021
  form: "single",
42842
43022
  optional: false
42843
43023
  }],
42844
- "recording.getDaysWithRecordingsBatch": [{
42845
- name: "deviceIds",
42846
- form: "array",
43024
+ "recording.listSources": [{
43025
+ name: "deviceId",
43026
+ form: "single",
42847
43027
  optional: false
42848
43028
  }],
42849
- "recording.getDeviceConfig": [{
43029
+ "recordingArchive.deleteFootprint": [{
42850
43030
  name: "deviceId",
42851
43031
  form: "single",
42852
43032
  optional: false
42853
43033
  }],
42854
- "recording.getPlaybackManifest": [{
43034
+ "recordingArchive.getAvailabilityBatch": [{
43035
+ name: "deviceIds",
43036
+ form: "array",
43037
+ optional: false
43038
+ }],
43039
+ "recordingArchive.getDaysWithRecordingsBatch": [{
43040
+ name: "deviceIds",
43041
+ form: "array",
43042
+ optional: false
43043
+ }],
43044
+ "recordingArchive.getDeviceConfig": [{
42855
43045
  name: "deviceId",
42856
43046
  form: "single",
42857
43047
  optional: false
42858
43048
  }],
42859
- "recording.listOpsLog": [{
43049
+ "recordingArchive.listOpsLog": [{
42860
43050
  name: "deviceId",
42861
43051
  form: "single",
42862
43052
  optional: true
42863
43053
  }],
42864
- "recording.locateSegment": [{
43054
+ "recordingArchive.locateSegment": [{
42865
43055
  name: "deviceId",
42866
43056
  form: "single",
42867
43057
  optional: false
42868
43058
  }],
42869
- "recording.pruneFootage": [{
43059
+ "recordingArchive.pruneFootage": [{
42870
43060
  name: "deviceId",
42871
43061
  form: "single",
42872
43062
  optional: false
42873
43063
  }],
42874
- "recording.readGopBytes": [{
43064
+ "recordingArchive.readGopBytes": [{
42875
43065
  name: "deviceId",
42876
43066
  form: "single",
42877
43067
  optional: false
42878
43068
  }],
42879
- "recording.readSegmentBytes": [{
43069
+ "recordingArchive.readSegmentBytes": [{
42880
43070
  name: "deviceId",
42881
43071
  form: "single",
42882
43072
  optional: false
42883
43073
  }],
42884
- "recording.readWindowBytes": [{
43074
+ "recordingArchive.readWindowBytes": [{
42885
43075
  name: "deviceId",
42886
43076
  form: "single",
42887
43077
  optional: false
42888
43078
  }],
42889
- "recording.reconcileLedgerAgainstDisk": [{
43079
+ "recordingArchive.reconcileLedgerAgainstDisk": [{
42890
43080
  name: "deviceId",
42891
43081
  form: "single",
42892
43082
  optional: true
42893
43083
  }],
42894
- "recording.relocateFootage": [{
43084
+ "recordingArchive.relocateFootage": [{
42895
43085
  name: "deviceId",
42896
43086
  form: "single",
42897
43087
  optional: true
42898
43088
  }],
42899
- "recording.renderClip": [{
43089
+ "recordingArchive.renderClip": [{
42900
43090
  name: "deviceId",
42901
43091
  form: "single",
42902
43092
  optional: false
42903
43093
  }],
42904
- "recording.renderGif": [{
43094
+ "recordingArchive.renderGif": [{
42905
43095
  name: "deviceId",
42906
43096
  form: "single",
42907
43097
  optional: false
42908
43098
  }],
42909
- "recording.rescanStorage": [{
43099
+ "recordingArchive.rescanStorage": [{
42910
43100
  name: "deviceId",
42911
43101
  form: "single",
42912
43102
  optional: false
42913
43103
  }],
42914
- "recording.setDeviceConfig": [{
43104
+ "recordingArchive.setDeviceConfig": [{
42915
43105
  name: "deviceId",
42916
43106
  form: "single",
42917
43107
  optional: false
42918
43108
  }],
42919
- "recording.setDevicePlacement": [{
43109
+ "recordingArchive.setDevicePlacement": [{
42920
43110
  name: "deviceId",
42921
43111
  form: "single",
42922
43112
  optional: false
42923
43113
  }],
42924
- "recording.startStorageMigrationMove": [{
43114
+ "recordingArchive.startStorageMigrationMove": [{
42925
43115
  name: "deviceId",
42926
43116
  form: "single",
42927
43117
  optional: true
@@ -43884,7 +44074,7 @@ var AdminUIAddon = class extends BaseAddon {
43884
44074
  capability: adminUiCapability,
43885
44075
  provider: {
43886
44076
  getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
43887
- getVersion: async () => ({ version: "1.2.257" })
44077
+ getVersion: async () => ({ version: "1.2.259" })
43888
44078
  }
43889
44079
  }];
43890
44080
  }