@camstack/addon-export-alexa 1.2.85 → 1.2.86
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/export-alexa.addon.js +367 -232
- package/dist/export-alexa.addon.mjs +367 -232
- package/package.json +1 -1
|
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
//#endregion
|
|
27
27
|
let node_crypto = require("node:crypto");
|
|
28
28
|
node_crypto = __toESM(node_crypto);
|
|
29
|
-
//#region ../types/dist/event-category-
|
|
29
|
+
//#region ../types/dist/event-category-CnLqLOKs.mjs
|
|
30
30
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
31
31
|
EventCategory["SystemBoot"] = "system.boot";
|
|
32
32
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -221,6 +221,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
221
221
|
EventCategory["ProcessCrashed"] = "process.crashed";
|
|
222
222
|
EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
|
|
223
223
|
EventCategory["ProcessRestarted"] = "process.restarted";
|
|
224
|
+
/**
|
|
225
|
+
* The SET of storage locations changed — one was created, edited, enabled,
|
|
226
|
+
* disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
|
|
227
|
+
*
|
|
228
|
+
* Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
|
|
229
|
+
* it must also converge on its own periodic path, because a dropped event
|
|
230
|
+
* must not leave a node writing to yesterday's disk set forever. It exists
|
|
231
|
+
* because there was NO signal at all — an operator who added a second
|
|
232
|
+
* recordings disk in the admin UI got nothing, and the recorder kept its
|
|
233
|
+
* resolved locations until something else happened to re-resolve them
|
|
234
|
+
* (D387). Payload `StorageLocationsChangedPayload`.
|
|
235
|
+
*/
|
|
236
|
+
EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
|
|
224
237
|
EventCategory["RecordingStarted"] = "recording.started";
|
|
225
238
|
EventCategory["RecordingStopped"] = "recording.stopped";
|
|
226
239
|
EventCategory["RecordingError"] = "recording.error";
|
|
@@ -8704,6 +8717,21 @@ var StorageCleanupJobSchema = object({
|
|
|
8704
8717
|
});
|
|
8705
8718
|
var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
|
|
8706
8719
|
/**
|
|
8720
|
+
* The one typed state of a storage location. Authoritative Zod schema — the TS
|
|
8721
|
+
* alias below is `z.infer<>` of it, never a second spelling.
|
|
8722
|
+
*/
|
|
8723
|
+
var StorageLocationModeSchema = _enum([
|
|
8724
|
+
"active",
|
|
8725
|
+
"readonly",
|
|
8726
|
+
"drain",
|
|
8727
|
+
"disabled"
|
|
8728
|
+
]);
|
|
8729
|
+
_enum([
|
|
8730
|
+
"normal",
|
|
8731
|
+
"never",
|
|
8732
|
+
"drain"
|
|
8733
|
+
]);
|
|
8734
|
+
/**
|
|
8707
8735
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8708
8736
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8709
8737
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8769,6 +8797,21 @@ var StorageLocationSchema = object({
|
|
|
8769
8797
|
* stops existing rather than being re-derived on every read.
|
|
8770
8798
|
*/
|
|
8771
8799
|
enabled: boolean().optional(),
|
|
8800
|
+
/**
|
|
8801
|
+
* THE state of this location (D385), and the only authority on what may be
|
|
8802
|
+
* written, read or evicted here. Interpreted in exactly one place —
|
|
8803
|
+
* `storage-location-mode.ts` — which also folds the legacy
|
|
8804
|
+
* `enabled` / `config.readOnly` pair into a mode so an old row is never
|
|
8805
|
+
* ambiguous.
|
|
8806
|
+
*
|
|
8807
|
+
* OPTIONAL only for the wire and for rows written before D385: absence is
|
|
8808
|
+
* resolved by `resolveLocationMode`, and the orchestrator stamps every
|
|
8809
|
+
* unstamped row ONCE at hydrate so absence stops existing rather than being
|
|
8810
|
+
* re-derived on every read. `enabled` survives one release as a DERIVED
|
|
8811
|
+
* mirror (`mode === 'active'`); `withLocationMode` is the only writer of
|
|
8812
|
+
* either, so the two cannot disagree.
|
|
8813
|
+
*/
|
|
8814
|
+
mode: StorageLocationModeSchema.optional(),
|
|
8772
8815
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
8773
8816
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
8774
8817
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -8776,11 +8819,46 @@ var StorageLocationSchema = object({
|
|
|
8776
8819
|
totalBytes: number(),
|
|
8777
8820
|
availableBytes: number()
|
|
8778
8821
|
}).nullable().optional(),
|
|
8822
|
+
/**
|
|
8823
|
+
* How much of that volume CamStack ITSELF holds on this location (D388) —
|
|
8824
|
+
* COMPUTED at read time from the `storage-occupancy` providers' own figures,
|
|
8825
|
+
* never persisted, never a filesystem walk.
|
|
8826
|
+
*
|
|
8827
|
+
* **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
|
|
8828
|
+
* location yet — nobody stores here, the owning addon is down, or the first
|
|
8829
|
+
* refresh has not completed. A UI must omit the segment rather than draw it
|
|
8830
|
+
* at zero, which would claim we occupy nothing (D315). It is an OBJECT and
|
|
8831
|
+
* not a bare number precisely so that a `?? 0` on the consuming side has to
|
|
8832
|
+
* be spelled out loud instead of appearing by accident.
|
|
8833
|
+
*
|
|
8834
|
+
* `measuredAtMs` is the OLDEST contributing measurement, so it is honest
|
|
8835
|
+
* about the whole figure rather than about its freshest part.
|
|
8836
|
+
*/
|
|
8837
|
+
owned: object({
|
|
8838
|
+
bytes: number().int().nonnegative(),
|
|
8839
|
+
measuredAtMs: number().int().nonnegative()
|
|
8840
|
+
}).optional(),
|
|
8779
8841
|
createdAt: number(),
|
|
8780
8842
|
updatedAt: number()
|
|
8781
8843
|
});
|
|
8782
8844
|
object({ isDefault: boolean().optional() });
|
|
8783
8845
|
/**
|
|
8846
|
+
* How far a `drain` has got (D386) — the read a UI renders, and nothing more.
|
|
8847
|
+
*
|
|
8848
|
+
* `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
|
|
8849
|
+
* OBSERVED and is `null` when it has observed none. Never a fabricated date: a
|
|
8850
|
+
* drain with no observed growth has no honest ETA, and inventing one is how an
|
|
8851
|
+
* operator learns not to believe the screen.
|
|
8852
|
+
*/
|
|
8853
|
+
var StorageDrainProgressSchema = object({
|
|
8854
|
+
locationId: string(),
|
|
8855
|
+
startedAtMs: number(),
|
|
8856
|
+
startBytes: number(),
|
|
8857
|
+
bytesRemaining: number(),
|
|
8858
|
+
drained: boolean(),
|
|
8859
|
+
estimatedEmptyAtMs: number().nullable()
|
|
8860
|
+
});
|
|
8861
|
+
/**
|
|
8784
8862
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8785
8863
|
* Either:
|
|
8786
8864
|
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
@@ -21884,7 +21962,7 @@ method(object({
|
|
|
21884
21962
|
}), _void(), {
|
|
21885
21963
|
kind: "mutation",
|
|
21886
21964
|
auth: "admin"
|
|
21887
|
-
}), method(object({ id: string() }), object({
|
|
21965
|
+
}), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
|
|
21888
21966
|
ok: boolean(),
|
|
21889
21967
|
error: string().optional()
|
|
21890
21968
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
@@ -21954,6 +22032,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
21954
22032
|
kind: "mutation",
|
|
21955
22033
|
auth: "admin"
|
|
21956
22034
|
}), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
|
|
22035
|
+
/**
|
|
22036
|
+
* `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
|
|
22037
|
+
* location (D388).
|
|
22038
|
+
*
|
|
22039
|
+
* ## Why this is not `storage-evictable`
|
|
22040
|
+
*
|
|
22041
|
+
* `storage-evictable.getEvictableUsage` looks like the same question and is
|
|
22042
|
+
* not, in two ways that both matter and both bite hardest on the locations an
|
|
22043
|
+
* operator most wants a figure for:
|
|
22044
|
+
*
|
|
22045
|
+
* - it reports the whole eviction DOMAIN, not the location. `recordings:default`
|
|
22046
|
+
* and `recordingsLow:default` deliberately share one root and evict as one
|
|
22047
|
+
* oldest-first pool, so both answer with the SAME combined total. As an
|
|
22048
|
+
* occupancy figure that double-counts the disk.
|
|
22049
|
+
* - it reports ZERO for a location whose eviction policy is `never` (D385) —
|
|
22050
|
+
* a `readonly` or `disabled` disk. Those are exactly the disks an operator
|
|
22051
|
+
* is retiring and staring at.
|
|
22052
|
+
*
|
|
22053
|
+
* So this is its own contract with its own quantity, and the quantity is
|
|
22054
|
+
* OCCUPIED: every byte the addon holds on that location, whether or not it
|
|
22055
|
+
* would ever be willing to delete it. A provider that can only answer
|
|
22056
|
+
* "evictable" must not register here — a number that silently means different
|
|
22057
|
+
* things per class is worse than no number.
|
|
22058
|
+
*
|
|
22059
|
+
* ## Absence is an answer
|
|
22060
|
+
*
|
|
22061
|
+
* A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
|
|
22062
|
+
* stamps `StorageLocation.owned` only for locations it has a report for, and
|
|
22063
|
+
* the field is an OBJECT rather than a bare number so that a `?? 0` on the
|
|
22064
|
+
* consuming side has to be written out loud instead of appearing by accident.
|
|
22065
|
+
*
|
|
22066
|
+
* `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
|
|
22067
|
+
* a public client surface. Clients read the stamped `StorageLocation.owned`.
|
|
22068
|
+
*/
|
|
22069
|
+
/** One provider's occupancy answer for one location. */
|
|
22070
|
+
var StorageOccupancyReportSchema = object({
|
|
22071
|
+
locationId: string(),
|
|
22072
|
+
/** Bytes this provider holds on THAT location — not its eviction domain, and
|
|
22073
|
+
* not net of what it is willing to delete. */
|
|
22074
|
+
ownedBytes: number().int().nonnegative(),
|
|
22075
|
+
/** When the provider last actually measured this. The orchestrator carries it
|
|
22076
|
+
* through so a UI can say how old the figure is instead of implying "now". */
|
|
22077
|
+
measuredAtMs: number().int().nonnegative()
|
|
22078
|
+
});
|
|
22079
|
+
method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
|
|
21957
22080
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
21958
22081
|
providerId: string().min(1),
|
|
21959
22082
|
displayName: string().min(1),
|
|
@@ -23589,39 +23712,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
|
|
|
23589
23712
|
deviceId: number(),
|
|
23590
23713
|
status: BatteryStatusSchema
|
|
23591
23714
|
});
|
|
23592
|
-
/**
|
|
23593
|
-
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23594
|
-
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23595
|
-
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23596
|
-
* one Home Assistant projection.
|
|
23597
|
-
*/
|
|
23598
|
-
var NetworkLinkStatusSchema = object({
|
|
23599
|
-
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23600
|
-
type: _enum([
|
|
23601
|
-
"wifi",
|
|
23602
|
-
"ethernet",
|
|
23603
|
-
"cellular",
|
|
23604
|
-
"unknown"
|
|
23605
|
-
]),
|
|
23606
|
-
/**
|
|
23607
|
-
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23608
|
-
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23609
|
-
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23610
|
-
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23611
|
-
* SKIP a null rather than coerce it.
|
|
23612
|
-
*/
|
|
23613
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
23614
|
-
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23615
|
-
rssiDbm: number().optional(),
|
|
23616
|
-
/** Network name of a wireless link, when the firmware reports it. */
|
|
23617
|
-
ssid: string().optional(),
|
|
23618
|
-
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23619
|
-
lastUpdated: number()
|
|
23620
|
-
});
|
|
23621
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
23622
|
-
deviceId: number(),
|
|
23623
|
-
status: NetworkLinkStatusSchema
|
|
23624
|
-
});
|
|
23625
23715
|
object({
|
|
23626
23716
|
on: boolean(),
|
|
23627
23717
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -25975,6 +26065,236 @@ DeviceType.Camera, method(object({
|
|
|
25975
26065
|
detection: NativeDetectionSchema
|
|
25976
26066
|
});
|
|
25977
26067
|
/**
|
|
26068
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
26069
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
26070
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
26071
|
+
*
|
|
26072
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
26073
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
26074
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
26075
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
26076
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
26077
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
26078
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
26079
|
+
* the reverse:
|
|
26080
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
26081
|
+
* / `getOptions`), and
|
|
26082
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
26083
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
26084
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
26085
|
+
* not here (see the addon design note):
|
|
26086
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
26087
|
+
* ptz.stop() → navigation.stop()
|
|
26088
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
26089
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
26090
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
26091
|
+
*
|
|
26092
|
+
* ## Continuous drive
|
|
26093
|
+
*
|
|
26094
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
26095
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
26096
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
26097
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
26098
|
+
* coalesce them. The UI owns the cadence.
|
|
26099
|
+
*
|
|
26100
|
+
* ## The action dictionary
|
|
26101
|
+
*
|
|
26102
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
26103
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
26104
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
26105
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
26106
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
26107
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
26108
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
26109
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
26110
|
+
*
|
|
26111
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
26112
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
26113
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
26114
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
26115
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
26116
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
26117
|
+
* THIS contract.
|
|
26118
|
+
*/
|
|
26119
|
+
/**
|
|
26120
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
26121
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
26122
|
+
* halts it.
|
|
26123
|
+
*
|
|
26124
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
26125
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
26126
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
26127
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
26128
|
+
*
|
|
26129
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
26130
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
26131
|
+
*/
|
|
26132
|
+
var NavigationMoveCommandSchema = object({
|
|
26133
|
+
pan: number().min(-1).max(1).optional(),
|
|
26134
|
+
tilt: number().min(-1).max(1).optional(),
|
|
26135
|
+
speed: number().min(0).max(1).optional()
|
|
26136
|
+
});
|
|
26137
|
+
/**
|
|
26138
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
26139
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
26140
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
26141
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
26142
|
+
*/
|
|
26143
|
+
var NavigationActionIdSchema = _enum([
|
|
26144
|
+
"goHome",
|
|
26145
|
+
"locate",
|
|
26146
|
+
"spotClean",
|
|
26147
|
+
"findPet",
|
|
26148
|
+
"personFollow",
|
|
26149
|
+
"stop",
|
|
26150
|
+
"startClean",
|
|
26151
|
+
"pauseClean",
|
|
26152
|
+
"dockWash",
|
|
26153
|
+
"autoEmpty",
|
|
26154
|
+
"flashOn",
|
|
26155
|
+
"flashOff"
|
|
26156
|
+
]);
|
|
26157
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
26158
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
26159
|
+
/**
|
|
26160
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
26161
|
+
* native panel and the PTZ mimic render as a button.
|
|
26162
|
+
*
|
|
26163
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
26164
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
26165
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
26166
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
26167
|
+
* - `label` — operator-facing English label.
|
|
26168
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
26169
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
26170
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
26171
|
+
* flips it from config, never by editing code.
|
|
26172
|
+
*/
|
|
26173
|
+
var NavigationActionEntrySchema = object({
|
|
26174
|
+
id: string(),
|
|
26175
|
+
kind: NavigationEntryKindSchema,
|
|
26176
|
+
label: string(),
|
|
26177
|
+
icon: string(),
|
|
26178
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
26179
|
+
soundId: number().int().optional(),
|
|
26180
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
26181
|
+
enabled: boolean()
|
|
26182
|
+
});
|
|
26183
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
26184
|
+
var NavigationPointSchema = object({
|
|
26185
|
+
x: number(),
|
|
26186
|
+
y: number()
|
|
26187
|
+
});
|
|
26188
|
+
/**
|
|
26189
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
26190
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
26191
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
26192
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
26193
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
26194
|
+
* that are not dictionary entries.
|
|
26195
|
+
*
|
|
26196
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
26197
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
26198
|
+
* map-coordinate plumbing is wired.
|
|
26199
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
26200
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
26201
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
26202
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
26203
|
+
* camera-service control; needs an active stream).
|
|
26204
|
+
*/
|
|
26205
|
+
var NavigationFeaturesSchema = object({
|
|
26206
|
+
move: boolean(),
|
|
26207
|
+
stop: boolean(),
|
|
26208
|
+
goToPoint: boolean(),
|
|
26209
|
+
runAction: boolean(),
|
|
26210
|
+
playSound: boolean(),
|
|
26211
|
+
light: boolean(),
|
|
26212
|
+
lightMode: boolean()
|
|
26213
|
+
});
|
|
26214
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
26215
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
26216
|
+
/**
|
|
26217
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
26218
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
26219
|
+
* - `following` — person/pet follow is currently armed.
|
|
26220
|
+
* - `flash` — the on-camera fill light is on.
|
|
26221
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
26222
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
26223
|
+
* `lightMode === 'manual'`.
|
|
26224
|
+
*/
|
|
26225
|
+
var NavigationStatusSchema = object({
|
|
26226
|
+
mode: _enum([
|
|
26227
|
+
"idle",
|
|
26228
|
+
"cleaning",
|
|
26229
|
+
"spot",
|
|
26230
|
+
"following",
|
|
26231
|
+
"goto",
|
|
26232
|
+
"returning",
|
|
26233
|
+
"paused",
|
|
26234
|
+
"unknown"
|
|
26235
|
+
]),
|
|
26236
|
+
following: boolean(),
|
|
26237
|
+
flash: boolean(),
|
|
26238
|
+
lightMode: NavigationLightModeSchema,
|
|
26239
|
+
lightLevel: number().min(40).max(100),
|
|
26240
|
+
/** Ms epoch when the slice was last updated. */
|
|
26241
|
+
lastChangedAt: number()
|
|
26242
|
+
});
|
|
26243
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
26244
|
+
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({
|
|
26245
|
+
deviceId: number(),
|
|
26246
|
+
actionId: NavigationActionIdSchema
|
|
26247
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
26248
|
+
deviceId: number(),
|
|
26249
|
+
soundId: number().int()
|
|
26250
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
26251
|
+
deviceId: number(),
|
|
26252
|
+
on: boolean()
|
|
26253
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
26254
|
+
deviceId: number(),
|
|
26255
|
+
mode: NavigationLightModeSchema,
|
|
26256
|
+
level: number().min(40).max(100).optional()
|
|
26257
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
26258
|
+
deviceId: number(),
|
|
26259
|
+
level: number().min(40).max(100)
|
|
26260
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
26261
|
+
deviceId: number(),
|
|
26262
|
+
status: NavigationStatusSchema
|
|
26263
|
+
});
|
|
26264
|
+
/**
|
|
26265
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
26266
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
26267
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
26268
|
+
* one Home Assistant projection.
|
|
26269
|
+
*/
|
|
26270
|
+
var NetworkLinkStatusSchema = object({
|
|
26271
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
26272
|
+
type: _enum([
|
|
26273
|
+
"wifi",
|
|
26274
|
+
"ethernet",
|
|
26275
|
+
"cellular",
|
|
26276
|
+
"unknown"
|
|
26277
|
+
]),
|
|
26278
|
+
/**
|
|
26279
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
26280
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
26281
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
26282
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
26283
|
+
* SKIP a null rather than coerce it.
|
|
26284
|
+
*/
|
|
26285
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
26286
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
26287
|
+
rssiDbm: number().optional(),
|
|
26288
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
26289
|
+
ssid: string().optional(),
|
|
26290
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
26291
|
+
lastUpdated: number()
|
|
26292
|
+
});
|
|
26293
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
26294
|
+
deviceId: number(),
|
|
26295
|
+
status: NetworkLinkStatusSchema
|
|
26296
|
+
});
|
|
26297
|
+
/**
|
|
25978
26298
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
25979
26299
|
* jitter, and observed/peak bandwidth per device + per client.
|
|
25980
26300
|
*
|
|
@@ -27216,203 +27536,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
27216
27536
|
deviceId: number(),
|
|
27217
27537
|
status: PtzAutotrackStatusSchema
|
|
27218
27538
|
});
|
|
27219
|
-
/**
|
|
27220
|
-
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
27221
|
-
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
27222
|
-
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
27223
|
-
*
|
|
27224
|
-
* Why a NEW cap rather than overloading `ptz`:
|
|
27225
|
-
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
27226
|
-
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
27227
|
-
* The two are different physical models: PTZ is absolute-position + presets,
|
|
27228
|
-
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
27229
|
-
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
27230
|
-
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
27231
|
-
* the reverse:
|
|
27232
|
-
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
27233
|
-
* / `getOptions`), and
|
|
27234
|
-
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
27235
|
-
* robot camera shows up in the existing PTZ control path without every
|
|
27236
|
-
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
27237
|
-
* not here (see the addon design note):
|
|
27238
|
-
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
27239
|
-
* ptz.stop() → navigation.stop()
|
|
27240
|
-
* ptz.goHome() → navigation.runAction('goHome')
|
|
27241
|
-
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
27242
|
-
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
27243
|
-
*
|
|
27244
|
-
* ## Continuous drive
|
|
27245
|
-
*
|
|
27246
|
-
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
27247
|
-
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
27248
|
-
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
27249
|
-
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
27250
|
-
* coalesce them. The UI owns the cadence.
|
|
27251
|
-
*
|
|
27252
|
-
* ## The action dictionary
|
|
27253
|
-
*
|
|
27254
|
-
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
27255
|
-
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
27256
|
-
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
27257
|
-
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
27258
|
-
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
27259
|
-
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
27260
|
-
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
27261
|
-
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
27262
|
-
*
|
|
27263
|
-
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
27264
|
-
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
27265
|
-
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
27266
|
-
* every device handle. A future nodedreame publish adds a typed
|
|
27267
|
-
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
27268
|
-
* provider can then swap the raw calls for the typed methods with no change to
|
|
27269
|
-
* THIS contract.
|
|
27270
|
-
*/
|
|
27271
|
-
/**
|
|
27272
|
-
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
27273
|
-
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
27274
|
-
* halts it.
|
|
27275
|
-
*
|
|
27276
|
-
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
27277
|
-
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
27278
|
-
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
27279
|
-
* vector by it (drivers without proportional drive ignore it).
|
|
27280
|
-
*
|
|
27281
|
-
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
27282
|
-
* axis alone; an all-undefined nudge is a no-op.
|
|
27283
|
-
*/
|
|
27284
|
-
var NavigationMoveCommandSchema = object({
|
|
27285
|
-
pan: number().min(-1).max(1).optional(),
|
|
27286
|
-
tilt: number().min(-1).max(1).optional(),
|
|
27287
|
-
speed: number().min(0).max(1).optional()
|
|
27288
|
-
});
|
|
27289
|
-
/**
|
|
27290
|
-
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
27291
|
-
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
27292
|
-
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
27293
|
-
* `playSound` (see the `sound` dictionary entries).
|
|
27294
|
-
*/
|
|
27295
|
-
var NavigationActionIdSchema = _enum([
|
|
27296
|
-
"goHome",
|
|
27297
|
-
"locate",
|
|
27298
|
-
"spotClean",
|
|
27299
|
-
"findPet",
|
|
27300
|
-
"personFollow",
|
|
27301
|
-
"stop",
|
|
27302
|
-
"startClean",
|
|
27303
|
-
"pauseClean",
|
|
27304
|
-
"dockWash",
|
|
27305
|
-
"autoEmpty",
|
|
27306
|
-
"flashOn",
|
|
27307
|
-
"flashOff"
|
|
27308
|
-
]);
|
|
27309
|
-
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27310
|
-
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27311
|
-
/**
|
|
27312
|
-
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27313
|
-
* native panel and the PTZ mimic render as a button.
|
|
27314
|
-
*
|
|
27315
|
-
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27316
|
-
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27317
|
-
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27318
|
-
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27319
|
-
* - `label` — operator-facing English label.
|
|
27320
|
-
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27321
|
-
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27322
|
-
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27323
|
-
* flips it from config, never by editing code.
|
|
27324
|
-
*/
|
|
27325
|
-
var NavigationActionEntrySchema = object({
|
|
27326
|
-
id: string(),
|
|
27327
|
-
kind: NavigationEntryKindSchema,
|
|
27328
|
-
label: string(),
|
|
27329
|
-
icon: string(),
|
|
27330
|
-
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27331
|
-
soundId: number().int().optional(),
|
|
27332
|
-
/** Per-device feature flag — render this entry only when true. */
|
|
27333
|
-
enabled: boolean()
|
|
27334
|
-
});
|
|
27335
|
-
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27336
|
-
var NavigationPointSchema = object({
|
|
27337
|
-
x: number(),
|
|
27338
|
-
y: number()
|
|
27339
|
-
});
|
|
27340
|
-
/**
|
|
27341
|
-
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27342
|
-
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27343
|
-
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27344
|
-
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27345
|
-
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27346
|
-
* that are not dictionary entries.
|
|
27347
|
-
*
|
|
27348
|
-
* - `move` / `stop` — the momentary drive joystick.
|
|
27349
|
-
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27350
|
-
* map-coordinate plumbing is wired.
|
|
27351
|
-
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27352
|
-
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27353
|
-
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27354
|
-
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27355
|
-
* camera-service control; needs an active stream).
|
|
27356
|
-
*/
|
|
27357
|
-
var NavigationFeaturesSchema = object({
|
|
27358
|
-
move: boolean(),
|
|
27359
|
-
stop: boolean(),
|
|
27360
|
-
goToPoint: boolean(),
|
|
27361
|
-
runAction: boolean(),
|
|
27362
|
-
playSound: boolean(),
|
|
27363
|
-
light: boolean(),
|
|
27364
|
-
lightMode: boolean()
|
|
27365
|
-
});
|
|
27366
|
-
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27367
|
-
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27368
|
-
/**
|
|
27369
|
-
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27370
|
-
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27371
|
-
* - `following` — person/pet follow is currently armed.
|
|
27372
|
-
* - `flash` — the on-camera fill light is on.
|
|
27373
|
-
* - `lightMode` — auto vs manual fill-light mode.
|
|
27374
|
-
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27375
|
-
* `lightMode === 'manual'`.
|
|
27376
|
-
*/
|
|
27377
|
-
var NavigationStatusSchema = object({
|
|
27378
|
-
mode: _enum([
|
|
27379
|
-
"idle",
|
|
27380
|
-
"cleaning",
|
|
27381
|
-
"spot",
|
|
27382
|
-
"following",
|
|
27383
|
-
"goto",
|
|
27384
|
-
"returning",
|
|
27385
|
-
"paused",
|
|
27386
|
-
"unknown"
|
|
27387
|
-
]),
|
|
27388
|
-
following: boolean(),
|
|
27389
|
-
flash: boolean(),
|
|
27390
|
-
lightMode: NavigationLightModeSchema,
|
|
27391
|
-
lightLevel: number().min(40).max(100),
|
|
27392
|
-
/** Ms epoch when the slice was last updated. */
|
|
27393
|
-
lastChangedAt: number()
|
|
27394
|
-
});
|
|
27395
|
-
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27396
|
-
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({
|
|
27397
|
-
deviceId: number(),
|
|
27398
|
-
actionId: NavigationActionIdSchema
|
|
27399
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27400
|
-
deviceId: number(),
|
|
27401
|
-
soundId: number().int()
|
|
27402
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27403
|
-
deviceId: number(),
|
|
27404
|
-
on: boolean()
|
|
27405
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27406
|
-
deviceId: number(),
|
|
27407
|
-
mode: NavigationLightModeSchema,
|
|
27408
|
-
level: number().min(40).max(100).optional()
|
|
27409
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27410
|
-
deviceId: number(),
|
|
27411
|
-
level: number().min(40).max(100)
|
|
27412
|
-
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27413
|
-
deviceId: number(),
|
|
27414
|
-
status: NavigationStatusSchema
|
|
27415
|
-
});
|
|
27416
27539
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
27417
27540
|
kind: "mutation",
|
|
27418
27541
|
auth: "admin"
|
|
@@ -34727,6 +34850,12 @@ Object.freeze({
|
|
|
34727
34850
|
addonId: null,
|
|
34728
34851
|
access: "view"
|
|
34729
34852
|
},
|
|
34853
|
+
"storage.listDrainProgress": {
|
|
34854
|
+
capName: "storage",
|
|
34855
|
+
capScope: "system",
|
|
34856
|
+
addonId: null,
|
|
34857
|
+
access: "view"
|
|
34858
|
+
},
|
|
34730
34859
|
"storage.listLocationDeclarations": {
|
|
34731
34860
|
capName: "storage",
|
|
34732
34861
|
capScope: "system",
|
|
@@ -34871,6 +35000,12 @@ Object.freeze({
|
|
|
34871
35000
|
addonId: null,
|
|
34872
35001
|
access: "view"
|
|
34873
35002
|
},
|
|
35003
|
+
"storageOccupancy.getOccupancy": {
|
|
35004
|
+
capName: "storage-occupancy",
|
|
35005
|
+
capScope: "system",
|
|
35006
|
+
addonId: null,
|
|
35007
|
+
access: "view"
|
|
35008
|
+
},
|
|
34874
35009
|
"storageProvider.abortUpload": {
|
|
34875
35010
|
capName: "storage-provider",
|
|
34876
35011
|
capScope: "system",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as crypto$1 from "node:crypto";
|
|
2
|
-
//#region ../types/dist/event-category-
|
|
2
|
+
//#region ../types/dist/event-category-CnLqLOKs.mjs
|
|
3
3
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4
4
|
EventCategory["SystemBoot"] = "system.boot";
|
|
5
5
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -194,6 +194,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
194
194
|
EventCategory["ProcessCrashed"] = "process.crashed";
|
|
195
195
|
EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
|
|
196
196
|
EventCategory["ProcessRestarted"] = "process.restarted";
|
|
197
|
+
/**
|
|
198
|
+
* The SET of storage locations changed — one was created, edited, enabled,
|
|
199
|
+
* disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
|
|
200
|
+
*
|
|
201
|
+
* Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
|
|
202
|
+
* it must also converge on its own periodic path, because a dropped event
|
|
203
|
+
* must not leave a node writing to yesterday's disk set forever. It exists
|
|
204
|
+
* because there was NO signal at all — an operator who added a second
|
|
205
|
+
* recordings disk in the admin UI got nothing, and the recorder kept its
|
|
206
|
+
* resolved locations until something else happened to re-resolve them
|
|
207
|
+
* (D387). Payload `StorageLocationsChangedPayload`.
|
|
208
|
+
*/
|
|
209
|
+
EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
|
|
197
210
|
EventCategory["RecordingStarted"] = "recording.started";
|
|
198
211
|
EventCategory["RecordingStopped"] = "recording.stopped";
|
|
199
212
|
EventCategory["RecordingError"] = "recording.error";
|
|
@@ -8677,6 +8690,21 @@ var StorageCleanupJobSchema = object({
|
|
|
8677
8690
|
});
|
|
8678
8691
|
var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
|
|
8679
8692
|
/**
|
|
8693
|
+
* The one typed state of a storage location. Authoritative Zod schema — the TS
|
|
8694
|
+
* alias below is `z.infer<>` of it, never a second spelling.
|
|
8695
|
+
*/
|
|
8696
|
+
var StorageLocationModeSchema = _enum([
|
|
8697
|
+
"active",
|
|
8698
|
+
"readonly",
|
|
8699
|
+
"drain",
|
|
8700
|
+
"disabled"
|
|
8701
|
+
]);
|
|
8702
|
+
_enum([
|
|
8703
|
+
"normal",
|
|
8704
|
+
"never",
|
|
8705
|
+
"drain"
|
|
8706
|
+
]);
|
|
8707
|
+
/**
|
|
8680
8708
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8681
8709
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8682
8710
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8742,6 +8770,21 @@ var StorageLocationSchema = object({
|
|
|
8742
8770
|
* stops existing rather than being re-derived on every read.
|
|
8743
8771
|
*/
|
|
8744
8772
|
enabled: boolean().optional(),
|
|
8773
|
+
/**
|
|
8774
|
+
* THE state of this location (D385), and the only authority on what may be
|
|
8775
|
+
* written, read or evicted here. Interpreted in exactly one place —
|
|
8776
|
+
* `storage-location-mode.ts` — which also folds the legacy
|
|
8777
|
+
* `enabled` / `config.readOnly` pair into a mode so an old row is never
|
|
8778
|
+
* ambiguous.
|
|
8779
|
+
*
|
|
8780
|
+
* OPTIONAL only for the wire and for rows written before D385: absence is
|
|
8781
|
+
* resolved by `resolveLocationMode`, and the orchestrator stamps every
|
|
8782
|
+
* unstamped row ONCE at hydrate so absence stops existing rather than being
|
|
8783
|
+
* re-derived on every read. `enabled` survives one release as a DERIVED
|
|
8784
|
+
* mirror (`mode === 'active'`); `withLocationMode` is the only writer of
|
|
8785
|
+
* either, so the two cannot disagree.
|
|
8786
|
+
*/
|
|
8787
|
+
mode: StorageLocationModeSchema.optional(),
|
|
8745
8788
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
8746
8789
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
8747
8790
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -8749,11 +8792,46 @@ var StorageLocationSchema = object({
|
|
|
8749
8792
|
totalBytes: number(),
|
|
8750
8793
|
availableBytes: number()
|
|
8751
8794
|
}).nullable().optional(),
|
|
8795
|
+
/**
|
|
8796
|
+
* How much of that volume CamStack ITSELF holds on this location (D388) —
|
|
8797
|
+
* COMPUTED at read time from the `storage-occupancy` providers' own figures,
|
|
8798
|
+
* never persisted, never a filesystem walk.
|
|
8799
|
+
*
|
|
8800
|
+
* **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
|
|
8801
|
+
* location yet — nobody stores here, the owning addon is down, or the first
|
|
8802
|
+
* refresh has not completed. A UI must omit the segment rather than draw it
|
|
8803
|
+
* at zero, which would claim we occupy nothing (D315). It is an OBJECT and
|
|
8804
|
+
* not a bare number precisely so that a `?? 0` on the consuming side has to
|
|
8805
|
+
* be spelled out loud instead of appearing by accident.
|
|
8806
|
+
*
|
|
8807
|
+
* `measuredAtMs` is the OLDEST contributing measurement, so it is honest
|
|
8808
|
+
* about the whole figure rather than about its freshest part.
|
|
8809
|
+
*/
|
|
8810
|
+
owned: object({
|
|
8811
|
+
bytes: number().int().nonnegative(),
|
|
8812
|
+
measuredAtMs: number().int().nonnegative()
|
|
8813
|
+
}).optional(),
|
|
8752
8814
|
createdAt: number(),
|
|
8753
8815
|
updatedAt: number()
|
|
8754
8816
|
});
|
|
8755
8817
|
object({ isDefault: boolean().optional() });
|
|
8756
8818
|
/**
|
|
8819
|
+
* How far a `drain` has got (D386) — the read a UI renders, and nothing more.
|
|
8820
|
+
*
|
|
8821
|
+
* `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
|
|
8822
|
+
* OBSERVED and is `null` when it has observed none. Never a fabricated date: a
|
|
8823
|
+
* drain with no observed growth has no honest ETA, and inventing one is how an
|
|
8824
|
+
* operator learns not to believe the screen.
|
|
8825
|
+
*/
|
|
8826
|
+
var StorageDrainProgressSchema = object({
|
|
8827
|
+
locationId: string(),
|
|
8828
|
+
startedAtMs: number(),
|
|
8829
|
+
startBytes: number(),
|
|
8830
|
+
bytesRemaining: number(),
|
|
8831
|
+
drained: boolean(),
|
|
8832
|
+
estimatedEmptyAtMs: number().nullable()
|
|
8833
|
+
});
|
|
8834
|
+
/**
|
|
8757
8835
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8758
8836
|
* Either:
|
|
8759
8837
|
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
@@ -21857,7 +21935,7 @@ method(object({
|
|
|
21857
21935
|
}), _void(), {
|
|
21858
21936
|
kind: "mutation",
|
|
21859
21937
|
auth: "admin"
|
|
21860
|
-
}), method(object({ id: string() }), object({
|
|
21938
|
+
}), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
|
|
21861
21939
|
ok: boolean(),
|
|
21862
21940
|
error: string().optional()
|
|
21863
21941
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
@@ -21927,6 +22005,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
21927
22005
|
kind: "mutation",
|
|
21928
22006
|
auth: "admin"
|
|
21929
22007
|
}), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
|
|
22008
|
+
/**
|
|
22009
|
+
* `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
|
|
22010
|
+
* location (D388).
|
|
22011
|
+
*
|
|
22012
|
+
* ## Why this is not `storage-evictable`
|
|
22013
|
+
*
|
|
22014
|
+
* `storage-evictable.getEvictableUsage` looks like the same question and is
|
|
22015
|
+
* not, in two ways that both matter and both bite hardest on the locations an
|
|
22016
|
+
* operator most wants a figure for:
|
|
22017
|
+
*
|
|
22018
|
+
* - it reports the whole eviction DOMAIN, not the location. `recordings:default`
|
|
22019
|
+
* and `recordingsLow:default` deliberately share one root and evict as one
|
|
22020
|
+
* oldest-first pool, so both answer with the SAME combined total. As an
|
|
22021
|
+
* occupancy figure that double-counts the disk.
|
|
22022
|
+
* - it reports ZERO for a location whose eviction policy is `never` (D385) —
|
|
22023
|
+
* a `readonly` or `disabled` disk. Those are exactly the disks an operator
|
|
22024
|
+
* is retiring and staring at.
|
|
22025
|
+
*
|
|
22026
|
+
* So this is its own contract with its own quantity, and the quantity is
|
|
22027
|
+
* OCCUPIED: every byte the addon holds on that location, whether or not it
|
|
22028
|
+
* would ever be willing to delete it. A provider that can only answer
|
|
22029
|
+
* "evictable" must not register here — a number that silently means different
|
|
22030
|
+
* things per class is worse than no number.
|
|
22031
|
+
*
|
|
22032
|
+
* ## Absence is an answer
|
|
22033
|
+
*
|
|
22034
|
+
* A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
|
|
22035
|
+
* stamps `StorageLocation.owned` only for locations it has a report for, and
|
|
22036
|
+
* the field is an OBJECT rather than a bare number so that a `?? 0` on the
|
|
22037
|
+
* consuming side has to be written out loud instead of appearing by accident.
|
|
22038
|
+
*
|
|
22039
|
+
* `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
|
|
22040
|
+
* a public client surface. Clients read the stamped `StorageLocation.owned`.
|
|
22041
|
+
*/
|
|
22042
|
+
/** One provider's occupancy answer for one location. */
|
|
22043
|
+
var StorageOccupancyReportSchema = object({
|
|
22044
|
+
locationId: string(),
|
|
22045
|
+
/** Bytes this provider holds on THAT location — not its eviction domain, and
|
|
22046
|
+
* not net of what it is willing to delete. */
|
|
22047
|
+
ownedBytes: number().int().nonnegative(),
|
|
22048
|
+
/** When the provider last actually measured this. The orchestrator carries it
|
|
22049
|
+
* through so a UI can say how old the figure is instead of implying "now". */
|
|
22050
|
+
measuredAtMs: number().int().nonnegative()
|
|
22051
|
+
});
|
|
22052
|
+
method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
|
|
21930
22053
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
21931
22054
|
providerId: string().min(1),
|
|
21932
22055
|
displayName: string().min(1),
|
|
@@ -23562,39 +23685,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
|
|
|
23562
23685
|
deviceId: number(),
|
|
23563
23686
|
status: BatteryStatusSchema
|
|
23564
23687
|
});
|
|
23565
|
-
/**
|
|
23566
|
-
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23567
|
-
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23568
|
-
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23569
|
-
* one Home Assistant projection.
|
|
23570
|
-
*/
|
|
23571
|
-
var NetworkLinkStatusSchema = object({
|
|
23572
|
-
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23573
|
-
type: _enum([
|
|
23574
|
-
"wifi",
|
|
23575
|
-
"ethernet",
|
|
23576
|
-
"cellular",
|
|
23577
|
-
"unknown"
|
|
23578
|
-
]),
|
|
23579
|
-
/**
|
|
23580
|
-
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23581
|
-
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23582
|
-
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23583
|
-
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23584
|
-
* SKIP a null rather than coerce it.
|
|
23585
|
-
*/
|
|
23586
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
23587
|
-
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23588
|
-
rssiDbm: number().optional(),
|
|
23589
|
-
/** Network name of a wireless link, when the firmware reports it. */
|
|
23590
|
-
ssid: string().optional(),
|
|
23591
|
-
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23592
|
-
lastUpdated: number()
|
|
23593
|
-
});
|
|
23594
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
23595
|
-
deviceId: number(),
|
|
23596
|
-
status: NetworkLinkStatusSchema
|
|
23597
|
-
});
|
|
23598
23688
|
object({
|
|
23599
23689
|
on: boolean(),
|
|
23600
23690
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -25948,6 +26038,236 @@ DeviceType.Camera, method(object({
|
|
|
25948
26038
|
detection: NativeDetectionSchema
|
|
25949
26039
|
});
|
|
25950
26040
|
/**
|
|
26041
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
26042
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
26043
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
26044
|
+
*
|
|
26045
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
26046
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
26047
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
26048
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
26049
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
26050
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
26051
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
26052
|
+
* the reverse:
|
|
26053
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
26054
|
+
* / `getOptions`), and
|
|
26055
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
26056
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
26057
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
26058
|
+
* not here (see the addon design note):
|
|
26059
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
26060
|
+
* ptz.stop() → navigation.stop()
|
|
26061
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
26062
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
26063
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
26064
|
+
*
|
|
26065
|
+
* ## Continuous drive
|
|
26066
|
+
*
|
|
26067
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
26068
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
26069
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
26070
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
26071
|
+
* coalesce them. The UI owns the cadence.
|
|
26072
|
+
*
|
|
26073
|
+
* ## The action dictionary
|
|
26074
|
+
*
|
|
26075
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
26076
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
26077
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
26078
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
26079
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
26080
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
26081
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
26082
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
26083
|
+
*
|
|
26084
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
26085
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
26086
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
26087
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
26088
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
26089
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
26090
|
+
* THIS contract.
|
|
26091
|
+
*/
|
|
26092
|
+
/**
|
|
26093
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
26094
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
26095
|
+
* halts it.
|
|
26096
|
+
*
|
|
26097
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
26098
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
26099
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
26100
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
26101
|
+
*
|
|
26102
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
26103
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
26104
|
+
*/
|
|
26105
|
+
var NavigationMoveCommandSchema = object({
|
|
26106
|
+
pan: number().min(-1).max(1).optional(),
|
|
26107
|
+
tilt: number().min(-1).max(1).optional(),
|
|
26108
|
+
speed: number().min(0).max(1).optional()
|
|
26109
|
+
});
|
|
26110
|
+
/**
|
|
26111
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
26112
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
26113
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
26114
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
26115
|
+
*/
|
|
26116
|
+
var NavigationActionIdSchema = _enum([
|
|
26117
|
+
"goHome",
|
|
26118
|
+
"locate",
|
|
26119
|
+
"spotClean",
|
|
26120
|
+
"findPet",
|
|
26121
|
+
"personFollow",
|
|
26122
|
+
"stop",
|
|
26123
|
+
"startClean",
|
|
26124
|
+
"pauseClean",
|
|
26125
|
+
"dockWash",
|
|
26126
|
+
"autoEmpty",
|
|
26127
|
+
"flashOn",
|
|
26128
|
+
"flashOff"
|
|
26129
|
+
]);
|
|
26130
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
26131
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
26132
|
+
/**
|
|
26133
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
26134
|
+
* native panel and the PTZ mimic render as a button.
|
|
26135
|
+
*
|
|
26136
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
26137
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
26138
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
26139
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
26140
|
+
* - `label` — operator-facing English label.
|
|
26141
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
26142
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
26143
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
26144
|
+
* flips it from config, never by editing code.
|
|
26145
|
+
*/
|
|
26146
|
+
var NavigationActionEntrySchema = object({
|
|
26147
|
+
id: string(),
|
|
26148
|
+
kind: NavigationEntryKindSchema,
|
|
26149
|
+
label: string(),
|
|
26150
|
+
icon: string(),
|
|
26151
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
26152
|
+
soundId: number().int().optional(),
|
|
26153
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
26154
|
+
enabled: boolean()
|
|
26155
|
+
});
|
|
26156
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
26157
|
+
var NavigationPointSchema = object({
|
|
26158
|
+
x: number(),
|
|
26159
|
+
y: number()
|
|
26160
|
+
});
|
|
26161
|
+
/**
|
|
26162
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
26163
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
26164
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
26165
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
26166
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
26167
|
+
* that are not dictionary entries.
|
|
26168
|
+
*
|
|
26169
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
26170
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
26171
|
+
* map-coordinate plumbing is wired.
|
|
26172
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
26173
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
26174
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
26175
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
26176
|
+
* camera-service control; needs an active stream).
|
|
26177
|
+
*/
|
|
26178
|
+
var NavigationFeaturesSchema = object({
|
|
26179
|
+
move: boolean(),
|
|
26180
|
+
stop: boolean(),
|
|
26181
|
+
goToPoint: boolean(),
|
|
26182
|
+
runAction: boolean(),
|
|
26183
|
+
playSound: boolean(),
|
|
26184
|
+
light: boolean(),
|
|
26185
|
+
lightMode: boolean()
|
|
26186
|
+
});
|
|
26187
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
26188
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
26189
|
+
/**
|
|
26190
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
26191
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
26192
|
+
* - `following` — person/pet follow is currently armed.
|
|
26193
|
+
* - `flash` — the on-camera fill light is on.
|
|
26194
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
26195
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
26196
|
+
* `lightMode === 'manual'`.
|
|
26197
|
+
*/
|
|
26198
|
+
var NavigationStatusSchema = object({
|
|
26199
|
+
mode: _enum([
|
|
26200
|
+
"idle",
|
|
26201
|
+
"cleaning",
|
|
26202
|
+
"spot",
|
|
26203
|
+
"following",
|
|
26204
|
+
"goto",
|
|
26205
|
+
"returning",
|
|
26206
|
+
"paused",
|
|
26207
|
+
"unknown"
|
|
26208
|
+
]),
|
|
26209
|
+
following: boolean(),
|
|
26210
|
+
flash: boolean(),
|
|
26211
|
+
lightMode: NavigationLightModeSchema,
|
|
26212
|
+
lightLevel: number().min(40).max(100),
|
|
26213
|
+
/** Ms epoch when the slice was last updated. */
|
|
26214
|
+
lastChangedAt: number()
|
|
26215
|
+
});
|
|
26216
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
26217
|
+
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({
|
|
26218
|
+
deviceId: number(),
|
|
26219
|
+
actionId: NavigationActionIdSchema
|
|
26220
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
26221
|
+
deviceId: number(),
|
|
26222
|
+
soundId: number().int()
|
|
26223
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
26224
|
+
deviceId: number(),
|
|
26225
|
+
on: boolean()
|
|
26226
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
26227
|
+
deviceId: number(),
|
|
26228
|
+
mode: NavigationLightModeSchema,
|
|
26229
|
+
level: number().min(40).max(100).optional()
|
|
26230
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
26231
|
+
deviceId: number(),
|
|
26232
|
+
level: number().min(40).max(100)
|
|
26233
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
26234
|
+
deviceId: number(),
|
|
26235
|
+
status: NavigationStatusSchema
|
|
26236
|
+
});
|
|
26237
|
+
/**
|
|
26238
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
26239
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
26240
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
26241
|
+
* one Home Assistant projection.
|
|
26242
|
+
*/
|
|
26243
|
+
var NetworkLinkStatusSchema = object({
|
|
26244
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
26245
|
+
type: _enum([
|
|
26246
|
+
"wifi",
|
|
26247
|
+
"ethernet",
|
|
26248
|
+
"cellular",
|
|
26249
|
+
"unknown"
|
|
26250
|
+
]),
|
|
26251
|
+
/**
|
|
26252
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
26253
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
26254
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
26255
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
26256
|
+
* SKIP a null rather than coerce it.
|
|
26257
|
+
*/
|
|
26258
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
26259
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
26260
|
+
rssiDbm: number().optional(),
|
|
26261
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
26262
|
+
ssid: string().optional(),
|
|
26263
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
26264
|
+
lastUpdated: number()
|
|
26265
|
+
});
|
|
26266
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
26267
|
+
deviceId: number(),
|
|
26268
|
+
status: NetworkLinkStatusSchema
|
|
26269
|
+
});
|
|
26270
|
+
/**
|
|
25951
26271
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
25952
26272
|
* jitter, and observed/peak bandwidth per device + per client.
|
|
25953
26273
|
*
|
|
@@ -27189,203 +27509,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
27189
27509
|
deviceId: number(),
|
|
27190
27510
|
status: PtzAutotrackStatusSchema
|
|
27191
27511
|
});
|
|
27192
|
-
/**
|
|
27193
|
-
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
27194
|
-
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
27195
|
-
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
27196
|
-
*
|
|
27197
|
-
* Why a NEW cap rather than overloading `ptz`:
|
|
27198
|
-
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
27199
|
-
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
27200
|
-
* The two are different physical models: PTZ is absolute-position + presets,
|
|
27201
|
-
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
27202
|
-
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
27203
|
-
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
27204
|
-
* the reverse:
|
|
27205
|
-
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
27206
|
-
* / `getOptions`), and
|
|
27207
|
-
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
27208
|
-
* robot camera shows up in the existing PTZ control path without every
|
|
27209
|
-
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
27210
|
-
* not here (see the addon design note):
|
|
27211
|
-
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
27212
|
-
* ptz.stop() → navigation.stop()
|
|
27213
|
-
* ptz.goHome() → navigation.runAction('goHome')
|
|
27214
|
-
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
27215
|
-
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
27216
|
-
*
|
|
27217
|
-
* ## Continuous drive
|
|
27218
|
-
*
|
|
27219
|
-
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
27220
|
-
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
27221
|
-
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
27222
|
-
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
27223
|
-
* coalesce them. The UI owns the cadence.
|
|
27224
|
-
*
|
|
27225
|
-
* ## The action dictionary
|
|
27226
|
-
*
|
|
27227
|
-
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
27228
|
-
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
27229
|
-
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
27230
|
-
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
27231
|
-
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
27232
|
-
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
27233
|
-
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
27234
|
-
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
27235
|
-
*
|
|
27236
|
-
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
27237
|
-
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
27238
|
-
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
27239
|
-
* every device handle. A future nodedreame publish adds a typed
|
|
27240
|
-
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
27241
|
-
* provider can then swap the raw calls for the typed methods with no change to
|
|
27242
|
-
* THIS contract.
|
|
27243
|
-
*/
|
|
27244
|
-
/**
|
|
27245
|
-
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
27246
|
-
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
27247
|
-
* halts it.
|
|
27248
|
-
*
|
|
27249
|
-
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
27250
|
-
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
27251
|
-
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
27252
|
-
* vector by it (drivers without proportional drive ignore it).
|
|
27253
|
-
*
|
|
27254
|
-
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
27255
|
-
* axis alone; an all-undefined nudge is a no-op.
|
|
27256
|
-
*/
|
|
27257
|
-
var NavigationMoveCommandSchema = object({
|
|
27258
|
-
pan: number().min(-1).max(1).optional(),
|
|
27259
|
-
tilt: number().min(-1).max(1).optional(),
|
|
27260
|
-
speed: number().min(0).max(1).optional()
|
|
27261
|
-
});
|
|
27262
|
-
/**
|
|
27263
|
-
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
27264
|
-
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
27265
|
-
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
27266
|
-
* `playSound` (see the `sound` dictionary entries).
|
|
27267
|
-
*/
|
|
27268
|
-
var NavigationActionIdSchema = _enum([
|
|
27269
|
-
"goHome",
|
|
27270
|
-
"locate",
|
|
27271
|
-
"spotClean",
|
|
27272
|
-
"findPet",
|
|
27273
|
-
"personFollow",
|
|
27274
|
-
"stop",
|
|
27275
|
-
"startClean",
|
|
27276
|
-
"pauseClean",
|
|
27277
|
-
"dockWash",
|
|
27278
|
-
"autoEmpty",
|
|
27279
|
-
"flashOn",
|
|
27280
|
-
"flashOff"
|
|
27281
|
-
]);
|
|
27282
|
-
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27283
|
-
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27284
|
-
/**
|
|
27285
|
-
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27286
|
-
* native panel and the PTZ mimic render as a button.
|
|
27287
|
-
*
|
|
27288
|
-
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27289
|
-
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27290
|
-
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27291
|
-
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27292
|
-
* - `label` — operator-facing English label.
|
|
27293
|
-
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27294
|
-
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27295
|
-
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27296
|
-
* flips it from config, never by editing code.
|
|
27297
|
-
*/
|
|
27298
|
-
var NavigationActionEntrySchema = object({
|
|
27299
|
-
id: string(),
|
|
27300
|
-
kind: NavigationEntryKindSchema,
|
|
27301
|
-
label: string(),
|
|
27302
|
-
icon: string(),
|
|
27303
|
-
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27304
|
-
soundId: number().int().optional(),
|
|
27305
|
-
/** Per-device feature flag — render this entry only when true. */
|
|
27306
|
-
enabled: boolean()
|
|
27307
|
-
});
|
|
27308
|
-
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27309
|
-
var NavigationPointSchema = object({
|
|
27310
|
-
x: number(),
|
|
27311
|
-
y: number()
|
|
27312
|
-
});
|
|
27313
|
-
/**
|
|
27314
|
-
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27315
|
-
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27316
|
-
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27317
|
-
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27318
|
-
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27319
|
-
* that are not dictionary entries.
|
|
27320
|
-
*
|
|
27321
|
-
* - `move` / `stop` — the momentary drive joystick.
|
|
27322
|
-
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27323
|
-
* map-coordinate plumbing is wired.
|
|
27324
|
-
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27325
|
-
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27326
|
-
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27327
|
-
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27328
|
-
* camera-service control; needs an active stream).
|
|
27329
|
-
*/
|
|
27330
|
-
var NavigationFeaturesSchema = object({
|
|
27331
|
-
move: boolean(),
|
|
27332
|
-
stop: boolean(),
|
|
27333
|
-
goToPoint: boolean(),
|
|
27334
|
-
runAction: boolean(),
|
|
27335
|
-
playSound: boolean(),
|
|
27336
|
-
light: boolean(),
|
|
27337
|
-
lightMode: boolean()
|
|
27338
|
-
});
|
|
27339
|
-
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27340
|
-
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27341
|
-
/**
|
|
27342
|
-
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27343
|
-
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27344
|
-
* - `following` — person/pet follow is currently armed.
|
|
27345
|
-
* - `flash` — the on-camera fill light is on.
|
|
27346
|
-
* - `lightMode` — auto vs manual fill-light mode.
|
|
27347
|
-
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27348
|
-
* `lightMode === 'manual'`.
|
|
27349
|
-
*/
|
|
27350
|
-
var NavigationStatusSchema = object({
|
|
27351
|
-
mode: _enum([
|
|
27352
|
-
"idle",
|
|
27353
|
-
"cleaning",
|
|
27354
|
-
"spot",
|
|
27355
|
-
"following",
|
|
27356
|
-
"goto",
|
|
27357
|
-
"returning",
|
|
27358
|
-
"paused",
|
|
27359
|
-
"unknown"
|
|
27360
|
-
]),
|
|
27361
|
-
following: boolean(),
|
|
27362
|
-
flash: boolean(),
|
|
27363
|
-
lightMode: NavigationLightModeSchema,
|
|
27364
|
-
lightLevel: number().min(40).max(100),
|
|
27365
|
-
/** Ms epoch when the slice was last updated. */
|
|
27366
|
-
lastChangedAt: number()
|
|
27367
|
-
});
|
|
27368
|
-
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27369
|
-
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({
|
|
27370
|
-
deviceId: number(),
|
|
27371
|
-
actionId: NavigationActionIdSchema
|
|
27372
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27373
|
-
deviceId: number(),
|
|
27374
|
-
soundId: number().int()
|
|
27375
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27376
|
-
deviceId: number(),
|
|
27377
|
-
on: boolean()
|
|
27378
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27379
|
-
deviceId: number(),
|
|
27380
|
-
mode: NavigationLightModeSchema,
|
|
27381
|
-
level: number().min(40).max(100).optional()
|
|
27382
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27383
|
-
deviceId: number(),
|
|
27384
|
-
level: number().min(40).max(100)
|
|
27385
|
-
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27386
|
-
deviceId: number(),
|
|
27387
|
-
status: NavigationStatusSchema
|
|
27388
|
-
});
|
|
27389
27512
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
27390
27513
|
kind: "mutation",
|
|
27391
27514
|
auth: "admin"
|
|
@@ -34700,6 +34823,12 @@ Object.freeze({
|
|
|
34700
34823
|
addonId: null,
|
|
34701
34824
|
access: "view"
|
|
34702
34825
|
},
|
|
34826
|
+
"storage.listDrainProgress": {
|
|
34827
|
+
capName: "storage",
|
|
34828
|
+
capScope: "system",
|
|
34829
|
+
addonId: null,
|
|
34830
|
+
access: "view"
|
|
34831
|
+
},
|
|
34703
34832
|
"storage.listLocationDeclarations": {
|
|
34704
34833
|
capName: "storage",
|
|
34705
34834
|
capScope: "system",
|
|
@@ -34844,6 +34973,12 @@ Object.freeze({
|
|
|
34844
34973
|
addonId: null,
|
|
34845
34974
|
access: "view"
|
|
34846
34975
|
},
|
|
34976
|
+
"storageOccupancy.getOccupancy": {
|
|
34977
|
+
capName: "storage-occupancy",
|
|
34978
|
+
capScope: "system",
|
|
34979
|
+
addonId: null,
|
|
34980
|
+
access: "view"
|
|
34981
|
+
},
|
|
34847
34982
|
"storageProvider.abortUpload": {
|
|
34848
34983
|
capName: "storage-provider",
|
|
34849
34984
|
capScope: "system",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-export-alexa",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.86",
|
|
4
4
|
"description": "Alexa Smart Home Skill export — hub-side OAuth provider + directive handler. The companion AWS Lambda forwards Alexa directives to this addon's /addon/export-alexa/directive endpoint.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|