@camstack/addon-provider-reolink 1.2.102 → 1.2.103

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 (3) hide show
  1. package/dist/addon.js +520 -385
  2. package/dist/addon.mjs +520 -385
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -25,7 +25,7 @@ let fs_promises = require("fs/promises");
25
25
  fs_promises = require_chunk.__toESM(fs_promises, 1);
26
26
  let node_os = require("node:os");
27
27
  node_os = require_chunk.__toESM(node_os);
28
- //#region ../types/dist/event-category-zAv7pMUz.mjs
28
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
29
29
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
30
30
  EventCategory["SystemBoot"] = "system.boot";
31
31
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -220,6 +220,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
220
220
  EventCategory["ProcessCrashed"] = "process.crashed";
221
221
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
222
222
  EventCategory["ProcessRestarted"] = "process.restarted";
223
+ /**
224
+ * The SET of storage locations changed — one was created, edited, enabled,
225
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
226
+ *
227
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
228
+ * it must also converge on its own periodic path, because a dropped event
229
+ * must not leave a node writing to yesterday's disk set forever. It exists
230
+ * because there was NO signal at all — an operator who added a second
231
+ * recordings disk in the admin UI got nothing, and the recorder kept its
232
+ * resolved locations until something else happened to re-resolve them
233
+ * (D387). Payload `StorageLocationsChangedPayload`.
234
+ */
235
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
223
236
  EventCategory["RecordingStarted"] = "recording.started";
224
237
  EventCategory["RecordingStopped"] = "recording.stopped";
225
238
  EventCategory["RecordingError"] = "recording.error";
@@ -8574,6 +8587,21 @@ var StorageCleanupJobSchema = object({
8574
8587
  });
8575
8588
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8576
8589
  /**
8590
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8591
+ * alias below is `z.infer<>` of it, never a second spelling.
8592
+ */
8593
+ var StorageLocationModeSchema = _enum([
8594
+ "active",
8595
+ "readonly",
8596
+ "drain",
8597
+ "disabled"
8598
+ ]);
8599
+ _enum([
8600
+ "normal",
8601
+ "never",
8602
+ "drain"
8603
+ ]);
8604
+ /**
8577
8605
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8578
8606
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8579
8607
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8639,6 +8667,21 @@ var StorageLocationSchema = object({
8639
8667
  * stops existing rather than being re-derived on every read.
8640
8668
  */
8641
8669
  enabled: boolean().optional(),
8670
+ /**
8671
+ * THE state of this location (D385), and the only authority on what may be
8672
+ * written, read or evicted here. Interpreted in exactly one place —
8673
+ * `storage-location-mode.ts` — which also folds the legacy
8674
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8675
+ * ambiguous.
8676
+ *
8677
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8678
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8679
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8680
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8681
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8682
+ * either, so the two cannot disagree.
8683
+ */
8684
+ mode: StorageLocationModeSchema.optional(),
8642
8685
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8643
8686
  * for node-local locations it can reach) — never persisted, absent when the
8644
8687
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8646,11 +8689,46 @@ var StorageLocationSchema = object({
8646
8689
  totalBytes: number(),
8647
8690
  availableBytes: number()
8648
8691
  }).nullable().optional(),
8692
+ /**
8693
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8694
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8695
+ * never persisted, never a filesystem walk.
8696
+ *
8697
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8698
+ * location yet — nobody stores here, the owning addon is down, or the first
8699
+ * refresh has not completed. A UI must omit the segment rather than draw it
8700
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8701
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8702
+ * be spelled out loud instead of appearing by accident.
8703
+ *
8704
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8705
+ * about the whole figure rather than about its freshest part.
8706
+ */
8707
+ owned: object({
8708
+ bytes: number().int().nonnegative(),
8709
+ measuredAtMs: number().int().nonnegative()
8710
+ }).optional(),
8649
8711
  createdAt: number(),
8650
8712
  updatedAt: number()
8651
8713
  });
8652
8714
  object({ isDefault: boolean().optional() });
8653
8715
  /**
8716
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8717
+ *
8718
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8719
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8720
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8721
+ * operator learns not to believe the screen.
8722
+ */
8723
+ var StorageDrainProgressSchema = object({
8724
+ locationId: string(),
8725
+ startedAtMs: number(),
8726
+ startBytes: number(),
8727
+ bytesRemaining: number(),
8728
+ drained: boolean(),
8729
+ estimatedEmptyAtMs: number().nullable()
8730
+ });
8731
+ /**
8654
8732
  * Reference accepted by consumer-facing `api.storage.*` calls.
8655
8733
  * Either:
8656
8734
  * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
@@ -22689,7 +22767,7 @@ method(object({
22689
22767
  }), _void(), {
22690
22768
  kind: "mutation",
22691
22769
  auth: "admin"
22692
- }), method(object({ id: string() }), object({
22770
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
22693
22771
  ok: boolean(),
22694
22772
  error: string().optional()
22695
22773
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -22759,6 +22837,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
22759
22837
  kind: "mutation",
22760
22838
  auth: "admin"
22761
22839
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22840
+ /**
22841
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22842
+ * location (D388).
22843
+ *
22844
+ * ## Why this is not `storage-evictable`
22845
+ *
22846
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22847
+ * not, in two ways that both matter and both bite hardest on the locations an
22848
+ * operator most wants a figure for:
22849
+ *
22850
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22851
+ * and `recordingsLow:default` deliberately share one root and evict as one
22852
+ * oldest-first pool, so both answer with the SAME combined total. As an
22853
+ * occupancy figure that double-counts the disk.
22854
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22855
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22856
+ * is retiring and staring at.
22857
+ *
22858
+ * So this is its own contract with its own quantity, and the quantity is
22859
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22860
+ * would ever be willing to delete it. A provider that can only answer
22861
+ * "evictable" must not register here — a number that silently means different
22862
+ * things per class is worse than no number.
22863
+ *
22864
+ * ## Absence is an answer
22865
+ *
22866
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22867
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22868
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22869
+ * consuming side has to be written out loud instead of appearing by accident.
22870
+ *
22871
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22872
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22873
+ */
22874
+ /** One provider's occupancy answer for one location. */
22875
+ var StorageOccupancyReportSchema = object({
22876
+ locationId: string(),
22877
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22878
+ * not net of what it is willing to delete. */
22879
+ ownedBytes: number().int().nonnegative(),
22880
+ /** When the provider last actually measured this. The orchestrator carries it
22881
+ * through so a UI can say how old the figure is instead of implying "now". */
22882
+ measuredAtMs: number().int().nonnegative()
22883
+ });
22884
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
22762
22885
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
22763
22886
  providerId: string().min(1),
22764
22887
  displayName: string().min(1),
@@ -24594,108 +24717,6 @@ onStatusChanged: { data: object({
24594
24717
  volatileStateFields: ["lastUpdated"]
24595
24718
  };
24596
24719
  /**
24597
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
24598
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
24599
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
24600
- * one Home Assistant projection.
24601
- */
24602
- var NetworkLinkStatusSchema = object({
24603
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
24604
- type: _enum([
24605
- "wifi",
24606
- "ethernet",
24607
- "cellular",
24608
- "unknown"
24609
- ]),
24610
- /**
24611
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
24612
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
24613
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
24614
- * one whose reading has not landed must not be drawn at 0 %. Consumers
24615
- * SKIP a null rather than coerce it.
24616
- */
24617
- signalPercent: number().min(0).max(100).nullable(),
24618
- /** Raw received signal strength in dBm, when the firmware reports one. */
24619
- rssiDbm: number().optional(),
24620
- /** Network name of a wireless link, when the firmware reports it. */
24621
- ssid: string().optional(),
24622
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
24623
- lastUpdated: number()
24624
- });
24625
- /** The slice a provider seeds before its first read: nothing is known yet. */
24626
- var NETWORK_LINK_UNKNOWN = {
24627
- type: "unknown",
24628
- signalPercent: null,
24629
- lastUpdated: 0
24630
- };
24631
- /**
24632
- * Normalise a signal the firmware reports as BARS (0..`maxBars`) to 0..100.
24633
- * Out-of-range or non-finite input is not a reading: `null`.
24634
- */
24635
- function signalPercentFromBars(bars, maxBars) {
24636
- if (bars === void 0 || !Number.isFinite(bars) || maxBars <= 0) return null;
24637
- if (bars < 0 || bars > maxBars) return null;
24638
- return Math.round(bars / maxBars * 100);
24639
- }
24640
- /**
24641
- * Normalise an RSSI in dBm to 0..100 on the usual wifi scale: -100 dBm and
24642
- * below is 0 %, -50 dBm and above is 100 %, linear between. Non-finite or
24643
- * positive input is not an RSSI: `null`.
24644
- */
24645
- function signalPercentFromRssi(rssiDbm) {
24646
- if (rssiDbm === void 0 || !Number.isFinite(rssiDbm) || rssiDbm > 0) return null;
24647
- return Math.round((Math.min(-50, Math.max(-100, rssiDbm)) + 100) * 2);
24648
- }
24649
- var networkLinkCapability = {
24650
- name: "network-link",
24651
- scope: "device",
24652
- deviceNative: true,
24653
- mode: "singleton",
24654
- deviceTypes: [
24655
- DeviceType.Camera,
24656
- DeviceType.Sensor,
24657
- DeviceType.Button,
24658
- DeviceType.Switch,
24659
- DeviceType.Light,
24660
- DeviceType.Lock,
24661
- DeviceType.Siren
24662
- ],
24663
- methods: {},
24664
- events: {
24665
- /**
24666
- * Emitted whenever the cached status changes (a link switch, a signal
24667
- * reading that moved). Mirrored on the parent chain by the
24668
- * DeviceEventPropagator like `battery.onStatusChanged`.
24669
- */
24670
- onStatusChanged: { data: object({
24671
- deviceId: number(),
24672
- status: NetworkLinkStatusSchema
24673
- }) } },
24674
- status: {
24675
- schema: NetworkLinkStatusSchema,
24676
- kind: "push",
24677
- empty: NETWORK_LINK_UNKNOWN
24678
- },
24679
- /**
24680
- * Runtime-state slice — every provider stores the same shape under
24681
- * `device.runtimeState['network-link']`, read once by the badge and the
24682
- * Home Assistant projector regardless of the driver.
24683
- */
24684
- runtimeState: NetworkLinkStatusSchema,
24685
- /**
24686
- * Runtime-state durability: **restored** — a link reading is slow to
24687
- * change and a sleeping battery camera may not report for hours; the
24688
- * restored slice is what the badge shows until the next read.
24689
- *
24690
- * See `RuntimeStateDurability`. Enforced by
24691
- * `scripts/check-runtime-state-durability.ts`.
24692
- */
24693
- durability: "restored",
24694
- /** Clock fields: written, but excluded from the compare that decides
24695
- * whether persisting is worth a SQLite commit. */
24696
- volatileStateFields: ["lastUpdated"]
24697
- };
24698
- /**
24699
24720
  * Generic boolean sensor — last-resort fallback when no domain-
24700
24721
  * specific binary cap fits (Home Assistant `binary_sensor` without a
24701
24722
  * known `device_class`, or a domain we haven't typed yet). Pure
@@ -28225,6 +28246,389 @@ var nativeObjectDetectionCapability = {
28225
28246
  volatileStateFields: ["lastFetchedAt"]
28226
28247
  };
28227
28248
  /**
28249
+ * `navigation` — a device-scoped capability that natively expresses the FULL
28250
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
28251
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
28252
+ *
28253
+ * Why a NEW cap rather than overloading `ptz`:
28254
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
28255
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
28256
+ * The two are different physical models: PTZ is absolute-position + presets,
28257
+ * navigation is momentary drive nudges + discrete robot ACTIONS
28258
+ * (dock / spot-clean / follow-pet / go-to-point / …).
28259
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
28260
+ * the reverse:
28261
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
28262
+ * / `getOptions`), and
28263
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
28264
+ * robot camera shows up in the existing PTZ control path without every
28265
+ * PTZ provider learning about robots. The mapping lives in the adapter,
28266
+ * not here (see the addon design note):
28267
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
28268
+ * ptz.stop() → navigation.stop()
28269
+ * ptz.goHome() → navigation.runAction('goHome')
28270
+ * ptz.getPresets() → navigation.listActions() (id→preset)
28271
+ * ptz.goToPreset(id) → navigation.runAction(id)
28272
+ *
28273
+ * ## Continuous drive
28274
+ *
28275
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
28276
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
28277
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
28278
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
28279
+ * coalesce them. The UI owns the cadence.
28280
+ *
28281
+ * ## The action dictionary
28282
+ *
28283
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
28284
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
28285
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
28286
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
28287
+ * vendor-specific list. `kind: 'action'` entries are triggered with
28288
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
28289
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
28290
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
28291
+ *
28292
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
28293
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
28294
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
28295
+ * every device handle. A future nodedreame publish adds a typed
28296
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
28297
+ * provider can then swap the raw calls for the typed methods with no change to
28298
+ * THIS contract.
28299
+ */
28300
+ /**
28301
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
28302
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
28303
+ * halts it.
28304
+ *
28305
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
28306
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
28307
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
28308
+ * vector by it (drivers without proportional drive ignore it).
28309
+ *
28310
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
28311
+ * axis alone; an all-undefined nudge is a no-op.
28312
+ */
28313
+ var NavigationMoveCommandSchema = object({
28314
+ pan: number().min(-1).max(1).optional(),
28315
+ tilt: number().min(-1).max(1).optional(),
28316
+ speed: number().min(0).max(1).optional()
28317
+ });
28318
+ /**
28319
+ * The enumerated discrete actions a navigation-capable robot can perform via
28320
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
28321
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
28322
+ * `playSound` (see the `sound` dictionary entries).
28323
+ */
28324
+ var NavigationActionIdSchema = _enum([
28325
+ "goHome",
28326
+ "locate",
28327
+ "spotClean",
28328
+ "findPet",
28329
+ "personFollow",
28330
+ "stop",
28331
+ "startClean",
28332
+ "pauseClean",
28333
+ "dockWash",
28334
+ "autoEmpty",
28335
+ "flashOn",
28336
+ "flashOff"
28337
+ ]);
28338
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
28339
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
28340
+ /**
28341
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
28342
+ * native panel and the PTZ mimic render as a button.
28343
+ *
28344
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
28345
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
28346
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
28347
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
28348
+ * - `label` — operator-facing English label.
28349
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
28350
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
28351
+ * PTZ render ONLY enabled entries. Data-driven: the provider
28352
+ * flips it from config, never by editing code.
28353
+ */
28354
+ var NavigationActionEntrySchema = object({
28355
+ id: string(),
28356
+ kind: NavigationEntryKindSchema,
28357
+ label: string(),
28358
+ icon: string(),
28359
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
28360
+ soundId: number().int().optional(),
28361
+ /** Per-device feature flag — render this entry only when true. */
28362
+ enabled: boolean()
28363
+ });
28364
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
28365
+ var NavigationPointSchema = object({
28366
+ x: number(),
28367
+ y: number()
28368
+ });
28369
+ /**
28370
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
28371
+ * The cap reports which are enabled so the UI / PTZ render only the controls
28372
+ * that are turned on for THIS device. Data-driven: the provider derives these
28373
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
28374
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
28375
+ * that are not dictionary entries.
28376
+ *
28377
+ * - `move` / `stop` — the momentary drive joystick.
28378
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
28379
+ * map-coordinate plumbing is wired.
28380
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
28381
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
28382
+ * - `light` — the on/off fill-light toggle (works anytime).
28383
+ * - `lightMode` — the auto/manual selector + manual level slider (a
28384
+ * camera-service control; needs an active stream).
28385
+ */
28386
+ var NavigationFeaturesSchema = object({
28387
+ move: boolean(),
28388
+ stop: boolean(),
28389
+ goToPoint: boolean(),
28390
+ runAction: boolean(),
28391
+ playSound: boolean(),
28392
+ light: boolean(),
28393
+ lightMode: boolean()
28394
+ });
28395
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
28396
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
28397
+ /**
28398
+ * Live navigation state so the UI can reflect what the robot is doing:
28399
+ * - `mode` — coarse activity (idle / cleaning / following / …).
28400
+ * - `following` — person/pet follow is currently armed.
28401
+ * - `flash` — the on-camera fill light is on.
28402
+ * - `lightMode` — auto vs manual fill-light mode.
28403
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
28404
+ * `lightMode === 'manual'`.
28405
+ */
28406
+ var NavigationStatusSchema = object({
28407
+ mode: _enum([
28408
+ "idle",
28409
+ "cleaning",
28410
+ "spot",
28411
+ "following",
28412
+ "goto",
28413
+ "returning",
28414
+ "paused",
28415
+ "unknown"
28416
+ ]),
28417
+ following: boolean(),
28418
+ flash: boolean(),
28419
+ lightMode: NavigationLightModeSchema,
28420
+ lightLevel: number().min(40).max(100),
28421
+ /** Ms epoch when the slice was last updated. */
28422
+ lastChangedAt: number()
28423
+ });
28424
+ /**
28425
+ * Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
28426
+ * observable). Adds `lastFetchedAt` on top of the status shape per the
28427
+ * convention.
28428
+ */
28429
+ var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
28430
+ var navigationCapability = {
28431
+ name: "navigation",
28432
+ scope: "device",
28433
+ deviceNative: true,
28434
+ mode: "singleton",
28435
+ deviceTypes: [DeviceType.Camera],
28436
+ deviceConfig: { ui: {
28437
+ kind: "widget",
28438
+ widgetId: "host/navigation-panel",
28439
+ tab: "navigation",
28440
+ topTab: true,
28441
+ label: "Navigation",
28442
+ order: 0
28443
+ } },
28444
+ methods: {
28445
+ /**
28446
+ * Momentary drive nudge (the robot moves). `protected` — mirrors
28447
+ * `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
28448
+ * path) works for any authenticated user, not admin-only. The UI sends
28449
+ * these at ~1 Hz while a control is held; the provider forwards each one to
28450
+ * a single drive write WITHOUT debouncing.
28451
+ */
28452
+ move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
28453
+ /** Halt all motion immediately (zero drive vector). */
28454
+ stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
28455
+ /** Send the robot to a point on its live map. */
28456
+ goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
28457
+ /**
28458
+ * Enumerate the discrete controls THIS device supports (data-driven UI +
28459
+ * PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
28460
+ */
28461
+ listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
28462
+ /**
28463
+ * Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
28464
+ * unsupported action ids are rejected by the provider.
28465
+ */
28466
+ runAction: method(object({
28467
+ deviceId: number(),
28468
+ actionId: NavigationActionIdSchema
28469
+ }), _void(), { kind: "mutation" }),
28470
+ /** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
28471
+ playSound: method(object({
28472
+ deviceId: number(),
28473
+ soundId: number().int()
28474
+ }), _void(), { kind: "mutation" }),
28475
+ /**
28476
+ * Turn the on-camera fill light on / off (the `OpenFullLight` control —
28477
+ * works anytime, no active stream required).
28478
+ */
28479
+ setLightOn: method(object({
28480
+ deviceId: number(),
28481
+ on: boolean()
28482
+ }), _void(), { kind: "mutation" }),
28483
+ /**
28484
+ * Set the fill-light mode (auto vs manual). `manual` optionally carries the
28485
+ * initial `level`. The auto/manual + level control is a CAMERA-service
28486
+ * action that generally needs an active camera stream/monitor session — the
28487
+ * UI shows the manual level slider ONLY when `mode === 'manual'`.
28488
+ */
28489
+ setLightMode: method(object({
28490
+ deviceId: number(),
28491
+ mode: NavigationLightModeSchema,
28492
+ level: number().min(40).max(100).optional()
28493
+ }), _void(), { kind: "mutation" }),
28494
+ /** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
28495
+ setLightLevel: method(object({
28496
+ deviceId: number(),
28497
+ level: number().min(40).max(100)
28498
+ }), _void(), { kind: "mutation" }),
28499
+ /**
28500
+ * Per-device FEATURE-FLAG report for the general primitives — drives which
28501
+ * controls the UI shows (the per-entry flags for the dictionary come back on
28502
+ * `listActions`).
28503
+ */
28504
+ getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
28505
+ },
28506
+ events: { onStatusChanged: { data: object({
28507
+ deviceId: number(),
28508
+ status: NavigationStatusSchema
28509
+ }) } },
28510
+ status: {
28511
+ schema: NavigationStatusSchema,
28512
+ kind: "push"
28513
+ },
28514
+ /**
28515
+ * Runtime-state slice mirrored by the kernel. The navigation panel watches it
28516
+ * for live mode / follow / flash changes.
28517
+ */
28518
+ runtimeState: NavigationRuntimeStateSchema,
28519
+ /**
28520
+ * Runtime-state durability: **session** — like `vacuum-control`, a restored
28521
+ * `mode: cleaning` / `following: true` is a robot that is not actually doing
28522
+ * that. The live handle re-publishes on connect.
28523
+ *
28524
+ * See `RuntimeStateDurability`. Enforced by
28525
+ * `scripts/check-runtime-state-durability.ts`.
28526
+ */
28527
+ durability: "session"
28528
+ };
28529
+ /**
28530
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
28531
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
28532
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
28533
+ * one Home Assistant projection.
28534
+ */
28535
+ var NetworkLinkStatusSchema = object({
28536
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
28537
+ type: _enum([
28538
+ "wifi",
28539
+ "ethernet",
28540
+ "cellular",
28541
+ "unknown"
28542
+ ]),
28543
+ /**
28544
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
28545
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
28546
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
28547
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
28548
+ * SKIP a null rather than coerce it.
28549
+ */
28550
+ signalPercent: number().min(0).max(100).nullable(),
28551
+ /** Raw received signal strength in dBm, when the firmware reports one. */
28552
+ rssiDbm: number().optional(),
28553
+ /** Network name of a wireless link, when the firmware reports it. */
28554
+ ssid: string().optional(),
28555
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
28556
+ lastUpdated: number()
28557
+ });
28558
+ /** The slice a provider seeds before its first read: nothing is known yet. */
28559
+ var NETWORK_LINK_UNKNOWN = {
28560
+ type: "unknown",
28561
+ signalPercent: null,
28562
+ lastUpdated: 0
28563
+ };
28564
+ /**
28565
+ * Normalise a signal the firmware reports as BARS (0..`maxBars`) to 0..100.
28566
+ * Out-of-range or non-finite input is not a reading: `null`.
28567
+ */
28568
+ function signalPercentFromBars(bars, maxBars) {
28569
+ if (bars === void 0 || !Number.isFinite(bars) || maxBars <= 0) return null;
28570
+ if (bars < 0 || bars > maxBars) return null;
28571
+ return Math.round(bars / maxBars * 100);
28572
+ }
28573
+ /**
28574
+ * Normalise an RSSI in dBm to 0..100 on the usual wifi scale: -100 dBm and
28575
+ * below is 0 %, -50 dBm and above is 100 %, linear between. Non-finite or
28576
+ * positive input is not an RSSI: `null`.
28577
+ */
28578
+ function signalPercentFromRssi(rssiDbm) {
28579
+ if (rssiDbm === void 0 || !Number.isFinite(rssiDbm) || rssiDbm > 0) return null;
28580
+ return Math.round((Math.min(-50, Math.max(-100, rssiDbm)) + 100) * 2);
28581
+ }
28582
+ var networkLinkCapability = {
28583
+ name: "network-link",
28584
+ scope: "device",
28585
+ deviceNative: true,
28586
+ mode: "singleton",
28587
+ deviceTypes: [
28588
+ DeviceType.Camera,
28589
+ DeviceType.Sensor,
28590
+ DeviceType.Button,
28591
+ DeviceType.Switch,
28592
+ DeviceType.Light,
28593
+ DeviceType.Lock,
28594
+ DeviceType.Siren
28595
+ ],
28596
+ methods: {},
28597
+ events: {
28598
+ /**
28599
+ * Emitted whenever the cached status changes (a link switch, a signal
28600
+ * reading that moved). Mirrored on the parent chain by the
28601
+ * DeviceEventPropagator like `battery.onStatusChanged`.
28602
+ */
28603
+ onStatusChanged: { data: object({
28604
+ deviceId: number(),
28605
+ status: NetworkLinkStatusSchema
28606
+ }) } },
28607
+ status: {
28608
+ schema: NetworkLinkStatusSchema,
28609
+ kind: "push",
28610
+ empty: NETWORK_LINK_UNKNOWN
28611
+ },
28612
+ /**
28613
+ * Runtime-state slice — every provider stores the same shape under
28614
+ * `device.runtimeState['network-link']`, read once by the badge and the
28615
+ * Home Assistant projector regardless of the driver.
28616
+ */
28617
+ runtimeState: NetworkLinkStatusSchema,
28618
+ /**
28619
+ * Runtime-state durability: **restored** — a link reading is slow to
28620
+ * change and a sleeping battery camera may not report for hours; the
28621
+ * restored slice is what the badge shows until the next read.
28622
+ *
28623
+ * See `RuntimeStateDurability`. Enforced by
28624
+ * `scripts/check-runtime-state-durability.ts`.
28625
+ */
28626
+ durability: "restored",
28627
+ /** Clock fields: written, but excluded from the compare that decides
28628
+ * whether persisting is worth a SQLite commit. */
28629
+ volatileStateFields: ["lastUpdated"]
28630
+ };
28631
+ /**
28228
28632
  * network-quality — system-scoped singleton capability tracking RTT,
28229
28633
  * jitter, and observed/peak bandwidth per device + per client.
28230
28634
  *
@@ -29868,287 +30272,6 @@ var ptzAutotrackCapability = {
29868
30272
  durability: "session"
29869
30273
  };
29870
30274
  /**
29871
- * `navigation` — a device-scoped capability that natively expresses the FULL
29872
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
29873
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
29874
- *
29875
- * Why a NEW cap rather than overloading `ptz`:
29876
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
29877
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
29878
- * The two are different physical models: PTZ is absolute-position + presets,
29879
- * navigation is momentary drive nudges + discrete robot ACTIONS
29880
- * (dock / spot-clean / follow-pet / go-to-point / …).
29881
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
29882
- * the reverse:
29883
- * 1. a native CamStack navigation panel (data-driven from `listActions`
29884
- * / `getOptions`), and
29885
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
29886
- * robot camera shows up in the existing PTZ control path without every
29887
- * PTZ provider learning about robots. The mapping lives in the adapter,
29888
- * not here (see the addon design note):
29889
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
29890
- * ptz.stop() → navigation.stop()
29891
- * ptz.goHome() → navigation.runAction('goHome')
29892
- * ptz.getPresets() → navigation.listActions() (id→preset)
29893
- * ptz.goToPreset(id) → navigation.runAction(id)
29894
- *
29895
- * ## Continuous drive
29896
- *
29897
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
29898
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
29899
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
29900
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
29901
- * coalesce them. The UI owns the cadence.
29902
- *
29903
- * ## The action dictionary
29904
- *
29905
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
29906
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
29907
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
29908
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
29909
- * vendor-specific list. `kind: 'action'` entries are triggered with
29910
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
29911
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
29912
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
29913
- *
29914
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
29915
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
29916
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
29917
- * every device handle. A future nodedreame publish adds a typed
29918
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
29919
- * provider can then swap the raw calls for the typed methods with no change to
29920
- * THIS contract.
29921
- */
29922
- /**
29923
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
29924
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
29925
- * halts it.
29926
- *
29927
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
29928
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
29929
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
29930
- * vector by it (drivers without proportional drive ignore it).
29931
- *
29932
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
29933
- * axis alone; an all-undefined nudge is a no-op.
29934
- */
29935
- var NavigationMoveCommandSchema = object({
29936
- pan: number().min(-1).max(1).optional(),
29937
- tilt: number().min(-1).max(1).optional(),
29938
- speed: number().min(0).max(1).optional()
29939
- });
29940
- /**
29941
- * The enumerated discrete actions a navigation-capable robot can perform via
29942
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
29943
- * subset it supports through `listActions`. Sounds are NOT here — they go through
29944
- * `playSound` (see the `sound` dictionary entries).
29945
- */
29946
- var NavigationActionIdSchema = _enum([
29947
- "goHome",
29948
- "locate",
29949
- "spotClean",
29950
- "findPet",
29951
- "personFollow",
29952
- "stop",
29953
- "startClean",
29954
- "pauseClean",
29955
- "dockWash",
29956
- "autoEmpty",
29957
- "flashOn",
29958
- "flashOff"
29959
- ]);
29960
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
29961
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
29962
- /**
29963
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
29964
- * native panel and the PTZ mimic render as a button.
29965
- *
29966
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
29967
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
29968
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
29969
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
29970
- * - `label` — operator-facing English label.
29971
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
29972
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
29973
- * PTZ render ONLY enabled entries. Data-driven: the provider
29974
- * flips it from config, never by editing code.
29975
- */
29976
- var NavigationActionEntrySchema = object({
29977
- id: string(),
29978
- kind: NavigationEntryKindSchema,
29979
- label: string(),
29980
- icon: string(),
29981
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
29982
- soundId: number().int().optional(),
29983
- /** Per-device feature flag — render this entry only when true. */
29984
- enabled: boolean()
29985
- });
29986
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
29987
- var NavigationPointSchema = object({
29988
- x: number(),
29989
- y: number()
29990
- });
29991
- /**
29992
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
29993
- * The cap reports which are enabled so the UI / PTZ render only the controls
29994
- * that are turned on for THIS device. Data-driven: the provider derives these
29995
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
29996
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
29997
- * that are not dictionary entries.
29998
- *
29999
- * - `move` / `stop` — the momentary drive joystick.
30000
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
30001
- * map-coordinate plumbing is wired.
30002
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
30003
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
30004
- * - `light` — the on/off fill-light toggle (works anytime).
30005
- * - `lightMode` — the auto/manual selector + manual level slider (a
30006
- * camera-service control; needs an active stream).
30007
- */
30008
- var NavigationFeaturesSchema = object({
30009
- move: boolean(),
30010
- stop: boolean(),
30011
- goToPoint: boolean(),
30012
- runAction: boolean(),
30013
- playSound: boolean(),
30014
- light: boolean(),
30015
- lightMode: boolean()
30016
- });
30017
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
30018
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
30019
- /**
30020
- * Live navigation state so the UI can reflect what the robot is doing:
30021
- * - `mode` — coarse activity (idle / cleaning / following / …).
30022
- * - `following` — person/pet follow is currently armed.
30023
- * - `flash` — the on-camera fill light is on.
30024
- * - `lightMode` — auto vs manual fill-light mode.
30025
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
30026
- * `lightMode === 'manual'`.
30027
- */
30028
- var NavigationStatusSchema = object({
30029
- mode: _enum([
30030
- "idle",
30031
- "cleaning",
30032
- "spot",
30033
- "following",
30034
- "goto",
30035
- "returning",
30036
- "paused",
30037
- "unknown"
30038
- ]),
30039
- following: boolean(),
30040
- flash: boolean(),
30041
- lightMode: NavigationLightModeSchema,
30042
- lightLevel: number().min(40).max(100),
30043
- /** Ms epoch when the slice was last updated. */
30044
- lastChangedAt: number()
30045
- });
30046
- /**
30047
- * Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
30048
- * observable). Adds `lastFetchedAt` on top of the status shape per the
30049
- * convention.
30050
- */
30051
- var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
30052
- var navigationCapability = {
30053
- name: "navigation",
30054
- scope: "device",
30055
- deviceNative: true,
30056
- mode: "singleton",
30057
- deviceTypes: [DeviceType.Camera],
30058
- deviceConfig: { ui: {
30059
- kind: "widget",
30060
- widgetId: "host/navigation-panel",
30061
- tab: "navigation",
30062
- topTab: true,
30063
- label: "Navigation",
30064
- order: 0
30065
- } },
30066
- methods: {
30067
- /**
30068
- * Momentary drive nudge (the robot moves). `protected` — mirrors
30069
- * `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
30070
- * path) works for any authenticated user, not admin-only. The UI sends
30071
- * these at ~1 Hz while a control is held; the provider forwards each one to
30072
- * a single drive write WITHOUT debouncing.
30073
- */
30074
- move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
30075
- /** Halt all motion immediately (zero drive vector). */
30076
- stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
30077
- /** Send the robot to a point on its live map. */
30078
- goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
30079
- /**
30080
- * Enumerate the discrete controls THIS device supports (data-driven UI +
30081
- * PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
30082
- */
30083
- listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
30084
- /**
30085
- * Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
30086
- * unsupported action ids are rejected by the provider.
30087
- */
30088
- runAction: method(object({
30089
- deviceId: number(),
30090
- actionId: NavigationActionIdSchema
30091
- }), _void(), { kind: "mutation" }),
30092
- /** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
30093
- playSound: method(object({
30094
- deviceId: number(),
30095
- soundId: number().int()
30096
- }), _void(), { kind: "mutation" }),
30097
- /**
30098
- * Turn the on-camera fill light on / off (the `OpenFullLight` control —
30099
- * works anytime, no active stream required).
30100
- */
30101
- setLightOn: method(object({
30102
- deviceId: number(),
30103
- on: boolean()
30104
- }), _void(), { kind: "mutation" }),
30105
- /**
30106
- * Set the fill-light mode (auto vs manual). `manual` optionally carries the
30107
- * initial `level`. The auto/manual + level control is a CAMERA-service
30108
- * action that generally needs an active camera stream/monitor session — the
30109
- * UI shows the manual level slider ONLY when `mode === 'manual'`.
30110
- */
30111
- setLightMode: method(object({
30112
- deviceId: number(),
30113
- mode: NavigationLightModeSchema,
30114
- level: number().min(40).max(100).optional()
30115
- }), _void(), { kind: "mutation" }),
30116
- /** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
30117
- setLightLevel: method(object({
30118
- deviceId: number(),
30119
- level: number().min(40).max(100)
30120
- }), _void(), { kind: "mutation" }),
30121
- /**
30122
- * Per-device FEATURE-FLAG report for the general primitives — drives which
30123
- * controls the UI shows (the per-entry flags for the dictionary come back on
30124
- * `listActions`).
30125
- */
30126
- getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
30127
- },
30128
- events: { onStatusChanged: { data: object({
30129
- deviceId: number(),
30130
- status: NavigationStatusSchema
30131
- }) } },
30132
- status: {
30133
- schema: NavigationStatusSchema,
30134
- kind: "push"
30135
- },
30136
- /**
30137
- * Runtime-state slice mirrored by the kernel. The navigation panel watches it
30138
- * for live mode / follow / flash changes.
30139
- */
30140
- runtimeState: NavigationRuntimeStateSchema,
30141
- /**
30142
- * Runtime-state durability: **session** — like `vacuum-control`, a restored
30143
- * `mode: cleaning` / `following: true` is a robot that is not actually doing
30144
- * that. The live handle re-publishes on connect.
30145
- *
30146
- * See `RuntimeStateDurability`. Enforced by
30147
- * `scripts/check-runtime-state-durability.ts`.
30148
- */
30149
- durability: "session"
30150
- };
30151
- /**
30152
30275
  * reboot — device-scoped capability for "soft" device reboots (firmware
30153
30276
  * reboot via vendor protocol; cameras, NVRs, doorbells). Surfaces a
30154
30277
  * single mutation so the UI can offer a confirm-and-reboot button for
@@ -40011,6 +40134,12 @@ Object.freeze({
40011
40134
  addonId: null,
40012
40135
  access: "view"
40013
40136
  },
40137
+ "storage.listDrainProgress": {
40138
+ capName: "storage",
40139
+ capScope: "system",
40140
+ addonId: null,
40141
+ access: "view"
40142
+ },
40014
40143
  "storage.listLocationDeclarations": {
40015
40144
  capName: "storage",
40016
40145
  capScope: "system",
@@ -40155,6 +40284,12 @@ Object.freeze({
40155
40284
  addonId: null,
40156
40285
  access: "view"
40157
40286
  },
40287
+ "storageOccupancy.getOccupancy": {
40288
+ capName: "storage-occupancy",
40289
+ capScope: "system",
40290
+ addonId: null,
40291
+ access: "view"
40292
+ },
40158
40293
  "storageProvider.abortUpload": {
40159
40294
  capName: "storage-provider",
40160
40295
  capScope: "system",