@camstack/addon-model-studio 1.1.105 → 1.1.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (18) hide show
  1. package/dist/{MotionZonesSettings-XMPoIYFu.mjs → MotionZonesSettings-B3Ws1xqb.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-DgdqloNU.mjs → PrivacyMaskSettings-D_yq7O4C.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-l-b-BPaQ.mjs → SceneMonitorEditor-6Z16a4l3.mjs} +3 -3
  4. package/dist/_stub.js +10 -10
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-21bgOzUI.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-h6h-pDo8.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DZEgYM31.mjs +26 -0
  7. package/dist/{hostInit-BW9e3qS4.mjs → hostInit-uS0lw8TZ.mjs} +3 -3
  8. package/dist/model-studio.addon.js +367 -232
  9. package/dist/model-studio.addon.mjs +367 -232
  10. package/dist/{player-overlays-ZB_RSFsz.mjs → player-overlays-zjGpr2DV.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-BmCAfELM.mjs → responsive-CDob01xQ.mjs} +1 -1
  13. package/dist/{square-CKjHeCzD.mjs → square-DVxG0_w-.mjs} +1 -1
  14. package/dist/{trash-2-ChmGdZRL.mjs → trash-2-BgbLMJP2.mjs} +1 -1
  15. package/dist/{use-device-snapshot-j7AfuCt4.mjs → use-device-snapshot-esDPfd9B.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-BwQ-YWk-.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CdPBo7mj.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-aHUvVOD2.mjs +0 -26
@@ -502,7 +502,7 @@ async function importScryptedCatalogModel(input, deps) {
502
502
  }
503
503
  }
504
504
  //#endregion
505
- //#region ../types/dist/event-category-zAv7pMUz.mjs
505
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
506
506
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
507
507
  EventCategory["SystemBoot"] = "system.boot";
508
508
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -697,6 +697,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
697
697
  EventCategory["ProcessCrashed"] = "process.crashed";
698
698
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
699
699
  EventCategory["ProcessRestarted"] = "process.restarted";
700
+ /**
701
+ * The SET of storage locations changed — one was created, edited, enabled,
702
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
703
+ *
704
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
705
+ * it must also converge on its own periodic path, because a dropped event
706
+ * must not leave a node writing to yesterday's disk set forever. It exists
707
+ * because there was NO signal at all — an operator who added a second
708
+ * recordings disk in the admin UI got nothing, and the recorder kept its
709
+ * resolved locations until something else happened to re-resolve them
710
+ * (D387). Payload `StorageLocationsChangedPayload`.
711
+ */
712
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
700
713
  EventCategory["RecordingStarted"] = "recording.started";
701
714
  EventCategory["RecordingStopped"] = "recording.stopped";
702
715
  EventCategory["RecordingError"] = "recording.error";
@@ -9082,6 +9095,21 @@ var StorageCleanupJobSchema = object({
9082
9095
  });
9083
9096
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
9084
9097
  /**
9098
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
9099
+ * alias below is `z.infer<>` of it, never a second spelling.
9100
+ */
9101
+ var StorageLocationModeSchema = _enum([
9102
+ "active",
9103
+ "readonly",
9104
+ "drain",
9105
+ "disabled"
9106
+ ]);
9107
+ _enum([
9108
+ "normal",
9109
+ "never",
9110
+ "drain"
9111
+ ]);
9112
+ /**
9085
9113
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9086
9114
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9087
9115
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9147,6 +9175,21 @@ var StorageLocationSchema = object({
9147
9175
  * stops existing rather than being re-derived on every read.
9148
9176
  */
9149
9177
  enabled: boolean().optional(),
9178
+ /**
9179
+ * THE state of this location (D385), and the only authority on what may be
9180
+ * written, read or evicted here. Interpreted in exactly one place —
9181
+ * `storage-location-mode.ts` — which also folds the legacy
9182
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
9183
+ * ambiguous.
9184
+ *
9185
+ * OPTIONAL only for the wire and for rows written before D385: absence is
9186
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
9187
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
9188
+ * re-derived on every read. `enabled` survives one release as a DERIVED
9189
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
9190
+ * either, so the two cannot disagree.
9191
+ */
9192
+ mode: StorageLocationModeSchema.optional(),
9150
9193
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
9151
9194
  * for node-local locations it can reach) — never persisted, absent when the
9152
9195
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -9154,11 +9197,46 @@ var StorageLocationSchema = object({
9154
9197
  totalBytes: number(),
9155
9198
  availableBytes: number()
9156
9199
  }).nullable().optional(),
9200
+ /**
9201
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
9202
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
9203
+ * never persisted, never a filesystem walk.
9204
+ *
9205
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
9206
+ * location yet — nobody stores here, the owning addon is down, or the first
9207
+ * refresh has not completed. A UI must omit the segment rather than draw it
9208
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
9209
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
9210
+ * be spelled out loud instead of appearing by accident.
9211
+ *
9212
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
9213
+ * about the whole figure rather than about its freshest part.
9214
+ */
9215
+ owned: object({
9216
+ bytes: number().int().nonnegative(),
9217
+ measuredAtMs: number().int().nonnegative()
9218
+ }).optional(),
9157
9219
  createdAt: number(),
9158
9220
  updatedAt: number()
9159
9221
  });
9160
9222
  object({ isDefault: boolean().optional() });
9161
9223
  /**
9224
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
9225
+ *
9226
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
9227
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
9228
+ * drain with no observed growth has no honest ETA, and inventing one is how an
9229
+ * operator learns not to believe the screen.
9230
+ */
9231
+ var StorageDrainProgressSchema = object({
9232
+ locationId: string(),
9233
+ startedAtMs: number(),
9234
+ startBytes: number(),
9235
+ bytesRemaining: number(),
9236
+ drained: boolean(),
9237
+ estimatedEmptyAtMs: number().nullable()
9238
+ });
9239
+ /**
9162
9240
  * Reference accepted by consumer-facing `api.storage.*` calls.
9163
9241
  * Either:
9164
9242
  * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
@@ -22181,7 +22259,7 @@ method(object({
22181
22259
  }), _void(), {
22182
22260
  kind: "mutation",
22183
22261
  auth: "admin"
22184
- }), method(object({ id: string() }), object({
22262
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
22185
22263
  ok: boolean(),
22186
22264
  error: string().optional()
22187
22265
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -22251,6 +22329,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
22251
22329
  kind: "mutation",
22252
22330
  auth: "admin"
22253
22331
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22332
+ /**
22333
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22334
+ * location (D388).
22335
+ *
22336
+ * ## Why this is not `storage-evictable`
22337
+ *
22338
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22339
+ * not, in two ways that both matter and both bite hardest on the locations an
22340
+ * operator most wants a figure for:
22341
+ *
22342
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22343
+ * and `recordingsLow:default` deliberately share one root and evict as one
22344
+ * oldest-first pool, so both answer with the SAME combined total. As an
22345
+ * occupancy figure that double-counts the disk.
22346
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22347
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22348
+ * is retiring and staring at.
22349
+ *
22350
+ * So this is its own contract with its own quantity, and the quantity is
22351
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22352
+ * would ever be willing to delete it. A provider that can only answer
22353
+ * "evictable" must not register here — a number that silently means different
22354
+ * things per class is worse than no number.
22355
+ *
22356
+ * ## Absence is an answer
22357
+ *
22358
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22359
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22360
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22361
+ * consuming side has to be written out loud instead of appearing by accident.
22362
+ *
22363
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22364
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22365
+ */
22366
+ /** One provider's occupancy answer for one location. */
22367
+ var StorageOccupancyReportSchema = object({
22368
+ locationId: string(),
22369
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22370
+ * not net of what it is willing to delete. */
22371
+ ownedBytes: number().int().nonnegative(),
22372
+ /** When the provider last actually measured this. The orchestrator carries it
22373
+ * through so a UI can say how old the figure is instead of implying "now". */
22374
+ measuredAtMs: number().int().nonnegative()
22375
+ });
22376
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
22254
22377
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
22255
22378
  providerId: string().min(1),
22256
22379
  displayName: string().min(1),
@@ -23886,39 +24009,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23886
24009
  deviceId: number(),
23887
24010
  status: BatteryStatusSchema
23888
24011
  });
23889
- /**
23890
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23891
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23892
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23893
- * one Home Assistant projection.
23894
- */
23895
- var NetworkLinkStatusSchema = object({
23896
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23897
- type: _enum([
23898
- "wifi",
23899
- "ethernet",
23900
- "cellular",
23901
- "unknown"
23902
- ]),
23903
- /**
23904
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23905
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23906
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23907
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23908
- * SKIP a null rather than coerce it.
23909
- */
23910
- signalPercent: number().min(0).max(100).nullable(),
23911
- /** Raw received signal strength in dBm, when the firmware reports one. */
23912
- rssiDbm: number().optional(),
23913
- /** Network name of a wireless link, when the firmware reports it. */
23914
- ssid: string().optional(),
23915
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23916
- lastUpdated: number()
23917
- });
23918
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23919
- deviceId: number(),
23920
- status: NetworkLinkStatusSchema
23921
- });
23922
24012
  object({
23923
24013
  on: boolean(),
23924
24014
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26272,6 +26362,236 @@ DeviceType.Camera, method(object({
26272
26362
  detection: NativeDetectionSchema
26273
26363
  });
26274
26364
  /**
26365
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26366
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26367
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26368
+ *
26369
+ * Why a NEW cap rather than overloading `ptz`:
26370
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26371
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26372
+ * The two are different physical models: PTZ is absolute-position + presets,
26373
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26374
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26375
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26376
+ * the reverse:
26377
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26378
+ * / `getOptions`), and
26379
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26380
+ * robot camera shows up in the existing PTZ control path without every
26381
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26382
+ * not here (see the addon design note):
26383
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26384
+ * ptz.stop() → navigation.stop()
26385
+ * ptz.goHome() → navigation.runAction('goHome')
26386
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26387
+ * ptz.goToPreset(id) → navigation.runAction(id)
26388
+ *
26389
+ * ## Continuous drive
26390
+ *
26391
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26392
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26393
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26394
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26395
+ * coalesce them. The UI owns the cadence.
26396
+ *
26397
+ * ## The action dictionary
26398
+ *
26399
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26400
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26401
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26402
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26403
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26404
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26405
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26406
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26407
+ *
26408
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26409
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26410
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26411
+ * every device handle. A future nodedreame publish adds a typed
26412
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26413
+ * provider can then swap the raw calls for the typed methods with no change to
26414
+ * THIS contract.
26415
+ */
26416
+ /**
26417
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26418
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26419
+ * halts it.
26420
+ *
26421
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26422
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26423
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26424
+ * vector by it (drivers without proportional drive ignore it).
26425
+ *
26426
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26427
+ * axis alone; an all-undefined nudge is a no-op.
26428
+ */
26429
+ var NavigationMoveCommandSchema = object({
26430
+ pan: number().min(-1).max(1).optional(),
26431
+ tilt: number().min(-1).max(1).optional(),
26432
+ speed: number().min(0).max(1).optional()
26433
+ });
26434
+ /**
26435
+ * The enumerated discrete actions a navigation-capable robot can perform via
26436
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26437
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26438
+ * `playSound` (see the `sound` dictionary entries).
26439
+ */
26440
+ var NavigationActionIdSchema = _enum([
26441
+ "goHome",
26442
+ "locate",
26443
+ "spotClean",
26444
+ "findPet",
26445
+ "personFollow",
26446
+ "stop",
26447
+ "startClean",
26448
+ "pauseClean",
26449
+ "dockWash",
26450
+ "autoEmpty",
26451
+ "flashOn",
26452
+ "flashOff"
26453
+ ]);
26454
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26455
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26456
+ /**
26457
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26458
+ * native panel and the PTZ mimic render as a button.
26459
+ *
26460
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26461
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26462
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26463
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26464
+ * - `label` — operator-facing English label.
26465
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26466
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26467
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26468
+ * flips it from config, never by editing code.
26469
+ */
26470
+ var NavigationActionEntrySchema = object({
26471
+ id: string(),
26472
+ kind: NavigationEntryKindSchema,
26473
+ label: string(),
26474
+ icon: string(),
26475
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26476
+ soundId: number().int().optional(),
26477
+ /** Per-device feature flag — render this entry only when true. */
26478
+ enabled: boolean()
26479
+ });
26480
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26481
+ var NavigationPointSchema = object({
26482
+ x: number(),
26483
+ y: number()
26484
+ });
26485
+ /**
26486
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26487
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26488
+ * that are turned on for THIS device. Data-driven: the provider derives these
26489
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26490
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26491
+ * that are not dictionary entries.
26492
+ *
26493
+ * - `move` / `stop` — the momentary drive joystick.
26494
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26495
+ * map-coordinate plumbing is wired.
26496
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26497
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26498
+ * - `light` — the on/off fill-light toggle (works anytime).
26499
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26500
+ * camera-service control; needs an active stream).
26501
+ */
26502
+ var NavigationFeaturesSchema = object({
26503
+ move: boolean(),
26504
+ stop: boolean(),
26505
+ goToPoint: boolean(),
26506
+ runAction: boolean(),
26507
+ playSound: boolean(),
26508
+ light: boolean(),
26509
+ lightMode: boolean()
26510
+ });
26511
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26512
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26513
+ /**
26514
+ * Live navigation state so the UI can reflect what the robot is doing:
26515
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26516
+ * - `following` — person/pet follow is currently armed.
26517
+ * - `flash` — the on-camera fill light is on.
26518
+ * - `lightMode` — auto vs manual fill-light mode.
26519
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26520
+ * `lightMode === 'manual'`.
26521
+ */
26522
+ var NavigationStatusSchema = object({
26523
+ mode: _enum([
26524
+ "idle",
26525
+ "cleaning",
26526
+ "spot",
26527
+ "following",
26528
+ "goto",
26529
+ "returning",
26530
+ "paused",
26531
+ "unknown"
26532
+ ]),
26533
+ following: boolean(),
26534
+ flash: boolean(),
26535
+ lightMode: NavigationLightModeSchema,
26536
+ lightLevel: number().min(40).max(100),
26537
+ /** Ms epoch when the slice was last updated. */
26538
+ lastChangedAt: number()
26539
+ });
26540
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26541
+ 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({
26542
+ deviceId: number(),
26543
+ actionId: NavigationActionIdSchema
26544
+ }), _void(), { kind: "mutation" }), method(object({
26545
+ deviceId: number(),
26546
+ soundId: number().int()
26547
+ }), _void(), { kind: "mutation" }), method(object({
26548
+ deviceId: number(),
26549
+ on: boolean()
26550
+ }), _void(), { kind: "mutation" }), method(object({
26551
+ deviceId: number(),
26552
+ mode: NavigationLightModeSchema,
26553
+ level: number().min(40).max(100).optional()
26554
+ }), _void(), { kind: "mutation" }), method(object({
26555
+ deviceId: number(),
26556
+ level: number().min(40).max(100)
26557
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26558
+ deviceId: number(),
26559
+ status: NavigationStatusSchema
26560
+ });
26561
+ /**
26562
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26563
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26564
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26565
+ * one Home Assistant projection.
26566
+ */
26567
+ var NetworkLinkStatusSchema = object({
26568
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26569
+ type: _enum([
26570
+ "wifi",
26571
+ "ethernet",
26572
+ "cellular",
26573
+ "unknown"
26574
+ ]),
26575
+ /**
26576
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26577
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26578
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26579
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26580
+ * SKIP a null rather than coerce it.
26581
+ */
26582
+ signalPercent: number().min(0).max(100).nullable(),
26583
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26584
+ rssiDbm: number().optional(),
26585
+ /** Network name of a wireless link, when the firmware reports it. */
26586
+ ssid: string().optional(),
26587
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26588
+ lastUpdated: number()
26589
+ });
26590
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26591
+ deviceId: number(),
26592
+ status: NetworkLinkStatusSchema
26593
+ });
26594
+ /**
26275
26595
  * network-quality — system-scoped singleton capability tracking RTT,
26276
26596
  * jitter, and observed/peak bandwidth per device + per client.
26277
26597
  *
@@ -27513,203 +27833,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27513
27833
  deviceId: number(),
27514
27834
  status: PtzAutotrackStatusSchema
27515
27835
  });
27516
- /**
27517
- * `navigation` — a device-scoped capability that natively expresses the FULL
27518
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27519
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27520
- *
27521
- * Why a NEW cap rather than overloading `ptz`:
27522
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27523
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27524
- * The two are different physical models: PTZ is absolute-position + presets,
27525
- * navigation is momentary drive nudges + discrete robot ACTIONS
27526
- * (dock / spot-clean / follow-pet / go-to-point / …).
27527
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27528
- * the reverse:
27529
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27530
- * / `getOptions`), and
27531
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27532
- * robot camera shows up in the existing PTZ control path without every
27533
- * PTZ provider learning about robots. The mapping lives in the adapter,
27534
- * not here (see the addon design note):
27535
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27536
- * ptz.stop() → navigation.stop()
27537
- * ptz.goHome() → navigation.runAction('goHome')
27538
- * ptz.getPresets() → navigation.listActions() (id→preset)
27539
- * ptz.goToPreset(id) → navigation.runAction(id)
27540
- *
27541
- * ## Continuous drive
27542
- *
27543
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27544
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27545
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27546
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27547
- * coalesce them. The UI owns the cadence.
27548
- *
27549
- * ## The action dictionary
27550
- *
27551
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27552
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27553
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27554
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27555
- * vendor-specific list. `kind: 'action'` entries are triggered with
27556
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27557
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27558
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27559
- *
27560
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27561
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27562
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27563
- * every device handle. A future nodedreame publish adds a typed
27564
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27565
- * provider can then swap the raw calls for the typed methods with no change to
27566
- * THIS contract.
27567
- */
27568
- /**
27569
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27570
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27571
- * halts it.
27572
- *
27573
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27574
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27575
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27576
- * vector by it (drivers without proportional drive ignore it).
27577
- *
27578
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27579
- * axis alone; an all-undefined nudge is a no-op.
27580
- */
27581
- var NavigationMoveCommandSchema = object({
27582
- pan: number().min(-1).max(1).optional(),
27583
- tilt: number().min(-1).max(1).optional(),
27584
- speed: number().min(0).max(1).optional()
27585
- });
27586
- /**
27587
- * The enumerated discrete actions a navigation-capable robot can perform via
27588
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27589
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27590
- * `playSound` (see the `sound` dictionary entries).
27591
- */
27592
- var NavigationActionIdSchema = _enum([
27593
- "goHome",
27594
- "locate",
27595
- "spotClean",
27596
- "findPet",
27597
- "personFollow",
27598
- "stop",
27599
- "startClean",
27600
- "pauseClean",
27601
- "dockWash",
27602
- "autoEmpty",
27603
- "flashOn",
27604
- "flashOff"
27605
- ]);
27606
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27607
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27608
- /**
27609
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27610
- * native panel and the PTZ mimic render as a button.
27611
- *
27612
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27613
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27614
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27615
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27616
- * - `label` — operator-facing English label.
27617
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27618
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27619
- * PTZ render ONLY enabled entries. Data-driven: the provider
27620
- * flips it from config, never by editing code.
27621
- */
27622
- var NavigationActionEntrySchema = object({
27623
- id: string(),
27624
- kind: NavigationEntryKindSchema,
27625
- label: string(),
27626
- icon: string(),
27627
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27628
- soundId: number().int().optional(),
27629
- /** Per-device feature flag — render this entry only when true. */
27630
- enabled: boolean()
27631
- });
27632
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27633
- var NavigationPointSchema = object({
27634
- x: number(),
27635
- y: number()
27636
- });
27637
- /**
27638
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27639
- * The cap reports which are enabled so the UI / PTZ render only the controls
27640
- * that are turned on for THIS device. Data-driven: the provider derives these
27641
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27642
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27643
- * that are not dictionary entries.
27644
- *
27645
- * - `move` / `stop` — the momentary drive joystick.
27646
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27647
- * map-coordinate plumbing is wired.
27648
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27649
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27650
- * - `light` — the on/off fill-light toggle (works anytime).
27651
- * - `lightMode` — the auto/manual selector + manual level slider (a
27652
- * camera-service control; needs an active stream).
27653
- */
27654
- var NavigationFeaturesSchema = object({
27655
- move: boolean(),
27656
- stop: boolean(),
27657
- goToPoint: boolean(),
27658
- runAction: boolean(),
27659
- playSound: boolean(),
27660
- light: boolean(),
27661
- lightMode: boolean()
27662
- });
27663
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27664
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27665
- /**
27666
- * Live navigation state so the UI can reflect what the robot is doing:
27667
- * - `mode` — coarse activity (idle / cleaning / following / …).
27668
- * - `following` — person/pet follow is currently armed.
27669
- * - `flash` — the on-camera fill light is on.
27670
- * - `lightMode` — auto vs manual fill-light mode.
27671
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27672
- * `lightMode === 'manual'`.
27673
- */
27674
- var NavigationStatusSchema = object({
27675
- mode: _enum([
27676
- "idle",
27677
- "cleaning",
27678
- "spot",
27679
- "following",
27680
- "goto",
27681
- "returning",
27682
- "paused",
27683
- "unknown"
27684
- ]),
27685
- following: boolean(),
27686
- flash: boolean(),
27687
- lightMode: NavigationLightModeSchema,
27688
- lightLevel: number().min(40).max(100),
27689
- /** Ms epoch when the slice was last updated. */
27690
- lastChangedAt: number()
27691
- });
27692
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27693
- 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({
27694
- deviceId: number(),
27695
- actionId: NavigationActionIdSchema
27696
- }), _void(), { kind: "mutation" }), method(object({
27697
- deviceId: number(),
27698
- soundId: number().int()
27699
- }), _void(), { kind: "mutation" }), method(object({
27700
- deviceId: number(),
27701
- on: boolean()
27702
- }), _void(), { kind: "mutation" }), method(object({
27703
- deviceId: number(),
27704
- mode: NavigationLightModeSchema,
27705
- level: number().min(40).max(100).optional()
27706
- }), _void(), { kind: "mutation" }), method(object({
27707
- deviceId: number(),
27708
- level: number().min(40).max(100)
27709
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27710
- deviceId: number(),
27711
- status: NavigationStatusSchema
27712
- });
27713
27836
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27714
27837
  kind: "mutation",
27715
27838
  auth: "admin"
@@ -35024,6 +35147,12 @@ Object.freeze({
35024
35147
  addonId: null,
35025
35148
  access: "view"
35026
35149
  },
35150
+ "storage.listDrainProgress": {
35151
+ capName: "storage",
35152
+ capScope: "system",
35153
+ addonId: null,
35154
+ access: "view"
35155
+ },
35027
35156
  "storage.listLocationDeclarations": {
35028
35157
  capName: "storage",
35029
35158
  capScope: "system",
@@ -35168,6 +35297,12 @@ Object.freeze({
35168
35297
  addonId: null,
35169
35298
  access: "view"
35170
35299
  },
35300
+ "storageOccupancy.getOccupancy": {
35301
+ capName: "storage-occupancy",
35302
+ capScope: "system",
35303
+ addonId: null,
35304
+ access: "view"
35305
+ },
35171
35306
  "storageProvider.abortUpload": {
35172
35307
  capName: "storage-provider",
35173
35308
  capScope: "system",