@camstack/addon-tailscale 1.2.70 → 1.2.72

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.
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-BoE-0P-g.js");
27
+ const require_dist = require("../dist-CrqSrdSD.js");
28
28
  let node_child_process = require("node:child_process");
29
29
  let node_util = require("node:util");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-BI0_HzJ1.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-Dv-a1IEt.mjs";
2
2
  import { execFile, spawn } from "node:child_process";
3
3
  import { promisify } from "node:util";
4
4
  import * as fs from "node:fs";
@@ -5405,6 +5405,12 @@ Object.fromEntries([
5405
5405
  icon: "move",
5406
5406
  order: 40
5407
5407
  },
5408
+ {
5409
+ id: "navigation",
5410
+ label: "Navigation",
5411
+ icon: "compass",
5412
+ order: 41
5413
+ },
5408
5414
  {
5409
5415
  id: "consumables",
5410
5416
  label: "Consumables",
@@ -26910,6 +26916,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26910
26916
  deviceId: number(),
26911
26917
  status: PtzAutotrackStatusSchema
26912
26918
  });
26919
+ /**
26920
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26921
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26922
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26923
+ *
26924
+ * Why a NEW cap rather than overloading `ptz`:
26925
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26926
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26927
+ * The two are different physical models: PTZ is absolute-position + presets,
26928
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26929
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26930
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26931
+ * the reverse:
26932
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26933
+ * / `getOptions`), and
26934
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26935
+ * robot camera shows up in the existing PTZ control path without every
26936
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26937
+ * not here (see the addon design note):
26938
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26939
+ * ptz.stop() → navigation.stop()
26940
+ * ptz.goHome() → navigation.runAction('goHome')
26941
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26942
+ * ptz.goToPreset(id) → navigation.runAction(id)
26943
+ *
26944
+ * ## Continuous drive
26945
+ *
26946
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26947
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26948
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26949
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26950
+ * coalesce them. The UI owns the cadence.
26951
+ *
26952
+ * ## The action dictionary
26953
+ *
26954
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26955
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26956
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26957
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26958
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26959
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26960
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26961
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26962
+ *
26963
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26964
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26965
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26966
+ * every device handle. A future nodedreame publish adds a typed
26967
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26968
+ * provider can then swap the raw calls for the typed methods with no change to
26969
+ * THIS contract.
26970
+ */
26971
+ /**
26972
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26973
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26974
+ * halts it.
26975
+ *
26976
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26977
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26978
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26979
+ * vector by it (drivers without proportional drive ignore it).
26980
+ *
26981
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26982
+ * axis alone; an all-undefined nudge is a no-op.
26983
+ */
26984
+ var NavigationMoveCommandSchema = object({
26985
+ pan: number().min(-1).max(1).optional(),
26986
+ tilt: number().min(-1).max(1).optional(),
26987
+ speed: number().min(0).max(1).optional()
26988
+ });
26989
+ /**
26990
+ * The enumerated discrete actions a navigation-capable robot can perform via
26991
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26992
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26993
+ * `playSound` (see the `sound` dictionary entries).
26994
+ */
26995
+ var NavigationActionIdSchema = _enum([
26996
+ "goHome",
26997
+ "locate",
26998
+ "spotClean",
26999
+ "findPet",
27000
+ "personFollow",
27001
+ "stop",
27002
+ "startClean",
27003
+ "pauseClean",
27004
+ "dockWash",
27005
+ "autoEmpty",
27006
+ "flashOn",
27007
+ "flashOff"
27008
+ ]);
27009
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27010
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27011
+ /**
27012
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27013
+ * native panel and the PTZ mimic render as a button.
27014
+ *
27015
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27016
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27017
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27018
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27019
+ * - `label` — operator-facing English label.
27020
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27021
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27022
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27023
+ * flips it from config, never by editing code.
27024
+ */
27025
+ var NavigationActionEntrySchema = object({
27026
+ id: string(),
27027
+ kind: NavigationEntryKindSchema,
27028
+ label: string(),
27029
+ icon: string(),
27030
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27031
+ soundId: number().int().optional(),
27032
+ /** Per-device feature flag — render this entry only when true. */
27033
+ enabled: boolean()
27034
+ });
27035
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27036
+ var NavigationPointSchema = object({
27037
+ x: number(),
27038
+ y: number()
27039
+ });
27040
+ /**
27041
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27042
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27043
+ * that are turned on for THIS device. Data-driven: the provider derives these
27044
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27045
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27046
+ * that are not dictionary entries.
27047
+ *
27048
+ * - `move` / `stop` — the momentary drive joystick.
27049
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27050
+ * map-coordinate plumbing is wired.
27051
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27052
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27053
+ * - `light` — the on/off fill-light toggle (works anytime).
27054
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27055
+ * camera-service control; needs an active stream).
27056
+ */
27057
+ var NavigationFeaturesSchema = object({
27058
+ move: boolean(),
27059
+ stop: boolean(),
27060
+ goToPoint: boolean(),
27061
+ runAction: boolean(),
27062
+ playSound: boolean(),
27063
+ light: boolean(),
27064
+ lightMode: boolean()
27065
+ });
27066
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27067
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27068
+ /**
27069
+ * Live navigation state so the UI can reflect what the robot is doing:
27070
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27071
+ * - `following` — person/pet follow is currently armed.
27072
+ * - `flash` — the on-camera fill light is on.
27073
+ * - `lightMode` — auto vs manual fill-light mode.
27074
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27075
+ * `lightMode === 'manual'`.
27076
+ */
27077
+ var NavigationStatusSchema = object({
27078
+ mode: _enum([
27079
+ "idle",
27080
+ "cleaning",
27081
+ "spot",
27082
+ "following",
27083
+ "goto",
27084
+ "returning",
27085
+ "paused",
27086
+ "unknown"
27087
+ ]),
27088
+ following: boolean(),
27089
+ flash: boolean(),
27090
+ lightMode: NavigationLightModeSchema,
27091
+ lightLevel: number().min(40).max(100),
27092
+ /** Ms epoch when the slice was last updated. */
27093
+ lastChangedAt: number()
27094
+ });
27095
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
27096
+ 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({
27097
+ deviceId: number(),
27098
+ actionId: NavigationActionIdSchema
27099
+ }), _void(), { kind: "mutation" }), method(object({
27100
+ deviceId: number(),
27101
+ soundId: number().int()
27102
+ }), _void(), { kind: "mutation" }), method(object({
27103
+ deviceId: number(),
27104
+ on: boolean()
27105
+ }), _void(), { kind: "mutation" }), method(object({
27106
+ deviceId: number(),
27107
+ mode: NavigationLightModeSchema,
27108
+ level: number().min(40).max(100).optional()
27109
+ }), _void(), { kind: "mutation" }), method(object({
27110
+ deviceId: number(),
27111
+ level: number().min(40).max(100)
27112
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27113
+ deviceId: number(),
27114
+ status: NavigationStatusSchema
27115
+ });
26913
27116
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
26914
27117
  kind: "mutation",
26915
27118
  auth: "admin"
@@ -31974,6 +32177,66 @@ Object.freeze({
31974
32177
  addonId: null,
31975
32178
  access: "create"
31976
32179
  },
32180
+ "navigation.getFeatures": {
32181
+ capName: "navigation",
32182
+ capScope: "device",
32183
+ addonId: null,
32184
+ access: "view"
32185
+ },
32186
+ "navigation.goToPoint": {
32187
+ capName: "navigation",
32188
+ capScope: "device",
32189
+ addonId: null,
32190
+ access: "create"
32191
+ },
32192
+ "navigation.listActions": {
32193
+ capName: "navigation",
32194
+ capScope: "device",
32195
+ addonId: null,
32196
+ access: "view"
32197
+ },
32198
+ "navigation.move": {
32199
+ capName: "navigation",
32200
+ capScope: "device",
32201
+ addonId: null,
32202
+ access: "create"
32203
+ },
32204
+ "navigation.playSound": {
32205
+ capName: "navigation",
32206
+ capScope: "device",
32207
+ addonId: null,
32208
+ access: "create"
32209
+ },
32210
+ "navigation.runAction": {
32211
+ capName: "navigation",
32212
+ capScope: "device",
32213
+ addonId: null,
32214
+ access: "create"
32215
+ },
32216
+ "navigation.setLightLevel": {
32217
+ capName: "navigation",
32218
+ capScope: "device",
32219
+ addonId: null,
32220
+ access: "create"
32221
+ },
32222
+ "navigation.setLightMode": {
32223
+ capName: "navigation",
32224
+ capScope: "device",
32225
+ addonId: null,
32226
+ access: "create"
32227
+ },
32228
+ "navigation.setLightOn": {
32229
+ capName: "navigation",
32230
+ capScope: "device",
32231
+ addonId: null,
32232
+ access: "create"
32233
+ },
32234
+ "navigation.stop": {
32235
+ capName: "navigation",
32236
+ capScope: "device",
32237
+ addonId: null,
32238
+ access: "create"
32239
+ },
31977
32240
  "networkAccess.getEndpoint": {
31978
32241
  capName: "network-access",
31979
32242
  capScope: "system",
@@ -36069,6 +36332,56 @@ Object.freeze({
36069
36332
  form: "single",
36070
36333
  optional: false
36071
36334
  }],
36335
+ "navigation.getFeatures": [{
36336
+ name: "deviceId",
36337
+ form: "single",
36338
+ optional: false
36339
+ }],
36340
+ "navigation.goToPoint": [{
36341
+ name: "deviceId",
36342
+ form: "single",
36343
+ optional: false
36344
+ }],
36345
+ "navigation.listActions": [{
36346
+ name: "deviceId",
36347
+ form: "single",
36348
+ optional: false
36349
+ }],
36350
+ "navigation.move": [{
36351
+ name: "deviceId",
36352
+ form: "single",
36353
+ optional: false
36354
+ }],
36355
+ "navigation.playSound": [{
36356
+ name: "deviceId",
36357
+ form: "single",
36358
+ optional: false
36359
+ }],
36360
+ "navigation.runAction": [{
36361
+ name: "deviceId",
36362
+ form: "single",
36363
+ optional: false
36364
+ }],
36365
+ "navigation.setLightLevel": [{
36366
+ name: "deviceId",
36367
+ form: "single",
36368
+ optional: false
36369
+ }],
36370
+ "navigation.setLightMode": [{
36371
+ name: "deviceId",
36372
+ form: "single",
36373
+ optional: false
36374
+ }],
36375
+ "navigation.setLightOn": [{
36376
+ name: "deviceId",
36377
+ form: "single",
36378
+ optional: false
36379
+ }],
36380
+ "navigation.stop": [{
36381
+ name: "deviceId",
36382
+ form: "single",
36383
+ optional: false
36384
+ }],
36072
36385
  "networkQuality.getDeviceStats": [{
36073
36386
  name: "deviceId",
36074
36387
  form: "single",
@@ -5405,6 +5405,12 @@ Object.fromEntries([
5405
5405
  icon: "move",
5406
5406
  order: 40
5407
5407
  },
5408
+ {
5409
+ id: "navigation",
5410
+ label: "Navigation",
5411
+ icon: "compass",
5412
+ order: 41
5413
+ },
5408
5414
  {
5409
5415
  id: "consumables",
5410
5416
  label: "Consumables",
@@ -26910,6 +26916,203 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
26910
26916
  deviceId: number(),
26911
26917
  status: PtzAutotrackStatusSchema
26912
26918
  });
26919
+ /**
26920
+ * `navigation` — a device-scoped capability that natively expresses the FULL
26921
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
26922
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
26923
+ *
26924
+ * Why a NEW cap rather than overloading `ptz`:
26925
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
26926
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
26927
+ * The two are different physical models: PTZ is absolute-position + presets,
26928
+ * navigation is momentary drive nudges + discrete robot ACTIONS
26929
+ * (dock / spot-clean / follow-pet / go-to-point / …).
26930
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
26931
+ * the reverse:
26932
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
26933
+ * / `getOptions`), and
26934
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
26935
+ * robot camera shows up in the existing PTZ control path without every
26936
+ * PTZ provider learning about robots. The mapping lives in the adapter,
26937
+ * not here (see the addon design note):
26938
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
26939
+ * ptz.stop() → navigation.stop()
26940
+ * ptz.goHome() → navigation.runAction('goHome')
26941
+ * ptz.getPresets() → navigation.listActions() (id→preset)
26942
+ * ptz.goToPreset(id) → navigation.runAction(id)
26943
+ *
26944
+ * ## Continuous drive
26945
+ *
26946
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
26947
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
26948
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
26949
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
26950
+ * coalesce them. The UI owns the cadence.
26951
+ *
26952
+ * ## The action dictionary
26953
+ *
26954
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
26955
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
26956
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
26957
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
26958
+ * vendor-specific list. `kind: 'action'` entries are triggered with
26959
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
26960
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
26961
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
26962
+ *
26963
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
26964
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
26965
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
26966
+ * every device handle. A future nodedreame publish adds a typed
26967
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
26968
+ * provider can then swap the raw calls for the typed methods with no change to
26969
+ * THIS contract.
26970
+ */
26971
+ /**
26972
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
26973
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
26974
+ * halts it.
26975
+ *
26976
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
26977
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
26978
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
26979
+ * vector by it (drivers without proportional drive ignore it).
26980
+ *
26981
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
26982
+ * axis alone; an all-undefined nudge is a no-op.
26983
+ */
26984
+ var NavigationMoveCommandSchema = object({
26985
+ pan: number().min(-1).max(1).optional(),
26986
+ tilt: number().min(-1).max(1).optional(),
26987
+ speed: number().min(0).max(1).optional()
26988
+ });
26989
+ /**
26990
+ * The enumerated discrete actions a navigation-capable robot can perform via
26991
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
26992
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
26993
+ * `playSound` (see the `sound` dictionary entries).
26994
+ */
26995
+ var NavigationActionIdSchema = _enum([
26996
+ "goHome",
26997
+ "locate",
26998
+ "spotClean",
26999
+ "findPet",
27000
+ "personFollow",
27001
+ "stop",
27002
+ "startClean",
27003
+ "pauseClean",
27004
+ "dockWash",
27005
+ "autoEmpty",
27006
+ "flashOn",
27007
+ "flashOff"
27008
+ ]);
27009
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27010
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27011
+ /**
27012
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27013
+ * native panel and the PTZ mimic render as a button.
27014
+ *
27015
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27016
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27017
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27018
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27019
+ * - `label` — operator-facing English label.
27020
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27021
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27022
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27023
+ * flips it from config, never by editing code.
27024
+ */
27025
+ var NavigationActionEntrySchema = object({
27026
+ id: string(),
27027
+ kind: NavigationEntryKindSchema,
27028
+ label: string(),
27029
+ icon: string(),
27030
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27031
+ soundId: number().int().optional(),
27032
+ /** Per-device feature flag — render this entry only when true. */
27033
+ enabled: boolean()
27034
+ });
27035
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27036
+ var NavigationPointSchema = object({
27037
+ x: number(),
27038
+ y: number()
27039
+ });
27040
+ /**
27041
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27042
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27043
+ * that are turned on for THIS device. Data-driven: the provider derives these
27044
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27045
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27046
+ * that are not dictionary entries.
27047
+ *
27048
+ * - `move` / `stop` — the momentary drive joystick.
27049
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27050
+ * map-coordinate plumbing is wired.
27051
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27052
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27053
+ * - `light` — the on/off fill-light toggle (works anytime).
27054
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27055
+ * camera-service control; needs an active stream).
27056
+ */
27057
+ var NavigationFeaturesSchema = object({
27058
+ move: boolean(),
27059
+ stop: boolean(),
27060
+ goToPoint: boolean(),
27061
+ runAction: boolean(),
27062
+ playSound: boolean(),
27063
+ light: boolean(),
27064
+ lightMode: boolean()
27065
+ });
27066
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27067
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27068
+ /**
27069
+ * Live navigation state so the UI can reflect what the robot is doing:
27070
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27071
+ * - `following` — person/pet follow is currently armed.
27072
+ * - `flash` — the on-camera fill light is on.
27073
+ * - `lightMode` — auto vs manual fill-light mode.
27074
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27075
+ * `lightMode === 'manual'`.
27076
+ */
27077
+ var NavigationStatusSchema = object({
27078
+ mode: _enum([
27079
+ "idle",
27080
+ "cleaning",
27081
+ "spot",
27082
+ "following",
27083
+ "goto",
27084
+ "returning",
27085
+ "paused",
27086
+ "unknown"
27087
+ ]),
27088
+ following: boolean(),
27089
+ flash: boolean(),
27090
+ lightMode: NavigationLightModeSchema,
27091
+ lightLevel: number().min(40).max(100),
27092
+ /** Ms epoch when the slice was last updated. */
27093
+ lastChangedAt: number()
27094
+ });
27095
+ NavigationStatusSchema.extend({ lastFetchedAt: number() });
27096
+ 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({
27097
+ deviceId: number(),
27098
+ actionId: NavigationActionIdSchema
27099
+ }), _void(), { kind: "mutation" }), method(object({
27100
+ deviceId: number(),
27101
+ soundId: number().int()
27102
+ }), _void(), { kind: "mutation" }), method(object({
27103
+ deviceId: number(),
27104
+ on: boolean()
27105
+ }), _void(), { kind: "mutation" }), method(object({
27106
+ deviceId: number(),
27107
+ mode: NavigationLightModeSchema,
27108
+ level: number().min(40).max(100).optional()
27109
+ }), _void(), { kind: "mutation" }), method(object({
27110
+ deviceId: number(),
27111
+ level: number().min(40).max(100)
27112
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
27113
+ deviceId: number(),
27114
+ status: NavigationStatusSchema
27115
+ });
26913
27116
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
26914
27117
  kind: "mutation",
26915
27118
  auth: "admin"
@@ -31974,6 +32177,66 @@ Object.freeze({
31974
32177
  addonId: null,
31975
32178
  access: "create"
31976
32179
  },
32180
+ "navigation.getFeatures": {
32181
+ capName: "navigation",
32182
+ capScope: "device",
32183
+ addonId: null,
32184
+ access: "view"
32185
+ },
32186
+ "navigation.goToPoint": {
32187
+ capName: "navigation",
32188
+ capScope: "device",
32189
+ addonId: null,
32190
+ access: "create"
32191
+ },
32192
+ "navigation.listActions": {
32193
+ capName: "navigation",
32194
+ capScope: "device",
32195
+ addonId: null,
32196
+ access: "view"
32197
+ },
32198
+ "navigation.move": {
32199
+ capName: "navigation",
32200
+ capScope: "device",
32201
+ addonId: null,
32202
+ access: "create"
32203
+ },
32204
+ "navigation.playSound": {
32205
+ capName: "navigation",
32206
+ capScope: "device",
32207
+ addonId: null,
32208
+ access: "create"
32209
+ },
32210
+ "navigation.runAction": {
32211
+ capName: "navigation",
32212
+ capScope: "device",
32213
+ addonId: null,
32214
+ access: "create"
32215
+ },
32216
+ "navigation.setLightLevel": {
32217
+ capName: "navigation",
32218
+ capScope: "device",
32219
+ addonId: null,
32220
+ access: "create"
32221
+ },
32222
+ "navigation.setLightMode": {
32223
+ capName: "navigation",
32224
+ capScope: "device",
32225
+ addonId: null,
32226
+ access: "create"
32227
+ },
32228
+ "navigation.setLightOn": {
32229
+ capName: "navigation",
32230
+ capScope: "device",
32231
+ addonId: null,
32232
+ access: "create"
32233
+ },
32234
+ "navigation.stop": {
32235
+ capName: "navigation",
32236
+ capScope: "device",
32237
+ addonId: null,
32238
+ access: "create"
32239
+ },
31977
32240
  "networkAccess.getEndpoint": {
31978
32241
  capName: "network-access",
31979
32242
  capScope: "system",
@@ -36069,6 +36332,56 @@ Object.freeze({
36069
36332
  form: "single",
36070
36333
  optional: false
36071
36334
  }],
36335
+ "navigation.getFeatures": [{
36336
+ name: "deviceId",
36337
+ form: "single",
36338
+ optional: false
36339
+ }],
36340
+ "navigation.goToPoint": [{
36341
+ name: "deviceId",
36342
+ form: "single",
36343
+ optional: false
36344
+ }],
36345
+ "navigation.listActions": [{
36346
+ name: "deviceId",
36347
+ form: "single",
36348
+ optional: false
36349
+ }],
36350
+ "navigation.move": [{
36351
+ name: "deviceId",
36352
+ form: "single",
36353
+ optional: false
36354
+ }],
36355
+ "navigation.playSound": [{
36356
+ name: "deviceId",
36357
+ form: "single",
36358
+ optional: false
36359
+ }],
36360
+ "navigation.runAction": [{
36361
+ name: "deviceId",
36362
+ form: "single",
36363
+ optional: false
36364
+ }],
36365
+ "navigation.setLightLevel": [{
36366
+ name: "deviceId",
36367
+ form: "single",
36368
+ optional: false
36369
+ }],
36370
+ "navigation.setLightMode": [{
36371
+ name: "deviceId",
36372
+ form: "single",
36373
+ optional: false
36374
+ }],
36375
+ "navigation.setLightOn": [{
36376
+ name: "deviceId",
36377
+ form: "single",
36378
+ optional: false
36379
+ }],
36380
+ "navigation.stop": [{
36381
+ name: "deviceId",
36382
+ form: "single",
36383
+ optional: false
36384
+ }],
36072
36385
  "networkQuality.getDeviceStats": [{
36073
36386
  name: "deviceId",
36074
36387
  form: "single",
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BoE-0P-g.js");
5
+ const require_dist = require("../dist-CrqSrdSD.js");
6
6
  let node_crypto = require("node:crypto");
7
7
  let node_child_process = require("node:child_process");
8
8
  //#region src/ingress/tailscale-cli.ts
@@ -1,4 +1,4 @@
1
- import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-BI0_HzJ1.mjs";
1
+ import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-Dv-a1IEt.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { execFile } from "node:child_process";
4
4
  import { promisify } from "node:util";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-tailscale",
3
- "version": "1.2.70",
3
+ "version": "1.2.72",
4
4
  "description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
5
5
  "keywords": [
6
6
  "camstack",