@camstack/addon-admin-ui 1.2.160 → 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-BDi0kO22.js → AddonCollectionPage-CVXlT82P.js} +1 -1
- package/dist/assets/{Addons-DckDU3mb.js → Addons-X-B5Zu2Z.js} +1 -1
- package/dist/assets/{AdminTabs-CveKvUPm.js → AdminTabs-C0HjPryL.js} +1 -1
- package/dist/assets/{AiProfiles-CrGxIYmh.js → AiProfiles-zZCUJWMi.js} +1 -1
- package/dist/assets/{BrokerForm-CiblpYTb.js → BrokerForm-ChQ7nWwo.js} +1 -1
- package/dist/assets/{Build-BWrwcHgy.js → Build-CaN90jcN.js} +1 -1
- package/dist/assets/{Capabilities-DN32LWQE.js → Capabilities-DpB1PQHe.js} +1 -1
- package/dist/assets/{CapabilityBadges-IRI6JdeN.js → CapabilityBadges-CqryAsPv.js} +1 -1
- package/dist/assets/{Cluster-D1TxDS2t.js → Cluster-G1IfcoJk.js} +2 -2
- package/dist/assets/Data-Dra2xNmy.js +1 -0
- package/dist/assets/{DetectionIntelligence-fkvVLUh9.js → DetectionIntelligence-gsiXBqeF.js} +1 -1
- package/dist/assets/{DeviceAggregateSection-xrpkizdx.js → DeviceAggregateSection-PsTImQRG.js} +1 -1
- package/dist/assets/{DeviceDetail-pbSEj_Yy.js → DeviceDetail-BNn-DJaZ.js} +2 -2
- package/dist/assets/{Devices-D1GSH47H.js → Devices-CkM919eI.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-B--02ZrY.js → EmbedPlayerPage-BqnzuuJJ.js} +1 -1
- package/dist/assets/{Events-BB4LciGV.js → Events-DMjWkg6Y.js} +1 -1
- package/dist/assets/{FormBuilder-Cby6uaJs.js → FormBuilder-DJIpbrRD.js} +1 -1
- package/dist/assets/{Identity-B7SGwMLS.js → Identity-DkPcvpZI.js} +1 -1
- package/dist/assets/{IntegrationDetail-s6-Uw4EY.js → IntegrationDetail-G0gylND2.js} +1 -1
- package/dist/assets/{Integrations-XdSwDFZK.js → Integrations-BY26xGGN.js} +1 -1
- package/dist/assets/{Integrations-Bpx3Po3K.js → Integrations-Ba5QY_Db.js} +1 -1
- package/dist/assets/{Locations-Dmuf6b1k.js → Locations-DcShvv_B.js} +1 -1
- package/dist/assets/{Logs-FAZBoc5m.js → Logs-Dt1oL6Ne.js} +1 -1
- package/dist/assets/{MotionZonesSettings-BxotgjxV.js → MotionZonesSettings-DbAzh16t.js} +1 -1
- package/dist/assets/{MyAccess-9ZlxXVSn.js → MyAccess-hUgOahul.js} +1 -1
- package/dist/assets/{Network-CRwpfMJ8.js → Network-BM5gHwHa.js} +1 -1
- package/dist/assets/{NodeAddonsSettingsPanel-CYRQHBjB.js → NodeAddonsSettingsPanel-BRjADPFj.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-DkVG64vb.js → NodeInferenceDevices-D_m9EVBM.js} +1 -1
- package/dist/assets/{Notifications-CqRzGcZM.js → Notifications-DnSdyvR7.js} +1 -1
- package/dist/assets/{Pipeline-ktAba7H4.js → Pipeline-CrcPBAPW.js} +1 -1
- package/dist/assets/{Plates-CULIFHR_.js → Plates-baKb84ax.js} +1 -1
- package/dist/assets/{PrivacyMaskSettings-CqseimbL.js → PrivacyMaskSettings-DAUFZ6wz.js} +1 -1
- package/dist/assets/{ProviderIcon-yQVhpU8Z.js → ProviderIcon-7SEkSc3x.js} +1 -1
- package/dist/assets/Recordings-BAaEaUyH.js +1 -0
- package/dist/assets/{ScanNetworkModal-DxjQClUC.js → ScanNetworkModal-DIAg8SvS.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-DkCdm2Tr.js → SceneMonitorEditor-PVPsicEf.js} +1 -1
- package/dist/assets/{Scenes-BJoeFE5N.js → Scenes-D-53XCVS.js} +1 -1
- package/dist/assets/{Settings-D27ia0Ys.js → Settings-8HFz7_4b.js} +1 -1
- package/dist/assets/{Showroom-DXB4IWSk.js → Showroom-D2TZzhhG.js} +1 -1
- package/dist/assets/StorageLocationsPanel-CSZxqVc1.js +1 -0
- package/dist/assets/{Terminal-vBGGGzEA.js → Terminal-C5lOIWKi.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BefwEKW7.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BIxwxeXV.js} +1 -1
- package/dist/assets/{authed-media-DEMM8rN-.js → authed-media-oFtTLnSo.js} +1 -1
- package/dist/assets/{bell-off-O3iPYBLt.js → bell-off-Bu58tCSe.js} +1 -1
- package/dist/assets/{bell-ring-BGot39PW.js → bell-ring-D6CNMR5a.js} +1 -1
- package/dist/assets/{boxes-Dl8zd-Iy.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-dNLn8ufL.js → circle-x-OgmRm7RF.js} +1 -1
- package/dist/assets/clock-B5FIt0QG.js +1 -0
- package/dist/assets/{copy-BokFLxVN.js → copy-BMx8D0jk.js} +1 -1
- package/dist/assets/{debounced-invalidate-u8WtysZY.js → debounced-invalidate-BQa0chBJ.js} +1 -1
- package/dist/assets/{dist-fG-yHcpK.js → dist-BUkDp1q9.js} +1 -1
- package/dist/assets/dist-DnSj1S0J.js +349 -0
- package/dist/assets/{download-CuisOyZ6.js → download-COB_8ZN4.js} +1 -1
- package/dist/assets/{face-bbox-KhMSbYvQ.js → face-bbox-DxJxdnuR.js} +1 -1
- package/dist/assets/{flame-DuR_10OR.js → flame-D_G_k09K.js} +1 -1
- package/dist/assets/format-size-BwFaHYTC.js +1 -0
- package/dist/assets/{hard-drive-B07Oww46.js → hard-drive-BRJV12KE.js} +1 -1
- package/dist/assets/{hostInit-akHYWpNQ.js → hostInit-DBSKfSb9.js} +1 -1
- package/dist/assets/{index-BklHyIal.js → index-CjToGvfD.js} +3 -3
- package/dist/assets/index-D6yBCo4s.css +2 -0
- package/dist/assets/{key-round-k1Gujee5.js → key-round-B-_5LjK2.js} +1 -1
- package/dist/assets/{layers-MK6u8uVU.js → layers-CZ0fbzZD.js} +1 -1
- package/dist/assets/location-owned-usage-WHFlA8Qw.js +1 -0
- package/dist/assets/{mf-entry-bootstrap-0-210c2eee.js → mf-entry-bootstrap-0-6fedd28a.js} +2 -2
- package/dist/assets/{pencil-v2P1AEH5.js → pencil-BryYtd6q.js} +1 -1
- package/dist/assets/play-Cn0mIBXd.js +1 -0
- package/dist/assets/{player-overlays-CxnHC7sY.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-R56V_r6g.js → radio-CcuCrj-b.js} +1 -1
- package/dist/assets/{refresh-cw-CXKfzi_J.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-DQUJR0vc.js → send-CBoAcNiU.js} +1 -1
- package/dist/assets/{server-CmlNUL8C.js → server-BFmcuET7.js} +1 -1
- package/dist/assets/{shield-MZZGGMzf.js → shield-WbkYgVY-.js} +1 -1
- package/dist/assets/{shield-alert-rbSDihUT.js → shield-alert-bLad91WY.js} +1 -1
- package/dist/assets/square-C95bY7Mh.js +1 -0
- package/dist/assets/{square-check-big-CSlARdJs.js → square-check-big-C9DzkTZR.js} +1 -1
- package/dist/assets/{src-Bx6lUScl.js → src-BurbTgHr.js} +7 -7
- package/dist/assets/src-DSOXw8KA.js +349 -0
- package/dist/assets/{undo-2-AaMxVZOq.js → undo-2-BMAMnn0a.js} +1 -1
- package/dist/assets/{use-scenes-feed-BRYAkNrr.js → use-scenes-feed-DOkswLPM.js} +1 -1
- package/dist/assets/useEventInvalidation-xE7MyVTv.js +1 -0
- package/dist/assets/{useNodeUrlSelection-DDch3u6A.js → useNodeUrlSelection-DkHWKBE3.js} +1 -1
- package/dist/assets/user-round-QQ8oqzin.js +1 -0
- package/dist/assets/{video-B8ONQTGR.js → video-B10L6wHL.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DYGm7E8p.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_--hiLzLBb.js} +2 -2
- package/dist/assets/{wifi-OmF28Vw4.js → wifi-BHPJu4tt.js} +1 -1
- package/dist/assets/{zap-CgfbQhJZ.js → zap-BWD6AZU5.js} +1 -1
- package/dist/index.html +6 -6
- package/dist/server/addon.js +489 -356
- package/package.json +1 -1
- package/dist/assets/AddLocationWizard-DZGKTCio.js +0 -1
- package/dist/assets/Data-OEdqVCtI.js +0 -1
- package/dist/assets/Recordings-DeG3Hgrm.js +0 -1
- package/dist/assets/StorageLocationsPanel-tbX04-HC.js +0 -1
- package/dist/assets/circle-check-big-DQPHbnu7.js +0 -1
- package/dist/assets/circle-dot-9gDaQtZD.js +0 -1
- package/dist/assets/circle-slash-DnE0R9_Q.js +0 -1
- package/dist/assets/clock-ClLxm7-h.js +0 -1
- package/dist/assets/dist-Davo3ZyC.js +0 -349
- package/dist/assets/format-size-DIxKXxtj.js +0 -1
- package/dist/assets/hard-drive-download-Ddof9L_G.js +0 -1
- package/dist/assets/index-Dbhx40K_.css +0 -2
- package/dist/assets/play-CEY_2y9h.js +0 -1
- package/dist/assets/plus-D4lVENRG.js +0 -1
- package/dist/assets/power-BjiRWY2g.js +0 -1
- package/dist/assets/remoteEntry-BcjiM6Md.js +0 -1
- package/dist/assets/rotate-ccw-bzd2PVak.js +0 -1
- package/dist/assets/rotate-cw-B9URuo-5.js +0 -1
- package/dist/assets/square-XVm3-E9p.js +0 -1
- package/dist/assets/src-C-Iybm4d.js +0 -349
- package/dist/assets/useEventInvalidation-CuSCKAt_.js +0 -1
- package/dist/assets/user-round-C2qxJpN_.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";
|
|
@@ -7618,111 +7631,6 @@ var CameraSwitchGroupSchema = object({
|
|
|
7618
7631
|
fetchedAt: number()
|
|
7619
7632
|
});
|
|
7620
7633
|
/**
|
|
7621
|
-
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
7622
|
-
* an addon declares its channels in.
|
|
7623
|
-
*
|
|
7624
|
-
* ## Two axes, deliberately separated
|
|
7625
|
-
*
|
|
7626
|
-
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
7627
|
-
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
7628
|
-
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
7629
|
-
* and rots silently. So a channel is declared where it is consulted, and the
|
|
7630
|
-
* `log-channels` capability enumerates the declarations.
|
|
7631
|
-
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
7632
|
-
* thing: the logging settings document on the `system` cap. Two authorities
|
|
7633
|
-
* over the values is the exact defect
|
|
7634
|
-
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
7635
|
-
* remove; re-introducing it from the cure side would be grotesque.
|
|
7636
|
-
*
|
|
7637
|
-
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
7638
|
-
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
7639
|
-
* the hot path with a value somebody actually read, and by
|
|
7640
|
-
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
7641
|
-
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
7642
|
-
* disarmed one (D49).
|
|
7643
|
-
*
|
|
7644
|
-
* ## The canonical call shape
|
|
7645
|
-
*
|
|
7646
|
-
* ```ts
|
|
7647
|
-
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
7648
|
-
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
7649
|
-
* }
|
|
7650
|
-
* ```
|
|
7651
|
-
*
|
|
7652
|
-
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
7653
|
-
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
7654
|
-
* object literal is never constructed because it lives inside the branch. It
|
|
7655
|
-
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
7656
|
-
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
7657
|
-
* destination floor (measured at 1.93 ns/call when off).
|
|
7658
|
-
*
|
|
7659
|
-
* ## Why a channel emits at `info`
|
|
7660
|
-
*
|
|
7661
|
-
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
7662
|
-
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
7663
|
-
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
7664
|
-
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
7665
|
-
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
7666
|
-
* emits at the channel's declared level, whose schema floor is `info`.
|
|
7667
|
-
*/
|
|
7668
|
-
/**
|
|
7669
|
-
* The level a channel writes at once armed.
|
|
7670
|
-
*
|
|
7671
|
-
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
7672
|
-
* not leave the process for Loki, and the whole point of arming a channel is
|
|
7673
|
-
* to read it later.
|
|
7674
|
-
*/
|
|
7675
|
-
var LogChannelLevelSchema = _enum([
|
|
7676
|
-
"info",
|
|
7677
|
-
"warn",
|
|
7678
|
-
"error"
|
|
7679
|
-
]);
|
|
7680
|
-
/**
|
|
7681
|
-
* What an addon declares about one channel. No value, no state — a
|
|
7682
|
-
* declaration is inert.
|
|
7683
|
-
*/
|
|
7684
|
-
var LogChannelDescriptorSchema = object({
|
|
7685
|
-
/**
|
|
7686
|
-
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
7687
|
-
* the addon's short name so an operator reading a channel list can tell who
|
|
7688
|
-
* owns it without a second lookup.
|
|
7689
|
-
*/
|
|
7690
|
-
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
7691
|
-
/** One sentence: what the operator will SEE after arming it. */
|
|
7692
|
-
description: string().min(1),
|
|
7693
|
-
/** The level its lines are emitted at. Never below `info`. */
|
|
7694
|
-
defaultLevel: LogChannelLevelSchema,
|
|
7695
|
-
/**
|
|
7696
|
-
* Whether this channel can be narrowed to a camera.
|
|
7697
|
-
*
|
|
7698
|
-
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
7699
|
-
* consulted with the numeric device id, AND every line the channel admits
|
|
7700
|
-
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
7701
|
-
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
7702
|
-
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
7703
|
-
* the body is the only way to filter.
|
|
7704
|
-
*
|
|
7705
|
-
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
7706
|
-
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
7707
|
-
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
7708
|
-
* path was never taken.
|
|
7709
|
-
*/
|
|
7710
|
-
perDevice: boolean()
|
|
7711
|
-
});
|
|
7712
|
-
/**
|
|
7713
|
-
* An armed window over one channel, as the document hands it to a mirror.
|
|
7714
|
-
*
|
|
7715
|
-
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
7716
|
-
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
7717
|
-
*/
|
|
7718
|
-
var LogChannelWindowSchema = object({
|
|
7719
|
-
channel: string().min(1),
|
|
7720
|
-
/** Epoch ms the window closes at. */
|
|
7721
|
-
armedUntilMs: number(),
|
|
7722
|
-
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
7723
|
-
deviceIds: array(number().int()).readonly().nullable()
|
|
7724
|
-
});
|
|
7725
|
-
/**
|
|
7726
7634
|
* Ops-log — the durable, append-only operations audit shared by the
|
|
7727
7635
|
* recordings and events management surfaces.
|
|
7728
7636
|
*
|
|
@@ -8644,6 +8552,21 @@ var StorageCleanupJobSchema = object({
|
|
|
8644
8552
|
});
|
|
8645
8553
|
var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
|
|
8646
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
|
+
/**
|
|
8647
8570
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8648
8571
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8649
8572
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8668,8 +8591,11 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
|
|
|
8668
8591
|
* `STORAGE_LOCATION_CARDINALITY` map has been removed.
|
|
8669
8592
|
*
|
|
8670
8593
|
* `id` is a stable namespaced string of the form `<type>:<slug>`.
|
|
8671
|
-
* The
|
|
8672
|
-
*
|
|
8594
|
+
* The seed names its first instance `<type>:default` — a NAME, not a flag.
|
|
8595
|
+
* There is no default location any more (D383): `enabled` is the whole write
|
|
8596
|
+
* model, and a bare type ref resolves to the sole location of the type, or —
|
|
8597
|
+
* transitionally, only while legacy NULL-stamped rows exist — to the row whose
|
|
8598
|
+
* slug is `default`.
|
|
8673
8599
|
*
|
|
8674
8600
|
* `isSystem` is a legacy persisted flag. Seed still creates the initial
|
|
8675
8601
|
* `<type>:default` locations; the flag is no longer a lock, a badge, or a
|
|
@@ -8690,23 +8616,37 @@ var StorageLocationSchema = object({
|
|
|
8690
8616
|
* flag at upsert time, not here (the schema is provider-agnostic).
|
|
8691
8617
|
*/
|
|
8692
8618
|
nodeId: string().optional(),
|
|
8693
|
-
isDefault: boolean().default(false),
|
|
8694
8619
|
isSystem: boolean().default(false),
|
|
8695
8620
|
/**
|
|
8696
|
-
*
|
|
8697
|
-
*
|
|
8698
|
-
*
|
|
8699
|
-
*
|
|
8700
|
-
*
|
|
8621
|
+
* THE write switch, and the only one (D383). `enabled: true` means every
|
|
8622
|
+
* consumer that chooses a write target for this type may write here, and all
|
|
8623
|
+
* enabled locations of a type are used TOGETHER; `false` means read-only —
|
|
8624
|
+
* still read, still played back, still age-swept, still drained, never
|
|
8625
|
+
* written.
|
|
8701
8626
|
*
|
|
8702
|
-
* OPTIONAL
|
|
8703
|
-
*
|
|
8704
|
-
*
|
|
8705
|
-
*
|
|
8706
|
-
*
|
|
8707
|
-
*
|
|
8627
|
+
* OPTIONAL only for the wire: an upsert that omits it means "leave what is
|
|
8628
|
+
* stored" on an update and "born inert unless it is the first location of its
|
|
8629
|
+
* type" on a create. On a PERSISTED row absence is legacy and it means
|
|
8630
|
+
* enabled — {@link isLocationEnabled} is the one place that says so, and the
|
|
8631
|
+
* orchestrator stamps every flagless row `true` once at hydrate so absence
|
|
8632
|
+
* stops existing rather than being re-derived on every read.
|
|
8708
8633
|
*/
|
|
8709
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(),
|
|
8710
8650
|
/** COMPUTED at read time by the orchestrator (statfs of the backing volume
|
|
8711
8651
|
* for node-local locations it can reach) — never persisted, absent when the
|
|
8712
8652
|
* volume is remote/unreachable. The single capacity truth every UI reads. */
|
|
@@ -8714,13 +8654,50 @@ var StorageLocationSchema = object({
|
|
|
8714
8654
|
totalBytes: number(),
|
|
8715
8655
|
availableBytes: number()
|
|
8716
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(),
|
|
8717
8676
|
createdAt: number(),
|
|
8718
8677
|
updatedAt: number()
|
|
8719
8678
|
});
|
|
8679
|
+
object({ isDefault: boolean().optional() });
|
|
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
|
+
});
|
|
8720
8696
|
/**
|
|
8721
8697
|
* Reference accepted by consumer-facing `api.storage.*` calls.
|
|
8722
8698
|
* Either:
|
|
8723
|
-
* - a `StorageLocationType` (e.g. `'backups'`) →
|
|
8699
|
+
* - a `StorageLocationType` (e.g. `'backups'`) → the sole location of that type
|
|
8700
|
+
* (transitionally, the `<type>:default`-slugged row when several exist)
|
|
8724
8701
|
* - a fully-qualified id (e.g. `'backups:nas-01'`) → addresses a specific instance
|
|
8725
8702
|
*
|
|
8726
8703
|
* The orchestrator's `resolveRef(ref)` handles both cases.
|
|
@@ -8896,6 +8873,111 @@ var DecoderSessionConfigSchema = object({
|
|
|
8896
8873
|
*/
|
|
8897
8874
|
debug: boolean().optional()
|
|
8898
8875
|
});
|
|
8876
|
+
/**
|
|
8877
|
+
* Per-component log CHANNELS — the gate a hot path consults, and the registry
|
|
8878
|
+
* an addon declares its channels in.
|
|
8879
|
+
*
|
|
8880
|
+
* ## Two axes, deliberately separated
|
|
8881
|
+
*
|
|
8882
|
+
* - **DECLARATION** — which channels exist. Only the addon knows:
|
|
8883
|
+
* `stream-broker` knows webrtc/ICE/RTP, `provider-reolink` knows
|
|
8884
|
+
* baichuan/handshake. A hand-wired central list rots at the first addition,
|
|
8885
|
+
* and rots silently. So a channel is declared where it is consulted, and the
|
|
8886
|
+
* `log-channels` capability enumerates the declarations.
|
|
8887
|
+
* - **VALUE** — at which level, for which scope, until when. That stays ONE
|
|
8888
|
+
* thing: the logging settings document on the `system` cap. Two authorities
|
|
8889
|
+
* over the values is the exact defect
|
|
8890
|
+
* `docs/design/plans/2026-08-26-logging-per-componente.md` was written to
|
|
8891
|
+
* remove; re-introducing it from the cure side would be grotesque.
|
|
8892
|
+
*
|
|
8893
|
+
* Nothing in this file reads a clock, an env var or a store. The registry is
|
|
8894
|
+
* a MIRROR: it is moved only by {@link LogChannelRegistry.apply}, called off
|
|
8895
|
+
* the hot path with a value somebody actually read, and by
|
|
8896
|
+
* {@link LogChannelRegistry.tick}, called on a timer. A store read that fails
|
|
8897
|
+
* never reaches here, so it can neither disarm an armed channel nor arm a
|
|
8898
|
+
* disarmed one (D49).
|
|
8899
|
+
*
|
|
8900
|
+
* ## The canonical call shape
|
|
8901
|
+
*
|
|
8902
|
+
* ```ts
|
|
8903
|
+
* if (CH_RTP.on && CH_RTP.wants(deviceId)) {
|
|
8904
|
+
* CH_RTP.log(logger, 'rtp subscriber added', { tags: { deviceId }, meta: { ssrc } })
|
|
8905
|
+
* }
|
|
8906
|
+
* ```
|
|
8907
|
+
*
|
|
8908
|
+
* `on` is a plain boolean FIELD — never a getter — and it is the FIRST thing
|
|
8909
|
+
* read. Disarmed, a call site costs one load and one branch, and the `extras`
|
|
8910
|
+
* object literal is never constructed because it lives inside the branch. It
|
|
8911
|
+
* is the same shape already proven in production at `stream-broker.ts:1650`,
|
|
8912
|
+
* and the same discipline `LoggingGate.allowsDestination` uses for the
|
|
8913
|
+
* destination floor (measured at 1.93 ns/call when off).
|
|
8914
|
+
*
|
|
8915
|
+
* ## Why a channel emits at `info`
|
|
8916
|
+
*
|
|
8917
|
+
* `loki-logging.addon.ts` pins the destination default at `info` and
|
|
8918
|
+
* `loki-destination.ts` drops everything below it, so a line emitted at
|
|
8919
|
+
* `debug` never reaches Loki and the hub's in-memory ring only holds ~35
|
|
8920
|
+
* minutes. A diagnostic that cannot be read an hour later is worse than no
|
|
8921
|
+
* diagnostic, because it looks done. {@link LogChannelGate.log} therefore
|
|
8922
|
+
* emits at the channel's declared level, whose schema floor is `info`.
|
|
8923
|
+
*/
|
|
8924
|
+
/**
|
|
8925
|
+
* The level a channel writes at once armed.
|
|
8926
|
+
*
|
|
8927
|
+
* `debug` is absent ON PURPOSE and not by omission: below `info` the line does
|
|
8928
|
+
* not leave the process for Loki, and the whole point of arming a channel is
|
|
8929
|
+
* to read it later.
|
|
8930
|
+
*/
|
|
8931
|
+
var LogChannelLevelSchema = _enum([
|
|
8932
|
+
"info",
|
|
8933
|
+
"warn",
|
|
8934
|
+
"error"
|
|
8935
|
+
]);
|
|
8936
|
+
/**
|
|
8937
|
+
* What an addon declares about one channel. No value, no state — a
|
|
8938
|
+
* declaration is inert.
|
|
8939
|
+
*/
|
|
8940
|
+
var LogChannelDescriptorSchema = object({
|
|
8941
|
+
/**
|
|
8942
|
+
* Dotted `area.thing`, unique across the workspace. `area` is conventionally
|
|
8943
|
+
* the addon's short name so an operator reading a channel list can tell who
|
|
8944
|
+
* owns it without a second lookup.
|
|
8945
|
+
*/
|
|
8946
|
+
name: string().min(3).regex(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/, "a channel name is dotted lower-kebab, e.g. area.thing"),
|
|
8947
|
+
/** One sentence: what the operator will SEE after arming it. */
|
|
8948
|
+
description: string().min(1),
|
|
8949
|
+
/** The level its lines are emitted at. Never below `info`. */
|
|
8950
|
+
defaultLevel: LogChannelLevelSchema,
|
|
8951
|
+
/**
|
|
8952
|
+
* Whether this channel can be narrowed to a camera.
|
|
8953
|
+
*
|
|
8954
|
+
* `true` is a PROMISE with two halves, and both must hold: the gate is
|
|
8955
|
+
* consulted with the numeric device id, AND every line the channel admits
|
|
8956
|
+
* carries `tags: { deviceId }` with that same numeric id. The second half is
|
|
8957
|
+
* what makes `| json | deviceId="617"` work in Loki — `loki-payload.ts`
|
|
8958
|
+
* keeps `deviceId` out of the stream labels for cardinality, so the tag in
|
|
8959
|
+
* the body is the only way to filter.
|
|
8960
|
+
*
|
|
8961
|
+
* A channel whose lines carry the device only in `meta` (or not at all) is
|
|
8962
|
+
* declared `false`. Declaring it `true` anyway would be a lie the UI repeats:
|
|
8963
|
+
* the operator narrows to one camera, sees nothing, and concludes the code
|
|
8964
|
+
* path was never taken.
|
|
8965
|
+
*/
|
|
8966
|
+
perDevice: boolean()
|
|
8967
|
+
});
|
|
8968
|
+
/**
|
|
8969
|
+
* An armed window over one channel, as the document hands it to a mirror.
|
|
8970
|
+
*
|
|
8971
|
+
* A window is a DEADLINE, never a flag (ADR-0244): a channel somebody forgot
|
|
8972
|
+
* expires by itself, which is the one failure a boolean cannot avoid.
|
|
8973
|
+
*/
|
|
8974
|
+
var LogChannelWindowSchema = object({
|
|
8975
|
+
channel: string().min(1),
|
|
8976
|
+
/** Epoch ms the window closes at. */
|
|
8977
|
+
armedUntilMs: number(),
|
|
8978
|
+
/** `null` = every camera. A non-empty list narrows to those numeric ids. */
|
|
8979
|
+
deviceIds: array(number().int()).readonly().nullable()
|
|
8980
|
+
});
|
|
8899
8981
|
var MODEL_FORMATS = [
|
|
8900
8982
|
"onnx",
|
|
8901
8983
|
"coreml",
|
|
@@ -21560,7 +21642,7 @@ method(object({
|
|
|
21560
21642
|
downloadId: string(),
|
|
21561
21643
|
offset: number(),
|
|
21562
21644
|
length: number()
|
|
21563
|
-
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(
|
|
21645
|
+
}), _instanceof(Uint8Array)), method(object({ downloadId: string() }), _void(), { kind: "mutation" }), method(object({ type: StorageLocationTypeSchema.optional() }), array(StorageLocationSchema).readonly()), method(_void(), array(StorageLocationDeclarationSchema).readonly()), method(StorageLocationSchema.omit({
|
|
21564
21646
|
createdAt: true,
|
|
21565
21647
|
updatedAt: true
|
|
21566
21648
|
}), StorageLocationSchema, {
|
|
@@ -21572,7 +21654,7 @@ method(object({
|
|
|
21572
21654
|
}), _void(), {
|
|
21573
21655
|
kind: "mutation",
|
|
21574
21656
|
auth: "admin"
|
|
21575
|
-
}), method(object({ id: string() }), object({
|
|
21657
|
+
}), method(_void(), array(StorageDrainProgressSchema).readonly()), method(object({ id: string() }), object({
|
|
21576
21658
|
ok: boolean(),
|
|
21577
21659
|
error: string().optional()
|
|
21578
21660
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
@@ -21642,6 +21724,51 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
21642
21724
|
kind: "mutation",
|
|
21643
21725
|
auth: "admin"
|
|
21644
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" });
|
|
21645
21772
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
21646
21773
|
providerId: string().min(1),
|
|
21647
21774
|
displayName: string().min(1),
|
|
@@ -23277,39 +23404,6 @@ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, meth
|
|
|
23277
23404
|
deviceId: number(),
|
|
23278
23405
|
status: BatteryStatusSchema
|
|
23279
23406
|
});
|
|
23280
|
-
/**
|
|
23281
|
-
* Network-link snapshot. Same shape for every provider (a Reolink wifi
|
|
23282
|
-
* camera, a Home Assistant device with a signal-strength sensor, a Tapo
|
|
23283
|
-
* plug): one slice under `device.runtimeState['network-link']`, one badge,
|
|
23284
|
-
* one Home Assistant projection.
|
|
23285
|
-
*/
|
|
23286
|
-
var NetworkLinkStatusSchema = object({
|
|
23287
|
-
/** The link the device is on. `'unknown'` = not read yet, not "no link". */
|
|
23288
|
-
type: _enum([
|
|
23289
|
-
"wifi",
|
|
23290
|
-
"ethernet",
|
|
23291
|
-
"cellular",
|
|
23292
|
-
"unknown"
|
|
23293
|
-
]),
|
|
23294
|
-
/**
|
|
23295
|
-
* Link quality, 0..100 inclusive, normalised by the provider from whatever
|
|
23296
|
-
* the firmware reports (bars, RSSI, a vendor scale). **`null` means NOT
|
|
23297
|
-
* KNOWN or NOT APPLICABLE** — a wired link has no signal, and a wireless
|
|
23298
|
-
* one whose reading has not landed must not be drawn at 0 %. Consumers
|
|
23299
|
-
* SKIP a null rather than coerce it.
|
|
23300
|
-
*/
|
|
23301
|
-
signalPercent: number().min(0).max(100).nullable(),
|
|
23302
|
-
/** Raw received signal strength in dBm, when the firmware reports one. */
|
|
23303
|
-
rssiDbm: number().optional(),
|
|
23304
|
-
/** Network name of a wireless link, when the firmware reports it. */
|
|
23305
|
-
ssid: string().optional(),
|
|
23306
|
-
/** Ms epoch of the last observation. Lets consumers reason about freshness. */
|
|
23307
|
-
lastUpdated: number()
|
|
23308
|
-
});
|
|
23309
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.Light, DeviceType.Lock, DeviceType.Siren, object({
|
|
23310
|
-
deviceId: number(),
|
|
23311
|
-
status: NetworkLinkStatusSchema
|
|
23312
|
-
});
|
|
23313
23407
|
object({
|
|
23314
23408
|
on: boolean(),
|
|
23315
23409
|
/** Ms epoch of the last transition. 0 if never observed. */
|
|
@@ -25663,6 +25757,236 @@ DeviceType.Camera, method(object({
|
|
|
25663
25757
|
detection: NativeDetectionSchema
|
|
25664
25758
|
});
|
|
25665
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
|
+
/**
|
|
25666
25990
|
* network-quality — system-scoped singleton capability tracking RTT,
|
|
25667
25991
|
* jitter, and observed/peak bandwidth per device + per client.
|
|
25668
25992
|
*
|
|
@@ -26904,203 +27228,6 @@ DeviceType.Camera, method(object({ deviceId: number() }), PtzAutotrackStatusSche
|
|
|
26904
27228
|
deviceId: number(),
|
|
26905
27229
|
status: PtzAutotrackStatusSchema
|
|
26906
27230
|
});
|
|
26907
|
-
/**
|
|
26908
|
-
* `navigation` — a device-scoped capability that natively expresses the FULL
|
|
26909
|
-
* navigation / action surface of a robot that DRIVES ITSELF and carries an
|
|
26910
|
-
* on-board camera (the Dreame robot-vacuum camera is the first provider).
|
|
26911
|
-
*
|
|
26912
|
-
* Why a NEW cap rather than overloading `ptz`:
|
|
26913
|
-
* - `ptz` moves a *gimbal* on a fixed camera (pan/tilt/zoom of the lens). A
|
|
26914
|
-
* robot vacuum has no gimbal — the whole chassis drives, turns and spins.
|
|
26915
|
-
* The two are different physical models: PTZ is absolute-position + presets,
|
|
26916
|
-
* navigation is momentary drive nudges + discrete robot ACTIONS
|
|
26917
|
-
* (dock / spot-clean / follow-pet / go-to-point / …).
|
|
26918
|
-
* - This cap is the SOURCE OF TRUTH. Two consumers adapt from it rather than
|
|
26919
|
-
* the reverse:
|
|
26920
|
-
* 1. a native CamStack navigation panel (data-driven from `listActions`
|
|
26921
|
-
* / `getOptions`), and
|
|
26922
|
-
* 2. the PTZ surface — a thin adapter mimics `ptz` from `navigation` so a
|
|
26923
|
-
* robot camera shows up in the existing PTZ control path without every
|
|
26924
|
-
* PTZ provider learning about robots. The mapping lives in the adapter,
|
|
26925
|
-
* not here (see the addon design note):
|
|
26926
|
-
* ptz.continuousMove({pan,tilt}) → navigation.move({pan,tilt})
|
|
26927
|
-
* ptz.stop() → navigation.stop()
|
|
26928
|
-
* ptz.goHome() → navigation.runAction('goHome')
|
|
26929
|
-
* ptz.getPresets() → navigation.listActions() (id→preset)
|
|
26930
|
-
* ptz.goToPreset(id) → navigation.runAction(id)
|
|
26931
|
-
*
|
|
26932
|
-
* ## Continuous drive
|
|
26933
|
-
*
|
|
26934
|
-
* `move` is MOMENTARY. Fluid navigation comes from the UI (or the PTZ adapter)
|
|
26935
|
-
* sending `move({pan,tilt})` REPEATEDLY at ~1 Hz while a direction is held, and
|
|
26936
|
-
* one `stop()` on release — exactly like the robot app's remote-drive joystick.
|
|
26937
|
-
* The provider forwards EACH `move` to one drive write; it must NOT debounce or
|
|
26938
|
-
* coalesce them. The UI owns the cadence.
|
|
26939
|
-
*
|
|
26940
|
-
* ## The action dictionary
|
|
26941
|
-
*
|
|
26942
|
-
* The discrete controls (dock / locate / spot-clean / follow / flash / sounds)
|
|
26943
|
-
* are a DATA-DRIVEN dictionary the cap exposes via `listActions()`. Each entry
|
|
26944
|
-
* carries `{ id, kind, label, icon }` (plus `soundId` for sound entries) so the
|
|
26945
|
-
* native panel AND the PTZ mimic render buttons WITHOUT hardcoding a
|
|
26946
|
-
* vendor-specific list. `kind: 'action'` entries are triggered with
|
|
26947
|
-
* `runAction({ actionId })`; `kind: 'sound'` entries with `playSound({ soundId })`
|
|
26948
|
-
* (the entry carries the `soundId` to pass). The general primitives — `move`,
|
|
26949
|
-
* `stop`, `goToPoint` — stay as first-class methods, not dictionary entries.
|
|
26950
|
-
*
|
|
26951
|
-
* NOTE (provider wiring): the first provider (Dreame) drives this with the RAW
|
|
26952
|
-
* `callAction(siid,aiid,in)` / `setProperty({siid,piid,value})` MIoT primitives
|
|
26953
|
-
* that the currently-published `@apocaliss92/nodedreame` already exposes on
|
|
26954
|
-
* every device handle. A future nodedreame publish adds a typed
|
|
26955
|
-
* `DreameCameraController` (drive / playPetSound / spotClean / findPet / …); the
|
|
26956
|
-
* provider can then swap the raw calls for the typed methods with no change to
|
|
26957
|
-
* THIS contract.
|
|
26958
|
-
*/
|
|
26959
|
-
/**
|
|
26960
|
-
* A momentary drive nudge. The robot MOVES (no gimbal) for as long as the caller
|
|
26961
|
-
* keeps sending nudges (~1 Hz); an explicit `stop` (or letting the nudges lapse)
|
|
26962
|
-
* halts it.
|
|
26963
|
-
*
|
|
26964
|
-
* - `pan` — turn: negative = left, positive = right, 0 = straight.
|
|
26965
|
-
* - `tilt` — throttle: positive = forward, negative = spin / turn-around.
|
|
26966
|
-
* - `speed` — optional intensity hint [0, 1]; the provider may scale the drive
|
|
26967
|
-
* vector by it (drivers without proportional drive ignore it).
|
|
26968
|
-
*
|
|
26969
|
-
* `pan` / `tilt` are normalized [-1, 1]. Both optional so a caller can nudge one
|
|
26970
|
-
* axis alone; an all-undefined nudge is a no-op.
|
|
26971
|
-
*/
|
|
26972
|
-
var NavigationMoveCommandSchema = object({
|
|
26973
|
-
pan: number().min(-1).max(1).optional(),
|
|
26974
|
-
tilt: number().min(-1).max(1).optional(),
|
|
26975
|
-
speed: number().min(0).max(1).optional()
|
|
26976
|
-
});
|
|
26977
|
-
/**
|
|
26978
|
-
* The enumerated discrete actions a navigation-capable robot can perform via
|
|
26979
|
-
* `runAction`. This is the CLOSED vocabulary; a given device advertises the
|
|
26980
|
-
* subset it supports through `listActions`. Sounds are NOT here — they go through
|
|
26981
|
-
* `playSound` (see the `sound` dictionary entries).
|
|
26982
|
-
*/
|
|
26983
|
-
var NavigationActionIdSchema = _enum([
|
|
26984
|
-
"goHome",
|
|
26985
|
-
"locate",
|
|
26986
|
-
"spotClean",
|
|
26987
|
-
"findPet",
|
|
26988
|
-
"personFollow",
|
|
26989
|
-
"stop",
|
|
26990
|
-
"startClean",
|
|
26991
|
-
"pauseClean",
|
|
26992
|
-
"dockWash",
|
|
26993
|
-
"autoEmpty",
|
|
26994
|
-
"flashOn",
|
|
26995
|
-
"flashOff"
|
|
26996
|
-
]);
|
|
26997
|
-
/** Whether a dictionary entry is a `runAction` action or a `playSound` sound. */
|
|
26998
|
-
var NavigationEntryKindSchema = _enum(["action", "sound"]);
|
|
26999
|
-
/**
|
|
27000
|
-
* One entry in the navigation action dictionary — the DATA-DRIVEN unit both the
|
|
27001
|
-
* native panel and the PTZ mimic render as a button.
|
|
27002
|
-
*
|
|
27003
|
-
* - `id` — stable id. For `kind:'action'` it is a {@link NavigationActionId}
|
|
27004
|
-
* (pass to `runAction`); for `kind:'sound'` it is a namespaced id
|
|
27005
|
-
* (`sound:meow`) whose `soundId` is passed to `playSound`.
|
|
27006
|
-
* - `icon` — icon HINT (lucide-style name; the UI maps it to its own set).
|
|
27007
|
-
* - `label` — operator-facing English label.
|
|
27008
|
-
* - `soundId` — wire sound id, present only on `kind:'sound'` entries.
|
|
27009
|
-
* - `enabled` — per-device FEATURE FLAG. `listActions` reports it so the UI /
|
|
27010
|
-
* PTZ render ONLY enabled entries. Data-driven: the provider
|
|
27011
|
-
* flips it from config, never by editing code.
|
|
27012
|
-
*/
|
|
27013
|
-
var NavigationActionEntrySchema = object({
|
|
27014
|
-
id: string(),
|
|
27015
|
-
kind: NavigationEntryKindSchema,
|
|
27016
|
-
label: string(),
|
|
27017
|
-
icon: string(),
|
|
27018
|
-
/** Present only on `kind:'sound'` entries — the id to pass to `playSound`. */
|
|
27019
|
-
soundId: number().int().optional(),
|
|
27020
|
-
/** Per-device feature flag — render this entry only when true. */
|
|
27021
|
-
enabled: boolean()
|
|
27022
|
-
});
|
|
27023
|
-
/** Coordinates for `goToPoint` — a point on the robot's live map. */
|
|
27024
|
-
var NavigationPointSchema = object({
|
|
27025
|
-
x: number(),
|
|
27026
|
-
y: number()
|
|
27027
|
-
});
|
|
27028
|
-
/**
|
|
27029
|
-
* Per-device FEATURE-FLAG report for the general (non-dictionary) primitives.
|
|
27030
|
-
* The cap reports which are enabled so the UI / PTZ render only the controls
|
|
27031
|
-
* that are turned on for THIS device. Data-driven: the provider derives these
|
|
27032
|
-
* from config + probe, never hardcoded in the UI. The per-DICTIONARY-entry flags
|
|
27033
|
-
* live on {@link NavigationActionEntrySchema.enabled}; these gate the primitives
|
|
27034
|
-
* that are not dictionary entries.
|
|
27035
|
-
*
|
|
27036
|
-
* - `move` / `stop` — the momentary drive joystick.
|
|
27037
|
-
* - `goToPoint` — send-to-map-coordinate. Ships OFF on Dreame until the
|
|
27038
|
-
* map-coordinate plumbing is wired.
|
|
27039
|
-
* - `runAction` — the discrete action buttons (dictionary `kind:'action'`).
|
|
27040
|
-
* - `playSound` — the sound buttons (dictionary `kind:'sound'`).
|
|
27041
|
-
* - `light` — the on/off fill-light toggle (works anytime).
|
|
27042
|
-
* - `lightMode` — the auto/manual selector + manual level slider (a
|
|
27043
|
-
* camera-service control; needs an active stream).
|
|
27044
|
-
*/
|
|
27045
|
-
var NavigationFeaturesSchema = object({
|
|
27046
|
-
move: boolean(),
|
|
27047
|
-
stop: boolean(),
|
|
27048
|
-
goToPoint: boolean(),
|
|
27049
|
-
runAction: boolean(),
|
|
27050
|
-
playSound: boolean(),
|
|
27051
|
-
light: boolean(),
|
|
27052
|
-
lightMode: boolean()
|
|
27053
|
-
});
|
|
27054
|
-
/** Light mode: `auto` lets the camera choose brightness; `manual` uses `level`. */
|
|
27055
|
-
var NavigationLightModeSchema = _enum(["auto", "manual"]);
|
|
27056
|
-
/**
|
|
27057
|
-
* Live navigation state so the UI can reflect what the robot is doing:
|
|
27058
|
-
* - `mode` — coarse activity (idle / cleaning / following / …).
|
|
27059
|
-
* - `following` — person/pet follow is currently armed.
|
|
27060
|
-
* - `flash` — the on-camera fill light is on.
|
|
27061
|
-
* - `lightMode` — auto vs manual fill-light mode.
|
|
27062
|
-
* - `lightLevel` — manual fill-light level (40..100); meaningful when
|
|
27063
|
-
* `lightMode === 'manual'`.
|
|
27064
|
-
*/
|
|
27065
|
-
var NavigationStatusSchema = object({
|
|
27066
|
-
mode: _enum([
|
|
27067
|
-
"idle",
|
|
27068
|
-
"cleaning",
|
|
27069
|
-
"spot",
|
|
27070
|
-
"following",
|
|
27071
|
-
"goto",
|
|
27072
|
-
"returning",
|
|
27073
|
-
"paused",
|
|
27074
|
-
"unknown"
|
|
27075
|
-
]),
|
|
27076
|
-
following: boolean(),
|
|
27077
|
-
flash: boolean(),
|
|
27078
|
-
lightMode: NavigationLightModeSchema,
|
|
27079
|
-
lightLevel: number().min(40).max(100),
|
|
27080
|
-
/** Ms epoch when the slice was last updated. */
|
|
27081
|
-
lastChangedAt: number()
|
|
27082
|
-
});
|
|
27083
|
-
NavigationStatusSchema.extend({ lastFetchedAt: number() });
|
|
27084
|
-
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({
|
|
27085
|
-
deviceId: number(),
|
|
27086
|
-
actionId: NavigationActionIdSchema
|
|
27087
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27088
|
-
deviceId: number(),
|
|
27089
|
-
soundId: number().int()
|
|
27090
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27091
|
-
deviceId: number(),
|
|
27092
|
-
on: boolean()
|
|
27093
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27094
|
-
deviceId: number(),
|
|
27095
|
-
mode: NavigationLightModeSchema,
|
|
27096
|
-
level: number().min(40).max(100).optional()
|
|
27097
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
27098
|
-
deviceId: number(),
|
|
27099
|
-
level: number().min(40).max(100)
|
|
27100
|
-
}), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), NavigationFeaturesSchema), object({
|
|
27101
|
-
deviceId: number(),
|
|
27102
|
-
status: NavigationStatusSchema
|
|
27103
|
-
});
|
|
27104
27231
|
DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
|
|
27105
27232
|
kind: "mutation",
|
|
27106
27233
|
auth: "admin"
|
|
@@ -34409,13 +34536,13 @@ Object.freeze({
|
|
|
34409
34536
|
addonId: null,
|
|
34410
34537
|
access: "view"
|
|
34411
34538
|
},
|
|
34412
|
-
"storage.
|
|
34539
|
+
"storage.list": {
|
|
34413
34540
|
capName: "storage",
|
|
34414
34541
|
capScope: "system",
|
|
34415
34542
|
addonId: null,
|
|
34416
34543
|
access: "view"
|
|
34417
34544
|
},
|
|
34418
|
-
"storage.
|
|
34545
|
+
"storage.listDrainProgress": {
|
|
34419
34546
|
capName: "storage",
|
|
34420
34547
|
capScope: "system",
|
|
34421
34548
|
addonId: null,
|
|
@@ -34565,6 +34692,12 @@ Object.freeze({
|
|
|
34565
34692
|
addonId: null,
|
|
34566
34693
|
access: "view"
|
|
34567
34694
|
},
|
|
34695
|
+
"storageOccupancy.getOccupancy": {
|
|
34696
|
+
capName: "storage-occupancy",
|
|
34697
|
+
capScope: "system",
|
|
34698
|
+
addonId: null,
|
|
34699
|
+
access: "view"
|
|
34700
|
+
},
|
|
34568
34701
|
"storageProvider.abortUpload": {
|
|
34569
34702
|
capName: "storage-provider",
|
|
34570
34703
|
capScope: "system",
|
|
@@ -37964,7 +38097,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
37964
38097
|
capability: adminUiCapability,
|
|
37965
38098
|
provider: {
|
|
37966
38099
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
37967
|
-
getVersion: async () => ({ version: "1.2.
|
|
38100
|
+
getVersion: async () => ({ version: "1.2.162" })
|
|
37968
38101
|
}
|
|
37969
38102
|
}];
|
|
37970
38103
|
}
|