@camstack/addon-notifiers 1.2.73 → 1.2.75

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
@@ -29,7 +29,7 @@ let node_fs = require("node:fs");
29
29
  let node_path = require("node:path");
30
30
  node_path = __toESM(node_path);
31
31
  let node_url = require("node:url");
32
- //#region ../types/dist/event-category-BZL-fdNj.mjs
32
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
33
33
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
34
34
  EventCategory["SystemBoot"] = "system.boot";
35
35
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -401,6 +401,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
401
401
  */
402
402
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
403
403
  /**
404
+ * Cap event fired by every device that registers the `network-link`
405
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
406
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
407
+ * reading that moved.
408
+ */
409
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
410
+ /**
404
411
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
405
412
  * "wake in progress" window — between the Baichuan wake-up issue and
406
413
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -23369,6 +23376,39 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23369
23376
  deviceId: number(),
23370
23377
  status: BatteryStatusSchema
23371
23378
  });
23379
+ /**
23380
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23381
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23382
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23383
+ * one Home Assistant projection.
23384
+ */
23385
+ var NetworkLinkStatusSchema = object({
23386
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23387
+ type: _enum([
23388
+ "wifi",
23389
+ "ethernet",
23390
+ "cellular",
23391
+ "unknown"
23392
+ ]),
23393
+ /**
23394
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23395
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23396
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23397
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23398
+ * SKIP a null rather than coerce it.
23399
+ */
23400
+ signalPercent: number().min(0).max(100).nullable(),
23401
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23402
+ rssiDbm: number().optional(),
23403
+ /** Network name of a wireless link, when the firmware reports it. */
23404
+ ssid: string().optional(),
23405
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23406
+ lastUpdated: number()
23407
+ });
23408
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23409
+ deviceId: number(),
23410
+ status: NetworkLinkStatusSchema
23411
+ });
23372
23412
  object({
23373
23413
  on: boolean(),
23374
23414
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26963,6 +27003,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26963
27003
  deviceId: number(),
26964
27004
  status: PtzAutotrackStatusSchema
26965
27005
  });
27006
+ /**
27007
+ * `navigation` — a device-scoped capability that natively expresses the FULL
27008
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
27009
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
27010
+ *
27011
+ * Why a NEW cap rather than overloading `ptz`:
27012
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27013
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27014
+ * The two are different physical models: PTZ is absolute-position + presets,
27015
+ * navigation is momentary drive nudges + discrete robot ACTIONS
27016
+ * (dock / spot-clean / follow-pet / go-to-point / …).
27017
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27018
+ * the reverse:
27019
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
27020
+ * / `getOptions`), and
27021
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27022
+ * robot camera shows up in the existing PTZ control path without every
27023
+ * PTZ provider learning about robots. The mapping lives in the adapter,
27024
+ * not here (see the addon design note):
27025
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27026
+ * ptz.stop() → navigation.stop()
27027
+ * ptz.goHome() → navigation.runAction('goHome')
27028
+ * ptz.getPresets() → navigation.listActions() (id→preset)
27029
+ * ptz.goToPreset(id) → navigation.runAction(id)
27030
+ *
27031
+ * ## Continuous drive
27032
+ *
27033
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27034
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27035
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27036
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27037
+ * coalesce them. The UI owns the cadence.
27038
+ *
27039
+ * ## The action dictionary
27040
+ *
27041
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27042
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27043
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27044
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27045
+ * vendor-specific list. `kind: 'action'` entries are triggered with
27046
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27047
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
27048
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27049
+ *
27050
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27051
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27052
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
27053
+ * every device handle. A future nodedreame publish adds a typed
27054
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27055
+ * provider can then swap the raw calls for the typed methods with no change to
27056
+ * THIS contract.
27057
+ */
27058
+ /**
27059
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27060
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27061
+ * halts it.
27062
+ *
27063
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
27064
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27065
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27066
+ * vector by it (drivers without proportional drive ignore it).
27067
+ *
27068
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27069
+ * axis alone; an all-undefined nudge is a no-op.
27070
+ */
27071
+ var NavigationMoveCommandSchema = object({
27072
+ pan: number().min(-1).max(1).optional(),
27073
+ tilt: number().min(-1).max(1).optional(),
27074
+ speed: number().min(0).max(1).optional()
27075
+ });
27076
+ /**
27077
+ * The enumerated discrete actions a navigation-capable robot can perform via
27078
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27079
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
27080
+ * `playSound` (see the `sound` dictionary entries).
27081
+ */
27082
+ var NavigationActionIdSchema = _enum([
27083
+ "goHome",
27084
+ "locate",
27085
+ "spotClean",
27086
+ "findPet",
27087
+ "personFollow",
27088
+ "stop",
27089
+ "startClean",
27090
+ "pauseClean",
27091
+ "dockWash",
27092
+ "autoEmpty",
27093
+ "flashOn",
27094
+ "flashOff"
27095
+ ]);
27096
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27097
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27098
+ /**
27099
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27100
+ * native panel and the PTZ mimic render as a button.
27101
+ *
27102
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27103
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27104
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27105
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27106
+ * - `label` — operator-facing English label.
27107
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27108
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27109
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27110
+ * flips it from config, never by editing code.
27111
+ */
27112
+ var NavigationActionEntrySchema = object({
27113
+ id: string(),
27114
+ kind: NavigationEntryKindSchema,
27115
+ label: string(),
27116
+ icon: string(),
27117
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27118
+ soundId: number().int().optional(),
27119
+ /** Per-device feature flag — render this entry only when true. */
27120
+ enabled: boolean()
27121
+ });
27122
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27123
+ var NavigationPointSchema = object({
27124
+ x: number(),
27125
+ y: number()
27126
+ });
27127
+ /**
27128
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27129
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27130
+ * that are turned on for THIS device. Data-driven: the provider derives these
27131
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27132
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27133
+ * that are not dictionary entries.
27134
+ *
27135
+ * - `move` / `stop` — the momentary drive joystick.
27136
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27137
+ * map-coordinate plumbing is wired.
27138
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27139
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27140
+ * - `light` — the on/off fill-light toggle (works anytime).
27141
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27142
+ * camera-service control; needs an active stream).
27143
+ */
27144
+ var NavigationFeaturesSchema = object({
27145
+ move: boolean(),
27146
+ stop: boolean(),
27147
+ goToPoint: boolean(),
27148
+ runAction: boolean(),
27149
+ playSound: boolean(),
27150
+ light: boolean(),
27151
+ lightMode: boolean()
27152
+ });
27153
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27154
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27155
+ /**
27156
+ * Live navigation state so the UI can reflect what the robot is doing:
27157
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27158
+ * - `following` — person/pet follow is currently armed.
27159
+ * - `flash` — the on-camera fill light is on.
27160
+ * - `lightMode` — auto vs manual fill-light mode.
27161
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27162
+ * `lightMode === 'manual'`.
27163
+ */
27164
+ var NavigationStatusSchema = object({
27165
+ mode: _enum([
27166
+ "idle",
27167
+ "cleaning",
27168
+ "spot",
27169
+ "following",
27170
+ "goto",
27171
+ "returning",
27172
+ "paused",
27173
+ "unknown"
27174
+ ]),
27175
+ following: boolean(),
27176
+ flash: boolean(),
27177
+ lightMode: NavigationLightModeSchema,
27178
+ lightLevel: number().min(40).max(100),
27179
+ /** Ms epoch when the slice was last updated. */
27180
+ lastChangedAt: number()
27181
+ });
27182
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
27183
+ DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
27184
+ deviceId: number(),
27185
+ actionId: NavigationActionIdSchema
27186
+ }), _void(), { kind: "mutation" }), method(object({
27187
+ deviceId: number(),
27188
+ soundId: number().int()
27189
+ }), _void(), { kind: "mutation" }), method(object({
27190
+ deviceId: number(),
27191
+ on: boolean()
27192
+ }), _void(), { kind: "mutation" }), method(object({
27193
+ deviceId: number(),
27194
+ mode: NavigationLightModeSchema,
27195
+ level: number().min(40).max(100).optional()
27196
+ }), _void(), { kind: "mutation" }), method(object({
27197
+ deviceId: number(),
27198
+ level: number().min(40).max(100)
27199
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27200
+ deviceId: number(),
27201
+ status: NavigationStatusSchema
27202
+ });
26966
27203
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
26967
27204
  kind: "mutation",
26968
27205
  auth: "admin"
@@ -32027,6 +32264,66 @@ Object.freeze({
32027
32264
  addonId: null,
32028
32265
  access: "create"
32029
32266
  },
32267
+ "navigation.getFeatures": {
32268
+ capName: "navigation",
32269
+ capScope: "device",
32270
+ addonId: null,
32271
+ access: "view"
32272
+ },
32273
+ "navigation.goToPoint": {
32274
+ capName: "navigation",
32275
+ capScope: "device",
32276
+ addonId: null,
32277
+ access: "create"
32278
+ },
32279
+ "navigation.listActions": {
32280
+ capName: "navigation",
32281
+ capScope: "device",
32282
+ addonId: null,
32283
+ access: "view"
32284
+ },
32285
+ "navigation.move": {
32286
+ capName: "navigation",
32287
+ capScope: "device",
32288
+ addonId: null,
32289
+ access: "create"
32290
+ },
32291
+ "navigation.playSound": {
32292
+ capName: "navigation",
32293
+ capScope: "device",
32294
+ addonId: null,
32295
+ access: "create"
32296
+ },
32297
+ "navigation.runAction": {
32298
+ capName: "navigation",
32299
+ capScope: "device",
32300
+ addonId: null,
32301
+ access: "create"
32302
+ },
32303
+ "navigation.setLightLevel": {
32304
+ capName: "navigation",
32305
+ capScope: "device",
32306
+ addonId: null,
32307
+ access: "create"
32308
+ },
32309
+ "navigation.setLightMode": {
32310
+ capName: "navigation",
32311
+ capScope: "device",
32312
+ addonId: null,
32313
+ access: "create"
32314
+ },
32315
+ "navigation.setLightOn": {
32316
+ capName: "navigation",
32317
+ capScope: "device",
32318
+ addonId: null,
32319
+ access: "create"
32320
+ },
32321
+ "navigation.stop": {
32322
+ capName: "navigation",
32323
+ capScope: "device",
32324
+ addonId: null,
32325
+ access: "create"
32326
+ },
32030
32327
  "networkAccess.getEndpoint": {
32031
32328
  capName: "network-access",
32032
32329
  capScope: "system",
@@ -36122,6 +36419,56 @@ Object.freeze({
36122
36419
  form: "single",
36123
36420
  optional: false
36124
36421
  }],
36422
+ "navigation.getFeatures": [{
36423
+ name: "deviceId",
36424
+ form: "single",
36425
+ optional: false
36426
+ }],
36427
+ "navigation.goToPoint": [{
36428
+ name: "deviceId",
36429
+ form: "single",
36430
+ optional: false
36431
+ }],
36432
+ "navigation.listActions": [{
36433
+ name: "deviceId",
36434
+ form: "single",
36435
+ optional: false
36436
+ }],
36437
+ "navigation.move": [{
36438
+ name: "deviceId",
36439
+ form: "single",
36440
+ optional: false
36441
+ }],
36442
+ "navigation.playSound": [{
36443
+ name: "deviceId",
36444
+ form: "single",
36445
+ optional: false
36446
+ }],
36447
+ "navigation.runAction": [{
36448
+ name: "deviceId",
36449
+ form: "single",
36450
+ optional: false
36451
+ }],
36452
+ "navigation.setLightLevel": [{
36453
+ name: "deviceId",
36454
+ form: "single",
36455
+ optional: false
36456
+ }],
36457
+ "navigation.setLightMode": [{
36458
+ name: "deviceId",
36459
+ form: "single",
36460
+ optional: false
36461
+ }],
36462
+ "navigation.setLightOn": [{
36463
+ name: "deviceId",
36464
+ form: "single",
36465
+ optional: false
36466
+ }],
36467
+ "navigation.stop": [{
36468
+ name: "deviceId",
36469
+ form: "single",
36470
+ optional: false
36471
+ }],
36125
36472
  "networkQuality.getDeviceStats": [{
36126
36473
  name: "deviceId",
36127
36474
  form: "single",
package/dist/addon.mjs CHANGED
@@ -2,7 +2,7 @@ import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
2
2
  import { readFileSync } from "node:fs";
3
3
  import path from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- //#region ../types/dist/event-category-BZL-fdNj.mjs
5
+ //#region ../types/dist/event-category-zAv7pMUz.mjs
6
6
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
7
7
  EventCategory["SystemBoot"] = "system.boot";
8
8
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -374,6 +374,13 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
374
374
  */
375
375
  EventCategory["BatteryOnStatusChanged"] = "battery.onStatusChanged";
376
376
  /**
377
+ * Cap event fired by every device that registers the `network-link`
378
+ * capability. Mirrors the cap definition's `onStatusChanged`. Carries
379
+ * `{ deviceId, status: NetworkLinkStatus }` — a link switch or a signal
380
+ * reading that moved.
381
+ */
382
+ EventCategory["NetworkLinkOnStatusChanged"] = "network-link.onStatusChanged";
383
+ /**
377
384
  * Emitted by the battery cap provider WHEN `wakeForStream` enters the
378
385
  * "wake in progress" window — between the Baichuan wake-up issue and
379
386
  * the camera's first dialed-back RTP packet. The stream-broker
@@ -23342,6 +23349,39 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
23342
23349
  deviceId: number(),
23343
23350
  status: BatteryStatusSchema
23344
23351
  });
23352
+ /**
23353
+ * Network-link snapshot. Same shape for every provider (a Reolink wifi
23354
+ * camera, a Home Assistant device with a signal-strength sensor, a Tapo
23355
+ * plug): one slice under `device.runtimeState['network-link']`, one badge,
23356
+ * one Home Assistant projection.
23357
+ */
23358
+ var NetworkLinkStatusSchema = object({
23359
+ /** The link the device is on. `'unknown'` = not read yet, not "no link". */
23360
+ type: _enum([
23361
+ "wifi",
23362
+ "ethernet",
23363
+ "cellular",
23364
+ "unknown"
23365
+ ]),
23366
+ /**
23367
+ * Link quality, 0..100 inclusive, normalised by the provider from whatever
23368
+ * the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
23369
+ * KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
23370
+ * one whose reading has not landed must not be drawn at 0 %. Consumers
23371
+ * SKIP a null rather than coerce it.
23372
+ */
23373
+ signalPercent: number().min(0).max(100).nullable(),
23374
+ /** Raw received signal strength in dBm, when the firmware reports one. */
23375
+ rssiDbm: number().optional(),
23376
+ /** Network name of a wireless link, when the firmware reports it. */
23377
+ ssid: string().optional(),
23378
+ /** Ms epoch of the last observation. Lets consumers reason about freshness. */
23379
+ lastUpdated: number()
23380
+ });
23381
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
23382
+ deviceId: number(),
23383
+ status: NetworkLinkStatusSchema
23384
+ });
23345
23385
  object({
23346
23386
  on: boolean(),
23347
23387
  /** Ms epoch of the last transition. 0 if never observed. */
@@ -26936,6 +26976,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26936
26976
  deviceId: number(),
26937
26977
  status: PtzAutotrackStatusSchema
26938
26978
  });
26979
+ /**
26980
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26981
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26982
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26983
+ *
26984
+ * Why a NEW cap rather than overloading `ptz`:
26985
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26986
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26987
+ * The two are different physical models: PTZ is absolute-position + presets,
26988
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26989
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26990
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26991
+ * the reverse:
26992
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26993
+ * / `getOptions`), and
26994
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26995
+ * robot camera shows up in the existing PTZ control path without every
26996
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26997
+ * not here (see the addon design note):
26998
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26999
+ * ptz.stop() → navigation.stop()
27000
+ * ptz.goHome() → navigation.runAction('goHome')
27001
+ * ptz.getPresets() → navigation.listActions() (id→preset)
27002
+ * ptz.goToPreset(id) → navigation.runAction(id)
27003
+ *
27004
+ * ## Continuous drive
27005
+ *
27006
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27007
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27008
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27009
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27010
+ * coalesce them. The UI owns the cadence.
27011
+ *
27012
+ * ## The action dictionary
27013
+ *
27014
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27015
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27016
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27017
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27018
+ * vendor-specific list. `kind: 'action'` entries are triggered with
27019
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27020
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
27021
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27022
+ *
27023
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27024
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27025
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
27026
+ * every device handle. A future nodedreame publish adds a typed
27027
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27028
+ * provider can then swap the raw calls for the typed methods with no change to
27029
+ * THIS contract.
27030
+ */
27031
+ /**
27032
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27033
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27034
+ * halts it.
27035
+ *
27036
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
27037
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27038
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27039
+ * vector by it (drivers without proportional drive ignore it).
27040
+ *
27041
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27042
+ * axis alone; an all-undefined nudge is a no-op.
27043
+ */
27044
+ var NavigationMoveCommandSchema = object({
27045
+ pan: number().min(-1).max(1).optional(),
27046
+ tilt: number().min(-1).max(1).optional(),
27047
+ speed: number().min(0).max(1).optional()
27048
+ });
27049
+ /**
27050
+ * The enumerated discrete actions a navigation-capable robot can perform via
27051
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27052
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
27053
+ * `playSound` (see the `sound` dictionary entries).
27054
+ */
27055
+ var NavigationActionIdSchema = _enum([
27056
+ "goHome",
27057
+ "locate",
27058
+ "spotClean",
27059
+ "findPet",
27060
+ "personFollow",
27061
+ "stop",
27062
+ "startClean",
27063
+ "pauseClean",
27064
+ "dockWash",
27065
+ "autoEmpty",
27066
+ "flashOn",
27067
+ "flashOff"
27068
+ ]);
27069
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27070
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27071
+ /**
27072
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27073
+ * native panel and the PTZ mimic render as a button.
27074
+ *
27075
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27076
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27077
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27078
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27079
+ * - `label` — operator-facing English label.
27080
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27081
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27082
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27083
+ * flips it from config, never by editing code.
27084
+ */
27085
+ var NavigationActionEntrySchema = object({
27086
+ id: string(),
27087
+ kind: NavigationEntryKindSchema,
27088
+ label: string(),
27089
+ icon: string(),
27090
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27091
+ soundId: number().int().optional(),
27092
+ /** Per-device feature flag — render this entry only when true. */
27093
+ enabled: boolean()
27094
+ });
27095
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27096
+ var NavigationPointSchema = object({
27097
+ x: number(),
27098
+ y: number()
27099
+ });
27100
+ /**
27101
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27102
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27103
+ * that are turned on for THIS device. Data-driven: the provider derives these
27104
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27105
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27106
+ * that are not dictionary entries.
27107
+ *
27108
+ * - `move` / `stop` — the momentary drive joystick.
27109
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27110
+ * map-coordinate plumbing is wired.
27111
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27112
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27113
+ * - `light` — the on/off fill-light toggle (works anytime).
27114
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27115
+ * camera-service control; needs an active stream).
27116
+ */
27117
+ var NavigationFeaturesSchema = object({
27118
+ move: boolean(),
27119
+ stop: boolean(),
27120
+ goToPoint: boolean(),
27121
+ runAction: boolean(),
27122
+ playSound: boolean(),
27123
+ light: boolean(),
27124
+ lightMode: boolean()
27125
+ });
27126
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27127
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27128
+ /**
27129
+ * Live navigation state so the UI can reflect what the robot is doing:
27130
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27131
+ * - `following` — person/pet follow is currently armed.
27132
+ * - `flash` — the on-camera fill light is on.
27133
+ * - `lightMode` — auto vs manual fill-light mode.
27134
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27135
+ * `lightMode === 'manual'`.
27136
+ */
27137
+ var NavigationStatusSchema = object({
27138
+ mode: _enum([
27139
+ "idle",
27140
+ "cleaning",
27141
+ "spot",
27142
+ "following",
27143
+ "goto",
27144
+ "returning",
27145
+ "paused",
27146
+ "unknown"
27147
+ ]),
27148
+ following: boolean(),
27149
+ flash: boolean(),
27150
+ lightMode: NavigationLightModeSchema,
27151
+ lightLevel: number().min(40).max(100),
27152
+ /** Ms epoch when the slice was last updated. */
27153
+ lastChangedAt: number()
27154
+ });
27155
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
27156
+ DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), array(NavigationActionEntrySchema)), method(object({
27157
+ deviceId: number(),
27158
+ actionId: NavigationActionIdSchema
27159
+ }), _void(), { kind: "mutation" }), method(object({
27160
+ deviceId: number(),
27161
+ soundId: number().int()
27162
+ }), _void(), { kind: "mutation" }), method(object({
27163
+ deviceId: number(),
27164
+ on: boolean()
27165
+ }), _void(), { kind: "mutation" }), method(object({
27166
+ deviceId: number(),
27167
+ mode: NavigationLightModeSchema,
27168
+ level: number().min(40).max(100).optional()
27169
+ }), _void(), { kind: "mutation" }), method(object({
27170
+ deviceId: number(),
27171
+ level: number().min(40).max(100)
27172
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27173
+ deviceId: number(),
27174
+ status: NavigationStatusSchema
27175
+ });
26939
27176
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
26940
27177
  kind: "mutation",
26941
27178
  auth: "admin"
@@ -32000,6 +32237,66 @@ Object.freeze({
32000
32237
  addonId: null,
32001
32238
  access: "create"
32002
32239
  },
32240
+ "navigation.getFeatures": {
32241
+ capName: "navigation",
32242
+ capScope: "device",
32243
+ addonId: null,
32244
+ access: "view"
32245
+ },
32246
+ "navigation.goToPoint": {
32247
+ capName: "navigation",
32248
+ capScope: "device",
32249
+ addonId: null,
32250
+ access: "create"
32251
+ },
32252
+ "navigation.listActions": {
32253
+ capName: "navigation",
32254
+ capScope: "device",
32255
+ addonId: null,
32256
+ access: "view"
32257
+ },
32258
+ "navigation.move": {
32259
+ capName: "navigation",
32260
+ capScope: "device",
32261
+ addonId: null,
32262
+ access: "create"
32263
+ },
32264
+ "navigation.playSound": {
32265
+ capName: "navigation",
32266
+ capScope: "device",
32267
+ addonId: null,
32268
+ access: "create"
32269
+ },
32270
+ "navigation.runAction": {
32271
+ capName: "navigation",
32272
+ capScope: "device",
32273
+ addonId: null,
32274
+ access: "create"
32275
+ },
32276
+ "navigation.setLightLevel": {
32277
+ capName: "navigation",
32278
+ capScope: "device",
32279
+ addonId: null,
32280
+ access: "create"
32281
+ },
32282
+ "navigation.setLightMode": {
32283
+ capName: "navigation",
32284
+ capScope: "device",
32285
+ addonId: null,
32286
+ access: "create"
32287
+ },
32288
+ "navigation.setLightOn": {
32289
+ capName: "navigation",
32290
+ capScope: "device",
32291
+ addonId: null,
32292
+ access: "create"
32293
+ },
32294
+ "navigation.stop": {
32295
+ capName: "navigation",
32296
+ capScope: "device",
32297
+ addonId: null,
32298
+ access: "create"
32299
+ },
32003
32300
  "networkAccess.getEndpoint": {
32004
32301
  capName: "network-access",
32005
32302
  capScope: "system",
@@ -36095,6 +36392,56 @@ Object.freeze({
36095
36392
  form: "single",
36096
36393
  optional: false
36097
36394
  }],
36395
+ "navigation.getFeatures": [{
36396
+ name: "deviceId",
36397
+ form: "single",
36398
+ optional: false
36399
+ }],
36400
+ "navigation.goToPoint": [{
36401
+ name: "deviceId",
36402
+ form: "single",
36403
+ optional: false
36404
+ }],
36405
+ "navigation.listActions": [{
36406
+ name: "deviceId",
36407
+ form: "single",
36408
+ optional: false
36409
+ }],
36410
+ "navigation.move": [{
36411
+ name: "deviceId",
36412
+ form: "single",
36413
+ optional: false
36414
+ }],
36415
+ "navigation.playSound": [{
36416
+ name: "deviceId",
36417
+ form: "single",
36418
+ optional: false
36419
+ }],
36420
+ "navigation.runAction": [{
36421
+ name: "deviceId",
36422
+ form: "single",
36423
+ optional: false
36424
+ }],
36425
+ "navigation.setLightLevel": [{
36426
+ name: "deviceId",
36427
+ form: "single",
36428
+ optional: false
36429
+ }],
36430
+ "navigation.setLightMode": [{
36431
+ name: "deviceId",
36432
+ form: "single",
36433
+ optional: false
36434
+ }],
36435
+ "navigation.setLightOn": [{
36436
+ name: "deviceId",
36437
+ form: "single",
36438
+ optional: false
36439
+ }],
36440
+ "navigation.stop": [{
36441
+ name: "deviceId",
36442
+ form: "single",
36443
+ optional: false
36444
+ }],
36098
36445
  "networkQuality.getDeviceStats": [{
36099
36446
  name: "deviceId",
36100
36447
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-notifiers",
3
- "version": "1.2.73",
3
+ "version": "1.2.75",
4
4
  "description": "System notifiers addon for CamStack — a `notification-output` collection provider hosting per-kind notifier adapters (ntfy, pushover, gotify, telegram, discord, webhook, zentik).",
5
5
  "keywords": [
6
6
  "camstack",