@camstack/addon-ai 0.4.81 → 0.4.82

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 +367 -232
  2. package/dist/addon.mjs +367 -232
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -39,7 +39,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
  }) : target, mod));
40
40
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
41
41
  //#endregion
42
- //#region ../types/dist/event-category-zAv7pMUz.mjs
42
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
43
43
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
44
44
  EventCategory["SystemBoot"] = "system.boot";
45
45
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -234,6 +234,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
234
234
  EventCategory["ProcessCrashed"] = "process.crashed";
235
235
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
236
236
  EventCategory["ProcessRestarted"] = "process.restarted";
237
+ /**
238
+ * The SET of storage locations changed — one was created, edited, enabled,
239
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
240
+ *
241
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
242
+ * it must also converge on its own periodic path, because a dropped event
243
+ * must not leave a node writing to yesterday's disk set forever. It exists
244
+ * because there was NO signal at all — an operator who added a second
245
+ * recordings disk in the admin UI got nothing, and the recorder kept its
246
+ * resolved locations until something else happened to re-resolve them
247
+ * (D387). Payload `StorageLocationsChangedPayload`.
248
+ */
249
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
237
250
  EventCategory["RecordingStarted"] = "recording.started";
238
251
  EventCategory["RecordingStopped"] = "recording.stopped";
239
252
  EventCategory["RecordingError"] = "recording.error";
@@ -8766,6 +8779,21 @@ var StorageCleanupJobSchema = object({
8766
8779
  });
8767
8780
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8768
8781
  /**
8782
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8783
+ * alias below is `z.infer<>` of it, never a second spelling.
8784
+ */
8785
+ var StorageLocationModeSchema = _enum([
8786
+ "active",
8787
+ "readonly",
8788
+ "drain",
8789
+ "disabled"
8790
+ ]);
8791
+ _enum([
8792
+ "normal",
8793
+ "never",
8794
+ "drain"
8795
+ ]);
8796
+ /**
8769
8797
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8770
8798
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8771
8799
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8831,6 +8859,21 @@ var StorageLocationSchema = object({
8831
8859
  * stops existing rather than being re-derived on every read.
8832
8860
  */
8833
8861
  enabled: boolean().optional(),
8862
+ /**
8863
+ * THE state of this location (D385), and the only authority on what may be
8864
+ * written, read or evicted here. Interpreted in exactly one place —
8865
+ * `storage-location-mode.ts` — which also folds the legacy
8866
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8867
+ * ambiguous.
8868
+ *
8869
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8870
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8871
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8872
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8873
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8874
+ * either, so the two cannot disagree.
8875
+ */
8876
+ mode: StorageLocationModeSchema.optional(),
8834
8877
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8835
8878
  * for node-local locations it can reach) — never persisted, absent when the
8836
8879
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8838,11 +8881,46 @@ var StorageLocationSchema = object({
8838
8881
  totalBytes: number$1(),
8839
8882
  availableBytes: number$1()
8840
8883
  }).nullable().optional(),
8884
+ /**
8885
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8886
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8887
+ * never persisted, never a filesystem walk.
8888
+ *
8889
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8890
+ * location yet — nobody stores here, the owning addon is down, or the first
8891
+ * refresh has not completed. A UI must omit the segment rather than draw it
8892
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8893
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8894
+ * be spelled out loud instead of appearing by accident.
8895
+ *
8896
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8897
+ * about the whole figure rather than about its freshest part.
8898
+ */
8899
+ owned: object({
8900
+ bytes: number$1().int().nonnegative(),
8901
+ measuredAtMs: number$1().int().nonnegative()
8902
+ }).optional(),
8841
8903
  createdAt: number$1(),
8842
8904
  updatedAt: number$1()
8843
8905
  });
8844
8906
  object({ isDefault: boolean().optional() });
8845
8907
  /**
8908
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8909
+ *
8910
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8911
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8912
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8913
+ * operator learns not to believe the screen.
8914
+ */
8915
+ var StorageDrainProgressSchema = object({
8916
+ locationId: string(),
8917
+ startedAtMs: number$1(),
8918
+ startBytes: number$1(),
8919
+ bytesRemaining: number$1(),
8920
+ drained: boolean(),
8921
+ estimatedEmptyAtMs: number$1().nullable()
8922
+ });
8923
+ /**
8846
8924
  * Reference accepted by consumer-facing `api.storage.*` calls.
8847
8925
  * Either:
8848
8926
  * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
@@ -21897,7 +21975,7 @@ method(object({
21897
21975
  }), _void(), {
21898
21976
  kind: "mutation",
21899
21977
  auth: "admin"
21900
- }), method(object({ id: string() }), object({
21978
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21901
21979
  ok: boolean(),
21902
21980
  error: string().optional()
21903
21981
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21967,6 +22045,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21967
22045
  kind: "mutation",
21968
22046
  auth: "admin"
21969
22047
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22048
+ /**
22049
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22050
+ * location (D388).
22051
+ *
22052
+ * ## Why this is not `storage-evictable`
22053
+ *
22054
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22055
+ * not, in two ways that both matter and both bite hardest on the locations an
22056
+ * operator most wants a figure for:
22057
+ *
22058
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22059
+ * and `recordingsLow:default` deliberately share one root and evict as one
22060
+ * oldest-first pool, so both answer with the SAME combined total. As an
22061
+ * occupancy figure that double-counts the disk.
22062
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22063
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22064
+ * is retiring and staring at.
22065
+ *
22066
+ * So this is its own contract with its own quantity, and the quantity is
22067
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22068
+ * would ever be willing to delete it. A provider that can only answer
22069
+ * "evictable" must not register here — a number that silently means different
22070
+ * things per class is worse than no number.
22071
+ *
22072
+ * ## Absence is an answer
22073
+ *
22074
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22075
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22076
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22077
+ * consuming side has to be written out loud instead of appearing by accident.
22078
+ *
22079
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22080
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22081
+ */
22082
+ /** One provider's occupancy answer for one location. */
22083
+ var StorageOccupancyReportSchema = object({
22084
+ locationId: string(),
22085
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22086
+ * not net of what it is willing to delete. */
22087
+ ownedBytes: number$1().int().nonnegative(),
22088
+ /** When the provider last actually measured this. The orchestrator carries it
22089
+ * through so a UI can say how old the figure is instead of implying "now". */
22090
+ measuredAtMs: number$1().int().nonnegative()
22091
+ });
22092
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21970
22093
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21971
22094
  providerId: string().min(1),
21972
22095
  displayName: string().min(1),
@@ -23602,39 +23725,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23602
23725
  deviceId: number$1(),
23603
23726
  status: BatteryStatusSchema
23604
23727
  });
23605
- /**
23606
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23607
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23608
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23609
- * one Home Assistant projection.
23610
- */
23611
- var NetworkLinkStatusSchema = object({
23612
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23613
- type: _enum([
23614
- "wifi",
23615
- "ethernet",
23616
- "cellular",
23617
- "unknown"
23618
- ]),
23619
- /**
23620
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23621
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23622
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23623
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23624
- * SKIP a null rather than coerce it.
23625
- */
23626
- signalPercent: number$1().min(0).max(100).nullable(),
23627
- /** Raw received signal strength in dBm, when the firmware reports one. */
23628
- rssiDbm: number$1().optional(),
23629
- /** Network name of a wireless link, when the firmware reports it. */
23630
- ssid: string().optional(),
23631
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23632
- lastUpdated: number$1()
23633
- });
23634
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23635
- deviceId: number$1(),
23636
- status: NetworkLinkStatusSchema
23637
- });
23638
23728
  object({
23639
23729
  on: boolean(),
23640
23730
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25988,6 +26078,236 @@ DeviceType.Camera, method(object({
25988
26078
  detection: NativeDetectionSchema
25989
26079
  });
25990
26080
  /**
26081
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26082
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26083
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26084
+ *
26085
+ * Why a NEW cap rather than overloading `ptz`:
26086
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26087
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26088
+ * The two are different physical models: PTZ is absolute-position + presets,
26089
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26090
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26091
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26092
+ * the reverse:
26093
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26094
+ * / `getOptions`), and
26095
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26096
+ * robot camera shows up in the existing PTZ control path without every
26097
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26098
+ * not here (see the addon design note):
26099
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26100
+ * ptz.stop() → navigation.stop()
26101
+ * ptz.goHome() → navigation.runAction('goHome')
26102
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26103
+ * ptz.goToPreset(id) → navigation.runAction(id)
26104
+ *
26105
+ * ## Continuous drive
26106
+ *
26107
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26108
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26109
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26110
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26111
+ * coalesce them. The UI owns the cadence.
26112
+ *
26113
+ * ## The action dictionary
26114
+ *
26115
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26116
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26117
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26118
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26119
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26120
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26121
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26122
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26123
+ *
26124
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26125
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26126
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26127
+ * every device handle. A future nodedreame publish adds a typed
26128
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26129
+ * provider can then swap the raw calls for the typed methods with no change to
26130
+ * THIS contract.
26131
+ */
26132
+ /**
26133
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26134
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26135
+ * halts it.
26136
+ *
26137
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26138
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26139
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26140
+ * vector by it (drivers without proportional drive ignore it).
26141
+ *
26142
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26143
+ * axis alone; an all-undefined nudge is a no-op.
26144
+ */
26145
+ var NavigationMoveCommandSchema = object({
26146
+ pan: number$1().min(-1).max(1).optional(),
26147
+ tilt: number$1().min(-1).max(1).optional(),
26148
+ speed: number$1().min(0).max(1).optional()
26149
+ });
26150
+ /**
26151
+ * The enumerated discrete actions a navigation-capable robot can perform via
26152
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26153
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26154
+ * `playSound` (see the `sound` dictionary entries).
26155
+ */
26156
+ var NavigationActionIdSchema = _enum([
26157
+ "goHome",
26158
+ "locate",
26159
+ "spotClean",
26160
+ "findPet",
26161
+ "personFollow",
26162
+ "stop",
26163
+ "startClean",
26164
+ "pauseClean",
26165
+ "dockWash",
26166
+ "autoEmpty",
26167
+ "flashOn",
26168
+ "flashOff"
26169
+ ]);
26170
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26171
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26172
+ /**
26173
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26174
+ * native panel and the PTZ mimic render as a button.
26175
+ *
26176
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26177
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26178
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26179
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26180
+ * - `label` — operator-facing English label.
26181
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26182
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26183
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26184
+ * flips it from config, never by editing code.
26185
+ */
26186
+ var NavigationActionEntrySchema = object({
26187
+ id: string(),
26188
+ kind: NavigationEntryKindSchema,
26189
+ label: string(),
26190
+ icon: string(),
26191
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26192
+ soundId: number$1().int().optional(),
26193
+ /** Per-device feature flag — render this entry only when true. */
26194
+ enabled: boolean()
26195
+ });
26196
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26197
+ var NavigationPointSchema = object({
26198
+ x: number$1(),
26199
+ y: number$1()
26200
+ });
26201
+ /**
26202
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26203
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26204
+ * that are turned on for THIS device. Data-driven: the provider derives these
26205
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26206
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26207
+ * that are not dictionary entries.
26208
+ *
26209
+ * - `move` / `stop` — the momentary drive joystick.
26210
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26211
+ * map-coordinate plumbing is wired.
26212
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26213
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26214
+ * - `light` — the on/off fill-light toggle (works anytime).
26215
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26216
+ * camera-service control; needs an active stream).
26217
+ */
26218
+ var NavigationFeaturesSchema = object({
26219
+ move: boolean(),
26220
+ stop: boolean(),
26221
+ goToPoint: boolean(),
26222
+ runAction: boolean(),
26223
+ playSound: boolean(),
26224
+ light: boolean(),
26225
+ lightMode: boolean()
26226
+ });
26227
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26228
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26229
+ /**
26230
+ * Live navigation state so the UI can reflect what the robot is doing:
26231
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26232
+ * - `following` — person/pet follow is currently armed.
26233
+ * - `flash` — the on-camera fill light is on.
26234
+ * - `lightMode` — auto vs manual fill-light mode.
26235
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26236
+ * `lightMode === 'manual'`.
26237
+ */
26238
+ var NavigationStatusSchema = object({
26239
+ mode: _enum([
26240
+ "idle",
26241
+ "cleaning",
26242
+ "spot",
26243
+ "following",
26244
+ "goto",
26245
+ "returning",
26246
+ "paused",
26247
+ "unknown"
26248
+ ]),
26249
+ following: boolean(),
26250
+ flash: boolean(),
26251
+ lightMode: NavigationLightModeSchema,
26252
+ lightLevel: number$1().min(40).max(100),
26253
+ /** Ms epoch when the slice was last updated. */
26254
+ lastChangedAt: number$1()
26255
+ });
26256
+ NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
26257
+ DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), array(NavigationActionEntrySchema)), method(object({
26258
+ deviceId: number$1(),
26259
+ actionId: NavigationActionIdSchema
26260
+ }), _void(), { kind: "mutation" }), method(object({
26261
+ deviceId: number$1(),
26262
+ soundId: number$1().int()
26263
+ }), _void(), { kind: "mutation" }), method(object({
26264
+ deviceId: number$1(),
26265
+ on: boolean()
26266
+ }), _void(), { kind: "mutation" }), method(object({
26267
+ deviceId: number$1(),
26268
+ mode: NavigationLightModeSchema,
26269
+ level: number$1().min(40).max(100).optional()
26270
+ }), _void(), { kind: "mutation" }), method(object({
26271
+ deviceId: number$1(),
26272
+ level: number$1().min(40).max(100)
26273
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
26274
+ deviceId: number$1(),
26275
+ status: NavigationStatusSchema
26276
+ });
26277
+ /**
26278
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26279
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26280
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26281
+ * one Home Assistant projection.
26282
+ */
26283
+ var NetworkLinkStatusSchema = object({
26284
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26285
+ type: _enum([
26286
+ "wifi",
26287
+ "ethernet",
26288
+ "cellular",
26289
+ "unknown"
26290
+ ]),
26291
+ /**
26292
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26293
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26294
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26295
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26296
+ * SKIP a null rather than coerce it.
26297
+ */
26298
+ signalPercent: number$1().min(0).max(100).nullable(),
26299
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26300
+ rssiDbm: number$1().optional(),
26301
+ /** Network name of a wireless link, when the firmware reports it. */
26302
+ ssid: string().optional(),
26303
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26304
+ lastUpdated: number$1()
26305
+ });
26306
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26307
+ deviceId: number$1(),
26308
+ status: NetworkLinkStatusSchema
26309
+ });
26310
+ /**
25991
26311
  * network-quality — system-scoped singleton capability tracking RTT,
25992
26312
  * jitter, and observed/peak bandwidth per device + per client.
25993
26313
  *
@@ -27229,203 +27549,6 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), PtzAutotrackStatusSc
27229
27549
  deviceId: number$1(),
27230
27550
  status: PtzAutotrackStatusSchema
27231
27551
  });
27232
- /**
27233
- * `navigation` — a device-scoped capability that natively expresses the FULL
27234
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27235
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27236
- *
27237
- * Why a NEW cap rather than overloading `ptz`:
27238
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27239
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27240
- * The two are different physical models: PTZ is absolute-position + presets,
27241
- * navigation is momentary drive nudges + discrete robot ACTIONS
27242
- * (dock / spot-clean / follow-pet / go-to-point / …).
27243
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27244
- * the reverse:
27245
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27246
- * / `getOptions`), and
27247
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27248
- * robot camera shows up in the existing PTZ control path without every
27249
- * PTZ provider learning about robots. The mapping lives in the adapter,
27250
- * not here (see the addon design note):
27251
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27252
- * ptz.stop() → navigation.stop()
27253
- * ptz.goHome() → navigation.runAction('goHome')
27254
- * ptz.getPresets() → navigation.listActions() (id→preset)
27255
- * ptz.goToPreset(id) → navigation.runAction(id)
27256
- *
27257
- * ## Continuous drive
27258
- *
27259
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27260
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27261
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27262
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27263
- * coalesce them. The UI owns the cadence.
27264
- *
27265
- * ## The action dictionary
27266
- *
27267
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27268
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27269
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27270
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27271
- * vendor-specific list. `kind: 'action'` entries are triggered with
27272
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27273
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27274
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27275
- *
27276
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27277
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27278
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27279
- * every device handle. A future nodedreame publish adds a typed
27280
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27281
- * provider can then swap the raw calls for the typed methods with no change to
27282
- * THIS contract.
27283
- */
27284
- /**
27285
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27286
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27287
- * halts it.
27288
- *
27289
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27290
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27291
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27292
- * vector by it (drivers without proportional drive ignore it).
27293
- *
27294
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27295
- * axis alone; an all-undefined nudge is a no-op.
27296
- */
27297
- var NavigationMoveCommandSchema = object({
27298
- pan: number$1().min(-1).max(1).optional(),
27299
- tilt: number$1().min(-1).max(1).optional(),
27300
- speed: number$1().min(0).max(1).optional()
27301
- });
27302
- /**
27303
- * The enumerated discrete actions a navigation-capable robot can perform via
27304
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27305
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27306
- * `playSound` (see the `sound` dictionary entries).
27307
- */
27308
- var NavigationActionIdSchema = _enum([
27309
- "goHome",
27310
- "locate",
27311
- "spotClean",
27312
- "findPet",
27313
- "personFollow",
27314
- "stop",
27315
- "startClean",
27316
- "pauseClean",
27317
- "dockWash",
27318
- "autoEmpty",
27319
- "flashOn",
27320
- "flashOff"
27321
- ]);
27322
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27323
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27324
- /**
27325
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27326
- * native panel and the PTZ mimic render as a button.
27327
- *
27328
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27329
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27330
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27331
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27332
- * - `label` — operator-facing English label.
27333
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27334
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27335
- * PTZ render ONLY enabled entries. Data-driven: the provider
27336
- * flips it from config, never by editing code.
27337
- */
27338
- var NavigationActionEntrySchema = object({
27339
- id: string(),
27340
- kind: NavigationEntryKindSchema,
27341
- label: string(),
27342
- icon: string(),
27343
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27344
- soundId: number$1().int().optional(),
27345
- /** Per-device feature flag — render this entry only when true. */
27346
- enabled: boolean()
27347
- });
27348
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27349
- var NavigationPointSchema = object({
27350
- x: number$1(),
27351
- y: number$1()
27352
- });
27353
- /**
27354
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27355
- * The cap reports which are enabled so the UI / PTZ render only the controls
27356
- * that are turned on for THIS device. Data-driven: the provider derives these
27357
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27358
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27359
- * that are not dictionary entries.
27360
- *
27361
- * - `move` / `stop` — the momentary drive joystick.
27362
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27363
- * map-coordinate plumbing is wired.
27364
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27365
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27366
- * - `light` — the on/off fill-light toggle (works anytime).
27367
- * - `lightMode` — the auto/manual selector + manual level slider (a
27368
- * camera-service control; needs an active stream).
27369
- */
27370
- var NavigationFeaturesSchema = object({
27371
- move: boolean(),
27372
- stop: boolean(),
27373
- goToPoint: boolean(),
27374
- runAction: boolean(),
27375
- playSound: boolean(),
27376
- light: boolean(),
27377
- lightMode: boolean()
27378
- });
27379
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27380
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27381
- /**
27382
- * Live navigation state so the UI can reflect what the robot is doing:
27383
- * - `mode` — coarse activity (idle / cleaning / following / …).
27384
- * - `following` — person/pet follow is currently armed.
27385
- * - `flash` — the on-camera fill light is on.
27386
- * - `lightMode` — auto vs manual fill-light mode.
27387
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27388
- * `lightMode === 'manual'`.
27389
- */
27390
- var NavigationStatusSchema = object({
27391
- mode: _enum([
27392
- "idle",
27393
- "cleaning",
27394
- "spot",
27395
- "following",
27396
- "goto",
27397
- "returning",
27398
- "paused",
27399
- "unknown"
27400
- ]),
27401
- following: boolean(),
27402
- flash: boolean(),
27403
- lightMode: NavigationLightModeSchema,
27404
- lightLevel: number$1().min(40).max(100),
27405
- /** Ms epoch when the slice was last updated. */
27406
- lastChangedAt: number$1()
27407
- });
27408
- NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
27409
- DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), array(NavigationActionEntrySchema)), method(object({
27410
- deviceId: number$1(),
27411
- actionId: NavigationActionIdSchema
27412
- }), _void(), { kind: "mutation" }), method(object({
27413
- deviceId: number$1(),
27414
- soundId: number$1().int()
27415
- }), _void(), { kind: "mutation" }), method(object({
27416
- deviceId: number$1(),
27417
- on: boolean()
27418
- }), _void(), { kind: "mutation" }), method(object({
27419
- deviceId: number$1(),
27420
- mode: NavigationLightModeSchema,
27421
- level: number$1().min(40).max(100).optional()
27422
- }), _void(), { kind: "mutation" }), method(object({
27423
- deviceId: number$1(),
27424
- level: number$1().min(40).max(100)
27425
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
27426
- deviceId: number$1(),
27427
- status: NavigationStatusSchema
27428
- });
27429
27552
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number$1().int().nonnegative() }), object({ success: literal(true) }), {
27430
27553
  kind: "mutation",
27431
27554
  auth: "admin"
@@ -34740,6 +34863,12 @@ Object.freeze({
34740
34863
  addonId: null,
34741
34864
  access: "view"
34742
34865
  },
34866
+ "storage.listDrainProgress": {
34867
+ capName: "storage",
34868
+ capScope: "system",
34869
+ addonId: null,
34870
+ access: "view"
34871
+ },
34743
34872
  "storage.listLocationDeclarations": {
34744
34873
  capName: "storage",
34745
34874
  capScope: "system",
@@ -34884,6 +35013,12 @@ Object.freeze({
34884
35013
  addonId: null,
34885
35014
  access: "view"
34886
35015
  },
35016
+ "storageOccupancy.getOccupancy": {
35017
+ capName: "storage-occupancy",
35018
+ capScope: "system",
35019
+ addonId: null,
35020
+ access: "view"
35021
+ },
34887
35022
  "storageProvider.abortUpload": {
34888
35023
  capName: "storage-provider",
34889
35024
  capScope: "system",