@camstack/addon-ai 0.4.72 → 0.4.74

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
@@ -5566,6 +5566,12 @@ Object.fromEntries([
5566
5566
  icon: "move",
5567
5567
  order: 40
5568
5568
  },
5569
+ {
5570
+ id: "navigation",
5571
+ label: "Navigation",
5572
+ icon: "compass",
5573
+ order: 41
5574
+ },
5569
5575
  {
5570
5576
  id: "consumables",
5571
5577
  label: "Consumables",
@@ -27112,6 +27118,203 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), PtzAutotrackStatusSc
27112
27118
  deviceId: number$1(),
27113
27119
  status: PtzAutotrackStatusSchema
27114
27120
  });
27121
+ /**
27122
+ * `navigation` — a device-scoped capability that natively expresses the FULL
27123
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
27124
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
27125
+ *
27126
+ * Why a NEW cap rather than overloading `ptz`:
27127
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27128
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27129
+ * The two are different physical models: PTZ is absolute-position + presets,
27130
+ * navigation is momentary drive nudges + discrete robot ACTIONS
27131
+ * (dock / spot-clean / follow-pet / go-to-point / …).
27132
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27133
+ * the reverse:
27134
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
27135
+ * / `getOptions`), and
27136
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27137
+ * robot camera shows up in the existing PTZ control path without every
27138
+ * PTZ provider learning about robots. The mapping lives in the adapter,
27139
+ * not here (see the addon design note):
27140
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27141
+ * ptz.stop() → navigation.stop()
27142
+ * ptz.goHome() → navigation.runAction('goHome')
27143
+ * ptz.getPresets() → navigation.listActions() (id→preset)
27144
+ * ptz.goToPreset(id) → navigation.runAction(id)
27145
+ *
27146
+ * ## Continuous drive
27147
+ *
27148
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27149
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27150
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27151
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27152
+ * coalesce them. The UI owns the cadence.
27153
+ *
27154
+ * ## The action dictionary
27155
+ *
27156
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27157
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27158
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27159
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27160
+ * vendor-specific list. `kind: 'action'` entries are triggered with
27161
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27162
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
27163
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27164
+ *
27165
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27166
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27167
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
27168
+ * every device handle. A future nodedreame publish adds a typed
27169
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27170
+ * provider can then swap the raw calls for the typed methods with no change to
27171
+ * THIS contract.
27172
+ */
27173
+ /**
27174
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27175
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27176
+ * halts it.
27177
+ *
27178
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
27179
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27180
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27181
+ * vector by it (drivers without proportional drive ignore it).
27182
+ *
27183
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27184
+ * axis alone; an all-undefined nudge is a no-op.
27185
+ */
27186
+ var NavigationMoveCommandSchema = object({
27187
+ pan: number$1().min(-1).max(1).optional(),
27188
+ tilt: number$1().min(-1).max(1).optional(),
27189
+ speed: number$1().min(0).max(1).optional()
27190
+ });
27191
+ /**
27192
+ * The enumerated discrete actions a navigation-capable robot can perform via
27193
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27194
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
27195
+ * `playSound` (see the `sound` dictionary entries).
27196
+ */
27197
+ var NavigationActionIdSchema = _enum([
27198
+ "goHome",
27199
+ "locate",
27200
+ "spotClean",
27201
+ "findPet",
27202
+ "personFollow",
27203
+ "stop",
27204
+ "startClean",
27205
+ "pauseClean",
27206
+ "dockWash",
27207
+ "autoEmpty",
27208
+ "flashOn",
27209
+ "flashOff"
27210
+ ]);
27211
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27212
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27213
+ /**
27214
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27215
+ * native panel and the PTZ mimic render as a button.
27216
+ *
27217
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27218
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27219
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27220
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27221
+ * - `label` — operator-facing English label.
27222
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27223
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27224
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27225
+ * flips it from config, never by editing code.
27226
+ */
27227
+ var NavigationActionEntrySchema = object({
27228
+ id: string(),
27229
+ kind: NavigationEntryKindSchema,
27230
+ label: string(),
27231
+ icon: string(),
27232
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27233
+ soundId: number$1().int().optional(),
27234
+ /** Per-device feature flag — render this entry only when true. */
27235
+ enabled: boolean()
27236
+ });
27237
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27238
+ var NavigationPointSchema = object({
27239
+ x: number$1(),
27240
+ y: number$1()
27241
+ });
27242
+ /**
27243
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27244
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27245
+ * that are turned on for THIS device. Data-driven: the provider derives these
27246
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27247
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27248
+ * that are not dictionary entries.
27249
+ *
27250
+ * - `move` / `stop` — the momentary drive joystick.
27251
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27252
+ * map-coordinate plumbing is wired.
27253
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27254
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27255
+ * - `light` — the on/off fill-light toggle (works anytime).
27256
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27257
+ * camera-service control; needs an active stream).
27258
+ */
27259
+ var NavigationFeaturesSchema = object({
27260
+ move: boolean(),
27261
+ stop: boolean(),
27262
+ goToPoint: boolean(),
27263
+ runAction: boolean(),
27264
+ playSound: boolean(),
27265
+ light: boolean(),
27266
+ lightMode: boolean()
27267
+ });
27268
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27269
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27270
+ /**
27271
+ * Live navigation state so the UI can reflect what the robot is doing:
27272
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27273
+ * - `following` — person/pet follow is currently armed.
27274
+ * - `flash` — the on-camera fill light is on.
27275
+ * - `lightMode` — auto vs manual fill-light mode.
27276
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27277
+ * `lightMode === 'manual'`.
27278
+ */
27279
+ var NavigationStatusSchema = object({
27280
+ mode: _enum([
27281
+ "idle",
27282
+ "cleaning",
27283
+ "spot",
27284
+ "following",
27285
+ "goto",
27286
+ "returning",
27287
+ "paused",
27288
+ "unknown"
27289
+ ]),
27290
+ following: boolean(),
27291
+ flash: boolean(),
27292
+ lightMode: NavigationLightModeSchema,
27293
+ lightLevel: number$1().min(40).max(100),
27294
+ /** Ms epoch when the slice was last updated. */
27295
+ lastChangedAt: number$1()
27296
+ });
27297
+ NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
27298
+ DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), array(NavigationActionEntrySchema)), method(object({
27299
+ deviceId: number$1(),
27300
+ actionId: NavigationActionIdSchema
27301
+ }), _void(), { kind: "mutation" }), method(object({
27302
+ deviceId: number$1(),
27303
+ soundId: number$1().int()
27304
+ }), _void(), { kind: "mutation" }), method(object({
27305
+ deviceId: number$1(),
27306
+ on: boolean()
27307
+ }), _void(), { kind: "mutation" }), method(object({
27308
+ deviceId: number$1(),
27309
+ mode: NavigationLightModeSchema,
27310
+ level: number$1().min(40).max(100).optional()
27311
+ }), _void(), { kind: "mutation" }), method(object({
27312
+ deviceId: number$1(),
27313
+ level: number$1().min(40).max(100)
27314
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
27315
+ deviceId: number$1(),
27316
+ status: NavigationStatusSchema
27317
+ });
27115
27318
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number$1().int().nonnegative() }), object({ success: literal(true) }), {
27116
27319
  kind: "mutation",
27117
27320
  auth: "admin"
@@ -32176,6 +32379,66 @@ Object.freeze({
32176
32379
  addonId: null,
32177
32380
  access: "create"
32178
32381
  },
32382
+ "navigation.getFeatures": {
32383
+ capName: "navigation",
32384
+ capScope: "device",
32385
+ addonId: null,
32386
+ access: "view"
32387
+ },
32388
+ "navigation.goToPoint": {
32389
+ capName: "navigation",
32390
+ capScope: "device",
32391
+ addonId: null,
32392
+ access: "create"
32393
+ },
32394
+ "navigation.listActions": {
32395
+ capName: "navigation",
32396
+ capScope: "device",
32397
+ addonId: null,
32398
+ access: "view"
32399
+ },
32400
+ "navigation.move": {
32401
+ capName: "navigation",
32402
+ capScope: "device",
32403
+ addonId: null,
32404
+ access: "create"
32405
+ },
32406
+ "navigation.playSound": {
32407
+ capName: "navigation",
32408
+ capScope: "device",
32409
+ addonId: null,
32410
+ access: "create"
32411
+ },
32412
+ "navigation.runAction": {
32413
+ capName: "navigation",
32414
+ capScope: "device",
32415
+ addonId: null,
32416
+ access: "create"
32417
+ },
32418
+ "navigation.setLightLevel": {
32419
+ capName: "navigation",
32420
+ capScope: "device",
32421
+ addonId: null,
32422
+ access: "create"
32423
+ },
32424
+ "navigation.setLightMode": {
32425
+ capName: "navigation",
32426
+ capScope: "device",
32427
+ addonId: null,
32428
+ access: "create"
32429
+ },
32430
+ "navigation.setLightOn": {
32431
+ capName: "navigation",
32432
+ capScope: "device",
32433
+ addonId: null,
32434
+ access: "create"
32435
+ },
32436
+ "navigation.stop": {
32437
+ capName: "navigation",
32438
+ capScope: "device",
32439
+ addonId: null,
32440
+ access: "create"
32441
+ },
32179
32442
  "networkAccess.getEndpoint": {
32180
32443
  capName: "network-access",
32181
32444
  capScope: "system",
@@ -36271,6 +36534,56 @@ Object.freeze({
36271
36534
  form: "single",
36272
36535
  optional: false
36273
36536
  }],
36537
+ "navigation.getFeatures": [{
36538
+ name: "deviceId",
36539
+ form: "single",
36540
+ optional: false
36541
+ }],
36542
+ "navigation.goToPoint": [{
36543
+ name: "deviceId",
36544
+ form: "single",
36545
+ optional: false
36546
+ }],
36547
+ "navigation.listActions": [{
36548
+ name: "deviceId",
36549
+ form: "single",
36550
+ optional: false
36551
+ }],
36552
+ "navigation.move": [{
36553
+ name: "deviceId",
36554
+ form: "single",
36555
+ optional: false
36556
+ }],
36557
+ "navigation.playSound": [{
36558
+ name: "deviceId",
36559
+ form: "single",
36560
+ optional: false
36561
+ }],
36562
+ "navigation.runAction": [{
36563
+ name: "deviceId",
36564
+ form: "single",
36565
+ optional: false
36566
+ }],
36567
+ "navigation.setLightLevel": [{
36568
+ name: "deviceId",
36569
+ form: "single",
36570
+ optional: false
36571
+ }],
36572
+ "navigation.setLightMode": [{
36573
+ name: "deviceId",
36574
+ form: "single",
36575
+ optional: false
36576
+ }],
36577
+ "navigation.setLightOn": [{
36578
+ name: "deviceId",
36579
+ form: "single",
36580
+ optional: false
36581
+ }],
36582
+ "navigation.stop": [{
36583
+ name: "deviceId",
36584
+ form: "single",
36585
+ optional: false
36586
+ }],
36274
36587
  "networkQuality.getDeviceStats": [{
36275
36588
  name: "deviceId",
36276
36589
  form: "single",
package/dist/addon.mjs CHANGED
@@ -5593,6 +5593,12 @@ Object.fromEntries([
5593
5593
  icon: "move",
5594
5594
  order: 40
5595
5595
  },
5596
+ {
5597
+ id: "navigation",
5598
+ label: "Navigation",
5599
+ icon: "compass",
5600
+ order: 41
5601
+ },
5596
5602
  {
5597
5603
  id: "consumables",
5598
5604
  label: "Consumables",
@@ -27139,6 +27145,203 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), PtzAutotrackStatusSc
27139
27145
  deviceId: number$1(),
27140
27146
  status: PtzAutotrackStatusSchema
27141
27147
  });
27148
+ /**
27149
+ * `navigation` — a device-scoped capability that natively expresses the FULL
27150
+ * navigation / action surface of a robot that DRIVES ITSELF and carries an
27151
+ * on-board camera (the Dreame robot-vacuum camera is the first provider).
27152
+ *
27153
+ * Why a NEW cap rather than overloading `ptz`:
27154
+ * - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
27155
+ * robot vacuum has no gimbal — the whole chassis drives, turns and spins.
27156
+ * The two are different physical models: PTZ is absolute-position + presets,
27157
+ * navigation is momentary drive nudges + discrete robot ACTIONS
27158
+ * (dock / spot-clean / follow-pet / go-to-point / …).
27159
+ * - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
27160
+ * the reverse:
27161
+ * 1. a native CamStack navigation panel (data-driven from `listActions`
27162
+ * / `getOptions`), and
27163
+ * 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
27164
+ * robot camera shows up in the existing PTZ control path without every
27165
+ * PTZ provider learning about robots. The mapping lives in the adapter,
27166
+ * not here (see the addon design note):
27167
+ * ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
27168
+ * ptz.stop() → navigation.stop()
27169
+ * ptz.goHome() → navigation.runAction('goHome')
27170
+ * ptz.getPresets() → navigation.listActions() (id→preset)
27171
+ * ptz.goToPreset(id) → navigation.runAction(id)
27172
+ *
27173
+ * ## Continuous drive
27174
+ *
27175
+ * `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
27176
+ * sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
27177
+ * one `stop()` on release — exactly like the robot app's remote-drive joystick.
27178
+ * The provider forwards EACH `move` to one drive write; it must NOT debounce or
27179
+ * coalesce them. The UI owns the cadence.
27180
+ *
27181
+ * ## The action dictionary
27182
+ *
27183
+ * The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
27184
+ * are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
27185
+ * carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
27186
+ * native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
27187
+ * vendor-specific list. `kind: 'action'` entries are triggered with
27188
+ * `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
27189
+ * (the entry carries the `soundId` to pass). The general primitives — `move`,
27190
+ * `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
27191
+ *
27192
+ * NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
27193
+ * `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
27194
+ * that the currently-published `@apocaliss92/nodedreame` already exposes on
27195
+ * every device handle. A future nodedreame publish adds a typed
27196
+ * `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
27197
+ * provider can then swap the raw calls for the typed methods with no change to
27198
+ * THIS contract.
27199
+ */
27200
+ /**
27201
+ * A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
27202
+ * keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
27203
+ * halts it.
27204
+ *
27205
+ * - `pan` — turn: negative = left, positive = right, 0 = straight.
27206
+ * - `tilt` — throttle: positive = forward, negative = spin / turn-around.
27207
+ * - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
27208
+ * vector by it (drivers without proportional drive ignore it).
27209
+ *
27210
+ * `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
27211
+ * axis alone; an all-undefined nudge is a no-op.
27212
+ */
27213
+ var NavigationMoveCommandSchema = object({
27214
+ pan: number$1().min(-1).max(1).optional(),
27215
+ tilt: number$1().min(-1).max(1).optional(),
27216
+ speed: number$1().min(0).max(1).optional()
27217
+ });
27218
+ /**
27219
+ * The enumerated discrete actions a navigation-capable robot can perform via
27220
+ * `runAction`. This is the CLOSED vocabulary; a given device advertises the
27221
+ * subset it supports through `listActions`. Sounds are NOT here — they go through
27222
+ * `playSound` (see the `sound` dictionary entries).
27223
+ */
27224
+ var NavigationActionIdSchema = _enum([
27225
+ "goHome",
27226
+ "locate",
27227
+ "spotClean",
27228
+ "findPet",
27229
+ "personFollow",
27230
+ "stop",
27231
+ "startClean",
27232
+ "pauseClean",
27233
+ "dockWash",
27234
+ "autoEmpty",
27235
+ "flashOn",
27236
+ "flashOff"
27237
+ ]);
27238
+ /** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
27239
+ var NavigationEntryKindSchema = _enum(["action", "sound"]);
27240
+ /**
27241
+ * One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
27242
+ * native panel and the PTZ mimic render as a button.
27243
+ *
27244
+ * - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
27245
+ * (pass to `runAction`); for `kind:'sound'` it is a namespaced id
27246
+ * (`sound:meow`) whose `soundId` is passed to `playSound`.
27247
+ * - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
27248
+ * - `label` — operator-facing English label.
27249
+ * - `soundId` — wire sound id, present only on `kind:'sound'` entries.
27250
+ * - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
27251
+ * PTZ render ONLY enabled entries. Data-driven: the provider
27252
+ * flips it from config, never by editing code.
27253
+ */
27254
+ var NavigationActionEntrySchema = object({
27255
+ id: string(),
27256
+ kind: NavigationEntryKindSchema,
27257
+ label: string(),
27258
+ icon: string(),
27259
+ /** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
27260
+ soundId: number$1().int().optional(),
27261
+ /** Per-device feature flag — render this entry only when true. */
27262
+ enabled: boolean()
27263
+ });
27264
+ /** Coordinates for `goToPoint` — a point on the robot's live map. */
27265
+ var NavigationPointSchema = object({
27266
+ x: number$1(),
27267
+ y: number$1()
27268
+ });
27269
+ /**
27270
+ * Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
27271
+ * The cap reports which are enabled so the UI / PTZ render only the controls
27272
+ * that are turned on for THIS device. Data-driven: the provider derives these
27273
+ * from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
27274
+ * live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
27275
+ * that are not dictionary entries.
27276
+ *
27277
+ * - `move` / `stop` — the momentary drive joystick.
27278
+ * - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
27279
+ * map-coordinate plumbing is wired.
27280
+ * - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
27281
+ * - `playSound` — the sound buttons (dictionary `kind:'sound'`).
27282
+ * - `light` — the on/off fill-light toggle (works anytime).
27283
+ * - `lightMode` — the auto/manual selector + manual level slider (a
27284
+ * camera-service control; needs an active stream).
27285
+ */
27286
+ var NavigationFeaturesSchema = object({
27287
+ move: boolean(),
27288
+ stop: boolean(),
27289
+ goToPoint: boolean(),
27290
+ runAction: boolean(),
27291
+ playSound: boolean(),
27292
+ light: boolean(),
27293
+ lightMode: boolean()
27294
+ });
27295
+ /** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
27296
+ var NavigationLightModeSchema = _enum(["auto", "manual"]);
27297
+ /**
27298
+ * Live navigation state so the UI can reflect what the robot is doing:
27299
+ * - `mode` — coarse activity (idle / cleaning / following / …).
27300
+ * - `following` — person/pet follow is currently armed.
27301
+ * - `flash` — the on-camera fill light is on.
27302
+ * - `lightMode` — auto vs manual fill-light mode.
27303
+ * - `lightLevel` — manual fill-light level (40..100); meaningful when
27304
+ * `lightMode === 'manual'`.
27305
+ */
27306
+ var NavigationStatusSchema = object({
27307
+ mode: _enum([
27308
+ "idle",
27309
+ "cleaning",
27310
+ "spot",
27311
+ "following",
27312
+ "goto",
27313
+ "returning",
27314
+ "paused",
27315
+ "unknown"
27316
+ ]),
27317
+ following: boolean(),
27318
+ flash: boolean(),
27319
+ lightMode: NavigationLightModeSchema,
27320
+ lightLevel: number$1().min(40).max(100),
27321
+ /** Ms epoch when the slice was last updated. */
27322
+ lastChangedAt: number$1()
27323
+ });
27324
+ NavigationStatusSchema.extend({ lastFetchedAt: number$1() });
27325
+ DeviceType.Camera, method(NavigationMoveCommandSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(NavigationPointSchema.extend({ deviceId: number$1() }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), array(NavigationActionEntrySchema)), method(object({
27326
+ deviceId: number$1(),
27327
+ actionId: NavigationActionIdSchema
27328
+ }), _void(), { kind: "mutation" }), method(object({
27329
+ deviceId: number$1(),
27330
+ soundId: number$1().int()
27331
+ }), _void(), { kind: "mutation" }), method(object({
27332
+ deviceId: number$1(),
27333
+ on: boolean()
27334
+ }), _void(), { kind: "mutation" }), method(object({
27335
+ deviceId: number$1(),
27336
+ mode: NavigationLightModeSchema,
27337
+ level: number$1().min(40).max(100).optional()
27338
+ }), _void(), { kind: "mutation" }), method(object({
27339
+ deviceId: number$1(),
27340
+ level: number$1().min(40).max(100)
27341
+ }), _void(), { kind: "mutation" }), method(object({ deviceId: number$1() }), NavigationFeaturesSchema), object({
27342
+ deviceId: number$1(),
27343
+ status: NavigationStatusSchema
27344
+ });
27142
27345
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number$1().int().nonnegative() }), object({ success: literal(true) }), {
27143
27346
  kind: "mutation",
27144
27347
  auth: "admin"
@@ -32203,6 +32406,66 @@ Object.freeze({
32203
32406
  addonId: null,
32204
32407
  access: "create"
32205
32408
  },
32409
+ "navigation.getFeatures": {
32410
+ capName: "navigation",
32411
+ capScope: "device",
32412
+ addonId: null,
32413
+ access: "view"
32414
+ },
32415
+ "navigation.goToPoint": {
32416
+ capName: "navigation",
32417
+ capScope: "device",
32418
+ addonId: null,
32419
+ access: "create"
32420
+ },
32421
+ "navigation.listActions": {
32422
+ capName: "navigation",
32423
+ capScope: "device",
32424
+ addonId: null,
32425
+ access: "view"
32426
+ },
32427
+ "navigation.move": {
32428
+ capName: "navigation",
32429
+ capScope: "device",
32430
+ addonId: null,
32431
+ access: "create"
32432
+ },
32433
+ "navigation.playSound": {
32434
+ capName: "navigation",
32435
+ capScope: "device",
32436
+ addonId: null,
32437
+ access: "create"
32438
+ },
32439
+ "navigation.runAction": {
32440
+ capName: "navigation",
32441
+ capScope: "device",
32442
+ addonId: null,
32443
+ access: "create"
32444
+ },
32445
+ "navigation.setLightLevel": {
32446
+ capName: "navigation",
32447
+ capScope: "device",
32448
+ addonId: null,
32449
+ access: "create"
32450
+ },
32451
+ "navigation.setLightMode": {
32452
+ capName: "navigation",
32453
+ capScope: "device",
32454
+ addonId: null,
32455
+ access: "create"
32456
+ },
32457
+ "navigation.setLightOn": {
32458
+ capName: "navigation",
32459
+ capScope: "device",
32460
+ addonId: null,
32461
+ access: "create"
32462
+ },
32463
+ "navigation.stop": {
32464
+ capName: "navigation",
32465
+ capScope: "device",
32466
+ addonId: null,
32467
+ access: "create"
32468
+ },
32206
32469
  "networkAccess.getEndpoint": {
32207
32470
  capName: "network-access",
32208
32471
  capScope: "system",
@@ -36298,6 +36561,56 @@ Object.freeze({
36298
36561
  form: "single",
36299
36562
  optional: false
36300
36563
  }],
36564
+ "navigation.getFeatures": [{
36565
+ name: "deviceId",
36566
+ form: "single",
36567
+ optional: false
36568
+ }],
36569
+ "navigation.goToPoint": [{
36570
+ name: "deviceId",
36571
+ form: "single",
36572
+ optional: false
36573
+ }],
36574
+ "navigation.listActions": [{
36575
+ name: "deviceId",
36576
+ form: "single",
36577
+ optional: false
36578
+ }],
36579
+ "navigation.move": [{
36580
+ name: "deviceId",
36581
+ form: "single",
36582
+ optional: false
36583
+ }],
36584
+ "navigation.playSound": [{
36585
+ name: "deviceId",
36586
+ form: "single",
36587
+ optional: false
36588
+ }],
36589
+ "navigation.runAction": [{
36590
+ name: "deviceId",
36591
+ form: "single",
36592
+ optional: false
36593
+ }],
36594
+ "navigation.setLightLevel": [{
36595
+ name: "deviceId",
36596
+ form: "single",
36597
+ optional: false
36598
+ }],
36599
+ "navigation.setLightMode": [{
36600
+ name: "deviceId",
36601
+ form: "single",
36602
+ optional: false
36603
+ }],
36604
+ "navigation.setLightOn": [{
36605
+ name: "deviceId",
36606
+ form: "single",
36607
+ optional: false
36608
+ }],
36609
+ "navigation.stop": [{
36610
+ name: "deviceId",
36611
+ form: "single",
36612
+ optional: false
36613
+ }],
36301
36614
  "networkQuality.getDeviceStats": [{
36302
36615
  name: "deviceId",
36303
36616
  form: "single",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.4.72",
3
+ "version": "0.4.74",
4
4
  "description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
5
5
  "keywords": [
6
6
  "camstack",