@camstack/addon-model-studio 1.1.94 → 1.1.96

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 (23) hide show
  1. package/dist/{MotionZonesSettings-fbIAPTJ4.mjs → MotionZonesSettings-DRNY3gjc.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-BM7hoxyT.mjs → PrivacyMaskSettings-CZShuio4.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-Br30owGv.mjs → SceneMonitorEditor-ChvcbpBu.mjs} +3 -3
  4. package/dist/_stub.js +11 -11
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BKiro8SY.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BK1kKyXr.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-odws4W0h.mjs +26 -0
  7. package/dist/addon-model-studio.css +1 -1
  8. package/dist/{hostInit-DvJgZuN3.mjs → hostInit-BFhzkJeV.mjs} +3 -3
  9. package/dist/model-studio.addon.js +348 -1
  10. package/dist/model-studio.addon.mjs +348 -1
  11. package/dist/{player-overlays-DVZo-EfK.mjs → player-overlays-CxfLzphX.mjs} +1 -1
  12. package/dist/remoteEntry.js +1 -1
  13. package/dist/{responsive-Bty7_dkl.mjs → responsive-ykWObjYe.mjs} +1 -1
  14. package/dist/{square-BxRlc4T1.mjs → square-DRd2mk8z.mjs} +1 -1
  15. package/dist/{trash-2-DCKjCVTy.mjs → trash-2-B1e_7Yr-.mjs} +1 -1
  16. package/dist/{use-device-snapshot-CbhPZ9Pp.mjs → use-device-snapshot-Dx2mS9rn.mjs} +1 -1
  17. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CHASZHpa.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-DmMDWFUx.mjs} +1 -1
  18. package/package.json +1 -1
  19. package/dist/_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-g0mWdKPD.mjs +0 -26
  20. package/python/__pycache__/convert.cpython-314.pyc +0 -0
  21. package/python/__pycache__/convert_lib.cpython-312.pyc +0 -0
  22. package/python/__pycache__/convert_lib.cpython-314.pyc +0 -0
  23. package/python/__tests__/__pycache__/test_convert_lib.cpython-314.pyc +0 -0
@@ -523,7 +523,7 @@ async function importScryptedCatalogModel(input, deps) {
523
523
  }
524
524
  }
525
525
  //#endregion
526
- //#region ../types/dist/event-category-BZL-fdNj.mjs
526
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
527
527
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
528
528
  EventCategory["SystemBoot"] = "system.boot";
529
529
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -895,6 +895,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
895
895
  */
896
896
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
897
897
  /**
898
+ * Cap event fired by every device that registers the `network-link`
899
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
900
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
901
+ * reading that moved.
902
+ */
903
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
904
+ /**
898
905
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
899
906
  * "wake in progress" window — between the Baichuan wake-up issue and
900
907
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -23810,6 +23817,39 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23810
23817
  deviceId: number(),
23811
23818
  status: BatteryStatusSchema
23812
23819
  });
23820
+ /**
23821
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23822
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23823
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23824
+ * one Home Assistant projection.
23825
+ */
23826
+ var NetworkLinkStatusSchema = object({
23827
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23828
+ type: _enum([
23829
+ "wifi",
23830
+ "ethernet",
23831
+ "cellular",
23832
+ "unknown"
23833
+ ]),
23834
+ /**
23835
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23836
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23837
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23838
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23839
+ * SKIP a null rather than coerce it.
23840
+ */
23841
+ signalPercent: number().min(0).max(100).nullable(),
23842
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23843
+ rssiDbm: number().optional(),
23844
+ /** Network name of a wireless link, when the firmware reports it. */
23845
+ ssid: string().optional(),
23846
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23847
+ lastUpdated: number()
23848
+ });
23849
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23850
+ deviceId: number(),
23851
+ status: NetworkLinkStatusSchema
23852
+ });
23813
23853
  object({
23814
23854
  on: boolean(),
23815
23855
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -27404,6 +27444,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
27404
27444
  deviceId: number(),
27405
27445
  status: PtzAutotrackStatusSchema
27406
27446
  });
27447
+ /**
27448
+ * `navigation` — a device-scoped capability that natively expresses the FULL
27449
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
27450
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
27451
+ *
27452
+ * Why a NEW cap rather than overloading `ptz`:
27453
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27454
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27455
+ * The two are different physical models: PTZ is absolute-position + presets,
27456
+ * navigation is momentary drive nudges + discrete robot ACTIONS
27457
+ * (dock / spot-clean / follow-pet / go-to-point / …).
27458
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27459
+ * the reverse:
27460
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
27461
+ * / `getOptions`), and
27462
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27463
+ * robot camera shows up in the existing PTZ control path without every
27464
+ * PTZ provider learning about robots. The mapping lives in the adapter,
27465
+ * not here (see the addon design note):
27466
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27467
+ * ptz.stop() → navigation.stop()
27468
+ * ptz.goHome() → navigation.runAction('goHome')
27469
+ * ptz.getPresets() → navigation.listActions() (id→preset)
27470
+ * ptz.goToPreset(id) → navigation.runAction(id)
27471
+ *
27472
+ * ## Continuous drive
27473
+ *
27474
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27475
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27476
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27477
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27478
+ * coalesce them. The UI owns the cadence.
27479
+ *
27480
+ * ## The action dictionary
27481
+ *
27482
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27483
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27484
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27485
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27486
+ * vendor-specific list. `kind: 'action'` entries are triggered with
27487
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27488
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
27489
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27490
+ *
27491
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27492
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27493
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
27494
+ * every device handle. A future nodedreame publish adds a typed
27495
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27496
+ * provider can then swap the raw calls for the typed methods with no change to
27497
+ * THIS contract.
27498
+ */
27499
+ /**
27500
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27501
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27502
+ * halts it.
27503
+ *
27504
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
27505
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27506
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27507
+ * vector by it (drivers without proportional drive ignore it).
27508
+ *
27509
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27510
+ * axis alone; an all-undefined nudge is a no-op.
27511
+ */
27512
+ var NavigationMoveCommandSchema = object({
27513
+ pan: number().min(-1).max(1).optional(),
27514
+ tilt: number().min(-1).max(1).optional(),
27515
+ speed: number().min(0).max(1).optional()
27516
+ });
27517
+ /**
27518
+ * The enumerated discrete actions a navigation-capable robot can perform via
27519
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27520
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
27521
+ * `playSound` (see the `sound` dictionary entries).
27522
+ */
27523
+ var NavigationActionIdSchema = _enum([
27524
+ "goHome",
27525
+ "locate",
27526
+ "spotClean",
27527
+ "findPet",
27528
+ "personFollow",
27529
+ "stop",
27530
+ "startClean",
27531
+ "pauseClean",
27532
+ "dockWash",
27533
+ "autoEmpty",
27534
+ "flashOn",
27535
+ "flashOff"
27536
+ ]);
27537
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27538
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27539
+ /**
27540
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27541
+ * native panel and the PTZ mimic render as a button.
27542
+ *
27543
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27544
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27545
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27546
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27547
+ * - `label` — operator-facing English label.
27548
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27549
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27550
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27551
+ * flips it from config, never by editing code.
27552
+ */
27553
+ var NavigationActionEntrySchema = object({
27554
+ id: string(),
27555
+ kind: NavigationEntryKindSchema,
27556
+ label: string(),
27557
+ icon: string(),
27558
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27559
+ soundId: number().int().optional(),
27560
+ /** Per-device feature flag — render this entry only when true. */
27561
+ enabled: boolean()
27562
+ });
27563
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27564
+ var NavigationPointSchema = object({
27565
+ x: number(),
27566
+ y: number()
27567
+ });
27568
+ /**
27569
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27570
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27571
+ * that are turned on for THIS device. Data-driven: the provider derives these
27572
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27573
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27574
+ * that are not dictionary entries.
27575
+ *
27576
+ * - `move` / `stop` — the momentary drive joystick.
27577
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27578
+ * map-coordinate plumbing is wired.
27579
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27580
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27581
+ * - `light` — the on/off fill-light toggle (works anytime).
27582
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27583
+ * camera-service control; needs an active stream).
27584
+ */
27585
+ var NavigationFeaturesSchema = object({
27586
+ move: boolean(),
27587
+ stop: boolean(),
27588
+ goToPoint: boolean(),
27589
+ runAction: boolean(),
27590
+ playSound: boolean(),
27591
+ light: boolean(),
27592
+ lightMode: boolean()
27593
+ });
27594
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27595
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27596
+ /**
27597
+ * Live navigation state so the UI can reflect what the robot is doing:
27598
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27599
+ * - `following` — person/pet follow is currently armed.
27600
+ * - `flash` — the on-camera fill light is on.
27601
+ * - `lightMode` — auto vs manual fill-light mode.
27602
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27603
+ * `lightMode === 'manual'`.
27604
+ */
27605
+ var NavigationStatusSchema = object({
27606
+ mode: _enum([
27607
+ "idle",
27608
+ "cleaning",
27609
+ "spot",
27610
+ "following",
27611
+ "goto",
27612
+ "returning",
27613
+ "paused",
27614
+ "unknown"
27615
+ ]),
27616
+ following: boolean(),
27617
+ flash: boolean(),
27618
+ lightMode: NavigationLightModeSchema,
27619
+ lightLevel: number().min(40).max(100),
27620
+ /** Ms epoch when the slice was last updated. */
27621
+ lastChangedAt: number()
27622
+ });
27623
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
27624
+ 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({
27625
+ deviceId: number(),
27626
+ actionId: NavigationActionIdSchema
27627
+ }), _void(), { kind: "mutation" }), method(object({
27628
+ deviceId: number(),
27629
+ soundId: number().int()
27630
+ }), _void(), { kind: "mutation" }), method(object({
27631
+ deviceId: number(),
27632
+ on: boolean()
27633
+ }), _void(), { kind: "mutation" }), method(object({
27634
+ deviceId: number(),
27635
+ mode: NavigationLightModeSchema,
27636
+ level: number().min(40).max(100).optional()
27637
+ }), _void(), { kind: "mutation" }), method(object({
27638
+ deviceId: number(),
27639
+ level: number().min(40).max(100)
27640
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27641
+ deviceId: number(),
27642
+ status: NavigationStatusSchema
27643
+ });
27407
27644
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
27408
27645
  kind: "mutation",
27409
27646
  auth: "admin"
@@ -32468,6 +32705,66 @@ Object.freeze({
32468
32705
  addonId: null,
32469
32706
  access: "create"
32470
32707
  },
32708
+ "navigation.getFeatures": {
32709
+ capName: "navigation",
32710
+ capScope: "device",
32711
+ addonId: null,
32712
+ access: "view"
32713
+ },
32714
+ "navigation.goToPoint": {
32715
+ capName: "navigation",
32716
+ capScope: "device",
32717
+ addonId: null,
32718
+ access: "create"
32719
+ },
32720
+ "navigation.listActions": {
32721
+ capName: "navigation",
32722
+ capScope: "device",
32723
+ addonId: null,
32724
+ access: "view"
32725
+ },
32726
+ "navigation.move": {
32727
+ capName: "navigation",
32728
+ capScope: "device",
32729
+ addonId: null,
32730
+ access: "create"
32731
+ },
32732
+ "navigation.playSound": {
32733
+ capName: "navigation",
32734
+ capScope: "device",
32735
+ addonId: null,
32736
+ access: "create"
32737
+ },
32738
+ "navigation.runAction": {
32739
+ capName: "navigation",
32740
+ capScope: "device",
32741
+ addonId: null,
32742
+ access: "create"
32743
+ },
32744
+ "navigation.setLightLevel": {
32745
+ capName: "navigation",
32746
+ capScope: "device",
32747
+ addonId: null,
32748
+ access: "create"
32749
+ },
32750
+ "navigation.setLightMode": {
32751
+ capName: "navigation",
32752
+ capScope: "device",
32753
+ addonId: null,
32754
+ access: "create"
32755
+ },
32756
+ "navigation.setLightOn": {
32757
+ capName: "navigation",
32758
+ capScope: "device",
32759
+ addonId: null,
32760
+ access: "create"
32761
+ },
32762
+ "navigation.stop": {
32763
+ capName: "navigation",
32764
+ capScope: "device",
32765
+ addonId: null,
32766
+ access: "create"
32767
+ },
32471
32768
  "networkAccess.getEndpoint": {
32472
32769
  capName: "network-access",
32473
32770
  capScope: "system",
@@ -36563,6 +36860,56 @@ Object.freeze({
36563
36860
  form: "single",
36564
36861
  optional: false
36565
36862
  }],
36863
+ "navigation.getFeatures": [{
36864
+ name: "deviceId",
36865
+ form: "single",
36866
+ optional: false
36867
+ }],
36868
+ "navigation.goToPoint": [{
36869
+ name: "deviceId",
36870
+ form: "single",
36871
+ optional: false
36872
+ }],
36873
+ "navigation.listActions": [{
36874
+ name: "deviceId",
36875
+ form: "single",
36876
+ optional: false
36877
+ }],
36878
+ "navigation.move": [{
36879
+ name: "deviceId",
36880
+ form: "single",
36881
+ optional: false
36882
+ }],
36883
+ "navigation.playSound": [{
36884
+ name: "deviceId",
36885
+ form: "single",
36886
+ optional: false
36887
+ }],
36888
+ "navigation.runAction": [{
36889
+ name: "deviceId",
36890
+ form: "single",
36891
+ optional: false
36892
+ }],
36893
+ "navigation.setLightLevel": [{
36894
+ name: "deviceId",
36895
+ form: "single",
36896
+ optional: false
36897
+ }],
36898
+ "navigation.setLightMode": [{
36899
+ name: "deviceId",
36900
+ form: "single",
36901
+ optional: false
36902
+ }],
36903
+ "navigation.setLightOn": [{
36904
+ name: "deviceId",
36905
+ form: "single",
36906
+ optional: false
36907
+ }],
36908
+ "navigation.stop": [{
36909
+ name: "deviceId",
36910
+ form: "single",
36911
+ optional: false
36912
+ }],
36566
36913
  "networkQuality.getDeviceStats": [{
36567
36914
  name: "deviceId",
36568
36915
  form: "single",