@camstack/addon-provider-dreame 0.2.79 → 0.2.80
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 +648 -513
- package/dist/addon.mjs +648 -513
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -52672,7 +52672,7 @@ var DreameCameraStream = class extends TypedEmitter {
|
|
|
52672
52672
|
}
|
|
52673
52673
|
};
|
|
52674
52674
|
//#endregion
|
|
52675
|
-
//#region ../types/dist/event-category-
|
|
52675
|
+
//#region ../types/dist/event-category-CnLqLOKs.mjs
|
|
52676
52676
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
52677
52677
|
EventCategory["SystemBoot"] = "system.boot";
|
|
52678
52678
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -52867,6 +52867,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
52867
52867
|
EventCategory["ProcessCrashed"] = "process.crashed";
|
|
52868
52868
|
EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
|
|
52869
52869
|
EventCategory["ProcessRestarted"] = "process.restarted";
|
|
52870
|
+
/**
|
|
52871
|
+
* The SET of storage locations changed — one was created, edited, enabled,
|
|
52872
|
+
* disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
|
|
52873
|
+
*
|
|
52874
|
+
* Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
|
|
52875
|
+
* it must also converge on its own periodic path, because a dropped event
|
|
52876
|
+
* must not leave a node writing to yesterday's disk set forever. It exists
|
|
52877
|
+
* because there was NO signal at all — an operator who added a second
|
|
52878
|
+
* recordings disk in the admin UI got nothing, and the recorder kept its
|
|
52879
|
+
* resolved locations until something else happened to re-resolve them
|
|
52880
|
+
* (D387). Payload `StorageLocationsChangedPayload`.
|
|
52881
|
+
*/
|
|
52882
|
+
EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
|
|
52870
52883
|
EventCategory["RecordingStarted"] = "recording.started";
|
|
52871
52884
|
EventCategory["RecordingStopped"] = "recording.stopped";
|
|
52872
52885
|
EventCategory["RecordingError"] = "recording.error";
|
|
@@ -61209,6 +61222,21 @@ var StorageCleanupJobSchema = object({
|
|
|
61209
61222
|
});
|
|
61210
61223
|
var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
|
|
61211
61224
|
/**
|
|
61225
|
+
* The one typed state of a storage location. Authoritative Zod schema — the TS
|
|
61226
|
+
* alias below is `z.infer<>` of it, never a second spelling.
|
|
61227
|
+
*/
|
|
61228
|
+
var StorageLocationModeSchema = _enum([
|
|
61229
|
+
"active",
|
|
61230
|
+
"readonly",
|
|
61231
|
+
"drain",
|
|
61232
|
+
"disabled"
|
|
61233
|
+
]);
|
|
61234
|
+
_enum([
|
|
61235
|
+
"normal",
|
|
61236
|
+
"never",
|
|
61237
|
+
"drain"
|
|
61238
|
+
]);
|
|
61239
|
+
/**
|
|
61212
61240
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
61213
61241
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
61214
61242
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -61274,6 +61302,21 @@ var StorageLocationSchema = object({
|
|
|
61274
61302
|
* stops existing rather than being re-derived on every read.
|
|
61275
61303
|
*/
|
|
61276
61304
|
enabled: boolean().optional(),
|
|
61305
|
+
/**
|
|
61306
|
+
* THE state of this location (D385), and the only authority on what may be
|
|
61307
|
+
* written, read or evicted here. Interpreted in exactly one place —
|
|
61308
|
+
* `storage-location-mode.ts` — which also folds the legacy
|
|
61309
|
+
* `enabled` / `config.readOnly` pair into a mode so an old row is never
|
|
61310
|
+
* ambiguous.
|
|
61311
|
+
*
|
|
61312
|
+
* OPTIONAL only for the wire and for rows written before D385: absence is
|
|
61313
|
+
* resolved by `resolveLocationMode`, and the orchestrator stamps every
|
|
61314
|
+
* unstamped row ONCE at hydrate so absence stops existing rather than being
|
|
61315
|
+
* re-derived on every read. `enabled` survives one release as a DERIVED
|
|
61316
|
+
* mirror (`mode === 'active'`); `withLocationMode` is the only writer of
|
|
61317
|
+
* either, so the two cannot disagree.
|
|
61318
|
+
*/
|
|
61319
|
+
mode: StorageLocationModeSchema.optional(),
|
|
61277
61320
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
61278
61321
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
61279
61322
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -61281,11 +61324,46 @@ var StorageLocationSchema = object({
|
|
|
61281
61324
|
totalBytes: number(),
|
|
61282
61325
|
availableBytes: number()
|
|
61283
61326
|
}).nullable().optional(),
|
|
61327
|
+
/**
|
|
61328
|
+
* How much of that volume CamStack ITSELF holds on this location (D388) —
|
|
61329
|
+
* COMPUTED at read time from the `storage-occupancy` providers' own figures,
|
|
61330
|
+
* never persisted, never a filesystem walk.
|
|
61331
|
+
*
|
|
61332
|
+
* **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
|
|
61333
|
+
* location yet — nobody stores here, the owning addon is down, or the first
|
|
61334
|
+
* refresh has not completed. A UI must omit the segment rather than draw it
|
|
61335
|
+
* at zero, which would claim we occupy nothing (D315). It is an OBJECT and
|
|
61336
|
+
* not a bare number precisely so that a `?? 0` on the consuming side has to
|
|
61337
|
+
* be spelled out loud instead of appearing by accident.
|
|
61338
|
+
*
|
|
61339
|
+
* `measuredAtMs` is the OLDEST contributing measurement, so it is honest
|
|
61340
|
+
* about the whole figure rather than about its freshest part.
|
|
61341
|
+
*/
|
|
61342
|
+
owned: object({
|
|
61343
|
+
bytes: number().int().nonnegative(),
|
|
61344
|
+
measuredAtMs: number().int().nonnegative()
|
|
61345
|
+
}).optional(),
|
|
61284
61346
|
createdAt: number(),
|
|
61285
61347
|
updatedAt: number()
|
|
61286
61348
|
});
|
|
61287
61349
|
object({ isDefault: boolean().optional() });
|
|
61288
61350
|
/**
|
|
61351
|
+
* How far a `drain` has got (D386) — the read a UI renders, and nothing more.
|
|
61352
|
+
*
|
|
61353
|
+
* `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
|
|
61354
|
+
* OBSERVED and is `null` when it has observed none. Never a fabricated date: a
|
|
61355
|
+
* drain with no observed growth has no honest ETA, and inventing one is how an
|
|
61356
|
+
* operator learns not to believe the screen.
|
|
61357
|
+
*/
|
|
61358
|
+
var StorageDrainProgressSchema = object({
|
|
61359
|
+
locationId: string(),
|
|
61360
|
+
startedAtMs: number(),
|
|
61361
|
+
startBytes: number(),
|
|
61362
|
+
bytesRemaining: number(),
|
|
61363
|
+
drained: boolean(),
|
|
61364
|
+
estimatedEmptyAtMs: number().nullable()
|
|
61365
|
+
});
|
|
61366
|
+
/**
|
|
61289
61367
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
61290
61368
|
* Either:
|
|
61291
61369
|
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
@@ -74631,7 +74709,7 @@ method(object({
|
|
|
74631
74709
|
}), _void(), {
|
|
74632
74710
|
kind: "mutation",
|
|
74633
74711
|
auth: "admin"
|
|
74634
|
-
}), method(object({ id: string() }), object({
|
|
74712
|
+
}), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
|
|
74635
74713
|
ok: boolean(),
|
|
74636
74714
|
error: string().optional()
|
|
74637
74715
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
@@ -74701,6 +74779,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
74701
74779
|
kind: "mutation",
|
|
74702
74780
|
auth: "admin"
|
|
74703
74781
|
}), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
|
|
74782
|
+
/**
|
|
74783
|
+
* `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
|
|
74784
|
+
* location (D388).
|
|
74785
|
+
*
|
|
74786
|
+
* ## Why this is not `storage-evictable`
|
|
74787
|
+
*
|
|
74788
|
+
* `storage-evictable.getEvictableUsage` looks like the same question and is
|
|
74789
|
+
* not, in two ways that both matter and both bite hardest on the locations an
|
|
74790
|
+
* operator most wants a figure for:
|
|
74791
|
+
*
|
|
74792
|
+
* - it reports the whole eviction DOMAIN, not the location. `recordings:default`
|
|
74793
|
+
* and `recordingsLow:default` deliberately share one root and evict as one
|
|
74794
|
+
* oldest-first pool, so both answer with the SAME combined total. As an
|
|
74795
|
+
* occupancy figure that double-counts the disk.
|
|
74796
|
+
* - it reports ZERO for a location whose eviction policy is `never` (D385) —
|
|
74797
|
+
* a `readonly` or `disabled` disk. Those are exactly the disks an operator
|
|
74798
|
+
* is retiring and staring at.
|
|
74799
|
+
*
|
|
74800
|
+
* So this is its own contract with its own quantity, and the quantity is
|
|
74801
|
+
* OCCUPIED: every byte the addon holds on that location, whether or not it
|
|
74802
|
+
* would ever be willing to delete it. A provider that can only answer
|
|
74803
|
+
* "evictable" must not register here — a number that silently means different
|
|
74804
|
+
* things per class is worse than no number.
|
|
74805
|
+
*
|
|
74806
|
+
* ## Absence is an answer
|
|
74807
|
+
*
|
|
74808
|
+
* A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
|
|
74809
|
+
* stamps `StorageLocation.owned` only for locations it has a report for, and
|
|
74810
|
+
* the field is an OBJECT rather than a bare number so that a `?? 0` on the
|
|
74811
|
+
* consuming side has to be written out loud instead of appearing by accident.
|
|
74812
|
+
*
|
|
74813
|
+
* `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
|
|
74814
|
+
* a public client surface. Clients read the stamped `StorageLocation.owned`.
|
|
74815
|
+
*/
|
|
74816
|
+
/** One provider's occupancy answer for one location. */
|
|
74817
|
+
var StorageOccupancyReportSchema = object({
|
|
74818
|
+
locationId: string(),
|
|
74819
|
+
/** Bytes this provider holds on THAT location — not its eviction domain, and
|
|
74820
|
+
* not net of what it is willing to delete. */
|
|
74821
|
+
ownedBytes: number().int().nonnegative(),
|
|
74822
|
+
/** When the provider last actually measured this. The orchestrator carries it
|
|
74823
|
+
* through so a UI can say how old the figure is instead of implying "now". */
|
|
74824
|
+
measuredAtMs: number().int().nonnegative()
|
|
74825
|
+
});
|
|
74826
|
+
method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
|
|
74704
74827
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
74705
74828
|
providerId: string().min(1),
|
|
74706
74829
|
displayName: string().min(1),
|
|
@@ -76536,99 +76659,6 @@ onStatusChanged: { data: object({
|
|
|
76536
76659
|
volatileStateFields: ["lastUpdated"]
|
|
76537
76660
|
};
|
|
76538
76661
|
/**
|
|
76539
|
-
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
76540
|
-
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
76541
|
-
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
76542
|
-
* one Home Assistant projection.
|
|
76543
|
-
*/
|
|
76544
|
-
var NetworkLinkStatusSchema = object({
|
|
76545
|
-
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
76546
|
-
type: _enum([
|
|
76547
|
-
"wifi",
|
|
76548
|
-
"ethernet",
|
|
76549
|
-
"cellular",
|
|
76550
|
-
"unknown"
|
|
76551
|
-
]),
|
|
76552
|
-
/**
|
|
76553
|
-
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
76554
|
-
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
76555
|
-
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
76556
|
-
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
76557
|
-
* SKIP a null rather than coerce it.
|
|
76558
|
-
*/
|
|
76559
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
76560
|
-
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
76561
|
-
rssiDbm: number().optional(),
|
|
76562
|
-
/** Network name of a wireless link, when the firmware reports it. */
|
|
76563
|
-
ssid: string().optional(),
|
|
76564
|
-
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
76565
|
-
lastUpdated: number()
|
|
76566
|
-
});
|
|
76567
|
-
/** The slice a provider seeds before its first read: nothing is known yet. */
|
|
76568
|
-
var NETWORK_LINK_UNKNOWN = {
|
|
76569
|
-
type: "unknown",
|
|
76570
|
-
signalPercent: null,
|
|
76571
|
-
lastUpdated: 0
|
|
76572
|
-
};
|
|
76573
|
-
/**
|
|
76574
|
-
* Normalise a signal the firmware reports as BARS (0..`maxBars`) to 0..100.
|
|
76575
|
-
* Out-of-range or non-finite input is not a reading: `null`.
|
|
76576
|
-
*/
|
|
76577
|
-
function signalPercentFromBars(bars, maxBars) {
|
|
76578
|
-
if (bars === void 0 || !Number.isFinite(bars) || maxBars <= 0) return null;
|
|
76579
|
-
if (bars < 0 || bars > maxBars) return null;
|
|
76580
|
-
return Math.round(bars / maxBars * 100);
|
|
76581
|
-
}
|
|
76582
|
-
var networkLinkCapability = {
|
|
76583
|
-
name: "network-link",
|
|
76584
|
-
scope: "device",
|
|
76585
|
-
deviceNative: true,
|
|
76586
|
-
mode: "singleton",
|
|
76587
|
-
deviceTypes: [
|
|
76588
|
-
DeviceType.Camera,
|
|
76589
|
-
DeviceType.Sensor,
|
|
76590
|
-
DeviceType.Button,
|
|
76591
|
-
DeviceType.Switch,
|
|
76592
|
-
DeviceType.Light,
|
|
76593
|
-
DeviceType.Lock,
|
|
76594
|
-
DeviceType.Siren
|
|
76595
|
-
],
|
|
76596
|
-
methods: {},
|
|
76597
|
-
events: {
|
|
76598
|
-
/**
|
|
76599
|
-
* Emitted whenever the cached status changes (a link switch, a signal
|
|
76600
|
-
* reading that moved). Mirrored on the parent chain by the
|
|
76601
|
-
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
76602
|
-
*/
|
|
76603
|
-
onStatusChanged: { data: object({
|
|
76604
|
-
deviceId: number(),
|
|
76605
|
-
status: NetworkLinkStatusSchema
|
|
76606
|
-
}) } },
|
|
76607
|
-
status: {
|
|
76608
|
-
schema: NetworkLinkStatusSchema,
|
|
76609
|
-
kind: "push",
|
|
76610
|
-
empty: NETWORK_LINK_UNKNOWN
|
|
76611
|
-
},
|
|
76612
|
-
/**
|
|
76613
|
-
* Runtime-state slice — every provider stores the same shape under
|
|
76614
|
-
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
76615
|
-
* Home Assistant projector regardless of the driver.
|
|
76616
|
-
*/
|
|
76617
|
-
runtimeState: NetworkLinkStatusSchema,
|
|
76618
|
-
/**
|
|
76619
|
-
* Runtime-state durability: **restored** — a link reading is slow to
|
|
76620
|
-
* change and a sleeping battery camera may not report for hours; the
|
|
76621
|
-
* restored slice is what the badge shows until the next read.
|
|
76622
|
-
*
|
|
76623
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
76624
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
76625
|
-
*/
|
|
76626
|
-
durability: "restored",
|
|
76627
|
-
/** Clock fields: written, but excluded from the compare that decides
|
|
76628
|
-
* whether persisting is worth a SQLite commit. */
|
|
76629
|
-
volatileStateFields: ["lastUpdated"]
|
|
76630
|
-
};
|
|
76631
|
-
/**
|
|
76632
76662
|
* Generic boolean sensor — last-resort fallback when no domain-
|
|
76633
76663
|
* specific binary cap fits (Home Assistant `binary_sensor` without a
|
|
76634
76664
|
* known `device_class`, or a domain we haven't typed yet). Pure
|
|
@@ -80183,6 +80213,517 @@ var nativeObjectDetectionCapability = {
|
|
|
80183
80213
|
volatileStateFields: ["lastFetchedAt"]
|
|
80184
80214
|
};
|
|
80185
80215
|
/**
|
|
80216
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
80217
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
80218
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
80219
|
+
*
|
|
80220
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
80221
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
80222
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
80223
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
80224
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
80225
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
80226
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
80227
|
+
* the reverse:
|
|
80228
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
80229
|
+
* / `getOptions`), and
|
|
80230
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
80231
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
80232
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
80233
|
+
* not here (see the addon design note):
|
|
80234
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
80235
|
+
* ptz.stop() → navigation.stop()
|
|
80236
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
80237
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
80238
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
80239
|
+
*
|
|
80240
|
+
* ## Continuous drive
|
|
80241
|
+
*
|
|
80242
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
80243
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
80244
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
80245
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
80246
|
+
* coalesce them. The UI owns the cadence.
|
|
80247
|
+
*
|
|
80248
|
+
* ## The action dictionary
|
|
80249
|
+
*
|
|
80250
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
80251
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
80252
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
80253
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
80254
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
80255
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
80256
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
80257
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
80258
|
+
*
|
|
80259
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
80260
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
80261
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
80262
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
80263
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
80264
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
80265
|
+
* THIS contract.
|
|
80266
|
+
*/
|
|
80267
|
+
/**
|
|
80268
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
80269
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
80270
|
+
* halts it.
|
|
80271
|
+
*
|
|
80272
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
80273
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
80274
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
80275
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
80276
|
+
*
|
|
80277
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
80278
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
80279
|
+
*/
|
|
80280
|
+
var NavigationMoveCommandSchema = object({
|
|
80281
|
+
pan: number().min(-1).max(1).optional(),
|
|
80282
|
+
tilt: number().min(-1).max(1).optional(),
|
|
80283
|
+
speed: number().min(0).max(1).optional()
|
|
80284
|
+
});
|
|
80285
|
+
/**
|
|
80286
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
80287
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
80288
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
80289
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
80290
|
+
*/
|
|
80291
|
+
var NavigationActionIdSchema = _enum([
|
|
80292
|
+
"goHome",
|
|
80293
|
+
"locate",
|
|
80294
|
+
"spotClean",
|
|
80295
|
+
"findPet",
|
|
80296
|
+
"personFollow",
|
|
80297
|
+
"stop",
|
|
80298
|
+
"startClean",
|
|
80299
|
+
"pauseClean",
|
|
80300
|
+
"dockWash",
|
|
80301
|
+
"autoEmpty",
|
|
80302
|
+
"flashOn",
|
|
80303
|
+
"flashOff"
|
|
80304
|
+
]);
|
|
80305
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
80306
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
80307
|
+
/**
|
|
80308
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
80309
|
+
* native panel and the PTZ mimic render as a button.
|
|
80310
|
+
*
|
|
80311
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
80312
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
80313
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
80314
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
80315
|
+
* - `label` — operator-facing English label.
|
|
80316
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
80317
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
80318
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
80319
|
+
* flips it from config, never by editing code.
|
|
80320
|
+
*/
|
|
80321
|
+
var NavigationActionEntrySchema = object({
|
|
80322
|
+
id: string(),
|
|
80323
|
+
kind: NavigationEntryKindSchema,
|
|
80324
|
+
label: string(),
|
|
80325
|
+
icon: string(),
|
|
80326
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
80327
|
+
soundId: number().int().optional(),
|
|
80328
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
80329
|
+
enabled: boolean()
|
|
80330
|
+
});
|
|
80331
|
+
/**
|
|
80332
|
+
* Canonical dictionary of every navigation control (discrete actions + sounds)
|
|
80333
|
+
* with its default label + icon hint. A provider filters this to the subset a
|
|
80334
|
+
* device supports (and may override a label). Exported so the provider AND the
|
|
80335
|
+
* UI share ONE list instead of re-deriving labels / ids independently.
|
|
80336
|
+
*
|
|
80337
|
+
* Icons are lucide-style hints; the viewer maps them to its own icon set. Every
|
|
80338
|
+
* catalog default is `enabled: true`; a provider overrides per-device from
|
|
80339
|
+
* config (data-driven — enabling / disabling one later is a config change, not a
|
|
80340
|
+
* code change).
|
|
80341
|
+
*/
|
|
80342
|
+
var NAVIGATION_ACTION_CATALOG = [
|
|
80343
|
+
{
|
|
80344
|
+
id: "startClean",
|
|
80345
|
+
kind: "action",
|
|
80346
|
+
label: "Start cleaning",
|
|
80347
|
+
icon: "play",
|
|
80348
|
+
enabled: true
|
|
80349
|
+
},
|
|
80350
|
+
{
|
|
80351
|
+
id: "pauseClean",
|
|
80352
|
+
kind: "action",
|
|
80353
|
+
label: "Pause cleaning",
|
|
80354
|
+
icon: "pause",
|
|
80355
|
+
enabled: true
|
|
80356
|
+
},
|
|
80357
|
+
{
|
|
80358
|
+
id: "stop",
|
|
80359
|
+
kind: "action",
|
|
80360
|
+
label: "Stop",
|
|
80361
|
+
icon: "hand",
|
|
80362
|
+
enabled: true
|
|
80363
|
+
},
|
|
80364
|
+
{
|
|
80365
|
+
id: "goHome",
|
|
80366
|
+
kind: "action",
|
|
80367
|
+
label: "Return to dock",
|
|
80368
|
+
icon: "home",
|
|
80369
|
+
enabled: true
|
|
80370
|
+
},
|
|
80371
|
+
{
|
|
80372
|
+
id: "locate",
|
|
80373
|
+
kind: "action",
|
|
80374
|
+
label: "Locate",
|
|
80375
|
+
icon: "bell",
|
|
80376
|
+
enabled: true
|
|
80377
|
+
},
|
|
80378
|
+
{
|
|
80379
|
+
id: "spotClean",
|
|
80380
|
+
kind: "action",
|
|
80381
|
+
label: "Spot clean here",
|
|
80382
|
+
icon: "crosshair",
|
|
80383
|
+
enabled: true
|
|
80384
|
+
},
|
|
80385
|
+
{
|
|
80386
|
+
id: "findPet",
|
|
80387
|
+
kind: "action",
|
|
80388
|
+
label: "Find pet",
|
|
80389
|
+
icon: "paw-print",
|
|
80390
|
+
enabled: true
|
|
80391
|
+
},
|
|
80392
|
+
{
|
|
80393
|
+
id: "personFollow",
|
|
80394
|
+
kind: "action",
|
|
80395
|
+
label: "Follow me",
|
|
80396
|
+
icon: "footprints",
|
|
80397
|
+
enabled: true
|
|
80398
|
+
},
|
|
80399
|
+
{
|
|
80400
|
+
id: "dockWash",
|
|
80401
|
+
kind: "action",
|
|
80402
|
+
label: "Wash mop",
|
|
80403
|
+
icon: "droplets",
|
|
80404
|
+
enabled: true
|
|
80405
|
+
},
|
|
80406
|
+
{
|
|
80407
|
+
id: "autoEmpty",
|
|
80408
|
+
kind: "action",
|
|
80409
|
+
label: "Empty dustbin",
|
|
80410
|
+
icon: "trash-2",
|
|
80411
|
+
enabled: true
|
|
80412
|
+
},
|
|
80413
|
+
{
|
|
80414
|
+
id: "flashOn",
|
|
80415
|
+
kind: "action",
|
|
80416
|
+
label: "Flash on",
|
|
80417
|
+
icon: "flashlight",
|
|
80418
|
+
enabled: true
|
|
80419
|
+
},
|
|
80420
|
+
{
|
|
80421
|
+
id: "flashOff",
|
|
80422
|
+
kind: "action",
|
|
80423
|
+
label: "Flash off",
|
|
80424
|
+
icon: "flashlight-off",
|
|
80425
|
+
enabled: true
|
|
80426
|
+
},
|
|
80427
|
+
{
|
|
80428
|
+
id: "sound:meow",
|
|
80429
|
+
kind: "sound",
|
|
80430
|
+
label: "Meow",
|
|
80431
|
+
icon: "cat",
|
|
80432
|
+
soundId: 684,
|
|
80433
|
+
enabled: true
|
|
80434
|
+
},
|
|
80435
|
+
{
|
|
80436
|
+
id: "sound:bark",
|
|
80437
|
+
kind: "sound",
|
|
80438
|
+
label: "Woof",
|
|
80439
|
+
icon: "dog",
|
|
80440
|
+
soundId: 685,
|
|
80441
|
+
enabled: true
|
|
80442
|
+
},
|
|
80443
|
+
{
|
|
80444
|
+
id: "sound:footsteps",
|
|
80445
|
+
kind: "sound",
|
|
80446
|
+
label: "Footsteps",
|
|
80447
|
+
icon: "footprints",
|
|
80448
|
+
soundId: 686,
|
|
80449
|
+
enabled: true
|
|
80450
|
+
},
|
|
80451
|
+
{
|
|
80452
|
+
id: "sound:purring",
|
|
80453
|
+
kind: "sound",
|
|
80454
|
+
label: "Purring",
|
|
80455
|
+
icon: "cat",
|
|
80456
|
+
soundId: 687,
|
|
80457
|
+
enabled: true
|
|
80458
|
+
},
|
|
80459
|
+
{
|
|
80460
|
+
id: "sound:tickTock",
|
|
80461
|
+
kind: "sound",
|
|
80462
|
+
label: "Tick-tock",
|
|
80463
|
+
icon: "clock",
|
|
80464
|
+
soundId: 688,
|
|
80465
|
+
enabled: true
|
|
80466
|
+
}
|
|
80467
|
+
];
|
|
80468
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
80469
|
+
var NavigationPointSchema = object({
|
|
80470
|
+
x: number(),
|
|
80471
|
+
y: number()
|
|
80472
|
+
});
|
|
80473
|
+
/**
|
|
80474
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
80475
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
80476
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
80477
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
80478
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
80479
|
+
* that are not dictionary entries.
|
|
80480
|
+
*
|
|
80481
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
80482
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
80483
|
+
* map-coordinate plumbing is wired.
|
|
80484
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
80485
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
80486
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
80487
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
80488
|
+
* camera-service control; needs an active stream).
|
|
80489
|
+
*/
|
|
80490
|
+
var NavigationFeaturesSchema = object({
|
|
80491
|
+
move: boolean(),
|
|
80492
|
+
stop: boolean(),
|
|
80493
|
+
goToPoint: boolean(),
|
|
80494
|
+
runAction: boolean(),
|
|
80495
|
+
playSound: boolean(),
|
|
80496
|
+
light: boolean(),
|
|
80497
|
+
lightMode: boolean()
|
|
80498
|
+
});
|
|
80499
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
80500
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
80501
|
+
/**
|
|
80502
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
80503
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
80504
|
+
* - `following` — person/pet follow is currently armed.
|
|
80505
|
+
* - `flash` — the on-camera fill light is on.
|
|
80506
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
80507
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
80508
|
+
* `lightMode === 'manual'`.
|
|
80509
|
+
*/
|
|
80510
|
+
var NavigationStatusSchema = object({
|
|
80511
|
+
mode: _enum([
|
|
80512
|
+
"idle",
|
|
80513
|
+
"cleaning",
|
|
80514
|
+
"spot",
|
|
80515
|
+
"following",
|
|
80516
|
+
"goto",
|
|
80517
|
+
"returning",
|
|
80518
|
+
"paused",
|
|
80519
|
+
"unknown"
|
|
80520
|
+
]),
|
|
80521
|
+
following: boolean(),
|
|
80522
|
+
flash: boolean(),
|
|
80523
|
+
lightMode: NavigationLightModeSchema,
|
|
80524
|
+
lightLevel: number().min(40).max(100),
|
|
80525
|
+
/** Ms epoch when the slice was last updated. */
|
|
80526
|
+
lastChangedAt: number()
|
|
80527
|
+
});
|
|
80528
|
+
/**
|
|
80529
|
+
* Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
|
|
80530
|
+
* observable). Adds `lastFetchedAt` on top of the status shape per the
|
|
80531
|
+
* convention.
|
|
80532
|
+
*/
|
|
80533
|
+
var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
80534
|
+
var navigationCapability = {
|
|
80535
|
+
name: "navigation",
|
|
80536
|
+
scope: "device",
|
|
80537
|
+
deviceNative: true,
|
|
80538
|
+
mode: "singleton",
|
|
80539
|
+
deviceTypes: [DeviceType.Camera],
|
|
80540
|
+
deviceConfig: { ui: {
|
|
80541
|
+
kind: "widget",
|
|
80542
|
+
widgetId: "host/navigation-panel",
|
|
80543
|
+
tab: "navigation",
|
|
80544
|
+
topTab: true,
|
|
80545
|
+
label: "Navigation",
|
|
80546
|
+
order: 0
|
|
80547
|
+
} },
|
|
80548
|
+
methods: {
|
|
80549
|
+
/**
|
|
80550
|
+
* Momentary drive nudge (the robot moves). `protected` — mirrors
|
|
80551
|
+
* `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
|
|
80552
|
+
* path) works for any authenticated user, not admin-only. The UI sends
|
|
80553
|
+
* these at ~1 Hz while a control is held; the provider forwards each one to
|
|
80554
|
+
* a single drive write WITHOUT debouncing.
|
|
80555
|
+
*/
|
|
80556
|
+
move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
|
|
80557
|
+
/** Halt all motion immediately (zero drive vector). */
|
|
80558
|
+
stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
|
|
80559
|
+
/** Send the robot to a point on its live map. */
|
|
80560
|
+
goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
|
|
80561
|
+
/**
|
|
80562
|
+
* Enumerate the discrete controls THIS device supports (data-driven UI +
|
|
80563
|
+
* PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
|
|
80564
|
+
*/
|
|
80565
|
+
listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
|
|
80566
|
+
/**
|
|
80567
|
+
* Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
|
|
80568
|
+
* unsupported action ids are rejected by the provider.
|
|
80569
|
+
*/
|
|
80570
|
+
runAction: method(object({
|
|
80571
|
+
deviceId: number(),
|
|
80572
|
+
actionId: NavigationActionIdSchema
|
|
80573
|
+
}), _void(), { kind: "mutation" }),
|
|
80574
|
+
/** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
|
|
80575
|
+
playSound: method(object({
|
|
80576
|
+
deviceId: number(),
|
|
80577
|
+
soundId: number().int()
|
|
80578
|
+
}), _void(), { kind: "mutation" }),
|
|
80579
|
+
/**
|
|
80580
|
+
* Turn the on-camera fill light on / off (the `OpenFullLight` control —
|
|
80581
|
+
* works anytime, no active stream required).
|
|
80582
|
+
*/
|
|
80583
|
+
setLightOn: method(object({
|
|
80584
|
+
deviceId: number(),
|
|
80585
|
+
on: boolean()
|
|
80586
|
+
}), _void(), { kind: "mutation" }),
|
|
80587
|
+
/**
|
|
80588
|
+
* Set the fill-light mode (auto vs manual). `manual` optionally carries the
|
|
80589
|
+
* initial `level`. The auto/manual + level control is a CAMERA-service
|
|
80590
|
+
* action that generally needs an active camera stream/monitor session — the
|
|
80591
|
+
* UI shows the manual level slider ONLY when `mode === 'manual'`.
|
|
80592
|
+
*/
|
|
80593
|
+
setLightMode: method(object({
|
|
80594
|
+
deviceId: number(),
|
|
80595
|
+
mode: NavigationLightModeSchema,
|
|
80596
|
+
level: number().min(40).max(100).optional()
|
|
80597
|
+
}), _void(), { kind: "mutation" }),
|
|
80598
|
+
/** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
|
|
80599
|
+
setLightLevel: method(object({
|
|
80600
|
+
deviceId: number(),
|
|
80601
|
+
level: number().min(40).max(100)
|
|
80602
|
+
}), _void(), { kind: "mutation" }),
|
|
80603
|
+
/**
|
|
80604
|
+
* Per-device FEATURE-FLAG report for the general primitives — drives which
|
|
80605
|
+
* controls the UI shows (the per-entry flags for the dictionary come back on
|
|
80606
|
+
* `listActions`).
|
|
80607
|
+
*/
|
|
80608
|
+
getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
|
|
80609
|
+
},
|
|
80610
|
+
events: { onStatusChanged: { data: object({
|
|
80611
|
+
deviceId: number(),
|
|
80612
|
+
status: NavigationStatusSchema
|
|
80613
|
+
}) } },
|
|
80614
|
+
status: {
|
|
80615
|
+
schema: NavigationStatusSchema,
|
|
80616
|
+
kind: "push"
|
|
80617
|
+
},
|
|
80618
|
+
/**
|
|
80619
|
+
* Runtime-state slice mirrored by the kernel. The navigation panel watches it
|
|
80620
|
+
* for live mode / follow / flash changes.
|
|
80621
|
+
*/
|
|
80622
|
+
runtimeState: NavigationRuntimeStateSchema,
|
|
80623
|
+
/**
|
|
80624
|
+
* Runtime-state durability: **session** — like `vacuum-control`, a restored
|
|
80625
|
+
* `mode: cleaning` / `following: true` is a robot that is not actually doing
|
|
80626
|
+
* that. The live handle re-publishes on connect.
|
|
80627
|
+
*
|
|
80628
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
80629
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
80630
|
+
*/
|
|
80631
|
+
durability: "session"
|
|
80632
|
+
};
|
|
80633
|
+
/**
|
|
80634
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
80635
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
80636
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
80637
|
+
* one Home Assistant projection.
|
|
80638
|
+
*/
|
|
80639
|
+
var NetworkLinkStatusSchema = object({
|
|
80640
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
80641
|
+
type: _enum([
|
|
80642
|
+
"wifi",
|
|
80643
|
+
"ethernet",
|
|
80644
|
+
"cellular",
|
|
80645
|
+
"unknown"
|
|
80646
|
+
]),
|
|
80647
|
+
/**
|
|
80648
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
80649
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
80650
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
80651
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
80652
|
+
* SKIP a null rather than coerce it.
|
|
80653
|
+
*/
|
|
80654
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
80655
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
80656
|
+
rssiDbm: number().optional(),
|
|
80657
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
80658
|
+
ssid: string().optional(),
|
|
80659
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
80660
|
+
lastUpdated: number()
|
|
80661
|
+
});
|
|
80662
|
+
/** The slice a provider seeds before its first read: nothing is known yet. */
|
|
80663
|
+
var NETWORK_LINK_UNKNOWN = {
|
|
80664
|
+
type: "unknown",
|
|
80665
|
+
signalPercent: null,
|
|
80666
|
+
lastUpdated: 0
|
|
80667
|
+
};
|
|
80668
|
+
/**
|
|
80669
|
+
* Normalise a signal the firmware reports as BARS (0..`maxBars`) to 0..100.
|
|
80670
|
+
* Out-of-range or non-finite input is not a reading: `null`.
|
|
80671
|
+
*/
|
|
80672
|
+
function signalPercentFromBars(bars, maxBars) {
|
|
80673
|
+
if (bars === void 0 || !Number.isFinite(bars) || maxBars <= 0) return null;
|
|
80674
|
+
if (bars < 0 || bars > maxBars) return null;
|
|
80675
|
+
return Math.round(bars / maxBars * 100);
|
|
80676
|
+
}
|
|
80677
|
+
var networkLinkCapability = {
|
|
80678
|
+
name: "network-link",
|
|
80679
|
+
scope: "device",
|
|
80680
|
+
deviceNative: true,
|
|
80681
|
+
mode: "singleton",
|
|
80682
|
+
deviceTypes: [
|
|
80683
|
+
DeviceType.Camera,
|
|
80684
|
+
DeviceType.Sensor,
|
|
80685
|
+
DeviceType.Button,
|
|
80686
|
+
DeviceType.Switch,
|
|
80687
|
+
DeviceType.Light,
|
|
80688
|
+
DeviceType.Lock,
|
|
80689
|
+
DeviceType.Siren
|
|
80690
|
+
],
|
|
80691
|
+
methods: {},
|
|
80692
|
+
events: {
|
|
80693
|
+
/**
|
|
80694
|
+
* Emitted whenever the cached status changes (a link switch, a signal
|
|
80695
|
+
* reading that moved). Mirrored on the parent chain by the
|
|
80696
|
+
* DeviceEventPropagator like `battery.onStatusChanged`.
|
|
80697
|
+
*/
|
|
80698
|
+
onStatusChanged: { data: object({
|
|
80699
|
+
deviceId: number(),
|
|
80700
|
+
status: NetworkLinkStatusSchema
|
|
80701
|
+
}) } },
|
|
80702
|
+
status: {
|
|
80703
|
+
schema: NetworkLinkStatusSchema,
|
|
80704
|
+
kind: "push",
|
|
80705
|
+
empty: NETWORK_LINK_UNKNOWN
|
|
80706
|
+
},
|
|
80707
|
+
/**
|
|
80708
|
+
* Runtime-state slice — every provider stores the same shape under
|
|
80709
|
+
* `device.runtimeState['network-link']`, read once by the badge and the
|
|
80710
|
+
* Home Assistant projector regardless of the driver.
|
|
80711
|
+
*/
|
|
80712
|
+
runtimeState: NetworkLinkStatusSchema,
|
|
80713
|
+
/**
|
|
80714
|
+
* Runtime-state durability: **restored** — a link reading is slow to
|
|
80715
|
+
* change and a sleeping battery camera may not report for hours; the
|
|
80716
|
+
* restored slice is what the badge shows until the next read.
|
|
80717
|
+
*
|
|
80718
|
+
* See `RuntimeStateDurability`. Enforced by
|
|
80719
|
+
* `scripts/check-runtime-state-durability.ts`.
|
|
80720
|
+
*/
|
|
80721
|
+
durability: "restored",
|
|
80722
|
+
/** Clock fields: written, but excluded from the compare that decides
|
|
80723
|
+
* whether persisting is worth a SQLite commit. */
|
|
80724
|
+
volatileStateFields: ["lastUpdated"]
|
|
80725
|
+
};
|
|
80726
|
+
/**
|
|
80186
80727
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
80187
80728
|
* jitter, and observed/peak bandwidth per device + per client.
|
|
80188
80729
|
*
|
|
@@ -81763,424 +82304,6 @@ var ptzAutotrackCapability = {
|
|
|
81763
82304
|
*/
|
|
81764
82305
|
durability: "session"
|
|
81765
82306
|
};
|
|
81766
|
-
/**
|
|
81767
|
-
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
81768
|
-
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
81769
|
-
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
81770
|
-
*
|
|
81771
|
-
* Why a NEW cap rather than overloading `ptz`:
|
|
81772
|
-
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
81773
|
-
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
81774
|
-
* The two are different physical models: PTZ is absolute-position + presets,
|
|
81775
|
-
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
81776
|
-
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
81777
|
-
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
81778
|
-
* the reverse:
|
|
81779
|
-
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
81780
|
-
* / `getOptions`), and
|
|
81781
|
-
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
81782
|
-
* robot camera shows up in the existing PTZ control path without every
|
|
81783
|
-
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
81784
|
-
* not here (see the addon design note):
|
|
81785
|
-
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
81786
|
-
* ptz.stop() → navigation.stop()
|
|
81787
|
-
* ptz.goHome() → navigation.runAction('goHome')
|
|
81788
|
-
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
81789
|
-
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
81790
|
-
*
|
|
81791
|
-
* ## Continuous drive
|
|
81792
|
-
*
|
|
81793
|
-
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
81794
|
-
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
81795
|
-
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
81796
|
-
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
81797
|
-
* coalesce them. The UI owns the cadence.
|
|
81798
|
-
*
|
|
81799
|
-
* ## The action dictionary
|
|
81800
|
-
*
|
|
81801
|
-
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
81802
|
-
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
81803
|
-
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
81804
|
-
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
81805
|
-
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
81806
|
-
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
81807
|
-
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
81808
|
-
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
81809
|
-
*
|
|
81810
|
-
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
81811
|
-
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
81812
|
-
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
81813
|
-
* every device handle. A future nodedreame publish adds a typed
|
|
81814
|
-
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
81815
|
-
* provider can then swap the raw calls for the typed methods with no change to
|
|
81816
|
-
* THIS contract.
|
|
81817
|
-
*/
|
|
81818
|
-
/**
|
|
81819
|
-
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
81820
|
-
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
81821
|
-
* halts it.
|
|
81822
|
-
*
|
|
81823
|
-
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
81824
|
-
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
81825
|
-
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
81826
|
-
* vector by it (drivers without proportional drive ignore it).
|
|
81827
|
-
*
|
|
81828
|
-
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
81829
|
-
* axis alone; an all-undefined nudge is a no-op.
|
|
81830
|
-
*/
|
|
81831
|
-
var NavigationMoveCommandSchema = object({
|
|
81832
|
-
pan: number().min(-1).max(1).optional(),
|
|
81833
|
-
tilt: number().min(-1).max(1).optional(),
|
|
81834
|
-
speed: number().min(0).max(1).optional()
|
|
81835
|
-
});
|
|
81836
|
-
/**
|
|
81837
|
-
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
81838
|
-
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
81839
|
-
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
81840
|
-
* `playSound` (see the `sound` dictionary entries).
|
|
81841
|
-
*/
|
|
81842
|
-
var NavigationActionIdSchema = _enum([
|
|
81843
|
-
"goHome",
|
|
81844
|
-
"locate",
|
|
81845
|
-
"spotClean",
|
|
81846
|
-
"findPet",
|
|
81847
|
-
"personFollow",
|
|
81848
|
-
"stop",
|
|
81849
|
-
"startClean",
|
|
81850
|
-
"pauseClean",
|
|
81851
|
-
"dockWash",
|
|
81852
|
-
"autoEmpty",
|
|
81853
|
-
"flashOn",
|
|
81854
|
-
"flashOff"
|
|
81855
|
-
]);
|
|
81856
|
-
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
81857
|
-
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
81858
|
-
/**
|
|
81859
|
-
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
81860
|
-
* native panel and the PTZ mimic render as a button.
|
|
81861
|
-
*
|
|
81862
|
-
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
81863
|
-
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
81864
|
-
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
81865
|
-
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
81866
|
-
* - `label` — operator-facing English label.
|
|
81867
|
-
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
81868
|
-
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
81869
|
-
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
81870
|
-
* flips it from config, never by editing code.
|
|
81871
|
-
*/
|
|
81872
|
-
var NavigationActionEntrySchema = object({
|
|
81873
|
-
id: string(),
|
|
81874
|
-
kind: NavigationEntryKindSchema,
|
|
81875
|
-
label: string(),
|
|
81876
|
-
icon: string(),
|
|
81877
|
-
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
81878
|
-
soundId: number().int().optional(),
|
|
81879
|
-
/** Per-device feature flag — render this entry only when true. */
|
|
81880
|
-
enabled: boolean()
|
|
81881
|
-
});
|
|
81882
|
-
/**
|
|
81883
|
-
* Canonical dictionary of every navigation control (discrete actions + sounds)
|
|
81884
|
-
* with its default label + icon hint. A provider filters this to the subset a
|
|
81885
|
-
* device supports (and may override a label). Exported so the provider AND the
|
|
81886
|
-
* UI share ONE list instead of re-deriving labels / ids independently.
|
|
81887
|
-
*
|
|
81888
|
-
* Icons are lucide-style hints; the viewer maps them to its own icon set. Every
|
|
81889
|
-
* catalog default is `enabled: true`; a provider overrides per-device from
|
|
81890
|
-
* config (data-driven — enabling / disabling one later is a config change, not a
|
|
81891
|
-
* code change).
|
|
81892
|
-
*/
|
|
81893
|
-
var NAVIGATION_ACTION_CATALOG = [
|
|
81894
|
-
{
|
|
81895
|
-
id: "startClean",
|
|
81896
|
-
kind: "action",
|
|
81897
|
-
label: "Start cleaning",
|
|
81898
|
-
icon: "play",
|
|
81899
|
-
enabled: true
|
|
81900
|
-
},
|
|
81901
|
-
{
|
|
81902
|
-
id: "pauseClean",
|
|
81903
|
-
kind: "action",
|
|
81904
|
-
label: "Pause cleaning",
|
|
81905
|
-
icon: "pause",
|
|
81906
|
-
enabled: true
|
|
81907
|
-
},
|
|
81908
|
-
{
|
|
81909
|
-
id: "stop",
|
|
81910
|
-
kind: "action",
|
|
81911
|
-
label: "Stop",
|
|
81912
|
-
icon: "hand",
|
|
81913
|
-
enabled: true
|
|
81914
|
-
},
|
|
81915
|
-
{
|
|
81916
|
-
id: "goHome",
|
|
81917
|
-
kind: "action",
|
|
81918
|
-
label: "Return to dock",
|
|
81919
|
-
icon: "home",
|
|
81920
|
-
enabled: true
|
|
81921
|
-
},
|
|
81922
|
-
{
|
|
81923
|
-
id: "locate",
|
|
81924
|
-
kind: "action",
|
|
81925
|
-
label: "Locate",
|
|
81926
|
-
icon: "bell",
|
|
81927
|
-
enabled: true
|
|
81928
|
-
},
|
|
81929
|
-
{
|
|
81930
|
-
id: "spotClean",
|
|
81931
|
-
kind: "action",
|
|
81932
|
-
label: "Spot clean here",
|
|
81933
|
-
icon: "crosshair",
|
|
81934
|
-
enabled: true
|
|
81935
|
-
},
|
|
81936
|
-
{
|
|
81937
|
-
id: "findPet",
|
|
81938
|
-
kind: "action",
|
|
81939
|
-
label: "Find pet",
|
|
81940
|
-
icon: "paw-print",
|
|
81941
|
-
enabled: true
|
|
81942
|
-
},
|
|
81943
|
-
{
|
|
81944
|
-
id: "personFollow",
|
|
81945
|
-
kind: "action",
|
|
81946
|
-
label: "Follow me",
|
|
81947
|
-
icon: "footprints",
|
|
81948
|
-
enabled: true
|
|
81949
|
-
},
|
|
81950
|
-
{
|
|
81951
|
-
id: "dockWash",
|
|
81952
|
-
kind: "action",
|
|
81953
|
-
label: "Wash mop",
|
|
81954
|
-
icon: "droplets",
|
|
81955
|
-
enabled: true
|
|
81956
|
-
},
|
|
81957
|
-
{
|
|
81958
|
-
id: "autoEmpty",
|
|
81959
|
-
kind: "action",
|
|
81960
|
-
label: "Empty dustbin",
|
|
81961
|
-
icon: "trash-2",
|
|
81962
|
-
enabled: true
|
|
81963
|
-
},
|
|
81964
|
-
{
|
|
81965
|
-
id: "flashOn",
|
|
81966
|
-
kind: "action",
|
|
81967
|
-
label: "Flash on",
|
|
81968
|
-
icon: "flashlight",
|
|
81969
|
-
enabled: true
|
|
81970
|
-
},
|
|
81971
|
-
{
|
|
81972
|
-
id: "flashOff",
|
|
81973
|
-
kind: "action",
|
|
81974
|
-
label: "Flash off",
|
|
81975
|
-
icon: "flashlight-off",
|
|
81976
|
-
enabled: true
|
|
81977
|
-
},
|
|
81978
|
-
{
|
|
81979
|
-
id: "sound:meow",
|
|
81980
|
-
kind: "sound",
|
|
81981
|
-
label: "Meow",
|
|
81982
|
-
icon: "cat",
|
|
81983
|
-
soundId: 684,
|
|
81984
|
-
enabled: true
|
|
81985
|
-
},
|
|
81986
|
-
{
|
|
81987
|
-
id: "sound:bark",
|
|
81988
|
-
kind: "sound",
|
|
81989
|
-
label: "Woof",
|
|
81990
|
-
icon: "dog",
|
|
81991
|
-
soundId: 685,
|
|
81992
|
-
enabled: true
|
|
81993
|
-
},
|
|
81994
|
-
{
|
|
81995
|
-
id: "sound:footsteps",
|
|
81996
|
-
kind: "sound",
|
|
81997
|
-
label: "Footsteps",
|
|
81998
|
-
icon: "footprints",
|
|
81999
|
-
soundId: 686,
|
|
82000
|
-
enabled: true
|
|
82001
|
-
},
|
|
82002
|
-
{
|
|
82003
|
-
id: "sound:purring",
|
|
82004
|
-
kind: "sound",
|
|
82005
|
-
label: "Purring",
|
|
82006
|
-
icon: "cat",
|
|
82007
|
-
soundId: 687,
|
|
82008
|
-
enabled: true
|
|
82009
|
-
},
|
|
82010
|
-
{
|
|
82011
|
-
id: "sound:tickTock",
|
|
82012
|
-
kind: "sound",
|
|
82013
|
-
label: "Tick-tock",
|
|
82014
|
-
icon: "clock",
|
|
82015
|
-
soundId: 688,
|
|
82016
|
-
enabled: true
|
|
82017
|
-
}
|
|
82018
|
-
];
|
|
82019
|
-
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
82020
|
-
var NavigationPointSchema = object({
|
|
82021
|
-
x: number(),
|
|
82022
|
-
y: number()
|
|
82023
|
-
});
|
|
82024
|
-
/**
|
|
82025
|
-
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
82026
|
-
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
82027
|
-
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
82028
|
-
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
82029
|
-
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
82030
|
-
* that are not dictionary entries.
|
|
82031
|
-
*
|
|
82032
|
-
* - `move` / `stop` — the momentary drive joystick.
|
|
82033
|
-
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
82034
|
-
* map-coordinate plumbing is wired.
|
|
82035
|
-
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
82036
|
-
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
82037
|
-
* - `light` — the on/off fill-light toggle (works anytime).
|
|
82038
|
-
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
82039
|
-
* camera-service control; needs an active stream).
|
|
82040
|
-
*/
|
|
82041
|
-
var NavigationFeaturesSchema = object({
|
|
82042
|
-
move: boolean(),
|
|
82043
|
-
stop: boolean(),
|
|
82044
|
-
goToPoint: boolean(),
|
|
82045
|
-
runAction: boolean(),
|
|
82046
|
-
playSound: boolean(),
|
|
82047
|
-
light: boolean(),
|
|
82048
|
-
lightMode: boolean()
|
|
82049
|
-
});
|
|
82050
|
-
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
82051
|
-
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
82052
|
-
/**
|
|
82053
|
-
* Live navigation state so the UI can reflect what the robot is doing:
|
|
82054
|
-
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
82055
|
-
* - `following` — person/pet follow is currently armed.
|
|
82056
|
-
* - `flash` — the on-camera fill light is on.
|
|
82057
|
-
* - `lightMode` — auto vs manual fill-light mode.
|
|
82058
|
-
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
82059
|
-
* `lightMode === 'manual'`.
|
|
82060
|
-
*/
|
|
82061
|
-
var NavigationStatusSchema = object({
|
|
82062
|
-
mode: _enum([
|
|
82063
|
-
"idle",
|
|
82064
|
-
"cleaning",
|
|
82065
|
-
"spot",
|
|
82066
|
-
"following",
|
|
82067
|
-
"goto",
|
|
82068
|
-
"returning",
|
|
82069
|
-
"paused",
|
|
82070
|
-
"unknown"
|
|
82071
|
-
]),
|
|
82072
|
-
following: boolean(),
|
|
82073
|
-
flash: boolean(),
|
|
82074
|
-
lightMode: NavigationLightModeSchema,
|
|
82075
|
-
lightLevel: number().min(40).max(100),
|
|
82076
|
-
/** Ms epoch when the slice was last updated. */
|
|
82077
|
-
lastChangedAt: number()
|
|
82078
|
-
});
|
|
82079
|
-
/**
|
|
82080
|
-
* Runtime-state slice owned by this cap (kernel-managed: validated, mirrored,
|
|
82081
|
-
* observable). Adds `lastFetchedAt` on top of the status shape per the
|
|
82082
|
-
* convention.
|
|
82083
|
-
*/
|
|
82084
|
-
var NavigationRuntimeStateSchema = NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
82085
|
-
var navigationCapability = {
|
|
82086
|
-
name: "navigation",
|
|
82087
|
-
scope: "device",
|
|
82088
|
-
deviceNative: true,
|
|
82089
|
-
mode: "singleton",
|
|
82090
|
-
deviceTypes: [DeviceType.Camera],
|
|
82091
|
-
deviceConfig: { ui: {
|
|
82092
|
-
kind: "widget",
|
|
82093
|
-
widgetId: "host/navigation-panel",
|
|
82094
|
-
tab: "navigation",
|
|
82095
|
-
topTab: true,
|
|
82096
|
-
label: "Navigation",
|
|
82097
|
-
order: 0
|
|
82098
|
-
} },
|
|
82099
|
-
methods: {
|
|
82100
|
-
/**
|
|
82101
|
-
* Momentary drive nudge (the robot moves). `protected` — mirrors
|
|
82102
|
-
* `ptz.continuousMove` so the Viewer navigation panel (and the PTZ-mimic
|
|
82103
|
-
* path) works for any authenticated user, not admin-only. The UI sends
|
|
82104
|
-
* these at ~1 Hz while a control is held; the provider forwards each one to
|
|
82105
|
-
* a single drive write WITHOUT debouncing.
|
|
82106
|
-
*/
|
|
82107
|
-
move: method(NavigationMoveCommandSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
|
|
82108
|
-
/** Halt all motion immediately (zero drive vector). */
|
|
82109
|
-
stop: method(object({ deviceId: number() }), _void(), { kind: "mutation" }),
|
|
82110
|
-
/** Send the robot to a point on its live map. */
|
|
82111
|
-
goToPoint: method(NavigationPointSchema.extend({ deviceId: number() }), _void(), { kind: "mutation" }),
|
|
82112
|
-
/**
|
|
82113
|
-
* Enumerate the discrete controls THIS device supports (data-driven UI +
|
|
82114
|
-
* PTZ mimic). Camera-probed subset of {@link NAVIGATION_ACTION_CATALOG}.
|
|
82115
|
-
*/
|
|
82116
|
-
listActions: method(object({ deviceId: number() }), array(NavigationActionEntrySchema)),
|
|
82117
|
-
/**
|
|
82118
|
-
* Run one discrete action (a `kind:'action'` dictionary entry). Invalid /
|
|
82119
|
-
* unsupported action ids are rejected by the provider.
|
|
82120
|
-
*/
|
|
82121
|
-
runAction: method(object({
|
|
82122
|
-
deviceId: number(),
|
|
82123
|
-
actionId: NavigationActionIdSchema
|
|
82124
|
-
}), _void(), { kind: "mutation" }),
|
|
82125
|
-
/** Play a sound by its wire id (the `soundId` of a `kind:'sound'` entry). */
|
|
82126
|
-
playSound: method(object({
|
|
82127
|
-
deviceId: number(),
|
|
82128
|
-
soundId: number().int()
|
|
82129
|
-
}), _void(), { kind: "mutation" }),
|
|
82130
|
-
/**
|
|
82131
|
-
* Turn the on-camera fill light on / off (the `OpenFullLight` control —
|
|
82132
|
-
* works anytime, no active stream required).
|
|
82133
|
-
*/
|
|
82134
|
-
setLightOn: method(object({
|
|
82135
|
-
deviceId: number(),
|
|
82136
|
-
on: boolean()
|
|
82137
|
-
}), _void(), { kind: "mutation" }),
|
|
82138
|
-
/**
|
|
82139
|
-
* Set the fill-light mode (auto vs manual). `manual` optionally carries the
|
|
82140
|
-
* initial `level`. The auto/manual + level control is a CAMERA-service
|
|
82141
|
-
* action that generally needs an active camera stream/monitor session — the
|
|
82142
|
-
* UI shows the manual level slider ONLY when `mode === 'manual'`.
|
|
82143
|
-
*/
|
|
82144
|
-
setLightMode: method(object({
|
|
82145
|
-
deviceId: number(),
|
|
82146
|
-
mode: NavigationLightModeSchema,
|
|
82147
|
-
level: number().min(40).max(100).optional()
|
|
82148
|
-
}), _void(), { kind: "mutation" }),
|
|
82149
|
-
/** Set the MANUAL fill-light level (40..100). Implies `manual` mode. */
|
|
82150
|
-
setLightLevel: method(object({
|
|
82151
|
-
deviceId: number(),
|
|
82152
|
-
level: number().min(40).max(100)
|
|
82153
|
-
}), _void(), { kind: "mutation" }),
|
|
82154
|
-
/**
|
|
82155
|
-
* Per-device FEATURE-FLAG report for the general primitives — drives which
|
|
82156
|
-
* controls the UI shows (the per-entry flags for the dictionary come back on
|
|
82157
|
-
* `listActions`).
|
|
82158
|
-
*/
|
|
82159
|
-
getFeatures: method(object({ deviceId: number() }), NavigationFeaturesSchema)
|
|
82160
|
-
},
|
|
82161
|
-
events: { onStatusChanged: { data: object({
|
|
82162
|
-
deviceId: number(),
|
|
82163
|
-
status: NavigationStatusSchema
|
|
82164
|
-
}) } },
|
|
82165
|
-
status: {
|
|
82166
|
-
schema: NavigationStatusSchema,
|
|
82167
|
-
kind: "push"
|
|
82168
|
-
},
|
|
82169
|
-
/**
|
|
82170
|
-
* Runtime-state slice mirrored by the kernel. The navigation panel watches it
|
|
82171
|
-
* for live mode / follow / flash changes.
|
|
82172
|
-
*/
|
|
82173
|
-
runtimeState: NavigationRuntimeStateSchema,
|
|
82174
|
-
/**
|
|
82175
|
-
* Runtime-state durability: **session** — like `vacuum-control`, a restored
|
|
82176
|
-
* `mode: cleaning` / `following: true` is a robot that is not actually doing
|
|
82177
|
-
* that. The live handle re-publishes on connect.
|
|
82178
|
-
*
|
|
82179
|
-
* See `RuntimeStateDurability`. Enforced by
|
|
82180
|
-
* `scripts/check-runtime-state-durability.ts`.
|
|
82181
|
-
*/
|
|
82182
|
-
durability: "session"
|
|
82183
|
-
};
|
|
82184
82307
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
82185
82308
|
kind: "mutation",
|
|
82186
82309
|
auth: "admin"
|
|
@@ -91643,6 +91766,12 @@ Object.freeze({
|
|
|
91643
91766
|
addonId: null,
|
|
91644
91767
|
access: "view"
|
|
91645
91768
|
},
|
|
91769
|
+
"storage.listDrainProgress": {
|
|
91770
|
+
capName: "storage",
|
|
91771
|
+
capScope: "system",
|
|
91772
|
+
addonId: null,
|
|
91773
|
+
access: "view"
|
|
91774
|
+
},
|
|
91646
91775
|
"storage.listLocationDeclarations": {
|
|
91647
91776
|
capName: "storage",
|
|
91648
91777
|
capScope: "system",
|
|
@@ -91787,6 +91916,12 @@ Object.freeze({
|
|
|
91787
91916
|
addonId: null,
|
|
91788
91917
|
access: "view"
|
|
91789
91918
|
},
|
|
91919
|
+
"storageOccupancy.getOccupancy": {
|
|
91920
|
+
capName: "storage-occupancy",
|
|
91921
|
+
capScope: "system",
|
|
91922
|
+
addonId: null,
|
|
91923
|
+
access: "view"
|
|
91924
|
+
},
|
|
91790
91925
|
"storageProvider.abortUpload": {
|
|
91791
91926
|
capName: "storage-provider",
|
|
91792
91927
|
capScope: "system",
|