@camstack/addon-model-studio 1.1.166 → 1.1.168

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-C2ftiA6i.mjs → MotionZonesSettings-WwZvrN_o.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-Xg4k3L47.mjs → PrivacyMaskSettings-eoz9NK5G.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-CEsQn7b2.mjs → SceneMonitorEditor-BV4pet19.mjs} +3 -3
  4. package/dist/_stub.js +1403 -1353
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-Doe1jImv.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BcAq_qie.mjs} +3 -3
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BvVNN6qP.mjs +26 -0
  7. package/dist/{hostInit-DJug5Kyx.mjs → hostInit-CINiPlUz.mjs} +2 -2
  8. package/dist/model-studio.addon.js +1265 -853
  9. package/dist/model-studio.addon.mjs +1265 -853
  10. package/dist/{player-overlays-Drd0jdDm.mjs → player-overlays-Cxpzecy1.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-CO49Ymxi.mjs → responsive-C1StxoX1.mjs} +1 -1
  13. package/dist/{scene-monitor-copy-D5Esy39C.mjs → scene-monitor-copy-b4S8KzJH.mjs} +1 -1
  14. package/dist/{square-I3JVGn-g.mjs → square-BzuCtKO-.mjs} +1 -1
  15. package/dist/{trash-2-Rdm8qwZb.mjs → trash-2-CWtVmull.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-WVMYffMk.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-xULEt-Fx.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-ByY5idrl.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-COWaSCAi.mjs
5866
+ //#region ../types/dist/sleep-pM_J7YnY.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",
@@ -8098,24 +8116,6 @@ object({
8098
8116
  unreachable: number()
8099
8117
  })
8100
8118
  });
8101
- /** The wire shape of {@link PeerBytesTicket} — see the type for what it is. */
8102
- var PeerBytesTicketSchema = object({
8103
- /** `http://127.0.0.1:<port>/<token>`. One `GET` takes it. */
8104
- url: string().min(1),
8105
- /**
8106
- * The HOST node this URL means something on — the hub or a named agent,
8107
- * never a runner. {@link AddonPeerBytes.open} compares it to its own and
8108
- * refuses `cross-node` by name when they differ, without dialling.
8109
- */
8110
- hostNodeId: string().min(1),
8111
- expiresAtMs: number().int().nonnegative(),
8112
- /**
8113
- * What the producer DECLARED the body to be, when it knows — `null` when it
8114
- * does not. Never `0` for unknown (D393): a consumer sizing a bound off this
8115
- * must be able to tell "the producer did not say" from "the body is empty".
8116
- */
8117
- declaredBytes: number().int().nonnegative().nullable()
8118
- });
8119
8119
  /**
8120
8120
  * Adoption job — the background form of `device-adoption.adopt`.
8121
8121
  *
@@ -8227,7 +8227,7 @@ var AdoptionJobSchema = object({
8227
8227
  * component's original options — detection to the detection-pipeline wrapper
8228
8228
  * binding, audio analysis to its own, recording to `RecordingConfig.enabled`
8229
8229
  * (which was always first-class; the switch was a veneer over
8230
- * `recording.setDeviceConfig`), notifications to a notification-center
8230
+ * `recordingArchive.setDeviceConfig`), notifications to a notification-center
8231
8231
  * per-device setting, the two camera planes to their own components.
8232
8232
  *
8233
8233
  * What survives is {@link composeSwitchedOff}: `CameraStatus.switchedOff`, the
@@ -8253,7 +8253,7 @@ var AdoptionJobSchema = object({
8253
8253
  * | `stream-broker` | `deviceManager.setDisabled` | `StreamBrokerManager.reconcileAllCatalogs` releases the brokers; `ensureBroker` refuses re-creation |
8254
8254
  * | `object-detection` | `deviceManager.setWrapperActive('detection-pipeline')` | `PipelineSettingsStore.resolvePipelineForDevice` returns `{ steps: [], audio: null }` |
8255
8255
  * | `audio-analysis` | `deviceManager.setWrapperActive('audio-analysis')` | `AudioSubscriptionController.subscribeAudioStream` returns `null` before opening the stream |
8256
- * | `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 |
8257
8257
  * | `notifications` | `notificationRules.setDeviceMuted` | `NotificationCenter.evaluateAndEnqueue` returns before any rule is evaluated |
8258
8258
  * | `privacy-mask` | `privacyMask.setMask({ enabled })` → the CAMERA | the camera blanks the masked regions itself; every stream and recording carries the black boxes |
8259
8259
  * | `device-audio` | `privacyMask.setAudioEnabled` → the CAMERA | the camera stops encoding an audio track at all; every consumer sees silent video |
@@ -12169,58 +12169,6 @@ method(ListInputSchema, array(BrokerInfoSchema$1)), method(GetInputSchema, Broke
12169
12169
  auth: "admin"
12170
12170
  }), method(GetStateInputSchema, unknown().nullable()), method(_void(), RegistryStatusSchema);
12171
12171
  DeviceType.Camera;
12172
- /**
12173
- * The signals a device can emit to WAKE its own stream.
12174
- *
12175
- * A camera whose stream is built on demand sleeps until something asks for it,
12176
- * and "something" cannot be a consumer that is merely attached — a Frigate-style
12177
- * puller holds a session open for ever, and treating that as demand would keep
12178
- * a battery camera awake for ever, which is the whole thing the battery is for
12179
- * (D173). So the wake has to come from the CAMERA: an event it noticed by
12180
- * itself, with no stream running.
12181
- *
12182
- * ## The vocabulary is the PROVIDER'S, not ours
12183
- *
12184
- * Like `consumables`, this cap declares no vocabulary of its own. A provider
12185
- * names each signal with a `code` it chooses and a `label` an operator reads.
12186
- * Reolink offers motion and camera-native detection; another provider may offer
12187
- * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
12188
- * yet. A fixed enum here would mean every new signal is a framework release.
12189
- *
12190
- * It is deliberately NOT derived from the caps a device already binds. Whether
12191
- * a camera CAN push firmware motion is expressed by `motionSources` containing
12192
- * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
12193
- * binding — but both answer "what drives the detection pipeline", which is a
12194
- * different question from "what may wake a sleeping stream". A camera can do
12195
- * the first and not be trusted with the second, and the operator picks per
12196
- * camera. Two questions, two authorities.
12197
- *
12198
- * ## Availability is not permission
12199
- *
12200
- * `listSignals` says what the device CAN emit. Whether a given signal actually
12201
- * wakes the stream is the operator's per-camera choice, held by the broker
12202
- * alongside the cooldown — see the stream-broker cap's wake settings. A
12203
- * provider declaring a signal is not a provider enabling it.
12204
- */
12205
- /** One signal a device can emit. */
12206
- var StreamSignalSchema = object({
12207
- /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
12208
- code: string().min(1),
12209
- /** What an operator reads in the picker. The provider's own wording. */
12210
- label: string().min(1),
12211
- /**
12212
- * Whether the provider recommends this signal ON when a camera is first set
12213
- * up. A provider knows which of its signals are cheap and reliable; an
12214
- * operator should not have to discover that by trial. Reolink recommends
12215
- * both of its own.
12216
- */
12217
- recommended: boolean()
12218
- });
12219
- object({
12220
- signals: array(StreamSignalSchema),
12221
- lastFetchedAt: number()
12222
- });
12223
- Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
12224
12172
  /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
12225
12173
  var StreamFormatSchema = _enum([
12226
12174
  "webrtc",
@@ -13600,6 +13548,97 @@ method(object({ codec: string() }), boolean()), method(_void(), object({
13600
13548
  });
13601
13549
  DeviceType.Camera;
13602
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
+ /**
13603
13642
  * Identity envelope for a device's upstream-system metadata.
13604
13643
  *
13605
13644
  * Two jobs:
@@ -13927,97 +13966,6 @@ method(object({ integrationId: string() }), object({ filters: array(AdoptionFilt
13927
13966
  auth: "admin"
13928
13967
  });
13929
13968
  /**
13930
- * device-admin-link — "this device has a management page of its own, and here
13931
- * is its address".
13932
- *
13933
- * ## Why this is not a `deviceConfig` cap
13934
- *
13935
- * There is nothing to edit. A `deviceConfig` cap (D14) exists so the framework
13936
- * can DERIVE a settings form from `getOptions` + `getStatus` and route a flat
13937
- * patch back through a setter; it costs a `builderId` reducer in
13938
- * `device-config-contribution.ts` and a `*-config-schema.ts` beside it, and it
13939
- * renders a form section. This cap answers ONE question with ONE read and
13940
- * renders a button. Nothing about it is a form, so it carries no `deviceConfig`
13941
- * block, no `settings`, no `runtimeState` and no reducer — exactly like
13942
- * `reboot`, the other pure-RPC device-native cap.
13943
- *
13944
- * ## Absent, and the difference between "no page" and "we cannot say"
13945
- *
13946
- * The two are answered at DIFFERENT layers, on purpose:
13947
- *
13948
- * - **"We cannot say"** → the provider never registers the cap for that
13949
- * device. A VeSync humidifier, a Petkit feeder, a Dreame vacuum and a Dreo
13950
- * fan are reached only through a vendor cloud; there is no address to hand
13951
- * out and no page to open. A Tuya plug, a Wyze camera and a Gree air
13952
- * conditioner DO have a LAN IP, and still have no HTTP management page
13953
- * behind it. None of them register, so `deviceManager.getBindings` never
13954
- * lists the cap and no surface asks.
13955
- * - **"This device has no page, and I know that"** → the provider registers
13956
- * and `getAdminLink` returns `null`. This is the answer for a device whose
13957
- * sibling DOES have a page: a Reolink battery camera reached over UDP by
13958
- * `uid` with a blank `host`, an Ecowitt gateway configured in `listener`
13959
- * transport, a Home Assistant broker authenticated by supervisor token
13960
- * (which carries no `baseUrl` at all).
13961
- *
13962
- * Both draw NOTHING. A button that opens a browser error is worse than no
13963
- * button, and D62 is the same rule from the other side: an off switch is
13964
- * reported off, never made to look broken. There is no third state where the
13965
- * UI renders a disabled button "because the device might have a page".
13966
- *
13967
- * ## The URL never carries credentials
13968
- *
13969
- * Not in userinfo, not in a query string. Every provider builds through
13970
- * `buildDeviceAdminUrl` (`device-admin-link-url.ts`), which takes host, port,
13971
- * scheme and path as separate arguments — there is no parameter a secret could
13972
- * arrive in — and re-checks its own output for the `scheme://user:pass@` shape
13973
- * that `scripts/check-no-credential-urls-in-fixtures.ts` bans from recorded
13974
- * output. `scripts/check-admin-link-builder-is-the-only-url-source.ts` is what
13975
- * keeps providers from hand-rolling one anyway.
13976
- *
13977
- * This matters here more than anywhere else in the repo, because every provider
13978
- * that knows a device's host knows its PASSWORD too: `{ host, port, username,
13979
- * password }` sit in one object on Hikvision, Amcrest, Reolink and ONVIF alike,
13980
- * and `http://admin:hunter2@192.168.50.139/` is a URL a browser accepts. The
13981
- * camera's own page will ask for its own login. That is correct, and pre-
13982
- * filling it is the operator's business, not ours.
13983
- *
13984
- * ## It is a LAN fact
13985
- *
13986
- * The URL addresses the device where the NODE can see it. It is not proxied,
13987
- * not made reachable from outside, and not sent anywhere. A surface renders it
13988
- * as a link the operator's own browser follows, on the operator's own network,
13989
- * or renders nothing.
13990
- */
13991
- /**
13992
- * Whose page is it. The distinction is for the OPERATOR, who needs to know
13993
- * before clicking whether he is about to land on a camera's own web server or
13994
- * inside Home Assistant.
13995
- */
13996
- var AdminLinkTargetEnum = _enum(["device", "integration"]);
13997
- var DeviceAdminLinkSchema = object({
13998
- /**
13999
- * Absolute `http(s)://` URL. Built by `buildDeviceAdminUrl` and therefore
14000
- * free of userinfo and of any credential-shaped query key.
14001
- */
14002
- url: string(),
14003
- /**
14004
- * What the surface calls it — "Web UI", "Home Assistant", "UniFi controller".
14005
- * The PROVIDER names it, because only the provider knows what the page is;
14006
- * a UI that invented the label from the addon id would call the Home
14007
- * Assistant device page "Provider Homeassistant".
14008
- */
14009
- label: string(),
14010
- target: AdminLinkTargetEnum,
14011
- /**
14012
- * Host the URL points at, without scheme, port or path — for the tooltip, so
14013
- * an operator can see WHERE the button goes before he follows it. Redundant
14014
- * with `url` by construction; carried separately so no surface has to parse
14015
- * a URL to show it.
14016
- */
14017
- host: string()
14018
- });
14019
- method(object({ deviceId: number().int().nonnegative() }), DeviceAdminLinkSchema.nullable(), { auth: "admin" });
14020
- /**
14021
13969
  * `device-export` — collection cap for addons that export camstack
14022
13970
  * devices to external ecosystems (HomeAssistant via MQTT discovery,
14023
13971
  * HomeKit/HAP, Alexa Smart Home, …).
@@ -17210,6 +17158,7 @@ sub("presence", "sensor", "sensor", "#22c55e", "presence", "Presence");
17210
17158
  sub("enum-sensor", "sensor", "sensor", TAXONOMY_COLORS.sensor, "generic", "Sensor state");
17211
17159
  sub("device-event", "sensor", "sensor", "#10b981", "button", "Device event");
17212
17160
  sub("lock", "control", "control", "#0ea5e9", "lock", "Lock");
17161
+ sub("cover", "control", "control", "#0ea5e9", "door", "Cover");
17213
17162
  sub("switch", "control", "control", TAXONOMY_COLORS.control, "switch", "Switch");
17214
17163
  sub("siren", "control", "control", "#dc2626", "siren", "Siren");
17215
17164
  sub("button", "control", "control", "#10b981", "button", "Button");
@@ -17490,6 +17439,10 @@ var NcSystemEventKindSchema = _enum([
17490
17439
  "alarm-disarmed",
17491
17440
  "alarm-arming",
17492
17441
  "alarm-arm-refused",
17442
+ "alarm-pending",
17443
+ "alarm-rearmed",
17444
+ "alarm-sensor-bypass",
17445
+ "alarm-check-failed",
17493
17446
  "addon-updated",
17494
17447
  "server-updated",
17495
17448
  "export-completed",
@@ -18085,6 +18038,19 @@ var NcMediaFrameSchema = _enum([
18085
18038
  "full",
18086
18039
  "boxed"
18087
18040
  ]);
18041
+ /**
18042
+ * How a SENSOR notification shows the cameras that link the sensor.
18043
+ *
18044
+ * `mosaic` — one image composed of every linked camera's photograph, taken at
18045
+ * the trigger. `each` — one image per camera where the target takes several
18046
+ * attachments; a target that takes one keeps the first camera's (the degrade
18047
+ * engine drops the rest by order). Either way ONE notification per event.
18048
+ * Absent = `mosaic`, applied by the Notification Center and deliberately NOT
18049
+ * a Zod default (see NcRulePatchSchema: a default materialises on every
18050
+ * partial patch). Meaningless for a rule whose subject is not a sensor, and a
18051
+ * sensor linked to one camera ships that camera's plain snapshot either way.
18052
+ */
18053
+ var NcLinkedCameraModeSchema = _enum(["mosaic", "each"]);
18088
18054
  var NcMediaPolicySchema = object({
18089
18055
  attach: _enum([
18090
18056
  "best",
@@ -18130,7 +18096,9 @@ var NcMediaPolicySchema = object({
18130
18096
  * A profile that is not assigned falls back to the cheapest, and the render
18131
18097
  * reports which one actually ran.
18132
18098
  */
18133
- profile: CamProfileSchema.optional()
18099
+ profile: CamProfileSchema.optional(),
18100
+ /** See {@link NcLinkedCameraModeSchema}. */
18101
+ linkedCameras: NcLinkedCameraModeSchema.optional()
18134
18102
  });
18135
18103
  /**
18136
18104
  * Cooldown GRANULARITY over the subject's class — how much a fired
@@ -18250,7 +18218,7 @@ var NcRuleInputSchema = object({
18250
18218
  cooldownSec: 60,
18251
18219
  scope: "rule-device"
18252
18220
  }),
18253
- /** `{{var}}` templating over camera/class/label/zones/confidence/time. */
18221
+ /** `{{var}}` title/body. The variables are declared in `NC_TEMPLATE_VARS` (@camstack/types) and depend on the rule kind — see `templateVarsFor`. */
18254
18222
  template: object({
18255
18223
  title: string().max(500).optional(),
18256
18224
  body: string().max(2e3).optional()
@@ -18430,6 +18398,22 @@ var NcRulePatchSchema = NcRuleInputSchema.partial().extend({
18430
18398
  throttle: NcThrottleSchema.optional(),
18431
18399
  priority: number().int().min(1).max(5).optional()
18432
18400
  });
18401
+ var NcRuleClearableKeySchema = _enum([
18402
+ "template",
18403
+ "schedule",
18404
+ "targetUsers",
18405
+ "snoozeOptions",
18406
+ "snoozeAllowGlobal",
18407
+ "waitForEnhancement",
18408
+ "actions",
18409
+ "confirm",
18410
+ "groupIdleSec"
18411
+ ]);
18412
+ var NcRuleUpdateInputSchema = object({
18413
+ ruleId: string(),
18414
+ patch: NcRulePatchSchema,
18415
+ clear: array(NcRuleClearableKeySchema).optional()
18416
+ });
18433
18417
  /** A persisted rule. */
18434
18418
  var NcRuleSchema = NcRuleInputSchema.extend({
18435
18419
  id: string(),
@@ -18461,6 +18445,85 @@ var NcTestResultSchema = object({
18461
18445
  className: string().optional(),
18462
18446
  label: string().optional()
18463
18447
  });
18448
+ /** The five rule kinds, as data. `NcRuleKind` in `notification/rule-kinds.ts`
18449
+ * is the same union; the template-vars spec pins the two together. */
18450
+ var NcRuleKindSchema = _enum([
18451
+ "detection",
18452
+ "sensor",
18453
+ "occupancy",
18454
+ "sound",
18455
+ "system"
18456
+ ]);
18457
+ /** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
18458
+ var NcTemplateFamilySchema = _enum([
18459
+ "rule",
18460
+ "timelapse",
18461
+ "summary"
18462
+ ]);
18463
+ /** Which text field of that producer. `previewText` is the timelapse frame
18464
+ * caption, `captionText` the digest mosaic caption — both see fewer vars. */
18465
+ var NcTemplateFieldSchema = _enum([
18466
+ "title",
18467
+ "body",
18468
+ "previewText",
18469
+ "captionText"
18470
+ ]);
18471
+ var NcTemplateVarGroupSchema = _enum([
18472
+ "subject",
18473
+ "place",
18474
+ "time",
18475
+ "rule",
18476
+ "occupancy",
18477
+ "sound",
18478
+ "sensor",
18479
+ "system",
18480
+ "digest",
18481
+ "ai"
18482
+ ]);
18483
+ /**
18484
+ * ONE `{{var}}` a notification template may name.
18485
+ *
18486
+ * `families` / `fields` / `kinds` / `deliveries` / `systemEventKinds` say WHERE
18487
+ * it has a value; absent = no restriction on that axis. `systemEventKinds` is
18488
+ * read only for a `system` rule. `dynamic` declares a FAMILY of names
18489
+ * (`count_<class>`): the descriptor's `name` is the example member.
18490
+ */
18491
+ var NcTemplateVarDescriptorSchema = object({
18492
+ name: string().regex(/^\w+$/),
18493
+ label: string(),
18494
+ description: string().optional(),
18495
+ example: string(),
18496
+ group: NcTemplateVarGroupSchema,
18497
+ families: array(NcTemplateFamilySchema).min(1),
18498
+ fields: array(NcTemplateFieldSchema).optional(),
18499
+ kinds: array(NcRuleKindSchema).optional(),
18500
+ deliveries: array(NcDeliverySchema).optional(),
18501
+ systemEventKinds: array(NcSystemEventKindSchema).optional(),
18502
+ dynamic: object({
18503
+ prefix: literal("count_"),
18504
+ from: literal("classes")
18505
+ }).optional()
18506
+ });
18507
+ /** Input to `previewTemplate` — the editor's own context, plus the draft text. */
18508
+ var NcTemplatePreviewInputSchema = object({
18509
+ context: object({
18510
+ family: NcTemplateFamilySchema,
18511
+ field: NcTemplateFieldSchema,
18512
+ kind: NcRuleKindSchema.optional(),
18513
+ delivery: NcDeliverySchema.optional(),
18514
+ systemEventKinds: array(NcSystemEventKindSchema).optional()
18515
+ }),
18516
+ template: object({
18517
+ title: string().max(500).optional(),
18518
+ body: string().max(2e3).optional()
18519
+ })
18520
+ });
18521
+ var NcTemplatePreviewSchema = object({
18522
+ title: string().nullable(),
18523
+ body: string().nullable(),
18524
+ /** Names the template uses that this context never fills — they render empty. */
18525
+ unknown: array(string())
18526
+ });
18464
18527
  var NcConditionDescriptorSchema = object({
18465
18528
  /** Field id inside `NcConditions` (or `'schedule'` for the rule-level group). */
18466
18529
  id: string(),
@@ -18726,8 +18789,17 @@ object({
18726
18789
  lastAt: number()
18727
18790
  });
18728
18791
  /**
18729
- * The three durations the panel's state machine runs on, plus who hears about
18730
- * an arm.
18792
+ * The per-mode lists, at most one per mode. Two lists for one mode have no
18793
+ * meaning a reader could agree on (union? the last one?), so they are refused
18794
+ * at the boundary rather than interpreted.
18795
+ */
18796
+ var NcAlarmNonBlockingListSchema = array(object({
18797
+ mode: AlarmArmModeSchema,
18798
+ deviceIds: array(number().int()).max(200)
18799
+ })).max(8).refine((lists) => new Set(lists.map((l) => l.mode)).size === lists.length, { message: "nonBlocking: at most one list per arm mode" });
18800
+ /**
18801
+ * The three durations the panel's state machine runs on, who hears about its
18802
+ * transitions, and which openings each mode tolerates.
18731
18803
  *
18732
18804
  * They live on the NOTIFICATION-RULES cap, not on `alarm-panel`, on purpose:
18733
18805
  * `alarm-panel` is `deviceNative` and its other provider mirrors somebody
@@ -18746,21 +18818,39 @@ var NcAlarmSettingsSchema = object({
18746
18818
  * existed, and therefore what an untouched install keeps doing.
18747
18819
  */
18748
18820
  triggeredDurationSec: number().int().min(0).max(3600),
18749
- /** Send a notification when a mode takes effect. */
18750
- announceArm: boolean(),
18751
18821
  /**
18752
- * Where that notification goes. Target ids from `notification-output`.
18822
+ * Deprecated by D630 — every transition is announced. Parsed, never read;
18823
+ * remove after one release. Optional so an older admin's patch (which still
18824
+ * sends it) parses rather than failing the whole save.
18825
+ */
18826
+ announceArm: boolean().optional(),
18827
+ /**
18828
+ * Target ids from `notification-output`: every alarm transition goes here.
18753
18829
  *
18754
- * Explicit rather than "everyone": an arm announcement is a household
18830
+ * Explicit rather than "everyone": an alarm announcement is a household
18755
18831
  * message, and broadcasting it to every configured endpoint (including a
18756
18832
  * webhook wired to something else) is not a default anybody would choose.
18757
- * Empty with `announceArm: true` sends nothing, and the server logs that —
18758
- * silence must be attributable.
18833
+ * Empty sends nothing, and the server logs that — silence must be
18834
+ * attributable.
18759
18835
  */
18760
- announceTargets: array(string().min(1)).max(16)
18836
+ announceTargets: array(string().min(1)).max(16),
18837
+ /**
18838
+ * Per arm mode, the covered devices whose being OPEN does not refuse the
18839
+ * arm (a window left ajar for the cat under `home`, say). At most one entry
18840
+ * per mode is meaningful. Defaulted to `[]` so a blob stored before D630
18841
+ * parses as "every opening blocks" — the behaviour it was written under.
18842
+ */
18843
+ nonBlocking: NcAlarmNonBlockingListSchema.default([])
18761
18844
  });
18762
- /** Every field optional — a tab edits one control at a time. */
18763
- var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.partial();
18845
+ /**
18846
+ * Every field optional — a tab edits one control at a time.
18847
+ *
18848
+ * `nonBlocking` is re-declared WITHOUT its default: `.partial()` does not
18849
+ * remove an inner `.default()`, so a patch that never named the field would
18850
+ * parse to `nonBlocking: []` and wipe every mode's list on an unrelated edit
18851
+ * (the same trap {@link NcRulePatchSchema} documents).
18852
+ */
18853
+ var NcAlarmSettingsPatchSchema = NcAlarmSettingsSchema.extend({ nonBlocking: NcAlarmNonBlockingListSchema }).partial();
18764
18854
  /**
18765
18855
  * What one arm mode actually arms, DERIVED from the enabled rules gated on it.
18766
18856
  * Never authored, never stored — see `alarm-mode-coverage.ts` for why a stored
@@ -18805,6 +18895,36 @@ var NcAlarmModeCoverageSchema = object({
18805
18895
  */
18806
18896
  skippedDevices: array(NcAlarmSkippedDeviceSchema).default([])
18807
18897
  });
18898
+ /** One covered device that reads open, and whether that refuses the arm. */
18899
+ var NcAlarmOpeningSchema = object({
18900
+ deviceId: number().int(),
18901
+ name: string(),
18902
+ /** The device's state word as read (`open`, `unlocked`, …). */
18903
+ state: string(),
18904
+ /** False when the mode's non-blocking list names this device. */
18905
+ blocking: boolean()
18906
+ });
18907
+ /** A device the panel is currently ignoring, and which side of it it is on. */
18908
+ var NcAlarmExclusionViewSchema = object({
18909
+ deviceId: number().int(),
18910
+ name: string(),
18911
+ phase: _enum(["open", "closed"])
18912
+ });
18913
+ /** One mode's openings: devices read open, plus those whose state is unknown. */
18914
+ var NcAlarmModeOpeningsSchema = object({
18915
+ mode: AlarmArmModeSchema,
18916
+ devices: array(NcAlarmOpeningSchema),
18917
+ /** Covered devices whose state could not be read (D49): neither open nor closed. */
18918
+ unknown: array(number().int())
18919
+ });
18920
+ var NcAlarmLiveSchema = object({
18921
+ state: AlarmStateSchema,
18922
+ /** The mode being armed into (exit delay) or held; null when disarmed. */
18923
+ targetMode: AlarmArmModeSchema.nullable(),
18924
+ availableModes: array(AlarmArmModeSchema),
18925
+ openings: array(NcAlarmModeOpeningsSchema),
18926
+ exclusions: array(NcAlarmExclusionViewSchema)
18927
+ });
18808
18928
  var NcAlarmConfigSchema = object({
18809
18929
  /**
18810
18930
  * The panel's device id, or null when this install has no panel (the ensure
@@ -18814,7 +18934,13 @@ var NcAlarmConfigSchema = object({
18814
18934
  */
18815
18935
  deviceId: number().int().nullable(),
18816
18936
  settings: NcAlarmSettingsSchema,
18817
- coverage: array(NcAlarmModeCoverageSchema)
18937
+ coverage: array(NcAlarmModeCoverageSchema),
18938
+ /**
18939
+ * The panel as it is NOW — state, what each mode would find open, what is
18940
+ * excluded. Optional: a panel-less hub answers without it, and a client
18941
+ * must not read its absence as "nothing is open".
18942
+ */
18943
+ live: NcAlarmLiveSchema.optional()
18818
18944
  });
18819
18945
  /**
18820
18946
  * ONE rule's demand on ONE camera's clip ring.
@@ -18862,10 +18988,7 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
18862
18988
  kind: "mutation",
18863
18989
  auth: "admin",
18864
18990
  caller: "required"
18865
- }), method(object({
18866
- ruleId: string(),
18867
- patch: NcRulePatchSchema
18868
- }), object({ rule: NcRuleSchema }), {
18991
+ }), method(NcRuleUpdateInputSchema, object({ rule: NcRuleSchema }), {
18869
18992
  kind: "mutation",
18870
18993
  auth: "admin",
18871
18994
  caller: "required"
@@ -18893,7 +19016,10 @@ method(object({}), object({ rules: array(NcRuleSchema) }), { auth: "admin" }), m
18893
19016
  }), method(object({}), object({
18894
19017
  catalog: array(NcConditionDescriptorSchema),
18895
19018
  taxonomy: NcTaxonomySchema.optional()
18896
- })), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({ artifactId: string().min(1) }), object({ url: string().nullable() }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
19019
+ })), method(object({}), object({ vars: array(NcTemplateVarDescriptorSchema) })), method(NcTemplatePreviewInputSchema, NcTemplatePreviewSchema, {
19020
+ kind: "mutation",
19021
+ access: "view"
19022
+ }), method(object({ filter: NcHistoryFilterSchema.default({ limit: 100 }) }), object({ entries: array(NcHistoryEntrySchema) }), { auth: "admin" }), method(object({ artifactId: string().min(1) }), object({ url: string().nullable() }), { auth: "admin" }), method(object({}), object({ snoozes: array(NcSnoozeSchema) }), { caller: "required" }), method(object({ snooze: NcSnoozeInputSchema }), object({ snooze: NcSnoozeSchema }), {
18897
19023
  kind: "mutation",
18898
19024
  caller: "required"
18899
19025
  }), method(object({ snoozeId: string() }), object({ success: literal(true) }), {
@@ -23326,6 +23452,7 @@ var CAP_TO_KIND = {
23326
23452
  "enum-sensor": "enum-sensor",
23327
23453
  "event-emitter": "device-event",
23328
23454
  "lock-control": "lock",
23455
+ cover: "cover",
23329
23456
  switch: "switch",
23330
23457
  button: "button",
23331
23458
  doorbell: "doorbell"
@@ -24143,6 +24270,58 @@ method(_void(), ProviderInfoSchema, { auth: "admin" }), method(object({ config:
24143
24270
  kind: "mutation",
24144
24271
  auth: "admin"
24145
24272
  });
24273
+ /**
24274
+ * The signals a device can emit to WAKE its own stream.
24275
+ *
24276
+ * A camera whose stream is built on demand sleeps until something asks for it,
24277
+ * and "something" cannot be a consumer that is merely attached — a Frigate-style
24278
+ * puller holds a session open for ever, and treating that as demand would keep
24279
+ * a battery camera awake for ever, which is the whole thing the battery is for
24280
+ * (D173). So the wake has to come from the CAMERA: an event it noticed by
24281
+ * itself, with no stream running.
24282
+ *
24283
+ * ## The vocabulary is the PROVIDER'S, not ours
24284
+ *
24285
+ * Like `consumables`, this cap declares no vocabulary of its own. A provider
24286
+ * names each signal with a `code` it chooses and a `label` an operator reads.
24287
+ * Reolink offers motion and camera-native detection; another provider may offer
24288
+ * a tamper, a doorbell press, a PIR, or something no camera in this fleet has
24289
+ * yet. A fixed enum here would mean every new signal is a framework release.
24290
+ *
24291
+ * It is deliberately NOT derived from the caps a device already binds. Whether
24292
+ * a camera CAN push firmware motion is expressed by `motionSources` containing
24293
+ * `'onboard'`, and whether it does AI on-camera by the `native-object-detection`
24294
+ * binding — but both answer "what drives the detection pipeline", which is a
24295
+ * different question from "what may wake a sleeping stream". A camera can do
24296
+ * the first and not be trusted with the second, and the operator picks per
24297
+ * camera. Two questions, two authorities.
24298
+ *
24299
+ * ## Availability is not permission
24300
+ *
24301
+ * `listSignals` says what the device CAN emit. Whether a given signal actually
24302
+ * wakes the stream is the operator's per-camera choice, held by the broker
24303
+ * alongside the cooldown — see the stream-broker cap's wake settings. A
24304
+ * provider declaring a signal is not a provider enabling it.
24305
+ */
24306
+ /** One signal a device can emit. */
24307
+ var StreamSignalSchema = object({
24308
+ /** Stable id chosen by the provider, e.g. `'motion'`, `'person'`, `'tamper'`. */
24309
+ code: string().min(1),
24310
+ /** What an operator reads in the picker. The provider's own wording. */
24311
+ label: string().min(1),
24312
+ /**
24313
+ * Whether the provider recommends this signal ON when a camera is first set
24314
+ * up. A provider knows which of its signals are cheap and reliable; an
24315
+ * operator should not have to discover that by trial. Reolink recommends
24316
+ * both of its own.
24317
+ */
24318
+ recommended: boolean()
24319
+ });
24320
+ object({
24321
+ signals: array(StreamSignalSchema),
24322
+ lastFetchedAt: number()
24323
+ });
24324
+ Object.values(DeviceType), method(_void(), array(StreamSignalSchema).readonly());
24146
24325
  /** Profile-exported FormBuilder schema. Shape is ConfigUISchema at the UI. */
24147
24326
  var ProfileSettingsSchemaBridge = unknown().nullable();
24148
24327
  var ProfileSettingsBagSchema = record(string(), unknown());
@@ -26425,6 +26604,143 @@ DeviceType.Camera, method(object({ deviceId: number() }), CameraCredentialsSchem
26425
26604
  kind: "query",
26426
26605
  auth: "admin"
26427
26606
  });
26607
+ /**
26608
+ * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
26609
+ * page.
26610
+ *
26611
+ * ## Why this is a capability and not an addon settings schema
26612
+ *
26613
+ * It was one, and it did not render. The addon declared the editor as a
26614
+ * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
26615
+ * returned that section correctly and `ConfigFormField` renders `type:'widget'`
26616
+ * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
26617
+ * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
26618
+ * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
26619
+ * not on it "falls off silently".
26620
+ *
26621
+ * Adding a fifth name to that list would have been the wrong fix twice over:
26622
+ * that page is per-camera DETECTION tuning, and a grid's geometry belongs
26623
+ * beside PTZ and motion zones on the camera itself. The device page is
26624
+ * BINDING-driven (D12), so the way in is a capability bound to the device —
26625
+ * and this cap carries its section the way `recording` does, by RETURNING it
26626
+ * from `getDeviceSettingsContribution`.
26627
+ *
26628
+ * Seven other widgets are still declared the other way, through a
26629
+ * `deviceConfig.ui` block the framework derives a section from. That route
26630
+ * gives the addon no say in where its own panel lands and no way to decline
26631
+ * for a device the panel does not suit, which is why this one does not use it.
26632
+ *
26633
+ * ## Why one addon may implement it
26634
+ *
26635
+ * It is a device-scoped NATIVE cap, registered by the grid camera device
26636
+ * itself. Nothing else declares a composite camera, so nothing else has a
26637
+ * layout — and the device-scoped route means the widget asks THE camera, not
26638
+ * "the camera-grid addon", which is what let the old custom-action pair be
26639
+ * reached only by a caller that already knew the addon id.
26640
+ *
26641
+ * ## The tab
26642
+ *
26643
+ * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
26644
+ * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
26645
+ * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
26646
+ * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
26647
+ * next to "PTZ").
26648
+ */
26649
+ /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
26650
+ var GridNormalizedRectSchema = object({
26651
+ x: number().min(0).max(1),
26652
+ y: number().min(0).max(1),
26653
+ width: number().gt(0).max(1),
26654
+ height: number().gt(0).max(1)
26655
+ });
26656
+ /**
26657
+ * One source camera, the part of its picture taken, and where that part lands.
26658
+ *
26659
+ * Both rectangles are NORMALIZED (D519): a source camera can change resolution
26660
+ * — a profile switch, a firmware update, a substream that comes back different
26661
+ * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
26662
+ * which is the class of bug nobody files.
26663
+ */
26664
+ var GridLayoutCellSchema = object({
26665
+ deviceId: number().int().positive(),
26666
+ /** The part of the SOURCE taken, normalized against the source. */
26667
+ source: GridNormalizedRectSchema,
26668
+ /** Where it lands, normalized against the CANVAS. */
26669
+ cell: GridNormalizedRectSchema
26670
+ });
26671
+ /**
26672
+ * Which profiles this grid can actually compose, and why not.
26673
+ *
26674
+ * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
26675
+ * profile is on offer only when EVERY source can serve it. The refusal NAMES
26676
+ * the sources, because "this grid has no low" is not a finding — "615 has no
26677
+ * low" is, and it is the one an operator can act on.
26678
+ */
26679
+ var GridProfileOfferSchema = object({
26680
+ profile: _enum([
26681
+ "high",
26682
+ "mid",
26683
+ "low"
26684
+ ]),
26685
+ offered: boolean(),
26686
+ /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
26687
+ missingSources: array(number().int().positive()),
26688
+ /**
26689
+ * The canvas this profile composes onto, `WxH`, or empty when it is not
26690
+ * offered. DERIVED from the cells and the sources' own size at this profile —
26691
+ * it is reported because nothing else in the system would ever say what the
26692
+ * grid came out as, and because it is the number an operator would otherwise
26693
+ * expect to type.
26694
+ */
26695
+ canvas: string(),
26696
+ /**
26697
+ * Whether this profile is PUBLISHED, of the ones the grid could serve.
26698
+ *
26699
+ * A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
26700
+ * a 4K canvas built from 4K decodes — something to opt into, not something a
26701
+ * viewer's adaptive should be handed by climbing to the top rung it can see.
26702
+ * Default is `mid` + `low`.
26703
+ */
26704
+ published: boolean()
26705
+ });
26706
+ var GridLayoutViewSchema = object({
26707
+ /** The persisted grid row this camera was declared from. */
26708
+ instanceId: string(),
26709
+ deviceId: number().int().nonnegative(),
26710
+ name: string(),
26711
+ /**
26712
+ * NO canvas size. A grid's resolution is not authored: each profile derives
26713
+ * its own from the cells and its sources' dimensions. The two numbers that
26714
+ * used to be here were a text field that silently decided both how much the
26715
+ * composite cost and how sharp it was — see `profiles[].canvas` for what it
26716
+ * came out as.
26717
+ */
26718
+ fps: number().int(),
26719
+ cells: array(GridLayoutCellSchema),
26720
+ /** What the catalog will publish, and what it refuses to. Read-only. */
26721
+ profiles: array(GridProfileOfferSchema)
26722
+ });
26723
+ var GridLayoutPatchSchema = object({
26724
+ deviceId: number().int().nonnegative(),
26725
+ name: string().min(1).max(160).optional(),
26726
+ fps: number().int().min(1).max(60).optional(),
26727
+ /** Which profiles to publish. See `GridProfileOffer.published`. */
26728
+ publishedProfiles: array(_enum([
26729
+ "high",
26730
+ "mid",
26731
+ "low"
26732
+ ])).max(3).optional(),
26733
+ /**
26734
+ * The whole cell list at once. A per-cell patch would need an ordering the
26735
+ * editor does not have, and a half-applied layout is a picture nobody asked
26736
+ * for.
26737
+ */
26738
+ cells: array(GridLayoutCellSchema).max(16)
26739
+ });
26740
+ DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
26741
+ kind: "mutation",
26742
+ auth: "admin"
26743
+ });
26428
26744
  object({
26429
26745
  detected: boolean(),
26430
26746
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26898,307 +27214,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), DayNightOptionsSchema)
26898
27214
  auth: "admin"
26899
27215
  });
26900
27216
  /**
26901
- * Vendor-neutral **onboard** recording + storage cap — what the CAMERA
26902
- * writes to the CAMERA's own card, on the camera's own schedule.
26903
- *
26904
- * This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
26905
- * footage ledger, our storage locations, our retention. This one has a
26906
- * different authority — the camera's firmware — and per D62 it stores
26907
- * nothing of its own. Every value here is read from the camera and every
26908
- * write goes back to the camera; there is no CamStack-side mirror that
26909
- * could disagree with the device.
26910
- *
26911
- * ## One shape, two firmwares
26912
- *
26913
- * Measured 2026-09-22 against the live fleet:
26914
- *
26915
- * | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
26916
- * | --- | --- | --- |
26917
- * | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
26918
- * | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
26919
- * | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
26920
- * | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
26921
- * | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
26922
- * | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
26923
- * | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
26924
- * | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
26925
- *
26926
- * The two schedule models look different and are the same thing in
26927
- * different coordinates: both answer "for this trigger, during which
26928
- * weekly windows does the camera record". {@link RecordWindow} is that
26929
- * question in one shape — Hikvision's ranges map straight onto it,
26930
- * Reolink's mask expands into hour-aligned windows.
26931
- *
26932
- * ## Union, not intersection
26933
- *
26934
- * **The same fields exist on every camera.** What differs per device is
26935
- * which VALUES that device accepts, and that is what {@link
26936
- * RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
26937
- * per field plus the schedule's own limits. A control a camera cannot
26938
- * honour is rendered DISABLED WITH ITS REASON, never missing and never
26939
- * dead: disabled must not look like broken.
26940
- *
26941
- * ## Refusal by name
26942
- *
26943
- * A write a camera cannot honour is refused with a sentence the operator
26944
- * can read — never accepted and dropped. Both providers refuse through
26945
- * {@link describeOnboardRefusal}, so the vocabulary is one function and
26946
- * one test, not two hand-written vendor opinions.
26947
- *
26948
- * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
26949
- * `getOptions` advertises per-camera availability, `getStatus` (auto-
26950
- * injected from `status`) reports the live values, and a single
26951
- * `setSettings` mutation applies a partial change. No hand-written
26952
- * settings-contribution methods.
26953
- */
26954
- /**
26955
- * What makes the camera start recording during a window.
26956
- *
26957
- * The union of both vendors' vocabularies. `continuous` is Hikvision's
26958
- * `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
26959
- * object-class triggers are Reolink-only today and the smart-event ones
26960
- * (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
26961
- * firmwares measured — a camera that cannot record on a trigger simply
26962
- * does not list it in `options.schedule.triggers`, and a window naming
26963
- * it is REFUSED, not dropped.
26964
- */
26965
- var RecordTriggerSchema = _enum([
26966
- "continuous",
26967
- "motion",
26968
- "person",
26969
- "vehicle",
26970
- "animal",
26971
- "lineCrossing",
26972
- "intrusion",
26973
- "loitering",
26974
- "alarmInput"
26975
- ]);
26976
- /**
26977
- * One weekly recording window: "on `day`, from `startMinute` to
26978
- * `endMinute`, record on `trigger`".
26979
- *
26980
- * `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
26981
- * both firmwares enumerate). Minutes are local camera time since
26982
- * midnight; `endMinute` may be 1440, meaning end of day — that is
26983
- * Hikvision's literal `24:00` and Reolink's 24th mask slot, and
26984
- * collapsing it to 0 would turn a whole-day window into an empty one.
26985
- */
26986
- var RecordWindowSchema = object({
26987
- trigger: RecordTriggerSchema,
26988
- day: number().int().min(0).max(6),
26989
- startMinute: number().int().min(0).max(1439),
26990
- endMinute: number().int().min(1).max(1440)
26991
- });
26992
- /** Status of one physical volume, as the camera itself describes it. */
26993
- var OnboardStorageVolumeSchema = object({
26994
- /** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
26995
- id: string(),
26996
- /** The camera's own name for it, when it gives one (`hddName`). */
26997
- label: string().optional(),
26998
- status: _enum([
26999
- "ok",
27000
- "unformatted",
27001
- "error",
27002
- "offline",
27003
- "unknown"
27004
- ]),
27005
- /**
27006
- * Total size in MB, or **null when the camera did not say**.
27007
- *
27008
- * Never 0 for an unreadable value: a measurement that failed is not a
27009
- * measurement (D393), and a card whose size is unknown must not be
27010
- * rendered as a card of size zero.
27011
- */
27012
- capacityMb: number().nullable(),
27013
- /**
27014
- * Free space in MB, or null when unknown.
27015
- *
27016
- * **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
27017
- * 1439 both report exactly 11776 MB free — the fixed reserve a looping
27018
- * card converges on once it has wrapped. At loop steady state the
27019
- * number is identical whether the camera recorded yesterday or stopped
27020
- * a month ago.
27021
- */
27022
- freeMb: number().nullable(),
27023
- /** True when the camera reports the volume writable (`property` RW). */
27024
- writable: boolean().optional()
27025
- });
27026
- object({
27027
- storage: discriminatedUnion("kind", [
27028
- object({
27029
- kind: literal("present"),
27030
- volumes: array(OnboardStorageVolumeSchema)
27031
- }),
27032
- object({
27033
- kind: literal("absent"),
27034
- reason: string()
27035
- }),
27036
- object({
27037
- kind: literal("unknown"),
27038
- reason: string()
27039
- })
27040
- ]),
27041
- tracks: array(object({
27042
- id: string(),
27043
- enabled: boolean(),
27044
- isVideo: boolean(),
27045
- /** From the camera's own track description. Null when it does not say. */
27046
- codec: string().nullable(),
27047
- resolution: string().nullable(),
27048
- /** Per-track overwrite flag, where the firmware keeps it per track. */
27049
- overwriteWhenFull: boolean().nullable()
27050
- })),
27051
- /**
27052
- * The track the write path targets — the enabled VIDEO one. Null when
27053
- * no track could be identified, which is itself a refusal reason.
27054
- */
27055
- primaryTrackId: string().nullable(),
27056
- /** Master "record to the card at all" switch. */
27057
- enabled: boolean().nullable(),
27058
- overwriteWhenFull: boolean().nullable(),
27059
- preRecordSec: number().nullable(),
27060
- postRecordSec: number().nullable(),
27061
- /** Length of one recorded file, in minutes. */
27062
- segmentMinutes: number().nullable(),
27063
- /** The primary track's weekly windows, flattened. */
27064
- windows: array(RecordWindowSchema),
27065
- /**
27066
- * How many windows the camera described that CamStack could NOT read —
27067
- * an unrecognised trigger, an unparseable clock, a weekday it does not
27068
- * name.
27069
- *
27070
- * A dropped window is work the reader threw away, and a schedule that
27071
- * silently shows fewer rows than the camera holds is how an operator
27072
- * saves back a schedule shorter than the one they were looking at
27073
- * (D391). Non-zero means the window list is INCOMPLETE and a write
27074
- * that replaces it would delete what was not shown — which is why a
27075
- * provider reporting a non-zero count also reports the schedule as not
27076
- * writable.
27077
- */
27078
- unreadableWindows: number(),
27079
- /**
27080
- * The camera is scheduled to record and has NO usable storage.
27081
- *
27082
- * A first-class fact because it is the fleet's most common silent
27083
- * defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
27084
- * to a card that is not there. Neither the schedule nor the storage
27085
- * read says anything wrong on its own; only the pair does.
27086
- */
27087
- recordingToNowhere: boolean(),
27088
- lastFetchedAt: number()
27089
- });
27090
- /** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
27091
- var RangeSchema = object({
27092
- min: number(),
27093
- max: number(),
27094
- step: number()
27095
- });
27096
- /**
27097
- * The values a camera actually takes for a numeric field, when they are a SET
27098
- * rather than a range.
27099
- *
27100
- * `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
27101
- * (I91DN) on 2026-09-22 by writing each value and reading it back:
27102
- *
27103
- * - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
27104
- * camera's "no limit" — `-1` and `4294967295` both land on it);
27105
- * - post-record: `5, 10, 30, 60, 120, 300, 600`.
27106
- *
27107
- * Neither is expressible as a step: the first has a sentinel two billion away
27108
- * from its neighbours, the second doubles and then jumps. A range that tried
27109
- * would forbid values the camera takes AND permit values it silently replaces
27110
- * with 5 — wrong in both directions at once.
27111
- *
27112
- * `sentinel` names the member that is not a duration, so a surface can render
27113
- * "no limit" instead of `2147483647` seconds.
27114
- */
27115
- var AllowedValuesSchema = object({
27116
- values: array(number()).min(1),
27117
- sentinel: object({
27118
- value: number(),
27119
- meaning: _enum(["no-limit", "disabled"])
27120
- }).optional()
27121
- });
27122
- /**
27123
- * Per-field availability on ONE camera.
27124
- *
27125
- * The field exists on every camera — this says whether this one can be
27126
- * read and whether it can be written, and `reason` says why not when
27127
- * either is false. The UI renders the control DISABLED with the reason
27128
- * rather than hiding it, so a limitation is legible instead of looking
27129
- * like a missing feature.
27130
- */
27131
- var OnboardFieldSupportSchema = object({
27132
- readable: boolean(),
27133
- writable: boolean(),
27134
- /** Required whenever `readable` or `writable` is false. */
27135
- reason: string().optional()
27136
- });
27137
- /** What this camera's schedule model can express. */
27138
- var OnboardScheduleSupportSchema = object({
27139
- support: OnboardFieldSupportSchema,
27140
- /**
27141
- * The smallest time step the camera can express, in minutes.
27142
- *
27143
- * Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
27144
- * 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
27145
- * window whose edges are not a multiple of this is REFUSED rather than
27146
- * quietly rounded — rounding is how an operator's 06:30 becomes 06:00
27147
- * and nothing says so.
27148
- */
27149
- granularityMinutes: number(),
27150
- /** Triggers this camera can record on. A window naming another is refused. */
27151
- triggers: array(RecordTriggerSchema),
27152
- /**
27153
- * False when the camera stores ONE trigger per time range, so two
27154
- * windows overlapping on the same day cannot carry different triggers.
27155
- * True on Reolink, whose mask is per-trigger and independent.
27156
- */
27157
- supportsOverlappingTriggers: boolean()
27158
- });
27159
- var RecordingOnboardOptionsSchema = object({
27160
- enabled: OnboardFieldSupportSchema,
27161
- overwriteWhenFull: OnboardFieldSupportSchema,
27162
- preRecordSec: OnboardFieldSupportSchema,
27163
- preRecordSecRange: RangeSchema.optional(),
27164
- /** Preferred over the range when the camera takes a SET, not a span. */
27165
- preRecordSecAllowed: AllowedValuesSchema.optional(),
27166
- postRecordSec: OnboardFieldSupportSchema,
27167
- postRecordSecRange: RangeSchema.optional(),
27168
- /** Preferred over the range when the camera takes a SET, not a span. */
27169
- postRecordSecAllowed: AllowedValuesSchema.optional(),
27170
- segmentMinutes: OnboardFieldSupportSchema,
27171
- segmentMinutesRange: RangeSchema.optional(),
27172
- /** Preferred over the range when the camera takes a SET, not a span. */
27173
- segmentMinutesAllowed: AllowedValuesSchema.optional(),
27174
- schedule: OnboardScheduleSupportSchema
27175
- });
27176
- /**
27177
- * A partial change. Every field optional.
27178
- *
27179
- * Unlike the other `deviceConfig` caps, a provider here does **NOT**
27180
- * silently ignore a field it cannot support — it refuses, by name,
27181
- * through {@link describeOnboardRefusal}. Silence on a recording setting
27182
- * is the failure D62 exists to prevent: the operator believes the camera
27183
- * is recording the way the form says, and it is not.
27184
- */
27185
- var RecordingOnboardPatchSchema = object({
27186
- enabled: boolean().optional(),
27187
- overwriteWhenFull: boolean().optional(),
27188
- preRecordSec: number().optional(),
27189
- postRecordSec: number().optional(),
27190
- segmentMinutes: number().optional(),
27191
- /** The complete new window set for the primary track — not a delta. */
27192
- windows: array(RecordWindowSchema).optional()
27193
- });
27194
- DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
27195
- deviceId: number(),
27196
- settings: RecordingOnboardPatchSchema
27197
- }), _void(), {
27198
- kind: "mutation",
27199
- auth: "admin"
27200
- });
27201
- /**
27202
27217
  * Generic device-level status snapshot. Auto-registered by `BaseDevice`
27203
27218
  * for every device, regardless of provider — the kernel needs a uniform
27204
27219
  * cap-keyed slice for the basic device flags every consumer expects to
@@ -27292,30 +27307,6 @@ object({
27292
27307
  eventCountSinceStart: number()
27293
27308
  });
27294
27309
  DeviceType.EventEmitter;
27295
- var EventItemSchema = object({
27296
- id: string(),
27297
- type: string(),
27298
- timestamp: number(),
27299
- label: string().optional(),
27300
- thumbnailUrl: string().optional(),
27301
- clipUrl: string().optional(),
27302
- metadata: record(string(), unknown()).optional()
27303
- });
27304
- DeviceType.Camera, method(object({
27305
- deviceId: number(),
27306
- from: number().optional(),
27307
- to: number().optional(),
27308
- limit: number().optional()
27309
- }), array(EventItemSchema)), method(object({
27310
- deviceId: number(),
27311
- eventId: string()
27312
- }), object({
27313
- base64: string(),
27314
- contentType: string()
27315
- }).nullable()), method(object({
27316
- deviceId: number(),
27317
- eventId: string()
27318
- }), string().nullable());
27319
27310
  var IdentitySchema = object({
27320
27311
  id: string(),
27321
27312
  name: string(),
@@ -28987,143 +28978,6 @@ DeviceType.Light, DeviceType.Siren, DeviceType.Switch, method(object({
28987
28978
  lastChangedAt: number()
28988
28979
  });
28989
28980
  /**
28990
- * camera-grid-layout — the geometry of a COMPOSITE camera, on the camera's own
28991
- * page.
28992
- *
28993
- * ## Why this is a capability and not an addon settings schema
28994
- *
28995
- * It was one, and it did not render. The addon declared the editor as a
28996
- * `type: 'widget'` field inside its own `deviceSettingsSchema()`; the hub
28997
- * returned that section correctly and `ConfigFormField` renders `type:'widget'`
28998
- * perfectly well — and nothing ever asked camera-grid for it. The Cluster →
28999
- * Pipeline → Device Overrides page interrogates a HAND-WRITTEN list of four
29000
- * addons (`PIPELINE_CLUSTER_DEVICE_ADDONS`), whose own comment says an addon
29001
- * not on it "falls off silently".
29002
- *
29003
- * Adding a fifth name to that list would have been the wrong fix twice over:
29004
- * that page is per-camera DETECTION tuning, and a grid's geometry belongs
29005
- * beside PTZ and motion zones on the camera itself. The device page is
29006
- * BINDING-driven (D12), so the way in is a capability bound to the device —
29007
- * and this cap carries its section the way `recording` does, by RETURNING it
29008
- * from `getDeviceSettingsContribution`.
29009
- *
29010
- * Seven other widgets are still declared the other way, through a
29011
- * `deviceConfig.ui` block the framework derives a section from. That route
29012
- * gives the addon no say in where its own panel lands and no way to decline
29013
- * for a device the panel does not suit, which is why this one does not use it.
29014
- *
29015
- * ## Why one addon may implement it
29016
- *
29017
- * It is a device-scoped NATIVE cap, registered by the grid camera device
29018
- * itself. Nothing else declares a composite camera, so nothing else has a
29019
- * layout — and the device-scoped route means the widget asks THE camera, not
29020
- * "the camera-grid addon", which is what let the old custom-action pair be
29021
- * reached only by a caller that already knew the addon id.
29022
- *
29023
- * ## The tab
29024
- *
29025
- * `streaming`, not a top-tab of its own. A grid's geometry IS what its stream
29026
- * is, so the Streaming tab is where it belongs; a `grid` top-tab would need an
29027
- * entry in `WELL_KNOWN_TAB_MAP` or the device page renders the raw id as the
29028
- * label (measured on the robot camera, 2026-09-06 — a tab called "navigation"
29029
- * next to "PTZ").
29030
- */
29031
- /** A rectangle in normalized [0,1] coordinates of whatever contains it. */
29032
- var GridNormalizedRectSchema = object({
29033
- x: number().min(0).max(1),
29034
- y: number().min(0).max(1),
29035
- width: number().gt(0).max(1),
29036
- height: number().gt(0).max(1)
29037
- });
29038
- /**
29039
- * One source camera, the part of its picture taken, and where that part lands.
29040
- *
29041
- * Both rectangles are NORMALIZED (D519): a source camera can change resolution
29042
- * — a profile switch, a firmware update, a substream that comes back different
29043
- * — and a stored PIXEL rectangle would quietly start cutting the wrong region,
29044
- * which is the class of bug nobody files.
29045
- */
29046
- var GridLayoutCellSchema = object({
29047
- deviceId: number().int().positive(),
29048
- /** The part of the SOURCE taken, normalized against the source. */
29049
- source: GridNormalizedRectSchema,
29050
- /** Where it lands, normalized against the CANVAS. */
29051
- cell: GridNormalizedRectSchema
29052
- });
29053
- /**
29054
- * Which profiles this grid can actually compose, and why not.
29055
- *
29056
- * A grid's `high` composes its sources' `high` and its `low` their `low`, so a
29057
- * profile is on offer only when EVERY source can serve it. The refusal NAMES
29058
- * the sources, because "this grid has no low" is not a finding — "615 has no
29059
- * low" is, and it is the one an operator can act on.
29060
- */
29061
- var GridProfileOfferSchema = object({
29062
- profile: _enum([
29063
- "high",
29064
- "mid",
29065
- "low"
29066
- ]),
29067
- offered: boolean(),
29068
- /** Sources that cannot serve it. Empty when it is offered, or when there are no cells. */
29069
- missingSources: array(number().int().positive()),
29070
- /**
29071
- * The canvas this profile composes onto, `WxH`, or empty when it is not
29072
- * offered. DERIVED from the cells and the sources' own size at this profile —
29073
- * it is reported because nothing else in the system would ever say what the
29074
- * grid came out as, and because it is the number an operator would otherwise
29075
- * expect to type.
29076
- */
29077
- canvas: string(),
29078
- /**
29079
- * Whether this profile is PUBLISHED, of the ones the grid could serve.
29080
- *
29081
- * A grid's `high` is composed of its sources' `high`, so on a 4K fleet it is
29082
- * a 4K canvas built from 4K decodes — something to opt into, not something a
29083
- * viewer's adaptive should be handed by climbing to the top rung it can see.
29084
- * Default is `mid` + `low`.
29085
- */
29086
- published: boolean()
29087
- });
29088
- var GridLayoutViewSchema = object({
29089
- /** The persisted grid row this camera was declared from. */
29090
- instanceId: string(),
29091
- deviceId: number().int().nonnegative(),
29092
- name: string(),
29093
- /**
29094
- * NO canvas size. A grid's resolution is not authored: each profile derives
29095
- * its own from the cells and its sources' dimensions. The two numbers that
29096
- * used to be here were a text field that silently decided both how much the
29097
- * composite cost and how sharp it was — see `profiles[].canvas` for what it
29098
- * came out as.
29099
- */
29100
- fps: number().int(),
29101
- cells: array(GridLayoutCellSchema),
29102
- /** What the catalog will publish, and what it refuses to. Read-only. */
29103
- profiles: array(GridProfileOfferSchema)
29104
- });
29105
- var GridLayoutPatchSchema = object({
29106
- deviceId: number().int().nonnegative(),
29107
- name: string().min(1).max(160).optional(),
29108
- fps: number().int().min(1).max(60).optional(),
29109
- /** Which profiles to publish. See `GridProfileOffer.published`. */
29110
- publishedProfiles: array(_enum([
29111
- "high",
29112
- "mid",
29113
- "low"
29114
- ])).max(3).optional(),
29115
- /**
29116
- * The whole cell list at once. A per-cell patch would need an ordering the
29117
- * editor does not have, and a half-applied layout is a picture nobody asked
29118
- * for.
29119
- */
29120
- cells: array(GridLayoutCellSchema).max(16)
29121
- });
29122
- DeviceType.Camera, method(object({ deviceId: number().int().nonnegative() }), GridLayoutViewSchema.nullable(), { auth: "admin" }), method(GridLayoutPatchSchema, GridLayoutViewSchema, {
29123
- kind: "mutation",
29124
- auth: "admin"
29125
- });
29126
- /**
29127
28981
  * Motion-zones share the same MaskShape vocabulary as privacy-mask — the
29128
28982
  * on-camera motion-detection mask is a single `grid` region (a row-major
29129
28983
  * boolean cell lattice the camera's onboard VMD evaluates). Composing it as
@@ -30935,37 +30789,37 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceI
30935
30789
  kind: "mutation",
30936
30790
  auth: "admin"
30937
30791
  });
30938
- /**
30939
- * `recording` cap — footage availability + HLS playback manifests + per-device
30940
- * recording config. NOTE on events (source of truth, R5/C3): this cap carries
30941
- * NO event surface — `getPlaybackManifest` returns playlist URLs only. Timeline
30942
- * events (motion/object/audio) come from `pipelineAnalytics` (durable SQLite
30943
- * rows) and are the ONLY event surface — the recorder has none. The in-RAM
30944
- * playback markers it used to build were deleted on 2026-08-29 because nothing
30945
- * ever read them. Event<->footage joins are by time, padded with the shared
30946
- * `EVENT_PAD_MS` (`interfaces/recording-config.ts`).
30947
- */
30948
- var RecordingStatusSchema = object({
30949
- deviceId: number(),
30950
- enabled: boolean(),
30951
- /** THE derived storage mode, from the one definition
30952
- * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
30953
- * `on-device-decision` could have reached the recorder and not the status. */
30954
- activeMode: RecordingStorageModeSchema,
30955
- nodeId: string(),
30956
- storageBytes: number()
30957
- });
30958
30792
  var RecordingRangeSchema = object({
30959
30793
  profile: string(),
30960
30794
  startMs: number(),
30961
30795
  endMs: number()
30962
30796
  });
30797
+ /**
30798
+ * How a source ANSWERED, on every singular read of this cap.
30799
+ *
30800
+ * `'read'` — it looked. `ranges: []` / `days: []` is then a real claim: this
30801
+ * source has no coverage in the window. `'unreadable'` — nobody could look
30802
+ * (the camera was unreachable, the calendar rung threw, the location is
30803
+ * unmounted, the node is still on the old build), and the emptiness beside it
30804
+ * means NOTHING.
30805
+ *
30806
+ * The batch rows have carried this since the grid existed; the SINGULAR
30807
+ * answers gained it with the collection (D625 §10.4), because they are the
30808
+ * ones the single-camera picker uses and because a half-converted fleet makes
30809
+ * "nobody looked" common for the length of a deploy. Without it the timeline
30810
+ * has no vocabulary for it, and `(data ?? [])` in a viewer turns a rollout into
30811
+ * a fleet of cameras that appear to have lost their recordings (D315, D393).
30812
+ */
30813
+ var RecordingReadSchema = _enum(["read", "unreadable"]);
30963
30814
  var RecordingAvailabilitySchema = object({
30964
30815
  deviceId: number(),
30816
+ /** See {@link RecordingReadSchema}. An `'unreadable'` answer carries an empty
30817
+ * `ranges` that means nothing — never draw it as "no footage". */
30818
+ read: RecordingReadSchema,
30965
30819
  ranges: array(RecordingRangeSchema),
30966
30820
  /**
30967
- * Every profile this camera has footage in — not only the one `ranges`
30968
- * describes (D433).
30821
+ * Every profile this camera has footage in AT THIS SOURCE — not only the one
30822
+ * `ranges` describes (D433).
30969
30823
  *
30970
30824
  * `ranges` answers for ONE profile by design: the timeline is a single bar,
30971
30825
  * and enumerating all of them triples the directory reads for a bar that
@@ -30982,15 +30836,285 @@ var RecordingAvailabilitySchema = object({
30982
30836
  });
30983
30837
  var RecordingDaysSchema = object({
30984
30838
  deviceId: number(),
30839
+ /** See {@link RecordingReadSchema}. `days: []` on an `'unreadable'` answer is
30840
+ * "nobody could look", and the date-picker must not spell it the same as
30841
+ * "no footage this month". */
30842
+ read: RecordingReadSchema,
30985
30843
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
30986
30844
  days: array(number())
30987
30845
  });
30846
+ var RecordingManifestSchema = object({
30847
+ deviceId: number(),
30848
+ /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
30849
+ localMasterPath: string().nullable(),
30850
+ /** HTTP(S) URL to the master playlist on the recording node's playback server
30851
+ * (the PRIMARY candidate); null when no recording / server. Carries the
30852
+ * scoped playback token in its path. */
30853
+ playbackUrl: string().nullable(),
30854
+ /**
30855
+ * Candidate master-playlist URLs the client tries in order (LAN first, then
30856
+ * remote — Tailscale/Cloudflare if the operator configured extra hosts), each
30857
+ * carrying the same scoped token. `playbackUrl` is the first entry. Empty when
30858
+ * there is no recording / server.
30859
+ */
30860
+ playbackEndpoints: array(string())
30861
+ });
30862
+ var RecordingSourceAvailabilitySchema = object({
30863
+ state: _enum([
30864
+ "ok",
30865
+ "sleeping",
30866
+ "unreachable",
30867
+ "no-storage",
30868
+ "index-empty"
30869
+ ]),
30870
+ /** Free text, shown verbatim. Names the camera's own refusal when there is one. */
30871
+ reason: string().optional(),
30872
+ /** When this source's coverage was last CONFIRMED. A cached answer is never
30873
+ * drawn as current: the surface shows the age whenever it is older than the
30874
+ * refresh interval. The clip catalog's `catalogAsOf`, under the name the
30875
+ * timeline uses for it. */
30876
+ coverageAsOf: number().optional()
30877
+ });
30878
+ /**
30879
+ * One SOURCE of recorded coverage for a camera — a row of the picker.
30880
+ *
30881
+ * A provider lists the sources IT serves for that device, and answers for each
30882
+ * of them whether it can answer at all. A provider with nothing to offer on a
30883
+ * camera returns `[]` — it is not that camera's business. The five availability
30884
+ * states are `ClipSourceAvailability`'s verbatim: they mean exactly the same
30885
+ * things about a coverage index as about a clip catalog, and `sleeping` in
30886
+ * particular is what stops a battery camera being woken to paint a bar.
30887
+ */
30888
+ var RecordingSourceSchema = object({
30889
+ /** The source id. {@link RECORDING_SOURCE_CAMSTACK} for ours (RESERVED), a
30890
+ * vendor namespace (`native:reolink:onboard`, …) for a camera's own store. */
30891
+ source: string(),
30892
+ /** Operator-facing name of the source ("CamStack recordings", "SD card"). */
30893
+ label: string(),
30894
+ /**
30895
+ * The addon that SERVES this row, and the value a later call passes as
30896
+ * `provider`.
30897
+ *
30898
+ * Optional for version skew only. The collection dispatcher stamps it from
30899
+ * the registry, so a row that travelled through the fan-out carries the
30900
+ * authoritative id whatever the provider filled in (D557 §4).
30901
+ */
30902
+ addonId: string().optional(),
30903
+ availability: RecordingSourceAvailabilitySchema
30904
+ });
30905
+ /**
30906
+ * What a surface may DRAW for this (camera, source) — D612's rule applied to a
30907
+ * timeline: **the source declares what it can do, and the surface draws what
30908
+ * was declared. It never assumes, and never offers a gesture it will then
30909
+ * refuse.** D612 exists because `8` and `16` were offered as clip rates, the
30910
+ * broker clamped them to `4`, and no line anywhere said so.
30911
+ *
30912
+ * Asked once per (camera, source) before anything is drawn — never replaced by
30913
+ * a constant the surface keeps, which is the second authority D612 ends.
30914
+ */
30915
+ var RecordingSourceOptionsSchema = object({
30916
+ /** How this source's media reaches the player.
30917
+ * `archive` = our own indexed segment tree; `stream` = the provider's
30918
+ * forward-only fMP4 (D597); `realtime` = a replay bound to wall clock. */
30919
+ transport: _enum([
30920
+ "archive",
30921
+ "stream",
30922
+ "realtime"
30923
+ ]),
30924
+ /** What the BAR means. `continuous` = gaps are holes in a recording;
30925
+ * `sparse` = gaps are the absence of one, and must be drawn as such.
30926
+ *
30927
+ * Not an onboard-only concession: measured 2026-09-24, OUR bar covers 98.8 %
30928
+ * of 592's day and 1.2 % of 1436's. It is a fact about a (source, camera)
30929
+ * pair, and ours answers it per camera from `deriveRecordingMode`. */
30930
+ coverage: _enum(["continuous", "sparse"]),
30931
+ /** Where the playhead may be put.
30932
+ * `free` — anywhere, to the frame.
30933
+ * `forward` — only ahead of the current position.
30934
+ * `segment` — a position SNAPS to the head of the covering segment; a finer
30935
+ * ask is accepted by the camera and SILENTLY IGNORED. Measured
30936
+ * on 1436 (Hikvision V5.7.1, 2026-09-23): a window-narrowed
30937
+ * `ContentMgmt/search` returns a row and a `playbackURI`, the
30938
+ * replay opens 200 and delivers media — and the burned-in OSD of
30939
+ * the first frame reads the SEGMENT HEAD every time. Calling
30940
+ * that `forward` would tell the surface it may move the playhead
30941
+ * ahead within a loaded segment, which it may not. */
30942
+ seek: _enum([
30943
+ "free",
30944
+ "forward",
30945
+ "segment"
30946
+ ]),
30947
+ /** Frame-step BACKWARD is meaningful. */
30948
+ stepBack: boolean(),
30949
+ /** Whether the drag-scrub gesture is served, as opposed to refused by name. */
30950
+ scrub: boolean(),
30951
+ /** Deliverable rates, ascending, always containing `1`. The surface draws its
30952
+ * picker from this and from NOTHING else (D612, D620, D621). `0` is not a
30953
+ * member: pause is the absence of a rate. */
30954
+ rates: array(number().positive()).min(1).readonly(),
30955
+ /** TRUE when a read of this source HOLDS the camera's only playback session.
30956
+ * A surface with this set makes at most ONE read at a time and draws no
30957
+ * scrub-thumbnail strip, no hover preview, no prefetch and no background
30958
+ * refresh. The precedent is exact and expensive: filling one screen of
30959
+ * Hikvision thumbnails at 1.01× realtime consumed fifteen minutes of that
30960
+ * camera's only playback session (1.2.126, reported within minutes), and a
30961
+ * timeline is a screenful of reads by construction. */
30962
+ exclusive: boolean()
30963
+ });
30964
+ /**
30965
+ * How to PLAY the instant that was asked for, from the chosen source.
30966
+ *
30967
+ * No new media transport is built for onboard sources: the `clip` arm is a
30968
+ * DELEGATION to the `videoclips` transport that vendor already has (D597 /
30969
+ * D616 / D617). The onboard half of this collection is a PROJECTION of
30970
+ * `videoclips` for coverage and a delegation to it for bytes.
30971
+ */
30972
+ var RecordingPlaybackSchema = discriminatedUnion("kind", [
30973
+ object({
30974
+ kind: literal("hls"),
30975
+ manifest: RecordingManifestSchema
30976
+ }),
30977
+ object({
30978
+ kind: literal("clip"),
30979
+ /** The `videoclips` source namespace this clip id belongs to. */
30980
+ source: string(),
30981
+ clipId: string(),
30982
+ /** Where this clip actually STARTS. On a `seek: 'segment'` source the
30983
+ * playhead lands here, not at the requested instant — the surface must be
30984
+ * TOLD, not left to discover it from a burned-in OSD. */
30985
+ startsAtMs: number()
30986
+ }),
30987
+ object({
30988
+ kind: literal("none"),
30989
+ reason: string()
30990
+ })
30991
+ ]);
30992
+ DeviceType.Camera, method(object({ deviceId: number() }), array(RecordingSourceSchema).readonly(), {
30993
+ kind: "query",
30994
+ auth: "protected"
30995
+ }), method(object({
30996
+ deviceId: number(),
30997
+ /**
30998
+ * WHICH provider to ask — the `addonId` a {@link RecordingSourceSchema}
30999
+ * row carries, never a source id and never a list. **REQUIRED**, in the
31000
+ * schema, where the generated types make it unomittable rather than
31001
+ * merely discouraged (D554 amended).
31002
+ *
31003
+ * It was learned the expensive way on `videoclips.listClips`: measured
31004
+ * on the live hub 2026-09-20, device 592 bound to `recorder` AND
31005
+ * `provider-reolink`, a bare call with `limit: 3` answered SIX rows,
31006
+ * three from each source, merged — `device-collection-dispatch.ts`
31007
+ * leaves an unpinned fan-out un-narrowed, so absence buys the union the
31008
+ * method exists not to be. An un-narrowed `getAvailability` would do
31009
+ * that to a TIMELINE: our ranges and the card's clips unioned into one
31010
+ * bar, which is "two sources are never drawn together" broken in the
31011
+ * one place it matters most.
31012
+ *
31013
+ * A provider the device is not bound to is refused BY NAME (D552's
31014
+ * `rejectUnresolvedAddonPin`), never answered by another one.
31015
+ */
31016
+ provider: string().min(1),
31017
+ fromMs: number(),
31018
+ toMs: number(),
31019
+ /**
31020
+ * Answer for THIS profile instead of the source's preferred one (D433).
31021
+ * Absent keeps the timeline's behaviour — one bar, one profile, one set
31022
+ * of reads. `profilesWithFootage` on the answer says what may be asked
31023
+ * for.
31024
+ */
31025
+ profile: string().optional()
31026
+ }), RecordingAvailabilitySchema, {
31027
+ kind: "query",
31028
+ auth: "protected"
31029
+ }), method(object({
31030
+ deviceId: number(),
31031
+ provider: string().min(1),
31032
+ fromMs: number(),
31033
+ toMs: number(),
31034
+ tzOffsetMinutes: number()
31035
+ }), RecordingDaysSchema, {
31036
+ kind: "query",
31037
+ auth: "protected"
31038
+ }), method(object({
31039
+ deviceId: number(),
31040
+ provider: string().min(1),
31041
+ fromMs: number(),
31042
+ toMs: number(),
31043
+ profile: CamProfileSchema.optional()
31044
+ }), RecordingPlaybackSchema, {
31045
+ kind: "query",
31046
+ auth: "protected"
31047
+ }), method(object({
31048
+ deviceId: number(),
31049
+ provider: string().min(1)
31050
+ }), RecordingSourceOptionsSchema, {
31051
+ kind: "query",
31052
+ auth: "protected"
31053
+ });
31054
+ /**
31055
+ * `recording-archive` — OUR archive, and the intent that fills it.
31056
+ *
31057
+ * The system-singleton half of the 2026-09-24 cut (D625). `recording` used to
31058
+ * be one 33-method system singleton holding two unrelated subjects: three
31059
+ * per-camera READS about coverage and playback, and everything else — storage
31060
+ * locations, retention, relocation, rebalance, the ops log, the placement
31061
+ * table and the byte-plane primitives our scrub and export are built on.
31062
+ *
31063
+ * The reads became a device-scoped COLLECTION, so a camera's own card can be a
31064
+ * source beside ours (`recording.cap.ts`). Everything that is about OUR store,
31065
+ * or unimplementable by a camera, stayed here.
31066
+ *
31067
+ * ## On the name
31068
+ *
31069
+ * `recording-storage` was the obvious choice and is wrong: this cap also holds
31070
+ * `getDeviceConfig`/`setDeviceConfig`, which are recording INTENT — bands,
31071
+ * retention, the D62 switch authority — and a name that says "storage" invites
31072
+ * the next reader to move them out again. An archive is a thing we keep, and
31073
+ * what we keep it under is a policy; the name covers both halves honestly and
31074
+ * sits in the existing family (`recording-onboard`, `recording-export`,
31075
+ * `recording-signal`).
31076
+ *
31077
+ * ## What must NOT happen to it
31078
+ *
31079
+ * It stays a SINGLETON. It is registered by `recorder`, which is
31080
+ * `placement: 'any-node'` and runs on every recording node; the hub dispatches
31081
+ * to one of them. Putting the ledger, the placement table or the relocation
31082
+ * jobs behind a fan-out is the one genuinely dangerous move in this cut.
31083
+ *
31084
+ * `getDeviceConfig` / `setDeviceConfig` in particular are the D62 recording
31085
+ * authority (`CameraSwitch.authority`). If a write reached a different provider
31086
+ * than the read — which a collection fan-out permits — two authorities would
31087
+ * decide when one camera records, and the symptom (recording silently off, or
31088
+ * a `bands` array clobbered by a partial write) is durable and silent. Keeping
31089
+ * them here means the worst case during a rollout is a 412: the switch refuses
31090
+ * to flip and SAYS so. **Do not move them into the collection, at any point,
31091
+ * for any reason.**
31092
+ *
31093
+ * ## The two batch reads
31094
+ *
31095
+ * `getAvailabilityBatch` / `getDaysWithRecordingsBatch` take `deviceIds:
31096
+ * number[]` with no single `deviceId`, and a device-scoped mount routes
31097
+ * through `getProviderForDevice(deviceId)` — there is nothing for it to route
31098
+ * on. They stay here, and on this cap the batch is explicitly OURS: a grid has
31099
+ * no per-camera picker, and a caller that wants another source's coverage asks
31100
+ * `recording.getAvailability` per device with that source's `provider`.
31101
+ */
31102
+ var RecordingStatusSchema = object({
31103
+ deviceId: number(),
31104
+ enabled: boolean(),
31105
+ /** THE derived storage mode, from the one definition
31106
+ * (`deriveRecordingMode`) — never a second enum. A duplicated list is how
31107
+ * `on-device-decision` could have reached the recorder and not the status. */
31108
+ activeMode: RecordingStorageModeSchema,
31109
+ nodeId: string(),
31110
+ storageBytes: number()
31111
+ });
30988
31112
  /**
30989
31113
  * One camera's row in a `getAvailabilityBatch` answer.
30990
31114
  *
30991
- * `ranges` is EXACTLY what `getAvailability` returns for that camera — the
30992
- * batch collapses the transport, not the work — plus the one thing the singular
30993
- * method never had to say:
31115
+ * `ranges` is EXACTLY what `recording.getAvailability` returns for that camera
31116
+ * at OUR source — the batch collapses the transport, not the work — plus the
31117
+ * `read` mark the singular answer now carries too (D625):
30994
31118
  *
30995
31119
  * - `read: 'read'` — answered. `ranges: []` means "read, and this camera has
30996
31120
  * no footage in the window", which is a real claim.
@@ -31022,22 +31146,6 @@ var RecordingDaysForDeviceSchema = object({
31022
31146
  /** Local-midnight epochs (UTC ms) of days that have ≥1 recorded segment. */
31023
31147
  days: array(number()).readonly()
31024
31148
  });
31025
- var RecordingManifestSchema = object({
31026
- deviceId: number(),
31027
- /** Local filesystem path to the master playlist; null when no recording exists for the requested range. */
31028
- localMasterPath: string().nullable(),
31029
- /** HTTP(S) URL to the master playlist on the recording node's playback server
31030
- * (the PRIMARY candidate); null when no recording / server. Carries the
31031
- * scoped playback token in its path. */
31032
- playbackUrl: string().nullable(),
31033
- /**
31034
- * Candidate master-playlist URLs the client tries in order (LAN first, then
31035
- * remote — Tailscale/Cloudflare if the operator configured extra hosts), each
31036
- * carrying the same scoped token. `playbackUrl` is the first entry. Empty when
31037
- * there is no recording / server.
31038
- */
31039
- playbackEndpoints: array(string())
31040
- });
31041
31149
  /**
31042
31150
  * Recording storage usage for one camera — what the ARCHIVE holds for it,
31043
31151
  * across every profile and every resolvable location on this node.
@@ -31296,34 +31404,12 @@ var ReadWindowBytesResultSchema = discriminatedUnion("kind", [object({
31296
31404
  segmentEndMs: number()
31297
31405
  })]);
31298
31406
  method(object({
31299
- deviceId: number(),
31300
- fromMs: number(),
31301
- toMs: number(),
31302
- /**
31303
- * Answer for THIS profile instead of the preferred one (D433). Absent
31304
- * keeps the timeline's behaviour — one bar, one profile, one set of
31305
- * reads. `profilesWithFootage` on the answer says what may be asked
31306
- * for.
31307
- */
31308
- profile: string().optional()
31309
- }), RecordingAvailabilitySchema, {
31310
- kind: "query",
31311
- auth: "protected"
31312
- }), method(object({
31313
31407
  deviceIds: array(number()).min(1).max(200),
31314
31408
  fromMs: number(),
31315
31409
  toMs: number()
31316
31410
  }), array(RecordingAvailabilityForDeviceSchema).readonly(), {
31317
31411
  kind: "query",
31318
31412
  auth: "protected"
31319
- }), method(object({
31320
- deviceId: number(),
31321
- fromMs: number(),
31322
- toMs: number(),
31323
- tzOffsetMinutes: number()
31324
- }), RecordingDaysSchema, {
31325
- kind: "query",
31326
- auth: "protected"
31327
31413
  }), method(object({
31328
31414
  deviceIds: array(number()).min(1).max(200),
31329
31415
  fromMs: number(),
@@ -31332,13 +31418,6 @@ method(object({
31332
31418
  }), array(RecordingDaysForDeviceSchema).readonly(), {
31333
31419
  kind: "query",
31334
31420
  auth: "protected"
31335
- }), method(object({
31336
- deviceId: number(),
31337
- fromMs: number(),
31338
- toMs: number()
31339
- }), RecordingManifestSchema, {
31340
- kind: "query",
31341
- auth: "protected"
31342
31421
  }), method(object({}), RecordingStorageUsageSchema, {
31343
31422
  kind: "query",
31344
31423
  auth: "admin"
@@ -31786,6 +31865,307 @@ method(object({
31786
31865
  auth: "protected"
31787
31866
  });
31788
31867
  /**
31868
+ * Vendor-neutral **onboard** recording + storage cap — what the CAMERA
31869
+ * writes to the CAMERA's own card, on the camera's own schedule.
31870
+ *
31871
+ * This is NOT `recording.cap.ts`. That one is CamStack's recorder: our
31872
+ * footage ledger, our storage locations, our retention. This one has a
31873
+ * different authority — the camera's firmware — and per D62 it stores
31874
+ * nothing of its own. Every value here is read from the camera and every
31875
+ * write goes back to the camera; there is no CamStack-side mirror that
31876
+ * could disagree with the device.
31877
+ *
31878
+ * ## One shape, two firmwares
31879
+ *
31880
+ * Measured 2026-09-22 against the live fleet:
31881
+ *
31882
+ * | fact | Hikvision (ISAPI) | Reolink (Baichuan) |
31883
+ * | --- | --- | --- |
31884
+ * | storage | `ContentMgmt/Storage` `<hdd>` rows: status, capacity, freeSpace (MB) | `getHddInfoList` (cmd 102): `mount`, `format`, `capacity` GB + `capacityM` MB remainder |
31885
+ * | tracks | several (101 **and** 103 on both 1436 and 3833), each with its own schedule | one per channel |
31886
+ * | schedule | per track, 7 `ScheduleAction` blocks: DayOfWeek + TimeOfDay range + ONE `ActionRecordingMode` | per trigger type, a 168-char weekly HOUR mask |
31887
+ * | triggers | `CMR`, `MOTION` | `Normal`, `MD`, `people`, `vehicle`, `dog_cat`, `crossline`, `intrude`, `loitering` |
31888
+ * | pre-record | `PreRecordTimeSeconds` | `preRecordTime` |
31889
+ * | post-record | `PostRecordTimeSeconds` | `recordDelayTime` |
31890
+ * | overwrite | per track `LoopEnable` | `cycle`, with `cycleList` enumerating the accepted values |
31891
+ * | segment length | not exposed on V5.7.1 | `packageTime` (minutes) |
31892
+ *
31893
+ * The two schedule models look different and are the same thing in
31894
+ * different coordinates: both answer "for this trigger, during which
31895
+ * weekly windows does the camera record". {@link RecordWindow} is that
31896
+ * question in one shape — Hikvision's ranges map straight onto it,
31897
+ * Reolink's mask expands into hour-aligned windows.
31898
+ *
31899
+ * ## Union, not intersection
31900
+ *
31901
+ * **The same fields exist on every camera.** What differs per device is
31902
+ * which VALUES that device accepts, and that is what {@link
31903
+ * RecordingOnboardOptions} reports — a `{ readable, writable, reason }`
31904
+ * per field plus the schedule's own limits. A control a camera cannot
31905
+ * honour is rendered DISABLED WITH ITS REASON, never missing and never
31906
+ * dead: disabled must not look like broken.
31907
+ *
31908
+ * ## Refusal by name
31909
+ *
31910
+ * A write a camera cannot honour is refused with a sentence the operator
31911
+ * can read — never accepted and dropped. Both providers refuse through
31912
+ * {@link describeOnboardRefusal}, so the vocabulary is one function and
31913
+ * one test, not two hand-written vendor opinions.
31914
+ *
31915
+ * Follows the D14 `deviceConfig` archetype (see `stream-params.cap.ts`):
31916
+ * `getOptions` advertises per-camera availability, `getStatus` (auto-
31917
+ * injected from `status`) reports the live values, and a single
31918
+ * `setSettings` mutation applies a partial change. No hand-written
31919
+ * settings-contribution methods.
31920
+ */
31921
+ /**
31922
+ * What makes the camera start recording during a window.
31923
+ *
31924
+ * The union of both vendors' vocabularies. `continuous` is Hikvision's
31925
+ * `CMR` and Reolink's `Normal`; `motion` is `MOTION` / `MD`. The
31926
+ * object-class triggers are Reolink-only today and the smart-event ones
31927
+ * (`lineCrossing`, `intrusion`, `loitering`) are Reolink-only on the
31928
+ * firmwares measured — a camera that cannot record on a trigger simply
31929
+ * does not list it in `options.schedule.triggers`, and a window naming
31930
+ * it is REFUSED, not dropped.
31931
+ */
31932
+ var RecordTriggerSchema = _enum([
31933
+ "continuous",
31934
+ "motion",
31935
+ "person",
31936
+ "vehicle",
31937
+ "animal",
31938
+ "lineCrossing",
31939
+ "intrusion",
31940
+ "loitering",
31941
+ "alarmInput"
31942
+ ]);
31943
+ /**
31944
+ * One weekly recording window: "on `day`, from `startMinute` to
31945
+ * `endMinute`, record on `trigger`".
31946
+ *
31947
+ * `day` is 0 = Monday … 6 = Sunday (ISO order, which is also the order
31948
+ * both firmwares enumerate). Minutes are local camera time since
31949
+ * midnight; `endMinute` may be 1440, meaning end of day — that is
31950
+ * Hikvision's literal `24:00` and Reolink's 24th mask slot, and
31951
+ * collapsing it to 0 would turn a whole-day window into an empty one.
31952
+ */
31953
+ var RecordWindowSchema = object({
31954
+ trigger: RecordTriggerSchema,
31955
+ day: number().int().min(0).max(6),
31956
+ startMinute: number().int().min(0).max(1439),
31957
+ endMinute: number().int().min(1).max(1440)
31958
+ });
31959
+ /** Status of one physical volume, as the camera itself describes it. */
31960
+ var OnboardStorageVolumeSchema = object({
31961
+ /** The camera's own id for the volume (`hdd/id`, Reolink `HddInfo/number`). */
31962
+ id: string(),
31963
+ /** The camera's own name for it, when it gives one (`hddName`). */
31964
+ label: string().optional(),
31965
+ status: _enum([
31966
+ "ok",
31967
+ "unformatted",
31968
+ "error",
31969
+ "offline",
31970
+ "unknown"
31971
+ ]),
31972
+ /**
31973
+ * Total size in MB, or **null when the camera did not say**.
31974
+ *
31975
+ * Never 0 for an unreadable value: a measurement that failed is not a
31976
+ * measurement (D393), and a card whose size is unknown must not be
31977
+ * rendered as a card of size zero.
31978
+ */
31979
+ capacityMb: number().nullable(),
31980
+ /**
31981
+ * Free space in MB, or null when unknown.
31982
+ *
31983
+ * **Not a proxy for "has footage".** Measured 2026-09-22: 1436 and
31984
+ * 1439 both report exactly 11776 MB free — the fixed reserve a looping
31985
+ * card converges on once it has wrapped. At loop steady state the
31986
+ * number is identical whether the camera recorded yesterday or stopped
31987
+ * a month ago.
31988
+ */
31989
+ freeMb: number().nullable(),
31990
+ /** True when the camera reports the volume writable (`property` RW). */
31991
+ writable: boolean().optional()
31992
+ });
31993
+ object({
31994
+ storage: discriminatedUnion("kind", [
31995
+ object({
31996
+ kind: literal("present"),
31997
+ volumes: array(OnboardStorageVolumeSchema)
31998
+ }),
31999
+ object({
32000
+ kind: literal("absent"),
32001
+ reason: string()
32002
+ }),
32003
+ object({
32004
+ kind: literal("unknown"),
32005
+ reason: string()
32006
+ })
32007
+ ]),
32008
+ tracks: array(object({
32009
+ id: string(),
32010
+ enabled: boolean(),
32011
+ isVideo: boolean(),
32012
+ /** From the camera's own track description. Null when it does not say. */
32013
+ codec: string().nullable(),
32014
+ resolution: string().nullable(),
32015
+ /** Per-track overwrite flag, where the firmware keeps it per track. */
32016
+ overwriteWhenFull: boolean().nullable()
32017
+ })),
32018
+ /**
32019
+ * The track the write path targets — the enabled VIDEO one. Null when
32020
+ * no track could be identified, which is itself a refusal reason.
32021
+ */
32022
+ primaryTrackId: string().nullable(),
32023
+ /** Master "record to the card at all" switch. */
32024
+ enabled: boolean().nullable(),
32025
+ overwriteWhenFull: boolean().nullable(),
32026
+ preRecordSec: number().nullable(),
32027
+ postRecordSec: number().nullable(),
32028
+ /** Length of one recorded file, in minutes. */
32029
+ segmentMinutes: number().nullable(),
32030
+ /** The primary track's weekly windows, flattened. */
32031
+ windows: array(RecordWindowSchema),
32032
+ /**
32033
+ * How many windows the camera described that CamStack could NOT read —
32034
+ * an unrecognised trigger, an unparseable clock, a weekday it does not
32035
+ * name.
32036
+ *
32037
+ * A dropped window is work the reader threw away, and a schedule that
32038
+ * silently shows fewer rows than the camera holds is how an operator
32039
+ * saves back a schedule shorter than the one they were looking at
32040
+ * (D391). Non-zero means the window list is INCOMPLETE and a write
32041
+ * that replaces it would delete what was not shown — which is why a
32042
+ * provider reporting a non-zero count also reports the schedule as not
32043
+ * writable.
32044
+ */
32045
+ unreadableWindows: number(),
32046
+ /**
32047
+ * The camera is scheduled to record and has NO usable storage.
32048
+ *
32049
+ * A first-class fact because it is the fleet's most common silent
32050
+ * defect: measured 2026-09-22, 1441 and 3831 are both motion-recording
32051
+ * to a card that is not there. Neither the schedule nor the storage
32052
+ * read says anything wrong on its own; only the pair does.
32053
+ */
32054
+ recordingToNowhere: boolean(),
32055
+ lastFetchedAt: number()
32056
+ });
32057
+ /** Numeric range descriptor — `{ min, max, step }` per the getOptions convention. */
32058
+ var RangeSchema = object({
32059
+ min: number(),
32060
+ max: number(),
32061
+ step: number()
32062
+ });
32063
+ /**
32064
+ * The values a camera actually takes for a numeric field, when they are a SET
32065
+ * rather than a range.
32066
+ *
32067
+ * `{min,max,step}` cannot say what these two firmwares do. Measured on 1436
32068
+ * (I91DN) on 2026-09-22 by writing each value and reading it back:
32069
+ *
32070
+ * - pre-record: `0, 5, 10, 15, 20, 25, 30` and `2147483647` (INT32_MAX, the
32071
+ * camera's "no limit" — `-1` and `4294967295` both land on it);
32072
+ * - post-record: `5, 10, 30, 60, 120, 300, 600`.
32073
+ *
32074
+ * Neither is expressible as a step: the first has a sentinel two billion away
32075
+ * from its neighbours, the second doubles and then jumps. A range that tried
32076
+ * would forbid values the camera takes AND permit values it silently replaces
32077
+ * with 5 — wrong in both directions at once.
32078
+ *
32079
+ * `sentinel` names the member that is not a duration, so a surface can render
32080
+ * "no limit" instead of `2147483647` seconds.
32081
+ */
32082
+ var AllowedValuesSchema = object({
32083
+ values: array(number()).min(1),
32084
+ sentinel: object({
32085
+ value: number(),
32086
+ meaning: _enum(["no-limit", "disabled"])
32087
+ }).optional()
32088
+ });
32089
+ /**
32090
+ * Per-field availability on ONE camera.
32091
+ *
32092
+ * The field exists on every camera — this says whether this one can be
32093
+ * read and whether it can be written, and `reason` says why not when
32094
+ * either is false. The UI renders the control DISABLED with the reason
32095
+ * rather than hiding it, so a limitation is legible instead of looking
32096
+ * like a missing feature.
32097
+ */
32098
+ var OnboardFieldSupportSchema = object({
32099
+ readable: boolean(),
32100
+ writable: boolean(),
32101
+ /** Required whenever `readable` or `writable` is false. */
32102
+ reason: string().optional()
32103
+ });
32104
+ /** What this camera's schedule model can express. */
32105
+ var OnboardScheduleSupportSchema = object({
32106
+ support: OnboardFieldSupportSchema,
32107
+ /**
32108
+ * The smallest time step the camera can express, in minutes.
32109
+ *
32110
+ * Hikvision takes arbitrary minutes (`00:05:00`–`23:57:00` observed on
32111
+ * 1436's track 103). Reolink's schedule is a 7×24 HOUR mask, so 60. A
32112
+ * window whose edges are not a multiple of this is REFUSED rather than
32113
+ * quietly rounded — rounding is how an operator's 06:30 becomes 06:00
32114
+ * and nothing says so.
32115
+ */
32116
+ granularityMinutes: number(),
32117
+ /** Triggers this camera can record on. A window naming another is refused. */
32118
+ triggers: array(RecordTriggerSchema),
32119
+ /**
32120
+ * False when the camera stores ONE trigger per time range, so two
32121
+ * windows overlapping on the same day cannot carry different triggers.
32122
+ * True on Reolink, whose mask is per-trigger and independent.
32123
+ */
32124
+ supportsOverlappingTriggers: boolean()
32125
+ });
32126
+ var RecordingOnboardOptionsSchema = object({
32127
+ enabled: OnboardFieldSupportSchema,
32128
+ overwriteWhenFull: OnboardFieldSupportSchema,
32129
+ preRecordSec: OnboardFieldSupportSchema,
32130
+ preRecordSecRange: RangeSchema.optional(),
32131
+ /** Preferred over the range when the camera takes a SET, not a span. */
32132
+ preRecordSecAllowed: AllowedValuesSchema.optional(),
32133
+ postRecordSec: OnboardFieldSupportSchema,
32134
+ postRecordSecRange: RangeSchema.optional(),
32135
+ /** Preferred over the range when the camera takes a SET, not a span. */
32136
+ postRecordSecAllowed: AllowedValuesSchema.optional(),
32137
+ segmentMinutes: OnboardFieldSupportSchema,
32138
+ segmentMinutesRange: RangeSchema.optional(),
32139
+ /** Preferred over the range when the camera takes a SET, not a span. */
32140
+ segmentMinutesAllowed: AllowedValuesSchema.optional(),
32141
+ schedule: OnboardScheduleSupportSchema
32142
+ });
32143
+ /**
32144
+ * A partial change. Every field optional.
32145
+ *
32146
+ * Unlike the other `deviceConfig` caps, a provider here does **NOT**
32147
+ * silently ignore a field it cannot support — it refuses, by name,
32148
+ * through {@link describeOnboardRefusal}. Silence on a recording setting
32149
+ * is the failure D62 exists to prevent: the operator believes the camera
32150
+ * is recording the way the form says, and it is not.
32151
+ */
32152
+ var RecordingOnboardPatchSchema = object({
32153
+ enabled: boolean().optional(),
32154
+ overwriteWhenFull: boolean().optional(),
32155
+ preRecordSec: number().optional(),
32156
+ postRecordSec: number().optional(),
32157
+ segmentMinutes: number().optional(),
32158
+ /** The complete new window set for the primary track — not a delta. */
32159
+ windows: array(RecordWindowSchema).optional()
32160
+ });
32161
+ DeviceType.Camera, method(object({ deviceId: number() }), RecordingOnboardOptionsSchema), method(object({
32162
+ deviceId: number(),
32163
+ settings: RecordingOnboardPatchSchema
32164
+ }), _void(), {
32165
+ kind: "mutation",
32166
+ auth: "admin"
32167
+ });
32168
+ /**
31789
32169
  * A camera's own "record me NOW" LEVEL — a signal the device raises while
31790
32170
  * something it knows about is happening (a robot vacuum cleaning, a machine
31791
32171
  * running, a gate open) and lowers when it stops.
@@ -37079,24 +37459,6 @@ Object.freeze({
37079
37459
  addonId: null,
37080
37460
  access: "view"
37081
37461
  },
37082
- "events.getEventClipUrl": {
37083
- capName: "events",
37084
- capScope: "device",
37085
- addonId: null,
37086
- access: "view"
37087
- },
37088
- "events.getEvents": {
37089
- capName: "events",
37090
- capScope: "device",
37091
- addonId: null,
37092
- access: "view"
37093
- },
37094
- "events.getEventThumbnail": {
37095
- capName: "events",
37096
- capScope: "device",
37097
- addonId: null,
37098
- access: "view"
37099
- },
37100
37462
  "faceGallery.assignFace": {
37101
37463
  capName: "face-gallery",
37102
37464
  capScope: "system",
@@ -38417,6 +38779,12 @@ Object.freeze({
38417
38779
  addonId: null,
38418
38780
  access: "view"
38419
38781
  },
38782
+ "notificationRules.getTemplateCatalog": {
38783
+ capName: "notification-rules",
38784
+ capScope: "system",
38785
+ addonId: null,
38786
+ access: "view"
38787
+ },
38420
38788
  "notificationRules.listDeviceMutes": {
38421
38789
  capName: "notification-rules",
38422
38790
  capScope: "system",
@@ -38435,6 +38803,12 @@ Object.freeze({
38435
38803
  addonId: null,
38436
38804
  access: "view"
38437
38805
  },
38806
+ "notificationRules.previewTemplate": {
38807
+ capName: "notification-rules",
38808
+ capScope: "system",
38809
+ addonId: null,
38810
+ access: "view"
38811
+ },
38438
38812
  "notificationRules.resolveArtifactUrl": {
38439
38813
  capName: "notification-rules",
38440
38814
  capScope: "system",
@@ -39971,224 +40345,236 @@ Object.freeze({
39971
40345
  addonId: null,
39972
40346
  access: "create"
39973
40347
  },
39974
- "recording.applyDeviceSettingsPatch": {
40348
+ "recording.getAvailability": {
39975
40349
  capName: "recording",
39976
- capScope: "system",
40350
+ capScope: "device",
39977
40351
  addonId: null,
39978
- access: "create"
40352
+ access: "view"
39979
40353
  },
39980
- "recording.cancelRelocateJob": {
40354
+ "recording.getDaysWithRecordings": {
39981
40355
  capName: "recording",
39982
- capScope: "system",
40356
+ capScope: "device",
39983
40357
  addonId: null,
39984
- access: "create"
40358
+ access: "view"
39985
40359
  },
39986
- "recording.cancelStorageMigrationMove": {
40360
+ "recording.getPlayback": {
39987
40361
  capName: "recording",
39988
- capScope: "system",
40362
+ capScope: "device",
39989
40363
  addonId: null,
39990
- access: "create"
40364
+ access: "view"
39991
40365
  },
39992
- "recording.deleteFootprint": {
40366
+ "recording.getPlaybackOptions": {
39993
40367
  capName: "recording",
39994
- capScope: "system",
40368
+ capScope: "device",
39995
40369
  addonId: null,
39996
- access: "delete"
40370
+ access: "view"
39997
40371
  },
39998
- "recording.getAvailability": {
40372
+ "recording.listSources": {
39999
40373
  capName: "recording",
40000
- capScope: "system",
40374
+ capScope: "device",
40001
40375
  addonId: null,
40002
40376
  access: "view"
40003
40377
  },
40004
- "recording.getAvailabilityBatch": {
40005
- capName: "recording",
40378
+ "recordingArchive.applyDeviceSettingsPatch": {
40379
+ capName: "recording-archive",
40006
40380
  capScope: "system",
40007
40381
  addonId: null,
40008
- access: "view"
40382
+ access: "create"
40009
40383
  },
40010
- "recording.getDaysWithRecordings": {
40011
- capName: "recording",
40384
+ "recordingArchive.cancelRelocateJob": {
40385
+ capName: "recording-archive",
40012
40386
  capScope: "system",
40013
40387
  addonId: null,
40014
- access: "view"
40388
+ access: "create"
40015
40389
  },
40016
- "recording.getDaysWithRecordingsBatch": {
40017
- capName: "recording",
40390
+ "recordingArchive.cancelStorageMigrationMove": {
40391
+ capName: "recording-archive",
40392
+ capScope: "system",
40393
+ addonId: null,
40394
+ access: "create"
40395
+ },
40396
+ "recordingArchive.deleteFootprint": {
40397
+ capName: "recording-archive",
40398
+ capScope: "system",
40399
+ addonId: null,
40400
+ access: "delete"
40401
+ },
40402
+ "recordingArchive.getAvailabilityBatch": {
40403
+ capName: "recording-archive",
40018
40404
  capScope: "system",
40019
40405
  addonId: null,
40020
40406
  access: "view"
40021
40407
  },
40022
- "recording.getDeviceConfig": {
40023
- capName: "recording",
40408
+ "recordingArchive.getDaysWithRecordingsBatch": {
40409
+ capName: "recording-archive",
40024
40410
  capScope: "system",
40025
40411
  addonId: null,
40026
40412
  access: "view"
40027
40413
  },
40028
- "recording.getDeviceLiveContribution": {
40029
- capName: "recording",
40414
+ "recordingArchive.getDeviceConfig": {
40415
+ capName: "recording-archive",
40030
40416
  capScope: "system",
40031
40417
  addonId: null,
40032
40418
  access: "view"
40033
40419
  },
40034
- "recording.getDeviceSettingsContribution": {
40035
- capName: "recording",
40420
+ "recordingArchive.getDeviceLiveContribution": {
40421
+ capName: "recording-archive",
40036
40422
  capScope: "system",
40037
40423
  addonId: null,
40038
40424
  access: "view"
40039
40425
  },
40040
- "recording.getPlacement": {
40041
- capName: "recording",
40426
+ "recordingArchive.getDeviceSettingsContribution": {
40427
+ capName: "recording-archive",
40042
40428
  capScope: "system",
40043
40429
  addonId: null,
40044
40430
  access: "view"
40045
40431
  },
40046
- "recording.getPlaybackManifest": {
40047
- capName: "recording",
40432
+ "recordingArchive.getPlacement": {
40433
+ capName: "recording-archive",
40048
40434
  capScope: "system",
40049
40435
  addonId: null,
40050
40436
  access: "view"
40051
40437
  },
40052
- "recording.getRelocateResidue": {
40053
- capName: "recording",
40438
+ "recordingArchive.getRelocateResidue": {
40439
+ capName: "recording-archive",
40054
40440
  capScope: "system",
40055
40441
  addonId: null,
40056
40442
  access: "view"
40057
40443
  },
40058
- "recording.getStatus": {
40059
- capName: "recording",
40444
+ "recordingArchive.getStatus": {
40445
+ capName: "recording-archive",
40060
40446
  capScope: "system",
40061
40447
  addonId: null,
40062
40448
  access: "view"
40063
40449
  },
40064
- "recording.getStorageMigrationMoveStatus": {
40065
- capName: "recording",
40450
+ "recordingArchive.getStorageMigrationMoveStatus": {
40451
+ capName: "recording-archive",
40066
40452
  capScope: "system",
40067
40453
  addonId: null,
40068
40454
  access: "view"
40069
40455
  },
40070
- "recording.getStorageUsage": {
40071
- capName: "recording",
40456
+ "recordingArchive.getStorageUsage": {
40457
+ capName: "recording-archive",
40072
40458
  capScope: "system",
40073
40459
  addonId: null,
40074
40460
  access: "view"
40075
40461
  },
40076
- "recording.listOpsLog": {
40077
- capName: "recording",
40462
+ "recordingArchive.listOpsLog": {
40463
+ capName: "recording-archive",
40078
40464
  capScope: "system",
40079
40465
  addonId: null,
40080
40466
  access: "view"
40081
40467
  },
40082
- "recording.listRelocateJobs": {
40083
- capName: "recording",
40468
+ "recordingArchive.listRelocateJobs": {
40469
+ capName: "recording-archive",
40084
40470
  capScope: "system",
40085
40471
  addonId: null,
40086
40472
  access: "view"
40087
40473
  },
40088
- "recording.locateSegment": {
40089
- capName: "recording",
40474
+ "recordingArchive.locateSegment": {
40475
+ capName: "recording-archive",
40090
40476
  capScope: "system",
40091
40477
  addonId: null,
40092
40478
  access: "view"
40093
40479
  },
40094
- "recording.pauseForStorageMigration": {
40095
- capName: "recording",
40480
+ "recordingArchive.pauseForStorageMigration": {
40481
+ capName: "recording-archive",
40096
40482
  capScope: "system",
40097
40483
  addonId: null,
40098
40484
  access: "create"
40099
40485
  },
40100
- "recording.planStorageRebalance": {
40101
- capName: "recording",
40486
+ "recordingArchive.planStorageRebalance": {
40487
+ capName: "recording-archive",
40102
40488
  capScope: "system",
40103
40489
  addonId: null,
40104
40490
  access: "view"
40105
40491
  },
40106
- "recording.pruneFootage": {
40107
- capName: "recording",
40492
+ "recordingArchive.pruneFootage": {
40493
+ capName: "recording-archive",
40108
40494
  capScope: "system",
40109
40495
  addonId: null,
40110
40496
  access: "create"
40111
40497
  },
40112
- "recording.readGopBytes": {
40113
- capName: "recording",
40498
+ "recordingArchive.readGopBytes": {
40499
+ capName: "recording-archive",
40114
40500
  capScope: "system",
40115
40501
  addonId: null,
40116
40502
  access: "view"
40117
40503
  },
40118
- "recording.readSegmentBytes": {
40119
- capName: "recording",
40504
+ "recordingArchive.readSegmentBytes": {
40505
+ capName: "recording-archive",
40120
40506
  capScope: "system",
40121
40507
  addonId: null,
40122
40508
  access: "view"
40123
40509
  },
40124
- "recording.readWindowBytes": {
40125
- capName: "recording",
40510
+ "recordingArchive.readWindowBytes": {
40511
+ capName: "recording-archive",
40126
40512
  capScope: "system",
40127
40513
  addonId: null,
40128
40514
  access: "view"
40129
40515
  },
40130
- "recording.reconcileLedgerAgainstDisk": {
40131
- capName: "recording",
40516
+ "recordingArchive.reconcileLedgerAgainstDisk": {
40517
+ capName: "recording-archive",
40132
40518
  capScope: "system",
40133
40519
  addonId: null,
40134
40520
  access: "create"
40135
40521
  },
40136
- "recording.refreshStorageLocationsForMigration": {
40137
- capName: "recording",
40522
+ "recordingArchive.refreshStorageLocationsForMigration": {
40523
+ capName: "recording-archive",
40138
40524
  capScope: "system",
40139
40525
  addonId: null,
40140
40526
  access: "create"
40141
40527
  },
40142
- "recording.relocateFootage": {
40143
- capName: "recording",
40528
+ "recordingArchive.relocateFootage": {
40529
+ capName: "recording-archive",
40144
40530
  capScope: "system",
40145
40531
  addonId: null,
40146
40532
  access: "create"
40147
40533
  },
40148
- "recording.renderClip": {
40149
- capName: "recording",
40534
+ "recordingArchive.renderClip": {
40535
+ capName: "recording-archive",
40150
40536
  capScope: "system",
40151
40537
  addonId: null,
40152
40538
  access: "create"
40153
40539
  },
40154
- "recording.renderGif": {
40155
- capName: "recording",
40540
+ "recordingArchive.renderGif": {
40541
+ capName: "recording-archive",
40156
40542
  capScope: "system",
40157
40543
  addonId: null,
40158
40544
  access: "create"
40159
40545
  },
40160
- "recording.rescanStorage": {
40161
- capName: "recording",
40546
+ "recordingArchive.rescanStorage": {
40547
+ capName: "recording-archive",
40162
40548
  capScope: "system",
40163
40549
  addonId: null,
40164
40550
  access: "create"
40165
40551
  },
40166
- "recording.resumeForStorageMigration": {
40167
- capName: "recording",
40552
+ "recordingArchive.resumeForStorageMigration": {
40553
+ capName: "recording-archive",
40168
40554
  capScope: "system",
40169
40555
  addonId: null,
40170
40556
  access: "create"
40171
40557
  },
40172
- "recording.setDeviceConfig": {
40173
- capName: "recording",
40558
+ "recordingArchive.setDeviceConfig": {
40559
+ capName: "recording-archive",
40174
40560
  capScope: "system",
40175
40561
  addonId: null,
40176
40562
  access: "create"
40177
40563
  },
40178
- "recording.setDevicePlacement": {
40179
- capName: "recording",
40564
+ "recordingArchive.setDevicePlacement": {
40565
+ capName: "recording-archive",
40180
40566
  capScope: "system",
40181
40567
  addonId: null,
40182
40568
  access: "create"
40183
40569
  },
40184
- "recording.startStorageMigrationMove": {
40185
- capName: "recording",
40570
+ "recordingArchive.startStorageMigrationMove": {
40571
+ capName: "recording-archive",
40186
40572
  capScope: "system",
40187
40573
  addonId: null,
40188
40574
  access: "create"
40189
40575
  },
40190
- "recording.startStorageRebalance": {
40191
- capName: "recording",
40576
+ "recordingArchive.startStorageRebalance": {
40577
+ capName: "recording-archive",
40192
40578
  capScope: "system",
40193
40579
  addonId: null,
40194
40580
  access: "create"
@@ -42493,21 +42879,6 @@ Object.freeze({
42493
42879
  form: "single",
42494
42880
  optional: false
42495
42881
  }],
42496
- "events.getEventClipUrl": [{
42497
- name: "deviceId",
42498
- form: "single",
42499
- optional: false
42500
- }],
42501
- "events.getEvents": [{
42502
- name: "deviceId",
42503
- form: "single",
42504
- optional: false
42505
- }],
42506
- "events.getEventThumbnail": [{
42507
- name: "deviceId",
42508
- form: "single",
42509
- optional: false
42510
- }],
42511
42882
  "faceGallery.getFaceByTrack": [{
42512
42883
  name: "deviceId",
42513
42884
  form: "single",
@@ -43426,107 +43797,117 @@ Object.freeze({
43426
43797
  form: "single",
43427
43798
  optional: false
43428
43799
  }],
43429
- "recording.deleteFootprint": [{
43800
+ "recording.getAvailability": [{
43430
43801
  name: "deviceId",
43431
43802
  form: "single",
43432
43803
  optional: false
43433
43804
  }],
43434
- "recording.getAvailability": [{
43805
+ "recording.getDaysWithRecordings": [{
43435
43806
  name: "deviceId",
43436
43807
  form: "single",
43437
43808
  optional: false
43438
43809
  }],
43439
- "recording.getAvailabilityBatch": [{
43440
- name: "deviceIds",
43441
- form: "array",
43810
+ "recording.getPlayback": [{
43811
+ name: "deviceId",
43812
+ form: "single",
43442
43813
  optional: false
43443
43814
  }],
43444
- "recording.getDaysWithRecordings": [{
43815
+ "recording.getPlaybackOptions": [{
43445
43816
  name: "deviceId",
43446
43817
  form: "single",
43447
43818
  optional: false
43448
43819
  }],
43449
- "recording.getDaysWithRecordingsBatch": [{
43450
- name: "deviceIds",
43451
- form: "array",
43820
+ "recording.listSources": [{
43821
+ name: "deviceId",
43822
+ form: "single",
43452
43823
  optional: false
43453
43824
  }],
43454
- "recording.getDeviceConfig": [{
43825
+ "recordingArchive.deleteFootprint": [{
43455
43826
  name: "deviceId",
43456
43827
  form: "single",
43457
43828
  optional: false
43458
43829
  }],
43459
- "recording.getPlaybackManifest": [{
43830
+ "recordingArchive.getAvailabilityBatch": [{
43831
+ name: "deviceIds",
43832
+ form: "array",
43833
+ optional: false
43834
+ }],
43835
+ "recordingArchive.getDaysWithRecordingsBatch": [{
43836
+ name: "deviceIds",
43837
+ form: "array",
43838
+ optional: false
43839
+ }],
43840
+ "recordingArchive.getDeviceConfig": [{
43460
43841
  name: "deviceId",
43461
43842
  form: "single",
43462
43843
  optional: false
43463
43844
  }],
43464
- "recording.listOpsLog": [{
43845
+ "recordingArchive.listOpsLog": [{
43465
43846
  name: "deviceId",
43466
43847
  form: "single",
43467
43848
  optional: true
43468
43849
  }],
43469
- "recording.locateSegment": [{
43850
+ "recordingArchive.locateSegment": [{
43470
43851
  name: "deviceId",
43471
43852
  form: "single",
43472
43853
  optional: false
43473
43854
  }],
43474
- "recording.pruneFootage": [{
43855
+ "recordingArchive.pruneFootage": [{
43475
43856
  name: "deviceId",
43476
43857
  form: "single",
43477
43858
  optional: false
43478
43859
  }],
43479
- "recording.readGopBytes": [{
43860
+ "recordingArchive.readGopBytes": [{
43480
43861
  name: "deviceId",
43481
43862
  form: "single",
43482
43863
  optional: false
43483
43864
  }],
43484
- "recording.readSegmentBytes": [{
43865
+ "recordingArchive.readSegmentBytes": [{
43485
43866
  name: "deviceId",
43486
43867
  form: "single",
43487
43868
  optional: false
43488
43869
  }],
43489
- "recording.readWindowBytes": [{
43870
+ "recordingArchive.readWindowBytes": [{
43490
43871
  name: "deviceId",
43491
43872
  form: "single",
43492
43873
  optional: false
43493
43874
  }],
43494
- "recording.reconcileLedgerAgainstDisk": [{
43875
+ "recordingArchive.reconcileLedgerAgainstDisk": [{
43495
43876
  name: "deviceId",
43496
43877
  form: "single",
43497
43878
  optional: true
43498
43879
  }],
43499
- "recording.relocateFootage": [{
43880
+ "recordingArchive.relocateFootage": [{
43500
43881
  name: "deviceId",
43501
43882
  form: "single",
43502
43883
  optional: true
43503
43884
  }],
43504
- "recording.renderClip": [{
43885
+ "recordingArchive.renderClip": [{
43505
43886
  name: "deviceId",
43506
43887
  form: "single",
43507
43888
  optional: false
43508
43889
  }],
43509
- "recording.renderGif": [{
43890
+ "recordingArchive.renderGif": [{
43510
43891
  name: "deviceId",
43511
43892
  form: "single",
43512
43893
  optional: false
43513
43894
  }],
43514
- "recording.rescanStorage": [{
43895
+ "recordingArchive.rescanStorage": [{
43515
43896
  name: "deviceId",
43516
43897
  form: "single",
43517
43898
  optional: false
43518
43899
  }],
43519
- "recording.setDeviceConfig": [{
43900
+ "recordingArchive.setDeviceConfig": [{
43520
43901
  name: "deviceId",
43521
43902
  form: "single",
43522
43903
  optional: false
43523
43904
  }],
43524
- "recording.setDevicePlacement": [{
43905
+ "recordingArchive.setDevicePlacement": [{
43525
43906
  name: "deviceId",
43526
43907
  form: "single",
43527
43908
  optional: false
43528
43909
  }],
43529
- "recording.startStorageMigrationMove": [{
43910
+ "recordingArchive.startStorageMigrationMove": [{
43530
43911
  name: "deviceId",
43531
43912
  form: "single",
43532
43913
  optional: true
@@ -43995,6 +44376,37 @@ var NC_AUDIO_DEFAULTS = {
43995
44376
  };
43996
44377
  new Set(["devices", "classes"]);
43997
44378
  NC_AUDIO_DEFAULTS.hitPercent, NC_AUDIO_DEFAULTS.samplingSeconds;
44379
+ var RULE_BODY_ONLY = ["body"];
44380
+ var RULE_TEXT = ["title", "body"];
44381
+ var BATTERY = ["device-battery-low", "device-battery-normal"];
44382
+ var CONSUMABLE = ["device-consumable-low", "device-consumable-normal"];
44383
+ var UPDATES = [
44384
+ "addon-update-available",
44385
+ "server-update-available",
44386
+ "wrapper-update-available"
44387
+ ];
44388
+ var PACKAGE_UPDATES = ["addon-update-available", "server-update-available"];
44389
+ var ALARM = [
44390
+ "alarm-triggered",
44391
+ "alarm-armed",
44392
+ "alarm-disarmed",
44393
+ "alarm-arming",
44394
+ "alarm-arm-refused"
44395
+ ];
44396
+ var COMBINED_ALARM = ["alarm-triggered"];
44397
+ var DEVICE_EVENTS = [
44398
+ "device-online",
44399
+ "device-offline",
44400
+ "device-disabled",
44401
+ "device-enabled",
44402
+ ...BATTERY,
44403
+ ...CONSUMABLE,
44404
+ "stream-online",
44405
+ "stream-offline",
44406
+ "detection-blind",
44407
+ ...ALARM
44408
+ ];
44409
+ [...DEVICE_EVENTS], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...COMBINED_ALARM], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_BODY_ONLY], [...RULE_TEXT], [...RULE_TEXT], [...DEVICE_EVENTS], [...RULE_TEXT], [...DEVICE_EVENTS], [...RULE_TEXT], [...BATTERY, ...CONSUMABLE], [...RULE_TEXT], [...CONSUMABLE], [...RULE_TEXT], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...UPDATES], [...RULE_TEXT], [...PACKAGE_UPDATES], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT], [...RULE_TEXT];
43998
44410
  /**
43999
44411
  * TimelapseRule — the STANDALONE scheduled timelapse producer's rule model.
44000
44412
  *