@camstack/addon-provider-reolink 1.2.102 → 1.2.104

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