@camstack/addon-export-alexa 1.2.85 → 1.2.87

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.
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  //#endregion
27
27
  let node_crypto = require("node:crypto");
28
28
  node_crypto = __toESM(node_crypto);
29
- //#region ../types/dist/event-category-zAv7pMUz.mjs
29
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
30
30
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
31
31
  EventCategory["SystemBoot"] = "system.boot";
32
32
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -221,6 +221,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
221
221
  EventCategory["ProcessCrashed"] = "process.crashed";
222
222
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
223
223
  EventCategory["ProcessRestarted"] = "process.restarted";
224
+ /**
225
+ * The SET of storage locations changed — one was created, edited, enabled,
226
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
227
+ *
228
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
229
+ * it must also converge on its own periodic path, because a dropped event
230
+ * must not leave a node writing to yesterday's disk set forever. It exists
231
+ * because there was NO signal at all — an operator who added a second
232
+ * recordings disk in the admin UI got nothing, and the recorder kept its
233
+ * resolved locations until something else happened to re-resolve them
234
+ * (D387). Payload `StorageLocationsChangedPayload`.
235
+ */
236
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
224
237
  EventCategory["RecordingStarted"] = "recording.started";
225
238
  EventCategory["RecordingStopped"] = "recording.stopped";
226
239
  EventCategory["RecordingError"] = "recording.error";
@@ -8704,6 +8717,21 @@ var StorageCleanupJobSchema = object({
8704
8717
  });
8705
8718
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8706
8719
  /**
8720
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8721
+ * alias below is `z.infer<>` of it, never a second spelling.
8722
+ */
8723
+ var StorageLocationModeSchema = _enum([
8724
+ "active",
8725
+ "readonly",
8726
+ "drain",
8727
+ "disabled"
8728
+ ]);
8729
+ _enum([
8730
+ "normal",
8731
+ "never",
8732
+ "drain"
8733
+ ]);
8734
+ /**
8707
8735
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8708
8736
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8709
8737
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8769,6 +8797,21 @@ var StorageLocationSchema = object({
8769
8797
  * stops existing rather than being re-derived on every read.
8770
8798
  */
8771
8799
  enabled: boolean().optional(),
8800
+ /**
8801
+ * THE state of this location (D385), and the only authority on what may be
8802
+ * written, read or evicted here. Interpreted in exactly one place —
8803
+ * `storage-location-mode.ts` — which also folds the legacy
8804
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8805
+ * ambiguous.
8806
+ *
8807
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8808
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8809
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8810
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8811
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8812
+ * either, so the two cannot disagree.
8813
+ */
8814
+ mode: StorageLocationModeSchema.optional(),
8772
8815
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8773
8816
  * for node-local locations it can reach) — never persisted, absent when the
8774
8817
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8776,11 +8819,46 @@ var StorageLocationSchema = object({
8776
8819
  totalBytes: number(),
8777
8820
  availableBytes: number()
8778
8821
  }).nullable().optional(),
8822
+ /**
8823
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8824
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8825
+ * never persisted, never a filesystem walk.
8826
+ *
8827
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8828
+ * location yet — nobody stores here, the owning addon is down, or the first
8829
+ * refresh has not completed. A UI must omit the segment rather than draw it
8830
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8831
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8832
+ * be spelled out loud instead of appearing by accident.
8833
+ *
8834
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8835
+ * about the whole figure rather than about its freshest part.
8836
+ */
8837
+ owned: object({
8838
+ bytes: number().int().nonnegative(),
8839
+ measuredAtMs: number().int().nonnegative()
8840
+ }).optional(),
8779
8841
  createdAt: number(),
8780
8842
  updatedAt: number()
8781
8843
  });
8782
8844
  object({ isDefault: boolean().optional() });
8783
8845
  /**
8846
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8847
+ *
8848
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8849
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8850
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8851
+ * operator learns not to believe the screen.
8852
+ */
8853
+ var StorageDrainProgressSchema = object({
8854
+ locationId: string(),
8855
+ startedAtMs: number(),
8856
+ startBytes: number(),
8857
+ bytesRemaining: number(),
8858
+ drained: boolean(),
8859
+ estimatedEmptyAtMs: number().nullable()
8860
+ });
8861
+ /**
8784
8862
  * Reference accepted by consumer-facing `api.storage.*` calls.
8785
8863
  * Either:
8786
8864
  * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
@@ -20364,8 +20442,25 @@ var occupancyRecheckFramesField = {
20364
20442
  * (analyzer attaches detected `regions[]`; onboard does not — the
20365
20443
  * camera typically only reports a binary signal plus an optional
20366
20444
  * channel/AI class which lives in dedicated event channels).
20367
- */
20368
- var MotionSourceEnum = _enum(["onboard", "analyzer"]);
20445
+ *
20446
+ * - `onboard` — the camera's firmware said something moved.
20447
+ * - `analyzer` — this runner's frame-diff said so, and attaches `regions[]`.
20448
+ * - `device-activity` — the DEVICE said it is doing its job: the
20449
+ * `recording-signal` LEVEL the same device raises for the recorder
20450
+ * ([D380](../../../../docs/decisions/adr-0380-a-device-decided-recording-is-a-mode-with-no-schedule-seeded-once.md)),
20451
+ * republished as a motion source. It attaches **nothing** — no regions, no
20452
+ * class: the only fact it carries is that the device is active, and a robot
20453
+ * vacuum that is itself the moving object has no region worth sending. It is
20454
+ * a LEVEL, so unlike `onboard` it has a real falling edge, and unlike
20455
+ * `analyzer` it must not open the frame-diff side-channel — the runner's
20456
+ * `handleOnboardMotionAnalyzer` gate is `source === 'onboard'` and stays that
20457
+ * way ([D392](../../../../docs/decisions/adr-0392-a-device-that-says-it-is-working-is-a-motion-source-of-its-own.md)).
20458
+ */
20459
+ var MotionSourceEnum = _enum([
20460
+ "onboard",
20461
+ "analyzer",
20462
+ "device-activity"
20463
+ ]);
20369
20464
  /**
20370
20465
  * List of motion sources active on a camera. Empty array is valid:
20371
20466
  * "no source" — happens for battery cams without firmware motion when
@@ -21884,7 +21979,7 @@ method(object({
21884
21979
  }), _void(), {
21885
21980
  kind: "mutation",
21886
21981
  auth: "admin"
21887
- }), method(object({ id: string() }), object({
21982
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21888
21983
  ok: boolean(),
21889
21984
  error: string().optional()
21890
21985
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21954,6 +22049,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21954
22049
  kind: "mutation",
21955
22050
  auth: "admin"
21956
22051
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22052
+ /**
22053
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22054
+ * location (D388).
22055
+ *
22056
+ * ## Why this is not `storage-evictable`
22057
+ *
22058
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22059
+ * not, in two ways that both matter and both bite hardest on the locations an
22060
+ * operator most wants a figure for:
22061
+ *
22062
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22063
+ * and `recordingsLow:default` deliberately share one root and evict as one
22064
+ * oldest-first pool, so both answer with the SAME combined total. As an
22065
+ * occupancy figure that double-counts the disk.
22066
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22067
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22068
+ * is retiring and staring at.
22069
+ *
22070
+ * So this is its own contract with its own quantity, and the quantity is
22071
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22072
+ * would ever be willing to delete it. A provider that can only answer
22073
+ * "evictable" must not register here — a number that silently means different
22074
+ * things per class is worse than no number.
22075
+ *
22076
+ * ## Absence is an answer
22077
+ *
22078
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22079
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22080
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22081
+ * consuming side has to be written out loud instead of appearing by accident.
22082
+ *
22083
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22084
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22085
+ */
22086
+ /** One provider's occupancy answer for one location. */
22087
+ var StorageOccupancyReportSchema = object({
22088
+ locationId: string(),
22089
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22090
+ * not net of what it is willing to delete. */
22091
+ ownedBytes: number().int().nonnegative(),
22092
+ /** When the provider last actually measured this. The orchestrator carries it
22093
+ * through so a UI can say how old the figure is instead of implying "now". */
22094
+ measuredAtMs: number().int().nonnegative()
22095
+ });
22096
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21957
22097
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21958
22098
  providerId: string().min(1),
21959
22099
  displayName: string().min(1),
@@ -23589,39 +23729,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23589
23729
  deviceId: number(),
23590
23730
  status: BatteryStatusSchema
23591
23731
  });
23592
- /**
23593
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23594
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23595
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23596
- * one Home Assistant projection.
23597
- */
23598
- var NetworkLinkStatusSchema = object({
23599
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23600
- type: _enum([
23601
- "wifi",
23602
- "ethernet",
23603
- "cellular",
23604
- "unknown"
23605
- ]),
23606
- /**
23607
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23608
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23609
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23610
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23611
- * SKIP a null rather than coerce it.
23612
- */
23613
- signalPercent: number().min(0).max(100).nullable(),
23614
- /** Raw received signal strength in dBm, when the firmware reports one. */
23615
- rssiDbm: number().optional(),
23616
- /** Network name of a wireless link, when the firmware reports it. */
23617
- ssid: string().optional(),
23618
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23619
- lastUpdated: number()
23620
- });
23621
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23622
- deviceId: number(),
23623
- status: NetworkLinkStatusSchema
23624
- });
23625
23732
  object({
23626
23733
  on: boolean(),
23627
23734
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25975,6 +26082,236 @@ DeviceType.Camera, method(object({
25975
26082
  detection: NativeDetectionSchema
25976
26083
  });
25977
26084
  /**
26085
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26086
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26087
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26088
+ *
26089
+ * Why a NEW cap rather than overloading `ptz`:
26090
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26091
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26092
+ * The two are different physical models: PTZ is absolute-position + presets,
26093
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26094
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26095
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26096
+ * the reverse:
26097
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26098
+ * / `getOptions`), and
26099
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26100
+ * robot camera shows up in the existing PTZ control path without every
26101
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26102
+ * not here (see the addon design note):
26103
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26104
+ * ptz.stop() → navigation.stop()
26105
+ * ptz.goHome() → navigation.runAction('goHome')
26106
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26107
+ * ptz.goToPreset(id) → navigation.runAction(id)
26108
+ *
26109
+ * ## Continuous drive
26110
+ *
26111
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26112
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26113
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26114
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26115
+ * coalesce them. The UI owns the cadence.
26116
+ *
26117
+ * ## The action dictionary
26118
+ *
26119
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26120
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26121
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26122
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26123
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26124
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26125
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26126
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26127
+ *
26128
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26129
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26130
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26131
+ * every device handle. A future nodedreame publish adds a typed
26132
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26133
+ * provider can then swap the raw calls for the typed methods with no change to
26134
+ * THIS contract.
26135
+ */
26136
+ /**
26137
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26138
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26139
+ * halts it.
26140
+ *
26141
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26142
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26143
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26144
+ * vector by it (drivers without proportional drive ignore it).
26145
+ *
26146
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26147
+ * axis alone; an all-undefined nudge is a no-op.
26148
+ */
26149
+ var NavigationMoveCommandSchema = object({
26150
+ pan: number().min(-1).max(1).optional(),
26151
+ tilt: number().min(-1).max(1).optional(),
26152
+ speed: number().min(0).max(1).optional()
26153
+ });
26154
+ /**
26155
+ * The enumerated discrete actions a navigation-capable robot can perform via
26156
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26157
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26158
+ * `playSound` (see the `sound` dictionary entries).
26159
+ */
26160
+ var NavigationActionIdSchema = _enum([
26161
+ "goHome",
26162
+ "locate",
26163
+ "spotClean",
26164
+ "findPet",
26165
+ "personFollow",
26166
+ "stop",
26167
+ "startClean",
26168
+ "pauseClean",
26169
+ "dockWash",
26170
+ "autoEmpty",
26171
+ "flashOn",
26172
+ "flashOff"
26173
+ ]);
26174
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26175
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26176
+ /**
26177
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26178
+ * native panel and the PTZ mimic render as a button.
26179
+ *
26180
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26181
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26182
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26183
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26184
+ * - `label` — operator-facing English label.
26185
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26186
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26187
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26188
+ * flips it from config, never by editing code.
26189
+ */
26190
+ var NavigationActionEntrySchema = object({
26191
+ id: string(),
26192
+ kind: NavigationEntryKindSchema,
26193
+ label: string(),
26194
+ icon: string(),
26195
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26196
+ soundId: number().int().optional(),
26197
+ /** Per-device feature flag — render this entry only when true. */
26198
+ enabled: boolean()
26199
+ });
26200
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26201
+ var NavigationPointSchema = object({
26202
+ x: number(),
26203
+ y: number()
26204
+ });
26205
+ /**
26206
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26207
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26208
+ * that are turned on for THIS device. Data-driven: the provider derives these
26209
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26210
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26211
+ * that are not dictionary entries.
26212
+ *
26213
+ * - `move` / `stop` — the momentary drive joystick.
26214
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26215
+ * map-coordinate plumbing is wired.
26216
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26217
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26218
+ * - `light` — the on/off fill-light toggle (works anytime).
26219
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26220
+ * camera-service control; needs an active stream).
26221
+ */
26222
+ var NavigationFeaturesSchema = object({
26223
+ move: boolean(),
26224
+ stop: boolean(),
26225
+ goToPoint: boolean(),
26226
+ runAction: boolean(),
26227
+ playSound: boolean(),
26228
+ light: boolean(),
26229
+ lightMode: boolean()
26230
+ });
26231
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26232
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26233
+ /**
26234
+ * Live navigation state so the UI can reflect what the robot is doing:
26235
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26236
+ * - `following` — person/pet follow is currently armed.
26237
+ * - `flash` — the on-camera fill light is on.
26238
+ * - `lightMode` — auto vs manual fill-light mode.
26239
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26240
+ * `lightMode === 'manual'`.
26241
+ */
26242
+ var NavigationStatusSchema = object({
26243
+ mode: _enum([
26244
+ "idle",
26245
+ "cleaning",
26246
+ "spot",
26247
+ "following",
26248
+ "goto",
26249
+ "returning",
26250
+ "paused",
26251
+ "unknown"
26252
+ ]),
26253
+ following: boolean(),
26254
+ flash: boolean(),
26255
+ lightMode: NavigationLightModeSchema,
26256
+ lightLevel: number().min(40).max(100),
26257
+ /** Ms epoch when the slice was last updated. */
26258
+ lastChangedAt: number()
26259
+ });
26260
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26261
+ DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
26262
+ deviceId: number(),
26263
+ actionId: NavigationActionIdSchema
26264
+ }), _void(), { kind: "mutation" }), method(object({
26265
+ deviceId: number(),
26266
+ soundId: number().int()
26267
+ }), _void(), { kind: "mutation" }), method(object({
26268
+ deviceId: number(),
26269
+ on: boolean()
26270
+ }), _void(), { kind: "mutation" }), method(object({
26271
+ deviceId: number(),
26272
+ mode: NavigationLightModeSchema,
26273
+ level: number().min(40).max(100).optional()
26274
+ }), _void(), { kind: "mutation" }), method(object({
26275
+ deviceId: number(),
26276
+ level: number().min(40).max(100)
26277
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26278
+ deviceId: number(),
26279
+ status: NavigationStatusSchema
26280
+ });
26281
+ /**
26282
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26283
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26284
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26285
+ * one Home Assistant projection.
26286
+ */
26287
+ var NetworkLinkStatusSchema = object({
26288
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26289
+ type: _enum([
26290
+ "wifi",
26291
+ "ethernet",
26292
+ "cellular",
26293
+ "unknown"
26294
+ ]),
26295
+ /**
26296
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26297
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26298
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26299
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26300
+ * SKIP a null rather than coerce it.
26301
+ */
26302
+ signalPercent: number().min(0).max(100).nullable(),
26303
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26304
+ rssiDbm: number().optional(),
26305
+ /** Network name of a wireless link, when the firmware reports it. */
26306
+ ssid: string().optional(),
26307
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26308
+ lastUpdated: number()
26309
+ });
26310
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26311
+ deviceId: number(),
26312
+ status: NetworkLinkStatusSchema
26313
+ });
26314
+ /**
25978
26315
  * network-quality — system-scoped singleton capability tracking RTT,
25979
26316
  * jitter, and observed/peak bandwidth per device + per client.
25980
26317
  *
@@ -27216,203 +27553,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27216
27553
  deviceId: number(),
27217
27554
  status: PtzAutotrackStatusSchema
27218
27555
  });
27219
- /**
27220
- * `navigation` — a device-scoped capability that natively expresses the FULL
27221
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27222
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27223
- *
27224
- * Why a NEW cap rather than overloading `ptz`:
27225
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27226
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27227
- * The two are different physical models: PTZ is absolute-position + presets,
27228
- * navigation is momentary drive nudges + discrete robot ACTIONS
27229
- * (dock / spot-clean / follow-pet / go-to-point / …).
27230
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27231
- * the reverse:
27232
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27233
- * / `getOptions`), and
27234
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27235
- * robot camera shows up in the existing PTZ control path without every
27236
- * PTZ provider learning about robots. The mapping lives in the adapter,
27237
- * not here (see the addon design note):
27238
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27239
- * ptz.stop() → navigation.stop()
27240
- * ptz.goHome() → navigation.runAction('goHome')
27241
- * ptz.getPresets() → navigation.listActions() (id→preset)
27242
- * ptz.goToPreset(id) → navigation.runAction(id)
27243
- *
27244
- * ## Continuous drive
27245
- *
27246
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27247
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27248
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27249
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27250
- * coalesce them. The UI owns the cadence.
27251
- *
27252
- * ## The action dictionary
27253
- *
27254
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27255
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27256
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27257
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27258
- * vendor-specific list. `kind: 'action'` entries are triggered with
27259
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27260
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27261
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27262
- *
27263
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27264
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27265
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27266
- * every device handle. A future nodedreame publish adds a typed
27267
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27268
- * provider can then swap the raw calls for the typed methods with no change to
27269
- * THIS contract.
27270
- */
27271
- /**
27272
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27273
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27274
- * halts it.
27275
- *
27276
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27277
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27278
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27279
- * vector by it (drivers without proportional drive ignore it).
27280
- *
27281
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27282
- * axis alone; an all-undefined nudge is a no-op.
27283
- */
27284
- var NavigationMoveCommandSchema = object({
27285
- pan: number().min(-1).max(1).optional(),
27286
- tilt: number().min(-1).max(1).optional(),
27287
- speed: number().min(0).max(1).optional()
27288
- });
27289
- /**
27290
- * The enumerated discrete actions a navigation-capable robot can perform via
27291
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27292
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27293
- * `playSound` (see the `sound` dictionary entries).
27294
- */
27295
- var NavigationActionIdSchema = _enum([
27296
- "goHome",
27297
- "locate",
27298
- "spotClean",
27299
- "findPet",
27300
- "personFollow",
27301
- "stop",
27302
- "startClean",
27303
- "pauseClean",
27304
- "dockWash",
27305
- "autoEmpty",
27306
- "flashOn",
27307
- "flashOff"
27308
- ]);
27309
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27310
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27311
- /**
27312
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27313
- * native panel and the PTZ mimic render as a button.
27314
- *
27315
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27316
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27317
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27318
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27319
- * - `label` — operator-facing English label.
27320
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27321
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27322
- * PTZ render ONLY enabled entries. Data-driven: the provider
27323
- * flips it from config, never by editing code.
27324
- */
27325
- var NavigationActionEntrySchema = object({
27326
- id: string(),
27327
- kind: NavigationEntryKindSchema,
27328
- label: string(),
27329
- icon: string(),
27330
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27331
- soundId: number().int().optional(),
27332
- /** Per-device feature flag — render this entry only when true. */
27333
- enabled: boolean()
27334
- });
27335
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27336
- var NavigationPointSchema = object({
27337
- x: number(),
27338
- y: number()
27339
- });
27340
- /**
27341
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27342
- * The cap reports which are enabled so the UI / PTZ render only the controls
27343
- * that are turned on for THIS device. Data-driven: the provider derives these
27344
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27345
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27346
- * that are not dictionary entries.
27347
- *
27348
- * - `move` / `stop` — the momentary drive joystick.
27349
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27350
- * map-coordinate plumbing is wired.
27351
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27352
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27353
- * - `light` — the on/off fill-light toggle (works anytime).
27354
- * - `lightMode` — the auto/manual selector + manual level slider (a
27355
- * camera-service control; needs an active stream).
27356
- */
27357
- var NavigationFeaturesSchema = object({
27358
- move: boolean(),
27359
- stop: boolean(),
27360
- goToPoint: boolean(),
27361
- runAction: boolean(),
27362
- playSound: boolean(),
27363
- light: boolean(),
27364
- lightMode: boolean()
27365
- });
27366
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27367
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27368
- /**
27369
- * Live navigation state so the UI can reflect what the robot is doing:
27370
- * - `mode` — coarse activity (idle / cleaning / following / …).
27371
- * - `following` — person/pet follow is currently armed.
27372
- * - `flash` — the on-camera fill light is on.
27373
- * - `lightMode` — auto vs manual fill-light mode.
27374
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27375
- * `lightMode === 'manual'`.
27376
- */
27377
- var NavigationStatusSchema = object({
27378
- mode: _enum([
27379
- "idle",
27380
- "cleaning",
27381
- "spot",
27382
- "following",
27383
- "goto",
27384
- "returning",
27385
- "paused",
27386
- "unknown"
27387
- ]),
27388
- following: boolean(),
27389
- flash: boolean(),
27390
- lightMode: NavigationLightModeSchema,
27391
- lightLevel: number().min(40).max(100),
27392
- /** Ms epoch when the slice was last updated. */
27393
- lastChangedAt: number()
27394
- });
27395
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27396
- DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
27397
- deviceId: number(),
27398
- actionId: NavigationActionIdSchema
27399
- }), _void(), { kind: "mutation" }), method(object({
27400
- deviceId: number(),
27401
- soundId: number().int()
27402
- }), _void(), { kind: "mutation" }), method(object({
27403
- deviceId: number(),
27404
- on: boolean()
27405
- }), _void(), { kind: "mutation" }), method(object({
27406
- deviceId: number(),
27407
- mode: NavigationLightModeSchema,
27408
- level: number().min(40).max(100).optional()
27409
- }), _void(), { kind: "mutation" }), method(object({
27410
- deviceId: number(),
27411
- level: number().min(40).max(100)
27412
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27413
- deviceId: number(),
27414
- status: NavigationStatusSchema
27415
- });
27416
27556
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27417
27557
  kind: "mutation",
27418
27558
  auth: "admin"
@@ -34727,6 +34867,12 @@ Object.freeze({
34727
34867
  addonId: null,
34728
34868
  access: "view"
34729
34869
  },
34870
+ "storage.listDrainProgress": {
34871
+ capName: "storage",
34872
+ capScope: "system",
34873
+ addonId: null,
34874
+ access: "view"
34875
+ },
34730
34876
  "storage.listLocationDeclarations": {
34731
34877
  capName: "storage",
34732
34878
  capScope: "system",
@@ -34871,6 +35017,12 @@ Object.freeze({
34871
35017
  addonId: null,
34872
35018
  access: "view"
34873
35019
  },
35020
+ "storageOccupancy.getOccupancy": {
35021
+ capName: "storage-occupancy",
35022
+ capScope: "system",
35023
+ addonId: null,
35024
+ access: "view"
35025
+ },
34874
35026
  "storageProvider.abortUpload": {
34875
35027
  capName: "storage-provider",
34876
35028
  capScope: "system",