@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.js CHANGED
@@ -12,7 +12,7 @@ let _camstack_system_addon_utils = require("@camstack/system/addon-utils");
12
12
  let node_fs_promises = require("node:fs/promises");
13
13
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
14
14
  let node_child_process = require("node:child_process");
15
- //#region ../types/dist/event-category-zAv7pMUz.mjs
15
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
16
16
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
17
17
  EventCategory["SystemBoot"] = "system.boot";
18
18
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -207,6 +207,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
207
207
  EventCategory["ProcessCrashed"] = "process.crashed";
208
208
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
209
209
  EventCategory["ProcessRestarted"] = "process.restarted";
210
+ /**
211
+ * The SET of storage locations changed — one was created, edited, enabled,
212
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
213
+ *
214
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
215
+ * it must also converge on its own periodic path, because a dropped event
216
+ * must not leave a node writing to yesterday's disk set forever. It exists
217
+ * because there was NO signal at all — an operator who added a second
218
+ * recordings disk in the admin UI got nothing, and the recorder kept its
219
+ * resolved locations until something else happened to re-resolve them
220
+ * (D387). Payload `StorageLocationsChangedPayload`.
221
+ */
222
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
210
223
  EventCategory["RecordingStarted"] = "recording.started";
211
224
  EventCategory["RecordingStopped"] = "recording.stopped";
212
225
  EventCategory["RecordingError"] = "recording.error";
@@ -8739,6 +8752,21 @@ var StorageCleanupJobSchema = object({
8739
8752
  });
8740
8753
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8741
8754
  /**
8755
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8756
+ * alias below is `z.infer<>` of it, never a second spelling.
8757
+ */
8758
+ var StorageLocationModeSchema = _enum([
8759
+ "active",
8760
+ "readonly",
8761
+ "drain",
8762
+ "disabled"
8763
+ ]);
8764
+ _enum([
8765
+ "normal",
8766
+ "never",
8767
+ "drain"
8768
+ ]);
8769
+ /**
8742
8770
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8743
8771
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8744
8772
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8804,6 +8832,21 @@ var StorageLocationSchema = object({
8804
8832
  * stops existing rather than being re-derived on every read.
8805
8833
  */
8806
8834
  enabled: boolean().optional(),
8835
+ /**
8836
+ * THE state of this location (D385), and the only authority on what may be
8837
+ * written, read or evicted here. Interpreted in exactly one place —
8838
+ * `storage-location-mode.ts` — which also folds the legacy
8839
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8840
+ * ambiguous.
8841
+ *
8842
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8843
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8844
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8845
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8846
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8847
+ * either, so the two cannot disagree.
8848
+ */
8849
+ mode: StorageLocationModeSchema.optional(),
8807
8850
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8808
8851
  * for node-local locations it can reach) — never persisted, absent when the
8809
8852
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8811,11 +8854,46 @@ var StorageLocationSchema = object({
8811
8854
  totalBytes: number$1(),
8812
8855
  availableBytes: number$1()
8813
8856
  }).nullable().optional(),
8857
+ /**
8858
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8859
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8860
+ * never persisted, never a filesystem walk.
8861
+ *
8862
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8863
+ * location yet — nobody stores here, the owning addon is down, or the first
8864
+ * refresh has not completed. A UI must omit the segment rather than draw it
8865
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8866
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8867
+ * be spelled out loud instead of appearing by accident.
8868
+ *
8869
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8870
+ * about the whole figure rather than about its freshest part.
8871
+ */
8872
+ owned: object({
8873
+ bytes: number$1().int().nonnegative(),
8874
+ measuredAtMs: number$1().int().nonnegative()
8875
+ }).optional(),
8814
8876
  createdAt: number$1(),
8815
8877
  updatedAt: number$1()
8816
8878
  });
8817
8879
  object({ isDefault: boolean().optional() });
8818
8880
  /**
8881
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8882
+ *
8883
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8884
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8885
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8886
+ * operator learns not to believe the screen.
8887
+ */
8888
+ var StorageDrainProgressSchema = object({
8889
+ locationId: string(),
8890
+ startedAtMs: number$1(),
8891
+ startBytes: number$1(),
8892
+ bytesRemaining: number$1(),
8893
+ drained: boolean(),
8894
+ estimatedEmptyAtMs: number$1().nullable()
8895
+ });
8896
+ /**
8819
8897
  * Reference accepted by consumer-facing `api.storage.*` calls.
8820
8898
  * Either:
8821
8899
  * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
@@ -21870,7 +21948,7 @@ method(object({
21870
21948
  }), _void(), {
21871
21949
  kind: "mutation",
21872
21950
  auth: "admin"
21873
- }), method(object({ id: string() }), object({
21951
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21874
21952
  ok: boolean(),
21875
21953
  error: string().optional()
21876
21954
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21940,6 +22018,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21940
22018
  kind: "mutation",
21941
22019
  auth: "admin"
21942
22020
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22021
+ /**
22022
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22023
+ * location (D388).
22024
+ *
22025
+ * ## Why this is not `storage-evictable`
22026
+ *
22027
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22028
+ * not, in two ways that both matter and both bite hardest on the locations an
22029
+ * operator most wants a figure for:
22030
+ *
22031
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22032
+ * and `recordingsLow:default` deliberately share one root and evict as one
22033
+ * oldest-first pool, so both answer with the SAME combined total. As an
22034
+ * occupancy figure that double-counts the disk.
22035
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22036
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22037
+ * is retiring and staring at.
22038
+ *
22039
+ * So this is its own contract with its own quantity, and the quantity is
22040
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22041
+ * would ever be willing to delete it. A provider that can only answer
22042
+ * "evictable" must not register here — a number that silently means different
22043
+ * things per class is worse than no number.
22044
+ *
22045
+ * ## Absence is an answer
22046
+ *
22047
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22048
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22049
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22050
+ * consuming side has to be written out loud instead of appearing by accident.
22051
+ *
22052
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22053
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22054
+ */
22055
+ /** One provider's occupancy answer for one location. */
22056
+ var StorageOccupancyReportSchema = object({
22057
+ locationId: string(),
22058
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22059
+ * not net of what it is willing to delete. */
22060
+ ownedBytes: number$1().int().nonnegative(),
22061
+ /** When the provider last actually measured this. The orchestrator carries it
22062
+ * through so a UI can say how old the figure is instead of implying "now". */
22063
+ measuredAtMs: number$1().int().nonnegative()
22064
+ });
22065
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21943
22066
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21944
22067
  providerId: string().min(1),
21945
22068
  displayName: string().min(1),
@@ -23575,39 +23698,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23575
23698
  deviceId: number$1(),
23576
23699
  status: BatteryStatusSchema
23577
23700
  });
23578
- /**
23579
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23580
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23581
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23582
- * one Home Assistant projection.
23583
- */
23584
- var NetworkLinkStatusSchema = object({
23585
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23586
- type: _enum([
23587
- "wifi",
23588
- "ethernet",
23589
- "cellular",
23590
- "unknown"
23591
- ]),
23592
- /**
23593
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23594
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23595
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23596
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23597
- * SKIP a null rather than coerce it.
23598
- */
23599
- signalPercent: number$1().min(0).max(100).nullable(),
23600
- /** Raw received signal strength in dBm, when the firmware reports one. */
23601
- rssiDbm: number$1().optional(),
23602
- /** Network name of a wireless link, when the firmware reports it. */
23603
- ssid: string().optional(),
23604
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23605
- lastUpdated: number$1()
23606
- });
23607
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23608
- deviceId: number$1(),
23609
- status: NetworkLinkStatusSchema
23610
- });
23611
23701
  object({
23612
23702
  on: boolean(),
23613
23703
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25961,6 +26051,236 @@ DeviceType.Camera, method(object({
25961
26051
  detection: NativeDetectionSchema
25962
26052
  });
25963
26053
  /**
26054
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26055
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26056
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26057
+ *
26058
+ * Why a NEW cap rather than overloading `ptz`:
26059
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26060
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26061
+ * The two are different physical models: PTZ is absolute-position + presets,
26062
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26063
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26064
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26065
+ * the reverse:
26066
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26067
+ * / `getOptions`), and
26068
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26069
+ * robot camera shows up in the existing PTZ control path without every
26070
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26071
+ * not here (see the addon design note):
26072
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26073
+ * ptz.stop() → navigation.stop()
26074
+ * ptz.goHome() → navigation.runAction('goHome')
26075
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26076
+ * ptz.goToPreset(id) → navigation.runAction(id)
26077
+ *
26078
+ * ## Continuous drive
26079
+ *
26080
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26081
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26082
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26083
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26084
+ * coalesce them. The UI owns the cadence.
26085
+ *
26086
+ * ## The action dictionary
26087
+ *
26088
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26089
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26090
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26091
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26092
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26093
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26094
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26095
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26096
+ *
26097
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26098
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26099
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26100
+ * every device handle. A future nodedreame publish adds a typed
26101
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26102
+ * provider can then swap the raw calls for the typed methods with no change to
26103
+ * THIS contract.
26104
+ */
26105
+ /**
26106
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26107
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26108
+ * halts it.
26109
+ *
26110
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26111
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26112
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26113
+ * vector by it (drivers without proportional drive ignore it).
26114
+ *
26115
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26116
+ * axis alone; an all-undefined nudge is a no-op.
26117
+ */
26118
+ var NavigationMoveCommandSchema = object({
26119
+ pan: number$1().min(-1).max(1).optional(),
26120
+ tilt: number$1().min(-1).max(1).optional(),
26121
+ speed: number$1().min(0).max(1).optional()
26122
+ });
26123
+ /**
26124
+ * The enumerated discrete actions a navigation-capable robot can perform via
26125
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26126
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26127
+ * `playSound` (see the `sound` dictionary entries).
26128
+ */
26129
+ var NavigationActionIdSchema = _enum([
26130
+ "goHome",
26131
+ "locate",
26132
+ "spotClean",
26133
+ "findPet",
26134
+ "personFollow",
26135
+ "stop",
26136
+ "startClean",
26137
+ "pauseClean",
26138
+ "dockWash",
26139
+ "autoEmpty",
26140
+ "flashOn",
26141
+ "flashOff"
26142
+ ]);
26143
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26144
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26145
+ /**
26146
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26147
+ * native panel and the PTZ mimic render as a button.
26148
+ *
26149
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26150
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26151
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26152
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26153
+ * - `label` — operator-facing English label.
26154
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26155
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26156
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26157
+ * flips it from config, never by editing code.
26158
+ */
26159
+ var NavigationActionEntrySchema = object({
26160
+ id: string(),
26161
+ kind: NavigationEntryKindSchema,
26162
+ label: string(),
26163
+ icon: string(),
26164
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26165
+ soundId: number$1().int().optional(),
26166
+ /** Per-device feature flag — render this entry only when true. */
26167
+ enabled: boolean()
26168
+ });
26169
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26170
+ var NavigationPointSchema = object({
26171
+ x: number$1(),
26172
+ y: number$1()
26173
+ });
26174
+ /**
26175
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26176
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26177
+ * that are turned on for THIS device. Data-driven: the provider derives these
26178
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26179
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26180
+ * that are not dictionary entries.
26181
+ *
26182
+ * - `move` / `stop` — the momentary drive joystick.
26183
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26184
+ * map-coordinate plumbing is wired.
26185
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26186
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26187
+ * - `light` — the on/off fill-light toggle (works anytime).
26188
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26189
+ * camera-service control; needs an active stream).
26190
+ */
26191
+ var NavigationFeaturesSchema = object({
26192
+ move: boolean(),
26193
+ stop: boolean(),
26194
+ goToPoint: boolean(),
26195
+ runAction: boolean(),
26196
+ playSound: boolean(),
26197
+ light: boolean(),
26198
+ lightMode: boolean()
26199
+ });
26200
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26201
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26202
+ /**
26203
+ * Live navigation state so the UI can reflect what the robot is doing:
26204
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26205
+ * - `following` — person/pet follow is currently armed.
26206
+ * - `flash` — the on-camera fill light is on.
26207
+ * - `lightMode` — auto vs manual fill-light mode.
26208
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26209
+ * `lightMode === 'manual'`.
26210
+ */
26211
+ var NavigationStatusSchema = object({
26212
+ mode: _enum([
26213
+ "idle",
26214
+ "cleaning",
26215
+ "spot",
26216
+ "following",
26217
+ "goto",
26218
+ "returning",
26219
+ "paused",
26220
+ "unknown"
26221
+ ]),
26222
+ following: boolean(),
26223
+ flash: boolean(),
26224
+ lightMode: NavigationLightModeSchema,
26225
+ lightLevel: number$1().min(40).max(100),
26226
+ /** Ms epoch when the slice was last updated. */
26227
+ lastChangedAt: number$1()
26228
+ });
26229
+ NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
26230
+ 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({
26231
+ deviceId: number$1(),
26232
+ actionId: NavigationActionIdSchema
26233
+ }), _void(), { kind: "mutation" }), method(object({
26234
+ deviceId: number$1(),
26235
+ soundId: number$1().int()
26236
+ }), _void(), { kind: "mutation" }), method(object({
26237
+ deviceId: number$1(),
26238
+ on: boolean()
26239
+ }), _void(), { kind: "mutation" }), method(object({
26240
+ deviceId: number$1(),
26241
+ mode: NavigationLightModeSchema,
26242
+ level: number$1().min(40).max(100).optional()
26243
+ }), _void(), { kind: "mutation" }), method(object({
26244
+ deviceId: number$1(),
26245
+ level: number$1().min(40).max(100)
26246
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
26247
+ deviceId: number$1(),
26248
+ status: NavigationStatusSchema
26249
+ });
26250
+ /**
26251
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26252
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26253
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26254
+ * one Home Assistant projection.
26255
+ */
26256
+ var NetworkLinkStatusSchema = object({
26257
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26258
+ type: _enum([
26259
+ "wifi",
26260
+ "ethernet",
26261
+ "cellular",
26262
+ "unknown"
26263
+ ]),
26264
+ /**
26265
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26266
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26267
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26268
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26269
+ * SKIP a null rather than coerce it.
26270
+ */
26271
+ signalPercent: number$1().min(0).max(100).nullable(),
26272
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26273
+ rssiDbm: number$1().optional(),
26274
+ /** Network name of a wireless link, when the firmware reports it. */
26275
+ ssid: string().optional(),
26276
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26277
+ lastUpdated: number$1()
26278
+ });
26279
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26280
+ deviceId: number$1(),
26281
+ status: NetworkLinkStatusSchema
26282
+ });
26283
+ /**
25964
26284
  * network-quality — system-scoped singleton capability tracking RTT,
25965
26285
  * jitter, and observed/peak bandwidth per device + per client.
25966
26286
  *
@@ -27202,203 +27522,6 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), PtzAutotrackStatusSc
27202
27522
  deviceId: number$1(),
27203
27523
  status: PtzAutotrackStatusSchema
27204
27524
  });
27205
- /**
27206
- * `navigation` — a device-scoped capability that natively expresses the FULL
27207
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27208
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27209
- *
27210
- * Why a NEW cap rather than overloading `ptz`:
27211
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27212
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27213
- * The two are different physical models: PTZ is absolute-position + presets,
27214
- * navigation is momentary drive nudges + discrete robot ACTIONS
27215
- * (dock / spot-clean / follow-pet / go-to-point / …).
27216
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27217
- * the reverse:
27218
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27219
- * / `getOptions`), and
27220
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27221
- * robot camera shows up in the existing PTZ control path without every
27222
- * PTZ provider learning about robots. The mapping lives in the adapter,
27223
- * not here (see the addon design note):
27224
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27225
- * ptz.stop() → navigation.stop()
27226
- * ptz.goHome() → navigation.runAction('goHome')
27227
- * ptz.getPresets() → navigation.listActions() (id→preset)
27228
- * ptz.goToPreset(id) → navigation.runAction(id)
27229
- *
27230
- * ## Continuous drive
27231
- *
27232
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27233
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27234
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27235
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27236
- * coalesce them. The UI owns the cadence.
27237
- *
27238
- * ## The action dictionary
27239
- *
27240
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27241
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27242
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27243
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27244
- * vendor-specific list. `kind: 'action'` entries are triggered with
27245
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27246
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27247
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27248
- *
27249
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27250
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27251
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27252
- * every device handle. A future nodedreame publish adds a typed
27253
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27254
- * provider can then swap the raw calls for the typed methods with no change to
27255
- * THIS contract.
27256
- */
27257
- /**
27258
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27259
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27260
- * halts it.
27261
- *
27262
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27263
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27264
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27265
- * vector by it (drivers without proportional drive ignore it).
27266
- *
27267
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27268
- * axis alone; an all-undefined nudge is a no-op.
27269
- */
27270
- var NavigationMoveCommandSchema = object({
27271
- pan: number$1().min(-1).max(1).optional(),
27272
- tilt: number$1().min(-1).max(1).optional(),
27273
- speed: number$1().min(0).max(1).optional()
27274
- });
27275
- /**
27276
- * The enumerated discrete actions a navigation-capable robot can perform via
27277
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27278
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27279
- * `playSound` (see the `sound` dictionary entries).
27280
- */
27281
- var NavigationActionIdSchema = _enum([
27282
- "goHome",
27283
- "locate",
27284
- "spotClean",
27285
- "findPet",
27286
- "personFollow",
27287
- "stop",
27288
- "startClean",
27289
- "pauseClean",
27290
- "dockWash",
27291
- "autoEmpty",
27292
- "flashOn",
27293
- "flashOff"
27294
- ]);
27295
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27296
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27297
- /**
27298
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27299
- * native panel and the PTZ mimic render as a button.
27300
- *
27301
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27302
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27303
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27304
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27305
- * - `label` — operator-facing English label.
27306
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27307
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27308
- * PTZ render ONLY enabled entries. Data-driven: the provider
27309
- * flips it from config, never by editing code.
27310
- */
27311
- var NavigationActionEntrySchema = object({
27312
- id: string(),
27313
- kind: NavigationEntryKindSchema,
27314
- label: string(),
27315
- icon: string(),
27316
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27317
- soundId: number$1().int().optional(),
27318
- /** Per-device feature flag — render this entry only when true. */
27319
- enabled: boolean()
27320
- });
27321
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27322
- var NavigationPointSchema = object({
27323
- x: number$1(),
27324
- y: number$1()
27325
- });
27326
- /**
27327
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27328
- * The cap reports which are enabled so the UI / PTZ render only the controls
27329
- * that are turned on for THIS device. Data-driven: the provider derives these
27330
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27331
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27332
- * that are not dictionary entries.
27333
- *
27334
- * - `move` / `stop` — the momentary drive joystick.
27335
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27336
- * map-coordinate plumbing is wired.
27337
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27338
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27339
- * - `light` — the on/off fill-light toggle (works anytime).
27340
- * - `lightMode` — the auto/manual selector + manual level slider (a
27341
- * camera-service control; needs an active stream).
27342
- */
27343
- var NavigationFeaturesSchema = object({
27344
- move: boolean(),
27345
- stop: boolean(),
27346
- goToPoint: boolean(),
27347
- runAction: boolean(),
27348
- playSound: boolean(),
27349
- light: boolean(),
27350
- lightMode: boolean()
27351
- });
27352
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27353
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27354
- /**
27355
- * Live navigation state so the UI can reflect what the robot is doing:
27356
- * - `mode` — coarse activity (idle / cleaning / following / …).
27357
- * - `following` — person/pet follow is currently armed.
27358
- * - `flash` — the on-camera fill light is on.
27359
- * - `lightMode` — auto vs manual fill-light mode.
27360
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27361
- * `lightMode === 'manual'`.
27362
- */
27363
- var NavigationStatusSchema = object({
27364
- mode: _enum([
27365
- "idle",
27366
- "cleaning",
27367
- "spot",
27368
- "following",
27369
- "goto",
27370
- "returning",
27371
- "paused",
27372
- "unknown"
27373
- ]),
27374
- following: boolean(),
27375
- flash: boolean(),
27376
- lightMode: NavigationLightModeSchema,
27377
- lightLevel: number$1().min(40).max(100),
27378
- /** Ms epoch when the slice was last updated. */
27379
- lastChangedAt: number$1()
27380
- });
27381
- NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
27382
- 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({
27383
- deviceId: number$1(),
27384
- actionId: NavigationActionIdSchema
27385
- }), _void(), { kind: "mutation" }), method(object({
27386
- deviceId: number$1(),
27387
- soundId: number$1().int()
27388
- }), _void(), { kind: "mutation" }), method(object({
27389
- deviceId: number$1(),
27390
- on: boolean()
27391
- }), _void(), { kind: "mutation" }), method(object({
27392
- deviceId: number$1(),
27393
- mode: NavigationLightModeSchema,
27394
- level: number$1().min(40).max(100).optional()
27395
- }), _void(), { kind: "mutation" }), method(object({
27396
- deviceId: number$1(),
27397
- level: number$1().min(40).max(100)
27398
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
27399
- deviceId: number$1(),
27400
- status: NavigationStatusSchema
27401
- });
27402
27525
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number$1().int().nonnegative() }), object({ success: literal(true) }), {
27403
27526
  kind: "mutation",
27404
27527
  auth: "admin"
@@ -34713,6 +34836,12 @@ Object.freeze({
34713
34836
  addonId: null,
34714
34837
  access: "view"
34715
34838
  },
34839
+ "storage.listDrainProgress": {
34840
+ capName: "storage",
34841
+ capScope: "system",
34842
+ addonId: null,
34843
+ access: "view"
34844
+ },
34716
34845
  "storage.listLocationDeclarations": {
34717
34846
  capName: "storage",
34718
34847
  capScope: "system",
@@ -34857,6 +34986,12 @@ Object.freeze({
34857
34986
  addonId: null,
34858
34987
  access: "view"
34859
34988
  },
34989
+ "storageOccupancy.getOccupancy": {
34990
+ capName: "storage-occupancy",
34991
+ capScope: "system",
34992
+ addonId: null,
34993
+ access: "view"
34994
+ },
34860
34995
  "storageProvider.abortUpload": {
34861
34996
  capName: "storage-provider",
34862
34997
  capScope: "system",