@camstack/addon-export-google 0.1.43 → 0.1.45

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