@camstack/addon-model-studio 1.1.165 → 1.1.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. package/dist/{MotionZonesSettings-B6DWvwTt.mjs → MotionZonesSettings-sJUloF9d.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-GC9AJ7u9.mjs → PrivacyMaskSettings-v_y0uLR7.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-CDRtXS44.mjs → SceneMonitorEditor-DW8-_EvS.mjs} +3 -3
  4. package/dist/_stub.js +10 -10
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-C3EH8dXO.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-C6ovYeg2.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BeO6iU8W.mjs +26 -0
  7. package/dist/{hostInit-D7wKaStx.mjs → hostInit-DtYZHu6O.mjs} +2 -2
  8. package/dist/model-studio.addon.js +1143 -816
  9. package/dist/model-studio.addon.mjs +1143 -816
  10. package/dist/{player-overlays-C5aNbV6c.mjs → player-overlays-DZI3Us9O.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-B6Yj9AVT.mjs → responsive-6KHz1FeQ.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-DoFpRkTB.mjs → scene-monitor-copy-pDRHUCNN.mjs} +1 -1
  14. package/dist/{square-CbUN1Re_.mjs → square-G5IxIOOA.mjs} +1 -1
  15. package/dist/{trash-2-DalUiaTk.mjs → trash-2-BQ6DXX-P.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CMIDBF8a.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-XdC34FqG.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CrxDjxBh.mjs +0 -26
@@ -5863,7 +5863,7 @@ var ZodIssueCode = {
5863
5863
  var ZodFirstPartyTypeKind;
5864
5864
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5865
5865
  //#endregion
5866
- //#region ../types/dist/sleep-i3eUVc-d.mjs
5866
+ //#region ../types/dist/sleep-PEo0-Fz9.mjs
5867
5867
  /**
5868
5868
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5869
5869
  * window to float samples (D455).
@@ -6999,6 +6999,24 @@ function normalizeAddonInitResult(result) {
6999
6999
  if (Array.isArray(result)) return { providers: result };
7000
7000
  return result;
7001
7001
  }
7002
+ /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
7003
+ var PeerBytesTicketSchema = object({
7004
+ /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
7005
+ url: string().min(1),
7006
+ /**
7007
+ * The HOST node this URL means something on — the hub or a named agent,
7008
+ * never a runner. {@link AddonPeerBytes.open} compares it to its own and
7009
+ * refuses `cross-node` by name when they differ, without dialling.
7010
+ */
7011
+ hostNodeId: string().min(1),
7012
+ expiresAtMs: number().int().nonnegative(),
7013
+ /**
7014
+ * What the producer DECLARED the body to be, when it knows — `null` when it
7015
+ * does not. Never `0` for unknown (D393): a consumer sizing a bound off this
7016
+ * must be able to tell "the producer did not say" from "the body is empty".
7017
+ */
7018
+ declaredBytes: number().int().nonnegative().nullable()
7019
+ });
7002
7020
  /** Shared Zod schemas used across streaming capabilities. */
7003
7021
  var CamProfileSchema = _enum([
7004
7022
  "high",
@@ -8209,7 +8227,7 @@ var AdoptionJobSchema = object({
8209
8227
  * component's original options — detection to the detection-pipeline wrapper
8210
8228
  * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
8211
8229
  * (which was always first-class; the switch was a veneer over
8212
- * `recording.setDeviceConfig`), notifications to a notification-center
8230
+ * `recordingArchive.setDeviceConfig`), notifications to a notification-center
8213
8231
  * per-device setting, the two camera planes to their own components.
8214
8232
  *
8215
8233
  * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
@@ -8235,7 +8253,7 @@ var AdoptionJobSchema = object({
8235
8253
  * | `stream-broker` | `deviceManager.setDisabled` | `StreamBrokerManager.reconcileAllCatalogs` releases the brokers; `ensureBroker` refuses re-creation |
8236
8254
  * | `object-detection` | `deviceManager.setWrapperActive('detection-pipeline')` | `PipelineSettingsStore.resolvePipelineForDevice` returns `{ steps: [], audio: null }` |
8237
8255
  * | `audio-analysis` | `deviceManager.setWrapperActive('audio-analysis')` | `AudioSubscriptionController.subscribeAudioStream` returns `null` before opening the stream |
8238
- * | `recording` | `recording.setDeviceConfig` → `RecordingConfig.enabled` | `band-decision.shouldRecord` returns false; the controller detaches the device |
8256
+ * | `recording` | `recordingArchive.setDeviceConfig` → `RecordingConfig.enabled` | `band-decision.shouldRecord` returns false; the controller detaches the device |
8239
8257
  * | `notifications` | `notificationRules.setDeviceMuted` | `NotificationCenter.evaluateAndEnqueue` returns before any rule is evaluated |
8240
8258
  * | `privacy-mask` | `privacyMask.setMask({ enabled })` → the CAMERA | the camera blanks the masked regions itself; every stream and recording carries the black boxes |
8241
8259
  * | `device-audio` | `privacyMask.setAudioEnabled` → the CAMERA | the camera stops encoding an audio track at all; every consumer sees silent video |
@@ -12151,58 +12169,6 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
12151
12169
  auth: "admin"
12152
12170
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
12153
12171
  DeviceType.Camera;
12154
- /**
12155
- * The signals a device can emit to WAKE its own stream.
12156
- *
12157
- * A camera whose stream is built on demand sleeps until something asks for it,
12158
- * and "something" cannot be a consumer that is merely attached — a Frigate-style
12159
- * puller holds a session open for ever, and treating that as demand would keep
12160
- * a battery camera awake for ever, which is the whole thing the battery is for
12161
- * (D173). So the wake has to come from the CAMERA: an event it noticed by
12162
- * itself, with no stream running.
12163
- *
12164
- * ## The vocabulary is the PROVIDER'S, not ours
12165
- *
12166
- * Like `consumables`, this cap declares no vocabulary of its own. A provider
12167
- * names each signal with a `code` it chooses and a `label` an operator reads.
12168
- * Reolink offers motion and camera-native detection; another provider may offer
12169
- * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
12170
- * yet. A fixed enum here would mean every new signal is a framework release.
12171
- *
12172
- * It is deliberately NOT derived from the caps a device already binds. Whether
12173
- * a camera CAN push firmware motion is expressed by `motionSources` containing
12174
- * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
12175
- * binding — but both answer "what drives the detection pipeline", which is a
12176
- * different question from "what may wake a sleeping stream". A camera can do
12177
- * the first and not be trusted with the second, and the operator picks per
12178
- * camera. Two questions, two authorities.
12179
- *
12180
- * ## Availability is not permission
12181
- *
12182
- * `listSignals` says what the device CAN emit. Whether a given signal actually
12183
- * wakes the stream is the operator's per-camera choice, held by the broker
12184
- * alongside the cooldown — see the stream-broker cap's wake settings. A
12185
- * provider declaring a signal is not a provider enabling it.
12186
- */
12187
- /** One signal a device can emit. */
12188
- var StreamSignalSchema = object({
12189
- /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
12190
- code: string().min(1),
12191
- /** What an operator reads in the picker. The provider's own wording. */
12192
- label: string().min(1),
12193
- /**
12194
- * Whether the provider recommends this signal ON when a camera is first set
12195
- * up. A provider knows which of its signals are cheap and reliable; an
12196
- * operator should not have to discover that by trial. Reolink recommends
12197
- * both of its own.
12198
- */
12199
- recommended: boolean()
12200
- });
12201
- object({
12202
- signals: array(StreamSignalSchema),
12203
- lastFetchedAt: number()
12204
- });
12205
- Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
12206
12172
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
12207
12173
  var StreamFormatSchema = _enum([
12208
12174
  "webrtc",
@@ -13582,6 +13548,97 @@ method(object({ codec: string() }), boolean()), method(_void(), object({
13582
13548
  });
13583
13549
  DeviceType.Camera;
13584
13550
  /**
13551
+ * device-admin-link — "this device has a management page of its own, and here
13552
+ * is its address".
13553
+ *
13554
+ * ## Why this is not a `deviceConfig` cap
13555
+ *
13556
+ * There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
13557
+ * can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
13558
+ * patch back through a setter; it costs a `builderId` reducer in
13559
+ * `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
13560
+ * renders a form section. This cap answers ONE question with ONE read and
13561
+ * renders a button. Nothing about it is a form, so it carries no `deviceConfig`
13562
+ * block, no `settings`, no `runtimeState` and no reducer — exactly like
13563
+ * `reboot`, the other pure-RPC device-native cap.
13564
+ *
13565
+ * ## Absent, and the difference between "no page" and "we cannot say"
13566
+ *
13567
+ * The two are answered at DIFFERENT layers, on purpose:
13568
+ *
13569
+ * - **"We cannot say"** → the provider never registers the cap for that
13570
+ * device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
13571
+ * fan are reached only through a vendor cloud; there is no address to hand
13572
+ * out and no page to open. A Tuya plug, a Wyze camera and a Gree air
13573
+ * conditioner DO have a LAN IP, and still have no HTTP management page
13574
+ * behind it. None of them register, so `deviceManager.getBindings` never
13575
+ * lists the cap and no surface asks.
13576
+ * - **"This device has no page, and I know that"** → the provider registers
13577
+ * and `getAdminLink` returns `null`. This is the answer for a device whose
13578
+ * sibling DOES have a page: a Reolink battery camera reached over UDP by
13579
+ * `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
13580
+ * transport, a Home Assistant broker authenticated by supervisor token
13581
+ * (which carries no `baseUrl` at all).
13582
+ *
13583
+ * Both draw NOTHING. A button that opens a browser error is worse than no
13584
+ * button, and D62 is the same rule from the other side: an off switch is
13585
+ * reported off, never made to look broken. There is no third state where the
13586
+ * UI renders a disabled button "because the device might have a page".
13587
+ *
13588
+ * ## The URL never carries credentials
13589
+ *
13590
+ * Not in userinfo, not in a query string. Every provider builds through
13591
+ * `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
13592
+ * scheme and path as separate arguments — there is no parameter a secret could
13593
+ * arrive in — and re-checks its own output for the `scheme://user:pass@` shape
13594
+ * that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
13595
+ * output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
13596
+ * keeps providers from hand-rolling one anyway.
13597
+ *
13598
+ * This matters here more than anywhere else in the repo, because every provider
13599
+ * that knows a device's host knows its PASSWORD too: `{ host, port, username,
13600
+ * password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
13601
+ * and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
13602
+ * camera's own page will ask for its own login. That is correct, and pre-
13603
+ * filling it is the operator's business, not ours.
13604
+ *
13605
+ * ## It is a LAN fact
13606
+ *
13607
+ * The URL addresses the device where the NODE can see it. It is not proxied,
13608
+ * not made reachable from outside, and not sent anywhere. A surface renders it
13609
+ * as a link the operator's own browser follows, on the operator's own network,
13610
+ * or renders nothing.
13611
+ */
13612
+ /**
13613
+ * Whose page is it. The distinction is for the OPERATOR, who needs to know
13614
+ * before clicking whether he is about to land on a camera's own web server or
13615
+ * inside Home Assistant.
13616
+ */
13617
+ var AdminLinkTargetEnum = _enum(["device", "integration"]);
13618
+ var DeviceAdminLinkSchema = object({
13619
+ /**
13620
+ * Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
13621
+ * free of userinfo and of any credential-shaped query key.
13622
+ */
13623
+ url: string(),
13624
+ /**
13625
+ * What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
13626
+ * The PROVIDER names it, because only the provider knows what the page is;
13627
+ * a UI that invented the label from the addon id would call the Home
13628
+ * Assistant device page "Provider Homeassistant".
13629
+ */
13630
+ label: string(),
13631
+ target: AdminLinkTargetEnum,
13632
+ /**
13633
+ * Host the URL points at, without scheme, port or path — for the tooltip, so
13634
+ * an operator can see WHERE the button goes before he follows it. Redundant
13635
+ * with `url` by construction; carried separately so no surface has to parse
13636
+ * a URL to show it.
13637
+ */
13638
+ host: string()
13639
+ });
13640
+ method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
13641
+ /**
13585
13642
  * Identity envelope for a device's upstream-system metadata.
13586
13643
  *
13587
13644
  * Two jobs:
@@ -13909,97 +13966,6 @@ method(object({ integrationId: string() }), object({ filters: array(AdoptionFilt
13909
13966
  auth: "admin"
13910
13967
  });
13911
13968
  /**
13912
- * device-admin-link — "this device has a management page of its own, and here
13913
- * is its address".
13914
- *
13915
- * ## Why this is not a `deviceConfig` cap
13916
- *
13917
- * There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
13918
- * can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
13919
- * patch back through a setter; it costs a `builderId` reducer in
13920
- * `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
13921
- * renders a form section. This cap answers ONE question with ONE read and
13922
- * renders a button. Nothing about it is a form, so it carries no `deviceConfig`
13923
- * block, no `settings`, no `runtimeState` and no reducer — exactly like
13924
- * `reboot`, the other pure-RPC device-native cap.
13925
- *
13926
- * ## Absent, and the difference between "no page" and "we cannot say"
13927
- *
13928
- * The two are answered at DIFFERENT layers, on purpose:
13929
- *
13930
- * - **"We cannot say"** → the provider never registers the cap for that
13931
- * device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
13932
- * fan are reached only through a vendor cloud; there is no address to hand
13933
- * out and no page to open. A Tuya plug, a Wyze camera and a Gree air
13934
- * conditioner DO have a LAN IP, and still have no HTTP management page
13935
- * behind it. None of them register, so `deviceManager.getBindings` never
13936
- * lists the cap and no surface asks.
13937
- * - **"This device has no page, and I know that"** → the provider registers
13938
- * and `getAdminLink` returns `null`. This is the answer for a device whose
13939
- * sibling DOES have a page: a Reolink battery camera reached over UDP by
13940
- * `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
13941
- * transport, a Home Assistant broker authenticated by supervisor token
13942
- * (which carries no `baseUrl` at all).
13943
- *
13944
- * Both draw NOTHING. A button that opens a browser error is worse than no
13945
- * button, and D62 is the same rule from the other side: an off switch is
13946
- * reported off, never made to look broken. There is no third state where the
13947
- * UI renders a disabled button "because the device might have a page".
13948
- *
13949
- * ## The URL never carries credentials
13950
- *
13951
- * Not in userinfo, not in a query string. Every provider builds through
13952
- * `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
13953
- * scheme and path as separate arguments — there is no parameter a secret could
13954
- * arrive in — and re-checks its own output for the `scheme://user:pass@` shape
13955
- * that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
13956
- * output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
13957
- * keeps providers from hand-rolling one anyway.
13958
- *
13959
- * This matters here more than anywhere else in the repo, because every provider
13960
- * that knows a device's host knows its PASSWORD too: `{ host, port, username,
13961
- * password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
13962
- * and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
13963
- * camera's own page will ask for its own login. That is correct, and pre-
13964
- * filling it is the operator's business, not ours.
13965
- *
13966
- * ## It is a LAN fact
13967
- *
13968
- * The URL addresses the device where the NODE can see it. It is not proxied,
13969
- * not made reachable from outside, and not sent anywhere. A surface renders it
13970
- * as a link the operator's own browser follows, on the operator's own network,
13971
- * or renders nothing.
13972
- */
13973
- /**
13974
- * Whose page is it. The distinction is for the OPERATOR, who needs to know
13975
- * before clicking whether he is about to land on a camera's own web server or
13976
- * inside Home Assistant.
13977
- */
13978
- var AdminLinkTargetEnum = _enum(["device", "integration"]);
13979
- var DeviceAdminLinkSchema = object({
13980
- /**
13981
- * Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
13982
- * free of userinfo and of any credential-shaped query key.
13983
- */
13984
- url: string(),
13985
- /**
13986
- * What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
13987
- * The PROVIDER names it, because only the provider knows what the page is;
13988
- * a UI that invented the label from the addon id would call the Home
13989
- * Assistant device page "Provider Homeassistant".
13990
- */
13991
- label: string(),
13992
- target: AdminLinkTargetEnum,
13993
- /**
13994
- * Host the URL points at, without scheme, port or path — for the tooltip, so
13995
- * an operator can see WHERE the button goes before he follows it. Redundant
13996
- * with `url` by construction; carried separately so no surface has to parse
13997
- * a URL to show it.
13998
- */
13999
- host: string()
14000
- });
14001
- method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
14002
- /**
14003
13969
  * `device-export` — collection cap for addons that export camstack
14004
13970
  * devices to external ecosystems (HomeAssistant via MQTT discovery,
14005
13971
  * HomeKit/HAP, Alexa Smart Home, …).
@@ -24125,6 +24091,58 @@ method(_void(), ProviderInfoSchema, { auth: "admin" }), method(object({ config:
24125
24091
  kind: "mutation",
24126
24092
  auth: "admin"
24127
24093
  });
24094
+ /**
24095
+ * The signals a device can emit to WAKE its own stream.
24096
+ *
24097
+ * A camera whose stream is built on demand sleeps until something asks for it,
24098
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
24099
+ * puller holds a session open for ever, and treating that as demand would keep
24100
+ * a battery camera awake for ever, which is the whole thing the battery is for
24101
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
24102
+ * itself, with no stream running.
24103
+ *
24104
+ * ## The vocabulary is the PROVIDER'S, not ours
24105
+ *
24106
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
24107
+ * names each signal with a `code` it chooses and a `label` an operator reads.
24108
+ * Reolink offers motion and camera-native detection; another provider may offer
24109
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
24110
+ * yet. A fixed enum here would mean every new signal is a framework release.
24111
+ *
24112
+ * It is deliberately NOT derived from the caps a device already binds. Whether
24113
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
24114
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
24115
+ * binding — but both answer "what drives the detection pipeline", which is a
24116
+ * different question from "what may wake a sleeping stream". A camera can do
24117
+ * the first and not be trusted with the second, and the operator picks per
24118
+ * camera. Two questions, two authorities.
24119
+ *
24120
+ * ## Availability is not permission
24121
+ *
24122
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
24123
+ * wakes the stream is the operator's per-camera choice, held by the broker
24124
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
24125
+ * provider declaring a signal is not a provider enabling it.
24126
+ */
24127
+ /** One signal a device can emit. */
24128
+ var StreamSignalSchema = object({
24129
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
24130
+ code: string().min(1),
24131
+ /** What an operator reads in the picker. The provider's own wording. */
24132
+ label: string().min(1),
24133
+ /**
24134
+ * Whether the provider recommends this signal ON when a camera is first set
24135
+ * up. A provider knows which of its signals are cheap and reliable; an
24136
+ * operator should not have to discover that by trial. Reolink recommends
24137
+ * both of its own.
24138
+ */
24139
+ recommended: boolean()
24140
+ });
24141
+ object({
24142
+ signals: array(StreamSignalSchema),
24143
+ lastFetchedAt: number()
24144
+ });
24145
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
24128
24146
  /** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
24129
24147
  var ProfileSettingsSchemaBridge = unknown().nullable();
24130
24148
  var ProfileSettingsBagSchema = record(string(), unknown());
@@ -24697,6 +24715,7 @@ _enum([
24697
24715
  "sleeping",
24698
24716
  "camera-refused",
24699
24717
  "no-keyframe",
24718
+ "decode-failed",
24700
24719
  "no-catalog-row",
24701
24720
  "unsupported",
24702
24721
  "unknown-device",
@@ -24971,6 +24990,32 @@ var ClipBytesSchema = object({
24971
24990
  durationMs: number().positive().optional()
24972
24991
  });
24973
24992
  /**
24993
+ * Where a clip's finished bytes can be TAKEN (D613) — the answer to
24994
+ * {@link videoclipsCapability.methods.offerClipBytes}.
24995
+ *
24996
+ * Everything {@link ClipBytesSchema} carries except the bytes themselves, plus
24997
+ * the one-shot ticket that leads to them. The metadata is answered BEFORE the
24998
+ * transfer on purpose: a consumer learns which twin it got, what to call the
24999
+ * file and how long the clip runs without having to read a byte, so a decision
25000
+ * it would make on that metadata (a wrong twin, an implausible duration) costs
25001
+ * no transfer at all.
25002
+ */
25003
+ var ClipBytesOfferSchema = object({
25004
+ /**
25005
+ * One shot, seconds-long, loopback, on the PROVIDER's own host. Open it with
25006
+ * `ctx.peerBytes.open(...)`, which refuses a ticket from another node by
25007
+ * name rather than dialling a port that means something else here.
25008
+ */
25009
+ ticket: PeerBytesTicketSchema,
25010
+ contentType: string(),
25011
+ /** Suggested filename, extension included. */
25012
+ name: string(),
25013
+ /** Which twin was actually served — see {@link ClipBytesSchema.served}. */
25014
+ served: CamProfileSchema,
25015
+ /** See {@link ClipBytesSchema.durationMs}. Absent when nothing measured it. */
25016
+ durationMs: number().positive().optional()
25017
+ });
25018
+ /**
24974
25019
  * Where a clip's STREAM can be dialled (D597) — the answer to
24975
25020
  * {@link videoclipsCapability.methods.dialClipStream}.
24976
25021
  *
@@ -25046,6 +25091,44 @@ var ClipStreamDialSchema = object({
25046
25091
  /** Why `servedAudio` is `none` although sound was asked for. */
25047
25092
  audioReason: ClipStreamAudioReasonSchema.optional()
25048
25093
  });
25094
+ /**
25095
+ * What a surface may DRAW for this provider's clips — the answer to
25096
+ * {@link videoclipsCapability.methods.getPlaybackOptions} (D612).
25097
+ *
25098
+ * The envelope is a PROVIDER fact, not a clip fact, and that is measured, not
25099
+ * assumed: the broker's `chooseClipPath` reads exactly two inputs — whether
25100
+ * `dialClipStream` and `readClipBytes` are wired — and both are constants of
25101
+ * the broker's own closure over the provider's methods. The `profile` it is
25102
+ * handed is explicitly not read. So every clip of a provider is served the
25103
+ * same way, and a per-clip channel carried a value that could not vary. The
25104
+ * per-clip `clipTransport` server message was removed for exactly that reason.
25105
+ *
25106
+ * Queried per camera, before a clip is picked, so a control is rendered or
25107
+ * DISABLED rather than offered and refused at play time (D62: a disabled
25108
+ * control reads as unavailable, one that undoes the gesture reads as broken).
25109
+ */
25110
+ var ClipPlaybackOptionsSchema = object({
25111
+ /**
25112
+ * How this provider's clips reach the player. `stream` is the provider's
25113
+ * forward-only fMP4 (D597); `file` is one bounded by-handle fetch of the
25114
+ * whole clip, `stbl` indexed (D575).
25115
+ */
25116
+ transport: _enum(["stream", "file"]),
25117
+ /** `forward` = only ahead of the playhead. `free` = anywhere. */
25118
+ seek: _enum(["forward", "free"]),
25119
+ /** Frame-step BACKWARD is meaningful. Forward always is. */
25120
+ stepBack: boolean(),
25121
+ /** Whether the scrub gesture is served, as opposed to refused by name. */
25122
+ scrub: boolean(),
25123
+ /**
25124
+ * The rates that can be delivered, ascending, always containing `1`. The
25125
+ * viewer draws its picker from this and from nothing else — a constant it
25126
+ * keeps instead is the second authority that produced the defect: `8` and
25127
+ * `16` were offered, the broker clamped them to `4`, and no line anywhere
25128
+ * said so. `0` is not a member: pause is the absence of a rate.
25129
+ */
25130
+ rates: array(number().positive()).min(1).readonly()
25131
+ });
25049
25132
  var ClipSourceAvailabilitySchema = object({
25050
25133
  state: _enum([
25051
25134
  "ok",
@@ -25205,6 +25288,29 @@ DeviceType.Camera, method(object({
25205
25288
  }), ClipBytesSchema, {
25206
25289
  kind: "query",
25207
25290
  auth: "protected"
25291
+ }), optionalMethod(object({
25292
+ deviceId: number(),
25293
+ clipId: string().min(1),
25294
+ /** WHICH provider holds the bytes — see `readClipBytes.provider`. */
25295
+ provider: string().min(1),
25296
+ /** Which twin — `low | mid` → the sub file, `high` → the main twin. */
25297
+ profile: CamProfileSchema.optional(),
25298
+ /**
25299
+ * The CALLER's byte bound, so an over-size clip is refused before the
25300
+ * camera is touched rather than after. Capped by
25301
+ * {@link VIDEOCLIPS_MAX_OFFER_BYTES} whatever is passed; absent means
25302
+ * that ceiling.
25303
+ */
25304
+ maxBytes: number().int().positive().optional(),
25305
+ /**
25306
+ * The operator's authorisation to wake a sleeping camera for this
25307
+ * read. Absent — the default — means a sleeping standalone battery
25308
+ * camera is REFUSED by name, before any session is opened.
25309
+ */
25310
+ wake: ClipWakeSchema.optional()
25311
+ }), ClipBytesOfferSchema, {
25312
+ kind: "query",
25313
+ auth: "protected"
25208
25314
  }), optionalMethod(object({
25209
25315
  deviceId: number(),
25210
25316
  clipId: string().min(1),
@@ -25226,6 +25332,15 @@ DeviceType.Camera, method(object({
25226
25332
  }), ClipStreamDialSchema, {
25227
25333
  kind: "query",
25228
25334
  auth: "protected"
25335
+ }), optionalMethod(object({
25336
+ deviceId: number(),
25337
+ /** WHICH provider to ask — the `addonId` a {@link ClipSourceSchema}
25338
+ * row carries. Required for the same reason `listClips` requires it:
25339
+ * a collection cap has no "the bound one" to resolve to (D554). */
25340
+ provider: string().min(1)
25341
+ }), ClipPlaybackOptionsSchema, {
25342
+ kind: "query",
25343
+ auth: "protected"
25229
25344
  });
25230
25345
  /**
25231
25346
  * Optional client-side hints sent at session creation to help the provider
@@ -26310,6 +26425,143 @@ DeviceType.Camera, method(object({ deviceId: number() }), CameraCredentialsSchem
26310
26425
  kind: "query",
26311
26426
  auth: "admin"
26312
26427
  });
26428
+ /**
26429
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
26430
+ * page.
26431
+ *
26432
+ * ## Why this is a capability and not an addon settings schema
26433
+ *
26434
+ * It was one, and it did not render. The addon declared the editor as a
26435
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
26436
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
26437
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
26438
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
26439
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
26440
+ * not on it "falls off silently".
26441
+ *
26442
+ * Adding a fifth name to that list would have been the wrong fix twice over:
26443
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
26444
+ * beside PTZ and motion zones on the camera itself. The device page is
26445
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
26446
+ * and this cap carries its section the way `recording` does, by RETURNING it
26447
+ * from `getDeviceSettingsContribution`.
26448
+ *
26449
+ * Seven other widgets are still declared the other way, through a
26450
+ * `deviceConfig.ui` block the framework derives a section from. That route
26451
+ * gives the addon no say in where its own panel lands and no way to decline
26452
+ * for a device the panel does not suit, which is why this one does not use it.
26453
+ *
26454
+ * ## Why one addon may implement it
26455
+ *
26456
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
26457
+ * itself. Nothing else declares a composite camera, so nothing else has a
26458
+ * layout — and the device-scoped route means the widget asks THE camera, not
26459
+ * "the camera-grid addon", which is what let the old custom-action pair be
26460
+ * reached only by a caller that already knew the addon id.
26461
+ *
26462
+ * ## The tab
26463
+ *
26464
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
26465
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
26466
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
26467
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
26468
+ * next to "PTZ").
26469
+ */
26470
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
26471
+ var GridNormalizedRectSchema = object({
26472
+ x: number().min(0).max(1),
26473
+ y: number().min(0).max(1),
26474
+ width: number().gt(0).max(1),
26475
+ height: number().gt(0).max(1)
26476
+ });
26477
+ /**
26478
+ * One source camera, the part of its picture taken, and where that part lands.
26479
+ *
26480
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
26481
+ * — a profile switch, a firmware update, a substream that comes back different
26482
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
26483
+ * which is the class of bug nobody files.
26484
+ */
26485
+ var GridLayoutCellSchema = object({
26486
+ deviceId: number().int().positive(),
26487
+ /** The part of the SOURCE taken, normalized against the source. */
26488
+ source: GridNormalizedRectSchema,
26489
+ /** Where it lands, normalized against the CANVAS. */
26490
+ cell: GridNormalizedRectSchema
26491
+ });
26492
+ /**
26493
+ * Which profiles this grid can actually compose, and why not.
26494
+ *
26495
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
26496
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
26497
+ * the sources, because "this grid has no low" is not a finding — "615 has no
26498
+ * low" is, and it is the one an operator can act on.
26499
+ */
26500
+ var GridProfileOfferSchema = object({
26501
+ profile: _enum([
26502
+ "high",
26503
+ "mid",
26504
+ "low"
26505
+ ]),
26506
+ offered: boolean(),
26507
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
26508
+ missingSources: array(number().int().positive()),
26509
+ /**
26510
+ * The canvas this profile composes onto, `WxH`, or empty when it is not
26511
+ * offered. DERIVED from the cells and the sources' own size at this profile —
26512
+ * it is reported because nothing else in the system would ever say what the
26513
+ * grid came out as, and because it is the number an operator would otherwise
26514
+ * expect to type.
26515
+ */
26516
+ canvas: string(),
26517
+ /**
26518
+ * Whether this profile is PUBLISHED, of the ones the grid could serve.
26519
+ *
26520
+ * A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
26521
+ * a 4K canvas built from 4K decodes — something to opt into, not something a
26522
+ * viewer's adaptive should be handed by climbing to the top rung it can see.
26523
+ * Default is `mid` + `low`.
26524
+ */
26525
+ published: boolean()
26526
+ });
26527
+ var GridLayoutViewSchema = object({
26528
+ /** The persisted grid row this camera was declared from. */
26529
+ instanceId: string(),
26530
+ deviceId: number().int().nonnegative(),
26531
+ name: string(),
26532
+ /**
26533
+ * NO canvas size. A grid's resolution is not authored: each profile derives
26534
+ * its own from the cells and its sources' dimensions. The two numbers that
26535
+ * used to be here were a text field that silently decided both how much the
26536
+ * composite cost and how sharp it was — see `profiles[].canvas` for what it
26537
+ * came out as.
26538
+ */
26539
+ fps: number().int(),
26540
+ cells: array(GridLayoutCellSchema),
26541
+ /** What the catalog will publish, and what it refuses to. Read-only. */
26542
+ profiles: array(GridProfileOfferSchema)
26543
+ });
26544
+ var GridLayoutPatchSchema = object({
26545
+ deviceId: number().int().nonnegative(),
26546
+ name: string().min(1).max(160).optional(),
26547
+ fps: number().int().min(1).max(60).optional(),
26548
+ /** Which profiles to publish. See `GridProfileOffer.published`. */
26549
+ publishedProfiles: array(_enum([
26550
+ "high",
26551
+ "mid",
26552
+ "low"
26553
+ ])).max(3).optional(),
26554
+ /**
26555
+ * The whole cell list at once. A per-cell patch would need an ordering the
26556
+ * editor does not have, and a half-applied layout is a picture nobody asked
26557
+ * for.
26558
+ */
26559
+ cells: array(GridLayoutCellSchema).max(16)
26560
+ });
26561
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
26562
+ kind: "mutation",
26563
+ auth: "admin"
26564
+ });
26313
26565
  object({
26314
26566
  detected: boolean(),
26315
26567
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26783,307 +27035,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
26783
27035
  auth: "admin"
26784
27036
  });
26785
27037
  /**
26786
- * Vendor-neutral **onboard** recording + storage cap — what the CAMERA
26787
- * writes to the CAMERA's own card, on the camera's own schedule.
26788
- *
26789
- * This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
26790
- * footage ledger, our storage locations, our retention. This one has a
26791
- * different authority — the camera's firmware — and per D62 it stores
26792
- * nothing of its own. Every value here is read from the camera and every
26793
- * write goes back to the camera; there is no CamStack-side mirror that
26794
- * could disagree with the device.
26795
- *
26796
- * ## One shape, two firmwares
26797
- *
26798
- * Measured 2026-09-22 against the live fleet:
26799
- *
26800
- * | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
26801
- * | --- | --- | --- |
26802
- * | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
26803
- * | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
26804
- * | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
26805
- * | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
26806
- * | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
26807
- * | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
26808
- * | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
26809
- * | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
26810
- *
26811
- * The two schedule models look different and are the same thing in
26812
- * different coordinates: both answer "for this trigger, during which
26813
- * weekly windows does the camera record". {@link RecordWindow} is that
26814
- * question in one shape — Hikvision's ranges map straight onto it,
26815
- * Reolink's mask expands into hour-aligned windows.
26816
- *
26817
- * ## Union, not intersection
26818
- *
26819
- * **The same fields exist on every camera.** What differs per device is
26820
- * which VALUES that device accepts, and that is what {@link
26821
- * RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
26822
- * per field plus the schedule's own limits. A control a camera cannot
26823
- * honour is rendered DISABLED WITH ITS REASON, never missing and never
26824
- * dead: disabled must not look like broken.
26825
- *
26826
- * ## Refusal by name
26827
- *
26828
- * A write a camera cannot honour is refused with a sentence the operator
26829
- * can read — never accepted and dropped. Both providers refuse through
26830
- * {@link describeOnboardRefusal}, so the vocabulary is one function and
26831
- * one test, not two hand-written vendor opinions.
26832
- *
26833
- * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
26834
- * `getOptions` advertises per-camera availability, `getStatus` (auto-
26835
- * injected from `status`) reports the live values, and a single
26836
- * `setSettings` mutation applies a partial change. No hand-written
26837
- * settings-contribution methods.
26838
- */
26839
- /**
26840
- * What makes the camera start recording during a window.
26841
- *
26842
- * The union of both vendors' vocabularies. `continuous` is Hikvision's
26843
- * `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
26844
- * object-class triggers are Reolink-only today and the smart-event ones
26845
- * (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
26846
- * firmwares measured — a camera that cannot record on a trigger simply
26847
- * does not list it in `options.schedule.triggers`, and a window naming
26848
- * it is REFUSED, not dropped.
26849
- */
26850
- var RecordTriggerSchema = _enum([
26851
- "continuous",
26852
- "motion",
26853
- "person",
26854
- "vehicle",
26855
- "animal",
26856
- "lineCrossing",
26857
- "intrusion",
26858
- "loitering",
26859
- "alarmInput"
26860
- ]);
26861
- /**
26862
- * One weekly recording window: "on `day`, from `startMinute` to
26863
- * `endMinute`, record on `trigger`".
26864
- *
26865
- * `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
26866
- * both firmwares enumerate). Minutes are local camera time since
26867
- * midnight; `endMinute` may be 1440, meaning end of day — that is
26868
- * Hikvision's literal `24:00` and Reolink's 24th mask slot, and
26869
- * collapsing it to 0 would turn a whole-day window into an empty one.
26870
- */
26871
- var RecordWindowSchema = object({
26872
- trigger: RecordTriggerSchema,
26873
- day: number().int().min(0).max(6),
26874
- startMinute: number().int().min(0).max(1439),
26875
- endMinute: number().int().min(1).max(1440)
26876
- });
26877
- /** Status of one physical volume, as the camera itself describes it. */
26878
- var OnboardStorageVolumeSchema = object({
26879
- /** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
26880
- id: string(),
26881
- /** The camera's own name for it, when it gives one (`hddName`). */
26882
- label: string().optional(),
26883
- status: _enum([
26884
- "ok",
26885
- "unformatted",
26886
- "error",
26887
- "offline",
26888
- "unknown"
26889
- ]),
26890
- /**
26891
- * Total size in MB, or **null when the camera did not say**.
26892
- *
26893
- * Never 0 for an unreadable value: a measurement that failed is not a
26894
- * measurement (D393), and a card whose size is unknown must not be
26895
- * rendered as a card of size zero.
26896
- */
26897
- capacityMb: number().nullable(),
26898
- /**
26899
- * Free space in MB, or null when unknown.
26900
- *
26901
- * **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
26902
- * 1439 both report exactly 11776 MB free — the fixed reserve a looping
26903
- * card converges on once it has wrapped. At loop steady state the
26904
- * number is identical whether the camera recorded yesterday or stopped
26905
- * a month ago.
26906
- */
26907
- freeMb: number().nullable(),
26908
- /** True when the camera reports the volume writable (`property` RW). */
26909
- writable: boolean().optional()
26910
- });
26911
- object({
26912
- storage: discriminatedUnion("kind", [
26913
- object({
26914
- kind: literal("present"),
26915
- volumes: array(OnboardStorageVolumeSchema)
26916
- }),
26917
- object({
26918
- kind: literal("absent"),
26919
- reason: string()
26920
- }),
26921
- object({
26922
- kind: literal("unknown"),
26923
- reason: string()
26924
- })
26925
- ]),
26926
- tracks: array(object({
26927
- id: string(),
26928
- enabled: boolean(),
26929
- isVideo: boolean(),
26930
- /** From the camera's own track description. Null when it does not say. */
26931
- codec: string().nullable(),
26932
- resolution: string().nullable(),
26933
- /** Per-track overwrite flag, where the firmware keeps it per track. */
26934
- overwriteWhenFull: boolean().nullable()
26935
- })),
26936
- /**
26937
- * The track the write path targets — the enabled VIDEO one. Null when
26938
- * no track could be identified, which is itself a refusal reason.
26939
- */
26940
- primaryTrackId: string().nullable(),
26941
- /** Master "record to the card at all" switch. */
26942
- enabled: boolean().nullable(),
26943
- overwriteWhenFull: boolean().nullable(),
26944
- preRecordSec: number().nullable(),
26945
- postRecordSec: number().nullable(),
26946
- /** Length of one recorded file, in minutes. */
26947
- segmentMinutes: number().nullable(),
26948
- /** The primary track's weekly windows, flattened. */
26949
- windows: array(RecordWindowSchema),
26950
- /**
26951
- * How many windows the camera described that CamStack could NOT read —
26952
- * an unrecognised trigger, an unparseable clock, a weekday it does not
26953
- * name.
26954
- *
26955
- * A dropped window is work the reader threw away, and a schedule that
26956
- * silently shows fewer rows than the camera holds is how an operator
26957
- * saves back a schedule shorter than the one they were looking at
26958
- * (D391). Non-zero means the window list is INCOMPLETE and a write
26959
- * that replaces it would delete what was not shown — which is why a
26960
- * provider reporting a non-zero count also reports the schedule as not
26961
- * writable.
26962
- */
26963
- unreadableWindows: number(),
26964
- /**
26965
- * The camera is scheduled to record and has NO usable storage.
26966
- *
26967
- * A first-class fact because it is the fleet's most common silent
26968
- * defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
26969
- * to a card that is not there. Neither the schedule nor the storage
26970
- * read says anything wrong on its own; only the pair does.
26971
- */
26972
- recordingToNowhere: boolean(),
26973
- lastFetchedAt: number()
26974
- });
26975
- /** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
26976
- var RangeSchema = object({
26977
- min: number(),
26978
- max: number(),
26979
- step: number()
26980
- });
26981
- /**
26982
- * The values a camera actually takes for a numeric field, when they are a SET
26983
- * rather than a range.
26984
- *
26985
- * `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
26986
- * (I91DN) on 2026-09-22 by writing each value and reading it back:
26987
- *
26988
- * - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
26989
- * camera's "no limit" — `-1` and `4294967295` both land on it);
26990
- * - post-record: `5, 10, 30, 60, 120, 300, 600`.
26991
- *
26992
- * Neither is expressible as a step: the first has a sentinel two billion away
26993
- * from its neighbours, the second doubles and then jumps. A range that tried
26994
- * would forbid values the camera takes AND permit values it silently replaces
26995
- * with 5 — wrong in both directions at once.
26996
- *
26997
- * `sentinel` names the member that is not a duration, so a surface can render
26998
- * "no limit" instead of `2147483647` seconds.
26999
- */
27000
- var AllowedValuesSchema = object({
27001
- values: array(number()).min(1),
27002
- sentinel: object({
27003
- value: number(),
27004
- meaning: _enum(["no-limit", "disabled"])
27005
- }).optional()
27006
- });
27007
- /**
27008
- * Per-field availability on ONE camera.
27009
- *
27010
- * The field exists on every camera — this says whether this one can be
27011
- * read and whether it can be written, and `reason` says why not when
27012
- * either is false. The UI renders the control DISABLED with the reason
27013
- * rather than hiding it, so a limitation is legible instead of looking
27014
- * like a missing feature.
27015
- */
27016
- var OnboardFieldSupportSchema = object({
27017
- readable: boolean(),
27018
- writable: boolean(),
27019
- /** Required whenever `readable` or `writable` is false. */
27020
- reason: string().optional()
27021
- });
27022
- /** What this camera's schedule model can express. */
27023
- var OnboardScheduleSupportSchema = object({
27024
- support: OnboardFieldSupportSchema,
27025
- /**
27026
- * The smallest time step the camera can express, in minutes.
27027
- *
27028
- * Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
27029
- * 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
27030
- * window whose edges are not a multiple of this is REFUSED rather than
27031
- * quietly rounded — rounding is how an operator's 06:30 becomes 06:00
27032
- * and nothing says so.
27033
- */
27034
- granularityMinutes: number(),
27035
- /** Triggers this camera can record on. A window naming another is refused. */
27036
- triggers: array(RecordTriggerSchema),
27037
- /**
27038
- * False when the camera stores ONE trigger per time range, so two
27039
- * windows overlapping on the same day cannot carry different triggers.
27040
- * True on Reolink, whose mask is per-trigger and independent.
27041
- */
27042
- supportsOverlappingTriggers: boolean()
27043
- });
27044
- var RecordingOnboardOptionsSchema = object({
27045
- enabled: OnboardFieldSupportSchema,
27046
- overwriteWhenFull: OnboardFieldSupportSchema,
27047
- preRecordSec: OnboardFieldSupportSchema,
27048
- preRecordSecRange: RangeSchema.optional(),
27049
- /** Preferred over the range when the camera takes a SET, not a span. */
27050
- preRecordSecAllowed: AllowedValuesSchema.optional(),
27051
- postRecordSec: OnboardFieldSupportSchema,
27052
- postRecordSecRange: RangeSchema.optional(),
27053
- /** Preferred over the range when the camera takes a SET, not a span. */
27054
- postRecordSecAllowed: AllowedValuesSchema.optional(),
27055
- segmentMinutes: OnboardFieldSupportSchema,
27056
- segmentMinutesRange: RangeSchema.optional(),
27057
- /** Preferred over the range when the camera takes a SET, not a span. */
27058
- segmentMinutesAllowed: AllowedValuesSchema.optional(),
27059
- schedule: OnboardScheduleSupportSchema
27060
- });
27061
- /**
27062
- * A partial change. Every field optional.
27063
- *
27064
- * Unlike the other `deviceConfig` caps, a provider here does **NOT**
27065
- * silently ignore a field it cannot support — it refuses, by name,
27066
- * through {@link describeOnboardRefusal}. Silence on a recording setting
27067
- * is the failure D62 exists to prevent: the operator believes the camera
27068
- * is recording the way the form says, and it is not.
27069
- */
27070
- var RecordingOnboardPatchSchema = object({
27071
- enabled: boolean().optional(),
27072
- overwriteWhenFull: boolean().optional(),
27073
- preRecordSec: number().optional(),
27074
- postRecordSec: number().optional(),
27075
- segmentMinutes: number().optional(),
27076
- /** The complete new window set for the primary track — not a delta. */
27077
- windows: array(RecordWindowSchema).optional()
27078
- });
27079
- DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
27080
- deviceId: number(),
27081
- settings: RecordingOnboardPatchSchema
27082
- }), _void(), {
27083
- kind: "mutation",
27084
- auth: "admin"
27085
- });
27086
- /**
27087
27038
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
27088
27039
  * for every device, regardless of provider — the kernel needs a uniform
27089
27040
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -27177,30 +27128,6 @@ object({
27177
27128
  eventCountSinceStart: number()
27178
27129
  });
27179
27130
  DeviceType.EventEmitter;
27180
- var EventItemSchema = object({
27181
- id: string(),
27182
- type: string(),
27183
- timestamp: number(),
27184
- label: string().optional(),
27185
- thumbnailUrl: string().optional(),
27186
- clipUrl: string().optional(),
27187
- metadata: record(string(), unknown()).optional()
27188
- });
27189
- DeviceType.Camera, method(object({
27190
- deviceId: number(),
27191
- from: number().optional(),
27192
- to: number().optional(),
27193
- limit: number().optional()
27194
- }), array(EventItemSchema)), method(object({
27195
- deviceId: number(),
27196
- eventId: string()
27197
- }), object({
27198
- base64: string(),
27199
- contentType: string()
27200
- }).nullable()), method(object({
27201
- deviceId: number(),
27202
- eventId: string()
27203
- }), string().nullable());
27204
27131
  var IdentitySchema = object({
27205
27132
  id: string(),
27206
27133
  name: string(),
@@ -28872,143 +28799,6 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
28872
28799
  lastChangedAt: number()
28873
28800
  });
28874
28801
  /**
28875
- * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28876
- * page.
28877
- *
28878
- * ## Why this is a capability and not an addon settings schema
28879
- *
28880
- * It was one, and it did not render. The addon declared the editor as a
28881
- * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28882
- * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28883
- * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28884
- * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
28885
- * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
28886
- * not on it "falls off silently".
28887
- *
28888
- * Adding a fifth name to that list would have been the wrong fix twice over:
28889
- * that page is per-camera DETECTION tuning, and a grid's geometry belongs
28890
- * beside PTZ and motion zones on the camera itself. The device page is
28891
- * BINDING-driven (D12), so the way in is a capability bound to the device —
28892
- * and this cap carries its section the way `recording` does, by RETURNING it
28893
- * from `getDeviceSettingsContribution`.
28894
- *
28895
- * Seven other widgets are still declared the other way, through a
28896
- * `deviceConfig.ui` block the framework derives a section from. That route
28897
- * gives the addon no say in where its own panel lands and no way to decline
28898
- * for a device the panel does not suit, which is why this one does not use it.
28899
- *
28900
- * ## Why one addon may implement it
28901
- *
28902
- * It is a device-scoped NATIVE cap, registered by the grid camera device
28903
- * itself. Nothing else declares a composite camera, so nothing else has a
28904
- * layout — and the device-scoped route means the widget asks THE camera, not
28905
- * "the camera-grid addon", which is what let the old custom-action pair be
28906
- * reached only by a caller that already knew the addon id.
28907
- *
28908
- * ## The tab
28909
- *
28910
- * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
28911
- * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
28912
- * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
28913
- * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
28914
- * next to "PTZ").
28915
- */
28916
- /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
28917
- var GridNormalizedRectSchema = object({
28918
- x: number().min(0).max(1),
28919
- y: number().min(0).max(1),
28920
- width: number().gt(0).max(1),
28921
- height: number().gt(0).max(1)
28922
- });
28923
- /**
28924
- * One source camera, the part of its picture taken, and where that part lands.
28925
- *
28926
- * Both rectangles are NORMALIZED (D519): a source camera can change resolution
28927
- * — a profile switch, a firmware update, a substream that comes back different
28928
- * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
28929
- * which is the class of bug nobody files.
28930
- */
28931
- var GridLayoutCellSchema = object({
28932
- deviceId: number().int().positive(),
28933
- /** The part of the SOURCE taken, normalized against the source. */
28934
- source: GridNormalizedRectSchema,
28935
- /** Where it lands, normalized against the CANVAS. */
28936
- cell: GridNormalizedRectSchema
28937
- });
28938
- /**
28939
- * Which profiles this grid can actually compose, and why not.
28940
- *
28941
- * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
28942
- * profile is on offer only when EVERY source can serve it. The refusal NAMES
28943
- * the sources, because "this grid has no low" is not a finding — "615 has no
28944
- * low" is, and it is the one an operator can act on.
28945
- */
28946
- var GridProfileOfferSchema = object({
28947
- profile: _enum([
28948
- "high",
28949
- "mid",
28950
- "low"
28951
- ]),
28952
- offered: boolean(),
28953
- /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
28954
- missingSources: array(number().int().positive()),
28955
- /**
28956
- * The canvas this profile composes onto, `WxH`, or empty when it is not
28957
- * offered. DERIVED from the cells and the sources' own size at this profile —
28958
- * it is reported because nothing else in the system would ever say what the
28959
- * grid came out as, and because it is the number an operator would otherwise
28960
- * expect to type.
28961
- */
28962
- canvas: string(),
28963
- /**
28964
- * Whether this profile is PUBLISHED, of the ones the grid could serve.
28965
- *
28966
- * A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
28967
- * a 4K canvas built from 4K decodes — something to opt into, not something a
28968
- * viewer's adaptive should be handed by climbing to the top rung it can see.
28969
- * Default is `mid` + `low`.
28970
- */
28971
- published: boolean()
28972
- });
28973
- var GridLayoutViewSchema = object({
28974
- /** The persisted grid row this camera was declared from. */
28975
- instanceId: string(),
28976
- deviceId: number().int().nonnegative(),
28977
- name: string(),
28978
- /**
28979
- * NO canvas size. A grid's resolution is not authored: each profile derives
28980
- * its own from the cells and its sources' dimensions. The two numbers that
28981
- * used to be here were a text field that silently decided both how much the
28982
- * composite cost and how sharp it was — see `profiles[].canvas` for what it
28983
- * came out as.
28984
- */
28985
- fps: number().int(),
28986
- cells: array(GridLayoutCellSchema),
28987
- /** What the catalog will publish, and what it refuses to. Read-only. */
28988
- profiles: array(GridProfileOfferSchema)
28989
- });
28990
- var GridLayoutPatchSchema = object({
28991
- deviceId: number().int().nonnegative(),
28992
- name: string().min(1).max(160).optional(),
28993
- fps: number().int().min(1).max(60).optional(),
28994
- /** Which profiles to publish. See `GridProfileOffer.published`. */
28995
- publishedProfiles: array(_enum([
28996
- "high",
28997
- "mid",
28998
- "low"
28999
- ])).max(3).optional(),
29000
- /**
29001
- * The whole cell list at once. A per-cell patch would need an ordering the
29002
- * editor does not have, and a half-applied layout is a picture nobody asked
29003
- * for.
29004
- */
29005
- cells: array(GridLayoutCellSchema).max(16)
29006
- });
29007
- DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29008
- kind: "mutation",
29009
- auth: "admin"
29010
- });
29011
- /**
29012
28802
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
29013
28803
  * on-camera motion-detection mask is a single `grid` region (a row-major
29014
28804
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -30820,37 +30610,37 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
30820
30610
  kind: "mutation",
30821
30611
  auth: "admin"
30822
30612
  });
30823
- /**
30824
- * `recording` cap — footage availability + HLS playback manifests + per-device
30825
- * recording config. NOTE on events (source of truth, R5/C3): this cap carries
30826
- * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
30827
- * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
30828
- * rows) and are the ONLY event surface — the recorder has none. The in-RAM
30829
- * playback markers it used to build were deleted on 2026-08-29 because nothing
30830
- * ever read them. Event<->footage joins are by time, padded with the shared
30831
- * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
30832
- */
30833
- var RecordingStatusSchema = object({
30834
- deviceId: number(),
30835
- enabled: boolean(),
30836
- /** THE derived storage mode, from the one definition
30837
- * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
30838
- * `on-device-decision` could have reached the recorder and not the status. */
30839
- activeMode: RecordingStorageModeSchema,
30840
- nodeId: string(),
30841
- storageBytes: number()
30842
- });
30843
30613
  var RecordingRangeSchema = object({
30844
30614
  profile: string(),
30845
30615
  startMs: number(),
30846
30616
  endMs: number()
30847
30617
  });
30618
+ /**
30619
+ * How a source ANSWERED, on every singular read of this cap.
30620
+ *
30621
+ * `'read'` — it looked. `ranges: []` / `days: []` is then a real claim: this
30622
+ * source has no coverage in the window. `'unreadable'` — nobody could look
30623
+ * (the camera was unreachable, the calendar rung threw, the location is
30624
+ * unmounted, the node is still on the old build), and the emptiness beside it
30625
+ * means NOTHING.
30626
+ *
30627
+ * The batch rows have carried this since the grid existed; the SINGULAR
30628
+ * answers gained it with the collection (D625 §10.4), because they are the
30629
+ * ones the single-camera picker uses and because a half-converted fleet makes
30630
+ * "nobody looked" common for the length of a deploy. Without it the timeline
30631
+ * has no vocabulary for it, and `(data ?? [])` in a viewer turns a rollout into
30632
+ * a fleet of cameras that appear to have lost their recordings (D315, D393).
30633
+ */
30634
+ var RecordingReadSchema = _enum(["read", "unreadable"]);
30848
30635
  var RecordingAvailabilitySchema = object({
30849
30636
  deviceId: number(),
30637
+ /** See {@link RecordingReadSchema}. An `'unreadable'` answer carries an empty
30638
+ * `ranges` that means nothing — never draw it as "no footage". */
30639
+ read: RecordingReadSchema,
30850
30640
  ranges: array(RecordingRangeSchema),
30851
30641
  /**
30852
- * Every profile this camera has footage in — not only the one `ranges`
30853
- * describes (D433).
30642
+ * Every profile this camera has footage in AT THIS SOURCE — not only the one
30643
+ * `ranges` describes (D433).
30854
30644
  *
30855
30645
  * `ranges` answers for ONE profile by design: the timeline is a single bar,
30856
30646
  * and enumerating all of them triples the directory reads for a bar that
@@ -30867,15 +30657,285 @@ var RecordingAvailabilitySchema = object({
30867
30657
  });
30868
30658
  var RecordingDaysSchema = object({
30869
30659
  deviceId: number(),
30660
+ /** See {@link RecordingReadSchema}. `days: []` on an `'unreadable'` answer is
30661
+ * "nobody could look", and the date-picker must not spell it the same as
30662
+ * "no footage this month". */
30663
+ read: RecordingReadSchema,
30870
30664
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
30871
30665
  days: array(number())
30872
30666
  });
30667
+ var RecordingManifestSchema = object({
30668
+ deviceId: number(),
30669
+ /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
30670
+ localMasterPath: string().nullable(),
30671
+ /** HTTP(S) URL to the master playlist on the recording node's playback server
30672
+ * (the PRIMARY candidate); null when no recording / server. Carries the
30673
+ * scoped playback token in its path. */
30674
+ playbackUrl: string().nullable(),
30675
+ /**
30676
+ * Candidate master-playlist URLs the client tries in order (LAN first, then
30677
+ * remote — Tailscale/Cloudflare if the operator configured extra hosts), each
30678
+ * carrying the same scoped token. `playbackUrl` is the first entry. Empty when
30679
+ * there is no recording / server.
30680
+ */
30681
+ playbackEndpoints: array(string())
30682
+ });
30683
+ var RecordingSourceAvailabilitySchema = object({
30684
+ state: _enum([
30685
+ "ok",
30686
+ "sleeping",
30687
+ "unreachable",
30688
+ "no-storage",
30689
+ "index-empty"
30690
+ ]),
30691
+ /** Free text, shown verbatim. Names the camera's own refusal when there is one. */
30692
+ reason: string().optional(),
30693
+ /** When this source's coverage was last CONFIRMED. A cached answer is never
30694
+ * drawn as current: the surface shows the age whenever it is older than the
30695
+ * refresh interval. The clip catalog's `catalogAsOf`, under the name the
30696
+ * timeline uses for it. */
30697
+ coverageAsOf: number().optional()
30698
+ });
30699
+ /**
30700
+ * One SOURCE of recorded coverage for a camera — a row of the picker.
30701
+ *
30702
+ * A provider lists the sources IT serves for that device, and answers for each
30703
+ * of them whether it can answer at all. A provider with nothing to offer on a
30704
+ * camera returns `[]` — it is not that camera's business. The five availability
30705
+ * states are `ClipSourceAvailability`'s verbatim: they mean exactly the same
30706
+ * things about a coverage index as about a clip catalog, and `sleeping` in
30707
+ * particular is what stops a battery camera being woken to paint a bar.
30708
+ */
30709
+ var RecordingSourceSchema = object({
30710
+ /** The source id. {@link RECORDING_SOURCE_CAMSTACK} for ours (RESERVED), a
30711
+ * vendor namespace (`native:reolink:onboard`, …) for a camera's own store. */
30712
+ source: string(),
30713
+ /** Operator-facing name of the source ("CamStack recordings", "SD card"). */
30714
+ label: string(),
30715
+ /**
30716
+ * The addon that SERVES this row, and the value a later call passes as
30717
+ * `provider`.
30718
+ *
30719
+ * Optional for version skew only. The collection dispatcher stamps it from
30720
+ * the registry, so a row that travelled through the fan-out carries the
30721
+ * authoritative id whatever the provider filled in (D557 §4).
30722
+ */
30723
+ addonId: string().optional(),
30724
+ availability: RecordingSourceAvailabilitySchema
30725
+ });
30726
+ /**
30727
+ * What a surface may DRAW for this (camera, source) — D612's rule applied to a
30728
+ * timeline: **the source declares what it can do, and the surface draws what
30729
+ * was declared. It never assumes, and never offers a gesture it will then
30730
+ * refuse.** D612 exists because `8` and `16` were offered as clip rates, the
30731
+ * broker clamped them to `4`, and no line anywhere said so.
30732
+ *
30733
+ * Asked once per (camera, source) before anything is drawn — never replaced by
30734
+ * a constant the surface keeps, which is the second authority D612 ends.
30735
+ */
30736
+ var RecordingSourceOptionsSchema = object({
30737
+ /** How this source's media reaches the player.
30738
+ * `archive` = our own indexed segment tree; `stream` = the provider's
30739
+ * forward-only fMP4 (D597); `realtime` = a replay bound to wall clock. */
30740
+ transport: _enum([
30741
+ "archive",
30742
+ "stream",
30743
+ "realtime"
30744
+ ]),
30745
+ /** What the BAR means. `continuous` = gaps are holes in a recording;
30746
+ * `sparse` = gaps are the absence of one, and must be drawn as such.
30747
+ *
30748
+ * Not an onboard-only concession: measured 2026-09-24, OUR bar covers 98.8 %
30749
+ * of 592's day and 1.2 % of 1436's. It is a fact about a (source, camera)
30750
+ * pair, and ours answers it per camera from `deriveRecordingMode`. */
30751
+ coverage: _enum(["continuous", "sparse"]),
30752
+ /** Where the playhead may be put.
30753
+ * `free` — anywhere, to the frame.
30754
+ * `forward` — only ahead of the current position.
30755
+ * `segment` — a position SNAPS to the head of the covering segment; a finer
30756
+ * ask is accepted by the camera and SILENTLY IGNORED. Measured
30757
+ * on 1436 (Hikvision V5.7.1, 2026-09-23): a window-narrowed
30758
+ * `ContentMgmt/search` returns a row and a `playbackURI`, the
30759
+ * replay opens 200 and delivers media — and the burned-in OSD of
30760
+ * the first frame reads the SEGMENT HEAD every time. Calling
30761
+ * that `forward` would tell the surface it may move the playhead
30762
+ * ahead within a loaded segment, which it may not. */
30763
+ seek: _enum([
30764
+ "free",
30765
+ "forward",
30766
+ "segment"
30767
+ ]),
30768
+ /** Frame-step BACKWARD is meaningful. */
30769
+ stepBack: boolean(),
30770
+ /** Whether the drag-scrub gesture is served, as opposed to refused by name. */
30771
+ scrub: boolean(),
30772
+ /** Deliverable rates, ascending, always containing `1`. The surface draws its
30773
+ * picker from this and from NOTHING else (D612, D620, D621). `0` is not a
30774
+ * member: pause is the absence of a rate. */
30775
+ rates: array(number().positive()).min(1).readonly(),
30776
+ /** TRUE when a read of this source HOLDS the camera's only playback session.
30777
+ * A surface with this set makes at most ONE read at a time and draws no
30778
+ * scrub-thumbnail strip, no hover preview, no prefetch and no background
30779
+ * refresh. The precedent is exact and expensive: filling one screen of
30780
+ * Hikvision thumbnails at 1.01× realtime consumed fifteen minutes of that
30781
+ * camera's only playback session (1.2.126, reported within minutes), and a
30782
+ * timeline is a screenful of reads by construction. */
30783
+ exclusive: boolean()
30784
+ });
30785
+ /**
30786
+ * How to PLAY the instant that was asked for, from the chosen source.
30787
+ *
30788
+ * No new media transport is built for onboard sources: the `clip` arm is a
30789
+ * DELEGATION to the `videoclips` transport that vendor already has (D597 /
30790
+ * D616 / D617). The onboard half of this collection is a PROJECTION of
30791
+ * `videoclips` for coverage and a delegation to it for bytes.
30792
+ */
30793
+ var RecordingPlaybackSchema = discriminatedUnion("kind", [
30794
+ object({
30795
+ kind: literal("hls"),
30796
+ manifest: RecordingManifestSchema
30797
+ }),
30798
+ object({
30799
+ kind: literal("clip"),
30800
+ /** The `videoclips` source namespace this clip id belongs to. */
30801
+ source: string(),
30802
+ clipId: string(),
30803
+ /** Where this clip actually STARTS. On a `seek: 'segment'` source the
30804
+ * playhead lands here, not at the requested instant — the surface must be
30805
+ * TOLD, not left to discover it from a burned-in OSD. */
30806
+ startsAtMs: number()
30807
+ }),
30808
+ object({
30809
+ kind: literal("none"),
30810
+ reason: string()
30811
+ })
30812
+ ]);
30813
+ DeviceType.Camera, method(object({ deviceId: number() }), array(RecordingSourceSchema).readonly(), {
30814
+ kind: "query",
30815
+ auth: "protected"
30816
+ }), method(object({
30817
+ deviceId: number(),
30818
+ /**
30819
+ * WHICH provider to ask — the `addonId` a {@link RecordingSourceSchema}
30820
+ * row carries, never a source id and never a list. **REQUIRED**, in the
30821
+ * schema, where the generated types make it unomittable rather than
30822
+ * merely discouraged (D554 amended).
30823
+ *
30824
+ * It was learned the expensive way on `videoclips.listClips`: measured
30825
+ * on the live hub 2026-09-20, device 592 bound to `recorder` AND
30826
+ * `provider-reolink`, a bare call with `limit: 3` answered SIX rows,
30827
+ * three from each source, merged — `device-collection-dispatch.ts`
30828
+ * leaves an unpinned fan-out un-narrowed, so absence buys the union the
30829
+ * method exists not to be. An un-narrowed `getAvailability` would do
30830
+ * that to a TIMELINE: our ranges and the card's clips unioned into one
30831
+ * bar, which is "two sources are never drawn together" broken in the
30832
+ * one place it matters most.
30833
+ *
30834
+ * A provider the device is not bound to is refused BY NAME (D552's
30835
+ * `rejectUnresolvedAddonPin`), never answered by another one.
30836
+ */
30837
+ provider: string().min(1),
30838
+ fromMs: number(),
30839
+ toMs: number(),
30840
+ /**
30841
+ * Answer for THIS profile instead of the source's preferred one (D433).
30842
+ * Absent keeps the timeline's behaviour — one bar, one profile, one set
30843
+ * of reads. `profilesWithFootage` on the answer says what may be asked
30844
+ * for.
30845
+ */
30846
+ profile: string().optional()
30847
+ }), RecordingAvailabilitySchema, {
30848
+ kind: "query",
30849
+ auth: "protected"
30850
+ }), method(object({
30851
+ deviceId: number(),
30852
+ provider: string().min(1),
30853
+ fromMs: number(),
30854
+ toMs: number(),
30855
+ tzOffsetMinutes: number()
30856
+ }), RecordingDaysSchema, {
30857
+ kind: "query",
30858
+ auth: "protected"
30859
+ }), method(object({
30860
+ deviceId: number(),
30861
+ provider: string().min(1),
30862
+ fromMs: number(),
30863
+ toMs: number(),
30864
+ profile: CamProfileSchema.optional()
30865
+ }), RecordingPlaybackSchema, {
30866
+ kind: "query",
30867
+ auth: "protected"
30868
+ }), method(object({
30869
+ deviceId: number(),
30870
+ provider: string().min(1)
30871
+ }), RecordingSourceOptionsSchema, {
30872
+ kind: "query",
30873
+ auth: "protected"
30874
+ });
30875
+ /**
30876
+ * `recording-archive` — OUR archive, and the intent that fills it.
30877
+ *
30878
+ * The system-singleton half of the 2026-09-24 cut (D625). `recording` used to
30879
+ * be one 33-method system singleton holding two unrelated subjects: three
30880
+ * per-camera READS about coverage and playback, and everything else — storage
30881
+ * locations, retention, relocation, rebalance, the ops log, the placement
30882
+ * table and the byte-plane primitives our scrub and export are built on.
30883
+ *
30884
+ * The reads became a device-scoped COLLECTION, so a camera's own card can be a
30885
+ * source beside ours (`recording.cap.ts`). Everything that is about OUR store,
30886
+ * or unimplementable by a camera, stayed here.
30887
+ *
30888
+ * ## On the name
30889
+ *
30890
+ * `recording-storage` was the obvious choice and is wrong: this cap also holds
30891
+ * `getDeviceConfig`/`setDeviceConfig`, which are recording INTENT — bands,
30892
+ * retention, the D62 switch authority — and a name that says "storage" invites
30893
+ * the next reader to move them out again. An archive is a thing we keep, and
30894
+ * what we keep it under is a policy; the name covers both halves honestly and
30895
+ * sits in the existing family (`recording-onboard`, `recording-export`,
30896
+ * `recording-signal`).
30897
+ *
30898
+ * ## What must NOT happen to it
30899
+ *
30900
+ * It stays a SINGLETON. It is registered by `recorder`, which is
30901
+ * `placement: 'any-node'` and runs on every recording node; the hub dispatches
30902
+ * to one of them. Putting the ledger, the placement table or the relocation
30903
+ * jobs behind a fan-out is the one genuinely dangerous move in this cut.
30904
+ *
30905
+ * `getDeviceConfig` / `setDeviceConfig` in particular are the D62 recording
30906
+ * authority (`CameraSwitch.authority`). If a write reached a different provider
30907
+ * than the read — which a collection fan-out permits — two authorities would
30908
+ * decide when one camera records, and the symptom (recording silently off, or
30909
+ * a `bands` array clobbered by a partial write) is durable and silent. Keeping
30910
+ * them here means the worst case during a rollout is a 412: the switch refuses
30911
+ * to flip and SAYS so. **Do not move them into the collection, at any point,
30912
+ * for any reason.**
30913
+ *
30914
+ * ## The two batch reads
30915
+ *
30916
+ * `getAvailabilityBatch` / `getDaysWithRecordingsBatch` take `deviceIds:
30917
+ * number[]` with no single `deviceId`, and a device-scoped mount routes
30918
+ * through `getProviderForDevice(deviceId)` — there is nothing for it to route
30919
+ * on. They stay here, and on this cap the batch is explicitly OURS: a grid has
30920
+ * no per-camera picker, and a caller that wants another source's coverage asks
30921
+ * `recording.getAvailability` per device with that source's `provider`.
30922
+ */
30923
+ var RecordingStatusSchema = object({
30924
+ deviceId: number(),
30925
+ enabled: boolean(),
30926
+ /** THE derived storage mode, from the one definition
30927
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
30928
+ * `on-device-decision` could have reached the recorder and not the status. */
30929
+ activeMode: RecordingStorageModeSchema,
30930
+ nodeId: string(),
30931
+ storageBytes: number()
30932
+ });
30873
30933
  /**
30874
30934
  * One camera's row in a `getAvailabilityBatch` answer.
30875
30935
  *
30876
- * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
30877
- * batch collapses the transport, not the work — plus the one thing the singular
30878
- * method never had to say:
30936
+ * `ranges` is EXACTLY what `recording.getAvailability` returns for that camera
30937
+ * at OUR source — the batch collapses the transport, not the work — plus the
30938
+ * `read` mark the singular answer now carries too (D625):
30879
30939
  *
30880
30940
  * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
30881
30941
  * no footage in the window", which is a real claim.
@@ -30907,22 +30967,6 @@ var RecordingDaysForDeviceSchema = object({
30907
30967
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
30908
30968
  days: array(number()).readonly()
30909
30969
  });
30910
- var RecordingManifestSchema = object({
30911
- deviceId: number(),
30912
- /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
30913
- localMasterPath: string().nullable(),
30914
- /** HTTP(S) URL to the master playlist on the recording node's playback server
30915
- * (the PRIMARY candidate); null when no recording / server. Carries the
30916
- * scoped playback token in its path. */
30917
- playbackUrl: string().nullable(),
30918
- /**
30919
- * Candidate master-playlist URLs the client tries in order (LAN first, then
30920
- * remote — Tailscale/Cloudflare if the operator configured extra hosts), each
30921
- * carrying the same scoped token. `playbackUrl` is the first entry. Empty when
30922
- * there is no recording / server.
30923
- */
30924
- playbackEndpoints: array(string())
30925
- });
30926
30970
  /**
30927
30971
  * Recording storage usage for one camera — what the ARCHIVE holds for it,
30928
30972
  * across every profile and every resolvable location on this node.
@@ -31181,34 +31225,12 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
31181
31225
  segmentEndMs: number()
31182
31226
  })]);
31183
31227
  method(object({
31184
- deviceId: number(),
31185
- fromMs: number(),
31186
- toMs: number(),
31187
- /**
31188
- * Answer for THIS profile instead of the preferred one (D433). Absent
31189
- * keeps the timeline's behaviour — one bar, one profile, one set of
31190
- * reads. `profilesWithFootage` on the answer says what may be asked
31191
- * for.
31192
- */
31193
- profile: string().optional()
31194
- }), RecordingAvailabilitySchema, {
31195
- kind: "query",
31196
- auth: "protected"
31197
- }), method(object({
31198
31228
  deviceIds: array(number()).min(1).max(200),
31199
31229
  fromMs: number(),
31200
31230
  toMs: number()
31201
31231
  }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
31202
31232
  kind: "query",
31203
31233
  auth: "protected"
31204
- }), method(object({
31205
- deviceId: number(),
31206
- fromMs: number(),
31207
- toMs: number(),
31208
- tzOffsetMinutes: number()
31209
- }), RecordingDaysSchema, {
31210
- kind: "query",
31211
- auth: "protected"
31212
31234
  }), method(object({
31213
31235
  deviceIds: array(number()).min(1).max(200),
31214
31236
  fromMs: number(),
@@ -31217,13 +31239,6 @@ method(object({
31217
31239
  }), array(RecordingDaysForDeviceSchema).readonly(), {
31218
31240
  kind: "query",
31219
31241
  auth: "protected"
31220
- }), method(object({
31221
- deviceId: number(),
31222
- fromMs: number(),
31223
- toMs: number()
31224
- }), RecordingManifestSchema, {
31225
- kind: "query",
31226
- auth: "protected"
31227
31242
  }), method(object({}), RecordingStorageUsageSchema, {
31228
31243
  kind: "query",
31229
31244
  auth: "admin"
@@ -31671,6 +31686,307 @@ method(object({
31671
31686
  auth: "protected"
31672
31687
  });
31673
31688
  /**
31689
+ * Vendor-neutral **onboard** recording + storage cap — what the CAMERA
31690
+ * writes to the CAMERA's own card, on the camera's own schedule.
31691
+ *
31692
+ * This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
31693
+ * footage ledger, our storage locations, our retention. This one has a
31694
+ * different authority — the camera's firmware — and per D62 it stores
31695
+ * nothing of its own. Every value here is read from the camera and every
31696
+ * write goes back to the camera; there is no CamStack-side mirror that
31697
+ * could disagree with the device.
31698
+ *
31699
+ * ## One shape, two firmwares
31700
+ *
31701
+ * Measured 2026-09-22 against the live fleet:
31702
+ *
31703
+ * | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
31704
+ * | --- | --- | --- |
31705
+ * | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
31706
+ * | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
31707
+ * | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
31708
+ * | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
31709
+ * | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
31710
+ * | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
31711
+ * | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
31712
+ * | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
31713
+ *
31714
+ * The two schedule models look different and are the same thing in
31715
+ * different coordinates: both answer "for this trigger, during which
31716
+ * weekly windows does the camera record". {@link RecordWindow} is that
31717
+ * question in one shape — Hikvision's ranges map straight onto it,
31718
+ * Reolink's mask expands into hour-aligned windows.
31719
+ *
31720
+ * ## Union, not intersection
31721
+ *
31722
+ * **The same fields exist on every camera.** What differs per device is
31723
+ * which VALUES that device accepts, and that is what {@link
31724
+ * RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
31725
+ * per field plus the schedule's own limits. A control a camera cannot
31726
+ * honour is rendered DISABLED WITH ITS REASON, never missing and never
31727
+ * dead: disabled must not look like broken.
31728
+ *
31729
+ * ## Refusal by name
31730
+ *
31731
+ * A write a camera cannot honour is refused with a sentence the operator
31732
+ * can read — never accepted and dropped. Both providers refuse through
31733
+ * {@link describeOnboardRefusal}, so the vocabulary is one function and
31734
+ * one test, not two hand-written vendor opinions.
31735
+ *
31736
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
31737
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
31738
+ * injected from `status`) reports the live values, and a single
31739
+ * `setSettings` mutation applies a partial change. No hand-written
31740
+ * settings-contribution methods.
31741
+ */
31742
+ /**
31743
+ * What makes the camera start recording during a window.
31744
+ *
31745
+ * The union of both vendors' vocabularies. `continuous` is Hikvision's
31746
+ * `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
31747
+ * object-class triggers are Reolink-only today and the smart-event ones
31748
+ * (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
31749
+ * firmwares measured — a camera that cannot record on a trigger simply
31750
+ * does not list it in `options.schedule.triggers`, and a window naming
31751
+ * it is REFUSED, not dropped.
31752
+ */
31753
+ var RecordTriggerSchema = _enum([
31754
+ "continuous",
31755
+ "motion",
31756
+ "person",
31757
+ "vehicle",
31758
+ "animal",
31759
+ "lineCrossing",
31760
+ "intrusion",
31761
+ "loitering",
31762
+ "alarmInput"
31763
+ ]);
31764
+ /**
31765
+ * One weekly recording window: "on `day`, from `startMinute` to
31766
+ * `endMinute`, record on `trigger`".
31767
+ *
31768
+ * `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
31769
+ * both firmwares enumerate). Minutes are local camera time since
31770
+ * midnight; `endMinute` may be 1440, meaning end of day — that is
31771
+ * Hikvision's literal `24:00` and Reolink's 24th mask slot, and
31772
+ * collapsing it to 0 would turn a whole-day window into an empty one.
31773
+ */
31774
+ var RecordWindowSchema = object({
31775
+ trigger: RecordTriggerSchema,
31776
+ day: number().int().min(0).max(6),
31777
+ startMinute: number().int().min(0).max(1439),
31778
+ endMinute: number().int().min(1).max(1440)
31779
+ });
31780
+ /** Status of one physical volume, as the camera itself describes it. */
31781
+ var OnboardStorageVolumeSchema = object({
31782
+ /** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
31783
+ id: string(),
31784
+ /** The camera's own name for it, when it gives one (`hddName`). */
31785
+ label: string().optional(),
31786
+ status: _enum([
31787
+ "ok",
31788
+ "unformatted",
31789
+ "error",
31790
+ "offline",
31791
+ "unknown"
31792
+ ]),
31793
+ /**
31794
+ * Total size in MB, or **null when the camera did not say**.
31795
+ *
31796
+ * Never 0 for an unreadable value: a measurement that failed is not a
31797
+ * measurement (D393), and a card whose size is unknown must not be
31798
+ * rendered as a card of size zero.
31799
+ */
31800
+ capacityMb: number().nullable(),
31801
+ /**
31802
+ * Free space in MB, or null when unknown.
31803
+ *
31804
+ * **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
31805
+ * 1439 both report exactly 11776 MB free — the fixed reserve a looping
31806
+ * card converges on once it has wrapped. At loop steady state the
31807
+ * number is identical whether the camera recorded yesterday or stopped
31808
+ * a month ago.
31809
+ */
31810
+ freeMb: number().nullable(),
31811
+ /** True when the camera reports the volume writable (`property` RW). */
31812
+ writable: boolean().optional()
31813
+ });
31814
+ object({
31815
+ storage: discriminatedUnion("kind", [
31816
+ object({
31817
+ kind: literal("present"),
31818
+ volumes: array(OnboardStorageVolumeSchema)
31819
+ }),
31820
+ object({
31821
+ kind: literal("absent"),
31822
+ reason: string()
31823
+ }),
31824
+ object({
31825
+ kind: literal("unknown"),
31826
+ reason: string()
31827
+ })
31828
+ ]),
31829
+ tracks: array(object({
31830
+ id: string(),
31831
+ enabled: boolean(),
31832
+ isVideo: boolean(),
31833
+ /** From the camera's own track description. Null when it does not say. */
31834
+ codec: string().nullable(),
31835
+ resolution: string().nullable(),
31836
+ /** Per-track overwrite flag, where the firmware keeps it per track. */
31837
+ overwriteWhenFull: boolean().nullable()
31838
+ })),
31839
+ /**
31840
+ * The track the write path targets — the enabled VIDEO one. Null when
31841
+ * no track could be identified, which is itself a refusal reason.
31842
+ */
31843
+ primaryTrackId: string().nullable(),
31844
+ /** Master "record to the card at all" switch. */
31845
+ enabled: boolean().nullable(),
31846
+ overwriteWhenFull: boolean().nullable(),
31847
+ preRecordSec: number().nullable(),
31848
+ postRecordSec: number().nullable(),
31849
+ /** Length of one recorded file, in minutes. */
31850
+ segmentMinutes: number().nullable(),
31851
+ /** The primary track's weekly windows, flattened. */
31852
+ windows: array(RecordWindowSchema),
31853
+ /**
31854
+ * How many windows the camera described that CamStack could NOT read —
31855
+ * an unrecognised trigger, an unparseable clock, a weekday it does not
31856
+ * name.
31857
+ *
31858
+ * A dropped window is work the reader threw away, and a schedule that
31859
+ * silently shows fewer rows than the camera holds is how an operator
31860
+ * saves back a schedule shorter than the one they were looking at
31861
+ * (D391). Non-zero means the window list is INCOMPLETE and a write
31862
+ * that replaces it would delete what was not shown — which is why a
31863
+ * provider reporting a non-zero count also reports the schedule as not
31864
+ * writable.
31865
+ */
31866
+ unreadableWindows: number(),
31867
+ /**
31868
+ * The camera is scheduled to record and has NO usable storage.
31869
+ *
31870
+ * A first-class fact because it is the fleet's most common silent
31871
+ * defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
31872
+ * to a card that is not there. Neither the schedule nor the storage
31873
+ * read says anything wrong on its own; only the pair does.
31874
+ */
31875
+ recordingToNowhere: boolean(),
31876
+ lastFetchedAt: number()
31877
+ });
31878
+ /** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
31879
+ var RangeSchema = object({
31880
+ min: number(),
31881
+ max: number(),
31882
+ step: number()
31883
+ });
31884
+ /**
31885
+ * The values a camera actually takes for a numeric field, when they are a SET
31886
+ * rather than a range.
31887
+ *
31888
+ * `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
31889
+ * (I91DN) on 2026-09-22 by writing each value and reading it back:
31890
+ *
31891
+ * - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
31892
+ * camera's "no limit" — `-1` and `4294967295` both land on it);
31893
+ * - post-record: `5, 10, 30, 60, 120, 300, 600`.
31894
+ *
31895
+ * Neither is expressible as a step: the first has a sentinel two billion away
31896
+ * from its neighbours, the second doubles and then jumps. A range that tried
31897
+ * would forbid values the camera takes AND permit values it silently replaces
31898
+ * with 5 — wrong in both directions at once.
31899
+ *
31900
+ * `sentinel` names the member that is not a duration, so a surface can render
31901
+ * "no limit" instead of `2147483647` seconds.
31902
+ */
31903
+ var AllowedValuesSchema = object({
31904
+ values: array(number()).min(1),
31905
+ sentinel: object({
31906
+ value: number(),
31907
+ meaning: _enum(["no-limit", "disabled"])
31908
+ }).optional()
31909
+ });
31910
+ /**
31911
+ * Per-field availability on ONE camera.
31912
+ *
31913
+ * The field exists on every camera — this says whether this one can be
31914
+ * read and whether it can be written, and `reason` says why not when
31915
+ * either is false. The UI renders the control DISABLED with the reason
31916
+ * rather than hiding it, so a limitation is legible instead of looking
31917
+ * like a missing feature.
31918
+ */
31919
+ var OnboardFieldSupportSchema = object({
31920
+ readable: boolean(),
31921
+ writable: boolean(),
31922
+ /** Required whenever `readable` or `writable` is false. */
31923
+ reason: string().optional()
31924
+ });
31925
+ /** What this camera's schedule model can express. */
31926
+ var OnboardScheduleSupportSchema = object({
31927
+ support: OnboardFieldSupportSchema,
31928
+ /**
31929
+ * The smallest time step the camera can express, in minutes.
31930
+ *
31931
+ * Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
31932
+ * 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
31933
+ * window whose edges are not a multiple of this is REFUSED rather than
31934
+ * quietly rounded — rounding is how an operator's 06:30 becomes 06:00
31935
+ * and nothing says so.
31936
+ */
31937
+ granularityMinutes: number(),
31938
+ /** Triggers this camera can record on. A window naming another is refused. */
31939
+ triggers: array(RecordTriggerSchema),
31940
+ /**
31941
+ * False when the camera stores ONE trigger per time range, so two
31942
+ * windows overlapping on the same day cannot carry different triggers.
31943
+ * True on Reolink, whose mask is per-trigger and independent.
31944
+ */
31945
+ supportsOverlappingTriggers: boolean()
31946
+ });
31947
+ var RecordingOnboardOptionsSchema = object({
31948
+ enabled: OnboardFieldSupportSchema,
31949
+ overwriteWhenFull: OnboardFieldSupportSchema,
31950
+ preRecordSec: OnboardFieldSupportSchema,
31951
+ preRecordSecRange: RangeSchema.optional(),
31952
+ /** Preferred over the range when the camera takes a SET, not a span. */
31953
+ preRecordSecAllowed: AllowedValuesSchema.optional(),
31954
+ postRecordSec: OnboardFieldSupportSchema,
31955
+ postRecordSecRange: RangeSchema.optional(),
31956
+ /** Preferred over the range when the camera takes a SET, not a span. */
31957
+ postRecordSecAllowed: AllowedValuesSchema.optional(),
31958
+ segmentMinutes: OnboardFieldSupportSchema,
31959
+ segmentMinutesRange: RangeSchema.optional(),
31960
+ /** Preferred over the range when the camera takes a SET, not a span. */
31961
+ segmentMinutesAllowed: AllowedValuesSchema.optional(),
31962
+ schedule: OnboardScheduleSupportSchema
31963
+ });
31964
+ /**
31965
+ * A partial change. Every field optional.
31966
+ *
31967
+ * Unlike the other `deviceConfig` caps, a provider here does **NOT**
31968
+ * silently ignore a field it cannot support — it refuses, by name,
31969
+ * through {@link describeOnboardRefusal}. Silence on a recording setting
31970
+ * is the failure D62 exists to prevent: the operator believes the camera
31971
+ * is recording the way the form says, and it is not.
31972
+ */
31973
+ var RecordingOnboardPatchSchema = object({
31974
+ enabled: boolean().optional(),
31975
+ overwriteWhenFull: boolean().optional(),
31976
+ preRecordSec: number().optional(),
31977
+ postRecordSec: number().optional(),
31978
+ segmentMinutes: number().optional(),
31979
+ /** The complete new window set for the primary track — not a delta. */
31980
+ windows: array(RecordWindowSchema).optional()
31981
+ });
31982
+ DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
31983
+ deviceId: number(),
31984
+ settings: RecordingOnboardPatchSchema
31985
+ }), _void(), {
31986
+ kind: "mutation",
31987
+ auth: "admin"
31988
+ });
31989
+ /**
31674
31990
  * A camera's own "record me NOW" LEVEL — a signal the device raises while
31675
31991
  * something it knows about is happening (a robot vacuum cleaning, a machine
31676
31992
  * running, a gate open) and lowers when it stops.
@@ -36964,24 +37280,6 @@ Object.freeze({
36964
37280
  addonId: null,
36965
37281
  access: "view"
36966
37282
  },
36967
- "events.getEventClipUrl": {
36968
- capName: "events",
36969
- capScope: "device",
36970
- addonId: null,
36971
- access: "view"
36972
- },
36973
- "events.getEvents": {
36974
- capName: "events",
36975
- capScope: "device",
36976
- addonId: null,
36977
- access: "view"
36978
- },
36979
- "events.getEventThumbnail": {
36980
- capName: "events",
36981
- capScope: "device",
36982
- addonId: null,
36983
- access: "view"
36984
- },
36985
37283
  "faceGallery.assignFace": {
36986
37284
  capName: "face-gallery",
36987
37285
  capScope: "system",
@@ -39856,224 +40154,236 @@ Object.freeze({
39856
40154
  addonId: null,
39857
40155
  access: "create"
39858
40156
  },
39859
- "recording.applyDeviceSettingsPatch": {
40157
+ "recording.getAvailability": {
39860
40158
  capName: "recording",
39861
- capScope: "system",
40159
+ capScope: "device",
39862
40160
  addonId: null,
39863
- access: "create"
40161
+ access: "view"
39864
40162
  },
39865
- "recording.cancelRelocateJob": {
40163
+ "recording.getDaysWithRecordings": {
39866
40164
  capName: "recording",
39867
- capScope: "system",
40165
+ capScope: "device",
39868
40166
  addonId: null,
39869
- access: "create"
40167
+ access: "view"
39870
40168
  },
39871
- "recording.cancelStorageMigrationMove": {
40169
+ "recording.getPlayback": {
39872
40170
  capName: "recording",
39873
- capScope: "system",
40171
+ capScope: "device",
39874
40172
  addonId: null,
39875
- access: "create"
40173
+ access: "view"
39876
40174
  },
39877
- "recording.deleteFootprint": {
40175
+ "recording.getPlaybackOptions": {
39878
40176
  capName: "recording",
39879
- capScope: "system",
40177
+ capScope: "device",
39880
40178
  addonId: null,
39881
- access: "delete"
40179
+ access: "view"
39882
40180
  },
39883
- "recording.getAvailability": {
40181
+ "recording.listSources": {
39884
40182
  capName: "recording",
39885
- capScope: "system",
40183
+ capScope: "device",
39886
40184
  addonId: null,
39887
40185
  access: "view"
39888
40186
  },
39889
- "recording.getAvailabilityBatch": {
39890
- capName: "recording",
40187
+ "recordingArchive.applyDeviceSettingsPatch": {
40188
+ capName: "recording-archive",
39891
40189
  capScope: "system",
39892
40190
  addonId: null,
39893
- access: "view"
40191
+ access: "create"
39894
40192
  },
39895
- "recording.getDaysWithRecordings": {
39896
- capName: "recording",
40193
+ "recordingArchive.cancelRelocateJob": {
40194
+ capName: "recording-archive",
39897
40195
  capScope: "system",
39898
40196
  addonId: null,
39899
- access: "view"
40197
+ access: "create"
39900
40198
  },
39901
- "recording.getDaysWithRecordingsBatch": {
39902
- capName: "recording",
40199
+ "recordingArchive.cancelStorageMigrationMove": {
40200
+ capName: "recording-archive",
40201
+ capScope: "system",
40202
+ addonId: null,
40203
+ access: "create"
40204
+ },
40205
+ "recordingArchive.deleteFootprint": {
40206
+ capName: "recording-archive",
40207
+ capScope: "system",
40208
+ addonId: null,
40209
+ access: "delete"
40210
+ },
40211
+ "recordingArchive.getAvailabilityBatch": {
40212
+ capName: "recording-archive",
39903
40213
  capScope: "system",
39904
40214
  addonId: null,
39905
40215
  access: "view"
39906
40216
  },
39907
- "recording.getDeviceConfig": {
39908
- capName: "recording",
40217
+ "recordingArchive.getDaysWithRecordingsBatch": {
40218
+ capName: "recording-archive",
39909
40219
  capScope: "system",
39910
40220
  addonId: null,
39911
40221
  access: "view"
39912
40222
  },
39913
- "recording.getDeviceLiveContribution": {
39914
- capName: "recording",
40223
+ "recordingArchive.getDeviceConfig": {
40224
+ capName: "recording-archive",
39915
40225
  capScope: "system",
39916
40226
  addonId: null,
39917
40227
  access: "view"
39918
40228
  },
39919
- "recording.getDeviceSettingsContribution": {
39920
- capName: "recording",
40229
+ "recordingArchive.getDeviceLiveContribution": {
40230
+ capName: "recording-archive",
39921
40231
  capScope: "system",
39922
40232
  addonId: null,
39923
40233
  access: "view"
39924
40234
  },
39925
- "recording.getPlacement": {
39926
- capName: "recording",
40235
+ "recordingArchive.getDeviceSettingsContribution": {
40236
+ capName: "recording-archive",
39927
40237
  capScope: "system",
39928
40238
  addonId: null,
39929
40239
  access: "view"
39930
40240
  },
39931
- "recording.getPlaybackManifest": {
39932
- capName: "recording",
40241
+ "recordingArchive.getPlacement": {
40242
+ capName: "recording-archive",
39933
40243
  capScope: "system",
39934
40244
  addonId: null,
39935
40245
  access: "view"
39936
40246
  },
39937
- "recording.getRelocateResidue": {
39938
- capName: "recording",
40247
+ "recordingArchive.getRelocateResidue": {
40248
+ capName: "recording-archive",
39939
40249
  capScope: "system",
39940
40250
  addonId: null,
39941
40251
  access: "view"
39942
40252
  },
39943
- "recording.getStatus": {
39944
- capName: "recording",
40253
+ "recordingArchive.getStatus": {
40254
+ capName: "recording-archive",
39945
40255
  capScope: "system",
39946
40256
  addonId: null,
39947
40257
  access: "view"
39948
40258
  },
39949
- "recording.getStorageMigrationMoveStatus": {
39950
- capName: "recording",
40259
+ "recordingArchive.getStorageMigrationMoveStatus": {
40260
+ capName: "recording-archive",
39951
40261
  capScope: "system",
39952
40262
  addonId: null,
39953
40263
  access: "view"
39954
40264
  },
39955
- "recording.getStorageUsage": {
39956
- capName: "recording",
40265
+ "recordingArchive.getStorageUsage": {
40266
+ capName: "recording-archive",
39957
40267
  capScope: "system",
39958
40268
  addonId: null,
39959
40269
  access: "view"
39960
40270
  },
39961
- "recording.listOpsLog": {
39962
- capName: "recording",
40271
+ "recordingArchive.listOpsLog": {
40272
+ capName: "recording-archive",
39963
40273
  capScope: "system",
39964
40274
  addonId: null,
39965
40275
  access: "view"
39966
40276
  },
39967
- "recording.listRelocateJobs": {
39968
- capName: "recording",
40277
+ "recordingArchive.listRelocateJobs": {
40278
+ capName: "recording-archive",
39969
40279
  capScope: "system",
39970
40280
  addonId: null,
39971
40281
  access: "view"
39972
40282
  },
39973
- "recording.locateSegment": {
39974
- capName: "recording",
40283
+ "recordingArchive.locateSegment": {
40284
+ capName: "recording-archive",
39975
40285
  capScope: "system",
39976
40286
  addonId: null,
39977
40287
  access: "view"
39978
40288
  },
39979
- "recording.pauseForStorageMigration": {
39980
- capName: "recording",
40289
+ "recordingArchive.pauseForStorageMigration": {
40290
+ capName: "recording-archive",
39981
40291
  capScope: "system",
39982
40292
  addonId: null,
39983
40293
  access: "create"
39984
40294
  },
39985
- "recording.planStorageRebalance": {
39986
- capName: "recording",
40295
+ "recordingArchive.planStorageRebalance": {
40296
+ capName: "recording-archive",
39987
40297
  capScope: "system",
39988
40298
  addonId: null,
39989
40299
  access: "view"
39990
40300
  },
39991
- "recording.pruneFootage": {
39992
- capName: "recording",
40301
+ "recordingArchive.pruneFootage": {
40302
+ capName: "recording-archive",
39993
40303
  capScope: "system",
39994
40304
  addonId: null,
39995
40305
  access: "create"
39996
40306
  },
39997
- "recording.readGopBytes": {
39998
- capName: "recording",
40307
+ "recordingArchive.readGopBytes": {
40308
+ capName: "recording-archive",
39999
40309
  capScope: "system",
40000
40310
  addonId: null,
40001
40311
  access: "view"
40002
40312
  },
40003
- "recording.readSegmentBytes": {
40004
- capName: "recording",
40313
+ "recordingArchive.readSegmentBytes": {
40314
+ capName: "recording-archive",
40005
40315
  capScope: "system",
40006
40316
  addonId: null,
40007
40317
  access: "view"
40008
40318
  },
40009
- "recording.readWindowBytes": {
40010
- capName: "recording",
40319
+ "recordingArchive.readWindowBytes": {
40320
+ capName: "recording-archive",
40011
40321
  capScope: "system",
40012
40322
  addonId: null,
40013
40323
  access: "view"
40014
40324
  },
40015
- "recording.reconcileLedgerAgainstDisk": {
40016
- capName: "recording",
40325
+ "recordingArchive.reconcileLedgerAgainstDisk": {
40326
+ capName: "recording-archive",
40017
40327
  capScope: "system",
40018
40328
  addonId: null,
40019
40329
  access: "create"
40020
40330
  },
40021
- "recording.refreshStorageLocationsForMigration": {
40022
- capName: "recording",
40331
+ "recordingArchive.refreshStorageLocationsForMigration": {
40332
+ capName: "recording-archive",
40023
40333
  capScope: "system",
40024
40334
  addonId: null,
40025
40335
  access: "create"
40026
40336
  },
40027
- "recording.relocateFootage": {
40028
- capName: "recording",
40337
+ "recordingArchive.relocateFootage": {
40338
+ capName: "recording-archive",
40029
40339
  capScope: "system",
40030
40340
  addonId: null,
40031
40341
  access: "create"
40032
40342
  },
40033
- "recording.renderClip": {
40034
- capName: "recording",
40343
+ "recordingArchive.renderClip": {
40344
+ capName: "recording-archive",
40035
40345
  capScope: "system",
40036
40346
  addonId: null,
40037
40347
  access: "create"
40038
40348
  },
40039
- "recording.renderGif": {
40040
- capName: "recording",
40349
+ "recordingArchive.renderGif": {
40350
+ capName: "recording-archive",
40041
40351
  capScope: "system",
40042
40352
  addonId: null,
40043
40353
  access: "create"
40044
40354
  },
40045
- "recording.rescanStorage": {
40046
- capName: "recording",
40355
+ "recordingArchive.rescanStorage": {
40356
+ capName: "recording-archive",
40047
40357
  capScope: "system",
40048
40358
  addonId: null,
40049
40359
  access: "create"
40050
40360
  },
40051
- "recording.resumeForStorageMigration": {
40052
- capName: "recording",
40361
+ "recordingArchive.resumeForStorageMigration": {
40362
+ capName: "recording-archive",
40053
40363
  capScope: "system",
40054
40364
  addonId: null,
40055
40365
  access: "create"
40056
40366
  },
40057
- "recording.setDeviceConfig": {
40058
- capName: "recording",
40367
+ "recordingArchive.setDeviceConfig": {
40368
+ capName: "recording-archive",
40059
40369
  capScope: "system",
40060
40370
  addonId: null,
40061
40371
  access: "create"
40062
40372
  },
40063
- "recording.setDevicePlacement": {
40064
- capName: "recording",
40373
+ "recordingArchive.setDevicePlacement": {
40374
+ capName: "recording-archive",
40065
40375
  capScope: "system",
40066
40376
  addonId: null,
40067
40377
  access: "create"
40068
40378
  },
40069
- "recording.startStorageMigrationMove": {
40070
- capName: "recording",
40379
+ "recordingArchive.startStorageMigrationMove": {
40380
+ capName: "recording-archive",
40071
40381
  capScope: "system",
40072
40382
  addonId: null,
40073
40383
  access: "create"
40074
40384
  },
40075
- "recording.startStorageRebalance": {
40076
- capName: "recording",
40385
+ "recordingArchive.startStorageRebalance": {
40386
+ capName: "recording-archive",
40077
40387
  capScope: "system",
40078
40388
  addonId: null,
40079
40389
  access: "create"
@@ -41602,6 +41912,12 @@ Object.freeze({
41602
41912
  addonId: null,
41603
41913
  access: "view"
41604
41914
  },
41915
+ "videoclips.getPlaybackOptions": {
41916
+ capName: "videoclips",
41917
+ capScope: "device",
41918
+ addonId: null,
41919
+ access: "view"
41920
+ },
41605
41921
  "videoclips.listClips": {
41606
41922
  capName: "videoclips",
41607
41923
  capScope: "device",
@@ -41614,6 +41930,12 @@ Object.freeze({
41614
41930
  addonId: null,
41615
41931
  access: "view"
41616
41932
  },
41933
+ "videoclips.offerClipBytes": {
41934
+ capName: "videoclips",
41935
+ capScope: "device",
41936
+ addonId: null,
41937
+ access: "view"
41938
+ },
41617
41939
  "videoclips.readClipBytes": {
41618
41940
  capName: "videoclips",
41619
41941
  capScope: "device",
@@ -42366,21 +42688,6 @@ Object.freeze({
42366
42688
  form: "single",
42367
42689
  optional: false
42368
42690
  }],
42369
- "events.getEventClipUrl": [{
42370
- name: "deviceId",
42371
- form: "single",
42372
- optional: false
42373
- }],
42374
- "events.getEvents": [{
42375
- name: "deviceId",
42376
- form: "single",
42377
- optional: false
42378
- }],
42379
- "events.getEventThumbnail": [{
42380
- name: "deviceId",
42381
- form: "single",
42382
- optional: false
42383
- }],
42384
42691
  "faceGallery.getFaceByTrack": [{
42385
42692
  name: "deviceId",
42386
42693
  form: "single",
@@ -43299,107 +43606,117 @@ Object.freeze({
43299
43606
  form: "single",
43300
43607
  optional: false
43301
43608
  }],
43302
- "recording.deleteFootprint": [{
43609
+ "recording.getAvailability": [{
43303
43610
  name: "deviceId",
43304
43611
  form: "single",
43305
43612
  optional: false
43306
43613
  }],
43307
- "recording.getAvailability": [{
43614
+ "recording.getDaysWithRecordings": [{
43308
43615
  name: "deviceId",
43309
43616
  form: "single",
43310
43617
  optional: false
43311
43618
  }],
43312
- "recording.getAvailabilityBatch": [{
43313
- name: "deviceIds",
43314
- form: "array",
43619
+ "recording.getPlayback": [{
43620
+ name: "deviceId",
43621
+ form: "single",
43315
43622
  optional: false
43316
43623
  }],
43317
- "recording.getDaysWithRecordings": [{
43624
+ "recording.getPlaybackOptions": [{
43318
43625
  name: "deviceId",
43319
43626
  form: "single",
43320
43627
  optional: false
43321
43628
  }],
43322
- "recording.getDaysWithRecordingsBatch": [{
43323
- name: "deviceIds",
43324
- form: "array",
43629
+ "recording.listSources": [{
43630
+ name: "deviceId",
43631
+ form: "single",
43325
43632
  optional: false
43326
43633
  }],
43327
- "recording.getDeviceConfig": [{
43634
+ "recordingArchive.deleteFootprint": [{
43328
43635
  name: "deviceId",
43329
43636
  form: "single",
43330
43637
  optional: false
43331
43638
  }],
43332
- "recording.getPlaybackManifest": [{
43639
+ "recordingArchive.getAvailabilityBatch": [{
43640
+ name: "deviceIds",
43641
+ form: "array",
43642
+ optional: false
43643
+ }],
43644
+ "recordingArchive.getDaysWithRecordingsBatch": [{
43645
+ name: "deviceIds",
43646
+ form: "array",
43647
+ optional: false
43648
+ }],
43649
+ "recordingArchive.getDeviceConfig": [{
43333
43650
  name: "deviceId",
43334
43651
  form: "single",
43335
43652
  optional: false
43336
43653
  }],
43337
- "recording.listOpsLog": [{
43654
+ "recordingArchive.listOpsLog": [{
43338
43655
  name: "deviceId",
43339
43656
  form: "single",
43340
43657
  optional: true
43341
43658
  }],
43342
- "recording.locateSegment": [{
43659
+ "recordingArchive.locateSegment": [{
43343
43660
  name: "deviceId",
43344
43661
  form: "single",
43345
43662
  optional: false
43346
43663
  }],
43347
- "recording.pruneFootage": [{
43664
+ "recordingArchive.pruneFootage": [{
43348
43665
  name: "deviceId",
43349
43666
  form: "single",
43350
43667
  optional: false
43351
43668
  }],
43352
- "recording.readGopBytes": [{
43669
+ "recordingArchive.readGopBytes": [{
43353
43670
  name: "deviceId",
43354
43671
  form: "single",
43355
43672
  optional: false
43356
43673
  }],
43357
- "recording.readSegmentBytes": [{
43674
+ "recordingArchive.readSegmentBytes": [{
43358
43675
  name: "deviceId",
43359
43676
  form: "single",
43360
43677
  optional: false
43361
43678
  }],
43362
- "recording.readWindowBytes": [{
43679
+ "recordingArchive.readWindowBytes": [{
43363
43680
  name: "deviceId",
43364
43681
  form: "single",
43365
43682
  optional: false
43366
43683
  }],
43367
- "recording.reconcileLedgerAgainstDisk": [{
43684
+ "recordingArchive.reconcileLedgerAgainstDisk": [{
43368
43685
  name: "deviceId",
43369
43686
  form: "single",
43370
43687
  optional: true
43371
43688
  }],
43372
- "recording.relocateFootage": [{
43689
+ "recordingArchive.relocateFootage": [{
43373
43690
  name: "deviceId",
43374
43691
  form: "single",
43375
43692
  optional: true
43376
43693
  }],
43377
- "recording.renderClip": [{
43694
+ "recordingArchive.renderClip": [{
43378
43695
  name: "deviceId",
43379
43696
  form: "single",
43380
43697
  optional: false
43381
43698
  }],
43382
- "recording.renderGif": [{
43699
+ "recordingArchive.renderGif": [{
43383
43700
  name: "deviceId",
43384
43701
  form: "single",
43385
43702
  optional: false
43386
43703
  }],
43387
- "recording.rescanStorage": [{
43704
+ "recordingArchive.rescanStorage": [{
43388
43705
  name: "deviceId",
43389
43706
  form: "single",
43390
43707
  optional: false
43391
43708
  }],
43392
- "recording.setDeviceConfig": [{
43709
+ "recordingArchive.setDeviceConfig": [{
43393
43710
  name: "deviceId",
43394
43711
  form: "single",
43395
43712
  optional: false
43396
43713
  }],
43397
- "recording.setDevicePlacement": [{
43714
+ "recordingArchive.setDevicePlacement": [{
43398
43715
  name: "deviceId",
43399
43716
  form: "single",
43400
43717
  optional: false
43401
43718
  }],
43402
- "recording.startStorageMigrationMove": [{
43719
+ "recordingArchive.startStorageMigrationMove": [{
43403
43720
  name: "deviceId",
43404
43721
  form: "single",
43405
43722
  optional: true
@@ -43660,6 +43977,11 @@ Object.freeze({
43660
43977
  form: "single",
43661
43978
  optional: false
43662
43979
  }],
43980
+ "videoclips.getPlaybackOptions": [{
43981
+ name: "deviceId",
43982
+ form: "single",
43983
+ optional: false
43984
+ }],
43663
43985
  "videoclips.listClips": [{
43664
43986
  name: "deviceId",
43665
43987
  form: "single",
@@ -43670,6 +43992,11 @@ Object.freeze({
43670
43992
  form: "single",
43671
43993
  optional: false
43672
43994
  }],
43995
+ "videoclips.offerClipBytes": [{
43996
+ name: "deviceId",
43997
+ form: "single",
43998
+ optional: false
43999
+ }],
43673
44000
  "videoclips.readClipBytes": [{
43674
44001
  name: "deviceId",
43675
44002
  form: "single",