@camstack/addon-provider-rademacher 0.2.69 → 0.2.70

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.
package/dist/addon.js CHANGED
@@ -29932,6 +29932,287 @@ var ptzAutotrackCapability = {
29932
29932
  */
29933
29933
  durability: "session"
29934
29934
  };
29935
+ /**
29936
+ * `navigation` — a device-scoped capability that natively expresses the FULL
29937
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
29938
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
29939
+ *
29940
+ * Why a NEW cap rather than overloading `ptz`:
29941
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
29942
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
29943
+ * The two are different physical models: PTZ is absolute-position + presets,
29944
+ * navigation is momentary drive nudges + discrete robot ACTIONS
29945
+ * (dock / spot-clean / follow-pet / go-to-point / …).
29946
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
29947
+ * the reverse:
29948
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
29949
+ * / `getOptions`), and
29950
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
29951
+ * robot camera shows up in the existing PTZ control path without every
29952
+ * PTZ provider learning about robots. The mapping lives in the adapter,
29953
+ * not here (see the addon design note):
29954
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
29955
+ * ptz.stop() → navigation.stop()
29956
+ * ptz.goHome() → navigation.runAction('goHome')
29957
+ * ptz.getPresets() → navigation.listActions() (id→preset)
29958
+ * ptz.goToPreset(id) → navigation.runAction(id)
29959
+ *
29960
+ * ## Continuous drive
29961
+ *
29962
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
29963
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
29964
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
29965
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
29966
+ * coalesce them. The UI owns the cadence.
29967
+ *
29968
+ * ## The action dictionary
29969
+ *
29970
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
29971
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
29972
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
29973
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
29974
+ * vendor-specific list. `kind: 'action'` entries are triggered with
29975
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
29976
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
29977
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
29978
+ *
29979
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
29980
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
29981
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
29982
+ * every device handle. A future nodedreame publish adds a typed
29983
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
29984
+ * provider can then swap the raw calls for the typed methods with no change to
29985
+ * THIS contract.
29986
+ */
29987
+ /**
29988
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
29989
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
29990
+ * halts it.
29991
+ *
29992
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
29993
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
29994
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
29995
+ * vector by it (drivers without proportional drive ignore it).
29996
+ *
29997
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
29998
+ * axis alone; an all-undefined nudge is a no-op.
29999
+ */
30000
+ var NavigationMoveCommandSchema = object({
30001
+ pan: number().min(-1).max(1).optional(),
30002
+ tilt: number().min(-1).max(1).optional(),
30003
+ speed: number().min(0).max(1).optional()
30004
+ });
30005
+ /**
30006
+ * The enumerated discrete actions a navigation-capable robot can perform via
30007
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
30008
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
30009
+ * `playSound` (see the `sound` dictionary entries).
30010
+ */
30011
+ var NavigationActionIdSchema = _enum([
30012
+ "goHome",
30013
+ "locate",
30014
+ "spotClean",
30015
+ "findPet",
30016
+ "personFollow",
30017
+ "stop",
30018
+ "startClean",
30019
+ "pauseClean",
30020
+ "dockWash",
30021
+ "autoEmpty",
30022
+ "flashOn",
30023
+ "flashOff"
30024
+ ]);
30025
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
30026
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
30027
+ /**
30028
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
30029
+ * native panel and the PTZ mimic render as a button.
30030
+ *
30031
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
30032
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
30033
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
30034
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
30035
+ * - `label` — operator-facing English label.
30036
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
30037
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
30038
+ * PTZ render ONLY enabled entries. Data-driven: the provider
30039
+ * flips it from config, never by editing code.
30040
+ */
30041
+ var NavigationActionEntrySchema = object({
30042
+ id: string(),
30043
+ kind: NavigationEntryKindSchema,
30044
+ label: string(),
30045
+ icon: string(),
30046
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
30047
+ soundId: number().int().optional(),
30048
+ /** Per-device feature flag — render this entry only when true. */
30049
+ enabled: boolean()
30050
+ });
30051
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
30052
+ var NavigationPointSchema = object({
30053
+ x: number(),
30054
+ y: number()
30055
+ });
30056
+ /**
30057
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
30058
+ * The cap reports which are enabled so the UI / PTZ render only the controls
30059
+ * that are turned on for THIS device. Data-driven: the provider derives these
30060
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
30061
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
30062
+ * that are not dictionary entries.
30063
+ *
30064
+ * - `move` / `stop` — the momentary drive joystick.
30065
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
30066
+ * map-coordinate plumbing is wired.
30067
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
30068
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
30069
+ * - `light` — the on/off fill-light toggle (works anytime).
30070
+ * - `lightMode` — the auto/manual selector + manual level slider (a
30071
+ * camera-service control; needs an active stream).
30072
+ */
30073
+ var NavigationFeaturesSchema = object({
30074
+ move: boolean(),
30075
+ stop: boolean(),
30076
+ goToPoint: boolean(),
30077
+ runAction: boolean(),
30078
+ playSound: boolean(),
30079
+ light: boolean(),
30080
+ lightMode: boolean()
30081
+ });
30082
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
30083
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
30084
+ /**
30085
+ * Live navigation state so the UI can reflect what the robot is doing:
30086
+ * - `mode` — coarse activity (idle / cleaning / following / …).
30087
+ * - `following` — person/pet follow is currently armed.
30088
+ * - `flash` — the on-camera fill light is on.
30089
+ * - `lightMode` — auto vs manual fill-light mode.
30090
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
30091
+ * `lightMode === 'manual'`.
30092
+ */
30093
+ var NavigationStatusSchema = object({
30094
+ mode: _enum([
30095
+ "idle",
30096
+ "cleaning",
30097
+ "spot",
30098
+ "following",
30099
+ "goto",
30100
+ "returning",
30101
+ "paused",
30102
+ "unknown"
30103
+ ]),
30104
+ following: boolean(),
30105
+ flash: boolean(),
30106
+ lightMode: NavigationLightModeSchema,
30107
+ lightLevel: number().min(40).max(100),
30108
+ /** Ms epoch when the slice was last updated. */
30109
+ lastChangedAt: number()
30110
+ });
30111
+ /**
30112
+ * Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
30113
+ * observable). Adds `lastFetchedAt` on top of the status shape per the
30114
+ * convention.
30115
+ */
30116
+ var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
30117
+ var navigationCapability = {
30118
+ name: "navigation",
30119
+ scope: "device",
30120
+ deviceNative: true,
30121
+ mode: "singleton",
30122
+ deviceTypes: [DeviceType.Camera],
30123
+ deviceConfig: { ui: {
30124
+ kind: "widget",
30125
+ widgetId: "host/navigation-panel",
30126
+ tab: "navigation",
30127
+ topTab: true,
30128
+ label: "Navigation",
30129
+ order: 0
30130
+ } },
30131
+ methods: {
30132
+ /**
30133
+ * Momentary drive nudge (the robot moves). `protected` — mirrors
30134
+ * `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
30135
+ * path) works for any authenticated user, not admin-only. The UI sends
30136
+ * these at ~1 Hz while a control is held; the provider forwards each one to
30137
+ * a single drive write WITHOUT debouncing.
30138
+ */
30139
+ move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
30140
+ /** Halt all motion immediately (zero drive vector). */
30141
+ stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
30142
+ /** Send the robot to a point on its live map. */
30143
+ goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
30144
+ /**
30145
+ * Enumerate the discrete controls THIS device supports (data-driven UI +
30146
+ * PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
30147
+ */
30148
+ listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
30149
+ /**
30150
+ * Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
30151
+ * unsupported action ids are rejected by the provider.
30152
+ */
30153
+ runAction: method(object({
30154
+ deviceId: number(),
30155
+ actionId: NavigationActionIdSchema
30156
+ }), _void(), { kind: "mutation" }),
30157
+ /** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
30158
+ playSound: method(object({
30159
+ deviceId: number(),
30160
+ soundId: number().int()
30161
+ }), _void(), { kind: "mutation" }),
30162
+ /**
30163
+ * Turn the on-camera fill light on / off (the `OpenFullLight` control —
30164
+ * works anytime, no active stream required).
30165
+ */
30166
+ setLightOn: method(object({
30167
+ deviceId: number(),
30168
+ on: boolean()
30169
+ }), _void(), { kind: "mutation" }),
30170
+ /**
30171
+ * Set the fill-light mode (auto vs manual). `manual` optionally carries the
30172
+ * initial `level`. The auto/manual + level control is a CAMERA-service
30173
+ * action that generally needs an active camera stream/monitor session — the
30174
+ * UI shows the manual level slider ONLY when `mode === 'manual'`.
30175
+ */
30176
+ setLightMode: method(object({
30177
+ deviceId: number(),
30178
+ mode: NavigationLightModeSchema,
30179
+ level: number().min(40).max(100).optional()
30180
+ }), _void(), { kind: "mutation" }),
30181
+ /** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
30182
+ setLightLevel: method(object({
30183
+ deviceId: number(),
30184
+ level: number().min(40).max(100)
30185
+ }), _void(), { kind: "mutation" }),
30186
+ /**
30187
+ * Per-device FEATURE-FLAG report for the general primitives — drives which
30188
+ * controls the UI shows (the per-entry flags for the dictionary come back on
30189
+ * `listActions`).
30190
+ */
30191
+ getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
30192
+ },
30193
+ events: { onStatusChanged: { data: object({
30194
+ deviceId: number(),
30195
+ status: NavigationStatusSchema
30196
+ }) } },
30197
+ status: {
30198
+ schema: NavigationStatusSchema,
30199
+ kind: "push"
30200
+ },
30201
+ /**
30202
+ * Runtime-state slice mirrored by the kernel. The navigation panel watches it
30203
+ * for live mode / follow / flash changes.
30204
+ */
30205
+ runtimeState: NavigationRuntimeStateSchema,
30206
+ /**
30207
+ * Runtime-state durability: **session** — like `vacuum-control`, a restored
30208
+ * `mode: cleaning` / `following: true` is a robot that is not actually doing
30209
+ * that. The live handle re-publishes on connect.
30210
+ *
30211
+ * See `RuntimeStateDurability`. Enforced by
30212
+ * `scripts/check-runtime-state-durability.ts`.
30213
+ */
30214
+ durability: "session"
30215
+ };
29935
30216
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
29936
30217
  kind: "mutation",
29937
30218
  auth: "admin"
@@ -33207,6 +33488,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33207
33488
  motionTrigger: motionTriggerCapability,
33208
33489
  motionZones: motionZonesCapability,
33209
33490
  nativeObjectDetection: nativeObjectDetectionCapability,
33491
+ navigation: navigationCapability,
33210
33492
  networkLink: networkLinkCapability,
33211
33493
  notifier: notifierCapability,
33212
33494
  numericSensor: numericSensorCapability,
@@ -37061,6 +37343,66 @@ Object.freeze({
37061
37343
  addonId: null,
37062
37344
  access: "create"
37063
37345
  },
37346
+ "navigation.getFeatures": {
37347
+ capName: "navigation",
37348
+ capScope: "device",
37349
+ addonId: null,
37350
+ access: "view"
37351
+ },
37352
+ "navigation.goToPoint": {
37353
+ capName: "navigation",
37354
+ capScope: "device",
37355
+ addonId: null,
37356
+ access: "create"
37357
+ },
37358
+ "navigation.listActions": {
37359
+ capName: "navigation",
37360
+ capScope: "device",
37361
+ addonId: null,
37362
+ access: "view"
37363
+ },
37364
+ "navigation.move": {
37365
+ capName: "navigation",
37366
+ capScope: "device",
37367
+ addonId: null,
37368
+ access: "create"
37369
+ },
37370
+ "navigation.playSound": {
37371
+ capName: "navigation",
37372
+ capScope: "device",
37373
+ addonId: null,
37374
+ access: "create"
37375
+ },
37376
+ "navigation.runAction": {
37377
+ capName: "navigation",
37378
+ capScope: "device",
37379
+ addonId: null,
37380
+ access: "create"
37381
+ },
37382
+ "navigation.setLightLevel": {
37383
+ capName: "navigation",
37384
+ capScope: "device",
37385
+ addonId: null,
37386
+ access: "create"
37387
+ },
37388
+ "navigation.setLightMode": {
37389
+ capName: "navigation",
37390
+ capScope: "device",
37391
+ addonId: null,
37392
+ access: "create"
37393
+ },
37394
+ "navigation.setLightOn": {
37395
+ capName: "navigation",
37396
+ capScope: "device",
37397
+ addonId: null,
37398
+ access: "create"
37399
+ },
37400
+ "navigation.stop": {
37401
+ capName: "navigation",
37402
+ capScope: "device",
37403
+ addonId: null,
37404
+ access: "create"
37405
+ },
37064
37406
  "networkAccess.getEndpoint": {
37065
37407
  capName: "network-access",
37066
37408
  capScope: "system",
@@ -41156,6 +41498,56 @@ Object.freeze({
41156
41498
  form: "single",
41157
41499
  optional: false
41158
41500
  }],
41501
+ "navigation.getFeatures": [{
41502
+ name: "deviceId",
41503
+ form: "single",
41504
+ optional: false
41505
+ }],
41506
+ "navigation.goToPoint": [{
41507
+ name: "deviceId",
41508
+ form: "single",
41509
+ optional: false
41510
+ }],
41511
+ "navigation.listActions": [{
41512
+ name: "deviceId",
41513
+ form: "single",
41514
+ optional: false
41515
+ }],
41516
+ "navigation.move": [{
41517
+ name: "deviceId",
41518
+ form: "single",
41519
+ optional: false
41520
+ }],
41521
+ "navigation.playSound": [{
41522
+ name: "deviceId",
41523
+ form: "single",
41524
+ optional: false
41525
+ }],
41526
+ "navigation.runAction": [{
41527
+ name: "deviceId",
41528
+ form: "single",
41529
+ optional: false
41530
+ }],
41531
+ "navigation.setLightLevel": [{
41532
+ name: "deviceId",
41533
+ form: "single",
41534
+ optional: false
41535
+ }],
41536
+ "navigation.setLightMode": [{
41537
+ name: "deviceId",
41538
+ form: "single",
41539
+ optional: false
41540
+ }],
41541
+ "navigation.setLightOn": [{
41542
+ name: "deviceId",
41543
+ form: "single",
41544
+ optional: false
41545
+ }],
41546
+ "navigation.stop": [{
41547
+ name: "deviceId",
41548
+ form: "single",
41549
+ optional: false
41550
+ }],
41159
41551
  "networkQuality.getDeviceStats": [{
41160
41552
  name: "deviceId",
41161
41553
  form: "single",
package/dist/addon.mjs CHANGED
@@ -29931,6 +29931,287 @@ var ptzAutotrackCapability = {
29931
29931
  */
29932
29932
  durability: "session"
29933
29933
  };
29934
+ /**
29935
+ * `navigation` — a device-scoped capability that natively expresses the FULL
29936
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
29937
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
29938
+ *
29939
+ * Why a NEW cap rather than overloading `ptz`:
29940
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
29941
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
29942
+ * The two are different physical models: PTZ is absolute-position + presets,
29943
+ * navigation is momentary drive nudges + discrete robot ACTIONS
29944
+ * (dock / spot-clean / follow-pet / go-to-point / …).
29945
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
29946
+ * the reverse:
29947
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
29948
+ * / `getOptions`), and
29949
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
29950
+ * robot camera shows up in the existing PTZ control path without every
29951
+ * PTZ provider learning about robots. The mapping lives in the adapter,
29952
+ * not here (see the addon design note):
29953
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
29954
+ * ptz.stop() → navigation.stop()
29955
+ * ptz.goHome() → navigation.runAction('goHome')
29956
+ * ptz.getPresets() → navigation.listActions() (id→preset)
29957
+ * ptz.goToPreset(id) → navigation.runAction(id)
29958
+ *
29959
+ * ## Continuous drive
29960
+ *
29961
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
29962
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
29963
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
29964
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
29965
+ * coalesce them. The UI owns the cadence.
29966
+ *
29967
+ * ## The action dictionary
29968
+ *
29969
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
29970
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
29971
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
29972
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
29973
+ * vendor-specific list. `kind: 'action'` entries are triggered with
29974
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
29975
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
29976
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
29977
+ *
29978
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
29979
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
29980
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
29981
+ * every device handle. A future nodedreame publish adds a typed
29982
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
29983
+ * provider can then swap the raw calls for the typed methods with no change to
29984
+ * THIS contract.
29985
+ */
29986
+ /**
29987
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
29988
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
29989
+ * halts it.
29990
+ *
29991
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
29992
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
29993
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
29994
+ * vector by it (drivers without proportional drive ignore it).
29995
+ *
29996
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
29997
+ * axis alone; an all-undefined nudge is a no-op.
29998
+ */
29999
+ var NavigationMoveCommandSchema = object({
30000
+ pan: number().min(-1).max(1).optional(),
30001
+ tilt: number().min(-1).max(1).optional(),
30002
+ speed: number().min(0).max(1).optional()
30003
+ });
30004
+ /**
30005
+ * The enumerated discrete actions a navigation-capable robot can perform via
30006
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
30007
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
30008
+ * `playSound` (see the `sound` dictionary entries).
30009
+ */
30010
+ var NavigationActionIdSchema = _enum([
30011
+ "goHome",
30012
+ "locate",
30013
+ "spotClean",
30014
+ "findPet",
30015
+ "personFollow",
30016
+ "stop",
30017
+ "startClean",
30018
+ "pauseClean",
30019
+ "dockWash",
30020
+ "autoEmpty",
30021
+ "flashOn",
30022
+ "flashOff"
30023
+ ]);
30024
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
30025
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
30026
+ /**
30027
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
30028
+ * native panel and the PTZ mimic render as a button.
30029
+ *
30030
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
30031
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
30032
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
30033
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
30034
+ * - `label` — operator-facing English label.
30035
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
30036
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
30037
+ * PTZ render ONLY enabled entries. Data-driven: the provider
30038
+ * flips it from config, never by editing code.
30039
+ */
30040
+ var NavigationActionEntrySchema = object({
30041
+ id: string(),
30042
+ kind: NavigationEntryKindSchema,
30043
+ label: string(),
30044
+ icon: string(),
30045
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
30046
+ soundId: number().int().optional(),
30047
+ /** Per-device feature flag — render this entry only when true. */
30048
+ enabled: boolean()
30049
+ });
30050
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
30051
+ var NavigationPointSchema = object({
30052
+ x: number(),
30053
+ y: number()
30054
+ });
30055
+ /**
30056
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
30057
+ * The cap reports which are enabled so the UI / PTZ render only the controls
30058
+ * that are turned on for THIS device. Data-driven: the provider derives these
30059
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
30060
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
30061
+ * that are not dictionary entries.
30062
+ *
30063
+ * - `move` / `stop` — the momentary drive joystick.
30064
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
30065
+ * map-coordinate plumbing is wired.
30066
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
30067
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
30068
+ * - `light` — the on/off fill-light toggle (works anytime).
30069
+ * - `lightMode` — the auto/manual selector + manual level slider (a
30070
+ * camera-service control; needs an active stream).
30071
+ */
30072
+ var NavigationFeaturesSchema = object({
30073
+ move: boolean(),
30074
+ stop: boolean(),
30075
+ goToPoint: boolean(),
30076
+ runAction: boolean(),
30077
+ playSound: boolean(),
30078
+ light: boolean(),
30079
+ lightMode: boolean()
30080
+ });
30081
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
30082
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
30083
+ /**
30084
+ * Live navigation state so the UI can reflect what the robot is doing:
30085
+ * - `mode` — coarse activity (idle / cleaning / following / …).
30086
+ * - `following` — person/pet follow is currently armed.
30087
+ * - `flash` — the on-camera fill light is on.
30088
+ * - `lightMode` — auto vs manual fill-light mode.
30089
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
30090
+ * `lightMode === 'manual'`.
30091
+ */
30092
+ var NavigationStatusSchema = object({
30093
+ mode: _enum([
30094
+ "idle",
30095
+ "cleaning",
30096
+ "spot",
30097
+ "following",
30098
+ "goto",
30099
+ "returning",
30100
+ "paused",
30101
+ "unknown"
30102
+ ]),
30103
+ following: boolean(),
30104
+ flash: boolean(),
30105
+ lightMode: NavigationLightModeSchema,
30106
+ lightLevel: number().min(40).max(100),
30107
+ /** Ms epoch when the slice was last updated. */
30108
+ lastChangedAt: number()
30109
+ });
30110
+ /**
30111
+ * Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
30112
+ * observable). Adds `lastFetchedAt` on top of the status shape per the
30113
+ * convention.
30114
+ */
30115
+ var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
30116
+ var navigationCapability = {
30117
+ name: "navigation",
30118
+ scope: "device",
30119
+ deviceNative: true,
30120
+ mode: "singleton",
30121
+ deviceTypes: [DeviceType.Camera],
30122
+ deviceConfig: { ui: {
30123
+ kind: "widget",
30124
+ widgetId: "host/navigation-panel",
30125
+ tab: "navigation",
30126
+ topTab: true,
30127
+ label: "Navigation",
30128
+ order: 0
30129
+ } },
30130
+ methods: {
30131
+ /**
30132
+ * Momentary drive nudge (the robot moves). `protected` — mirrors
30133
+ * `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
30134
+ * path) works for any authenticated user, not admin-only. The UI sends
30135
+ * these at ~1 Hz while a control is held; the provider forwards each one to
30136
+ * a single drive write WITHOUT debouncing.
30137
+ */
30138
+ move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
30139
+ /** Halt all motion immediately (zero drive vector). */
30140
+ stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
30141
+ /** Send the robot to a point on its live map. */
30142
+ goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
30143
+ /**
30144
+ * Enumerate the discrete controls THIS device supports (data-driven UI +
30145
+ * PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
30146
+ */
30147
+ listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
30148
+ /**
30149
+ * Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
30150
+ * unsupported action ids are rejected by the provider.
30151
+ */
30152
+ runAction: method(object({
30153
+ deviceId: number(),
30154
+ actionId: NavigationActionIdSchema
30155
+ }), _void(), { kind: "mutation" }),
30156
+ /** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
30157
+ playSound: method(object({
30158
+ deviceId: number(),
30159
+ soundId: number().int()
30160
+ }), _void(), { kind: "mutation" }),
30161
+ /**
30162
+ * Turn the on-camera fill light on / off (the `OpenFullLight` control —
30163
+ * works anytime, no active stream required).
30164
+ */
30165
+ setLightOn: method(object({
30166
+ deviceId: number(),
30167
+ on: boolean()
30168
+ }), _void(), { kind: "mutation" }),
30169
+ /**
30170
+ * Set the fill-light mode (auto vs manual). `manual` optionally carries the
30171
+ * initial `level`. The auto/manual + level control is a CAMERA-service
30172
+ * action that generally needs an active camera stream/monitor session — the
30173
+ * UI shows the manual level slider ONLY when `mode === 'manual'`.
30174
+ */
30175
+ setLightMode: method(object({
30176
+ deviceId: number(),
30177
+ mode: NavigationLightModeSchema,
30178
+ level: number().min(40).max(100).optional()
30179
+ }), _void(), { kind: "mutation" }),
30180
+ /** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
30181
+ setLightLevel: method(object({
30182
+ deviceId: number(),
30183
+ level: number().min(40).max(100)
30184
+ }), _void(), { kind: "mutation" }),
30185
+ /**
30186
+ * Per-device FEATURE-FLAG report for the general primitives — drives which
30187
+ * controls the UI shows (the per-entry flags for the dictionary come back on
30188
+ * `listActions`).
30189
+ */
30190
+ getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
30191
+ },
30192
+ events: { onStatusChanged: { data: object({
30193
+ deviceId: number(),
30194
+ status: NavigationStatusSchema
30195
+ }) } },
30196
+ status: {
30197
+ schema: NavigationStatusSchema,
30198
+ kind: "push"
30199
+ },
30200
+ /**
30201
+ * Runtime-state slice mirrored by the kernel. The navigation panel watches it
30202
+ * for live mode / follow / flash changes.
30203
+ */
30204
+ runtimeState: NavigationRuntimeStateSchema,
30205
+ /**
30206
+ * Runtime-state durability: **session** — like `vacuum-control`, a restored
30207
+ * `mode: cleaning` / `following: true` is a robot that is not actually doing
30208
+ * that. The live handle re-publishes on connect.
30209
+ *
30210
+ * See `RuntimeStateDurability`. Enforced by
30211
+ * `scripts/check-runtime-state-durability.ts`.
30212
+ */
30213
+ durability: "session"
30214
+ };
29934
30215
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
29935
30216
  kind: "mutation",
29936
30217
  auth: "admin"
@@ -33206,6 +33487,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
33206
33487
  motionTrigger: motionTriggerCapability,
33207
33488
  motionZones: motionZonesCapability,
33208
33489
  nativeObjectDetection: nativeObjectDetectionCapability,
33490
+ navigation: navigationCapability,
33209
33491
  networkLink: networkLinkCapability,
33210
33492
  notifier: notifierCapability,
33211
33493
  numericSensor: numericSensorCapability,
@@ -37060,6 +37342,66 @@ Object.freeze({
37060
37342
  addonId: null,
37061
37343
  access: "create"
37062
37344
  },
37345
+ "navigation.getFeatures": {
37346
+ capName: "navigation",
37347
+ capScope: "device",
37348
+ addonId: null,
37349
+ access: "view"
37350
+ },
37351
+ "navigation.goToPoint": {
37352
+ capName: "navigation",
37353
+ capScope: "device",
37354
+ addonId: null,
37355
+ access: "create"
37356
+ },
37357
+ "navigation.listActions": {
37358
+ capName: "navigation",
37359
+ capScope: "device",
37360
+ addonId: null,
37361
+ access: "view"
37362
+ },
37363
+ "navigation.move": {
37364
+ capName: "navigation",
37365
+ capScope: "device",
37366
+ addonId: null,
37367
+ access: "create"
37368
+ },
37369
+ "navigation.playSound": {
37370
+ capName: "navigation",
37371
+ capScope: "device",
37372
+ addonId: null,
37373
+ access: "create"
37374
+ },
37375
+ "navigation.runAction": {
37376
+ capName: "navigation",
37377
+ capScope: "device",
37378
+ addonId: null,
37379
+ access: "create"
37380
+ },
37381
+ "navigation.setLightLevel": {
37382
+ capName: "navigation",
37383
+ capScope: "device",
37384
+ addonId: null,
37385
+ access: "create"
37386
+ },
37387
+ "navigation.setLightMode": {
37388
+ capName: "navigation",
37389
+ capScope: "device",
37390
+ addonId: null,
37391
+ access: "create"
37392
+ },
37393
+ "navigation.setLightOn": {
37394
+ capName: "navigation",
37395
+ capScope: "device",
37396
+ addonId: null,
37397
+ access: "create"
37398
+ },
37399
+ "navigation.stop": {
37400
+ capName: "navigation",
37401
+ capScope: "device",
37402
+ addonId: null,
37403
+ access: "create"
37404
+ },
37063
37405
  "networkAccess.getEndpoint": {
37064
37406
  capName: "network-access",
37065
37407
  capScope: "system",
@@ -41155,6 +41497,56 @@ Object.freeze({
41155
41497
  form: "single",
41156
41498
  optional: false
41157
41499
  }],
41500
+ "navigation.getFeatures": [{
41501
+ name: "deviceId",
41502
+ form: "single",
41503
+ optional: false
41504
+ }],
41505
+ "navigation.goToPoint": [{
41506
+ name: "deviceId",
41507
+ form: "single",
41508
+ optional: false
41509
+ }],
41510
+ "navigation.listActions": [{
41511
+ name: "deviceId",
41512
+ form: "single",
41513
+ optional: false
41514
+ }],
41515
+ "navigation.move": [{
41516
+ name: "deviceId",
41517
+ form: "single",
41518
+ optional: false
41519
+ }],
41520
+ "navigation.playSound": [{
41521
+ name: "deviceId",
41522
+ form: "single",
41523
+ optional: false
41524
+ }],
41525
+ "navigation.runAction": [{
41526
+ name: "deviceId",
41527
+ form: "single",
41528
+ optional: false
41529
+ }],
41530
+ "navigation.setLightLevel": [{
41531
+ name: "deviceId",
41532
+ form: "single",
41533
+ optional: false
41534
+ }],
41535
+ "navigation.setLightMode": [{
41536
+ name: "deviceId",
41537
+ form: "single",
41538
+ optional: false
41539
+ }],
41540
+ "navigation.setLightOn": [{
41541
+ name: "deviceId",
41542
+ form: "single",
41543
+ optional: false
41544
+ }],
41545
+ "navigation.stop": [{
41546
+ name: "deviceId",
41547
+ form: "single",
41548
+ optional: false
41549
+ }],
41158
41550
  "networkQuality.getDeviceStats": [{
41159
41551
  name: "deviceId",
41160
41552
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-rademacher",
3
- "version": "0.2.69",
3
+ "version": "0.2.70",
4
4
  "description": "Rademacher HomePilot device-provider addon for CamStack — wraps the @apocaliss92/noderademacher local-hub client (roller shutters over the cover cap)",
5
5
  "keywords": [
6
6
  "camstack",