@camstack/addon-pipeline 1.2.200 → 1.2.202
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/audio-analyzer/index.js +2 -2
- package/dist/audio-analyzer/index.mjs +2 -2
- package/dist/{default-detection-model-c1LY6thP.mjs → default-detection-model-fUMLQHB2.mjs} +1 -1
- package/dist/{default-detection-model-BsmxtyZx.js → default-detection-model-nKgB-_mg.js} +1 -1
- package/dist/detection-pipeline/index.js +5 -5
- package/dist/detection-pipeline/index.mjs +4 -4
- package/dist/{dist-D2YTTkRf.js → dist-Bd875pfj.js} +540 -232
- package/dist/{dist-mEsrAAc3.mjs → dist-D2jcEuZD.mjs} +493 -233
- package/dist/{lazy-sharp-B5bW34uC.js → lazy-sharp-B4KrLp0u.js} +1 -1
- package/dist/motion-wasm/index.js +2 -2
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-CUxep5tc.mjs → node-CmfXSgr3.mjs} +420 -381
- package/dist/{node-x3YokJkD.js → node-dwhLC9Fh.js} +423 -378
- package/dist/pipeline-runner/index.js +41 -26
- package/dist/pipeline-runner/index.mjs +40 -25
- package/dist/{process-memory-CFc4D9A2.js → process-memory-BDRJK5Vq.js} +1 -1
- package/dist/{process-memory-BCqpTruN.mjs → process-memory-CH5qO7AX.mjs} +1 -1
- package/dist/recorder/index.js +4455 -4097
- package/dist/recorder/index.mjs +6085 -5727
- package/dist/{segment-demux-js-xHtB450F.mjs → segment-demux-js-BHTuEBhC.mjs} +1 -1
- package/dist/{segment-demux-js-DUZVURQd.js → segment-demux-js-cmfLROII.js} +1 -1
- package/dist/session-decode/decode-worker-child.js +234 -24
- package/dist/session-decode/decode-worker-child.mjs +233 -23
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CLXImQ3R.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DZcCQR5t.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CrzkEz67.mjs +26 -0
- package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-D62O5bRa.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-cYr6Swud.mjs} +1 -1
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-D_cZQhBA.mjs → hostInit-CZt5Lq_M.mjs} +3 -3
- package/dist/stream-broker/index.js +3 -3
- package/dist/stream-broker/index.mjs +3 -3
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/{worker-protocol-CRDaBlJl.js → worker-protocol--PcFsRrE.js} +1 -1
- package/dist/{worker-protocol-oUamwZSn.mjs → worker-protocol-D4GyRNnY.mjs} +1 -1
- package/package.json +5 -1
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-NqqfpkYF.mjs +0 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createHash } 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";
|
|
@@ -9708,6 +9721,110 @@ var StorageCleanupJobSchema = object({
|
|
|
9708
9721
|
});
|
|
9709
9722
|
var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
|
|
9710
9723
|
/**
|
|
9724
|
+
* The storage-location STATE MODEL (D385) — one typed state, one policy module.
|
|
9725
|
+
*
|
|
9726
|
+
* A location's state used to be split across two authorities: the typed
|
|
9727
|
+
* `enabled` field (THE write switch since D383) and an untyped `config.readOnly`
|
|
9728
|
+
* key. They did not mean the same thing — `enabled: false` was still evicted
|
|
9729
|
+
* under disk pressure while `config.readOnly` was deliberately excluded — and
|
|
9730
|
+
* neither name said which. Every consumer re-derived the difference, and the
|
|
9731
|
+
* three questions that actually matter were answered in six places.
|
|
9732
|
+
*
|
|
9733
|
+
* This module is the ONLY place in the repo allowed to interpret the state. It
|
|
9734
|
+
* answers three questions and nothing else:
|
|
9735
|
+
*
|
|
9736
|
+
* - may this location be WRITTEN to? {@link modeMayWrite}
|
|
9737
|
+
* - may this location be READ? {@link modeMayRead}
|
|
9738
|
+
* - what is its eviction policy? {@link evictionPolicyForMode}
|
|
9739
|
+
*
|
|
9740
|
+
* | mode | write | read | eviction |
|
|
9741
|
+
* | ---------- | ----- | ---- | ------------------------------ |
|
|
9742
|
+
* | `active` | yes | yes | `normal` (pressure + usage cap) |
|
|
9743
|
+
* | `readonly` | no | yes | `never` |
|
|
9744
|
+
* | `drain` | no | yes | `drain` (paced, until empty) |
|
|
9745
|
+
* | `disabled` | no | no | `never` |
|
|
9746
|
+
*
|
|
9747
|
+
* `scripts/check-storage-location-mode-single-owner.ts` fails the build when
|
|
9748
|
+
* anything outside this module reads `config['readOnly']` or compares `enabled`
|
|
9749
|
+
* directly. A rule nothing checks has already been broken somewhere.
|
|
9750
|
+
*/
|
|
9751
|
+
var STORAGE_LOCATION_MODES = [
|
|
9752
|
+
"active",
|
|
9753
|
+
"readonly",
|
|
9754
|
+
"drain",
|
|
9755
|
+
"disabled"
|
|
9756
|
+
];
|
|
9757
|
+
/**
|
|
9758
|
+
* The one typed state of a storage location. Authoritative Zod schema — the TS
|
|
9759
|
+
* alias below is `z.infer<>` of it, never a second spelling.
|
|
9760
|
+
*/
|
|
9761
|
+
var StorageLocationModeSchema = _enum(STORAGE_LOCATION_MODES);
|
|
9762
|
+
_enum([
|
|
9763
|
+
"normal",
|
|
9764
|
+
"never",
|
|
9765
|
+
"drain"
|
|
9766
|
+
]);
|
|
9767
|
+
/** Is this mode a write target? Only `active` is. */
|
|
9768
|
+
function modeMayWrite(mode) {
|
|
9769
|
+
return mode === "active";
|
|
9770
|
+
}
|
|
9771
|
+
/** May this mode be read (playback, timeline, scrub, relocate source)? */
|
|
9772
|
+
function modeMayRead(mode) {
|
|
9773
|
+
return mode !== "disabled";
|
|
9774
|
+
}
|
|
9775
|
+
/** What eviction may do here. See {@link StorageEvictionPolicy}. */
|
|
9776
|
+
function evictionPolicyForMode(mode) {
|
|
9777
|
+
switch (mode) {
|
|
9778
|
+
case "active": return "normal";
|
|
9779
|
+
case "drain": return "drain";
|
|
9780
|
+
case "readonly":
|
|
9781
|
+
case "disabled": return "never";
|
|
9782
|
+
}
|
|
9783
|
+
}
|
|
9784
|
+
/**
|
|
9785
|
+
* The mode a LEGACY row implies, or `null` when it implies nothing — the row is
|
|
9786
|
+
* already stamped, or it carried neither flag.
|
|
9787
|
+
*
|
|
9788
|
+
* Both legacy flags fold to `readonly`, which is the CONSERVATIVE direction: a
|
|
9789
|
+
* state change must never start deleting footage on its own, and it must never
|
|
9790
|
+
* make footage that was still being served disappear. `enabled: false` used to
|
|
9791
|
+
* leave the location evictable under pressure; folding it to `readonly` stops
|
|
9792
|
+
* that, which is a strictly safer answer than the one it replaces.
|
|
9793
|
+
*/
|
|
9794
|
+
function legacyModeOf(location) {
|
|
9795
|
+
if (location.mode !== void 0) return null;
|
|
9796
|
+
if (location.config["readOnly"] === true) return "readonly";
|
|
9797
|
+
if (location.enabled === false) return "readonly";
|
|
9798
|
+
return null;
|
|
9799
|
+
}
|
|
9800
|
+
/**
|
|
9801
|
+
* The state of a location, stamped or folded. THE one interpretation: a row
|
|
9802
|
+
* that predates D385 is never ambiguous, and a stamped `mode` always wins over
|
|
9803
|
+
* whatever the legacy pair still says.
|
|
9804
|
+
*/
|
|
9805
|
+
function resolveLocationMode(location) {
|
|
9806
|
+
return (isStorageLocationMode(location.mode) ? location.mode : void 0) ?? legacyModeOf(location) ?? "active";
|
|
9807
|
+
}
|
|
9808
|
+
/** Is this one of the four states? The stamped value crosses a wire, and a
|
|
9809
|
+
* value nobody defined must not be rendered as if it were a state. */
|
|
9810
|
+
function isStorageLocationMode(value) {
|
|
9811
|
+
return STORAGE_LOCATION_MODES.some((mode) => mode === value);
|
|
9812
|
+
}
|
|
9813
|
+
/** May this location be written to? */
|
|
9814
|
+
function mayWriteToLocation(location) {
|
|
9815
|
+
return modeMayWrite(resolveLocationMode(location));
|
|
9816
|
+
}
|
|
9817
|
+
/** May this location be read? A `disabled` one may not — and that is an
|
|
9818
|
+
* operator CHOICE, which callers must report as unavailable rather than as an
|
|
9819
|
+
* unknown-location fault. */
|
|
9820
|
+
function mayReadLocation(location) {
|
|
9821
|
+
return modeMayRead(resolveLocationMode(location));
|
|
9822
|
+
}
|
|
9823
|
+
/** What eviction may do to this location. */
|
|
9824
|
+
function evictionPolicyOfLocation(location) {
|
|
9825
|
+
return evictionPolicyForMode(resolveLocationMode(location));
|
|
9826
|
+
}
|
|
9827
|
+
/**
|
|
9711
9828
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
9712
9829
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
9713
9830
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -9773,6 +9890,21 @@ var StorageLocationSchema = object({
|
|
|
9773
9890
|
* stops existing rather than being re-derived on every read.
|
|
9774
9891
|
*/
|
|
9775
9892
|
enabled: boolean().optional(),
|
|
9893
|
+
/**
|
|
9894
|
+
* THE state of this location (D385), and the only authority on what may be
|
|
9895
|
+
* written, read or evicted here. Interpreted in exactly one place —
|
|
9896
|
+
* `storage-location-mode.ts` — which also folds the legacy
|
|
9897
|
+
* `enabled` / `config.readOnly` pair into a mode so an old row is never
|
|
9898
|
+
* ambiguous.
|
|
9899
|
+
*
|
|
9900
|
+
* OPTIONAL only for the wire and for rows written before D385: absence is
|
|
9901
|
+
* resolved by `resolveLocationMode`, and the orchestrator stamps every
|
|
9902
|
+
* unstamped row ONCE at hydrate so absence stops existing rather than being
|
|
9903
|
+
* re-derived on every read. `enabled` survives one release as a DERIVED
|
|
9904
|
+
* mirror (`mode === 'active'`); `withLocationMode` is the only writer of
|
|
9905
|
+
* either, so the two cannot disagree.
|
|
9906
|
+
*/
|
|
9907
|
+
mode: StorageLocationModeSchema.optional(),
|
|
9776
9908
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
9777
9909
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
9778
9910
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -9780,11 +9912,62 @@ var StorageLocationSchema = object({
|
|
|
9780
9912
|
totalBytes: number(),
|
|
9781
9913
|
availableBytes: number()
|
|
9782
9914
|
}).nullable().optional(),
|
|
9915
|
+
/**
|
|
9916
|
+
* How much of that volume CamStack ITSELF holds on this location (D388) —
|
|
9917
|
+
* COMPUTED at read time from the `storage-occupancy` providers' own figures,
|
|
9918
|
+
* never persisted, never a filesystem walk.
|
|
9919
|
+
*
|
|
9920
|
+
* **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
|
|
9921
|
+
* location yet — nobody stores here, the owning addon is down, or the first
|
|
9922
|
+
* refresh has not completed. A UI must omit the segment rather than draw it
|
|
9923
|
+
* at zero, which would claim we occupy nothing (D315). It is an OBJECT and
|
|
9924
|
+
* not a bare number precisely so that a `?? 0` on the consuming side has to
|
|
9925
|
+
* be spelled out loud instead of appearing by accident.
|
|
9926
|
+
*
|
|
9927
|
+
* `measuredAtMs` is the OLDEST contributing measurement, so it is honest
|
|
9928
|
+
* about the whole figure rather than about its freshest part.
|
|
9929
|
+
*/
|
|
9930
|
+
owned: object({
|
|
9931
|
+
bytes: number().int().nonnegative(),
|
|
9932
|
+
measuredAtMs: number().int().nonnegative()
|
|
9933
|
+
}).optional(),
|
|
9783
9934
|
createdAt: number(),
|
|
9784
9935
|
updatedAt: number()
|
|
9785
9936
|
});
|
|
9786
9937
|
object({ isDefault: boolean().optional() });
|
|
9787
9938
|
/**
|
|
9939
|
+
* Bytes in one GB, for every storage figure an operator types.
|
|
9940
|
+
*
|
|
9941
|
+
* BINARY (1024³), everywhere. The repo had both: the orchestrator's
|
|
9942
|
+
* `maxUsedGb` → bytes conversion used 1024³ while the recorder's placement
|
|
9943
|
+
* headroom used 10⁹ for the SAME stored key, so a location with a cap set was
|
|
9944
|
+
* silently 7.4% off depending on which side of the pipe asked. The persisted
|
|
9945
|
+
* values were entered against the binary unit and the admin UI reads it, so
|
|
9946
|
+
* that is the one that stays. Every GB knob — `maxUsedGb`, `minFreeGb` —
|
|
9947
|
+
* converts through {@link gbToBytes} and nowhere else.
|
|
9948
|
+
*/
|
|
9949
|
+
var STORAGE_BYTES_PER_GB = 1024 ** 3;
|
|
9950
|
+
/** GB → bytes, binary. Fractional GB is admitted and floored. */
|
|
9951
|
+
function gbToBytes(gb) {
|
|
9952
|
+
return Math.floor(gb * STORAGE_BYTES_PER_GB);
|
|
9953
|
+
}
|
|
9954
|
+
/**
|
|
9955
|
+
* How far a `drain` has got (D386) — the read a UI renders, and nothing more.
|
|
9956
|
+
*
|
|
9957
|
+
* `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
|
|
9958
|
+
* OBSERVED and is `null` when it has observed none. Never a fabricated date: a
|
|
9959
|
+
* drain with no observed growth has no honest ETA, and inventing one is how an
|
|
9960
|
+
* operator learns not to believe the screen.
|
|
9961
|
+
*/
|
|
9962
|
+
var StorageDrainProgressSchema = object({
|
|
9963
|
+
locationId: string(),
|
|
9964
|
+
startedAtMs: number(),
|
|
9965
|
+
startBytes: number(),
|
|
9966
|
+
bytesRemaining: number(),
|
|
9967
|
+
drained: boolean(),
|
|
9968
|
+
estimatedEmptyAtMs: number().nullable()
|
|
9969
|
+
});
|
|
9970
|
+
/**
|
|
9788
9971
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
9789
9972
|
* Either:
|
|
9790
9973
|
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
@@ -24324,7 +24507,7 @@ method(object({
|
|
|
24324
24507
|
}), _void(), {
|
|
24325
24508
|
kind: "mutation",
|
|
24326
24509
|
auth: "admin"
|
|
24327
|
-
}), method(object({ id: string() }), object({
|
|
24510
|
+
}), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
|
|
24328
24511
|
ok: boolean(),
|
|
24329
24512
|
error: string().optional()
|
|
24330
24513
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
@@ -24416,6 +24599,71 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
24416
24599
|
kind: "mutation",
|
|
24417
24600
|
auth: "admin"
|
|
24418
24601
|
}), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
|
|
24602
|
+
/**
|
|
24603
|
+
* `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
|
|
24604
|
+
* location (D388).
|
|
24605
|
+
*
|
|
24606
|
+
* ## Why this is not `storage-evictable`
|
|
24607
|
+
*
|
|
24608
|
+
* `storage-evictable.getEvictableUsage` looks like the same question and is
|
|
24609
|
+
* not, in two ways that both matter and both bite hardest on the locations an
|
|
24610
|
+
* operator most wants a figure for:
|
|
24611
|
+
*
|
|
24612
|
+
* - it reports the whole eviction DOMAIN, not the location. `recordings:default`
|
|
24613
|
+
* and `recordingsLow:default` deliberately share one root and evict as one
|
|
24614
|
+
* oldest-first pool, so both answer with the SAME combined total. As an
|
|
24615
|
+
* occupancy figure that double-counts the disk.
|
|
24616
|
+
* - it reports ZERO for a location whose eviction policy is `never` (D385) —
|
|
24617
|
+
* a `readonly` or `disabled` disk. Those are exactly the disks an operator
|
|
24618
|
+
* is retiring and staring at.
|
|
24619
|
+
*
|
|
24620
|
+
* So this is its own contract with its own quantity, and the quantity is
|
|
24621
|
+
* OCCUPIED: every byte the addon holds on that location, whether or not it
|
|
24622
|
+
* would ever be willing to delete it. A provider that can only answer
|
|
24623
|
+
* "evictable" must not register here — a number that silently means different
|
|
24624
|
+
* things per class is worse than no number.
|
|
24625
|
+
*
|
|
24626
|
+
* ## Absence is an answer
|
|
24627
|
+
*
|
|
24628
|
+
* A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
|
|
24629
|
+
* stamps `StorageLocation.owned` only for locations it has a report for, and
|
|
24630
|
+
* the field is an OBJECT rather than a bare number so that a `?? 0` on the
|
|
24631
|
+
* consuming side has to be written out loud instead of appearing by accident.
|
|
24632
|
+
*
|
|
24633
|
+
* `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
|
|
24634
|
+
* a public client surface. Clients read the stamped `StorageLocation.owned`.
|
|
24635
|
+
*/
|
|
24636
|
+
/** One provider's occupancy answer for one location. */
|
|
24637
|
+
var StorageOccupancyReportSchema = object({
|
|
24638
|
+
locationId: string(),
|
|
24639
|
+
/** Bytes this provider holds on THAT location — not its eviction domain, and
|
|
24640
|
+
* not net of what it is willing to delete. */
|
|
24641
|
+
ownedBytes: number().int().nonnegative(),
|
|
24642
|
+
/** When the provider last actually measured this. The orchestrator carries it
|
|
24643
|
+
* through so a UI can say how old the figure is instead of implying "now". */
|
|
24644
|
+
measuredAtMs: number().int().nonnegative()
|
|
24645
|
+
});
|
|
24646
|
+
var storageOccupancyCapability = {
|
|
24647
|
+
name: "storage-occupancy",
|
|
24648
|
+
scope: "system",
|
|
24649
|
+
mode: "collection",
|
|
24650
|
+
internal: true,
|
|
24651
|
+
methods: {
|
|
24652
|
+
/**
|
|
24653
|
+
* Occupancy for the given locations, in ONE round trip.
|
|
24654
|
+
*
|
|
24655
|
+
* A provider answers only for the locations it actually holds bytes on and
|
|
24656
|
+
* OMITS the rest — an omitted location is "I hold nothing measurable here",
|
|
24657
|
+
* which the orchestrator merges as a contribution of nothing rather than as
|
|
24658
|
+
* a claim that the location is empty. Only a location no provider reports
|
|
24659
|
+
* at all stays unknown.
|
|
24660
|
+
*
|
|
24661
|
+
* This must be CHEAP and must never walk a filesystem: it is on the admin
|
|
24662
|
+
* UI's `listLocations` path. The owner keeps its own figure fresh (D224) and
|
|
24663
|
+
* answers from what it already has.
|
|
24664
|
+
*/
|
|
24665
|
+
getOccupancy: method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" }) }
|
|
24666
|
+
};
|
|
24419
24667
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
24420
24668
|
providerId: string().min(1),
|
|
24421
24669
|
displayName: string().min(1),
|
|
@@ -26198,39 +26446,6 @@ onStatusChanged: { data: object({
|
|
|
26198
26446
|
* whether persisting is worth a SQLite commit. */
|
|
26199
26447
|
volatileStateFields: ["lastUpdated"]
|
|
26200
26448
|
};
|
|
26201
|
-
/**
|
|
26202
|
-
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
26203
|
-
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
26204
|
-
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
26205
|
-
* one Home Assistant projection.
|
|
26206
|
-
*/
|
|
26207
|
-
var NetworkLinkStatusSchema = object({
|
|
26208
|
-
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
26209
|
-
type: _enum([
|
|
26210
|
-
"wifi",
|
|
26211
|
-
"ethernet",
|
|
26212
|
-
"cellular",
|
|
26213
|
-
"unknown"
|
|
26214
|
-
]),
|
|
26215
|
-
/**
|
|
26216
|
-
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
26217
|
-
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
26218
|
-
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
26219
|
-
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
26220
|
-
* SKIP a null rather than coerce it.
|
|
26221
|
-
*/
|
|
26222
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
26223
|
-
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
26224
|
-
rssiDbm: number().optional(),
|
|
26225
|
-
/** Network name of a wireless link, when the firmware reports it. */
|
|
26226
|
-
ssid: string().optional(),
|
|
26227
|
-
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
26228
|
-
lastUpdated: number()
|
|
26229
|
-
});
|
|
26230
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
26231
|
-
deviceId: number(),
|
|
26232
|
-
status: NetworkLinkStatusSchema
|
|
26233
|
-
});
|
|
26234
26449
|
object({
|
|
26235
26450
|
on: boolean(),
|
|
26236
26451
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -28584,6 +28799,236 @@ DeviceType.Camera, method(object({
|
|
|
28584
28799
|
detection: NativeDetectionSchema
|
|
28585
28800
|
});
|
|
28586
28801
|
/**
|
|
28802
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
28803
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
28804
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
28805
|
+
*
|
|
28806
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
28807
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
28808
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
28809
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
28810
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
28811
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
28812
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
28813
|
+
* the reverse:
|
|
28814
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
28815
|
+
* / `getOptions`), and
|
|
28816
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
28817
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
28818
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
28819
|
+
* not here (see the addon design note):
|
|
28820
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
28821
|
+
* ptz.stop() → navigation.stop()
|
|
28822
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
28823
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
28824
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
28825
|
+
*
|
|
28826
|
+
* ## Continuous drive
|
|
28827
|
+
*
|
|
28828
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
28829
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
28830
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
28831
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
28832
|
+
* coalesce them. The UI owns the cadence.
|
|
28833
|
+
*
|
|
28834
|
+
* ## The action dictionary
|
|
28835
|
+
*
|
|
28836
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
28837
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
28838
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
28839
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
28840
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
28841
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
28842
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
28843
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
28844
|
+
*
|
|
28845
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
28846
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
28847
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
28848
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
28849
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
28850
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
28851
|
+
* THIS contract.
|
|
28852
|
+
*/
|
|
28853
|
+
/**
|
|
28854
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
28855
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
28856
|
+
* halts it.
|
|
28857
|
+
*
|
|
28858
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
28859
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
28860
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
28861
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
28862
|
+
*
|
|
28863
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
28864
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
28865
|
+
*/
|
|
28866
|
+
var NavigationMoveCommandSchema = object({
|
|
28867
|
+
pan: number().min(-1).max(1).optional(),
|
|
28868
|
+
tilt: number().min(-1).max(1).optional(),
|
|
28869
|
+
speed: number().min(0).max(1).optional()
|
|
28870
|
+
});
|
|
28871
|
+
/**
|
|
28872
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
28873
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
28874
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
28875
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
28876
|
+
*/
|
|
28877
|
+
var NavigationActionIdSchema = _enum([
|
|
28878
|
+
"goHome",
|
|
28879
|
+
"locate",
|
|
28880
|
+
"spotClean",
|
|
28881
|
+
"findPet",
|
|
28882
|
+
"personFollow",
|
|
28883
|
+
"stop",
|
|
28884
|
+
"startClean",
|
|
28885
|
+
"pauseClean",
|
|
28886
|
+
"dockWash",
|
|
28887
|
+
"autoEmpty",
|
|
28888
|
+
"flashOn",
|
|
28889
|
+
"flashOff"
|
|
28890
|
+
]);
|
|
28891
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
28892
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
28893
|
+
/**
|
|
28894
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
28895
|
+
* native panel and the PTZ mimic render as a button.
|
|
28896
|
+
*
|
|
28897
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
28898
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
28899
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
28900
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
28901
|
+
* - `label` — operator-facing English label.
|
|
28902
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
28903
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
28904
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
28905
|
+
* flips it from config, never by editing code.
|
|
28906
|
+
*/
|
|
28907
|
+
var NavigationActionEntrySchema = object({
|
|
28908
|
+
id: string(),
|
|
28909
|
+
kind: NavigationEntryKindSchema,
|
|
28910
|
+
label: string(),
|
|
28911
|
+
icon: string(),
|
|
28912
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
28913
|
+
soundId: number().int().optional(),
|
|
28914
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
28915
|
+
enabled: boolean()
|
|
28916
|
+
});
|
|
28917
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
28918
|
+
var NavigationPointSchema = object({
|
|
28919
|
+
x: number(),
|
|
28920
|
+
y: number()
|
|
28921
|
+
});
|
|
28922
|
+
/**
|
|
28923
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
28924
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
28925
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
28926
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
28927
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
28928
|
+
* that are not dictionary entries.
|
|
28929
|
+
*
|
|
28930
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
28931
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
28932
|
+
* map-coordinate plumbing is wired.
|
|
28933
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
28934
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
28935
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
28936
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
28937
|
+
* camera-service control; needs an active stream).
|
|
28938
|
+
*/
|
|
28939
|
+
var NavigationFeaturesSchema = object({
|
|
28940
|
+
move: boolean(),
|
|
28941
|
+
stop: boolean(),
|
|
28942
|
+
goToPoint: boolean(),
|
|
28943
|
+
runAction: boolean(),
|
|
28944
|
+
playSound: boolean(),
|
|
28945
|
+
light: boolean(),
|
|
28946
|
+
lightMode: boolean()
|
|
28947
|
+
});
|
|
28948
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
28949
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
28950
|
+
/**
|
|
28951
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
28952
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
28953
|
+
* - `following` — person/pet follow is currently armed.
|
|
28954
|
+
* - `flash` — the on-camera fill light is on.
|
|
28955
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
28956
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
28957
|
+
* `lightMode === 'manual'`.
|
|
28958
|
+
*/
|
|
28959
|
+
var NavigationStatusSchema = object({
|
|
28960
|
+
mode: _enum([
|
|
28961
|
+
"idle",
|
|
28962
|
+
"cleaning",
|
|
28963
|
+
"spot",
|
|
28964
|
+
"following",
|
|
28965
|
+
"goto",
|
|
28966
|
+
"returning",
|
|
28967
|
+
"paused",
|
|
28968
|
+
"unknown"
|
|
28969
|
+
]),
|
|
28970
|
+
following: boolean(),
|
|
28971
|
+
flash: boolean(),
|
|
28972
|
+
lightMode: NavigationLightModeSchema,
|
|
28973
|
+
lightLevel: number().min(40).max(100),
|
|
28974
|
+
/** Ms epoch when the slice was last updated. */
|
|
28975
|
+
lastChangedAt: number()
|
|
28976
|
+
});
|
|
28977
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
28978
|
+
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({
|
|
28979
|
+
deviceId: number(),
|
|
28980
|
+
actionId: NavigationActionIdSchema
|
|
28981
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
28982
|
+
deviceId: number(),
|
|
28983
|
+
soundId: number().int()
|
|
28984
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
28985
|
+
deviceId: number(),
|
|
28986
|
+
on: boolean()
|
|
28987
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
28988
|
+
deviceId: number(),
|
|
28989
|
+
mode: NavigationLightModeSchema,
|
|
28990
|
+
level: number().min(40).max(100).optional()
|
|
28991
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
28992
|
+
deviceId: number(),
|
|
28993
|
+
level: number().min(40).max(100)
|
|
28994
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
28995
|
+
deviceId: number(),
|
|
28996
|
+
status: NavigationStatusSchema
|
|
28997
|
+
});
|
|
28998
|
+
/**
|
|
28999
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
29000
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
29001
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
29002
|
+
* one Home Assistant projection.
|
|
29003
|
+
*/
|
|
29004
|
+
var NetworkLinkStatusSchema = object({
|
|
29005
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
29006
|
+
type: _enum([
|
|
29007
|
+
"wifi",
|
|
29008
|
+
"ethernet",
|
|
29009
|
+
"cellular",
|
|
29010
|
+
"unknown"
|
|
29011
|
+
]),
|
|
29012
|
+
/**
|
|
29013
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
29014
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
29015
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
29016
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
29017
|
+
* SKIP a null rather than coerce it.
|
|
29018
|
+
*/
|
|
29019
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
29020
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
29021
|
+
rssiDbm: number().optional(),
|
|
29022
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
29023
|
+
ssid: string().optional(),
|
|
29024
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
29025
|
+
lastUpdated: number()
|
|
29026
|
+
});
|
|
29027
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
29028
|
+
deviceId: number(),
|
|
29029
|
+
status: NetworkLinkStatusSchema
|
|
29030
|
+
});
|
|
29031
|
+
/**
|
|
28587
29032
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
28588
29033
|
* jitter, and observed/peak bandwidth per device + per client.
|
|
28589
29034
|
*
|
|
@@ -29825,203 +30270,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
29825
30270
|
deviceId: number(),
|
|
29826
30271
|
status: PtzAutotrackStatusSchema
|
|
29827
30272
|
});
|
|
29828
|
-
/**
|
|
29829
|
-
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
29830
|
-
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
29831
|
-
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
29832
|
-
*
|
|
29833
|
-
* Why a NEW cap rather than overloading `ptz`:
|
|
29834
|
-
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
29835
|
-
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
29836
|
-
* The two are different physical models: PTZ is absolute-position + presets,
|
|
29837
|
-
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
29838
|
-
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
29839
|
-
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
29840
|
-
* the reverse:
|
|
29841
|
-
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
29842
|
-
* / `getOptions`), and
|
|
29843
|
-
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
29844
|
-
* robot camera shows up in the existing PTZ control path without every
|
|
29845
|
-
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
29846
|
-
* not here (see the addon design note):
|
|
29847
|
-
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
29848
|
-
* ptz.stop() → navigation.stop()
|
|
29849
|
-
* ptz.goHome() → navigation.runAction('goHome')
|
|
29850
|
-
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
29851
|
-
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
29852
|
-
*
|
|
29853
|
-
* ## Continuous drive
|
|
29854
|
-
*
|
|
29855
|
-
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
29856
|
-
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
29857
|
-
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
29858
|
-
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
29859
|
-
* coalesce them. The UI owns the cadence.
|
|
29860
|
-
*
|
|
29861
|
-
* ## The action dictionary
|
|
29862
|
-
*
|
|
29863
|
-
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
29864
|
-
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
29865
|
-
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
29866
|
-
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
29867
|
-
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
29868
|
-
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
29869
|
-
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
29870
|
-
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
29871
|
-
*
|
|
29872
|
-
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
29873
|
-
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
29874
|
-
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
29875
|
-
* every device handle. A future nodedreame publish adds a typed
|
|
29876
|
-
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
29877
|
-
* provider can then swap the raw calls for the typed methods with no change to
|
|
29878
|
-
* THIS contract.
|
|
29879
|
-
*/
|
|
29880
|
-
/**
|
|
29881
|
-
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
29882
|
-
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
29883
|
-
* halts it.
|
|
29884
|
-
*
|
|
29885
|
-
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
29886
|
-
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
29887
|
-
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
29888
|
-
* vector by it (drivers without proportional drive ignore it).
|
|
29889
|
-
*
|
|
29890
|
-
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
29891
|
-
* axis alone; an all-undefined nudge is a no-op.
|
|
29892
|
-
*/
|
|
29893
|
-
var NavigationMoveCommandSchema = object({
|
|
29894
|
-
pan: number().min(-1).max(1).optional(),
|
|
29895
|
-
tilt: number().min(-1).max(1).optional(),
|
|
29896
|
-
speed: number().min(0).max(1).optional()
|
|
29897
|
-
});
|
|
29898
|
-
/**
|
|
29899
|
-
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
29900
|
-
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
29901
|
-
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
29902
|
-
* `playSound` (see the `sound` dictionary entries).
|
|
29903
|
-
*/
|
|
29904
|
-
var NavigationActionIdSchema = _enum([
|
|
29905
|
-
"goHome",
|
|
29906
|
-
"locate",
|
|
29907
|
-
"spotClean",
|
|
29908
|
-
"findPet",
|
|
29909
|
-
"personFollow",
|
|
29910
|
-
"stop",
|
|
29911
|
-
"startClean",
|
|
29912
|
-
"pauseClean",
|
|
29913
|
-
"dockWash",
|
|
29914
|
-
"autoEmpty",
|
|
29915
|
-
"flashOn",
|
|
29916
|
-
"flashOff"
|
|
29917
|
-
]);
|
|
29918
|
-
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
29919
|
-
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
29920
|
-
/**
|
|
29921
|
-
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
29922
|
-
* native panel and the PTZ mimic render as a button.
|
|
29923
|
-
*
|
|
29924
|
-
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
29925
|
-
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
29926
|
-
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
29927
|
-
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
29928
|
-
* - `label` — operator-facing English label.
|
|
29929
|
-
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
29930
|
-
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
29931
|
-
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
29932
|
-
* flips it from config, never by editing code.
|
|
29933
|
-
*/
|
|
29934
|
-
var NavigationActionEntrySchema = object({
|
|
29935
|
-
id: string(),
|
|
29936
|
-
kind: NavigationEntryKindSchema,
|
|
29937
|
-
label: string(),
|
|
29938
|
-
icon: string(),
|
|
29939
|
-
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
29940
|
-
soundId: number().int().optional(),
|
|
29941
|
-
/** Per-device feature flag — render this entry only when true. */
|
|
29942
|
-
enabled: boolean()
|
|
29943
|
-
});
|
|
29944
|
-
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
29945
|
-
var NavigationPointSchema = object({
|
|
29946
|
-
x: number(),
|
|
29947
|
-
y: number()
|
|
29948
|
-
});
|
|
29949
|
-
/**
|
|
29950
|
-
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
29951
|
-
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
29952
|
-
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
29953
|
-
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
29954
|
-
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
29955
|
-
* that are not dictionary entries.
|
|
29956
|
-
*
|
|
29957
|
-
* - `move` / `stop` — the momentary drive joystick.
|
|
29958
|
-
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
29959
|
-
* map-coordinate plumbing is wired.
|
|
29960
|
-
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
29961
|
-
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
29962
|
-
* - `light` — the on/off fill-light toggle (works anytime).
|
|
29963
|
-
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
29964
|
-
* camera-service control; needs an active stream).
|
|
29965
|
-
*/
|
|
29966
|
-
var NavigationFeaturesSchema = object({
|
|
29967
|
-
move: boolean(),
|
|
29968
|
-
stop: boolean(),
|
|
29969
|
-
goToPoint: boolean(),
|
|
29970
|
-
runAction: boolean(),
|
|
29971
|
-
playSound: boolean(),
|
|
29972
|
-
light: boolean(),
|
|
29973
|
-
lightMode: boolean()
|
|
29974
|
-
});
|
|
29975
|
-
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
29976
|
-
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
29977
|
-
/**
|
|
29978
|
-
* Live navigation state so the UI can reflect what the robot is doing:
|
|
29979
|
-
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
29980
|
-
* - `following` — person/pet follow is currently armed.
|
|
29981
|
-
* - `flash` — the on-camera fill light is on.
|
|
29982
|
-
* - `lightMode` — auto vs manual fill-light mode.
|
|
29983
|
-
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
29984
|
-
* `lightMode === 'manual'`.
|
|
29985
|
-
*/
|
|
29986
|
-
var NavigationStatusSchema = object({
|
|
29987
|
-
mode: _enum([
|
|
29988
|
-
"idle",
|
|
29989
|
-
"cleaning",
|
|
29990
|
-
"spot",
|
|
29991
|
-
"following",
|
|
29992
|
-
"goto",
|
|
29993
|
-
"returning",
|
|
29994
|
-
"paused",
|
|
29995
|
-
"unknown"
|
|
29996
|
-
]),
|
|
29997
|
-
following: boolean(),
|
|
29998
|
-
flash: boolean(),
|
|
29999
|
-
lightMode: NavigationLightModeSchema,
|
|
30000
|
-
lightLevel: number().min(40).max(100),
|
|
30001
|
-
/** Ms epoch when the slice was last updated. */
|
|
30002
|
-
lastChangedAt: number()
|
|
30003
|
-
});
|
|
30004
|
-
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
30005
|
-
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({
|
|
30006
|
-
deviceId: number(),
|
|
30007
|
-
actionId: NavigationActionIdSchema
|
|
30008
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
30009
|
-
deviceId: number(),
|
|
30010
|
-
soundId: number().int()
|
|
30011
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
30012
|
-
deviceId: number(),
|
|
30013
|
-
on: boolean()
|
|
30014
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
30015
|
-
deviceId: number(),
|
|
30016
|
-
mode: NavigationLightModeSchema,
|
|
30017
|
-
level: number().min(40).max(100).optional()
|
|
30018
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
30019
|
-
deviceId: number(),
|
|
30020
|
-
level: number().min(40).max(100)
|
|
30021
|
-
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
30022
|
-
deviceId: number(),
|
|
30023
|
-
status: NavigationStatusSchema
|
|
30024
|
-
});
|
|
30025
30273
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
30026
30274
|
kind: "mutation",
|
|
30027
30275
|
auth: "admin"
|
|
@@ -37750,6 +37998,12 @@ Object.freeze({
|
|
|
37750
37998
|
addonId: null,
|
|
37751
37999
|
access: "view"
|
|
37752
38000
|
},
|
|
38001
|
+
"storage.listDrainProgress": {
|
|
38002
|
+
capName: "storage",
|
|
38003
|
+
capScope: "system",
|
|
38004
|
+
addonId: null,
|
|
38005
|
+
access: "view"
|
|
38006
|
+
},
|
|
37753
38007
|
"storage.listLocationDeclarations": {
|
|
37754
38008
|
capName: "storage",
|
|
37755
38009
|
capScope: "system",
|
|
@@ -37894,6 +38148,12 @@ Object.freeze({
|
|
|
37894
38148
|
addonId: null,
|
|
37895
38149
|
access: "view"
|
|
37896
38150
|
},
|
|
38151
|
+
"storageOccupancy.getOccupancy": {
|
|
38152
|
+
capName: "storage-occupancy",
|
|
38153
|
+
capScope: "system",
|
|
38154
|
+
addonId: null,
|
|
38155
|
+
access: "view"
|
|
38156
|
+
},
|
|
37897
38157
|
"storageProvider.abortUpload": {
|
|
37898
38158
|
capName: "storage-provider",
|
|
37899
38159
|
capScope: "system",
|
|
@@ -42375,4 +42635,4 @@ function enumerateInferenceDevices(hw) {
|
|
|
42375
42635
|
return out;
|
|
42376
42636
|
}
|
|
42377
42637
|
//#endregion
|
|
42378
|
-
export {
|
|
42638
|
+
export { failureContributionCapability as $, parseJsonUnknown as $t, addonWidgetsSourceCapability as A, storageEvictableCapability as At, defaultDeviceFor as B, invocationFromEncodeProfile as Bt, RATE_CONTROL_RELAXED as C, recordingSignalCapability as Ct, RecordingSignalStatusSchema as D, resolvePoolMemoryPolicy as Dt, RecordingConfigSchema as E, resolveLocationMode as Et, cameraStreamsCapability as F, webrtcSessionCapability as Ft, detectionPipelineCapability as G, DeviceFeature as Gt, deriveBatteryPresence as H, BOOT_RECOVERY_BACKOFF_MS as Ht, createHwAccelCache as I, errMsg as It, enumerateInferenceDevices as J, hydrateSchema as Jt, egressTranscodeSharingKey as K, DeviceType as Kt, createLogChannelsProvider as L, AUDIO_PRESETS as Lt, audioAnalyzerCapability as M, streamBrokerCapability as Mt, audioKindId as N, stripRetiredBandPreBufferSec as Nt, RingBuffer as O, resolveRecordingProfiles as Ot, batteryCapability as P, supportedRuntimes as Pt, evictionPolicyOfLocation as Q, nodePin as Qt, customAction as R, Fmp4BoxSplitter as Rt, PoolMemoryWatchdog as S, recordingExportCapability as St, RECORDING_EXPORT_MAX_READ_BYTES as T, resolveEgressDecodeHwAccel as Tt, deriveDetailCropRect as U, BaseAddon as Ut, defineCustomActions as V, isSoftwareDecode as Vt, deriveRecordingMode as W, CAM_PROFILE_ORDER as Wt, evaluateZoneRules as X, makeProfileBrokerId as Xt, evaluateSensorEdge as Y, isEvent as Yt, evictionPolicyForMode as Z, makeSourceBrokerId as Zt, FailureCounters as _, pickDetailCropConvention as _t, COCO_80_LABELS as a, boolean as an, logChannelsCapability as at, NativeLeaseSettingsSchema as b, pipelineRunnerCapability as bt, DEFAULT_CLUSTER_STEP_MODELS as c, literal as cn, mayReadLocation as ct, DEFAULT_EVENTS_BAND_BUFFER_SEC as d, preprocess as dn, modeMayWrite as dt, parseProfileBrokerId as en, gbToBytes as et, DEFAULT_FIRST_SIGHTING_FRESHNESS_MS as f, record as fn, motionDetectionCapability as ft, ExportRecordSchema as g, pickClusterStepSettings as gt, EncodeProfileSchema as h, EventCategory as hn, pickClusterStepModels as ht, BatteryStatusSchema as i, array as in, loadContributionCapability as it, audioAnalysisCapability as j, storageOccupancyCapability as jt, YAMNET_TO_MACRO as k, runtimeDevices as kt, DEFAULT_CLUSTER_STEP_SETTINGS as l, number as ln, mayWriteToLocation as lt, DEVICE_BACKEND_TO_FORMAT as m, union as mn, parseProcStatus as mt, AUDIO_BACKEND_CHOICES as n, sleep as nn, inferModelProvider as nt, COCO_TO_MACRO as o, discriminatedUnion as on, mapAudioLabelToMacro as ot, DEFAULT_NATIVE_LEASE_SETTINGS as p, string as pn, overlayClusterStepSettings as pt, egressTransportFromRequest as q, createEvent as qt, AUDIO_MACRO_LABELS as r, _enum as rn, isFirstLevelMacroClass as rt, DEFAULT_AUDIO_ANALYZER_CONFIG as s, lazy as sn, maskUrlCredentials as st, APPLE_SA_TO_MACRO as t, selectAssignedProfileSlots as tn, hfModelUrl as tt, DEFAULT_DETAIL_CROP_CONVENTION as u, object as un, migrateLegacyDeviceSignalConfig as ut, HF_BASE_URL as v, pickNativeLeaseOverride as vt, RATE_CONTROL_TIGHT as w, resolveClusterStepModelId as wt, OpsLogEntrySchema as x, recordingCapability as xt, NativeLeaseAdmissionSchema as y, pipelineExecutorCapability as yt, declareLogChannel as z, buildFfmpegArgs as zt };
|