@camstack/addon-model-studio 1.1.105 → 1.1.107

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-D6NPMtuO.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-qGmwB-68.mjs} +3 -3
  8. package/dist/model-studio.addon.js +386 -234
  9. package/dist/model-studio.addon.mjs +386 -234
  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-vRsGc6Lt.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
@@ -523,7 +523,7 @@ async function importScryptedCatalogModel(input, deps) {
523
523
  }
524
524
  }
525
525
  //#endregion
526
- //#region ../types/dist/event-category-zAv7pMUz.mjs
526
+ //#region ../types/dist/event-category-CnLqLOKs.mjs
527
527
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
528
528
  EventCategory["SystemBoot"] = "system.boot";
529
529
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -718,6 +718,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
718
718
  EventCategory["ProcessCrashed"] = "process.crashed";
719
719
  EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
720
720
  EventCategory["ProcessRestarted"] = "process.restarted";
721
+ /**
722
+ * The SET of storage locations changed — one was created, edited, enabled,
723
+ * disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
724
+ *
725
+ * Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
726
+ * it must also converge on its own periodic path, because a dropped event
727
+ * must not leave a node writing to yesterday's disk set forever. It exists
728
+ * because there was NO signal at all — an operator who added a second
729
+ * recordings disk in the admin UI got nothing, and the recorder kept its
730
+ * resolved locations until something else happened to re-resolve them
731
+ * (D387). Payload `StorageLocationsChangedPayload`.
732
+ */
733
+ EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
721
734
  EventCategory["RecordingStarted"] = "recording.started";
722
735
  EventCategory["RecordingStopped"] = "recording.stopped";
723
736
  EventCategory["RecordingError"] = "recording.error";
@@ -9103,6 +9116,21 @@ var StorageCleanupJobSchema = object({
9103
9116
  });
9104
9117
  var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
9105
9118
  /**
9119
+ * The one typed state of a storage location. Authoritative Zod schema — the TS
9120
+ * alias below is `z.infer<>` of it, never a second spelling.
9121
+ */
9122
+ var StorageLocationModeSchema = _enum([
9123
+ "active",
9124
+ "readonly",
9125
+ "drain",
9126
+ "disabled"
9127
+ ]);
9128
+ _enum([
9129
+ "normal",
9130
+ "never",
9131
+ "drain"
9132
+ ]);
9133
+ /**
9106
9134
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9107
9135
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9108
9136
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9168,6 +9196,21 @@ var StorageLocationSchema = object({
9168
9196
  * stops existing rather than being re-derived on every read.
9169
9197
  */
9170
9198
  enabled: boolean().optional(),
9199
+ /**
9200
+ * THE state of this location (D385), and the only authority on what may be
9201
+ * written, read or evicted here. Interpreted in exactly one place —
9202
+ * `storage-location-mode.ts` — which also folds the legacy
9203
+ * `enabled` / `config.readOnly` pair into a mode so an old row is never
9204
+ * ambiguous.
9205
+ *
9206
+ * OPTIONAL only for the wire and for rows written before D385: absence is
9207
+ * resolved by `resolveLocationMode`, and the orchestrator stamps every
9208
+ * unstamped row ONCE at hydrate so absence stops existing rather than being
9209
+ * re-derived on every read. `enabled` survives one release as a DERIVED
9210
+ * mirror (`mode === 'active'`); `withLocationMode` is the only writer of
9211
+ * either, so the two cannot disagree.
9212
+ */
9213
+ mode: StorageLocationModeSchema.optional(),
9171
9214
  /** COMPUTED at read time by the orchestrator (statfs of the backing volume
9172
9215
  * for node-local locations it can reach) — never persisted, absent when the
9173
9216
  * volume is remote/unreachable. The single capacity truth every UI reads. */
@@ -9175,11 +9218,46 @@ var StorageLocationSchema = object({
9175
9218
  totalBytes: number(),
9176
9219
  availableBytes: number()
9177
9220
  }).nullable().optional(),
9221
+ /**
9222
+ * How much of that volume CamStack ITSELF holds on this location (D388) —
9223
+ * COMPUTED at read time from the `storage-occupancy` providers' own figures,
9224
+ * never persisted, never a filesystem walk.
9225
+ *
9226
+ * **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
9227
+ * location yet — nobody stores here, the owning addon is down, or the first
9228
+ * refresh has not completed. A UI must omit the segment rather than draw it
9229
+ * at zero, which would claim we occupy nothing (D315). It is an OBJECT and
9230
+ * not a bare number precisely so that a `?? 0` on the consuming side has to
9231
+ * be spelled out loud instead of appearing by accident.
9232
+ *
9233
+ * `measuredAtMs` is the OLDEST contributing measurement, so it is honest
9234
+ * about the whole figure rather than about its freshest part.
9235
+ */
9236
+ owned: object({
9237
+ bytes: number().int().nonnegative(),
9238
+ measuredAtMs: number().int().nonnegative()
9239
+ }).optional(),
9178
9240
  createdAt: number(),
9179
9241
  updatedAt: number()
9180
9242
  });
9181
9243
  object({ isDefault: boolean().optional() });
9182
9244
  /**
9245
+ * How far a `drain` has got (D386) — the read a UI renders, and nothing more.
9246
+ *
9247
+ * `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
9248
+ * OBSERVED and is `null` when it has observed none. Never a fabricated date: a
9249
+ * drain with no observed growth has no honest ETA, and inventing one is how an
9250
+ * operator learns not to believe the screen.
9251
+ */
9252
+ var StorageDrainProgressSchema = object({
9253
+ locationId: string(),
9254
+ startedAtMs: number(),
9255
+ startBytes: number(),
9256
+ bytesRemaining: number(),
9257
+ drained: boolean(),
9258
+ estimatedEmptyAtMs: number().nullable()
9259
+ });
9260
+ /**
9183
9261
  * Reference accepted by consumer-facing `api.storage.*` calls.
9184
9262
  * Either:
9185
9263
  * - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
@@ -20682,8 +20760,25 @@ var occupancyRecheckFramesField = {
20682
20760
  * (analyzer attaches detected `regions[]`; onboard does not — the
20683
20761
  * camera typically only reports a binary signal plus an optional
20684
20762
  * channel/AI class which lives in dedicated event channels).
20685
- */
20686
- var MotionSourceEnum = _enum(["onboard", "analyzer"]);
20763
+ *
20764
+ * - `onboard` — the camera's firmware said something moved.
20765
+ * - `analyzer` — this runner's frame-diff said so, and attaches `regions[]`.
20766
+ * - `device-activity` — the DEVICE said it is doing its job: the
20767
+ * `recording-signal` LEVEL the same device raises for the recorder
20768
+ * ([D380](../../../../docs/decisions/adr-0380-a-device-decided-recording-is-a-mode-with-no-schedule-seeded-once.md)),
20769
+ * republished as a motion source. It attaches **nothing** — no regions, no
20770
+ * class: the only fact it carries is that the device is active, and a robot
20771
+ * vacuum that is itself the moving object has no region worth sending. It is
20772
+ * a LEVEL, so unlike `onboard` it has a real falling edge, and unlike
20773
+ * `analyzer` it must not open the frame-diff side-channel — the runner's
20774
+ * `handleOnboardMotionAnalyzer` gate is `source === 'onboard'` and stays that
20775
+ * way ([D392](../../../../docs/decisions/adr-0392-a-device-that-says-it-is-working-is-a-motion-source-of-its-own.md)).
20776
+ */
20777
+ var MotionSourceEnum = _enum([
20778
+ "onboard",
20779
+ "analyzer",
20780
+ "device-activity"
20781
+ ]);
20687
20782
  /**
20688
20783
  * List of motion sources active on a camera. Empty array is valid:
20689
20784
  * "no source" — happens for battery cams without firmware motion when
@@ -22202,7 +22297,7 @@ method(object({
22202
22297
  }), _void(), {
22203
22298
  kind: "mutation",
22204
22299
  auth: "admin"
22205
- }), method(object({ id: string() }), object({
22300
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
22206
22301
  ok: boolean(),
22207
22302
  error: string().optional()
22208
22303
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -22272,6 +22367,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
22272
22367
  kind: "mutation",
22273
22368
  auth: "admin"
22274
22369
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22370
+ /**
22371
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22372
+ * location (D388).
22373
+ *
22374
+ * ## Why this is not `storage-evictable`
22375
+ *
22376
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22377
+ * not, in two ways that both matter and both bite hardest on the locations an
22378
+ * operator most wants a figure for:
22379
+ *
22380
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22381
+ * and `recordingsLow:default` deliberately share one root and evict as one
22382
+ * oldest-first pool, so both answer with the SAME combined total. As an
22383
+ * occupancy figure that double-counts the disk.
22384
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22385
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22386
+ * is retiring and staring at.
22387
+ *
22388
+ * So this is its own contract with its own quantity, and the quantity is
22389
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22390
+ * would ever be willing to delete it. A provider that can only answer
22391
+ * "evictable" must not register here — a number that silently means different
22392
+ * things per class is worse than no number.
22393
+ *
22394
+ * ## Absence is an answer
22395
+ *
22396
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22397
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22398
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22399
+ * consuming side has to be written out loud instead of appearing by accident.
22400
+ *
22401
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22402
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22403
+ */
22404
+ /** One provider's occupancy answer for one location. */
22405
+ var StorageOccupancyReportSchema = object({
22406
+ locationId: string(),
22407
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22408
+ * not net of what it is willing to delete. */
22409
+ ownedBytes: number().int().nonnegative(),
22410
+ /** When the provider last actually measured this. The orchestrator carries it
22411
+ * through so a UI can say how old the figure is instead of implying "now". */
22412
+ measuredAtMs: number().int().nonnegative()
22413
+ });
22414
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
22275
22415
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
22276
22416
  providerId: string().min(1),
22277
22417
  displayName: string().min(1),
@@ -23907,39 +24047,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23907
24047
  deviceId: number(),
23908
24048
  status: BatteryStatusSchema
23909
24049
  });
23910
- /**
23911
- * Network-link snapshot. Same shape for every provider (a Reolink wifi
23912
- * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23913
- * plug): one slice under `device.runtimeState['network-link']`, one badge,
23914
- * one Home Assistant projection.
23915
- */
23916
- var NetworkLinkStatusSchema = object({
23917
- /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23918
- type: _enum([
23919
- "wifi",
23920
- "ethernet",
23921
- "cellular",
23922
- "unknown"
23923
- ]),
23924
- /**
23925
- * Link quality, 0..100 inclusive, normalised by the provider from whatever
23926
- * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23927
- * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23928
- * one whose reading has not landed must not be drawn at 0 %. Consumers
23929
- * SKIP a null rather than coerce it.
23930
- */
23931
- signalPercent: number().min(0).max(100).nullable(),
23932
- /** Raw received signal strength in dBm, when the firmware reports one. */
23933
- rssiDbm: number().optional(),
23934
- /** Network name of a wireless link, when the firmware reports it. */
23935
- ssid: string().optional(),
23936
- /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23937
- lastUpdated: number()
23938
- });
23939
- DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23940
- deviceId: number(),
23941
- status: NetworkLinkStatusSchema
23942
- });
23943
24050
  object({
23944
24051
  on: boolean(),
23945
24052
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26293,6 +26400,236 @@ DeviceType.Camera, method(object({
26293
26400
  detection: NativeDetectionSchema
26294
26401
  });
26295
26402
  /**
26403
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26404
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26405
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26406
+ *
26407
+ * Why a NEW cap rather than overloading `ptz`:
26408
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26409
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26410
+ * The two are different physical models: PTZ is absolute-position + presets,
26411
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26412
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26413
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26414
+ * the reverse:
26415
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26416
+ * / `getOptions`), and
26417
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26418
+ * robot camera shows up in the existing PTZ control path without every
26419
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26420
+ * not here (see the addon design note):
26421
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26422
+ * ptz.stop() → navigation.stop()
26423
+ * ptz.goHome() → navigation.runAction('goHome')
26424
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26425
+ * ptz.goToPreset(id) → navigation.runAction(id)
26426
+ *
26427
+ * ## Continuous drive
26428
+ *
26429
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26430
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26431
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26432
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26433
+ * coalesce them. The UI owns the cadence.
26434
+ *
26435
+ * ## The action dictionary
26436
+ *
26437
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26438
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26439
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26440
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26441
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26442
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26443
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26444
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26445
+ *
26446
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26447
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26448
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26449
+ * every device handle. A future nodedreame publish adds a typed
26450
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26451
+ * provider can then swap the raw calls for the typed methods with no change to
26452
+ * THIS contract.
26453
+ */
26454
+ /**
26455
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26456
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26457
+ * halts it.
26458
+ *
26459
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26460
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26461
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26462
+ * vector by it (drivers without proportional drive ignore it).
26463
+ *
26464
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26465
+ * axis alone; an all-undefined nudge is a no-op.
26466
+ */
26467
+ var NavigationMoveCommandSchema = object({
26468
+ pan: number().min(-1).max(1).optional(),
26469
+ tilt: number().min(-1).max(1).optional(),
26470
+ speed: number().min(0).max(1).optional()
26471
+ });
26472
+ /**
26473
+ * The enumerated discrete actions a navigation-capable robot can perform via
26474
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26475
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26476
+ * `playSound` (see the `sound` dictionary entries).
26477
+ */
26478
+ var NavigationActionIdSchema = _enum([
26479
+ "goHome",
26480
+ "locate",
26481
+ "spotClean",
26482
+ "findPet",
26483
+ "personFollow",
26484
+ "stop",
26485
+ "startClean",
26486
+ "pauseClean",
26487
+ "dockWash",
26488
+ "autoEmpty",
26489
+ "flashOn",
26490
+ "flashOff"
26491
+ ]);
26492
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26493
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26494
+ /**
26495
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26496
+ * native panel and the PTZ mimic render as a button.
26497
+ *
26498
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26499
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26500
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26501
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26502
+ * - `label` — operator-facing English label.
26503
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26504
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26505
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26506
+ * flips it from config, never by editing code.
26507
+ */
26508
+ var NavigationActionEntrySchema = object({
26509
+ id: string(),
26510
+ kind: NavigationEntryKindSchema,
26511
+ label: string(),
26512
+ icon: string(),
26513
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26514
+ soundId: number().int().optional(),
26515
+ /** Per-device feature flag — render this entry only when true. */
26516
+ enabled: boolean()
26517
+ });
26518
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26519
+ var NavigationPointSchema = object({
26520
+ x: number(),
26521
+ y: number()
26522
+ });
26523
+ /**
26524
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26525
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26526
+ * that are turned on for THIS device. Data-driven: the provider derives these
26527
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26528
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26529
+ * that are not dictionary entries.
26530
+ *
26531
+ * - `move` / `stop` — the momentary drive joystick.
26532
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26533
+ * map-coordinate plumbing is wired.
26534
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26535
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26536
+ * - `light` — the on/off fill-light toggle (works anytime).
26537
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26538
+ * camera-service control; needs an active stream).
26539
+ */
26540
+ var NavigationFeaturesSchema = object({
26541
+ move: boolean(),
26542
+ stop: boolean(),
26543
+ goToPoint: boolean(),
26544
+ runAction: boolean(),
26545
+ playSound: boolean(),
26546
+ light: boolean(),
26547
+ lightMode: boolean()
26548
+ });
26549
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26550
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26551
+ /**
26552
+ * Live navigation state so the UI can reflect what the robot is doing:
26553
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26554
+ * - `following` — person/pet follow is currently armed.
26555
+ * - `flash` — the on-camera fill light is on.
26556
+ * - `lightMode` — auto vs manual fill-light mode.
26557
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26558
+ * `lightMode === 'manual'`.
26559
+ */
26560
+ var NavigationStatusSchema = object({
26561
+ mode: _enum([
26562
+ "idle",
26563
+ "cleaning",
26564
+ "spot",
26565
+ "following",
26566
+ "goto",
26567
+ "returning",
26568
+ "paused",
26569
+ "unknown"
26570
+ ]),
26571
+ following: boolean(),
26572
+ flash: boolean(),
26573
+ lightMode: NavigationLightModeSchema,
26574
+ lightLevel: number().min(40).max(100),
26575
+ /** Ms epoch when the slice was last updated. */
26576
+ lastChangedAt: number()
26577
+ });
26578
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26579
+ 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({
26580
+ deviceId: number(),
26581
+ actionId: NavigationActionIdSchema
26582
+ }), _void(), { kind: "mutation" }), method(object({
26583
+ deviceId: number(),
26584
+ soundId: number().int()
26585
+ }), _void(), { kind: "mutation" }), method(object({
26586
+ deviceId: number(),
26587
+ on: boolean()
26588
+ }), _void(), { kind: "mutation" }), method(object({
26589
+ deviceId: number(),
26590
+ mode: NavigationLightModeSchema,
26591
+ level: number().min(40).max(100).optional()
26592
+ }), _void(), { kind: "mutation" }), method(object({
26593
+ deviceId: number(),
26594
+ level: number().min(40).max(100)
26595
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26596
+ deviceId: number(),
26597
+ status: NavigationStatusSchema
26598
+ });
26599
+ /**
26600
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26601
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26602
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26603
+ * one Home Assistant projection.
26604
+ */
26605
+ var NetworkLinkStatusSchema = object({
26606
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26607
+ type: _enum([
26608
+ "wifi",
26609
+ "ethernet",
26610
+ "cellular",
26611
+ "unknown"
26612
+ ]),
26613
+ /**
26614
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26615
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26616
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26617
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26618
+ * SKIP a null rather than coerce it.
26619
+ */
26620
+ signalPercent: number().min(0).max(100).nullable(),
26621
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26622
+ rssiDbm: number().optional(),
26623
+ /** Network name of a wireless link, when the firmware reports it. */
26624
+ ssid: string().optional(),
26625
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26626
+ lastUpdated: number()
26627
+ });
26628
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26629
+ deviceId: number(),
26630
+ status: NetworkLinkStatusSchema
26631
+ });
26632
+ /**
26296
26633
  * network-quality — system-scoped singleton capability tracking RTT,
26297
26634
  * jitter, and observed/peak bandwidth per device + per client.
26298
26635
  *
@@ -27534,203 +27871,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27534
27871
  deviceId: number(),
27535
27872
  status: PtzAutotrackStatusSchema
27536
27873
  });
27537
- /**
27538
- * `navigation` — a device-scoped capability that natively expresses the FULL
27539
- * navigation / action surface of a robot that DRIVES ITSELF and carries an
27540
- * on-board camera (the Dreame robot-vacuum camera is the first provider).
27541
- *
27542
- * Why a NEW cap rather than overloading `ptz`:
27543
- * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27544
- * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27545
- * The two are different physical models: PTZ is absolute-position + presets,
27546
- * navigation is momentary drive nudges + discrete robot ACTIONS
27547
- * (dock / spot-clean / follow-pet / go-to-point / …).
27548
- * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27549
- * the reverse:
27550
- * 1. a native CamStack navigation panel (data-driven from `listActions`
27551
- * / `getOptions`), and
27552
- * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27553
- * robot camera shows up in the existing PTZ control path without every
27554
- * PTZ provider learning about robots. The mapping lives in the adapter,
27555
- * not here (see the addon design note):
27556
- * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27557
- * ptz.stop() → navigation.stop()
27558
- * ptz.goHome() → navigation.runAction('goHome')
27559
- * ptz.getPresets() → navigation.listActions() (id→preset)
27560
- * ptz.goToPreset(id) → navigation.runAction(id)
27561
- *
27562
- * ## Continuous drive
27563
- *
27564
- * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27565
- * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27566
- * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27567
- * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27568
- * coalesce them. The UI owns the cadence.
27569
- *
27570
- * ## The action dictionary
27571
- *
27572
- * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27573
- * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27574
- * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27575
- * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27576
- * vendor-specific list. `kind: 'action'` entries are triggered with
27577
- * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27578
- * (the entry carries the `soundId` to pass). The general primitives — `move`,
27579
- * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27580
- *
27581
- * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27582
- * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27583
- * that the currently-published `@apocaliss92/nodedreame` already exposes on
27584
- * every device handle. A future nodedreame publish adds a typed
27585
- * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27586
- * provider can then swap the raw calls for the typed methods with no change to
27587
- * THIS contract.
27588
- */
27589
- /**
27590
- * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27591
- * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27592
- * halts it.
27593
- *
27594
- * - `pan` — turn: negative = left, positive = right, 0 = straight.
27595
- * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27596
- * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27597
- * vector by it (drivers without proportional drive ignore it).
27598
- *
27599
- * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27600
- * axis alone; an all-undefined nudge is a no-op.
27601
- */
27602
- var NavigationMoveCommandSchema = object({
27603
- pan: number().min(-1).max(1).optional(),
27604
- tilt: number().min(-1).max(1).optional(),
27605
- speed: number().min(0).max(1).optional()
27606
- });
27607
- /**
27608
- * The enumerated discrete actions a navigation-capable robot can perform via
27609
- * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27610
- * subset it supports through `listActions`. Sounds are NOT here — they go through
27611
- * `playSound` (see the `sound` dictionary entries).
27612
- */
27613
- var NavigationActionIdSchema = _enum([
27614
- "goHome",
27615
- "locate",
27616
- "spotClean",
27617
- "findPet",
27618
- "personFollow",
27619
- "stop",
27620
- "startClean",
27621
- "pauseClean",
27622
- "dockWash",
27623
- "autoEmpty",
27624
- "flashOn",
27625
- "flashOff"
27626
- ]);
27627
- /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27628
- var NavigationEntryKindSchema = _enum(["action", "sound"]);
27629
- /**
27630
- * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27631
- * native panel and the PTZ mimic render as a button.
27632
- *
27633
- * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27634
- * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27635
- * (`sound:meow`) whose `soundId` is passed to `playSound`.
27636
- * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27637
- * - `label` — operator-facing English label.
27638
- * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27639
- * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27640
- * PTZ render ONLY enabled entries. Data-driven: the provider
27641
- * flips it from config, never by editing code.
27642
- */
27643
- var NavigationActionEntrySchema = object({
27644
- id: string(),
27645
- kind: NavigationEntryKindSchema,
27646
- label: string(),
27647
- icon: string(),
27648
- /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27649
- soundId: number().int().optional(),
27650
- /** Per-device feature flag — render this entry only when true. */
27651
- enabled: boolean()
27652
- });
27653
- /** Coordinates for `goToPoint` — a point on the robot's live map. */
27654
- var NavigationPointSchema = object({
27655
- x: number(),
27656
- y: number()
27657
- });
27658
- /**
27659
- * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27660
- * The cap reports which are enabled so the UI / PTZ render only the controls
27661
- * that are turned on for THIS device. Data-driven: the provider derives these
27662
- * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27663
- * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27664
- * that are not dictionary entries.
27665
- *
27666
- * - `move` / `stop` — the momentary drive joystick.
27667
- * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27668
- * map-coordinate plumbing is wired.
27669
- * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27670
- * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27671
- * - `light` — the on/off fill-light toggle (works anytime).
27672
- * - `lightMode` — the auto/manual selector + manual level slider (a
27673
- * camera-service control; needs an active stream).
27674
- */
27675
- var NavigationFeaturesSchema = object({
27676
- move: boolean(),
27677
- stop: boolean(),
27678
- goToPoint: boolean(),
27679
- runAction: boolean(),
27680
- playSound: boolean(),
27681
- light: boolean(),
27682
- lightMode: boolean()
27683
- });
27684
- /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27685
- var NavigationLightModeSchema = _enum(["auto", "manual"]);
27686
- /**
27687
- * Live navigation state so the UI can reflect what the robot is doing:
27688
- * - `mode` — coarse activity (idle / cleaning / following / …).
27689
- * - `following` — person/pet follow is currently armed.
27690
- * - `flash` — the on-camera fill light is on.
27691
- * - `lightMode` — auto vs manual fill-light mode.
27692
- * - `lightLevel` — manual fill-light level (40..100); meaningful when
27693
- * `lightMode === 'manual'`.
27694
- */
27695
- var NavigationStatusSchema = object({
27696
- mode: _enum([
27697
- "idle",
27698
- "cleaning",
27699
- "spot",
27700
- "following",
27701
- "goto",
27702
- "returning",
27703
- "paused",
27704
- "unknown"
27705
- ]),
27706
- following: boolean(),
27707
- flash: boolean(),
27708
- lightMode: NavigationLightModeSchema,
27709
- lightLevel: number().min(40).max(100),
27710
- /** Ms epoch when the slice was last updated. */
27711
- lastChangedAt: number()
27712
- });
27713
- NavigationStatusSchema.extend({ lastFetchedAt: number() });
27714
- 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({
27715
- deviceId: number(),
27716
- actionId: NavigationActionIdSchema
27717
- }), _void(), { kind: "mutation" }), method(object({
27718
- deviceId: number(),
27719
- soundId: number().int()
27720
- }), _void(), { kind: "mutation" }), method(object({
27721
- deviceId: number(),
27722
- on: boolean()
27723
- }), _void(), { kind: "mutation" }), method(object({
27724
- deviceId: number(),
27725
- mode: NavigationLightModeSchema,
27726
- level: number().min(40).max(100).optional()
27727
- }), _void(), { kind: "mutation" }), method(object({
27728
- deviceId: number(),
27729
- level: number().min(40).max(100)
27730
- }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27731
- deviceId: number(),
27732
- status: NavigationStatusSchema
27733
- });
27734
27874
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27735
27875
  kind: "mutation",
27736
27876
  auth: "admin"
@@ -35045,6 +35185,12 @@ Object.freeze({
35045
35185
  addonId: null,
35046
35186
  access: "view"
35047
35187
  },
35188
+ "storage.listDrainProgress": {
35189
+ capName: "storage",
35190
+ capScope: "system",
35191
+ addonId: null,
35192
+ access: "view"
35193
+ },
35048
35194
  "storage.listLocationDeclarations": {
35049
35195
  capName: "storage",
35050
35196
  capScope: "system",
@@ -35189,6 +35335,12 @@ Object.freeze({
35189
35335
  addonId: null,
35190
35336
  access: "view"
35191
35337
  },
35338
+ "storageOccupancy.getOccupancy": {
35339
+ capName: "storage-occupancy",
35340
+ capScope: "system",
35341
+ addonId: null,
35342
+ access: "view"
35343
+ },
35192
35344
  "storageProvider.abortUpload": {
35193
35345
  capName: "storage-provider",
35194
35346
  capScope: "system",