@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.
@@ -1,5 +1,5 @@
1
1
  import * as crypto$1 from "node:crypto";
2
- //#region ../types/dist/event-category-zAv7pMUz.mjs
2
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -194,6 +194,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
194
194
  EventCategory["ProcessCrashed"] = "process.crashed";
195
195
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
196
196
  EventCategory["ProcessRestarted"] = "process.restarted";
197
+ /**
198
+ * The SET of storage locations changed — one was created, edited, enabled,
199
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
200
+ *
201
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
202
+ * it must also converge on its own periodic path, because a dropped event
203
+ * must not leave a node writing to yesterday's disk set forever. It exists
204
+ * because there was NO signal at all — an operator who added a second
205
+ * recordings disk in the admin UI got nothing, and the recorder kept its
206
+ * resolved locations until something else happened to re-resolve them
207
+ * (D387). Payload `StorageLocationsChangedPayload`.
208
+ */
209
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
197
210
  EventCategory["RecordingStarted"] = "recording.started";
198
211
  EventCategory["RecordingStopped"] = "recording.stopped";
199
212
  EventCategory["RecordingError"] = "recording.error";
@@ -8677,6 +8690,21 @@ var StorageCleanupJobSchema = object({
8677
8690
  });
8678
8691
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8679
8692
  /**
8693
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
8694
+ * alias below is `z.infer<>` of it, never a second spelling.
8695
+ */
8696
+ var StorageLocationModeSchema = _enum([
8697
+ "active",
8698
+ "readonly",
8699
+ "drain",
8700
+ "disabled"
8701
+ ]);
8702
+ _enum([
8703
+ "normal",
8704
+ "never",
8705
+ "drain"
8706
+ ]);
8707
+ /**
8680
8708
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8681
8709
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8682
8710
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8742,6 +8770,21 @@ var StorageLocationSchema = object({
8742
8770
  * stops existing rather than being re-derived on every read.
8743
8771
  */
8744
8772
  enabled: boolean().optional(),
8773
+ /**
8774
+ * THE state of this location (D385), and the only authority on what may be
8775
+ * written, read or evicted here. Interpreted in exactly one place —
8776
+ * `storage-location-mode.ts` — which also folds the legacy
8777
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
8778
+ * ambiguous.
8779
+ *
8780
+ * OPTIONAL only for the wire and for rows written before D385: absence is
8781
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
8782
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
8783
+ * re-derived on every read. `enabled` survives one release as a DERIVED
8784
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
8785
+ * either, so the two cannot disagree.
8786
+ */
8787
+ mode: StorageLocationModeSchema.optional(),
8745
8788
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
8746
8789
  * for node-local locations it can reach) — never persisted, absent when the
8747
8790
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -8749,11 +8792,46 @@ var StorageLocationSchema = object({
8749
8792
  totalBytes: number(),
8750
8793
  availableBytes: number()
8751
8794
  }).nullable().optional(),
8795
+ /**
8796
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
8797
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
8798
+ * never persisted, never a filesystem walk.
8799
+ *
8800
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
8801
+ * location yet — nobody stores here, the owning addon is down, or the first
8802
+ * refresh has not completed. A UI must omit the segment rather than draw it
8803
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
8804
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
8805
+ * be spelled out loud instead of appearing by accident.
8806
+ *
8807
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
8808
+ * about the whole figure rather than about its freshest part.
8809
+ */
8810
+ owned: object({
8811
+ bytes: number().int().nonnegative(),
8812
+ measuredAtMs: number().int().nonnegative()
8813
+ }).optional(),
8752
8814
  createdAt: number(),
8753
8815
  updatedAt: number()
8754
8816
  });
8755
8817
  object({ isDefault: boolean().optional() });
8756
8818
  /**
8819
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
8820
+ *
8821
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
8822
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
8823
+ * drain with no observed growth has no honest ETA, and inventing one is how an
8824
+ * operator learns not to believe the screen.
8825
+ */
8826
+ var StorageDrainProgressSchema = object({
8827
+ locationId: string(),
8828
+ startedAtMs: number(),
8829
+ startBytes: number(),
8830
+ bytesRemaining: number(),
8831
+ drained: boolean(),
8832
+ estimatedEmptyAtMs: number().nullable()
8833
+ });
8834
+ /**
8757
8835
  * Reference accepted by consumer-facing `api.storage.*` calls.
8758
8836
  * Either:
8759
8837
  * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
@@ -20337,8 +20415,25 @@ var occupancyRecheckFramesField = {
20337
20415
  * (analyzer attaches detected `regions[]`; onboard does not — the
20338
20416
  * camera typically only reports a binary signal plus an optional
20339
20417
  * channel/AI class which lives in dedicated event channels).
20340
- */
20341
- var MotionSourceEnum = _enum(["onboard", "analyzer"]);
20418
+ *
20419
+ * - `onboard` — the camera's firmware said something moved.
20420
+ * - `analyzer` — this runner's frame-diff said so, and attaches `regions[]`.
20421
+ * - `device-activity` — the DEVICE said it is doing its job: the
20422
+ * `recording-signal` LEVEL the same device raises for the recorder
20423
+ * ([D380](../../../../docs/decisions/adr-0380-a-device-decided-recording-is-a-mode-with-no-schedule-seeded-once.md)),
20424
+ * republished as a motion source. It attaches **nothing** — no regions, no
20425
+ * class: the only fact it carries is that the device is active, and a robot
20426
+ * vacuum that is itself the moving object has no region worth sending. It is
20427
+ * a LEVEL, so unlike `onboard` it has a real falling edge, and unlike
20428
+ * `analyzer` it must not open the frame-diff side-channel — the runner's
20429
+ * `handleOnboardMotionAnalyzer` gate is `source === 'onboard'` and stays that
20430
+ * way ([D392](../../../../docs/decisions/adr-0392-a-device-that-says-it-is-working-is-a-motion-source-of-its-own.md)).
20431
+ */
20432
+ var MotionSourceEnum = _enum([
20433
+ "onboard",
20434
+ "analyzer",
20435
+ "device-activity"
20436
+ ]);
20342
20437
  /**
20343
20438
  * List of motion sources active on a camera. Empty array is valid:
20344
20439
  * "no source" — happens for battery cams without firmware motion when
@@ -21857,7 +21952,7 @@ method(object({
21857
21952
  }), _void(), {
21858
21953
  kind: "mutation",
21859
21954
  auth: "admin"
21860
- }), method(object({ id: string() }), object({
21955
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
21861
21956
  ok: boolean(),
21862
21957
  error: string().optional()
21863
21958
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -21927,6 +22022,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21927
22022
  kind: "mutation",
21928
22023
  auth: "admin"
21929
22024
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22025
+ /**
22026
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22027
+ * location (D388).
22028
+ *
22029
+ * ## Why this is not `storage-evictable`
22030
+ *
22031
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22032
+ * not, in two ways that both matter and both bite hardest on the locations an
22033
+ * operator most wants a figure for:
22034
+ *
22035
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22036
+ * and `recordingsLow:default` deliberately share one root and evict as one
22037
+ * oldest-first pool, so both answer with the SAME combined total. As an
22038
+ * occupancy figure that double-counts the disk.
22039
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22040
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22041
+ * is retiring and staring at.
22042
+ *
22043
+ * So this is its own contract with its own quantity, and the quantity is
22044
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22045
+ * would ever be willing to delete it. A provider that can only answer
22046
+ * "evictable" must not register here — a number that silently means different
22047
+ * things per class is worse than no number.
22048
+ *
22049
+ * ## Absence is an answer
22050
+ *
22051
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22052
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22053
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22054
+ * consuming side has to be written out loud instead of appearing by accident.
22055
+ *
22056
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22057
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22058
+ */
22059
+ /** One provider's occupancy answer for one location. */
22060
+ var StorageOccupancyReportSchema = object({
22061
+ locationId: string(),
22062
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22063
+ * not net of what it is willing to delete. */
22064
+ ownedBytes: number().int().nonnegative(),
22065
+ /** When the provider last actually measured this. The orchestrator carries it
22066
+ * through so a UI can say how old the figure is instead of implying "now". */
22067
+ measuredAtMs: number().int().nonnegative()
22068
+ });
22069
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
21930
22070
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21931
22071
  providerId: string().min(1),
21932
22072
  displayName: string().min(1),
@@ -23562,39 +23702,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23562
23702
  deviceId: number(),
23563
23703
  status: BatteryStatusSchema
23564
23704
  });
23565
- /**
23566
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23567
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23568
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23569
- * one Home Assistant projection.
23570
- */
23571
- var NetworkLinkStatusSchema = object({
23572
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23573
- type: _enum([
23574
- "wifi",
23575
- "ethernet",
23576
- "cellular",
23577
- "unknown"
23578
- ]),
23579
- /**
23580
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23581
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23582
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23583
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23584
- * SKIP a null rather than coerce it.
23585
- */
23586
- signalPercent: number().min(0).max(100).nullable(),
23587
- /** Raw received signal strength in dBm, when the firmware reports one. */
23588
- rssiDbm: number().optional(),
23589
- /** Network name of a wireless link, when the firmware reports it. */
23590
- ssid: string().optional(),
23591
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23592
- lastUpdated: number()
23593
- });
23594
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23595
- deviceId: number(),
23596
- status: NetworkLinkStatusSchema
23597
- });
23598
23705
  object({
23599
23706
  on: boolean(),
23600
23707
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -25948,6 +26055,236 @@ DeviceType.Camera, method(object({
25948
26055
  detection: NativeDetectionSchema
25949
26056
  });
25950
26057
  /**
26058
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26059
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26060
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26061
+ *
26062
+ * Why a NEW cap rather than overloading `ptz`:
26063
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26064
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26065
+ * The two are different physical models: PTZ is absolute-position + presets,
26066
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26067
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26068
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26069
+ * the reverse:
26070
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26071
+ * / `getOptions`), and
26072
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26073
+ * robot camera shows up in the existing PTZ control path without every
26074
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26075
+ * not here (see the addon design note):
26076
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26077
+ * ptz.stop() → navigation.stop()
26078
+ * ptz.goHome() → navigation.runAction('goHome')
26079
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26080
+ * ptz.goToPreset(id) → navigation.runAction(id)
26081
+ *
26082
+ * ## Continuous drive
26083
+ *
26084
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26085
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26086
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26087
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26088
+ * coalesce them. The UI owns the cadence.
26089
+ *
26090
+ * ## The action dictionary
26091
+ *
26092
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26093
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26094
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26095
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26096
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26097
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26098
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26099
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26100
+ *
26101
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26102
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26103
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26104
+ * every device handle. A future nodedreame publish adds a typed
26105
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26106
+ * provider can then swap the raw calls for the typed methods with no change to
26107
+ * THIS contract.
26108
+ */
26109
+ /**
26110
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26111
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26112
+ * halts it.
26113
+ *
26114
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26115
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26116
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26117
+ * vector by it (drivers without proportional drive ignore it).
26118
+ *
26119
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26120
+ * axis alone; an all-undefined nudge is a no-op.
26121
+ */
26122
+ var NavigationMoveCommandSchema = object({
26123
+ pan: number().min(-1).max(1).optional(),
26124
+ tilt: number().min(-1).max(1).optional(),
26125
+ speed: number().min(0).max(1).optional()
26126
+ });
26127
+ /**
26128
+ * The enumerated discrete actions a navigation-capable robot can perform via
26129
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26130
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26131
+ * `playSound` (see the `sound` dictionary entries).
26132
+ */
26133
+ var NavigationActionIdSchema = _enum([
26134
+ "goHome",
26135
+ "locate",
26136
+ "spotClean",
26137
+ "findPet",
26138
+ "personFollow",
26139
+ "stop",
26140
+ "startClean",
26141
+ "pauseClean",
26142
+ "dockWash",
26143
+ "autoEmpty",
26144
+ "flashOn",
26145
+ "flashOff"
26146
+ ]);
26147
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26148
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26149
+ /**
26150
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26151
+ * native panel and the PTZ mimic render as a button.
26152
+ *
26153
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26154
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26155
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26156
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26157
+ * - `label` — operator-facing English label.
26158
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26159
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26160
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26161
+ * flips it from config, never by editing code.
26162
+ */
26163
+ var NavigationActionEntrySchema = object({
26164
+ id: string(),
26165
+ kind: NavigationEntryKindSchema,
26166
+ label: string(),
26167
+ icon: string(),
26168
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26169
+ soundId: number().int().optional(),
26170
+ /** Per-device feature flag — render this entry only when true. */
26171
+ enabled: boolean()
26172
+ });
26173
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26174
+ var NavigationPointSchema = object({
26175
+ x: number(),
26176
+ y: number()
26177
+ });
26178
+ /**
26179
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26180
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26181
+ * that are turned on for THIS device. Data-driven: the provider derives these
26182
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26183
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26184
+ * that are not dictionary entries.
26185
+ *
26186
+ * - `move` / `stop` — the momentary drive joystick.
26187
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26188
+ * map-coordinate plumbing is wired.
26189
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26190
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26191
+ * - `light` — the on/off fill-light toggle (works anytime).
26192
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26193
+ * camera-service control; needs an active stream).
26194
+ */
26195
+ var NavigationFeaturesSchema = object({
26196
+ move: boolean(),
26197
+ stop: boolean(),
26198
+ goToPoint: boolean(),
26199
+ runAction: boolean(),
26200
+ playSound: boolean(),
26201
+ light: boolean(),
26202
+ lightMode: boolean()
26203
+ });
26204
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26205
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26206
+ /**
26207
+ * Live navigation state so the UI can reflect what the robot is doing:
26208
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26209
+ * - `following` — person/pet follow is currently armed.
26210
+ * - `flash` — the on-camera fill light is on.
26211
+ * - `lightMode` — auto vs manual fill-light mode.
26212
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26213
+ * `lightMode === 'manual'`.
26214
+ */
26215
+ var NavigationStatusSchema = object({
26216
+ mode: _enum([
26217
+ "idle",
26218
+ "cleaning",
26219
+ "spot",
26220
+ "following",
26221
+ "goto",
26222
+ "returning",
26223
+ "paused",
26224
+ "unknown"
26225
+ ]),
26226
+ following: boolean(),
26227
+ flash: boolean(),
26228
+ lightMode: NavigationLightModeSchema,
26229
+ lightLevel: number().min(40).max(100),
26230
+ /** Ms epoch when the slice was last updated. */
26231
+ lastChangedAt: number()
26232
+ });
26233
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26234
+ 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({
26235
+ deviceId: number(),
26236
+ actionId: NavigationActionIdSchema
26237
+ }), _void(), { kind: "mutation" }), method(object({
26238
+ deviceId: number(),
26239
+ soundId: number().int()
26240
+ }), _void(), { kind: "mutation" }), method(object({
26241
+ deviceId: number(),
26242
+ on: boolean()
26243
+ }), _void(), { kind: "mutation" }), method(object({
26244
+ deviceId: number(),
26245
+ mode: NavigationLightModeSchema,
26246
+ level: number().min(40).max(100).optional()
26247
+ }), _void(), { kind: "mutation" }), method(object({
26248
+ deviceId: number(),
26249
+ level: number().min(40).max(100)
26250
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26251
+ deviceId: number(),
26252
+ status: NavigationStatusSchema
26253
+ });
26254
+ /**
26255
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26256
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26257
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26258
+ * one Home Assistant projection.
26259
+ */
26260
+ var NetworkLinkStatusSchema = object({
26261
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26262
+ type: _enum([
26263
+ "wifi",
26264
+ "ethernet",
26265
+ "cellular",
26266
+ "unknown"
26267
+ ]),
26268
+ /**
26269
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26270
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26271
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26272
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26273
+ * SKIP a null rather than coerce it.
26274
+ */
26275
+ signalPercent: number().min(0).max(100).nullable(),
26276
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26277
+ rssiDbm: number().optional(),
26278
+ /** Network name of a wireless link, when the firmware reports it. */
26279
+ ssid: string().optional(),
26280
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26281
+ lastUpdated: number()
26282
+ });
26283
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26284
+ deviceId: number(),
26285
+ status: NetworkLinkStatusSchema
26286
+ });
26287
+ /**
25951
26288
  * network-quality — system-scoped singleton capability tracking RTT,
25952
26289
  * jitter, and observed/peak bandwidth per device + per client.
25953
26290
  *
@@ -27189,203 +27526,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27189
27526
  deviceId: number(),
27190
27527
  status: PtzAutotrackStatusSchema
27191
27528
  });
27192
- /**
27193
- * `navigation` — a device-scoped capability that natively expresses the FULL
27194
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27195
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27196
- *
27197
- * Why a NEW cap rather than overloading `ptz`:
27198
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27199
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27200
- * The two are different physical models: PTZ is absolute-position + presets,
27201
- * navigation is momentary drive nudges + discrete robot ACTIONS
27202
- * (dock / spot-clean / follow-pet / go-to-point / …).
27203
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27204
- * the reverse:
27205
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27206
- * / `getOptions`), and
27207
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27208
- * robot camera shows up in the existing PTZ control path without every
27209
- * PTZ provider learning about robots. The mapping lives in the adapter,
27210
- * not here (see the addon design note):
27211
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27212
- * ptz.stop() → navigation.stop()
27213
- * ptz.goHome() → navigation.runAction('goHome')
27214
- * ptz.getPresets() → navigation.listActions() (id→preset)
27215
- * ptz.goToPreset(id) → navigation.runAction(id)
27216
- *
27217
- * ## Continuous drive
27218
- *
27219
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27220
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27221
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27222
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27223
- * coalesce them. The UI owns the cadence.
27224
- *
27225
- * ## The action dictionary
27226
- *
27227
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27228
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27229
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27230
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27231
- * vendor-specific list. `kind: 'action'` entries are triggered with
27232
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27233
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27234
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27235
- *
27236
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27237
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27238
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27239
- * every device handle. A future nodedreame publish adds a typed
27240
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27241
- * provider can then swap the raw calls for the typed methods with no change to
27242
- * THIS contract.
27243
- */
27244
- /**
27245
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27246
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27247
- * halts it.
27248
- *
27249
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27250
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27251
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27252
- * vector by it (drivers without proportional drive ignore it).
27253
- *
27254
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27255
- * axis alone; an all-undefined nudge is a no-op.
27256
- */
27257
- var NavigationMoveCommandSchema = object({
27258
- pan: number().min(-1).max(1).optional(),
27259
- tilt: number().min(-1).max(1).optional(),
27260
- speed: number().min(0).max(1).optional()
27261
- });
27262
- /**
27263
- * The enumerated discrete actions a navigation-capable robot can perform via
27264
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27265
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27266
- * `playSound` (see the `sound` dictionary entries).
27267
- */
27268
- var NavigationActionIdSchema = _enum([
27269
- "goHome",
27270
- "locate",
27271
- "spotClean",
27272
- "findPet",
27273
- "personFollow",
27274
- "stop",
27275
- "startClean",
27276
- "pauseClean",
27277
- "dockWash",
27278
- "autoEmpty",
27279
- "flashOn",
27280
- "flashOff"
27281
- ]);
27282
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27283
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27284
- /**
27285
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27286
- * native panel and the PTZ mimic render as a button.
27287
- *
27288
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27289
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27290
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27291
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27292
- * - `label` — operator-facing English label.
27293
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27294
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27295
- * PTZ render ONLY enabled entries. Data-driven: the provider
27296
- * flips it from config, never by editing code.
27297
- */
27298
- var NavigationActionEntrySchema = object({
27299
- id: string(),
27300
- kind: NavigationEntryKindSchema,
27301
- label: string(),
27302
- icon: string(),
27303
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27304
- soundId: number().int().optional(),
27305
- /** Per-device feature flag — render this entry only when true. */
27306
- enabled: boolean()
27307
- });
27308
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27309
- var NavigationPointSchema = object({
27310
- x: number(),
27311
- y: number()
27312
- });
27313
- /**
27314
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27315
- * The cap reports which are enabled so the UI / PTZ render only the controls
27316
- * that are turned on for THIS device. Data-driven: the provider derives these
27317
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27318
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27319
- * that are not dictionary entries.
27320
- *
27321
- * - `move` / `stop` — the momentary drive joystick.
27322
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27323
- * map-coordinate plumbing is wired.
27324
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27325
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27326
- * - `light` — the on/off fill-light toggle (works anytime).
27327
- * - `lightMode` — the auto/manual selector + manual level slider (a
27328
- * camera-service control; needs an active stream).
27329
- */
27330
- var NavigationFeaturesSchema = object({
27331
- move: boolean(),
27332
- stop: boolean(),
27333
- goToPoint: boolean(),
27334
- runAction: boolean(),
27335
- playSound: boolean(),
27336
- light: boolean(),
27337
- lightMode: boolean()
27338
- });
27339
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27340
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27341
- /**
27342
- * Live navigation state so the UI can reflect what the robot is doing:
27343
- * - `mode` — coarse activity (idle / cleaning / following / …).
27344
- * - `following` — person/pet follow is currently armed.
27345
- * - `flash` — the on-camera fill light is on.
27346
- * - `lightMode` — auto vs manual fill-light mode.
27347
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27348
- * `lightMode === 'manual'`.
27349
- */
27350
- var NavigationStatusSchema = object({
27351
- mode: _enum([
27352
- "idle",
27353
- "cleaning",
27354
- "spot",
27355
- "following",
27356
- "goto",
27357
- "returning",
27358
- "paused",
27359
- "unknown"
27360
- ]),
27361
- following: boolean(),
27362
- flash: boolean(),
27363
- lightMode: NavigationLightModeSchema,
27364
- lightLevel: number().min(40).max(100),
27365
- /** Ms epoch when the slice was last updated. */
27366
- lastChangedAt: number()
27367
- });
27368
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27369
- 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({
27370
- deviceId: number(),
27371
- actionId: NavigationActionIdSchema
27372
- }), _void(), { kind: "mutation" }), method(object({
27373
- deviceId: number(),
27374
- soundId: number().int()
27375
- }), _void(), { kind: "mutation" }), method(object({
27376
- deviceId: number(),
27377
- on: boolean()
27378
- }), _void(), { kind: "mutation" }), method(object({
27379
- deviceId: number(),
27380
- mode: NavigationLightModeSchema,
27381
- level: number().min(40).max(100).optional()
27382
- }), _void(), { kind: "mutation" }), method(object({
27383
- deviceId: number(),
27384
- level: number().min(40).max(100)
27385
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27386
- deviceId: number(),
27387
- status: NavigationStatusSchema
27388
- });
27389
27529
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27390
27530
  kind: "mutation",
27391
27531
  auth: "admin"
@@ -34700,6 +34840,12 @@ Object.freeze({
34700
34840
  addonId: null,
34701
34841
  access: "view"
34702
34842
  },
34843
+ "storage.listDrainProgress": {
34844
+ capName: "storage",
34845
+ capScope: "system",
34846
+ addonId: null,
34847
+ access: "view"
34848
+ },
34703
34849
  "storage.listLocationDeclarations": {
34704
34850
  capName: "storage",
34705
34851
  capScope: "system",
@@ -34844,6 +34990,12 @@ Object.freeze({
34844
34990
  addonId: null,
34845
34991
  access: "view"
34846
34992
  },
34993
+ "storageOccupancy.getOccupancy": {
34994
+ capName: "storage-occupancy",
34995
+ capScope: "system",
34996
+ addonId: null,
34997
+ access: "view"
34998
+ },
34847
34999
  "storageProvider.abortUpload": {
34848
35000
  capName: "storage-provider",
34849
35001
  capScope: "system",