@camstack/addon-pipeline-orchestrator 1.2.166 → 1.2.167
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/_stub.js +2 -2
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-C4tQ6wzf.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_orchestrator_widgets-Cd0R035D.mjs} +3 -3
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ckk-7c_N.mjs +26 -0
- package/dist/{_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DSO_ZOH-.mjs → _virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Druu1Kh6.mjs} +1 -1
- package/dist/{hostInit-qzzyEAID.mjs → hostInit-BVIqHvsT.mjs} +3 -3
- package/dist/index.js +367 -232
- package/dist/index.mjs +367 -232
- package/dist/remoteEntry.js +1 -1
- package/package.json +1 -1
- package/dist/_virtual_mf___mfe_internal__addon_pipeline_orchestrator_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BwoEqu8i.mjs +0 -26
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { randomUUID } from "node:crypto";
|
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
|
-
//#region ../types/dist/event-category-
|
|
5
|
+
//#region ../types/dist/event-category-CnLqLOKs.mjs
|
|
6
6
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
7
7
|
EventCategory["SystemBoot"] = "system.boot";
|
|
8
8
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -197,6 +197,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
197
197
|
EventCategory["ProcessCrashed"] = "process.crashed";
|
|
198
198
|
EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
|
|
199
199
|
EventCategory["ProcessRestarted"] = "process.restarted";
|
|
200
|
+
/**
|
|
201
|
+
* The SET of storage locations changed — one was created, edited, enabled,
|
|
202
|
+
* disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
|
|
203
|
+
*
|
|
204
|
+
* Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
|
|
205
|
+
* it must also converge on its own periodic path, because a dropped event
|
|
206
|
+
* must not leave a node writing to yesterday's disk set forever. It exists
|
|
207
|
+
* because there was NO signal at all — an operator who added a second
|
|
208
|
+
* recordings disk in the admin UI got nothing, and the recorder kept its
|
|
209
|
+
* resolved locations until something else happened to re-resolve them
|
|
210
|
+
* (D387). Payload `StorageLocationsChangedPayload`.
|
|
211
|
+
*/
|
|
212
|
+
EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
|
|
200
213
|
EventCategory["RecordingStarted"] = "recording.started";
|
|
201
214
|
EventCategory["RecordingStopped"] = "recording.stopped";
|
|
202
215
|
EventCategory["RecordingError"] = "recording.error";
|
|
@@ -9384,6 +9397,21 @@ var StorageCleanupJobSchema = object({
|
|
|
9384
9397
|
});
|
|
9385
9398
|
var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
|
|
9386
9399
|
/**
|
|
9400
|
+
* The one typed state of a storage location. Authoritative Zod schema — the TS
|
|
9401
|
+
* alias below is `z.infer<>` of it, never a second spelling.
|
|
9402
|
+
*/
|
|
9403
|
+
var StorageLocationModeSchema = _enum([
|
|
9404
|
+
"active",
|
|
9405
|
+
"readonly",
|
|
9406
|
+
"drain",
|
|
9407
|
+
"disabled"
|
|
9408
|
+
]);
|
|
9409
|
+
_enum([
|
|
9410
|
+
"normal",
|
|
9411
|
+
"never",
|
|
9412
|
+
"drain"
|
|
9413
|
+
]);
|
|
9414
|
+
/**
|
|
9387
9415
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
9388
9416
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
9389
9417
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -9449,6 +9477,21 @@ var StorageLocationSchema = object({
|
|
|
9449
9477
|
* stops existing rather than being re-derived on every read.
|
|
9450
9478
|
*/
|
|
9451
9479
|
enabled: boolean().optional(),
|
|
9480
|
+
/**
|
|
9481
|
+
* THE state of this location (D385), and the only authority on what may be
|
|
9482
|
+
* written, read or evicted here. Interpreted in exactly one place —
|
|
9483
|
+
* `storage-location-mode.ts` — which also folds the legacy
|
|
9484
|
+
* `enabled` / `config.readOnly` pair into a mode so an old row is never
|
|
9485
|
+
* ambiguous.
|
|
9486
|
+
*
|
|
9487
|
+
* OPTIONAL only for the wire and for rows written before D385: absence is
|
|
9488
|
+
* resolved by `resolveLocationMode`, and the orchestrator stamps every
|
|
9489
|
+
* unstamped row ONCE at hydrate so absence stops existing rather than being
|
|
9490
|
+
* re-derived on every read. `enabled` survives one release as a DERIVED
|
|
9491
|
+
* mirror (`mode === 'active'`); `withLocationMode` is the only writer of
|
|
9492
|
+
* either, so the two cannot disagree.
|
|
9493
|
+
*/
|
|
9494
|
+
mode: StorageLocationModeSchema.optional(),
|
|
9452
9495
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
9453
9496
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
9454
9497
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -9456,11 +9499,46 @@ var StorageLocationSchema = object({
|
|
|
9456
9499
|
totalBytes: number(),
|
|
9457
9500
|
availableBytes: number()
|
|
9458
9501
|
}).nullable().optional(),
|
|
9502
|
+
/**
|
|
9503
|
+
* How much of that volume CamStack ITSELF holds on this location (D388) —
|
|
9504
|
+
* COMPUTED at read time from the `storage-occupancy` providers' own figures,
|
|
9505
|
+
* never persisted, never a filesystem walk.
|
|
9506
|
+
*
|
|
9507
|
+
* **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
|
|
9508
|
+
* location yet — nobody stores here, the owning addon is down, or the first
|
|
9509
|
+
* refresh has not completed. A UI must omit the segment rather than draw it
|
|
9510
|
+
* at zero, which would claim we occupy nothing (D315). It is an OBJECT and
|
|
9511
|
+
* not a bare number precisely so that a `?? 0` on the consuming side has to
|
|
9512
|
+
* be spelled out loud instead of appearing by accident.
|
|
9513
|
+
*
|
|
9514
|
+
* `measuredAtMs` is the OLDEST contributing measurement, so it is honest
|
|
9515
|
+
* about the whole figure rather than about its freshest part.
|
|
9516
|
+
*/
|
|
9517
|
+
owned: object({
|
|
9518
|
+
bytes: number().int().nonnegative(),
|
|
9519
|
+
measuredAtMs: number().int().nonnegative()
|
|
9520
|
+
}).optional(),
|
|
9459
9521
|
createdAt: number(),
|
|
9460
9522
|
updatedAt: number()
|
|
9461
9523
|
});
|
|
9462
9524
|
object({ isDefault: boolean().optional() });
|
|
9463
9525
|
/**
|
|
9526
|
+
* How far a `drain` has got (D386) — the read a UI renders, and nothing more.
|
|
9527
|
+
*
|
|
9528
|
+
* `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
|
|
9529
|
+
* OBSERVED and is `null` when it has observed none. Never a fabricated date: a
|
|
9530
|
+
* drain with no observed growth has no honest ETA, and inventing one is how an
|
|
9531
|
+
* operator learns not to believe the screen.
|
|
9532
|
+
*/
|
|
9533
|
+
var StorageDrainProgressSchema = object({
|
|
9534
|
+
locationId: string(),
|
|
9535
|
+
startedAtMs: number(),
|
|
9536
|
+
startBytes: number(),
|
|
9537
|
+
bytesRemaining: number(),
|
|
9538
|
+
drained: boolean(),
|
|
9539
|
+
estimatedEmptyAtMs: number().nullable()
|
|
9540
|
+
});
|
|
9541
|
+
/**
|
|
9464
9542
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
9465
9543
|
* Either:
|
|
9466
9544
|
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
@@ -23212,7 +23290,7 @@ method(object({
|
|
|
23212
23290
|
}), _void(), {
|
|
23213
23291
|
kind: "mutation",
|
|
23214
23292
|
auth: "admin"
|
|
23215
|
-
}), method(object({ id: string() }), object({
|
|
23293
|
+
}), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
|
|
23216
23294
|
ok: boolean(),
|
|
23217
23295
|
error: string().optional()
|
|
23218
23296
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
@@ -23282,6 +23360,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
23282
23360
|
kind: "mutation",
|
|
23283
23361
|
auth: "admin"
|
|
23284
23362
|
}), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
|
|
23363
|
+
/**
|
|
23364
|
+
* `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
|
|
23365
|
+
* location (D388).
|
|
23366
|
+
*
|
|
23367
|
+
* ## Why this is not `storage-evictable`
|
|
23368
|
+
*
|
|
23369
|
+
* `storage-evictable.getEvictableUsage` looks like the same question and is
|
|
23370
|
+
* not, in two ways that both matter and both bite hardest on the locations an
|
|
23371
|
+
* operator most wants a figure for:
|
|
23372
|
+
*
|
|
23373
|
+
* - it reports the whole eviction DOMAIN, not the location. `recordings:default`
|
|
23374
|
+
* and `recordingsLow:default` deliberately share one root and evict as one
|
|
23375
|
+
* oldest-first pool, so both answer with the SAME combined total. As an
|
|
23376
|
+
* occupancy figure that double-counts the disk.
|
|
23377
|
+
* - it reports ZERO for a location whose eviction policy is `never` (D385) —
|
|
23378
|
+
* a `readonly` or `disabled` disk. Those are exactly the disks an operator
|
|
23379
|
+
* is retiring and staring at.
|
|
23380
|
+
*
|
|
23381
|
+
* So this is its own contract with its own quantity, and the quantity is
|
|
23382
|
+
* OCCUPIED: every byte the addon holds on that location, whether or not it
|
|
23383
|
+
* would ever be willing to delete it. A provider that can only answer
|
|
23384
|
+
* "evictable" must not register here — a number that silently means different
|
|
23385
|
+
* things per class is worse than no number.
|
|
23386
|
+
*
|
|
23387
|
+
* ## Absence is an answer
|
|
23388
|
+
*
|
|
23389
|
+
* A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
|
|
23390
|
+
* stamps `StorageLocation.owned` only for locations it has a report for, and
|
|
23391
|
+
* the field is an OBJECT rather than a bare number so that a `?? 0` on the
|
|
23392
|
+
* consuming side has to be written out loud instead of appearing by accident.
|
|
23393
|
+
*
|
|
23394
|
+
* `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
|
|
23395
|
+
* a public client surface. Clients read the stamped `StorageLocation.owned`.
|
|
23396
|
+
*/
|
|
23397
|
+
/** One provider's occupancy answer for one location. */
|
|
23398
|
+
var StorageOccupancyReportSchema = object({
|
|
23399
|
+
locationId: string(),
|
|
23400
|
+
/** Bytes this provider holds on THAT location — not its eviction domain, and
|
|
23401
|
+
* not net of what it is willing to delete. */
|
|
23402
|
+
ownedBytes: number().int().nonnegative(),
|
|
23403
|
+
/** When the provider last actually measured this. The orchestrator carries it
|
|
23404
|
+
* through so a UI can say how old the figure is instead of implying "now". */
|
|
23405
|
+
measuredAtMs: number().int().nonnegative()
|
|
23406
|
+
});
|
|
23407
|
+
method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
|
|
23285
23408
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
23286
23409
|
providerId: string().min(1),
|
|
23287
23410
|
displayName: string().min(1),
|
|
@@ -24917,39 +25040,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
|
|
|
24917
25040
|
deviceId: number(),
|
|
24918
25041
|
status: BatteryStatusSchema
|
|
24919
25042
|
});
|
|
24920
|
-
/**
|
|
24921
|
-
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
24922
|
-
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
24923
|
-
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
24924
|
-
* one Home Assistant projection.
|
|
24925
|
-
*/
|
|
24926
|
-
var NetworkLinkStatusSchema = object({
|
|
24927
|
-
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
24928
|
-
type: _enum([
|
|
24929
|
-
"wifi",
|
|
24930
|
-
"ethernet",
|
|
24931
|
-
"cellular",
|
|
24932
|
-
"unknown"
|
|
24933
|
-
]),
|
|
24934
|
-
/**
|
|
24935
|
-
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
24936
|
-
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
24937
|
-
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
24938
|
-
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
24939
|
-
* SKIP a null rather than coerce it.
|
|
24940
|
-
*/
|
|
24941
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
24942
|
-
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
24943
|
-
rssiDbm: number().optional(),
|
|
24944
|
-
/** Network name of a wireless link, when the firmware reports it. */
|
|
24945
|
-
ssid: string().optional(),
|
|
24946
|
-
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
24947
|
-
lastUpdated: number()
|
|
24948
|
-
});
|
|
24949
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
24950
|
-
deviceId: number(),
|
|
24951
|
-
status: NetworkLinkStatusSchema
|
|
24952
|
-
});
|
|
24953
25043
|
object({
|
|
24954
25044
|
on: boolean(),
|
|
24955
25045
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -27303,6 +27393,236 @@ DeviceType.Camera, method(object({
|
|
|
27303
27393
|
detection: NativeDetectionSchema
|
|
27304
27394
|
});
|
|
27305
27395
|
/**
|
|
27396
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
27397
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
27398
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
27399
|
+
*
|
|
27400
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
27401
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
27402
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
27403
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
27404
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
27405
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
27406
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
27407
|
+
* the reverse:
|
|
27408
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
27409
|
+
* / `getOptions`), and
|
|
27410
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
27411
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
27412
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
27413
|
+
* not here (see the addon design note):
|
|
27414
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
27415
|
+
* ptz.stop() → navigation.stop()
|
|
27416
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
27417
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
27418
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
27419
|
+
*
|
|
27420
|
+
* ## Continuous drive
|
|
27421
|
+
*
|
|
27422
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
27423
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
27424
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
27425
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
27426
|
+
* coalesce them. The UI owns the cadence.
|
|
27427
|
+
*
|
|
27428
|
+
* ## The action dictionary
|
|
27429
|
+
*
|
|
27430
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
27431
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
27432
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
27433
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
27434
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
27435
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
27436
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
27437
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
27438
|
+
*
|
|
27439
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
27440
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
27441
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
27442
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
27443
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
27444
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
27445
|
+
* THIS contract.
|
|
27446
|
+
*/
|
|
27447
|
+
/**
|
|
27448
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
27449
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
27450
|
+
* halts it.
|
|
27451
|
+
*
|
|
27452
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
27453
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
27454
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
27455
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
27456
|
+
*
|
|
27457
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
27458
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
27459
|
+
*/
|
|
27460
|
+
var NavigationMoveCommandSchema = object({
|
|
27461
|
+
pan: number().min(-1).max(1).optional(),
|
|
27462
|
+
tilt: number().min(-1).max(1).optional(),
|
|
27463
|
+
speed: number().min(0).max(1).optional()
|
|
27464
|
+
});
|
|
27465
|
+
/**
|
|
27466
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
27467
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
27468
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
27469
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
27470
|
+
*/
|
|
27471
|
+
var NavigationActionIdSchema = _enum([
|
|
27472
|
+
"goHome",
|
|
27473
|
+
"locate",
|
|
27474
|
+
"spotClean",
|
|
27475
|
+
"findPet",
|
|
27476
|
+
"personFollow",
|
|
27477
|
+
"stop",
|
|
27478
|
+
"startClean",
|
|
27479
|
+
"pauseClean",
|
|
27480
|
+
"dockWash",
|
|
27481
|
+
"autoEmpty",
|
|
27482
|
+
"flashOn",
|
|
27483
|
+
"flashOff"
|
|
27484
|
+
]);
|
|
27485
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27486
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27487
|
+
/**
|
|
27488
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27489
|
+
* native panel and the PTZ mimic render as a button.
|
|
27490
|
+
*
|
|
27491
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27492
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27493
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27494
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27495
|
+
* - `label` — operator-facing English label.
|
|
27496
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27497
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27498
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27499
|
+
* flips it from config, never by editing code.
|
|
27500
|
+
*/
|
|
27501
|
+
var NavigationActionEntrySchema = object({
|
|
27502
|
+
id: string(),
|
|
27503
|
+
kind: NavigationEntryKindSchema,
|
|
27504
|
+
label: string(),
|
|
27505
|
+
icon: string(),
|
|
27506
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27507
|
+
soundId: number().int().optional(),
|
|
27508
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
27509
|
+
enabled: boolean()
|
|
27510
|
+
});
|
|
27511
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27512
|
+
var NavigationPointSchema = object({
|
|
27513
|
+
x: number(),
|
|
27514
|
+
y: number()
|
|
27515
|
+
});
|
|
27516
|
+
/**
|
|
27517
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27518
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27519
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27520
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27521
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27522
|
+
* that are not dictionary entries.
|
|
27523
|
+
*
|
|
27524
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
27525
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27526
|
+
* map-coordinate plumbing is wired.
|
|
27527
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27528
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27529
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27530
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27531
|
+
* camera-service control; needs an active stream).
|
|
27532
|
+
*/
|
|
27533
|
+
var NavigationFeaturesSchema = object({
|
|
27534
|
+
move: boolean(),
|
|
27535
|
+
stop: boolean(),
|
|
27536
|
+
goToPoint: boolean(),
|
|
27537
|
+
runAction: boolean(),
|
|
27538
|
+
playSound: boolean(),
|
|
27539
|
+
light: boolean(),
|
|
27540
|
+
lightMode: boolean()
|
|
27541
|
+
});
|
|
27542
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27543
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27544
|
+
/**
|
|
27545
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27546
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27547
|
+
* - `following` — person/pet follow is currently armed.
|
|
27548
|
+
* - `flash` — the on-camera fill light is on.
|
|
27549
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
27550
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27551
|
+
* `lightMode === 'manual'`.
|
|
27552
|
+
*/
|
|
27553
|
+
var NavigationStatusSchema = object({
|
|
27554
|
+
mode: _enum([
|
|
27555
|
+
"idle",
|
|
27556
|
+
"cleaning",
|
|
27557
|
+
"spot",
|
|
27558
|
+
"following",
|
|
27559
|
+
"goto",
|
|
27560
|
+
"returning",
|
|
27561
|
+
"paused",
|
|
27562
|
+
"unknown"
|
|
27563
|
+
]),
|
|
27564
|
+
following: boolean(),
|
|
27565
|
+
flash: boolean(),
|
|
27566
|
+
lightMode: NavigationLightModeSchema,
|
|
27567
|
+
lightLevel: number().min(40).max(100),
|
|
27568
|
+
/** Ms epoch when the slice was last updated. */
|
|
27569
|
+
lastChangedAt: number()
|
|
27570
|
+
});
|
|
27571
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27572
|
+
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({
|
|
27573
|
+
deviceId: number(),
|
|
27574
|
+
actionId: NavigationActionIdSchema
|
|
27575
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27576
|
+
deviceId: number(),
|
|
27577
|
+
soundId: number().int()
|
|
27578
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27579
|
+
deviceId: number(),
|
|
27580
|
+
on: boolean()
|
|
27581
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27582
|
+
deviceId: number(),
|
|
27583
|
+
mode: NavigationLightModeSchema,
|
|
27584
|
+
level: number().min(40).max(100).optional()
|
|
27585
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
27586
|
+
deviceId: number(),
|
|
27587
|
+
level: number().min(40).max(100)
|
|
27588
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27589
|
+
deviceId: number(),
|
|
27590
|
+
status: NavigationStatusSchema
|
|
27591
|
+
});
|
|
27592
|
+
/**
|
|
27593
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
27594
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
27595
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
27596
|
+
* one Home Assistant projection.
|
|
27597
|
+
*/
|
|
27598
|
+
var NetworkLinkStatusSchema = object({
|
|
27599
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
27600
|
+
type: _enum([
|
|
27601
|
+
"wifi",
|
|
27602
|
+
"ethernet",
|
|
27603
|
+
"cellular",
|
|
27604
|
+
"unknown"
|
|
27605
|
+
]),
|
|
27606
|
+
/**
|
|
27607
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
27608
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
27609
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
27610
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
27611
|
+
* SKIP a null rather than coerce it.
|
|
27612
|
+
*/
|
|
27613
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
27614
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
27615
|
+
rssiDbm: number().optional(),
|
|
27616
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
27617
|
+
ssid: string().optional(),
|
|
27618
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
27619
|
+
lastUpdated: number()
|
|
27620
|
+
});
|
|
27621
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
27622
|
+
deviceId: number(),
|
|
27623
|
+
status: NetworkLinkStatusSchema
|
|
27624
|
+
});
|
|
27625
|
+
/**
|
|
27306
27626
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
27307
27627
|
* jitter, and observed/peak bandwidth per device + per client.
|
|
27308
27628
|
*
|
|
@@ -28544,203 +28864,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
28544
28864
|
deviceId: number(),
|
|
28545
28865
|
status: PtzAutotrackStatusSchema
|
|
28546
28866
|
});
|
|
28547
|
-
/**
|
|
28548
|
-
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
28549
|
-
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
28550
|
-
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
28551
|
-
*
|
|
28552
|
-
* Why a NEW cap rather than overloading `ptz`:
|
|
28553
|
-
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
28554
|
-
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
28555
|
-
* The two are different physical models: PTZ is absolute-position + presets,
|
|
28556
|
-
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
28557
|
-
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
28558
|
-
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
28559
|
-
* the reverse:
|
|
28560
|
-
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
28561
|
-
* / `getOptions`), and
|
|
28562
|
-
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
28563
|
-
* robot camera shows up in the existing PTZ control path without every
|
|
28564
|
-
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
28565
|
-
* not here (see the addon design note):
|
|
28566
|
-
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
28567
|
-
* ptz.stop() → navigation.stop()
|
|
28568
|
-
* ptz.goHome() → navigation.runAction('goHome')
|
|
28569
|
-
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
28570
|
-
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
28571
|
-
*
|
|
28572
|
-
* ## Continuous drive
|
|
28573
|
-
*
|
|
28574
|
-
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
28575
|
-
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
28576
|
-
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
28577
|
-
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
28578
|
-
* coalesce them. The UI owns the cadence.
|
|
28579
|
-
*
|
|
28580
|
-
* ## The action dictionary
|
|
28581
|
-
*
|
|
28582
|
-
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
28583
|
-
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
28584
|
-
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
28585
|
-
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
28586
|
-
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
28587
|
-
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
28588
|
-
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
28589
|
-
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
28590
|
-
*
|
|
28591
|
-
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
28592
|
-
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
28593
|
-
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
28594
|
-
* every device handle. A future nodedreame publish adds a typed
|
|
28595
|
-
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
28596
|
-
* provider can then swap the raw calls for the typed methods with no change to
|
|
28597
|
-
* THIS contract.
|
|
28598
|
-
*/
|
|
28599
|
-
/**
|
|
28600
|
-
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
28601
|
-
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
28602
|
-
* halts it.
|
|
28603
|
-
*
|
|
28604
|
-
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
28605
|
-
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
28606
|
-
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
28607
|
-
* vector by it (drivers without proportional drive ignore it).
|
|
28608
|
-
*
|
|
28609
|
-
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
28610
|
-
* axis alone; an all-undefined nudge is a no-op.
|
|
28611
|
-
*/
|
|
28612
|
-
var NavigationMoveCommandSchema = object({
|
|
28613
|
-
pan: number().min(-1).max(1).optional(),
|
|
28614
|
-
tilt: number().min(-1).max(1).optional(),
|
|
28615
|
-
speed: number().min(0).max(1).optional()
|
|
28616
|
-
});
|
|
28617
|
-
/**
|
|
28618
|
-
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
28619
|
-
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
28620
|
-
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
28621
|
-
* `playSound` (see the `sound` dictionary entries).
|
|
28622
|
-
*/
|
|
28623
|
-
var NavigationActionIdSchema = _enum([
|
|
28624
|
-
"goHome",
|
|
28625
|
-
"locate",
|
|
28626
|
-
"spotClean",
|
|
28627
|
-
"findPet",
|
|
28628
|
-
"personFollow",
|
|
28629
|
-
"stop",
|
|
28630
|
-
"startClean",
|
|
28631
|
-
"pauseClean",
|
|
28632
|
-
"dockWash",
|
|
28633
|
-
"autoEmpty",
|
|
28634
|
-
"flashOn",
|
|
28635
|
-
"flashOff"
|
|
28636
|
-
]);
|
|
28637
|
-
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
28638
|
-
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
28639
|
-
/**
|
|
28640
|
-
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
28641
|
-
* native panel and the PTZ mimic render as a button.
|
|
28642
|
-
*
|
|
28643
|
-
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
28644
|
-
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
28645
|
-
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
28646
|
-
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
28647
|
-
* - `label` — operator-facing English label.
|
|
28648
|
-
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
28649
|
-
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
28650
|
-
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
28651
|
-
* flips it from config, never by editing code.
|
|
28652
|
-
*/
|
|
28653
|
-
var NavigationActionEntrySchema = object({
|
|
28654
|
-
id: string(),
|
|
28655
|
-
kind: NavigationEntryKindSchema,
|
|
28656
|
-
label: string(),
|
|
28657
|
-
icon: string(),
|
|
28658
|
-
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
28659
|
-
soundId: number().int().optional(),
|
|
28660
|
-
/** Per-device feature flag — render this entry only when true. */
|
|
28661
|
-
enabled: boolean()
|
|
28662
|
-
});
|
|
28663
|
-
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
28664
|
-
var NavigationPointSchema = object({
|
|
28665
|
-
x: number(),
|
|
28666
|
-
y: number()
|
|
28667
|
-
});
|
|
28668
|
-
/**
|
|
28669
|
-
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
28670
|
-
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
28671
|
-
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
28672
|
-
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
28673
|
-
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
28674
|
-
* that are not dictionary entries.
|
|
28675
|
-
*
|
|
28676
|
-
* - `move` / `stop` — the momentary drive joystick.
|
|
28677
|
-
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
28678
|
-
* map-coordinate plumbing is wired.
|
|
28679
|
-
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
28680
|
-
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
28681
|
-
* - `light` — the on/off fill-light toggle (works anytime).
|
|
28682
|
-
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
28683
|
-
* camera-service control; needs an active stream).
|
|
28684
|
-
*/
|
|
28685
|
-
var NavigationFeaturesSchema = object({
|
|
28686
|
-
move: boolean(),
|
|
28687
|
-
stop: boolean(),
|
|
28688
|
-
goToPoint: boolean(),
|
|
28689
|
-
runAction: boolean(),
|
|
28690
|
-
playSound: boolean(),
|
|
28691
|
-
light: boolean(),
|
|
28692
|
-
lightMode: boolean()
|
|
28693
|
-
});
|
|
28694
|
-
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
28695
|
-
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
28696
|
-
/**
|
|
28697
|
-
* Live navigation state so the UI can reflect what the robot is doing:
|
|
28698
|
-
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
28699
|
-
* - `following` — person/pet follow is currently armed.
|
|
28700
|
-
* - `flash` — the on-camera fill light is on.
|
|
28701
|
-
* - `lightMode` — auto vs manual fill-light mode.
|
|
28702
|
-
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
28703
|
-
* `lightMode === 'manual'`.
|
|
28704
|
-
*/
|
|
28705
|
-
var NavigationStatusSchema = object({
|
|
28706
|
-
mode: _enum([
|
|
28707
|
-
"idle",
|
|
28708
|
-
"cleaning",
|
|
28709
|
-
"spot",
|
|
28710
|
-
"following",
|
|
28711
|
-
"goto",
|
|
28712
|
-
"returning",
|
|
28713
|
-
"paused",
|
|
28714
|
-
"unknown"
|
|
28715
|
-
]),
|
|
28716
|
-
following: boolean(),
|
|
28717
|
-
flash: boolean(),
|
|
28718
|
-
lightMode: NavigationLightModeSchema,
|
|
28719
|
-
lightLevel: number().min(40).max(100),
|
|
28720
|
-
/** Ms epoch when the slice was last updated. */
|
|
28721
|
-
lastChangedAt: number()
|
|
28722
|
-
});
|
|
28723
|
-
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
28724
|
-
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({
|
|
28725
|
-
deviceId: number(),
|
|
28726
|
-
actionId: NavigationActionIdSchema
|
|
28727
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
28728
|
-
deviceId: number(),
|
|
28729
|
-
soundId: number().int()
|
|
28730
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
28731
|
-
deviceId: number(),
|
|
28732
|
-
on: boolean()
|
|
28733
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
28734
|
-
deviceId: number(),
|
|
28735
|
-
mode: NavigationLightModeSchema,
|
|
28736
|
-
level: number().min(40).max(100).optional()
|
|
28737
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
28738
|
-
deviceId: number(),
|
|
28739
|
-
level: number().min(40).max(100)
|
|
28740
|
-
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
28741
|
-
deviceId: number(),
|
|
28742
|
-
status: NavigationStatusSchema
|
|
28743
|
-
});
|
|
28744
28867
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
28745
28868
|
kind: "mutation",
|
|
28746
28869
|
auth: "admin"
|
|
@@ -36139,6 +36262,12 @@ Object.freeze({
|
|
|
36139
36262
|
addonId: null,
|
|
36140
36263
|
access: "view"
|
|
36141
36264
|
},
|
|
36265
|
+
"storage.listDrainProgress": {
|
|
36266
|
+
capName: "storage",
|
|
36267
|
+
capScope: "system",
|
|
36268
|
+
addonId: null,
|
|
36269
|
+
access: "view"
|
|
36270
|
+
},
|
|
36142
36271
|
"storage.listLocationDeclarations": {
|
|
36143
36272
|
capName: "storage",
|
|
36144
36273
|
capScope: "system",
|
|
@@ -36283,6 +36412,12 @@ Object.freeze({
|
|
|
36283
36412
|
addonId: null,
|
|
36284
36413
|
access: "view"
|
|
36285
36414
|
},
|
|
36415
|
+
"storageOccupancy.getOccupancy": {
|
|
36416
|
+
capName: "storage-occupancy",
|
|
36417
|
+
capScope: "system",
|
|
36418
|
+
addonId: null,
|
|
36419
|
+
access: "view"
|
|
36420
|
+
},
|
|
36286
36421
|
"storageProvider.abortUpload": {
|
|
36287
36422
|
capName: "storage-provider",
|
|
36288
36423
|
capScope: "system",
|