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