@camstack/addon-smtp-nodemailer 1.2.78 → 1.2.79
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/smtp.addon.js +367 -232
- package/dist/smtp.addon.mjs +367 -232
- package/package.json +1 -1
package/dist/smtp.addon.mjs
CHANGED
|
@@ -34,7 +34,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
34
34
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
36
36
|
//#endregion
|
|
37
|
-
//#region ../types/dist/event-category-
|
|
37
|
+
//#region ../types/dist/event-category-CnLqLOKs.mjs
|
|
38
38
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
39
39
|
EventCategory["SystemBoot"] = "system.boot";
|
|
40
40
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -229,6 +229,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
229
229
|
EventCategory["ProcessCrashed"] = "process.crashed";
|
|
230
230
|
EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
|
|
231
231
|
EventCategory["ProcessRestarted"] = "process.restarted";
|
|
232
|
+
/**
|
|
233
|
+
* The SET of storage locations changed — one was created, edited, enabled,
|
|
234
|
+
* disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
|
|
235
|
+
*
|
|
236
|
+
* Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
|
|
237
|
+
* it must also converge on its own periodic path, because a dropped event
|
|
238
|
+
* must not leave a node writing to yesterday's disk set forever. It exists
|
|
239
|
+
* because there was NO signal at all — an operator who added a second
|
|
240
|
+
* recordings disk in the admin UI got nothing, and the recorder kept its
|
|
241
|
+
* resolved locations until something else happened to re-resolve them
|
|
242
|
+
* (D387). Payload `StorageLocationsChangedPayload`.
|
|
243
|
+
*/
|
|
244
|
+
EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
|
|
232
245
|
EventCategory["RecordingStarted"] = "recording.started";
|
|
233
246
|
EventCategory["RecordingStopped"] = "recording.stopped";
|
|
234
247
|
EventCategory["RecordingError"] = "recording.error";
|
|
@@ -8555,6 +8568,21 @@ var StorageCleanupJobSchema = object({
|
|
|
8555
8568
|
});
|
|
8556
8569
|
var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
|
|
8557
8570
|
/**
|
|
8571
|
+
* The one typed state of a storage location. Authoritative Zod schema — the TS
|
|
8572
|
+
* alias below is `z.infer<>` of it, never a second spelling.
|
|
8573
|
+
*/
|
|
8574
|
+
var StorageLocationModeSchema = _enum([
|
|
8575
|
+
"active",
|
|
8576
|
+
"readonly",
|
|
8577
|
+
"drain",
|
|
8578
|
+
"disabled"
|
|
8579
|
+
]);
|
|
8580
|
+
_enum([
|
|
8581
|
+
"normal",
|
|
8582
|
+
"never",
|
|
8583
|
+
"drain"
|
|
8584
|
+
]);
|
|
8585
|
+
/**
|
|
8558
8586
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8559
8587
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8560
8588
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8620,6 +8648,21 @@ var StorageLocationSchema = object({
|
|
|
8620
8648
|
* stops existing rather than being re-derived on every read.
|
|
8621
8649
|
*/
|
|
8622
8650
|
enabled: boolean().optional(),
|
|
8651
|
+
/**
|
|
8652
|
+
* THE state of this location (D385), and the only authority on what may be
|
|
8653
|
+
* written, read or evicted here. Interpreted in exactly one place —
|
|
8654
|
+
* `storage-location-mode.ts` — which also folds the legacy
|
|
8655
|
+
* `enabled` / `config.readOnly` pair into a mode so an old row is never
|
|
8656
|
+
* ambiguous.
|
|
8657
|
+
*
|
|
8658
|
+
* OPTIONAL only for the wire and for rows written before D385: absence is
|
|
8659
|
+
* resolved by `resolveLocationMode`, and the orchestrator stamps every
|
|
8660
|
+
* unstamped row ONCE at hydrate so absence stops existing rather than being
|
|
8661
|
+
* re-derived on every read. `enabled` survives one release as a DERIVED
|
|
8662
|
+
* mirror (`mode === 'active'`); `withLocationMode` is the only writer of
|
|
8663
|
+
* either, so the two cannot disagree.
|
|
8664
|
+
*/
|
|
8665
|
+
mode: StorageLocationModeSchema.optional(),
|
|
8623
8666
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
8624
8667
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
8625
8668
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -8627,11 +8670,46 @@ var StorageLocationSchema = object({
|
|
|
8627
8670
|
totalBytes: number(),
|
|
8628
8671
|
availableBytes: number()
|
|
8629
8672
|
}).nullable().optional(),
|
|
8673
|
+
/**
|
|
8674
|
+
* How much of that volume CamStack ITSELF holds on this location (D388) —
|
|
8675
|
+
* COMPUTED at read time from the `storage-occupancy` providers' own figures,
|
|
8676
|
+
* never persisted, never a filesystem walk.
|
|
8677
|
+
*
|
|
8678
|
+
* **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
|
|
8679
|
+
* location yet — nobody stores here, the owning addon is down, or the first
|
|
8680
|
+
* refresh has not completed. A UI must omit the segment rather than draw it
|
|
8681
|
+
* at zero, which would claim we occupy nothing (D315). It is an OBJECT and
|
|
8682
|
+
* not a bare number precisely so that a `?? 0` on the consuming side has to
|
|
8683
|
+
* be spelled out loud instead of appearing by accident.
|
|
8684
|
+
*
|
|
8685
|
+
* `measuredAtMs` is the OLDEST contributing measurement, so it is honest
|
|
8686
|
+
* about the whole figure rather than about its freshest part.
|
|
8687
|
+
*/
|
|
8688
|
+
owned: object({
|
|
8689
|
+
bytes: number().int().nonnegative(),
|
|
8690
|
+
measuredAtMs: number().int().nonnegative()
|
|
8691
|
+
}).optional(),
|
|
8630
8692
|
createdAt: number(),
|
|
8631
8693
|
updatedAt: number()
|
|
8632
8694
|
});
|
|
8633
8695
|
object({ isDefault: boolean().optional() });
|
|
8634
8696
|
/**
|
|
8697
|
+
* How far a `drain` has got (D386) — the read a UI renders, and nothing more.
|
|
8698
|
+
*
|
|
8699
|
+
* `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
|
|
8700
|
+
* OBSERVED and is `null` when it has observed none. Never a fabricated date: a
|
|
8701
|
+
* drain with no observed growth has no honest ETA, and inventing one is how an
|
|
8702
|
+
* operator learns not to believe the screen.
|
|
8703
|
+
*/
|
|
8704
|
+
var StorageDrainProgressSchema = object({
|
|
8705
|
+
locationId: string(),
|
|
8706
|
+
startedAtMs: number(),
|
|
8707
|
+
startBytes: number(),
|
|
8708
|
+
bytesRemaining: number(),
|
|
8709
|
+
drained: boolean(),
|
|
8710
|
+
estimatedEmptyAtMs: number().nullable()
|
|
8711
|
+
});
|
|
8712
|
+
/**
|
|
8635
8713
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8636
8714
|
* Either:
|
|
8637
8715
|
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
@@ -21605,7 +21683,7 @@ method(object({
|
|
|
21605
21683
|
}), _void(), {
|
|
21606
21684
|
kind: "mutation",
|
|
21607
21685
|
auth: "admin"
|
|
21608
|
-
}), method(object({ id: string() }), object({
|
|
21686
|
+
}), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
|
|
21609
21687
|
ok: boolean(),
|
|
21610
21688
|
error: string().optional()
|
|
21611
21689
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
@@ -21675,6 +21753,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
21675
21753
|
kind: "mutation",
|
|
21676
21754
|
auth: "admin"
|
|
21677
21755
|
}), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
|
|
21756
|
+
/**
|
|
21757
|
+
* `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
|
|
21758
|
+
* location (D388).
|
|
21759
|
+
*
|
|
21760
|
+
* ## Why this is not `storage-evictable`
|
|
21761
|
+
*
|
|
21762
|
+
* `storage-evictable.getEvictableUsage` looks like the same question and is
|
|
21763
|
+
* not, in two ways that both matter and both bite hardest on the locations an
|
|
21764
|
+
* operator most wants a figure for:
|
|
21765
|
+
*
|
|
21766
|
+
* - it reports the whole eviction DOMAIN, not the location. `recordings:default`
|
|
21767
|
+
* and `recordingsLow:default` deliberately share one root and evict as one
|
|
21768
|
+
* oldest-first pool, so both answer with the SAME combined total. As an
|
|
21769
|
+
* occupancy figure that double-counts the disk.
|
|
21770
|
+
* - it reports ZERO for a location whose eviction policy is `never` (D385) —
|
|
21771
|
+
* a `readonly` or `disabled` disk. Those are exactly the disks an operator
|
|
21772
|
+
* is retiring and staring at.
|
|
21773
|
+
*
|
|
21774
|
+
* So this is its own contract with its own quantity, and the quantity is
|
|
21775
|
+
* OCCUPIED: every byte the addon holds on that location, whether or not it
|
|
21776
|
+
* would ever be willing to delete it. A provider that can only answer
|
|
21777
|
+
* "evictable" must not register here — a number that silently means different
|
|
21778
|
+
* things per class is worse than no number.
|
|
21779
|
+
*
|
|
21780
|
+
* ## Absence is an answer
|
|
21781
|
+
*
|
|
21782
|
+
* A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
|
|
21783
|
+
* stamps `StorageLocation.owned` only for locations it has a report for, and
|
|
21784
|
+
* the field is an OBJECT rather than a bare number so that a `?? 0` on the
|
|
21785
|
+
* consuming side has to be written out loud instead of appearing by accident.
|
|
21786
|
+
*
|
|
21787
|
+
* `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
|
|
21788
|
+
* a public client surface. Clients read the stamped `StorageLocation.owned`.
|
|
21789
|
+
*/
|
|
21790
|
+
/** One provider's occupancy answer for one location. */
|
|
21791
|
+
var StorageOccupancyReportSchema = object({
|
|
21792
|
+
locationId: string(),
|
|
21793
|
+
/** Bytes this provider holds on THAT location — not its eviction domain, and
|
|
21794
|
+
* not net of what it is willing to delete. */
|
|
21795
|
+
ownedBytes: number().int().nonnegative(),
|
|
21796
|
+
/** When the provider last actually measured this. The orchestrator carries it
|
|
21797
|
+
* through so a UI can say how old the figure is instead of implying "now". */
|
|
21798
|
+
measuredAtMs: number().int().nonnegative()
|
|
21799
|
+
});
|
|
21800
|
+
method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
|
|
21678
21801
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
21679
21802
|
providerId: string().min(1),
|
|
21680
21803
|
displayName: string().min(1),
|
|
@@ -23310,39 +23433,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
|
|
|
23310
23433
|
deviceId: number(),
|
|
23311
23434
|
status: BatteryStatusSchema
|
|
23312
23435
|
});
|
|
23313
|
-
/**
|
|
23314
|
-
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23315
|
-
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23316
|
-
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23317
|
-
* one Home Assistant projection.
|
|
23318
|
-
*/
|
|
23319
|
-
var NetworkLinkStatusSchema = object({
|
|
23320
|
-
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23321
|
-
type: _enum([
|
|
23322
|
-
"wifi",
|
|
23323
|
-
"ethernet",
|
|
23324
|
-
"cellular",
|
|
23325
|
-
"unknown"
|
|
23326
|
-
]),
|
|
23327
|
-
/**
|
|
23328
|
-
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23329
|
-
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23330
|
-
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23331
|
-
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23332
|
-
* SKIP a null rather than coerce it.
|
|
23333
|
-
*/
|
|
23334
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
23335
|
-
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23336
|
-
rssiDbm: number().optional(),
|
|
23337
|
-
/** Network name of a wireless link, when the firmware reports it. */
|
|
23338
|
-
ssid: string().optional(),
|
|
23339
|
-
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23340
|
-
lastUpdated: number()
|
|
23341
|
-
});
|
|
23342
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
23343
|
-
deviceId: number(),
|
|
23344
|
-
status: NetworkLinkStatusSchema
|
|
23345
|
-
});
|
|
23346
23436
|
object({
|
|
23347
23437
|
on: boolean(),
|
|
23348
23438
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -25696,6 +25786,236 @@ DeviceType.Camera, method(object({
|
|
|
25696
25786
|
detection: NativeDetectionSchema
|
|
25697
25787
|
});
|
|
25698
25788
|
/**
|
|
25789
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
25790
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
25791
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
25792
|
+
*
|
|
25793
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
25794
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
25795
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
25796
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
25797
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
25798
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
25799
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
25800
|
+
* the reverse:
|
|
25801
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
25802
|
+
* / `getOptions`), and
|
|
25803
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
25804
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
25805
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
25806
|
+
* not here (see the addon design note):
|
|
25807
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
25808
|
+
* ptz.stop() → navigation.stop()
|
|
25809
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
25810
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
25811
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
25812
|
+
*
|
|
25813
|
+
* ## Continuous drive
|
|
25814
|
+
*
|
|
25815
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
25816
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
25817
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
25818
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
25819
|
+
* coalesce them. The UI owns the cadence.
|
|
25820
|
+
*
|
|
25821
|
+
* ## The action dictionary
|
|
25822
|
+
*
|
|
25823
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
25824
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
25825
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
25826
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
25827
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
25828
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
25829
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
25830
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
25831
|
+
*
|
|
25832
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
25833
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
25834
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
25835
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
25836
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
25837
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
25838
|
+
* THIS contract.
|
|
25839
|
+
*/
|
|
25840
|
+
/**
|
|
25841
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
25842
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
25843
|
+
* halts it.
|
|
25844
|
+
*
|
|
25845
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
25846
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
25847
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
25848
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
25849
|
+
*
|
|
25850
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
25851
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
25852
|
+
*/
|
|
25853
|
+
var NavigationMoveCommandSchema = object({
|
|
25854
|
+
pan: number().min(-1).max(1).optional(),
|
|
25855
|
+
tilt: number().min(-1).max(1).optional(),
|
|
25856
|
+
speed: number().min(0).max(1).optional()
|
|
25857
|
+
});
|
|
25858
|
+
/**
|
|
25859
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
25860
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
25861
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
25862
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
25863
|
+
*/
|
|
25864
|
+
var NavigationActionIdSchema = _enum([
|
|
25865
|
+
"goHome",
|
|
25866
|
+
"locate",
|
|
25867
|
+
"spotClean",
|
|
25868
|
+
"findPet",
|
|
25869
|
+
"personFollow",
|
|
25870
|
+
"stop",
|
|
25871
|
+
"startClean",
|
|
25872
|
+
"pauseClean",
|
|
25873
|
+
"dockWash",
|
|
25874
|
+
"autoEmpty",
|
|
25875
|
+
"flashOn",
|
|
25876
|
+
"flashOff"
|
|
25877
|
+
]);
|
|
25878
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
25879
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
25880
|
+
/**
|
|
25881
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
25882
|
+
* native panel and the PTZ mimic render as a button.
|
|
25883
|
+
*
|
|
25884
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
25885
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
25886
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
25887
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
25888
|
+
* - `label` — operator-facing English label.
|
|
25889
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
25890
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
25891
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
25892
|
+
* flips it from config, never by editing code.
|
|
25893
|
+
*/
|
|
25894
|
+
var NavigationActionEntrySchema = object({
|
|
25895
|
+
id: string(),
|
|
25896
|
+
kind: NavigationEntryKindSchema,
|
|
25897
|
+
label: string(),
|
|
25898
|
+
icon: string(),
|
|
25899
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
25900
|
+
soundId: number().int().optional(),
|
|
25901
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
25902
|
+
enabled: boolean()
|
|
25903
|
+
});
|
|
25904
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
25905
|
+
var NavigationPointSchema = object({
|
|
25906
|
+
x: number(),
|
|
25907
|
+
y: number()
|
|
25908
|
+
});
|
|
25909
|
+
/**
|
|
25910
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
25911
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
25912
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
25913
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
25914
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
25915
|
+
* that are not dictionary entries.
|
|
25916
|
+
*
|
|
25917
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
25918
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
25919
|
+
* map-coordinate plumbing is wired.
|
|
25920
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
25921
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
25922
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
25923
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
25924
|
+
* camera-service control; needs an active stream).
|
|
25925
|
+
*/
|
|
25926
|
+
var NavigationFeaturesSchema = object({
|
|
25927
|
+
move: boolean(),
|
|
25928
|
+
stop: boolean(),
|
|
25929
|
+
goToPoint: boolean(),
|
|
25930
|
+
runAction: boolean(),
|
|
25931
|
+
playSound: boolean(),
|
|
25932
|
+
light: boolean(),
|
|
25933
|
+
lightMode: boolean()
|
|
25934
|
+
});
|
|
25935
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
25936
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
25937
|
+
/**
|
|
25938
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
25939
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
25940
|
+
* - `following` — person/pet follow is currently armed.
|
|
25941
|
+
* - `flash` — the on-camera fill light is on.
|
|
25942
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
25943
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
25944
|
+
* `lightMode === 'manual'`.
|
|
25945
|
+
*/
|
|
25946
|
+
var NavigationStatusSchema = object({
|
|
25947
|
+
mode: _enum([
|
|
25948
|
+
"idle",
|
|
25949
|
+
"cleaning",
|
|
25950
|
+
"spot",
|
|
25951
|
+
"following",
|
|
25952
|
+
"goto",
|
|
25953
|
+
"returning",
|
|
25954
|
+
"paused",
|
|
25955
|
+
"unknown"
|
|
25956
|
+
]),
|
|
25957
|
+
following: boolean(),
|
|
25958
|
+
flash: boolean(),
|
|
25959
|
+
lightMode: NavigationLightModeSchema,
|
|
25960
|
+
lightLevel: number().min(40).max(100),
|
|
25961
|
+
/** Ms epoch when the slice was last updated. */
|
|
25962
|
+
lastChangedAt: number()
|
|
25963
|
+
});
|
|
25964
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
25965
|
+
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({
|
|
25966
|
+
deviceId: number(),
|
|
25967
|
+
actionId: NavigationActionIdSchema
|
|
25968
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
25969
|
+
deviceId: number(),
|
|
25970
|
+
soundId: number().int()
|
|
25971
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
25972
|
+
deviceId: number(),
|
|
25973
|
+
on: boolean()
|
|
25974
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
25975
|
+
deviceId: number(),
|
|
25976
|
+
mode: NavigationLightModeSchema,
|
|
25977
|
+
level: number().min(40).max(100).optional()
|
|
25978
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
25979
|
+
deviceId: number(),
|
|
25980
|
+
level: number().min(40).max(100)
|
|
25981
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
25982
|
+
deviceId: number(),
|
|
25983
|
+
status: NavigationStatusSchema
|
|
25984
|
+
});
|
|
25985
|
+
/**
|
|
25986
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
25987
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
25988
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
25989
|
+
* one Home Assistant projection.
|
|
25990
|
+
*/
|
|
25991
|
+
var NetworkLinkStatusSchema = object({
|
|
25992
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
25993
|
+
type: _enum([
|
|
25994
|
+
"wifi",
|
|
25995
|
+
"ethernet",
|
|
25996
|
+
"cellular",
|
|
25997
|
+
"unknown"
|
|
25998
|
+
]),
|
|
25999
|
+
/**
|
|
26000
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
26001
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
26002
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
26003
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
26004
|
+
* SKIP a null rather than coerce it.
|
|
26005
|
+
*/
|
|
26006
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
26007
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
26008
|
+
rssiDbm: number().optional(),
|
|
26009
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
26010
|
+
ssid: string().optional(),
|
|
26011
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
26012
|
+
lastUpdated: number()
|
|
26013
|
+
});
|
|
26014
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
26015
|
+
deviceId: number(),
|
|
26016
|
+
status: NetworkLinkStatusSchema
|
|
26017
|
+
});
|
|
26018
|
+
/**
|
|
25699
26019
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
25700
26020
|
* jitter, and observed/peak bandwidth per device + per client.
|
|
25701
26021
|
*
|
|
@@ -26937,203 +27257,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
26937
27257
|
deviceId: number(),
|
|
26938
27258
|
status: PtzAutotrackStatusSchema
|
|
26939
27259
|
});
|
|
26940
|
-
/**
|
|
26941
|
-
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
26942
|
-
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
26943
|
-
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
26944
|
-
*
|
|
26945
|
-
* Why a NEW cap rather than overloading `ptz`:
|
|
26946
|
-
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
26947
|
-
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
26948
|
-
* The two are different physical models: PTZ is absolute-position + presets,
|
|
26949
|
-
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
26950
|
-
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
26951
|
-
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
26952
|
-
* the reverse:
|
|
26953
|
-
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
26954
|
-
* / `getOptions`), and
|
|
26955
|
-
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
26956
|
-
* robot camera shows up in the existing PTZ control path without every
|
|
26957
|
-
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
26958
|
-
* not here (see the addon design note):
|
|
26959
|
-
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
26960
|
-
* ptz.stop() → navigation.stop()
|
|
26961
|
-
* ptz.goHome() → navigation.runAction('goHome')
|
|
26962
|
-
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
26963
|
-
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
26964
|
-
*
|
|
26965
|
-
* ## Continuous drive
|
|
26966
|
-
*
|
|
26967
|
-
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
26968
|
-
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
26969
|
-
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
26970
|
-
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
26971
|
-
* coalesce them. The UI owns the cadence.
|
|
26972
|
-
*
|
|
26973
|
-
* ## The action dictionary
|
|
26974
|
-
*
|
|
26975
|
-
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
26976
|
-
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
26977
|
-
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
26978
|
-
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
26979
|
-
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
26980
|
-
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
26981
|
-
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
26982
|
-
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
26983
|
-
*
|
|
26984
|
-
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
26985
|
-
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
26986
|
-
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
26987
|
-
* every device handle. A future nodedreame publish adds a typed
|
|
26988
|
-
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
26989
|
-
* provider can then swap the raw calls for the typed methods with no change to
|
|
26990
|
-
* THIS contract.
|
|
26991
|
-
*/
|
|
26992
|
-
/**
|
|
26993
|
-
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
26994
|
-
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
26995
|
-
* halts it.
|
|
26996
|
-
*
|
|
26997
|
-
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
26998
|
-
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
26999
|
-
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
27000
|
-
* vector by it (drivers without proportional drive ignore it).
|
|
27001
|
-
*
|
|
27002
|
-
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
27003
|
-
* axis alone; an all-undefined nudge is a no-op.
|
|
27004
|
-
*/
|
|
27005
|
-
var NavigationMoveCommandSchema = object({
|
|
27006
|
-
pan: number().min(-1).max(1).optional(),
|
|
27007
|
-
tilt: number().min(-1).max(1).optional(),
|
|
27008
|
-
speed: number().min(0).max(1).optional()
|
|
27009
|
-
});
|
|
27010
|
-
/**
|
|
27011
|
-
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
27012
|
-
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
27013
|
-
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
27014
|
-
* `playSound` (see the `sound` dictionary entries).
|
|
27015
|
-
*/
|
|
27016
|
-
var NavigationActionIdSchema = _enum([
|
|
27017
|
-
"goHome",
|
|
27018
|
-
"locate",
|
|
27019
|
-
"spotClean",
|
|
27020
|
-
"findPet",
|
|
27021
|
-
"personFollow",
|
|
27022
|
-
"stop",
|
|
27023
|
-
"startClean",
|
|
27024
|
-
"pauseClean",
|
|
27025
|
-
"dockWash",
|
|
27026
|
-
"autoEmpty",
|
|
27027
|
-
"flashOn",
|
|
27028
|
-
"flashOff"
|
|
27029
|
-
]);
|
|
27030
|
-
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27031
|
-
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27032
|
-
/**
|
|
27033
|
-
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27034
|
-
* native panel and the PTZ mimic render as a button.
|
|
27035
|
-
*
|
|
27036
|
-
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27037
|
-
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27038
|
-
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27039
|
-
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27040
|
-
* - `label` — operator-facing English label.
|
|
27041
|
-
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27042
|
-
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27043
|
-
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27044
|
-
* flips it from config, never by editing code.
|
|
27045
|
-
*/
|
|
27046
|
-
var NavigationActionEntrySchema = object({
|
|
27047
|
-
id: string(),
|
|
27048
|
-
kind: NavigationEntryKindSchema,
|
|
27049
|
-
label: string(),
|
|
27050
|
-
icon: string(),
|
|
27051
|
-
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27052
|
-
soundId: number().int().optional(),
|
|
27053
|
-
/** Per-device feature flag — render this entry only when true. */
|
|
27054
|
-
enabled: boolean()
|
|
27055
|
-
});
|
|
27056
|
-
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27057
|
-
var NavigationPointSchema = object({
|
|
27058
|
-
x: number(),
|
|
27059
|
-
y: number()
|
|
27060
|
-
});
|
|
27061
|
-
/**
|
|
27062
|
-
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27063
|
-
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27064
|
-
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27065
|
-
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27066
|
-
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27067
|
-
* that are not dictionary entries.
|
|
27068
|
-
*
|
|
27069
|
-
* - `move` / `stop` — the momentary drive joystick.
|
|
27070
|
-
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27071
|
-
* map-coordinate plumbing is wired.
|
|
27072
|
-
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27073
|
-
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27074
|
-
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27075
|
-
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27076
|
-
* camera-service control; needs an active stream).
|
|
27077
|
-
*/
|
|
27078
|
-
var NavigationFeaturesSchema = object({
|
|
27079
|
-
move: boolean(),
|
|
27080
|
-
stop: boolean(),
|
|
27081
|
-
goToPoint: boolean(),
|
|
27082
|
-
runAction: boolean(),
|
|
27083
|
-
playSound: boolean(),
|
|
27084
|
-
light: boolean(),
|
|
27085
|
-
lightMode: boolean()
|
|
27086
|
-
});
|
|
27087
|
-
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27088
|
-
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27089
|
-
/**
|
|
27090
|
-
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27091
|
-
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27092
|
-
* - `following` — person/pet follow is currently armed.
|
|
27093
|
-
* - `flash` — the on-camera fill light is on.
|
|
27094
|
-
* - `lightMode` — auto vs manual fill-light mode.
|
|
27095
|
-
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27096
|
-
* `lightMode === 'manual'`.
|
|
27097
|
-
*/
|
|
27098
|
-
var NavigationStatusSchema = object({
|
|
27099
|
-
mode: _enum([
|
|
27100
|
-
"idle",
|
|
27101
|
-
"cleaning",
|
|
27102
|
-
"spot",
|
|
27103
|
-
"following",
|
|
27104
|
-
"goto",
|
|
27105
|
-
"returning",
|
|
27106
|
-
"paused",
|
|
27107
|
-
"unknown"
|
|
27108
|
-
]),
|
|
27109
|
-
following: boolean(),
|
|
27110
|
-
flash: boolean(),
|
|
27111
|
-
lightMode: NavigationLightModeSchema,
|
|
27112
|
-
lightLevel: number().min(40).max(100),
|
|
27113
|
-
/** Ms epoch when the slice was last updated. */
|
|
27114
|
-
lastChangedAt: number()
|
|
27115
|
-
});
|
|
27116
|
-
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27117
|
-
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({
|
|
27118
|
-
deviceId: number(),
|
|
27119
|
-
actionId: NavigationActionIdSchema
|
|
27120
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27121
|
-
deviceId: number(),
|
|
27122
|
-
soundId: number().int()
|
|
27123
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27124
|
-
deviceId: number(),
|
|
27125
|
-
on: boolean()
|
|
27126
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27127
|
-
deviceId: number(),
|
|
27128
|
-
mode: NavigationLightModeSchema,
|
|
27129
|
-
level: number().min(40).max(100).optional()
|
|
27130
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27131
|
-
deviceId: number(),
|
|
27132
|
-
level: number().min(40).max(100)
|
|
27133
|
-
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27134
|
-
deviceId: number(),
|
|
27135
|
-
status: NavigationStatusSchema
|
|
27136
|
-
});
|
|
27137
27260
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
27138
27261
|
kind: "mutation",
|
|
27139
27262
|
auth: "admin"
|
|
@@ -34448,6 +34571,12 @@ Object.freeze({
|
|
|
34448
34571
|
addonId: null,
|
|
34449
34572
|
access: "view"
|
|
34450
34573
|
},
|
|
34574
|
+
"storage.listDrainProgress": {
|
|
34575
|
+
capName: "storage",
|
|
34576
|
+
capScope: "system",
|
|
34577
|
+
addonId: null,
|
|
34578
|
+
access: "view"
|
|
34579
|
+
},
|
|
34451
34580
|
"storage.listLocationDeclarations": {
|
|
34452
34581
|
capName: "storage",
|
|
34453
34582
|
capScope: "system",
|
|
@@ -34592,6 +34721,12 @@ Object.freeze({
|
|
|
34592
34721
|
addonId: null,
|
|
34593
34722
|
access: "view"
|
|
34594
34723
|
},
|
|
34724
|
+
"storageOccupancy.getOccupancy": {
|
|
34725
|
+
capName: "storage-occupancy",
|
|
34726
|
+
capScope: "system",
|
|
34727
|
+
addonId: null,
|
|
34728
|
+
access: "view"
|
|
34729
|
+
},
|
|
34595
34730
|
"storageProvider.abortUpload": {
|
|
34596
34731
|
capName: "storage-provider",
|
|
34597
34732
|
capScope: "system",
|