@camstack/addon-admin-ui 1.2.161 → 1.2.162
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/assets/{AddonCollectionPage-DidOeHML.js → AddonCollectionPage-CVXlT82P.js} +1 -1
- package/dist/assets/{Addons-DAphv28g.js → Addons-X-B5Zu2Z.js} +1 -1
- package/dist/assets/{AdminTabs-BuvG675m.js → AdminTabs-C0HjPryL.js} +1 -1
- package/dist/assets/{AiProfiles-D1dR_sqs.js → AiProfiles-zZCUJWMi.js} +1 -1
- package/dist/assets/{BrokerForm-CtbBzViq.js → BrokerForm-ChQ7nWwo.js} +1 -1
- package/dist/assets/{Build-Bbum-nbd.js → Build-CaN90jcN.js} +1 -1
- package/dist/assets/{Capabilities-CsxF-Gn_.js → Capabilities-DpB1PQHe.js} +1 -1
- package/dist/assets/{CapabilityBadges-DLUwjJr2.js → CapabilityBadges-CqryAsPv.js} +1 -1
- package/dist/assets/{Cluster-CxCe9uzt.js → Cluster-G1IfcoJk.js} +2 -2
- package/dist/assets/Data-Dra2xNmy.js +1 -0
- package/dist/assets/{DetectionIntelligence-sbqjk-yr.js → DetectionIntelligence-gsiXBqeF.js} +1 -1
- package/dist/assets/{DeviceAggregateSection-DkMW7Y6S.js → DeviceAggregateSection-PsTImQRG.js} +1 -1
- package/dist/assets/{DeviceDetail-BFk09QwZ.js → DeviceDetail-BNn-DJaZ.js} +2 -2
- package/dist/assets/{Devices-XZJ7r7_6.js → Devices-CkM919eI.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-N1Oosdec.js → EmbedPlayerPage-BqnzuuJJ.js} +1 -1
- package/dist/assets/{Events-7PpoZh7-.js → Events-DMjWkg6Y.js} +1 -1
- package/dist/assets/{FormBuilder-zSYeM7J8.js → FormBuilder-DJIpbrRD.js} +1 -1
- package/dist/assets/{Identity-DZjt_Wrn.js → Identity-DkPcvpZI.js} +1 -1
- package/dist/assets/{IntegrationDetail-UUegoTAF.js → IntegrationDetail-G0gylND2.js} +1 -1
- package/dist/assets/{Integrations-DgYRJOFv.js → Integrations-BY26xGGN.js} +1 -1
- package/dist/assets/{Integrations-DNbOs-De.js → Integrations-Ba5QY_Db.js} +1 -1
- package/dist/assets/{Locations-BTelaF3N.js → Locations-DcShvv_B.js} +1 -1
- package/dist/assets/{Logs-_-ID7Fdl.js → Logs-Dt1oL6Ne.js} +1 -1
- package/dist/assets/{MotionZonesSettings-hZLAwZ2W.js → MotionZonesSettings-DbAzh16t.js} +1 -1
- package/dist/assets/{MyAccess-dn3KK8AG.js → MyAccess-hUgOahul.js} +1 -1
- package/dist/assets/{Network-BupEsuu1.js → Network-BM5gHwHa.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-ATtf2WFw.js → NodeAddonsSettingsPanel-BRjADPFj.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-BjaoWmuP.js → NodeInferenceDevices-D_m9EVBM.js} +1 -1
- package/dist/assets/{Notifications-W8uDm8ag.js → Notifications-DnSdyvR7.js} +1 -1
- package/dist/assets/{Pipeline-CHn2KqD1.js → Pipeline-CrcPBAPW.js} +1 -1
- package/dist/assets/{Plates-tj2bL1rV.js → Plates-baKb84ax.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-B8FJYDAv.js → PrivacyMaskSettings-DAUFZ6wz.js} +1 -1
- package/dist/assets/{ProviderIcon-CAViJ2Dr.js → ProviderIcon-7SEkSc3x.js} +1 -1
- package/dist/assets/Recordings-BAaEaUyH.js +1 -0
- package/dist/assets/{ScanNetworkModal-XNhTZKaX.js → ScanNetworkModal-DIAg8SvS.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-CjHRTg_l.js → SceneMonitorEditor-PVPsicEf.js} +1 -1
- package/dist/assets/{Scenes-C8wxTMOt.js → Scenes-D-53XCVS.js} +1 -1
- package/dist/assets/{Settings-CkbRyWnS.js → Settings-8HFz7_4b.js} +1 -1
- package/dist/assets/{Showroom-sQREXKKD.js → Showroom-D2TZzhhG.js} +1 -1
- package/dist/assets/StorageLocationsPanel-CSZxqVc1.js +1 -0
- package/dist/assets/{Terminal-YqbXnKWi.js → Terminal-C5lOIWKi.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BcpL5OWo.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BIxwxeXV.js} +1 -1
- package/dist/assets/{authed-media-C_PsHBLq.js → authed-media-oFtTLnSo.js} +1 -1
- package/dist/assets/{bell-off-C1SI77dR.js → bell-off-Bu58tCSe.js} +1 -1
- package/dist/assets/{bell-ring-CEOIAQ_I.js → bell-ring-D6CNMR5a.js} +1 -1
- package/dist/assets/{boxes-BjoWl-1D.js → boxes-B_wKqNak.js} +1 -1
- package/dist/assets/circle-check-big-kUlsgsiK.js +1 -0
- package/dist/assets/circle-dot-CaOYafyJ.js +1 -0
- package/dist/assets/circle-slash-ITbPTgVV.js +1 -0
- package/dist/assets/{circle-x-CdNO4ICk.js → circle-x-OgmRm7RF.js} +1 -1
- package/dist/assets/clock-B5FIt0QG.js +1 -0
- package/dist/assets/{copy-zlgjIyja.js → copy-BMx8D0jk.js} +1 -1
- package/dist/assets/{debounced-invalidate-zayf7SMn.js → debounced-invalidate-BQa0chBJ.js} +1 -1
- package/dist/assets/{dist-Cw5oxpBU.js → dist-BUkDp1q9.js} +1 -1
- package/dist/assets/dist-DnSj1S0J.js +349 -0
- package/dist/assets/{download-LIPHDFGv.js → download-COB_8ZN4.js} +1 -1
- package/dist/assets/{face-bbox-CAtHizcF.js → face-bbox-DxJxdnuR.js} +1 -1
- package/dist/assets/{flame-D_ZDAfQ6.js → flame-D_G_k09K.js} +1 -1
- package/dist/assets/format-size-BwFaHYTC.js +1 -0
- package/dist/assets/{hard-drive-BEeZwDeK.js → hard-drive-BRJV12KE.js} +1 -1
- package/dist/assets/{hostInit-C55-jO9M.js → hostInit-DBSKfSb9.js} +1 -1
- package/dist/assets/{index-DQCNw_qF.js → index-CjToGvfD.js} +3 -3
- package/dist/assets/index-D6yBCo4s.css +2 -0
- package/dist/assets/{key-round-L0G7sh0Z.js → key-round-B-_5LjK2.js} +1 -1
- package/dist/assets/{layers-BkYY4MNu.js → layers-CZ0fbzZD.js} +1 -1
- package/dist/assets/location-owned-usage-WHFlA8Qw.js +1 -0
- package/dist/assets/{mf-entry-bootstrap-0-bf638123.js → mf-entry-bootstrap-0-6fedd28a.js} +2 -2
- package/dist/assets/{pencil-Cps28G9t.js → pencil-BryYtd6q.js} +1 -1
- package/dist/assets/play-Cn0mIBXd.js +1 -0
- package/dist/assets/{player-overlays-Du1iI4WG.js → player-overlays-jCIm4d2Z.js} +1 -1
- package/dist/assets/plus-BpcUYF3u.js +1 -0
- package/dist/assets/power-D1NeCw53.js +1 -0
- package/dist/assets/{radio-rt3AQulI.js → radio-CcuCrj-b.js} +1 -1
- package/dist/assets/{refresh-cw-DTN9sVzg.js → refresh-cw-DkloUlI-.js} +1 -1
- package/dist/assets/remoteEntry-CetTBajg.js +1 -0
- package/dist/assets/rotate-ccw-C-WlJpHp.js +1 -0
- package/dist/assets/rotate-cw-BydDIZ0I.js +1 -0
- package/dist/assets/{send-HigTgqVo.js → send-CBoAcNiU.js} +1 -1
- package/dist/assets/{server-BXK4SJIE.js → server-BFmcuET7.js} +1 -1
- package/dist/assets/{shield-DX4_WDm1.js → shield-WbkYgVY-.js} +1 -1
- package/dist/assets/{shield-alert-Cg07ChHl.js → shield-alert-bLad91WY.js} +1 -1
- package/dist/assets/square-C95bY7Mh.js +1 -0
- package/dist/assets/{square-check-big-ZG3qcTd3.js → square-check-big-C9DzkTZR.js} +1 -1
- package/dist/assets/{src-JHeBPIaR.js → src-BurbTgHr.js} +17 -17
- package/dist/assets/src-DSOXw8KA.js +349 -0
- package/dist/assets/{undo-2-B6Jfg7mO.js → undo-2-BMAMnn0a.js} +1 -1
- package/dist/assets/{use-scenes-feed-C8d0V984.js → use-scenes-feed-DOkswLPM.js} +1 -1
- package/dist/assets/useEventInvalidation-xE7MyVTv.js +1 -0
- package/dist/assets/{useNodeUrlSelection-BbnkfJaA.js → useNodeUrlSelection-DkHWKBE3.js} +1 -1
- package/dist/assets/user-round-QQ8oqzin.js +1 -0
- package/dist/assets/{video-CTn28SZY.js → video-B10L6wHL.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-dmY2bJ_7.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_--hiLzLBb.js} +2 -2
- package/dist/assets/{wifi-DlsXlPzT.js → wifi-BHPJu4tt.js} +1 -1
- package/dist/assets/{zap-BP77MpPC.js → zap-BWD6AZU5.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/server/addon.js +368 -233
- package/package.json +1 -1
- package/dist/assets/AddLocationWizard-CIBAcYT0.js +0 -1
- package/dist/assets/Data-BmG_RLtJ.js +0 -1
- package/dist/assets/Recordings-tfYyBWxI.js +0 -1
- package/dist/assets/StorageLocationsPanel-BCrJ-KE-.js +0 -1
- package/dist/assets/circle-check-big-DYmHmeTq.js +0 -1
- package/dist/assets/circle-dot-DvdQwPzL.js +0 -1
- package/dist/assets/circle-slash-CC_EyKGU.js +0 -1
- package/dist/assets/clock-c2VrWbaA.js +0 -1
- package/dist/assets/dist-DIx7N8Rl.js +0 -349
- package/dist/assets/format-size-DIxKXxtj.js +0 -1
- package/dist/assets/hard-drive-download-DczrA-Ph.js +0 -1
- package/dist/assets/index-Dbhx40K_.css +0 -2
- package/dist/assets/play-DDyMYk4f.js +0 -1
- package/dist/assets/plus-BvgeGRAR.js +0 -1
- package/dist/assets/power-BEgQFTDk.js +0 -1
- package/dist/assets/remoteEntry-CSOuPVx0.js +0 -1
- package/dist/assets/rotate-ccw-Bb4xxMsL.js +0 -1
- package/dist/assets/rotate-cw-mNYvr-AK.js +0 -1
- package/dist/assets/square-BFKD6b_V.js +0 -1
- package/dist/assets/src-HONjyNN8.js +0 -349
- package/dist/assets/useEventInvalidation-CXT1xiua.js +0 -1
- package/dist/assets/user-round-C8ooFPmf.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
//#region ../types/dist/event-category-
|
|
3
|
+
//#region ../types/dist/event-category-CnLqLOKs.mjs
|
|
4
4
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
5
5
|
EventCategory["SystemBoot"] = "system.boot";
|
|
6
6
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -195,6 +195,19 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
|
195
195
|
EventCategory["ProcessCrashed"] = "process.crashed";
|
|
196
196
|
EventCategory["ProcessRestartScheduled"] = "process.restart_scheduled";
|
|
197
197
|
EventCategory["ProcessRestarted"] = "process.restarted";
|
|
198
|
+
/**
|
|
199
|
+
* The SET of storage locations changed — one was created, edited, enabled,
|
|
200
|
+
* disabled or deleted through `storage.upsertLocation` / `deleteLocation`.
|
|
201
|
+
*
|
|
202
|
+
* Telemetry, not a transaction (D8/D11): every consumer that re-resolves on
|
|
203
|
+
* it must also converge on its own periodic path, because a dropped event
|
|
204
|
+
* must not leave a node writing to yesterday's disk set forever. It exists
|
|
205
|
+
* because there was NO signal at all — an operator who added a second
|
|
206
|
+
* recordings disk in the admin UI got nothing, and the recorder kept its
|
|
207
|
+
* resolved locations until something else happened to re-resolve them
|
|
208
|
+
* (D387). Payload `StorageLocationsChangedPayload`.
|
|
209
|
+
*/
|
|
210
|
+
EventCategory["StorageLocationsChanged"] = "storage.locations-changed";
|
|
198
211
|
EventCategory["RecordingStarted"] = "recording.started";
|
|
199
212
|
EventCategory["RecordingStopped"] = "recording.stopped";
|
|
200
213
|
EventCategory["RecordingError"] = "recording.error";
|
|
@@ -8539,6 +8552,21 @@ var StorageCleanupJobSchema = object({
|
|
|
8539
8552
|
});
|
|
8540
8553
|
var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
|
|
8541
8554
|
/**
|
|
8555
|
+
* The one typed state of a storage location. Authoritative Zod schema — the TS
|
|
8556
|
+
* alias below is `z.infer<>` of it, never a second spelling.
|
|
8557
|
+
*/
|
|
8558
|
+
var StorageLocationModeSchema = _enum([
|
|
8559
|
+
"active",
|
|
8560
|
+
"readonly",
|
|
8561
|
+
"drain",
|
|
8562
|
+
"disabled"
|
|
8563
|
+
]);
|
|
8564
|
+
_enum([
|
|
8565
|
+
"normal",
|
|
8566
|
+
"never",
|
|
8567
|
+
"drain"
|
|
8568
|
+
]);
|
|
8569
|
+
/**
|
|
8542
8570
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8543
8571
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8544
8572
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8604,6 +8632,21 @@ var StorageLocationSchema = object({
|
|
|
8604
8632
|
* stops existing rather than being re-derived on every read.
|
|
8605
8633
|
*/
|
|
8606
8634
|
enabled: boolean().optional(),
|
|
8635
|
+
/**
|
|
8636
|
+
* THE state of this location (D385), and the only authority on what may be
|
|
8637
|
+
* written, read or evicted here. Interpreted in exactly one place —
|
|
8638
|
+
* `storage-location-mode.ts` — which also folds the legacy
|
|
8639
|
+
* `enabled` / `config.readOnly` pair into a mode so an old row is never
|
|
8640
|
+
* ambiguous.
|
|
8641
|
+
*
|
|
8642
|
+
* OPTIONAL only for the wire and for rows written before D385: absence is
|
|
8643
|
+
* resolved by `resolveLocationMode`, and the orchestrator stamps every
|
|
8644
|
+
* unstamped row ONCE at hydrate so absence stops existing rather than being
|
|
8645
|
+
* re-derived on every read. `enabled` survives one release as a DERIVED
|
|
8646
|
+
* mirror (`mode === 'active'`); `withLocationMode` is the only writer of
|
|
8647
|
+
* either, so the two cannot disagree.
|
|
8648
|
+
*/
|
|
8649
|
+
mode: StorageLocationModeSchema.optional(),
|
|
8607
8650
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
8608
8651
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
8609
8652
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -8611,11 +8654,46 @@ var StorageLocationSchema = object({
|
|
|
8611
8654
|
totalBytes: number(),
|
|
8612
8655
|
availableBytes: number()
|
|
8613
8656
|
}).nullable().optional(),
|
|
8657
|
+
/**
|
|
8658
|
+
* How much of that volume CamStack ITSELF holds on this location (D388) —
|
|
8659
|
+
* COMPUTED at read time from the `storage-occupancy` providers' own figures,
|
|
8660
|
+
* never persisted, never a filesystem walk.
|
|
8661
|
+
*
|
|
8662
|
+
* **ABSENT MEANS UNKNOWN, never zero.** No provider has reported for this
|
|
8663
|
+
* location yet — nobody stores here, the owning addon is down, or the first
|
|
8664
|
+
* refresh has not completed. A UI must omit the segment rather than draw it
|
|
8665
|
+
* at zero, which would claim we occupy nothing (D315). It is an OBJECT and
|
|
8666
|
+
* not a bare number precisely so that a `?? 0` on the consuming side has to
|
|
8667
|
+
* be spelled out loud instead of appearing by accident.
|
|
8668
|
+
*
|
|
8669
|
+
* `measuredAtMs` is the OLDEST contributing measurement, so it is honest
|
|
8670
|
+
* about the whole figure rather than about its freshest part.
|
|
8671
|
+
*/
|
|
8672
|
+
owned: object({
|
|
8673
|
+
bytes: number().int().nonnegative(),
|
|
8674
|
+
measuredAtMs: number().int().nonnegative()
|
|
8675
|
+
}).optional(),
|
|
8614
8676
|
createdAt: number(),
|
|
8615
8677
|
updatedAt: number()
|
|
8616
8678
|
});
|
|
8617
8679
|
object({ isDefault: boolean().optional() });
|
|
8618
8680
|
/**
|
|
8681
|
+
* How far a `drain` has got (D386) — the read a UI renders, and nothing more.
|
|
8682
|
+
*
|
|
8683
|
+
* `estimatedEmptyAtMs` is derived from the growth the ratchet has actually
|
|
8684
|
+
* OBSERVED and is `null` when it has observed none. Never a fabricated date: a
|
|
8685
|
+
* drain with no observed growth has no honest ETA, and inventing one is how an
|
|
8686
|
+
* operator learns not to believe the screen.
|
|
8687
|
+
*/
|
|
8688
|
+
var StorageDrainProgressSchema = object({
|
|
8689
|
+
locationId: string(),
|
|
8690
|
+
startedAtMs: number(),
|
|
8691
|
+
startBytes: number(),
|
|
8692
|
+
bytesRemaining: number(),
|
|
8693
|
+
drained: boolean(),
|
|
8694
|
+
estimatedEmptyAtMs: number().nullable()
|
|
8695
|
+
});
|
|
8696
|
+
/**
|
|
8619
8697
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8620
8698
|
* Either:
|
|
8621
8699
|
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
@@ -21576,7 +21654,7 @@ method(object({
|
|
|
21576
21654
|
}), _void(), {
|
|
21577
21655
|
kind: "mutation",
|
|
21578
21656
|
auth: "admin"
|
|
21579
|
-
}), method(object({ id: string() }), object({
|
|
21657
|
+
}), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
|
|
21580
21658
|
ok: boolean(),
|
|
21581
21659
|
error: string().optional()
|
|
21582
21660
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
@@ -21646,6 +21724,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
21646
21724
|
kind: "mutation",
|
|
21647
21725
|
auth: "admin"
|
|
21648
21726
|
}), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
|
|
21727
|
+
/**
|
|
21728
|
+
* `storage-occupancy` — how many bytes an addon actually HOLDS on a storage
|
|
21729
|
+
* location (D388).
|
|
21730
|
+
*
|
|
21731
|
+
* ## Why this is not `storage-evictable`
|
|
21732
|
+
*
|
|
21733
|
+
* `storage-evictable.getEvictableUsage` looks like the same question and is
|
|
21734
|
+
* not, in two ways that both matter and both bite hardest on the locations an
|
|
21735
|
+
* operator most wants a figure for:
|
|
21736
|
+
*
|
|
21737
|
+
* - it reports the whole eviction DOMAIN, not the location. `recordings:default`
|
|
21738
|
+
* and `recordingsLow:default` deliberately share one root and evict as one
|
|
21739
|
+
* oldest-first pool, so both answer with the SAME combined total. As an
|
|
21740
|
+
* occupancy figure that double-counts the disk.
|
|
21741
|
+
* - it reports ZERO for a location whose eviction policy is `never` (D385) —
|
|
21742
|
+
* a `readonly` or `disabled` disk. Those are exactly the disks an operator
|
|
21743
|
+
* is retiring and staring at.
|
|
21744
|
+
*
|
|
21745
|
+
* So this is its own contract with its own quantity, and the quantity is
|
|
21746
|
+
* OCCUPIED: every byte the addon holds on that location, whether or not it
|
|
21747
|
+
* would ever be willing to delete it. A provider that can only answer
|
|
21748
|
+
* "evictable" must not register here — a number that silently means different
|
|
21749
|
+
* things per class is worse than no number.
|
|
21750
|
+
*
|
|
21751
|
+
* ## Absence is an answer
|
|
21752
|
+
*
|
|
21753
|
+
* A location nobody reports for is UNKNOWN, never zero (D315). The orchestrator
|
|
21754
|
+
* stamps `StorageLocation.owned` only for locations it has a report for, and
|
|
21755
|
+
* the field is an OBJECT rather than a bare number so that a `?? 0` on the
|
|
21756
|
+
* consuming side has to be written out loud instead of appearing by accident.
|
|
21757
|
+
*
|
|
21758
|
+
* `internal: true` — consumed by the orchestrator's `listLocations` stamp, never
|
|
21759
|
+
* a public client surface. Clients read the stamped `StorageLocation.owned`.
|
|
21760
|
+
*/
|
|
21761
|
+
/** One provider's occupancy answer for one location. */
|
|
21762
|
+
var StorageOccupancyReportSchema = object({
|
|
21763
|
+
locationId: string(),
|
|
21764
|
+
/** Bytes this provider holds on THAT location — not its eviction domain, and
|
|
21765
|
+
* not net of what it is willing to delete. */
|
|
21766
|
+
ownedBytes: number().int().nonnegative(),
|
|
21767
|
+
/** When the provider last actually measured this. The orchestrator carries it
|
|
21768
|
+
* through so a UI can say how old the figure is instead of implying "now". */
|
|
21769
|
+
measuredAtMs: number().int().nonnegative()
|
|
21770
|
+
});
|
|
21771
|
+
method(object({ locationIds: array(string()).readonly() }), array(StorageOccupancyReportSchema).readonly(), { auth: "admin" });
|
|
21649
21772
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
21650
21773
|
providerId: string().min(1),
|
|
21651
21774
|
displayName: string().min(1),
|
|
@@ -23281,39 +23404,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
|
|
|
23281
23404
|
deviceId: number(),
|
|
23282
23405
|
status: BatteryStatusSchema
|
|
23283
23406
|
});
|
|
23284
|
-
/**
|
|
23285
|
-
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23286
|
-
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23287
|
-
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23288
|
-
* one Home Assistant projection.
|
|
23289
|
-
*/
|
|
23290
|
-
var NetworkLinkStatusSchema = object({
|
|
23291
|
-
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23292
|
-
type: _enum([
|
|
23293
|
-
"wifi",
|
|
23294
|
-
"ethernet",
|
|
23295
|
-
"cellular",
|
|
23296
|
-
"unknown"
|
|
23297
|
-
]),
|
|
23298
|
-
/**
|
|
23299
|
-
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23300
|
-
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23301
|
-
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23302
|
-
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23303
|
-
* SKIP a null rather than coerce it.
|
|
23304
|
-
*/
|
|
23305
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
23306
|
-
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23307
|
-
rssiDbm: number().optional(),
|
|
23308
|
-
/** Network name of a wireless link, when the firmware reports it. */
|
|
23309
|
-
ssid: string().optional(),
|
|
23310
|
-
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23311
|
-
lastUpdated: number()
|
|
23312
|
-
});
|
|
23313
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
23314
|
-
deviceId: number(),
|
|
23315
|
-
status: NetworkLinkStatusSchema
|
|
23316
|
-
});
|
|
23317
23407
|
object({
|
|
23318
23408
|
on: boolean(),
|
|
23319
23409
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -25667,6 +25757,236 @@ DeviceType.Camera, method(object({
|
|
|
25667
25757
|
detection: NativeDetectionSchema
|
|
25668
25758
|
});
|
|
25669
25759
|
/**
|
|
25760
|
+
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
25761
|
+
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
25762
|
+
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
25763
|
+
*
|
|
25764
|
+
* Why a NEW cap rather than overloading `ptz`:
|
|
25765
|
+
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
25766
|
+
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
25767
|
+
* The two are different physical models: PTZ is absolute-position + presets,
|
|
25768
|
+
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
25769
|
+
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
25770
|
+
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
25771
|
+
* the reverse:
|
|
25772
|
+
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
25773
|
+
* / `getOptions`), and
|
|
25774
|
+
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
25775
|
+
* robot camera shows up in the existing PTZ control path without every
|
|
25776
|
+
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
25777
|
+
* not here (see the addon design note):
|
|
25778
|
+
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
25779
|
+
* ptz.stop() → navigation.stop()
|
|
25780
|
+
* ptz.goHome() → navigation.runAction('goHome')
|
|
25781
|
+
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
25782
|
+
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
25783
|
+
*
|
|
25784
|
+
* ## Continuous drive
|
|
25785
|
+
*
|
|
25786
|
+
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
25787
|
+
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
25788
|
+
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
25789
|
+
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
25790
|
+
* coalesce them. The UI owns the cadence.
|
|
25791
|
+
*
|
|
25792
|
+
* ## The action dictionary
|
|
25793
|
+
*
|
|
25794
|
+
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
25795
|
+
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
25796
|
+
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
25797
|
+
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
25798
|
+
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
25799
|
+
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
25800
|
+
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
25801
|
+
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
25802
|
+
*
|
|
25803
|
+
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
25804
|
+
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
25805
|
+
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
25806
|
+
* every device handle. A future nodedreame publish adds a typed
|
|
25807
|
+
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
25808
|
+
* provider can then swap the raw calls for the typed methods with no change to
|
|
25809
|
+
* THIS contract.
|
|
25810
|
+
*/
|
|
25811
|
+
/**
|
|
25812
|
+
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
25813
|
+
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
25814
|
+
* halts it.
|
|
25815
|
+
*
|
|
25816
|
+
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
25817
|
+
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
25818
|
+
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
25819
|
+
* vector by it (drivers without proportional drive ignore it).
|
|
25820
|
+
*
|
|
25821
|
+
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
25822
|
+
* axis alone; an all-undefined nudge is a no-op.
|
|
25823
|
+
*/
|
|
25824
|
+
var NavigationMoveCommandSchema = object({
|
|
25825
|
+
pan: number().min(-1).max(1).optional(),
|
|
25826
|
+
tilt: number().min(-1).max(1).optional(),
|
|
25827
|
+
speed: number().min(0).max(1).optional()
|
|
25828
|
+
});
|
|
25829
|
+
/**
|
|
25830
|
+
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
25831
|
+
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
25832
|
+
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
25833
|
+
* `playSound` (see the `sound` dictionary entries).
|
|
25834
|
+
*/
|
|
25835
|
+
var NavigationActionIdSchema = _enum([
|
|
25836
|
+
"goHome",
|
|
25837
|
+
"locate",
|
|
25838
|
+
"spotClean",
|
|
25839
|
+
"findPet",
|
|
25840
|
+
"personFollow",
|
|
25841
|
+
"stop",
|
|
25842
|
+
"startClean",
|
|
25843
|
+
"pauseClean",
|
|
25844
|
+
"dockWash",
|
|
25845
|
+
"autoEmpty",
|
|
25846
|
+
"flashOn",
|
|
25847
|
+
"flashOff"
|
|
25848
|
+
]);
|
|
25849
|
+
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
25850
|
+
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
25851
|
+
/**
|
|
25852
|
+
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
25853
|
+
* native panel and the PTZ mimic render as a button.
|
|
25854
|
+
*
|
|
25855
|
+
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
25856
|
+
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
25857
|
+
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
25858
|
+
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
25859
|
+
* - `label` — operator-facing English label.
|
|
25860
|
+
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
25861
|
+
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
25862
|
+
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
25863
|
+
* flips it from config, never by editing code.
|
|
25864
|
+
*/
|
|
25865
|
+
var NavigationActionEntrySchema = object({
|
|
25866
|
+
id: string(),
|
|
25867
|
+
kind: NavigationEntryKindSchema,
|
|
25868
|
+
label: string(),
|
|
25869
|
+
icon: string(),
|
|
25870
|
+
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
25871
|
+
soundId: number().int().optional(),
|
|
25872
|
+
/** Per-device feature flag — render this entry only when true. */
|
|
25873
|
+
enabled: boolean()
|
|
25874
|
+
});
|
|
25875
|
+
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
25876
|
+
var NavigationPointSchema = object({
|
|
25877
|
+
x: number(),
|
|
25878
|
+
y: number()
|
|
25879
|
+
});
|
|
25880
|
+
/**
|
|
25881
|
+
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
25882
|
+
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
25883
|
+
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
25884
|
+
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
25885
|
+
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
25886
|
+
* that are not dictionary entries.
|
|
25887
|
+
*
|
|
25888
|
+
* - `move` / `stop` — the momentary drive joystick.
|
|
25889
|
+
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
25890
|
+
* map-coordinate plumbing is wired.
|
|
25891
|
+
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
25892
|
+
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
25893
|
+
* - `light` — the on/off fill-light toggle (works anytime).
|
|
25894
|
+
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
25895
|
+
* camera-service control; needs an active stream).
|
|
25896
|
+
*/
|
|
25897
|
+
var NavigationFeaturesSchema = object({
|
|
25898
|
+
move: boolean(),
|
|
25899
|
+
stop: boolean(),
|
|
25900
|
+
goToPoint: boolean(),
|
|
25901
|
+
runAction: boolean(),
|
|
25902
|
+
playSound: boolean(),
|
|
25903
|
+
light: boolean(),
|
|
25904
|
+
lightMode: boolean()
|
|
25905
|
+
});
|
|
25906
|
+
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
25907
|
+
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
25908
|
+
/**
|
|
25909
|
+
* Live navigation state so the UI can reflect what the robot is doing:
|
|
25910
|
+
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
25911
|
+
* - `following` — person/pet follow is currently armed.
|
|
25912
|
+
* - `flash` — the on-camera fill light is on.
|
|
25913
|
+
* - `lightMode` — auto vs manual fill-light mode.
|
|
25914
|
+
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
25915
|
+
* `lightMode === 'manual'`.
|
|
25916
|
+
*/
|
|
25917
|
+
var NavigationStatusSchema = object({
|
|
25918
|
+
mode: _enum([
|
|
25919
|
+
"idle",
|
|
25920
|
+
"cleaning",
|
|
25921
|
+
"spot",
|
|
25922
|
+
"following",
|
|
25923
|
+
"goto",
|
|
25924
|
+
"returning",
|
|
25925
|
+
"paused",
|
|
25926
|
+
"unknown"
|
|
25927
|
+
]),
|
|
25928
|
+
following: boolean(),
|
|
25929
|
+
flash: boolean(),
|
|
25930
|
+
lightMode: NavigationLightModeSchema,
|
|
25931
|
+
lightLevel: number().min(40).max(100),
|
|
25932
|
+
/** Ms epoch when the slice was last updated. */
|
|
25933
|
+
lastChangedAt: number()
|
|
25934
|
+
});
|
|
25935
|
+
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
25936
|
+
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({
|
|
25937
|
+
deviceId: number(),
|
|
25938
|
+
actionId: NavigationActionIdSchema
|
|
25939
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
25940
|
+
deviceId: number(),
|
|
25941
|
+
soundId: number().int()
|
|
25942
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
25943
|
+
deviceId: number(),
|
|
25944
|
+
on: boolean()
|
|
25945
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
25946
|
+
deviceId: number(),
|
|
25947
|
+
mode: NavigationLightModeSchema,
|
|
25948
|
+
level: number().min(40).max(100).optional()
|
|
25949
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
25950
|
+
deviceId: number(),
|
|
25951
|
+
level: number().min(40).max(100)
|
|
25952
|
+
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
25953
|
+
deviceId: number(),
|
|
25954
|
+
status: NavigationStatusSchema
|
|
25955
|
+
});
|
|
25956
|
+
/**
|
|
25957
|
+
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
25958
|
+
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
25959
|
+
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
25960
|
+
* one Home Assistant projection.
|
|
25961
|
+
*/
|
|
25962
|
+
var NetworkLinkStatusSchema = object({
|
|
25963
|
+
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
25964
|
+
type: _enum([
|
|
25965
|
+
"wifi",
|
|
25966
|
+
"ethernet",
|
|
25967
|
+
"cellular",
|
|
25968
|
+
"unknown"
|
|
25969
|
+
]),
|
|
25970
|
+
/**
|
|
25971
|
+
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
25972
|
+
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
25973
|
+
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
25974
|
+
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
25975
|
+
* SKIP a null rather than coerce it.
|
|
25976
|
+
*/
|
|
25977
|
+
signalPercent: number().min(0).max(100).nullable(),
|
|
25978
|
+
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
25979
|
+
rssiDbm: number().optional(),
|
|
25980
|
+
/** Network name of a wireless link, when the firmware reports it. */
|
|
25981
|
+
ssid: string().optional(),
|
|
25982
|
+
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
25983
|
+
lastUpdated: number()
|
|
25984
|
+
});
|
|
25985
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
25986
|
+
deviceId: number(),
|
|
25987
|
+
status: NetworkLinkStatusSchema
|
|
25988
|
+
});
|
|
25989
|
+
/**
|
|
25670
25990
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
25671
25991
|
* jitter, and observed/peak bandwidth per device + per client.
|
|
25672
25992
|
*
|
|
@@ -26908,203 +27228,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
26908
27228
|
deviceId: number(),
|
|
26909
27229
|
status: PtzAutotrackStatusSchema
|
|
26910
27230
|
});
|
|
26911
|
-
/**
|
|
26912
|
-
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
26913
|
-
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
26914
|
-
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
26915
|
-
*
|
|
26916
|
-
* Why a NEW cap rather than overloading `ptz`:
|
|
26917
|
-
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
26918
|
-
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
26919
|
-
* The two are different physical models: PTZ is absolute-position + presets,
|
|
26920
|
-
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
26921
|
-
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
26922
|
-
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
26923
|
-
* the reverse:
|
|
26924
|
-
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
26925
|
-
* / `getOptions`), and
|
|
26926
|
-
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
26927
|
-
* robot camera shows up in the existing PTZ control path without every
|
|
26928
|
-
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
26929
|
-
* not here (see the addon design note):
|
|
26930
|
-
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
26931
|
-
* ptz.stop() → navigation.stop()
|
|
26932
|
-
* ptz.goHome() → navigation.runAction('goHome')
|
|
26933
|
-
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
26934
|
-
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
26935
|
-
*
|
|
26936
|
-
* ## Continuous drive
|
|
26937
|
-
*
|
|
26938
|
-
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
26939
|
-
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
26940
|
-
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
26941
|
-
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
26942
|
-
* coalesce them. The UI owns the cadence.
|
|
26943
|
-
*
|
|
26944
|
-
* ## The action dictionary
|
|
26945
|
-
*
|
|
26946
|
-
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
26947
|
-
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
26948
|
-
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
26949
|
-
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
26950
|
-
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
26951
|
-
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
26952
|
-
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
26953
|
-
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
26954
|
-
*
|
|
26955
|
-
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
26956
|
-
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
26957
|
-
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
26958
|
-
* every device handle. A future nodedreame publish adds a typed
|
|
26959
|
-
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
26960
|
-
* provider can then swap the raw calls for the typed methods with no change to
|
|
26961
|
-
* THIS contract.
|
|
26962
|
-
*/
|
|
26963
|
-
/**
|
|
26964
|
-
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
26965
|
-
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
26966
|
-
* halts it.
|
|
26967
|
-
*
|
|
26968
|
-
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
26969
|
-
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
26970
|
-
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
26971
|
-
* vector by it (drivers without proportional drive ignore it).
|
|
26972
|
-
*
|
|
26973
|
-
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
26974
|
-
* axis alone; an all-undefined nudge is a no-op.
|
|
26975
|
-
*/
|
|
26976
|
-
var NavigationMoveCommandSchema = object({
|
|
26977
|
-
pan: number().min(-1).max(1).optional(),
|
|
26978
|
-
tilt: number().min(-1).max(1).optional(),
|
|
26979
|
-
speed: number().min(0).max(1).optional()
|
|
26980
|
-
});
|
|
26981
|
-
/**
|
|
26982
|
-
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
26983
|
-
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
26984
|
-
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
26985
|
-
* `playSound` (see the `sound` dictionary entries).
|
|
26986
|
-
*/
|
|
26987
|
-
var NavigationActionIdSchema = _enum([
|
|
26988
|
-
"goHome",
|
|
26989
|
-
"locate",
|
|
26990
|
-
"spotClean",
|
|
26991
|
-
"findPet",
|
|
26992
|
-
"personFollow",
|
|
26993
|
-
"stop",
|
|
26994
|
-
"startClean",
|
|
26995
|
-
"pauseClean",
|
|
26996
|
-
"dockWash",
|
|
26997
|
-
"autoEmpty",
|
|
26998
|
-
"flashOn",
|
|
26999
|
-
"flashOff"
|
|
27000
|
-
]);
|
|
27001
|
-
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
27002
|
-
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
27003
|
-
/**
|
|
27004
|
-
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27005
|
-
* native panel and the PTZ mimic render as a button.
|
|
27006
|
-
*
|
|
27007
|
-
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27008
|
-
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27009
|
-
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27010
|
-
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27011
|
-
* - `label` — operator-facing English label.
|
|
27012
|
-
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27013
|
-
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27014
|
-
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27015
|
-
* flips it from config, never by editing code.
|
|
27016
|
-
*/
|
|
27017
|
-
var NavigationActionEntrySchema = object({
|
|
27018
|
-
id: string(),
|
|
27019
|
-
kind: NavigationEntryKindSchema,
|
|
27020
|
-
label: string(),
|
|
27021
|
-
icon: string(),
|
|
27022
|
-
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27023
|
-
soundId: number().int().optional(),
|
|
27024
|
-
/** Per-device feature flag — render this entry only when true. */
|
|
27025
|
-
enabled: boolean()
|
|
27026
|
-
});
|
|
27027
|
-
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27028
|
-
var NavigationPointSchema = object({
|
|
27029
|
-
x: number(),
|
|
27030
|
-
y: number()
|
|
27031
|
-
});
|
|
27032
|
-
/**
|
|
27033
|
-
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27034
|
-
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27035
|
-
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27036
|
-
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27037
|
-
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27038
|
-
* that are not dictionary entries.
|
|
27039
|
-
*
|
|
27040
|
-
* - `move` / `stop` — the momentary drive joystick.
|
|
27041
|
-
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27042
|
-
* map-coordinate plumbing is wired.
|
|
27043
|
-
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27044
|
-
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27045
|
-
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27046
|
-
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27047
|
-
* camera-service control; needs an active stream).
|
|
27048
|
-
*/
|
|
27049
|
-
var NavigationFeaturesSchema = object({
|
|
27050
|
-
move: boolean(),
|
|
27051
|
-
stop: boolean(),
|
|
27052
|
-
goToPoint: boolean(),
|
|
27053
|
-
runAction: boolean(),
|
|
27054
|
-
playSound: boolean(),
|
|
27055
|
-
light: boolean(),
|
|
27056
|
-
lightMode: boolean()
|
|
27057
|
-
});
|
|
27058
|
-
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27059
|
-
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27060
|
-
/**
|
|
27061
|
-
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27062
|
-
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27063
|
-
* - `following` — person/pet follow is currently armed.
|
|
27064
|
-
* - `flash` — the on-camera fill light is on.
|
|
27065
|
-
* - `lightMode` — auto vs manual fill-light mode.
|
|
27066
|
-
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27067
|
-
* `lightMode === 'manual'`.
|
|
27068
|
-
*/
|
|
27069
|
-
var NavigationStatusSchema = object({
|
|
27070
|
-
mode: _enum([
|
|
27071
|
-
"idle",
|
|
27072
|
-
"cleaning",
|
|
27073
|
-
"spot",
|
|
27074
|
-
"following",
|
|
27075
|
-
"goto",
|
|
27076
|
-
"returning",
|
|
27077
|
-
"paused",
|
|
27078
|
-
"unknown"
|
|
27079
|
-
]),
|
|
27080
|
-
following: boolean(),
|
|
27081
|
-
flash: boolean(),
|
|
27082
|
-
lightMode: NavigationLightModeSchema,
|
|
27083
|
-
lightLevel: number().min(40).max(100),
|
|
27084
|
-
/** Ms epoch when the slice was last updated. */
|
|
27085
|
-
lastChangedAt: number()
|
|
27086
|
-
});
|
|
27087
|
-
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27088
|
-
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({
|
|
27089
|
-
deviceId: number(),
|
|
27090
|
-
actionId: NavigationActionIdSchema
|
|
27091
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27092
|
-
deviceId: number(),
|
|
27093
|
-
soundId: number().int()
|
|
27094
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27095
|
-
deviceId: number(),
|
|
27096
|
-
on: boolean()
|
|
27097
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27098
|
-
deviceId: number(),
|
|
27099
|
-
mode: NavigationLightModeSchema,
|
|
27100
|
-
level: number().min(40).max(100).optional()
|
|
27101
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27102
|
-
deviceId: number(),
|
|
27103
|
-
level: number().min(40).max(100)
|
|
27104
|
-
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27105
|
-
deviceId: number(),
|
|
27106
|
-
status: NavigationStatusSchema
|
|
27107
|
-
});
|
|
27108
27231
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
27109
27232
|
kind: "mutation",
|
|
27110
27233
|
auth: "admin"
|
|
@@ -34419,6 +34542,12 @@ Object.freeze({
|
|
|
34419
34542
|
addonId: null,
|
|
34420
34543
|
access: "view"
|
|
34421
34544
|
},
|
|
34545
|
+
"storage.listDrainProgress": {
|
|
34546
|
+
capName: "storage",
|
|
34547
|
+
capScope: "system",
|
|
34548
|
+
addonId: null,
|
|
34549
|
+
access: "view"
|
|
34550
|
+
},
|
|
34422
34551
|
"storage.listLocationDeclarations": {
|
|
34423
34552
|
capName: "storage",
|
|
34424
34553
|
capScope: "system",
|
|
@@ -34563,6 +34692,12 @@ Object.freeze({
|
|
|
34563
34692
|
addonId: null,
|
|
34564
34693
|
access: "view"
|
|
34565
34694
|
},
|
|
34695
|
+
"storageOccupancy.getOccupancy": {
|
|
34696
|
+
capName: "storage-occupancy",
|
|
34697
|
+
capScope: "system",
|
|
34698
|
+
addonId: null,
|
|
34699
|
+
access: "view"
|
|
34700
|
+
},
|
|
34566
34701
|
"storageProvider.abortUpload": {
|
|
34567
34702
|
capName: "storage-provider",
|
|
34568
34703
|
capScope: "system",
|
|
@@ -37962,7 +38097,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
37962
38097
|
capability: adminUiCapability,
|
|
37963
38098
|
provider: {
|
|
37964
38099
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
37965
|
-
getVersion: async () => ({ version: "1.2.
|
|
38100
|
+
getVersion: async () => ({ version: "1.2.162" })
|
|
37966
38101
|
}
|
|
37967
38102
|
}];
|
|
37968
38103
|
}
|