@camstack/addon-provider-velux 0.2.70 → 0.2.71

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
@@ -28947,6 +28947,287 @@ var ptzAutotrackCapability = {
28947
28947
  */
28948
28948
  durability: "session"
28949
28949
  };
28950
+ /**
28951
+ * `navigation` — a device-scoped capability that natively expresses the FULL
28952
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
28953
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
28954
+ *
28955
+ * Why a NEW cap rather than overloading `ptz`:
28956
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
28957
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
28958
+ * The two are different physical models: PTZ is absolute-position + presets,
28959
+ * navigation is momentary drive nudges + discrete robot ACTIONS
28960
+ * (dock / spot-clean / follow-pet / go-to-point / …).
28961
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
28962
+ * the reverse:
28963
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
28964
+ * / `getOptions`), and
28965
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
28966
+ * robot camera shows up in the existing PTZ control path without every
28967
+ * PTZ provider learning about robots. The mapping lives in the adapter,
28968
+ * not here (see the addon design note):
28969
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
28970
+ * ptz.stop() → navigation.stop()
28971
+ * ptz.goHome() → navigation.runAction('goHome')
28972
+ * ptz.getPresets() → navigation.listActions() (id→preset)
28973
+ * ptz.goToPreset(id) → navigation.runAction(id)
28974
+ *
28975
+ * ## Continuous drive
28976
+ *
28977
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
28978
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
28979
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
28980
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
28981
+ * coalesce them. The UI owns the cadence.
28982
+ *
28983
+ * ## The action dictionary
28984
+ *
28985
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
28986
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
28987
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
28988
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
28989
+ * vendor-specific list. `kind: 'action'` entries are triggered with
28990
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
28991
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
28992
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
28993
+ *
28994
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
28995
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
28996
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
28997
+ * every device handle. A future nodedreame publish adds a typed
28998
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
28999
+ * provider can then swap the raw calls for the typed methods with no change to
29000
+ * THIS contract.
29001
+ */
29002
+ /**
29003
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
29004
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
29005
+ * halts it.
29006
+ *
29007
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
29008
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
29009
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
29010
+ * vector by it (drivers without proportional drive ignore it).
29011
+ *
29012
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
29013
+ * axis alone; an all-undefined nudge is a no-op.
29014
+ */
29015
+ var NavigationMoveCommandSchema = object({
29016
+ pan: number().min(-1).max(1).optional(),
29017
+ tilt: number().min(-1).max(1).optional(),
29018
+ speed: number().min(0).max(1).optional()
29019
+ });
29020
+ /**
29021
+ * The enumerated discrete actions a navigation-capable robot can perform via
29022
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
29023
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
29024
+ * `playSound` (see the `sound` dictionary entries).
29025
+ */
29026
+ var NavigationActionIdSchema = _enum([
29027
+ "goHome",
29028
+ "locate",
29029
+ "spotClean",
29030
+ "findPet",
29031
+ "personFollow",
29032
+ "stop",
29033
+ "startClean",
29034
+ "pauseClean",
29035
+ "dockWash",
29036
+ "autoEmpty",
29037
+ "flashOn",
29038
+ "flashOff"
29039
+ ]);
29040
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
29041
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
29042
+ /**
29043
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
29044
+ * native panel and the PTZ mimic render as a button.
29045
+ *
29046
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
29047
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
29048
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
29049
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
29050
+ * - `label` — operator-facing English label.
29051
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
29052
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
29053
+ * PTZ render ONLY enabled entries. Data-driven: the provider
29054
+ * flips it from config, never by editing code.
29055
+ */
29056
+ var NavigationActionEntrySchema = object({
29057
+ id: string(),
29058
+ kind: NavigationEntryKindSchema,
29059
+ label: string(),
29060
+ icon: string(),
29061
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
29062
+ soundId: number().int().optional(),
29063
+ /** Per-device feature flag — render this entry only when true. */
29064
+ enabled: boolean()
29065
+ });
29066
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
29067
+ var NavigationPointSchema = object({
29068
+ x: number(),
29069
+ y: number()
29070
+ });
29071
+ /**
29072
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
29073
+ * The cap reports which are enabled so the UI / PTZ render only the controls
29074
+ * that are turned on for THIS device. Data-driven: the provider derives these
29075
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
29076
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
29077
+ * that are not dictionary entries.
29078
+ *
29079
+ * - `move` / `stop` — the momentary drive joystick.
29080
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
29081
+ * map-coordinate plumbing is wired.
29082
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
29083
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
29084
+ * - `light` — the on/off fill-light toggle (works anytime).
29085
+ * - `lightMode` — the auto/manual selector + manual level slider (a
29086
+ * camera-service control; needs an active stream).
29087
+ */
29088
+ var NavigationFeaturesSchema = object({
29089
+ move: boolean(),
29090
+ stop: boolean(),
29091
+ goToPoint: boolean(),
29092
+ runAction: boolean(),
29093
+ playSound: boolean(),
29094
+ light: boolean(),
29095
+ lightMode: boolean()
29096
+ });
29097
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
29098
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
29099
+ /**
29100
+ * Live navigation state so the UI can reflect what the robot is doing:
29101
+ * - `mode` — coarse activity (idle / cleaning / following / …).
29102
+ * - `following` — person/pet follow is currently armed.
29103
+ * - `flash` — the on-camera fill light is on.
29104
+ * - `lightMode` — auto vs manual fill-light mode.
29105
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
29106
+ * `lightMode === 'manual'`.
29107
+ */
29108
+ var NavigationStatusSchema = object({
29109
+ mode: _enum([
29110
+ "idle",
29111
+ "cleaning",
29112
+ "spot",
29113
+ "following",
29114
+ "goto",
29115
+ "returning",
29116
+ "paused",
29117
+ "unknown"
29118
+ ]),
29119
+ following: boolean(),
29120
+ flash: boolean(),
29121
+ lightMode: NavigationLightModeSchema,
29122
+ lightLevel: number().min(40).max(100),
29123
+ /** Ms epoch when the slice was last updated. */
29124
+ lastChangedAt: number()
29125
+ });
29126
+ /**
29127
+ * Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
29128
+ * observable). Adds `lastFetchedAt` on top of the status shape per the
29129
+ * convention.
29130
+ */
29131
+ var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
29132
+ var navigationCapability = {
29133
+ name: "navigation",
29134
+ scope: "device",
29135
+ deviceNative: true,
29136
+ mode: "singleton",
29137
+ deviceTypes: [DeviceType.Camera],
29138
+ deviceConfig: { ui: {
29139
+ kind: "widget",
29140
+ widgetId: "host/navigation-panel",
29141
+ tab: "navigation",
29142
+ topTab: true,
29143
+ label: "Navigation",
29144
+ order: 0
29145
+ } },
29146
+ methods: {
29147
+ /**
29148
+ * Momentary drive nudge (the robot moves). `protected` — mirrors
29149
+ * `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
29150
+ * path) works for any authenticated user, not admin-only. The UI sends
29151
+ * these at ~1 Hz while a control is held; the provider forwards each one to
29152
+ * a single drive write WITHOUT debouncing.
29153
+ */
29154
+ move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
29155
+ /** Halt all motion immediately (zero drive vector). */
29156
+ stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
29157
+ /** Send the robot to a point on its live map. */
29158
+ goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
29159
+ /**
29160
+ * Enumerate the discrete controls THIS device supports (data-driven UI +
29161
+ * PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
29162
+ */
29163
+ listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
29164
+ /**
29165
+ * Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
29166
+ * unsupported action ids are rejected by the provider.
29167
+ */
29168
+ runAction: method(object({
29169
+ deviceId: number(),
29170
+ actionId: NavigationActionIdSchema
29171
+ }), _void(), { kind: "mutation" }),
29172
+ /** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
29173
+ playSound: method(object({
29174
+ deviceId: number(),
29175
+ soundId: number().int()
29176
+ }), _void(), { kind: "mutation" }),
29177
+ /**
29178
+ * Turn the on-camera fill light on / off (the `OpenFullLight` control —
29179
+ * works anytime, no active stream required).
29180
+ */
29181
+ setLightOn: method(object({
29182
+ deviceId: number(),
29183
+ on: boolean()
29184
+ }), _void(), { kind: "mutation" }),
29185
+ /**
29186
+ * Set the fill-light mode (auto vs manual). `manual` optionally carries the
29187
+ * initial `level`. The auto/manual + level control is a CAMERA-service
29188
+ * action that generally needs an active camera stream/monitor session — the
29189
+ * UI shows the manual level slider ONLY when `mode === 'manual'`.
29190
+ */
29191
+ setLightMode: method(object({
29192
+ deviceId: number(),
29193
+ mode: NavigationLightModeSchema,
29194
+ level: number().min(40).max(100).optional()
29195
+ }), _void(), { kind: "mutation" }),
29196
+ /** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
29197
+ setLightLevel: method(object({
29198
+ deviceId: number(),
29199
+ level: number().min(40).max(100)
29200
+ }), _void(), { kind: "mutation" }),
29201
+ /**
29202
+ * Per-device FEATURE-FLAG report for the general primitives — drives which
29203
+ * controls the UI shows (the per-entry flags for the dictionary come back on
29204
+ * `listActions`).
29205
+ */
29206
+ getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
29207
+ },
29208
+ events: { onStatusChanged: { data: object({
29209
+ deviceId: number(),
29210
+ status: NavigationStatusSchema
29211
+ }) } },
29212
+ status: {
29213
+ schema: NavigationStatusSchema,
29214
+ kind: "push"
29215
+ },
29216
+ /**
29217
+ * Runtime-state slice mirrored by the kernel. The navigation panel watches it
29218
+ * for live mode / follow / flash changes.
29219
+ */
29220
+ runtimeState: NavigationRuntimeStateSchema,
29221
+ /**
29222
+ * Runtime-state durability: **session** — like `vacuum-control`, a restored
29223
+ * `mode: cleaning` / `following: true` is a robot that is not actually doing
29224
+ * that. The live handle re-publishes on connect.
29225
+ *
29226
+ * See `RuntimeStateDurability`. Enforced by
29227
+ * `scripts/check-runtime-state-durability.ts`.
29228
+ */
29229
+ durability: "session"
29230
+ };
28950
29231
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
28951
29232
  kind: "mutation",
28952
29233
  auth: "admin"
@@ -32222,6 +32503,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32222
32503
  motionTrigger: motionTriggerCapability,
32223
32504
  motionZones: motionZonesCapability,
32224
32505
  nativeObjectDetection: nativeObjectDetectionCapability,
32506
+ navigation: navigationCapability,
32225
32507
  networkLink: networkLinkCapability,
32226
32508
  notifier: notifierCapability,
32227
32509
  numericSensor: numericSensorCapability,
@@ -36076,6 +36358,66 @@ Object.freeze({
36076
36358
  addonId: null,
36077
36359
  access: "create"
36078
36360
  },
36361
+ "navigation.getFeatures": {
36362
+ capName: "navigation",
36363
+ capScope: "device",
36364
+ addonId: null,
36365
+ access: "view"
36366
+ },
36367
+ "navigation.goToPoint": {
36368
+ capName: "navigation",
36369
+ capScope: "device",
36370
+ addonId: null,
36371
+ access: "create"
36372
+ },
36373
+ "navigation.listActions": {
36374
+ capName: "navigation",
36375
+ capScope: "device",
36376
+ addonId: null,
36377
+ access: "view"
36378
+ },
36379
+ "navigation.move": {
36380
+ capName: "navigation",
36381
+ capScope: "device",
36382
+ addonId: null,
36383
+ access: "create"
36384
+ },
36385
+ "navigation.playSound": {
36386
+ capName: "navigation",
36387
+ capScope: "device",
36388
+ addonId: null,
36389
+ access: "create"
36390
+ },
36391
+ "navigation.runAction": {
36392
+ capName: "navigation",
36393
+ capScope: "device",
36394
+ addonId: null,
36395
+ access: "create"
36396
+ },
36397
+ "navigation.setLightLevel": {
36398
+ capName: "navigation",
36399
+ capScope: "device",
36400
+ addonId: null,
36401
+ access: "create"
36402
+ },
36403
+ "navigation.setLightMode": {
36404
+ capName: "navigation",
36405
+ capScope: "device",
36406
+ addonId: null,
36407
+ access: "create"
36408
+ },
36409
+ "navigation.setLightOn": {
36410
+ capName: "navigation",
36411
+ capScope: "device",
36412
+ addonId: null,
36413
+ access: "create"
36414
+ },
36415
+ "navigation.stop": {
36416
+ capName: "navigation",
36417
+ capScope: "device",
36418
+ addonId: null,
36419
+ access: "create"
36420
+ },
36079
36421
  "networkAccess.getEndpoint": {
36080
36422
  capName: "network-access",
36081
36423
  capScope: "system",
@@ -40171,6 +40513,56 @@ Object.freeze({
40171
40513
  form: "single",
40172
40514
  optional: false
40173
40515
  }],
40516
+ "navigation.getFeatures": [{
40517
+ name: "deviceId",
40518
+ form: "single",
40519
+ optional: false
40520
+ }],
40521
+ "navigation.goToPoint": [{
40522
+ name: "deviceId",
40523
+ form: "single",
40524
+ optional: false
40525
+ }],
40526
+ "navigation.listActions": [{
40527
+ name: "deviceId",
40528
+ form: "single",
40529
+ optional: false
40530
+ }],
40531
+ "navigation.move": [{
40532
+ name: "deviceId",
40533
+ form: "single",
40534
+ optional: false
40535
+ }],
40536
+ "navigation.playSound": [{
40537
+ name: "deviceId",
40538
+ form: "single",
40539
+ optional: false
40540
+ }],
40541
+ "navigation.runAction": [{
40542
+ name: "deviceId",
40543
+ form: "single",
40544
+ optional: false
40545
+ }],
40546
+ "navigation.setLightLevel": [{
40547
+ name: "deviceId",
40548
+ form: "single",
40549
+ optional: false
40550
+ }],
40551
+ "navigation.setLightMode": [{
40552
+ name: "deviceId",
40553
+ form: "single",
40554
+ optional: false
40555
+ }],
40556
+ "navigation.setLightOn": [{
40557
+ name: "deviceId",
40558
+ form: "single",
40559
+ optional: false
40560
+ }],
40561
+ "navigation.stop": [{
40562
+ name: "deviceId",
40563
+ form: "single",
40564
+ optional: false
40565
+ }],
40174
40566
  "networkQuality.getDeviceStats": [{
40175
40567
  name: "deviceId",
40176
40568
  form: "single",
package/dist/addon.mjs CHANGED
@@ -28946,6 +28946,287 @@ var ptzAutotrackCapability = {
28946
28946
  */
28947
28947
  durability: "session"
28948
28948
  };
28949
+ /**
28950
+ * `navigation` — a device-scoped capability that natively expresses the FULL
28951
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
28952
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
28953
+ *
28954
+ * Why a NEW cap rather than overloading `ptz`:
28955
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
28956
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
28957
+ * The two are different physical models: PTZ is absolute-position + presets,
28958
+ * navigation is momentary drive nudges + discrete robot ACTIONS
28959
+ * (dock / spot-clean / follow-pet / go-to-point / …).
28960
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
28961
+ * the reverse:
28962
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
28963
+ * / `getOptions`), and
28964
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
28965
+ * robot camera shows up in the existing PTZ control path without every
28966
+ * PTZ provider learning about robots. The mapping lives in the adapter,
28967
+ * not here (see the addon design note):
28968
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
28969
+ * ptz.stop() → navigation.stop()
28970
+ * ptz.goHome() → navigation.runAction('goHome')
28971
+ * ptz.getPresets() → navigation.listActions() (id→preset)
28972
+ * ptz.goToPreset(id) → navigation.runAction(id)
28973
+ *
28974
+ * ## Continuous drive
28975
+ *
28976
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
28977
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
28978
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
28979
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
28980
+ * coalesce them. The UI owns the cadence.
28981
+ *
28982
+ * ## The action dictionary
28983
+ *
28984
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
28985
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
28986
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
28987
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
28988
+ * vendor-specific list. `kind: 'action'` entries are triggered with
28989
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
28990
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
28991
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
28992
+ *
28993
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
28994
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
28995
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
28996
+ * every device handle. A future nodedreame publish adds a typed
28997
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
28998
+ * provider can then swap the raw calls for the typed methods with no change to
28999
+ * THIS contract.
29000
+ */
29001
+ /**
29002
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
29003
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
29004
+ * halts it.
29005
+ *
29006
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
29007
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
29008
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
29009
+ * vector by it (drivers without proportional drive ignore it).
29010
+ *
29011
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
29012
+ * axis alone; an all-undefined nudge is a no-op.
29013
+ */
29014
+ var NavigationMoveCommandSchema = object({
29015
+ pan: number().min(-1).max(1).optional(),
29016
+ tilt: number().min(-1).max(1).optional(),
29017
+ speed: number().min(0).max(1).optional()
29018
+ });
29019
+ /**
29020
+ * The enumerated discrete actions a navigation-capable robot can perform via
29021
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
29022
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
29023
+ * `playSound` (see the `sound` dictionary entries).
29024
+ */
29025
+ var NavigationActionIdSchema = _enum([
29026
+ "goHome",
29027
+ "locate",
29028
+ "spotClean",
29029
+ "findPet",
29030
+ "personFollow",
29031
+ "stop",
29032
+ "startClean",
29033
+ "pauseClean",
29034
+ "dockWash",
29035
+ "autoEmpty",
29036
+ "flashOn",
29037
+ "flashOff"
29038
+ ]);
29039
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
29040
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
29041
+ /**
29042
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
29043
+ * native panel and the PTZ mimic render as a button.
29044
+ *
29045
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
29046
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
29047
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
29048
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
29049
+ * - `label` — operator-facing English label.
29050
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
29051
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
29052
+ * PTZ render ONLY enabled entries. Data-driven: the provider
29053
+ * flips it from config, never by editing code.
29054
+ */
29055
+ var NavigationActionEntrySchema = object({
29056
+ id: string(),
29057
+ kind: NavigationEntryKindSchema,
29058
+ label: string(),
29059
+ icon: string(),
29060
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
29061
+ soundId: number().int().optional(),
29062
+ /** Per-device feature flag — render this entry only when true. */
29063
+ enabled: boolean()
29064
+ });
29065
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
29066
+ var NavigationPointSchema = object({
29067
+ x: number(),
29068
+ y: number()
29069
+ });
29070
+ /**
29071
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
29072
+ * The cap reports which are enabled so the UI / PTZ render only the controls
29073
+ * that are turned on for THIS device. Data-driven: the provider derives these
29074
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
29075
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
29076
+ * that are not dictionary entries.
29077
+ *
29078
+ * - `move` / `stop` — the momentary drive joystick.
29079
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
29080
+ * map-coordinate plumbing is wired.
29081
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
29082
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
29083
+ * - `light` — the on/off fill-light toggle (works anytime).
29084
+ * - `lightMode` — the auto/manual selector + manual level slider (a
29085
+ * camera-service control; needs an active stream).
29086
+ */
29087
+ var NavigationFeaturesSchema = object({
29088
+ move: boolean(),
29089
+ stop: boolean(),
29090
+ goToPoint: boolean(),
29091
+ runAction: boolean(),
29092
+ playSound: boolean(),
29093
+ light: boolean(),
29094
+ lightMode: boolean()
29095
+ });
29096
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
29097
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
29098
+ /**
29099
+ * Live navigation state so the UI can reflect what the robot is doing:
29100
+ * - `mode` — coarse activity (idle / cleaning / following / …).
29101
+ * - `following` — person/pet follow is currently armed.
29102
+ * - `flash` — the on-camera fill light is on.
29103
+ * - `lightMode` — auto vs manual fill-light mode.
29104
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
29105
+ * `lightMode === 'manual'`.
29106
+ */
29107
+ var NavigationStatusSchema = object({
29108
+ mode: _enum([
29109
+ "idle",
29110
+ "cleaning",
29111
+ "spot",
29112
+ "following",
29113
+ "goto",
29114
+ "returning",
29115
+ "paused",
29116
+ "unknown"
29117
+ ]),
29118
+ following: boolean(),
29119
+ flash: boolean(),
29120
+ lightMode: NavigationLightModeSchema,
29121
+ lightLevel: number().min(40).max(100),
29122
+ /** Ms epoch when the slice was last updated. */
29123
+ lastChangedAt: number()
29124
+ });
29125
+ /**
29126
+ * Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
29127
+ * observable). Adds `lastFetchedAt` on top of the status shape per the
29128
+ * convention.
29129
+ */
29130
+ var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
29131
+ var navigationCapability = {
29132
+ name: "navigation",
29133
+ scope: "device",
29134
+ deviceNative: true,
29135
+ mode: "singleton",
29136
+ deviceTypes: [DeviceType.Camera],
29137
+ deviceConfig: { ui: {
29138
+ kind: "widget",
29139
+ widgetId: "host/navigation-panel",
29140
+ tab: "navigation",
29141
+ topTab: true,
29142
+ label: "Navigation",
29143
+ order: 0
29144
+ } },
29145
+ methods: {
29146
+ /**
29147
+ * Momentary drive nudge (the robot moves). `protected` — mirrors
29148
+ * `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
29149
+ * path) works for any authenticated user, not admin-only. The UI sends
29150
+ * these at ~1 Hz while a control is held; the provider forwards each one to
29151
+ * a single drive write WITHOUT debouncing.
29152
+ */
29153
+ move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
29154
+ /** Halt all motion immediately (zero drive vector). */
29155
+ stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
29156
+ /** Send the robot to a point on its live map. */
29157
+ goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
29158
+ /**
29159
+ * Enumerate the discrete controls THIS device supports (data-driven UI +
29160
+ * PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
29161
+ */
29162
+ listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
29163
+ /**
29164
+ * Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
29165
+ * unsupported action ids are rejected by the provider.
29166
+ */
29167
+ runAction: method(object({
29168
+ deviceId: number(),
29169
+ actionId: NavigationActionIdSchema
29170
+ }), _void(), { kind: "mutation" }),
29171
+ /** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
29172
+ playSound: method(object({
29173
+ deviceId: number(),
29174
+ soundId: number().int()
29175
+ }), _void(), { kind: "mutation" }),
29176
+ /**
29177
+ * Turn the on-camera fill light on / off (the `OpenFullLight` control —
29178
+ * works anytime, no active stream required).
29179
+ */
29180
+ setLightOn: method(object({
29181
+ deviceId: number(),
29182
+ on: boolean()
29183
+ }), _void(), { kind: "mutation" }),
29184
+ /**
29185
+ * Set the fill-light mode (auto vs manual). `manual` optionally carries the
29186
+ * initial `level`. The auto/manual + level control is a CAMERA-service
29187
+ * action that generally needs an active camera stream/monitor session — the
29188
+ * UI shows the manual level slider ONLY when `mode === 'manual'`.
29189
+ */
29190
+ setLightMode: method(object({
29191
+ deviceId: number(),
29192
+ mode: NavigationLightModeSchema,
29193
+ level: number().min(40).max(100).optional()
29194
+ }), _void(), { kind: "mutation" }),
29195
+ /** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
29196
+ setLightLevel: method(object({
29197
+ deviceId: number(),
29198
+ level: number().min(40).max(100)
29199
+ }), _void(), { kind: "mutation" }),
29200
+ /**
29201
+ * Per-device FEATURE-FLAG report for the general primitives — drives which
29202
+ * controls the UI shows (the per-entry flags for the dictionary come back on
29203
+ * `listActions`).
29204
+ */
29205
+ getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
29206
+ },
29207
+ events: { onStatusChanged: { data: object({
29208
+ deviceId: number(),
29209
+ status: NavigationStatusSchema
29210
+ }) } },
29211
+ status: {
29212
+ schema: NavigationStatusSchema,
29213
+ kind: "push"
29214
+ },
29215
+ /**
29216
+ * Runtime-state slice mirrored by the kernel. The navigation panel watches it
29217
+ * for live mode / follow / flash changes.
29218
+ */
29219
+ runtimeState: NavigationRuntimeStateSchema,
29220
+ /**
29221
+ * Runtime-state durability: **session** — like `vacuum-control`, a restored
29222
+ * `mode: cleaning` / `following: true` is a robot that is not actually doing
29223
+ * that. The live handle re-publishes on connect.
29224
+ *
29225
+ * See `RuntimeStateDurability`. Enforced by
29226
+ * `scripts/check-runtime-state-durability.ts`.
29227
+ */
29228
+ durability: "session"
29229
+ };
28949
29230
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
28950
29231
  kind: "mutation",
28951
29232
  auth: "admin"
@@ -32221,6 +32502,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
32221
32502
  motionTrigger: motionTriggerCapability,
32222
32503
  motionZones: motionZonesCapability,
32223
32504
  nativeObjectDetection: nativeObjectDetectionCapability,
32505
+ navigation: navigationCapability,
32224
32506
  networkLink: networkLinkCapability,
32225
32507
  notifier: notifierCapability,
32226
32508
  numericSensor: numericSensorCapability,
@@ -36075,6 +36357,66 @@ Object.freeze({
36075
36357
  addonId: null,
36076
36358
  access: "create"
36077
36359
  },
36360
+ "navigation.getFeatures": {
36361
+ capName: "navigation",
36362
+ capScope: "device",
36363
+ addonId: null,
36364
+ access: "view"
36365
+ },
36366
+ "navigation.goToPoint": {
36367
+ capName: "navigation",
36368
+ capScope: "device",
36369
+ addonId: null,
36370
+ access: "create"
36371
+ },
36372
+ "navigation.listActions": {
36373
+ capName: "navigation",
36374
+ capScope: "device",
36375
+ addonId: null,
36376
+ access: "view"
36377
+ },
36378
+ "navigation.move": {
36379
+ capName: "navigation",
36380
+ capScope: "device",
36381
+ addonId: null,
36382
+ access: "create"
36383
+ },
36384
+ "navigation.playSound": {
36385
+ capName: "navigation",
36386
+ capScope: "device",
36387
+ addonId: null,
36388
+ access: "create"
36389
+ },
36390
+ "navigation.runAction": {
36391
+ capName: "navigation",
36392
+ capScope: "device",
36393
+ addonId: null,
36394
+ access: "create"
36395
+ },
36396
+ "navigation.setLightLevel": {
36397
+ capName: "navigation",
36398
+ capScope: "device",
36399
+ addonId: null,
36400
+ access: "create"
36401
+ },
36402
+ "navigation.setLightMode": {
36403
+ capName: "navigation",
36404
+ capScope: "device",
36405
+ addonId: null,
36406
+ access: "create"
36407
+ },
36408
+ "navigation.setLightOn": {
36409
+ capName: "navigation",
36410
+ capScope: "device",
36411
+ addonId: null,
36412
+ access: "create"
36413
+ },
36414
+ "navigation.stop": {
36415
+ capName: "navigation",
36416
+ capScope: "device",
36417
+ addonId: null,
36418
+ access: "create"
36419
+ },
36078
36420
  "networkAccess.getEndpoint": {
36079
36421
  capName: "network-access",
36080
36422
  capScope: "system",
@@ -40170,6 +40512,56 @@ Object.freeze({
40170
40512
  form: "single",
40171
40513
  optional: false
40172
40514
  }],
40515
+ "navigation.getFeatures": [{
40516
+ name: "deviceId",
40517
+ form: "single",
40518
+ optional: false
40519
+ }],
40520
+ "navigation.goToPoint": [{
40521
+ name: "deviceId",
40522
+ form: "single",
40523
+ optional: false
40524
+ }],
40525
+ "navigation.listActions": [{
40526
+ name: "deviceId",
40527
+ form: "single",
40528
+ optional: false
40529
+ }],
40530
+ "navigation.move": [{
40531
+ name: "deviceId",
40532
+ form: "single",
40533
+ optional: false
40534
+ }],
40535
+ "navigation.playSound": [{
40536
+ name: "deviceId",
40537
+ form: "single",
40538
+ optional: false
40539
+ }],
40540
+ "navigation.runAction": [{
40541
+ name: "deviceId",
40542
+ form: "single",
40543
+ optional: false
40544
+ }],
40545
+ "navigation.setLightLevel": [{
40546
+ name: "deviceId",
40547
+ form: "single",
40548
+ optional: false
40549
+ }],
40550
+ "navigation.setLightMode": [{
40551
+ name: "deviceId",
40552
+ form: "single",
40553
+ optional: false
40554
+ }],
40555
+ "navigation.setLightOn": [{
40556
+ name: "deviceId",
40557
+ form: "single",
40558
+ optional: false
40559
+ }],
40560
+ "navigation.stop": [{
40561
+ name: "deviceId",
40562
+ form: "single",
40563
+ optional: false
40564
+ }],
40173
40565
  "networkQuality.getDeviceStats": [{
40174
40566
  name: "deviceId",
40175
40567
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-velux",
3
- "version": "0.2.70",
3
+ "version": "0.2.71",
4
4
  "description": "Velux KLF-200 device-provider addon for CamStack — local-gateway window + shutter covers (positional, no tilt)",
5
5
  "keywords": [
6
6
  "camstack",