@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
@@ -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
@@ -20661,8 +20739,25 @@ var occupancyRecheckFramesField = {
20661
20739
  * (analyzer attaches detected `regions[]`; onboard does not — the
20662
20740
  * camera typically only reports a binary signal plus an optional
20663
20741
  * channel/AI class which lives in dedicated event channels).
20664
- */
20665
- var MotionSourceEnum = _enum(["onboard", "analyzer"]);
20742
+ *
20743
+ * - `onboard` — the camera's firmware said something moved.
20744
+ * - `analyzer` — this runner's frame-diff said so, and attaches `regions[]`.
20745
+ * - `device-activity` — the DEVICE said it is doing its job: the
20746
+ * `recording-signal` LEVEL the same device raises for the recorder
20747
+ * ([D380](../../../../docs/decisions/adr-0380-a-device-decided-recording-is-a-mode-with-no-schedule-seeded-once.md)),
20748
+ * republished as a motion source. It attaches **nothing** — no regions, no
20749
+ * class: the only fact it carries is that the device is active, and a robot
20750
+ * vacuum that is itself the moving object has no region worth sending. It is
20751
+ * a LEVEL, so unlike `onboard` it has a real falling edge, and unlike
20752
+ * `analyzer` it must not open the frame-diff side-channel — the runner's
20753
+ * `handleOnboardMotionAnalyzer` gate is `source === 'onboard'` and stays that
20754
+ * way ([D392](../../../../docs/decisions/adr-0392-a-device-that-says-it-is-working-is-a-motion-source-of-its-own.md)).
20755
+ */
20756
+ var MotionSourceEnum = _enum([
20757
+ "onboard",
20758
+ "analyzer",
20759
+ "device-activity"
20760
+ ]);
20666
20761
  /**
20667
20762
  * List of motion sources active on a camera. Empty array is valid:
20668
20763
  * "no source" — happens for battery cams without firmware motion when
@@ -22181,7 +22276,7 @@ method(object({
22181
22276
  }), _void(), {
22182
22277
  kind: "mutation",
22183
22278
  auth: "admin"
22184
- }), method(object({ id: string() }), object({
22279
+ }), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
22185
22280
  ok: boolean(),
22186
22281
  error: string().optional()
22187
22282
  }), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
@@ -22251,6 +22346,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
22251
22346
  kind: "mutation",
22252
22347
  auth: "admin"
22253
22348
  }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
22349
+ /**
22350
+ * `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
22351
+ * location (D388).
22352
+ *
22353
+ * ## Why this is not `storage-evictable`
22354
+ *
22355
+ * `storage-evictable.getEvictableUsage` looks like the same question and is
22356
+ * not, in two ways that both matter and both bite hardest on the locations an
22357
+ * operator most wants a figure for:
22358
+ *
22359
+ * - it reports the whole eviction DOMAIN, not the location. `recordings:default`
22360
+ * and `recordingsLow:default` deliberately share one root and evict as one
22361
+ * oldest-first pool, so both answer with the SAME combined total. As an
22362
+ * occupancy figure that double-counts the disk.
22363
+ * - it reports ZERO for a location whose eviction policy is `never` (D385) —
22364
+ * a `readonly` or `disabled` disk. Those are exactly the disks an operator
22365
+ * is retiring and staring at.
22366
+ *
22367
+ * So this is its own contract with its own quantity, and the quantity is
22368
+ * OCCUPIED: every byte the addon holds on that location, whether or not it
22369
+ * would ever be willing to delete it. A provider that can only answer
22370
+ * "evictable" must not register here — a number that silently means different
22371
+ * things per class is worse than no number.
22372
+ *
22373
+ * ## Absence is an answer
22374
+ *
22375
+ * A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
22376
+ * stamps `StorageLocation.owned` only for locations it has a report for, and
22377
+ * the field is an OBJECT rather than a bare number so that a `?? 0` on the
22378
+ * consuming side has to be written out loud instead of appearing by accident.
22379
+ *
22380
+ * `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
22381
+ * a public client surface. Clients read the stamped `StorageLocation.owned`.
22382
+ */
22383
+ /** One provider's occupancy answer for one location. */
22384
+ var StorageOccupancyReportSchema = object({
22385
+ locationId: string(),
22386
+ /** Bytes this provider holds on THAT location — not its eviction domain, and
22387
+ * not net of what it is willing to delete. */
22388
+ ownedBytes: number().int().nonnegative(),
22389
+ /** When the provider last actually measured this. The orchestrator carries it
22390
+ * through so a UI can say how old the figure is instead of implying "now". */
22391
+ measuredAtMs: number().int().nonnegative()
22392
+ });
22393
+ method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
22254
22394
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
22255
22395
  providerId: string().min(1),
22256
22396
  displayName: string().min(1),
@@ -23886,39 +24026,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23886
24026
  deviceId: number(),
23887
24027
  status: BatteryStatusSchema
23888
24028
  });
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
24029
  object({
23923
24030
  on: boolean(),
23924
24031
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26272,6 +26379,236 @@ DeviceType.Camera, method(object({
26272
26379
  detection: NativeDetectionSchema
26273
26380
  });
26274
26381
  /**
26382
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26383
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26384
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26385
+ *
26386
+ * Why a NEW cap rather than overloading `ptz`:
26387
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26388
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26389
+ * The two are different physical models: PTZ is absolute-position + presets,
26390
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26391
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26392
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26393
+ * the reverse:
26394
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26395
+ * / `getOptions`), and
26396
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26397
+ * robot camera shows up in the existing PTZ control path without every
26398
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26399
+ * not here (see the addon design note):
26400
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26401
+ * ptz.stop() → navigation.stop()
26402
+ * ptz.goHome() → navigation.runAction('goHome')
26403
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26404
+ * ptz.goToPreset(id) → navigation.runAction(id)
26405
+ *
26406
+ * ## Continuous drive
26407
+ *
26408
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26409
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26410
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26411
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26412
+ * coalesce them. The UI owns the cadence.
26413
+ *
26414
+ * ## The action dictionary
26415
+ *
26416
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26417
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26418
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26419
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26420
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26421
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26422
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26423
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26424
+ *
26425
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26426
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26427
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26428
+ * every device handle. A future nodedreame publish adds a typed
26429
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26430
+ * provider can then swap the raw calls for the typed methods with no change to
26431
+ * THIS contract.
26432
+ */
26433
+ /**
26434
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26435
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26436
+ * halts it.
26437
+ *
26438
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26439
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26440
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26441
+ * vector by it (drivers without proportional drive ignore it).
26442
+ *
26443
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26444
+ * axis alone; an all-undefined nudge is a no-op.
26445
+ */
26446
+ var NavigationMoveCommandSchema = object({
26447
+ pan: number().min(-1).max(1).optional(),
26448
+ tilt: number().min(-1).max(1).optional(),
26449
+ speed: number().min(0).max(1).optional()
26450
+ });
26451
+ /**
26452
+ * The enumerated discrete actions a navigation-capable robot can perform via
26453
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26454
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26455
+ * `playSound` (see the `sound` dictionary entries).
26456
+ */
26457
+ var NavigationActionIdSchema = _enum([
26458
+ "goHome",
26459
+ "locate",
26460
+ "spotClean",
26461
+ "findPet",
26462
+ "personFollow",
26463
+ "stop",
26464
+ "startClean",
26465
+ "pauseClean",
26466
+ "dockWash",
26467
+ "autoEmpty",
26468
+ "flashOn",
26469
+ "flashOff"
26470
+ ]);
26471
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
26472
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
26473
+ /**
26474
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
26475
+ * native panel and the PTZ mimic render as a button.
26476
+ *
26477
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
26478
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
26479
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
26480
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
26481
+ * - `label` — operator-facing English label.
26482
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
26483
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
26484
+ * PTZ render ONLY enabled entries. Data-driven: the provider
26485
+ * flips it from config, never by editing code.
26486
+ */
26487
+ var NavigationActionEntrySchema = object({
26488
+ id: string(),
26489
+ kind: NavigationEntryKindSchema,
26490
+ label: string(),
26491
+ icon: string(),
26492
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
26493
+ soundId: number().int().optional(),
26494
+ /** Per-device feature flag — render this entry only when true. */
26495
+ enabled: boolean()
26496
+ });
26497
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
26498
+ var NavigationPointSchema = object({
26499
+ x: number(),
26500
+ y: number()
26501
+ });
26502
+ /**
26503
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
26504
+ * The cap reports which are enabled so the UI / PTZ render only the controls
26505
+ * that are turned on for THIS device. Data-driven: the provider derives these
26506
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
26507
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
26508
+ * that are not dictionary entries.
26509
+ *
26510
+ * - `move` / `stop` — the momentary drive joystick.
26511
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
26512
+ * map-coordinate plumbing is wired.
26513
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
26514
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
26515
+ * - `light` — the on/off fill-light toggle (works anytime).
26516
+ * - `lightMode` — the auto/manual selector + manual level slider (a
26517
+ * camera-service control; needs an active stream).
26518
+ */
26519
+ var NavigationFeaturesSchema = object({
26520
+ move: boolean(),
26521
+ stop: boolean(),
26522
+ goToPoint: boolean(),
26523
+ runAction: boolean(),
26524
+ playSound: boolean(),
26525
+ light: boolean(),
26526
+ lightMode: boolean()
26527
+ });
26528
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
26529
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
26530
+ /**
26531
+ * Live navigation state so the UI can reflect what the robot is doing:
26532
+ * - `mode` — coarse activity (idle / cleaning / following / …).
26533
+ * - `following` — person/pet follow is currently armed.
26534
+ * - `flash` — the on-camera fill light is on.
26535
+ * - `lightMode` — auto vs manual fill-light mode.
26536
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
26537
+ * `lightMode === 'manual'`.
26538
+ */
26539
+ var NavigationStatusSchema = object({
26540
+ mode: _enum([
26541
+ "idle",
26542
+ "cleaning",
26543
+ "spot",
26544
+ "following",
26545
+ "goto",
26546
+ "returning",
26547
+ "paused",
26548
+ "unknown"
26549
+ ]),
26550
+ following: boolean(),
26551
+ flash: boolean(),
26552
+ lightMode: NavigationLightModeSchema,
26553
+ lightLevel: number().min(40).max(100),
26554
+ /** Ms epoch when the slice was last updated. */
26555
+ lastChangedAt: number()
26556
+ });
26557
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
26558
+ 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({
26559
+ deviceId: number(),
26560
+ actionId: NavigationActionIdSchema
26561
+ }), _void(), { kind: "mutation" }), method(object({
26562
+ deviceId: number(),
26563
+ soundId: number().int()
26564
+ }), _void(), { kind: "mutation" }), method(object({
26565
+ deviceId: number(),
26566
+ on: boolean()
26567
+ }), _void(), { kind: "mutation" }), method(object({
26568
+ deviceId: number(),
26569
+ mode: NavigationLightModeSchema,
26570
+ level: number().min(40).max(100).optional()
26571
+ }), _void(), { kind: "mutation" }), method(object({
26572
+ deviceId: number(),
26573
+ level: number().min(40).max(100)
26574
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
26575
+ deviceId: number(),
26576
+ status: NavigationStatusSchema
26577
+ });
26578
+ /**
26579
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
26580
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
26581
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
26582
+ * one Home Assistant projection.
26583
+ */
26584
+ var NetworkLinkStatusSchema = object({
26585
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
26586
+ type: _enum([
26587
+ "wifi",
26588
+ "ethernet",
26589
+ "cellular",
26590
+ "unknown"
26591
+ ]),
26592
+ /**
26593
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
26594
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
26595
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
26596
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
26597
+ * SKIP a null rather than coerce it.
26598
+ */
26599
+ signalPercent: number().min(0).max(100).nullable(),
26600
+ /** Raw received signal strength in dBm, when the firmware reports one. */
26601
+ rssiDbm: number().optional(),
26602
+ /** Network name of a wireless link, when the firmware reports it. */
26603
+ ssid: string().optional(),
26604
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
26605
+ lastUpdated: number()
26606
+ });
26607
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
26608
+ deviceId: number(),
26609
+ status: NetworkLinkStatusSchema
26610
+ });
26611
+ /**
26275
26612
  * network-quality — system-scoped singleton capability tracking RTT,
26276
26613
  * jitter, and observed/peak bandwidth per device + per client.
26277
26614
  *
@@ -27513,203 +27850,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27513
27850
  deviceId: number(),
27514
27851
  status: PtzAutotrackStatusSchema
27515
27852
  });
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
27853
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27714
27854
  kind: "mutation",
27715
27855
  auth: "admin"
@@ -35024,6 +35164,12 @@ Object.freeze({
35024
35164
  addonId: null,
35025
35165
  access: "view"
35026
35166
  },
35167
+ "storage.listDrainProgress": {
35168
+ capName: "storage",
35169
+ capScope: "system",
35170
+ addonId: null,
35171
+ access: "view"
35172
+ },
35027
35173
  "storage.listLocationDeclarations": {
35028
35174
  capName: "storage",
35029
35175
  capScope: "system",
@@ -35168,6 +35314,12 @@ Object.freeze({
35168
35314
  addonId: null,
35169
35315
  access: "view"
35170
35316
  },
35317
+ "storageOccupancy.getOccupancy": {
35318
+ capName: "storage-occupancy",
35319
+ capScope: "system",
35320
+ addonId: null,
35321
+ access: "view"
35322
+ },
35171
35323
  "storageProvider.abortUpload": {
35172
35324
  capName: "storage-provider",
35173
35325
  capScope: "system",