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