@camstack/addon-admin-ui 1.0.6 → 1.0.8
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/{AddLocationWizard-CukR7cTF.js → AddLocationWizard-DomSxpGI.js} +1 -1
- package/dist/assets/AddonCollectionPage-DpSbeFq7.js +1 -0
- package/dist/assets/Addons-1gQjuR9S.js +1 -0
- package/dist/assets/AdminPage-vtcsGqRq.js +1 -0
- package/dist/assets/{AdminTabs-BpXprAan.js → AdminTabs-B7an3aYB.js} +1 -1
- package/dist/assets/{BrokerForm-BHHqkVQb.js → BrokerForm-DImaKHz8.js} +1 -1
- package/dist/assets/{BrokerStep-Cok3AhHx.js → BrokerStep-D4L9bUsk.js} +1 -1
- package/dist/assets/Capabilities-D0caXSgs.js +1 -0
- package/dist/assets/{CapabilityBadges-CMb2KZ75.js → CapabilityBadges-BCofv88Z.js} +1 -1
- package/dist/assets/{Cluster-Dv4qNomn.js → Cluster-BtOVpJ4s.js} +1 -1
- package/dist/assets/{Dashboard-DJM813RT.js → Dashboard-TKoXQaIb.js} +1 -1
- package/dist/assets/{Data-DGhOO-Cu.js → Data-B5u4dAnY.js} +1 -1
- package/dist/assets/DetectionIntelligence-C4FeIOdR.js +1 -0
- package/dist/assets/DeviceDetail-BPaQwx2C.js +2 -0
- package/dist/assets/{Devices-CUWOXRHi.js → Devices-D1-l4svU.js} +1 -1
- package/dist/assets/EmbedPlayerPage-6o-vVqJv.js +1 -0
- package/dist/assets/FormBuilder-aFYGmiS4.js +1 -0
- package/dist/assets/{Identity-Be25Wd9m.js → Identity-DoN_l5BA.js} +1 -1
- package/dist/assets/IntegrationDetail-ChyVujgZ.js +1 -0
- package/dist/assets/Integrations-SnvWread.js +1 -0
- package/dist/assets/{Integrations-D2GJn2wx.js → Integrations-vgx-gq-F.js} +1 -1
- package/dist/assets/{Logs-CJvGn4d5.js → Logs-ByT8Fq04.js} +1 -1
- package/dist/assets/{MaskShapeCanvas-C5K6H6Th.js → MaskShapeCanvas-CQ2SgaNa.js} +1 -1
- package/dist/assets/MotionZonesSettings-CsC6s4D-.js +1 -0
- package/dist/assets/MyAccess-CcV3suRC.js +2 -0
- package/dist/assets/Network-DSUa74-e.js +1 -0
- package/dist/assets/NodeAddonsSettingsPanel-C8dKpqZh.js +1 -0
- package/dist/assets/{Pipeline-B4MQZJjm.js → Pipeline-DvAGol7e.js} +1 -1
- package/dist/assets/PrivacyMaskSettings-BYqj289i.js +1 -0
- package/dist/assets/{ProviderIcon-BPXhRQ1d.js → ProviderIcon-DnjoN_gW.js} +1 -1
- package/dist/assets/SchemaTabBar-DRo5sGP1.js +1 -0
- package/dist/assets/Settings-McpLfu8Z.js +1 -0
- package/dist/assets/Showroom-DBUVcfqM.js +1 -0
- package/dist/assets/{StatusBadge-CkYubfRG.js → StatusBadge-BSsUNFG6.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DYMHJcwg.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-73q_gPW1.js} +1 -1
- package/dist/assets/{_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CK8iQdP1.js → _virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CCjPq1YD.js} +1 -1
- package/dist/assets/{_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DEeasWo3.js → _virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_trpc_mf_1_react_mf_2_query__loadShare__.js-DqrXu-jG.js} +1 -1
- package/dist/assets/{_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-C1rR7FKs.js → _virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-DcnMG4y9.js} +1 -1
- package/dist/assets/{_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DQOBkcAT.js → _virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-CUURKTLp.js} +1 -1
- package/dist/assets/{_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-PYw2UAZ_.js → _virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_konva__loadShare__.js-xmx-auwe.js} +3 -3
- package/dist/assets/{bell-DUIEkGPA.js → bell-C5Uv_byR.js} +1 -1
- package/dist/assets/circle-check-big-CToOIOTu.js +1 -0
- package/dist/assets/{copy-DUY8-DBe.js → copy-B_qOe5z2.js} +1 -1
- package/dist/assets/dist-DBAJfCeK.js +1 -0
- package/dist/assets/{dist-Dw4iYpIy.js → dist-DivYVFrG.js} +1 -1
- package/dist/assets/{download-B3pGiRsg.js → download-BT33CH3j.js} +1 -1
- package/dist/assets/{esm-CR7fS4E6.js → esm-C2ZjsqSd.js} +3 -3
- package/dist/assets/{hostInit-DJmAUuWj.js → hostInit-BzUwQrc2.js} +1 -1
- package/dist/assets/index-C9dLNgtt.js +4 -0
- package/dist/assets/{key-round-BtVEvNiB.js → key-round-CMLRqbrq.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-50a30526.js → mf-entry-bootstrap-0-49f53064.js} +2 -2
- package/dist/assets/{pencil-BHXuzoZT.js → pencil-CLwBxZCl.js} +1 -1
- package/dist/assets/{player-overlays-B1rOp2K0.js → player-overlays-BD7QrhVv.js} +1 -1
- package/dist/assets/plus-tJZHYmsB.js +1 -0
- package/dist/assets/{radio-BrSbZ3Gz.js → radio-CnJYCpke.js} +1 -1
- package/dist/assets/{refresh-cw-9auw5j71.js → refresh-cw-CLgLEKc_.js} +1 -1
- package/dist/assets/remoteEntry-CtF0a_XV.js +1 -0
- package/dist/assets/{rotate-ccw-DeNzdz-v.js → rotate-ccw-B53meVG1.js} +1 -1
- package/dist/assets/rotate-cw-EY9cIQs9.js +1 -0
- package/dist/assets/search-BT8SB-Ig.js +1 -0
- package/dist/assets/{server-Bj7As5DB.js → server-C-7gGEm3.js} +1 -1
- package/dist/assets/{sparkles-BMTAprd6.js → sparkles-DKm7eNvc.js} +1 -1
- package/dist/assets/square-UU8oWHzQ.js +1 -0
- package/dist/assets/{square-check-big-CPuMXqOw.js → square-check-big-XneAXRht.js} +1 -1
- package/dist/assets/src-DsE0ulBa.js +1 -0
- package/dist/assets/src-tFxrblhL.js +34 -0
- package/dist/assets/{upload-BQ5R4JaW.js → upload-C45qaDPP.js} +1 -1
- package/dist/assets/{useDevice-mTj6eL8W.js → useDevice-CEFTGk-N.js} +1 -1
- package/dist/assets/useEventInvalidation-BtLXp2PR.js +1 -0
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-BkXjP_sa.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-B5yi8CSR.js} +2 -2
- package/dist/assets/{wifi-CV73GdWg.js → wifi-DstzyoYP.js} +1 -1
- package/dist/assets/{zap-Cc3-KiYB.js → zap-DHsYuJKW.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/server/addon.js +709 -674
- package/package.json +1 -1
- package/dist/assets/AddonCollectionPage-DJx4uU6r.js +0 -1
- package/dist/assets/Addons-CH-apJRX.js +0 -1
- package/dist/assets/AdminPage-CN6ZMhf0.js +0 -1
- package/dist/assets/Capabilities-C7ZtET2s.js +0 -1
- package/dist/assets/DetectionIntelligence-hx5aK8kV.js +0 -1
- package/dist/assets/DeviceDetail-Cy3oT8kc.js +0 -2
- package/dist/assets/EmbedPlayerPage-DWa8--dX.js +0 -1
- package/dist/assets/FormBuilder-D1P2uZCo.js +0 -1
- package/dist/assets/IntegrationDetail-BH3qKiFl.js +0 -1
- package/dist/assets/Integrations-5qRDDBvi.js +0 -1
- package/dist/assets/MotionZonesSettings-CrSbCbyo.js +0 -1
- package/dist/assets/MyAccess-C70LOUlA.js +0 -2
- package/dist/assets/Network-KGBDHmKd.js +0 -1
- package/dist/assets/NodeAddonsSettingsPanel-DZOqqqZZ.js +0 -1
- package/dist/assets/PrivacyMaskSettings-Btjy009a.js +0 -1
- package/dist/assets/SchemaTabBar-ByWwzBUZ.js +0 -1
- package/dist/assets/Settings-BBKIvACs.js +0 -1
- package/dist/assets/Showroom-D6AoJdZW.js +0 -1
- package/dist/assets/circle-check-big-BjqV4p1D.js +0 -1
- package/dist/assets/dist-BwRNbXT1.js +0 -1
- package/dist/assets/index-CBUhNGng.js +0 -4
- package/dist/assets/plus-CljwKCLZ.js +0 -1
- package/dist/assets/remoteEntry-B0hADopi.js +0 -1
- package/dist/assets/rotate-cw-anx2g3R_.js +0 -1
- package/dist/assets/search-BYve1v5o.js +0 -1
- package/dist/assets/square-CondP2yo.js +0 -1
- package/dist/assets/src-D-eMZfpa.js +0 -34
- package/dist/assets/src-DUWILaCU.js +0 -1
- package/dist/assets/useEventInvalidation-BXdyfSQv.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -4629,63 +4629,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4629
4629
|
return inst;
|
|
4630
4630
|
}
|
|
4631
4631
|
//#endregion
|
|
4632
|
-
//#region ../types/dist/
|
|
4633
|
-
/**
|
|
4634
|
-
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
4635
|
-
* every declared capability + widget of every installed plugin, on every
|
|
4636
|
-
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
4637
|
-
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
4638
|
-
*
|
|
4639
|
-
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
4640
|
-
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
4641
|
-
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
4642
|
-
*/
|
|
4643
|
-
/** What kind of target a probe addressed. */
|
|
4644
|
-
var wiringProbeKindSchema = _enum([
|
|
4645
|
-
"singleton",
|
|
4646
|
-
"device",
|
|
4647
|
-
"widget"
|
|
4648
|
-
]);
|
|
4649
|
-
/** Result of probing a single (cap|widget [, device]) target. */
|
|
4650
|
-
var wiringProbeResultSchema = object({
|
|
4651
|
-
capName: string(),
|
|
4652
|
-
kind: wiringProbeKindSchema,
|
|
4653
|
-
deviceId: number().optional(),
|
|
4654
|
-
reachable: boolean(),
|
|
4655
|
-
latencyMs: number(),
|
|
4656
|
-
error: string().optional()
|
|
4657
|
-
});
|
|
4658
|
-
/** Per-addon roll-up of cap + widget probe results. */
|
|
4659
|
-
var wiringAddonHealthSchema = object({
|
|
4660
|
-
addonId: string(),
|
|
4661
|
-
caps: array(wiringProbeResultSchema).readonly(),
|
|
4662
|
-
widgets: array(wiringProbeResultSchema).readonly()
|
|
4663
|
-
});
|
|
4664
|
-
/** Per-node roll-up. */
|
|
4665
|
-
var wiringNodeHealthSchema = object({
|
|
4666
|
-
nodeId: string(),
|
|
4667
|
-
addons: array(wiringAddonHealthSchema).readonly()
|
|
4668
|
-
});
|
|
4669
|
-
object({
|
|
4670
|
-
/** True only when every probed target is reachable. */
|
|
4671
|
-
ok: boolean(),
|
|
4672
|
-
/** True when at least one target is unreachable. */
|
|
4673
|
-
degraded: boolean(),
|
|
4674
|
-
checkedAt: string(),
|
|
4675
|
-
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
4676
|
-
summary: object({
|
|
4677
|
-
total: number(),
|
|
4678
|
-
reachable: number(),
|
|
4679
|
-
unreachable: number()
|
|
4680
|
-
})
|
|
4681
|
-
});
|
|
4682
|
-
var MODEL_FORMATS = [
|
|
4683
|
-
"onnx",
|
|
4684
|
-
"coreml",
|
|
4685
|
-
"openvino",
|
|
4686
|
-
"tflite",
|
|
4687
|
-
"pt"
|
|
4688
|
-
];
|
|
4632
|
+
//#region ../types/dist/sleep-B1dKJAMJ.mjs
|
|
4689
4633
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4690
4634
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4691
4635
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5659,7 +5603,7 @@ var BaseAddon = class {
|
|
|
5659
5603
|
deviceSettingsSchema() {
|
|
5660
5604
|
return null;
|
|
5661
5605
|
}
|
|
5662
|
-
async getGlobalSettings(overlay, cap) {
|
|
5606
|
+
async getGlobalSettings(overlay, cap, _nodeId) {
|
|
5663
5607
|
const schema = this.globalSettingsSchema(cap);
|
|
5664
5608
|
if (!schema) return { sections: [] };
|
|
5665
5609
|
const raw = await this._ctx?.settings?.readAddonStore() ?? {};
|
|
@@ -5668,7 +5612,7 @@ var BaseAddon = class {
|
|
|
5668
5612
|
...overlay
|
|
5669
5613
|
} : raw);
|
|
5670
5614
|
}
|
|
5671
|
-
async updateGlobalSettings(patch) {
|
|
5615
|
+
async updateGlobalSettings(patch, _nodeId) {
|
|
5672
5616
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
5673
5617
|
await this.resolveConfig();
|
|
5674
5618
|
await this.onConfigChanged();
|
|
@@ -6008,7 +5952,7 @@ var ProfileSlotSchema = object({
|
|
|
6008
5952
|
* Zod schema for StreamSourceEntry — the canonical stream descriptor
|
|
6009
5953
|
* exposed by ICameraDevice.getStreamSources() and consumed by the broker.
|
|
6010
5954
|
*/
|
|
6011
|
-
var StreamSourceEntrySchema = object({
|
|
5955
|
+
var StreamSourceEntrySchema$1 = object({
|
|
6012
5956
|
id: string(),
|
|
6013
5957
|
label: string(),
|
|
6014
5958
|
protocol: _enum([
|
|
@@ -6230,112 +6174,583 @@ var ProfileRtspEntrySchema = object({
|
|
|
6230
6174
|
codec: string().optional(),
|
|
6231
6175
|
resolution: CamStreamResolutionSchema.optional()
|
|
6232
6176
|
});
|
|
6177
|
+
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6178
|
+
DeviceType["Camera"] = "camera";
|
|
6179
|
+
DeviceType["Hub"] = "hub";
|
|
6180
|
+
DeviceType["Light"] = "light";
|
|
6181
|
+
DeviceType["Siren"] = "siren";
|
|
6182
|
+
DeviceType["Switch"] = "switch";
|
|
6183
|
+
DeviceType["Sensor"] = "sensor";
|
|
6184
|
+
DeviceType["Thermostat"] = "thermostat";
|
|
6185
|
+
DeviceType["Button"] = "button";
|
|
6186
|
+
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6187
|
+
* event vocabulary verbatim (no normalization). Installed with the
|
|
6188
|
+
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6189
|
+
* HA bus events (e.g. `zha_event`, generic). */
|
|
6190
|
+
DeviceType["EventEmitter"] = "event-emitter";
|
|
6191
|
+
/** Firmware/software update entity — current vs available version,
|
|
6192
|
+
* updatable flag, update state, and an install action. Installed with
|
|
6193
|
+
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6194
|
+
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6195
|
+
DeviceType["Update"] = "update";
|
|
6196
|
+
DeviceType["Generic"] = "generic";
|
|
6197
|
+
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6198
|
+
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6199
|
+
* endpoint; the `notifier` cap defines the send surface. */
|
|
6200
|
+
DeviceType["Notifier"] = "notifier";
|
|
6201
|
+
/** Pre-recorded action sequence with optional parameters
|
|
6202
|
+
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6203
|
+
DeviceType["Script"] = "script";
|
|
6204
|
+
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6205
|
+
* trigger surface exposed via `automation-control` cap. */
|
|
6206
|
+
DeviceType["Automation"] = "automation";
|
|
6207
|
+
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6208
|
+
DeviceType["Lock"] = "lock";
|
|
6209
|
+
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6210
|
+
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6211
|
+
DeviceType["Cover"] = "cover";
|
|
6212
|
+
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6213
|
+
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6214
|
+
* modelled on the same open/closed lifecycle. */
|
|
6215
|
+
DeviceType["Valve"] = "valve";
|
|
6216
|
+
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6217
|
+
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6218
|
+
* modelled on the same target / mode lifecycle. */
|
|
6219
|
+
DeviceType["Humidifier"] = "humidifier";
|
|
6220
|
+
/** Water heater / boiler with target temperature + operation mode +
|
|
6221
|
+
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6222
|
+
* climate-family actuator. */
|
|
6223
|
+
DeviceType["WaterHeater"] = "water-heater";
|
|
6224
|
+
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6225
|
+
DeviceType["Fan"] = "fan";
|
|
6226
|
+
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6227
|
+
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6228
|
+
DeviceType["MediaPlayer"] = "media-player";
|
|
6229
|
+
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6230
|
+
* `alarm-panel` cap. */
|
|
6231
|
+
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6232
|
+
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6233
|
+
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6234
|
+
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6235
|
+
* TextControl / DateTimeControl. */
|
|
6236
|
+
DeviceType["Control"] = "control";
|
|
6237
|
+
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6238
|
+
* `presence` cap. */
|
|
6239
|
+
DeviceType["Presence"] = "presence";
|
|
6240
|
+
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6241
|
+
* `weather` cap. */
|
|
6242
|
+
DeviceType["Weather"] = "weather";
|
|
6243
|
+
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6244
|
+
DeviceType["Vacuum"] = "vacuum";
|
|
6245
|
+
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6246
|
+
* `lawn-mower-control` cap. */
|
|
6247
|
+
DeviceType["LawnMower"] = "lawn-mower";
|
|
6248
|
+
/** Physical HA device group — parent container for entity-children
|
|
6249
|
+
* adopted from a single HA device entry. Not renderable as a
|
|
6250
|
+
* standalone device; exists only to anchor child entities. */
|
|
6251
|
+
DeviceType["Container"] = "container";
|
|
6252
|
+
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6253
|
+
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6254
|
+
DeviceType["Image"] = "image";
|
|
6255
|
+
return DeviceType;
|
|
6256
|
+
}({});
|
|
6257
|
+
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6258
|
+
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6259
|
+
DeviceFeature["Rebootable"] = "rebootable";
|
|
6260
|
+
/**
|
|
6261
|
+
* Device supports an on-demand re-sync of its derived spec with its
|
|
6262
|
+
* upstream source — drives the generic Re-sync button. The owning
|
|
6263
|
+
* provider implements the action via the `device-adoption.resync` cap.
|
|
6264
|
+
*/
|
|
6265
|
+
DeviceFeature["Resyncable"] = "resyncable";
|
|
6266
|
+
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6267
|
+
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6268
|
+
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6269
|
+
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6270
|
+
/**
|
|
6271
|
+
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6272
|
+
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6273
|
+
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6274
|
+
* the autotrack toggle / settings card without re-deriving from
|
|
6275
|
+
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6276
|
+
* driver sets this feature when probe confirms the firmware
|
|
6277
|
+
* surface, and registers the cap in the same code path.
|
|
6278
|
+
*/
|
|
6279
|
+
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6280
|
+
/**
|
|
6281
|
+
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6282
|
+
* motion detection automatically activates this device. Mirrors
|
|
6283
|
+
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6284
|
+
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6285
|
+
*
|
|
6286
|
+
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6287
|
+
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6288
|
+
* filters that want "all devices with on-motion behaviour".
|
|
6289
|
+
*/
|
|
6290
|
+
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6291
|
+
/** Light supports rgb-triplet color via `color` cap. */
|
|
6292
|
+
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6293
|
+
/** Light supports HSV color via `color` cap. */
|
|
6294
|
+
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6295
|
+
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6296
|
+
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6297
|
+
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6298
|
+
* targetHigh). Gates the range slider UI. */
|
|
6299
|
+
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
6300
|
+
/** Thermostat exposes target humidity and/or current humidity
|
|
6301
|
+
* readings. Gates the humidity controls. */
|
|
6302
|
+
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
6303
|
+
/** Thermostat exposes a fan-mode selector. */
|
|
6304
|
+
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
6305
|
+
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
6306
|
+
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
6307
|
+
/** Cover exposes intermediate position control (0..100). Gates the
|
|
6308
|
+
* position slider UI. */
|
|
6309
|
+
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
6310
|
+
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
6311
|
+
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
6312
|
+
/** Valve exposes intermediate position control (0..100). Gates the
|
|
6313
|
+
* position slider / drag surface UI. */
|
|
6314
|
+
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
6315
|
+
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
6316
|
+
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
6317
|
+
/** Fan exposes a preset mode selector. */
|
|
6318
|
+
DeviceFeature["FanPreset"] = "fan-preset";
|
|
6319
|
+
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
6320
|
+
* ceiling fans. */
|
|
6321
|
+
DeviceFeature["FanDirection"] = "fan-direction";
|
|
6322
|
+
/** Fan exposes an oscillation toggle. */
|
|
6323
|
+
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
6324
|
+
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
6325
|
+
* field on the UI lock-controls panel. */
|
|
6326
|
+
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
6327
|
+
/** Lock supports a latch-release ("open door") action distinct from
|
|
6328
|
+
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
6329
|
+
* `supported_features`. Gates the Open Door button in the UI. */
|
|
6330
|
+
DeviceFeature["LockOpen"] = "lock-open";
|
|
6331
|
+
/** Media player exposes a seek-to-position surface. */
|
|
6332
|
+
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
6333
|
+
/** Media player exposes a volume-level setter. */
|
|
6334
|
+
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
6335
|
+
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
6336
|
+
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
6337
|
+
/** Media player exposes a shuffle toggle. */
|
|
6338
|
+
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
6339
|
+
/** Media player exposes a repeat mode (off / all / one). */
|
|
6340
|
+
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
6341
|
+
/** Media player exposes a source / input selector. */
|
|
6342
|
+
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
6343
|
+
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
6344
|
+
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
6345
|
+
/** Media player exposes next-track. */
|
|
6346
|
+
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
6347
|
+
/** Media player exposes previous-track. */
|
|
6348
|
+
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
6349
|
+
/** Media player exposes stop distinct from pause. */
|
|
6350
|
+
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
6351
|
+
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
6352
|
+
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
6353
|
+
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
6354
|
+
* addition to a textual location. */
|
|
6355
|
+
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
6356
|
+
/** Notifier accepts an inline / URL image attachment. */
|
|
6357
|
+
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
6358
|
+
/** Notifier accepts a priority hint (high/normal/low). */
|
|
6359
|
+
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
6360
|
+
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
6361
|
+
* fields. */
|
|
6362
|
+
DeviceFeature["NotifierData"] = "notifier-data";
|
|
6363
|
+
/** Notifier supports interactive action buttons / callbacks. */
|
|
6364
|
+
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
6365
|
+
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
6366
|
+
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
6367
|
+
/** Script runner accepts a variables map on each run invocation. */
|
|
6368
|
+
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
6369
|
+
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
6370
|
+
* automation's actions while bypassing its condition block. */
|
|
6371
|
+
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
6372
|
+
return DeviceFeature;
|
|
6373
|
+
}({});
|
|
6233
6374
|
/**
|
|
6234
|
-
*
|
|
6235
|
-
*
|
|
6236
|
-
*
|
|
6237
|
-
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
6241
|
-
kind: literal("timeOfDay"),
|
|
6242
|
-
start: string().regex(HHMM),
|
|
6243
|
-
end: string().regex(HHMM),
|
|
6244
|
-
/** Restrict to these weekdays; omit = every day. */
|
|
6245
|
-
days: array(RecordingWeekdaySchema).optional()
|
|
6246
|
-
})]);
|
|
6247
|
-
var RecordingModeSchema = _enum([
|
|
6248
|
-
"continuous",
|
|
6249
|
-
"onMotion",
|
|
6250
|
-
"onAudioThreshold"
|
|
6251
|
-
]);
|
|
6252
|
-
/**
|
|
6253
|
-
* First-class, authoritative per-camera storage mode — the netta choice the UI
|
|
6254
|
-
* reads directly (never inferred from `rules`):
|
|
6255
|
-
* - `off` — not recording.
|
|
6256
|
-
* - `events` — record only around triggers (motion / audio threshold),
|
|
6257
|
-
* with pre/post-buffer.
|
|
6258
|
-
* - `continuous` — record 24/7 within the schedule.
|
|
6375
|
+
* Semantic role a device plays within its parent. Populated by driver
|
|
6376
|
+
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
6377
|
+
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
6378
|
+
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
6379
|
+
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
6380
|
+
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
6259
6381
|
*
|
|
6260
|
-
*
|
|
6261
|
-
*
|
|
6382
|
+
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
6383
|
+
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
6262
6384
|
*/
|
|
6263
|
-
var
|
|
6264
|
-
"
|
|
6265
|
-
"
|
|
6266
|
-
"
|
|
6267
|
-
]
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6385
|
+
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
6386
|
+
DeviceRole["Siren"] = "siren";
|
|
6387
|
+
DeviceRole["Floodlight"] = "floodlight";
|
|
6388
|
+
DeviceRole["Spotlight"] = "spotlight";
|
|
6389
|
+
DeviceRole["PirSensor"] = "pir-sensor";
|
|
6390
|
+
DeviceRole["Chime"] = "chime";
|
|
6391
|
+
DeviceRole["Autotrack"] = "autotrack";
|
|
6392
|
+
DeviceRole["Nightvision"] = "nightvision";
|
|
6393
|
+
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
6394
|
+
DeviceRole["Doorbell"] = "doorbell";
|
|
6395
|
+
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
6396
|
+
* real Switch device for UI rendering / export adapters. */
|
|
6397
|
+
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
6398
|
+
/** Generic motion / occupancy / moving event source. Distinct from
|
|
6399
|
+
* the camera accessory PirSensor role: that one is a camera child;
|
|
6400
|
+
* this is a standalone HA / 3rd-party motion sensor. */
|
|
6401
|
+
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
6402
|
+
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
6403
|
+
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
6404
|
+
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
6405
|
+
DeviceRole["COSensor"] = "co-sensor";
|
|
6406
|
+
DeviceRole["GasSensor"] = "gas-sensor";
|
|
6407
|
+
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
6408
|
+
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
6409
|
+
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
6410
|
+
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
6411
|
+
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
6412
|
+
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
6413
|
+
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
6414
|
+
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
6415
|
+
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
6416
|
+
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
6417
|
+
DeviceRole["PowerSensor"] = "power-sensor";
|
|
6418
|
+
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
6419
|
+
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
6420
|
+
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
6421
|
+
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
6422
|
+
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
6423
|
+
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
6424
|
+
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
6425
|
+
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
6426
|
+
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
6427
|
+
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
6428
|
+
* `attributes.options`). */
|
|
6429
|
+
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
6430
|
+
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
6431
|
+
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
6432
|
+
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
6433
|
+
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
6434
|
+
/** Last-resort fallback when nothing else matches. */
|
|
6435
|
+
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
6436
|
+
DeviceRole["NumericControl"] = "numeric-control";
|
|
6437
|
+
DeviceRole["SelectControl"] = "select-control";
|
|
6438
|
+
DeviceRole["TextControl"] = "text-control";
|
|
6439
|
+
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
6440
|
+
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
6441
|
+
* rich features (image, priority, channel routing). */
|
|
6442
|
+
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
6443
|
+
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
6444
|
+
* `notify.discord_*`, etc.). */
|
|
6445
|
+
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
6446
|
+
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
6447
|
+
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
6448
|
+
/** Fallback when the notifier service name doesn't match a known
|
|
6449
|
+
* pattern. */
|
|
6450
|
+
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
6451
|
+
return DeviceRole;
|
|
6452
|
+
}({});
|
|
6273
6453
|
/**
|
|
6274
|
-
*
|
|
6454
|
+
* Generic types for capability definitions.
|
|
6275
6455
|
*
|
|
6276
|
-
*
|
|
6277
|
-
*
|
|
6278
|
-
* covering band, not by a band value.
|
|
6279
|
-
*/
|
|
6280
|
-
var RecordingBandModeSchema = _enum(["continuous", "events"]);
|
|
6281
|
-
/**
|
|
6282
|
-
* Triggers for an `events`-mode band. Identical shape to
|
|
6283
|
-
* `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
|
|
6284
|
-
* two never drift.
|
|
6285
|
-
*/
|
|
6286
|
-
var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
6287
|
-
/**
|
|
6288
|
-
* A single mode-per-band window — the canonical recorder band shape, the
|
|
6289
|
-
* single source of truth re-used by `addon-pipeline/recorder`.
|
|
6456
|
+
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
6457
|
+
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
6290
6458
|
*
|
|
6291
|
-
*
|
|
6292
|
-
*
|
|
6293
|
-
*
|
|
6459
|
+
* Pattern:
|
|
6460
|
+
* 1. Define Zod schemas for data, methods, settings
|
|
6461
|
+
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
6462
|
+
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
6463
|
+
* 4. Addon implements IProvider
|
|
6464
|
+
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
6294
6465
|
*/
|
|
6295
|
-
var RecordingBandSchema = object({
|
|
6296
|
-
days: array(RecordingWeekdaySchema),
|
|
6297
|
-
start: string().regex(HHMM),
|
|
6298
|
-
end: string().regex(HHMM),
|
|
6299
|
-
mode: RecordingBandModeSchema,
|
|
6300
|
-
triggers: RecordingBandTriggersSchema.optional(),
|
|
6301
|
-
preBufferSec: number().min(0).optional(),
|
|
6302
|
-
postBufferSec: number().min(0).optional()
|
|
6303
|
-
});
|
|
6304
|
-
var RecordingRuleSchema = object({
|
|
6305
|
-
schedule: RecordingScheduleSchema,
|
|
6306
|
-
mode: RecordingModeSchema,
|
|
6307
|
-
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
6308
|
-
preBufferSec: number().min(0).default(0),
|
|
6309
|
-
/** Keep recording until this many seconds after the last trigger. */
|
|
6310
|
-
postBufferSec: number().min(0).default(0),
|
|
6311
|
-
/** Each new trigger restarts the post-buffer window. */
|
|
6312
|
-
resetTimeoutOnNewEvent: boolean().default(true),
|
|
6313
|
-
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
6314
|
-
thresholdDbfs: number().optional()
|
|
6315
|
-
});
|
|
6316
6466
|
/**
|
|
6317
|
-
*
|
|
6318
|
-
*
|
|
6319
|
-
*
|
|
6320
|
-
*
|
|
6321
|
-
*
|
|
6322
|
-
*
|
|
6467
|
+
* Output schema shared by the contribution + live methods.
|
|
6468
|
+
*
|
|
6469
|
+
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
6470
|
+
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
6471
|
+
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
6472
|
+
* (using `z.unknown()` here collapses unrelated router branches to
|
|
6473
|
+
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
6474
|
+
*
|
|
6475
|
+
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
6476
|
+
* extensions the caller adds (showWhen, displayScale, …) without
|
|
6477
|
+
* rebuilding every time a new field kind is introduced.
|
|
6323
6478
|
*/
|
|
6324
|
-
var
|
|
6325
|
-
|
|
6326
|
-
|
|
6479
|
+
var ContributionSectionSchema = object({
|
|
6480
|
+
id: string(),
|
|
6481
|
+
title: string(),
|
|
6482
|
+
description: string().optional(),
|
|
6483
|
+
style: _enum(["card", "accordion"]).optional(),
|
|
6484
|
+
defaultCollapsed: boolean().optional(),
|
|
6485
|
+
columns: union([
|
|
6486
|
+
literal(1),
|
|
6487
|
+
literal(2),
|
|
6488
|
+
literal(3),
|
|
6489
|
+
literal(4)
|
|
6490
|
+
]).optional(),
|
|
6491
|
+
tab: string().optional(),
|
|
6492
|
+
location: _enum(["settings", "top-tab"]).optional(),
|
|
6493
|
+
order: number().optional(),
|
|
6494
|
+
fields: array(any())
|
|
6327
6495
|
});
|
|
6496
|
+
object({
|
|
6497
|
+
tabs: array(object({
|
|
6498
|
+
id: string(),
|
|
6499
|
+
label: string(),
|
|
6500
|
+
icon: string(),
|
|
6501
|
+
order: number().optional()
|
|
6502
|
+
})).optional(),
|
|
6503
|
+
sections: array(ContributionSectionSchema)
|
|
6504
|
+
}).nullable();
|
|
6505
|
+
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
6506
|
+
deviceId: number(),
|
|
6507
|
+
patch: record(string(), unknown())
|
|
6508
|
+
}), object({ success: literal(true) });
|
|
6509
|
+
object({ deviceId: number() }), unknown().nullable();
|
|
6510
|
+
/** Shorthand to define a method schema */
|
|
6511
|
+
function method(input, output, options) {
|
|
6512
|
+
return {
|
|
6513
|
+
input,
|
|
6514
|
+
output,
|
|
6515
|
+
kind: options?.kind ?? "query",
|
|
6516
|
+
auth: options?.auth ?? "protected",
|
|
6517
|
+
...options?.access !== void 0 ? { access: options.access } : {},
|
|
6518
|
+
timeoutMs: options?.timeoutMs
|
|
6519
|
+
};
|
|
6520
|
+
}
|
|
6521
|
+
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
6522
|
+
var VersionOutputSchema = object({ version: string() });
|
|
6523
|
+
var adminUiCapability = {
|
|
6524
|
+
name: "admin-ui",
|
|
6525
|
+
scope: "system",
|
|
6526
|
+
mode: "singleton",
|
|
6527
|
+
internal: true,
|
|
6528
|
+
methods: {
|
|
6529
|
+
getStaticDir: method(_void(), StaticDirOutputSchema),
|
|
6530
|
+
getVersion: method(_void(), VersionOutputSchema)
|
|
6531
|
+
}
|
|
6532
|
+
};
|
|
6328
6533
|
/**
|
|
6329
|
-
*
|
|
6534
|
+
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
6535
|
+
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
6330
6536
|
*
|
|
6331
|
-
*
|
|
6332
|
-
*
|
|
6333
|
-
*
|
|
6334
|
-
*
|
|
6537
|
+
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
6538
|
+
* provider for this cap (per device) backed by its local
|
|
6539
|
+
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
6540
|
+
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
6541
|
+
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
6542
|
+
* so there's no parallel bridge path anymore.
|
|
6543
|
+
*
|
|
6544
|
+
* The surface is intentionally small — every method corresponds to a
|
|
6545
|
+
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
6546
|
+
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
6547
|
+
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
6548
|
+
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
6335
6549
|
*/
|
|
6336
|
-
var
|
|
6337
|
-
|
|
6338
|
-
|
|
6550
|
+
var StreamSourceEntrySchema = object({
|
|
6551
|
+
id: string(),
|
|
6552
|
+
label: string(),
|
|
6553
|
+
protocol: _enum([
|
|
6554
|
+
"rtsp",
|
|
6555
|
+
"rtmp",
|
|
6556
|
+
"annexb",
|
|
6557
|
+
"http-mjpeg",
|
|
6558
|
+
"webrtc",
|
|
6559
|
+
"custom"
|
|
6560
|
+
]),
|
|
6561
|
+
url: string().optional(),
|
|
6562
|
+
resolution: object({
|
|
6563
|
+
width: number(),
|
|
6564
|
+
height: number()
|
|
6565
|
+
}).optional(),
|
|
6566
|
+
fps: number().optional(),
|
|
6567
|
+
bitrate: number().optional(),
|
|
6568
|
+
codec: string().optional(),
|
|
6569
|
+
profileHint: CamProfileSchema.optional(),
|
|
6570
|
+
sdp: string().optional()
|
|
6571
|
+
});
|
|
6572
|
+
var ConfigEntrySchema$1 = object({
|
|
6573
|
+
key: string(),
|
|
6574
|
+
value: unknown()
|
|
6575
|
+
});
|
|
6576
|
+
var RawStateResultSchema = object({
|
|
6577
|
+
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
6578
|
+
source: string(),
|
|
6579
|
+
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
6580
|
+
data: record(string(), unknown())
|
|
6581
|
+
});
|
|
6582
|
+
method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
6583
|
+
deviceId: number(),
|
|
6584
|
+
values: record(string(), unknown())
|
|
6585
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
6586
|
+
deviceId: number(),
|
|
6587
|
+
action: string().min(1),
|
|
6588
|
+
input: unknown()
|
|
6589
|
+
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
6590
|
+
//#endregion
|
|
6591
|
+
//#region ../types/dist/index.mjs
|
|
6592
|
+
/**
|
|
6593
|
+
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
6594
|
+
* every declared capability + widget of every installed plugin, on every
|
|
6595
|
+
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
6596
|
+
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
6597
|
+
*
|
|
6598
|
+
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
6599
|
+
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
6600
|
+
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
6601
|
+
*/
|
|
6602
|
+
/** What kind of target a probe addressed. */
|
|
6603
|
+
var wiringProbeKindSchema = _enum([
|
|
6604
|
+
"singleton",
|
|
6605
|
+
"device",
|
|
6606
|
+
"widget"
|
|
6607
|
+
]);
|
|
6608
|
+
/** Result of probing a single (cap|widget [, device]) target. */
|
|
6609
|
+
var wiringProbeResultSchema = object({
|
|
6610
|
+
capName: string(),
|
|
6611
|
+
kind: wiringProbeKindSchema,
|
|
6612
|
+
deviceId: number().optional(),
|
|
6613
|
+
reachable: boolean(),
|
|
6614
|
+
latencyMs: number(),
|
|
6615
|
+
error: string().optional()
|
|
6616
|
+
});
|
|
6617
|
+
/** Per-addon roll-up of cap + widget probe results. */
|
|
6618
|
+
var wiringAddonHealthSchema = object({
|
|
6619
|
+
addonId: string(),
|
|
6620
|
+
caps: array(wiringProbeResultSchema).readonly(),
|
|
6621
|
+
widgets: array(wiringProbeResultSchema).readonly()
|
|
6622
|
+
});
|
|
6623
|
+
/** Per-node roll-up. */
|
|
6624
|
+
var wiringNodeHealthSchema = object({
|
|
6625
|
+
nodeId: string(),
|
|
6626
|
+
addons: array(wiringAddonHealthSchema).readonly()
|
|
6627
|
+
});
|
|
6628
|
+
object({
|
|
6629
|
+
/** True only when every probed target is reachable. */
|
|
6630
|
+
ok: boolean(),
|
|
6631
|
+
/** True when at least one target is unreachable. */
|
|
6632
|
+
degraded: boolean(),
|
|
6633
|
+
checkedAt: string(),
|
|
6634
|
+
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
6635
|
+
summary: object({
|
|
6636
|
+
total: number(),
|
|
6637
|
+
reachable: number(),
|
|
6638
|
+
unreachable: number()
|
|
6639
|
+
})
|
|
6640
|
+
});
|
|
6641
|
+
var MODEL_FORMATS = [
|
|
6642
|
+
"onnx",
|
|
6643
|
+
"coreml",
|
|
6644
|
+
"openvino",
|
|
6645
|
+
"tflite",
|
|
6646
|
+
"pt"
|
|
6647
|
+
];
|
|
6648
|
+
/**
|
|
6649
|
+
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
6650
|
+
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
6651
|
+
* `Weekday` exported from `interfaces/timezones.ts`.
|
|
6652
|
+
*/
|
|
6653
|
+
var RecordingWeekdaySchema = number().int().min(0).max(6);
|
|
6654
|
+
var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
6655
|
+
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
6656
|
+
kind: literal("timeOfDay"),
|
|
6657
|
+
start: string().regex(HHMM),
|
|
6658
|
+
end: string().regex(HHMM),
|
|
6659
|
+
/** Restrict to these weekdays; omit = every day. */
|
|
6660
|
+
days: array(RecordingWeekdaySchema).optional()
|
|
6661
|
+
})]);
|
|
6662
|
+
var RecordingModeSchema = _enum([
|
|
6663
|
+
"continuous",
|
|
6664
|
+
"onMotion",
|
|
6665
|
+
"onAudioThreshold"
|
|
6666
|
+
]);
|
|
6667
|
+
/**
|
|
6668
|
+
* First-class, authoritative per-camera storage mode — the netta choice the UI
|
|
6669
|
+
* reads directly (never inferred from `rules`):
|
|
6670
|
+
* - `off` — not recording.
|
|
6671
|
+
* - `events` — record only around triggers (motion / audio threshold),
|
|
6672
|
+
* with pre/post-buffer.
|
|
6673
|
+
* - `continuous` — record 24/7 within the schedule.
|
|
6674
|
+
*
|
|
6675
|
+
* `mode` compiles one-way to the internal `rules[]` consumed by the policy
|
|
6676
|
+
* engine (see `compileRules`); `rules[]` is never authored directly anymore.
|
|
6677
|
+
*/
|
|
6678
|
+
var RecordingStorageModeSchema = _enum([
|
|
6679
|
+
"off",
|
|
6680
|
+
"events",
|
|
6681
|
+
"continuous"
|
|
6682
|
+
]);
|
|
6683
|
+
/** Which detectors trigger an `events`-mode recording. */
|
|
6684
|
+
var RecordingTriggersSchema = object({
|
|
6685
|
+
motion: boolean().optional(),
|
|
6686
|
+
audioThresholdDbfs: number().optional()
|
|
6687
|
+
});
|
|
6688
|
+
/**
|
|
6689
|
+
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
6690
|
+
*
|
|
6691
|
+
* Distinct from `RecordingStorageModeSchema` (which carries `off`): a band is
|
|
6692
|
+
* only ever `continuous` or `events`; "off" is expressed by the absence of a
|
|
6693
|
+
* covering band, not by a band value.
|
|
6694
|
+
*/
|
|
6695
|
+
var RecordingBandModeSchema = _enum(["continuous", "events"]);
|
|
6696
|
+
/**
|
|
6697
|
+
* Triggers for an `events`-mode band. Identical shape to
|
|
6698
|
+
* `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
|
|
6699
|
+
* two never drift.
|
|
6700
|
+
*/
|
|
6701
|
+
var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
6702
|
+
/**
|
|
6703
|
+
* A single mode-per-band window — the canonical recorder band shape, the
|
|
6704
|
+
* single source of truth re-used by `addon-pipeline/recorder`.
|
|
6705
|
+
*
|
|
6706
|
+
* `days` lists the weekdays the band covers (empty = every day, matching the
|
|
6707
|
+
* band engine's `applies` rule). `start`/`end` are `HH:MM`; an `end <= start`
|
|
6708
|
+
* span wraps past midnight (handled by the band engine).
|
|
6709
|
+
*/
|
|
6710
|
+
var RecordingBandSchema = object({
|
|
6711
|
+
days: array(RecordingWeekdaySchema),
|
|
6712
|
+
start: string().regex(HHMM),
|
|
6713
|
+
end: string().regex(HHMM),
|
|
6714
|
+
mode: RecordingBandModeSchema,
|
|
6715
|
+
triggers: RecordingBandTriggersSchema.optional(),
|
|
6716
|
+
preBufferSec: number().min(0).optional(),
|
|
6717
|
+
postBufferSec: number().min(0).optional()
|
|
6718
|
+
});
|
|
6719
|
+
var RecordingRuleSchema = object({
|
|
6720
|
+
schedule: RecordingScheduleSchema,
|
|
6721
|
+
mode: RecordingModeSchema,
|
|
6722
|
+
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
6723
|
+
preBufferSec: number().min(0).default(0),
|
|
6724
|
+
/** Keep recording until this many seconds after the last trigger. */
|
|
6725
|
+
postBufferSec: number().min(0).default(0),
|
|
6726
|
+
/** Each new trigger restarts the post-buffer window. */
|
|
6727
|
+
resetTimeoutOnNewEvent: boolean().default(true),
|
|
6728
|
+
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
6729
|
+
thresholdDbfs: number().optional()
|
|
6730
|
+
});
|
|
6731
|
+
/**
|
|
6732
|
+
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
6733
|
+
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
6734
|
+
* live per-camera: `maxAgeDays` and `maxSizeGb`. The disk-occupancy threshold
|
|
6735
|
+
* (when the volume is too full to keep recording) is NOT a per-camera concern —
|
|
6736
|
+
* it belongs to the StorageLocation (`StorageLocation.config.minFreePercent`),
|
|
6737
|
+
* shared by every camera writing to that volume.
|
|
6738
|
+
*/
|
|
6739
|
+
var RecordingRetentionSchema = object({
|
|
6740
|
+
maxAgeDays: number().min(0).optional(),
|
|
6741
|
+
maxSizeGb: number().min(0).optional()
|
|
6742
|
+
});
|
|
6743
|
+
/**
|
|
6744
|
+
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
6745
|
+
*
|
|
6746
|
+
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
6747
|
+
* are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
|
|
6748
|
+
* only for transition + migration (`migrateRulesToMode`); the policy engine
|
|
6749
|
+
* consumes the compiled output of `compileRules(config)`, never `rules` directly.
|
|
6750
|
+
*/
|
|
6751
|
+
var RecordingConfigSchema = object({
|
|
6752
|
+
enabled: boolean(),
|
|
6753
|
+
/** Authoritative storage mode. Absent on legacy targets → derived once via
|
|
6339
6754
|
* `migrateRulesToMode`, then persisted. */
|
|
6340
6755
|
mode: RecordingStorageModeSchema.optional(),
|
|
6341
6756
|
profiles: array(CamProfileSchema).optional(),
|
|
@@ -6737,387 +7152,111 @@ var YAMNET_TO_MACRO = {
|
|
|
6737
7152
|
"Accelerating, revving, vroom": "engine",
|
|
6738
7153
|
"Light engine (high frequency)": "engine",
|
|
6739
7154
|
"Medium engine (mid frequency)": "engine",
|
|
6740
|
-
"Heavy engine (low frequency)": "engine",
|
|
6741
|
-
"Lawn mower": "engine",
|
|
6742
|
-
Chainsaw: "engine",
|
|
6743
|
-
Hammer: "tools",
|
|
6744
|
-
Jackhammer: "tools",
|
|
6745
|
-
Sawing: "tools",
|
|
6746
|
-
"Power tool": "tools",
|
|
6747
|
-
Drill: "tools",
|
|
6748
|
-
Sanding: "tools",
|
|
6749
|
-
Silence: "silence"
|
|
6750
|
-
},
|
|
6751
|
-
preserveOriginal: false
|
|
6752
|
-
};
|
|
6753
|
-
var APPLE_SA_TO_MACRO = {
|
|
6754
|
-
mapping: {
|
|
6755
|
-
speech: "speech",
|
|
6756
|
-
child_speech: "speech",
|
|
6757
|
-
conversation: "speech",
|
|
6758
|
-
whispering: "speech",
|
|
6759
|
-
singing: "speech",
|
|
6760
|
-
humming: "speech",
|
|
6761
|
-
shout: "scream",
|
|
6762
|
-
yell: "scream",
|
|
6763
|
-
screaming: "scream",
|
|
6764
|
-
crying: "crying",
|
|
6765
|
-
baby_crying: "crying",
|
|
6766
|
-
sobbing: "crying",
|
|
6767
|
-
laughter: "laughter",
|
|
6768
|
-
baby_laughter: "laughter",
|
|
6769
|
-
giggling: "laughter",
|
|
6770
|
-
music: "music",
|
|
6771
|
-
guitar: "music",
|
|
6772
|
-
piano: "music",
|
|
6773
|
-
drums: "music",
|
|
6774
|
-
dog_bark: "dog",
|
|
6775
|
-
dog_bow_wow: "dog",
|
|
6776
|
-
dog_growling: "dog",
|
|
6777
|
-
dog_howl: "dog",
|
|
6778
|
-
cat_meow: "cat",
|
|
6779
|
-
cat_purr: "cat",
|
|
6780
|
-
cat_hiss: "cat",
|
|
6781
|
-
bird: "bird",
|
|
6782
|
-
bird_chirp: "bird",
|
|
6783
|
-
bird_squawk: "bird",
|
|
6784
|
-
animal: "animal",
|
|
6785
|
-
horse: "animal",
|
|
6786
|
-
cow_moo: "animal",
|
|
6787
|
-
insect: "animal",
|
|
6788
|
-
alarm: "alarm",
|
|
6789
|
-
smoke_alarm: "alarm",
|
|
6790
|
-
fire_alarm: "alarm",
|
|
6791
|
-
car_alarm: "alarm",
|
|
6792
|
-
siren: "siren",
|
|
6793
|
-
police_siren: "siren",
|
|
6794
|
-
ambulance_siren: "siren",
|
|
6795
|
-
doorbell: "doorbell",
|
|
6796
|
-
door_knock: "doorbell",
|
|
6797
|
-
knocking: "doorbell",
|
|
6798
|
-
glass_breaking: "glass_breaking",
|
|
6799
|
-
glass_shatter: "glass_breaking",
|
|
6800
|
-
gunshot: "gunshot",
|
|
6801
|
-
explosion: "gunshot",
|
|
6802
|
-
fireworks: "gunshot",
|
|
6803
|
-
car: "vehicle",
|
|
6804
|
-
truck: "vehicle",
|
|
6805
|
-
motorcycle: "vehicle",
|
|
6806
|
-
car_horn: "vehicle",
|
|
6807
|
-
vehicle_horn: "vehicle",
|
|
6808
|
-
traffic: "vehicle",
|
|
6809
|
-
fire: "fire",
|
|
6810
|
-
fire_crackle: "fire",
|
|
6811
|
-
water: "water",
|
|
6812
|
-
rain: "water",
|
|
6813
|
-
ocean: "water",
|
|
6814
|
-
splash: "water",
|
|
6815
|
-
wind: "wind",
|
|
6816
|
-
thunder: "wind",
|
|
6817
|
-
thunderstorm: "wind",
|
|
6818
|
-
door: "door",
|
|
6819
|
-
door_slam: "door",
|
|
6820
|
-
sliding_door: "door",
|
|
6821
|
-
footsteps: "footsteps",
|
|
6822
|
-
walking: "footsteps",
|
|
6823
|
-
running: "footsteps",
|
|
6824
|
-
crowd: "crowd",
|
|
6825
|
-
chatter: "crowd",
|
|
6826
|
-
cheering: "crowd",
|
|
6827
|
-
applause: "crowd",
|
|
6828
|
-
telephone_ring: "telephone",
|
|
6829
|
-
ringtone: "telephone",
|
|
6830
|
-
engine: "engine",
|
|
6831
|
-
engine_starting: "engine",
|
|
6832
|
-
lawn_mower: "engine",
|
|
6833
|
-
chainsaw: "engine",
|
|
6834
|
-
hammer: "tools",
|
|
6835
|
-
jackhammer: "tools",
|
|
6836
|
-
drill: "tools",
|
|
6837
|
-
power_tool: "tools",
|
|
6838
|
-
silence: "silence"
|
|
6839
|
-
},
|
|
6840
|
-
preserveOriginal: false
|
|
6841
|
-
};
|
|
6842
|
-
var _macroLookup = /* @__PURE__ */ new Map();
|
|
6843
|
-
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6844
|
-
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6845
|
-
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6846
|
-
DeviceType["Camera"] = "camera";
|
|
6847
|
-
DeviceType["Hub"] = "hub";
|
|
6848
|
-
DeviceType["Light"] = "light";
|
|
6849
|
-
DeviceType["Siren"] = "siren";
|
|
6850
|
-
DeviceType["Switch"] = "switch";
|
|
6851
|
-
DeviceType["Sensor"] = "sensor";
|
|
6852
|
-
DeviceType["Thermostat"] = "thermostat";
|
|
6853
|
-
DeviceType["Button"] = "button";
|
|
6854
|
-
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6855
|
-
* event vocabulary verbatim (no normalization). Installed with the
|
|
6856
|
-
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6857
|
-
* HA bus events (e.g. `zha_event`, generic). */
|
|
6858
|
-
DeviceType["EventEmitter"] = "event-emitter";
|
|
6859
|
-
/** Firmware/software update entity — current vs available version,
|
|
6860
|
-
* updatable flag, update state, and an install action. Installed with
|
|
6861
|
-
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6862
|
-
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6863
|
-
DeviceType["Update"] = "update";
|
|
6864
|
-
DeviceType["Generic"] = "generic";
|
|
6865
|
-
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6866
|
-
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6867
|
-
* endpoint; the `notifier` cap defines the send surface. */
|
|
6868
|
-
DeviceType["Notifier"] = "notifier";
|
|
6869
|
-
/** Pre-recorded action sequence with optional parameters
|
|
6870
|
-
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6871
|
-
DeviceType["Script"] = "script";
|
|
6872
|
-
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6873
|
-
* trigger surface exposed via `automation-control` cap. */
|
|
6874
|
-
DeviceType["Automation"] = "automation";
|
|
6875
|
-
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6876
|
-
DeviceType["Lock"] = "lock";
|
|
6877
|
-
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6878
|
-
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6879
|
-
DeviceType["Cover"] = "cover";
|
|
6880
|
-
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6881
|
-
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6882
|
-
* modelled on the same open/closed lifecycle. */
|
|
6883
|
-
DeviceType["Valve"] = "valve";
|
|
6884
|
-
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6885
|
-
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6886
|
-
* modelled on the same target / mode lifecycle. */
|
|
6887
|
-
DeviceType["Humidifier"] = "humidifier";
|
|
6888
|
-
/** Water heater / boiler with target temperature + operation mode +
|
|
6889
|
-
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6890
|
-
* climate-family actuator. */
|
|
6891
|
-
DeviceType["WaterHeater"] = "water-heater";
|
|
6892
|
-
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6893
|
-
DeviceType["Fan"] = "fan";
|
|
6894
|
-
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6895
|
-
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6896
|
-
DeviceType["MediaPlayer"] = "media-player";
|
|
6897
|
-
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6898
|
-
* `alarm-panel` cap. */
|
|
6899
|
-
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6900
|
-
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6901
|
-
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6902
|
-
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6903
|
-
* TextControl / DateTimeControl. */
|
|
6904
|
-
DeviceType["Control"] = "control";
|
|
6905
|
-
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6906
|
-
* `presence` cap. */
|
|
6907
|
-
DeviceType["Presence"] = "presence";
|
|
6908
|
-
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6909
|
-
* `weather` cap. */
|
|
6910
|
-
DeviceType["Weather"] = "weather";
|
|
6911
|
-
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6912
|
-
DeviceType["Vacuum"] = "vacuum";
|
|
6913
|
-
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6914
|
-
* `lawn-mower-control` cap. */
|
|
6915
|
-
DeviceType["LawnMower"] = "lawn-mower";
|
|
6916
|
-
/** Physical HA device group — parent container for entity-children
|
|
6917
|
-
* adopted from a single HA device entry. Not renderable as a
|
|
6918
|
-
* standalone device; exists only to anchor child entities. */
|
|
6919
|
-
DeviceType["Container"] = "container";
|
|
6920
|
-
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6921
|
-
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6922
|
-
DeviceType["Image"] = "image";
|
|
6923
|
-
return DeviceType;
|
|
6924
|
-
}({});
|
|
6925
|
-
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6926
|
-
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6927
|
-
DeviceFeature["Rebootable"] = "rebootable";
|
|
6928
|
-
/**
|
|
6929
|
-
* Device supports an on-demand re-sync of its derived spec with its
|
|
6930
|
-
* upstream source — drives the generic Re-sync button. The owning
|
|
6931
|
-
* provider implements the action via the `device-adoption.resync` cap.
|
|
6932
|
-
*/
|
|
6933
|
-
DeviceFeature["Resyncable"] = "resyncable";
|
|
6934
|
-
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6935
|
-
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6936
|
-
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6937
|
-
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6938
|
-
/**
|
|
6939
|
-
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6940
|
-
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6941
|
-
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6942
|
-
* the autotrack toggle / settings card without re-deriving from
|
|
6943
|
-
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6944
|
-
* driver sets this feature when probe confirms the firmware
|
|
6945
|
-
* surface, and registers the cap in the same code path.
|
|
6946
|
-
*/
|
|
6947
|
-
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6948
|
-
/**
|
|
6949
|
-
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6950
|
-
* motion detection automatically activates this device. Mirrors
|
|
6951
|
-
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6952
|
-
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6953
|
-
*
|
|
6954
|
-
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6955
|
-
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6956
|
-
* filters that want "all devices with on-motion behaviour".
|
|
6957
|
-
*/
|
|
6958
|
-
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6959
|
-
/** Light supports rgb-triplet color via `color` cap. */
|
|
6960
|
-
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6961
|
-
/** Light supports HSV color via `color` cap. */
|
|
6962
|
-
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6963
|
-
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6964
|
-
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6965
|
-
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6966
|
-
* targetHigh). Gates the range slider UI. */
|
|
6967
|
-
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
6968
|
-
/** Thermostat exposes target humidity and/or current humidity
|
|
6969
|
-
* readings. Gates the humidity controls. */
|
|
6970
|
-
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
6971
|
-
/** Thermostat exposes a fan-mode selector. */
|
|
6972
|
-
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
6973
|
-
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
6974
|
-
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
6975
|
-
/** Cover exposes intermediate position control (0..100). Gates the
|
|
6976
|
-
* position slider UI. */
|
|
6977
|
-
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
6978
|
-
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
6979
|
-
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
6980
|
-
/** Valve exposes intermediate position control (0..100). Gates the
|
|
6981
|
-
* position slider / drag surface UI. */
|
|
6982
|
-
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
6983
|
-
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
6984
|
-
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
6985
|
-
/** Fan exposes a preset mode selector. */
|
|
6986
|
-
DeviceFeature["FanPreset"] = "fan-preset";
|
|
6987
|
-
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
6988
|
-
* ceiling fans. */
|
|
6989
|
-
DeviceFeature["FanDirection"] = "fan-direction";
|
|
6990
|
-
/** Fan exposes an oscillation toggle. */
|
|
6991
|
-
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
6992
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
6993
|
-
* field on the UI lock-controls panel. */
|
|
6994
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
6995
|
-
/** Lock supports a latch-release ("open door") action distinct from
|
|
6996
|
-
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
6997
|
-
* `supported_features`. Gates the Open Door button in the UI. */
|
|
6998
|
-
DeviceFeature["LockOpen"] = "lock-open";
|
|
6999
|
-
/** Media player exposes a seek-to-position surface. */
|
|
7000
|
-
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
7001
|
-
/** Media player exposes a volume-level setter. */
|
|
7002
|
-
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
7003
|
-
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
7004
|
-
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
7005
|
-
/** Media player exposes a shuffle toggle. */
|
|
7006
|
-
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
7007
|
-
/** Media player exposes a repeat mode (off / all / one). */
|
|
7008
|
-
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
7009
|
-
/** Media player exposes a source / input selector. */
|
|
7010
|
-
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
7011
|
-
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
7012
|
-
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
7013
|
-
/** Media player exposes next-track. */
|
|
7014
|
-
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
7015
|
-
/** Media player exposes previous-track. */
|
|
7016
|
-
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
7017
|
-
/** Media player exposes stop distinct from pause. */
|
|
7018
|
-
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
7019
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
7020
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
7021
|
-
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
7022
|
-
* addition to a textual location. */
|
|
7023
|
-
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
7024
|
-
/** Notifier accepts an inline / URL image attachment. */
|
|
7025
|
-
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
7026
|
-
/** Notifier accepts a priority hint (high/normal/low). */
|
|
7027
|
-
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
7028
|
-
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
7029
|
-
* fields. */
|
|
7030
|
-
DeviceFeature["NotifierData"] = "notifier-data";
|
|
7031
|
-
/** Notifier supports interactive action buttons / callbacks. */
|
|
7032
|
-
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
7033
|
-
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
7034
|
-
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
7035
|
-
/** Script runner accepts a variables map on each run invocation. */
|
|
7036
|
-
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
7037
|
-
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
7038
|
-
* automation's actions while bypassing its condition block. */
|
|
7039
|
-
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
7040
|
-
return DeviceFeature;
|
|
7041
|
-
}({});
|
|
7042
|
-
/**
|
|
7043
|
-
* Semantic role a device plays within its parent. Populated by driver
|
|
7044
|
-
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
7045
|
-
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
7046
|
-
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
7047
|
-
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
7048
|
-
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
7049
|
-
*
|
|
7050
|
-
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
7051
|
-
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
7052
|
-
*/
|
|
7053
|
-
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
7054
|
-
DeviceRole["Siren"] = "siren";
|
|
7055
|
-
DeviceRole["Floodlight"] = "floodlight";
|
|
7056
|
-
DeviceRole["Spotlight"] = "spotlight";
|
|
7057
|
-
DeviceRole["PirSensor"] = "pir-sensor";
|
|
7058
|
-
DeviceRole["Chime"] = "chime";
|
|
7059
|
-
DeviceRole["Autotrack"] = "autotrack";
|
|
7060
|
-
DeviceRole["Nightvision"] = "nightvision";
|
|
7061
|
-
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
7062
|
-
DeviceRole["Doorbell"] = "doorbell";
|
|
7063
|
-
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
7064
|
-
* real Switch device for UI rendering / export adapters. */
|
|
7065
|
-
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
7066
|
-
/** Generic motion / occupancy / moving event source. Distinct from
|
|
7067
|
-
* the camera accessory PirSensor role: that one is a camera child;
|
|
7068
|
-
* this is a standalone HA / 3rd-party motion sensor. */
|
|
7069
|
-
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
7070
|
-
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
7071
|
-
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
7072
|
-
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
7073
|
-
DeviceRole["COSensor"] = "co-sensor";
|
|
7074
|
-
DeviceRole["GasSensor"] = "gas-sensor";
|
|
7075
|
-
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
7076
|
-
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
7077
|
-
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
7078
|
-
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
7079
|
-
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
7080
|
-
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
7081
|
-
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
7082
|
-
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
7083
|
-
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
7084
|
-
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
7085
|
-
DeviceRole["PowerSensor"] = "power-sensor";
|
|
7086
|
-
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
7087
|
-
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
7088
|
-
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
7089
|
-
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
7090
|
-
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
7091
|
-
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
7092
|
-
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
7093
|
-
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
7094
|
-
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
7095
|
-
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
7096
|
-
* `attributes.options`). */
|
|
7097
|
-
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
7098
|
-
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
7099
|
-
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
7100
|
-
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
7101
|
-
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
7102
|
-
/** Last-resort fallback when nothing else matches. */
|
|
7103
|
-
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
7104
|
-
DeviceRole["NumericControl"] = "numeric-control";
|
|
7105
|
-
DeviceRole["SelectControl"] = "select-control";
|
|
7106
|
-
DeviceRole["TextControl"] = "text-control";
|
|
7107
|
-
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
7108
|
-
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
7109
|
-
* rich features (image, priority, channel routing). */
|
|
7110
|
-
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
7111
|
-
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
7112
|
-
* `notify.discord_*`, etc.). */
|
|
7113
|
-
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
7114
|
-
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
7115
|
-
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
7116
|
-
/** Fallback when the notifier service name doesn't match a known
|
|
7117
|
-
* pattern. */
|
|
7118
|
-
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
7119
|
-
return DeviceRole;
|
|
7120
|
-
}({});
|
|
7155
|
+
"Heavy engine (low frequency)": "engine",
|
|
7156
|
+
"Lawn mower": "engine",
|
|
7157
|
+
Chainsaw: "engine",
|
|
7158
|
+
Hammer: "tools",
|
|
7159
|
+
Jackhammer: "tools",
|
|
7160
|
+
Sawing: "tools",
|
|
7161
|
+
"Power tool": "tools",
|
|
7162
|
+
Drill: "tools",
|
|
7163
|
+
Sanding: "tools",
|
|
7164
|
+
Silence: "silence"
|
|
7165
|
+
},
|
|
7166
|
+
preserveOriginal: false
|
|
7167
|
+
};
|
|
7168
|
+
var APPLE_SA_TO_MACRO = {
|
|
7169
|
+
mapping: {
|
|
7170
|
+
speech: "speech",
|
|
7171
|
+
child_speech: "speech",
|
|
7172
|
+
conversation: "speech",
|
|
7173
|
+
whispering: "speech",
|
|
7174
|
+
singing: "speech",
|
|
7175
|
+
humming: "speech",
|
|
7176
|
+
shout: "scream",
|
|
7177
|
+
yell: "scream",
|
|
7178
|
+
screaming: "scream",
|
|
7179
|
+
crying: "crying",
|
|
7180
|
+
baby_crying: "crying",
|
|
7181
|
+
sobbing: "crying",
|
|
7182
|
+
laughter: "laughter",
|
|
7183
|
+
baby_laughter: "laughter",
|
|
7184
|
+
giggling: "laughter",
|
|
7185
|
+
music: "music",
|
|
7186
|
+
guitar: "music",
|
|
7187
|
+
piano: "music",
|
|
7188
|
+
drums: "music",
|
|
7189
|
+
dog_bark: "dog",
|
|
7190
|
+
dog_bow_wow: "dog",
|
|
7191
|
+
dog_growling: "dog",
|
|
7192
|
+
dog_howl: "dog",
|
|
7193
|
+
cat_meow: "cat",
|
|
7194
|
+
cat_purr: "cat",
|
|
7195
|
+
cat_hiss: "cat",
|
|
7196
|
+
bird: "bird",
|
|
7197
|
+
bird_chirp: "bird",
|
|
7198
|
+
bird_squawk: "bird",
|
|
7199
|
+
animal: "animal",
|
|
7200
|
+
horse: "animal",
|
|
7201
|
+
cow_moo: "animal",
|
|
7202
|
+
insect: "animal",
|
|
7203
|
+
alarm: "alarm",
|
|
7204
|
+
smoke_alarm: "alarm",
|
|
7205
|
+
fire_alarm: "alarm",
|
|
7206
|
+
car_alarm: "alarm",
|
|
7207
|
+
siren: "siren",
|
|
7208
|
+
police_siren: "siren",
|
|
7209
|
+
ambulance_siren: "siren",
|
|
7210
|
+
doorbell: "doorbell",
|
|
7211
|
+
door_knock: "doorbell",
|
|
7212
|
+
knocking: "doorbell",
|
|
7213
|
+
glass_breaking: "glass_breaking",
|
|
7214
|
+
glass_shatter: "glass_breaking",
|
|
7215
|
+
gunshot: "gunshot",
|
|
7216
|
+
explosion: "gunshot",
|
|
7217
|
+
fireworks: "gunshot",
|
|
7218
|
+
car: "vehicle",
|
|
7219
|
+
truck: "vehicle",
|
|
7220
|
+
motorcycle: "vehicle",
|
|
7221
|
+
car_horn: "vehicle",
|
|
7222
|
+
vehicle_horn: "vehicle",
|
|
7223
|
+
traffic: "vehicle",
|
|
7224
|
+
fire: "fire",
|
|
7225
|
+
fire_crackle: "fire",
|
|
7226
|
+
water: "water",
|
|
7227
|
+
rain: "water",
|
|
7228
|
+
ocean: "water",
|
|
7229
|
+
splash: "water",
|
|
7230
|
+
wind: "wind",
|
|
7231
|
+
thunder: "wind",
|
|
7232
|
+
thunderstorm: "wind",
|
|
7233
|
+
door: "door",
|
|
7234
|
+
door_slam: "door",
|
|
7235
|
+
sliding_door: "door",
|
|
7236
|
+
footsteps: "footsteps",
|
|
7237
|
+
walking: "footsteps",
|
|
7238
|
+
running: "footsteps",
|
|
7239
|
+
crowd: "crowd",
|
|
7240
|
+
chatter: "crowd",
|
|
7241
|
+
cheering: "crowd",
|
|
7242
|
+
applause: "crowd",
|
|
7243
|
+
telephone_ring: "telephone",
|
|
7244
|
+
ringtone: "telephone",
|
|
7245
|
+
engine: "engine",
|
|
7246
|
+
engine_starting: "engine",
|
|
7247
|
+
lawn_mower: "engine",
|
|
7248
|
+
chainsaw: "engine",
|
|
7249
|
+
hammer: "tools",
|
|
7250
|
+
jackhammer: "tools",
|
|
7251
|
+
drill: "tools",
|
|
7252
|
+
power_tool: "tools",
|
|
7253
|
+
silence: "silence"
|
|
7254
|
+
},
|
|
7255
|
+
preserveOriginal: false
|
|
7256
|
+
};
|
|
7257
|
+
var _macroLookup = /* @__PURE__ */ new Map();
|
|
7258
|
+
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7259
|
+
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7121
7260
|
/**
|
|
7122
7261
|
* Accessory device helpers — shared across drivers.
|
|
7123
7262
|
*
|
|
@@ -7277,74 +7416,6 @@ object({
|
|
|
7277
7416
|
});
|
|
7278
7417
|
DeviceType.Sensor;
|
|
7279
7418
|
/**
|
|
7280
|
-
* Generic types for capability definitions.
|
|
7281
|
-
*
|
|
7282
|
-
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
7283
|
-
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
7284
|
-
*
|
|
7285
|
-
* Pattern:
|
|
7286
|
-
* 1. Define Zod schemas for data, methods, settings
|
|
7287
|
-
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
7288
|
-
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
7289
|
-
* 4. Addon implements IProvider
|
|
7290
|
-
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
7291
|
-
*/
|
|
7292
|
-
/**
|
|
7293
|
-
* Output schema shared by the contribution + live methods.
|
|
7294
|
-
*
|
|
7295
|
-
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
7296
|
-
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
7297
|
-
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
7298
|
-
* (using `z.unknown()` here collapses unrelated router branches to
|
|
7299
|
-
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
7300
|
-
*
|
|
7301
|
-
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
7302
|
-
* extensions the caller adds (showWhen, displayScale, …) without
|
|
7303
|
-
* rebuilding every time a new field kind is introduced.
|
|
7304
|
-
*/
|
|
7305
|
-
var ContributionSectionSchema = object({
|
|
7306
|
-
id: string(),
|
|
7307
|
-
title: string(),
|
|
7308
|
-
description: string().optional(),
|
|
7309
|
-
style: _enum(["card", "accordion"]).optional(),
|
|
7310
|
-
defaultCollapsed: boolean().optional(),
|
|
7311
|
-
columns: union([
|
|
7312
|
-
literal(1),
|
|
7313
|
-
literal(2),
|
|
7314
|
-
literal(3),
|
|
7315
|
-
literal(4)
|
|
7316
|
-
]).optional(),
|
|
7317
|
-
tab: string().optional(),
|
|
7318
|
-
location: _enum(["settings", "top-tab"]).optional(),
|
|
7319
|
-
order: number().optional(),
|
|
7320
|
-
fields: array(any())
|
|
7321
|
-
});
|
|
7322
|
-
object({
|
|
7323
|
-
tabs: array(object({
|
|
7324
|
-
id: string(),
|
|
7325
|
-
label: string(),
|
|
7326
|
-
icon: string(),
|
|
7327
|
-
order: number().optional()
|
|
7328
|
-
})).optional(),
|
|
7329
|
-
sections: array(ContributionSectionSchema)
|
|
7330
|
-
}).nullable();
|
|
7331
|
-
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
7332
|
-
deviceId: number(),
|
|
7333
|
-
patch: record(string(), unknown())
|
|
7334
|
-
}), object({ success: literal(true) });
|
|
7335
|
-
object({ deviceId: number() }), unknown().nullable();
|
|
7336
|
-
/** Shorthand to define a method schema */
|
|
7337
|
-
function method(input, output, options) {
|
|
7338
|
-
return {
|
|
7339
|
-
input,
|
|
7340
|
-
output,
|
|
7341
|
-
kind: options?.kind ?? "query",
|
|
7342
|
-
auth: options?.auth ?? "protected",
|
|
7343
|
-
...options?.access !== void 0 ? { access: options.access } : {},
|
|
7344
|
-
timeoutMs: options?.timeoutMs
|
|
7345
|
-
};
|
|
7346
|
-
}
|
|
7347
|
-
/**
|
|
7348
7419
|
* Alarm-panel cap. Models HA `alarm_control_panel.*` on
|
|
7349
7420
|
* `DeviceType.AlarmPanel`. State follows HA's canonical lifecycle
|
|
7350
7421
|
* across disarmed / armed_(home|away|night|vacation|custom_bypass) /
|
|
@@ -11346,18 +11417,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
11346
11417
|
limit: number().optional(),
|
|
11347
11418
|
tags: record(string(), string()).optional()
|
|
11348
11419
|
}), array(LogEntrySchema).readonly());
|
|
11349
|
-
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
11350
|
-
var VersionOutputSchema = object({ version: string() });
|
|
11351
|
-
var adminUiCapability = {
|
|
11352
|
-
name: "admin-ui",
|
|
11353
|
-
scope: "system",
|
|
11354
|
-
mode: "singleton",
|
|
11355
|
-
internal: true,
|
|
11356
|
-
methods: {
|
|
11357
|
-
getStaticDir: method(_void(), StaticDirOutputSchema),
|
|
11358
|
-
getVersion: method(_void(), VersionOutputSchema)
|
|
11359
|
-
}
|
|
11360
|
-
};
|
|
11361
11420
|
/**
|
|
11362
11421
|
* Zod schemas for persisted record types.
|
|
11363
11422
|
*
|
|
@@ -13658,7 +13717,7 @@ method(object({
|
|
|
13658
13717
|
}), _void(), {
|
|
13659
13718
|
kind: "mutation",
|
|
13660
13719
|
auth: "admin"
|
|
13661
|
-
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
13720
|
+
}), method(object({ addonId: string() }), array(SavedDeviceRowSchema)), method(object({ addonId: string().optional() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), DeviceInfoSchema.nullable()), method(object({ parentDeviceId: number() }), array(DeviceInfoSchema)), method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema)), method(object({ deviceId: number() }), ConfigUISchemaOutput), method(object({
|
|
13662
13721
|
deviceId: number(),
|
|
13663
13722
|
values: record(string(), unknown())
|
|
13664
13723
|
}), object({ success: literal(true) }), {
|
|
@@ -14340,7 +14399,20 @@ var DiskSpaceInfoSchema = object({
|
|
|
14340
14399
|
var PidResourceStatsSchema = object({
|
|
14341
14400
|
pid: number(),
|
|
14342
14401
|
cpu: number(),
|
|
14343
|
-
memory: number()
|
|
14402
|
+
memory: number(),
|
|
14403
|
+
/**
|
|
14404
|
+
* Private (anonymous) resident bytes — the per-process V8 heap + native
|
|
14405
|
+
* allocations NOT shared with other processes (Linux RssAnon). This is the
|
|
14406
|
+
* "real" per-runner cost; summing it across runners is meaningful, unlike
|
|
14407
|
+
* `memory` (RSS), which double-counts the shared mmap'd framework code.
|
|
14408
|
+
* Undefined where /proc is unavailable (e.g. macOS).
|
|
14409
|
+
*/
|
|
14410
|
+
privateBytes: number().optional(),
|
|
14411
|
+
/**
|
|
14412
|
+
* Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
|
|
14413
|
+
* code shared copy-on-write across runners. Undefined on macOS.
|
|
14414
|
+
*/
|
|
14415
|
+
sharedBytes: number().optional()
|
|
14344
14416
|
});
|
|
14345
14417
|
var AddonInstanceSchema = object({
|
|
14346
14418
|
addonId: string(),
|
|
@@ -14389,6 +14461,17 @@ var KillProcessResultSchema = object({
|
|
|
14389
14461
|
reason: string().optional(),
|
|
14390
14462
|
signal: _enum(["SIGTERM", "SIGKILL"]).optional()
|
|
14391
14463
|
});
|
|
14464
|
+
var DumpHeapSnapshotInputSchema = object({
|
|
14465
|
+
/** The addon whose runner should dump a heap snapshot. */
|
|
14466
|
+
addonId: string() });
|
|
14467
|
+
var DumpHeapSnapshotResultSchema = object({
|
|
14468
|
+
success: boolean(),
|
|
14469
|
+
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
14470
|
+
path: string().optional(),
|
|
14471
|
+
/** Process pid that was signalled. */
|
|
14472
|
+
pid: number().optional(),
|
|
14473
|
+
reason: string().optional()
|
|
14474
|
+
});
|
|
14392
14475
|
var SystemMetricsSchema = object({
|
|
14393
14476
|
cpuPercent: number(),
|
|
14394
14477
|
memoryPercent: number(),
|
|
@@ -14402,6 +14485,9 @@ var SystemMetricsSchema = object({
|
|
|
14402
14485
|
method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number().nullable()), method(object({ pids: array(number()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(KillProcessInputSchema, KillProcessResultSchema, {
|
|
14403
14486
|
kind: "mutation",
|
|
14404
14487
|
auth: "admin"
|
|
14488
|
+
}), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
14489
|
+
kind: "mutation",
|
|
14490
|
+
auth: "admin"
|
|
14405
14491
|
});
|
|
14406
14492
|
var PtzPresetSchema = object({
|
|
14407
14493
|
id: string(),
|
|
@@ -14768,63 +14854,6 @@ method(object({
|
|
|
14768
14854
|
auth: "admin"
|
|
14769
14855
|
});
|
|
14770
14856
|
/**
|
|
14771
|
-
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
14772
|
-
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
14773
|
-
*
|
|
14774
|
-
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
14775
|
-
* provider for this cap (per device) backed by its local
|
|
14776
|
-
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
14777
|
-
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
14778
|
-
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
14779
|
-
* so there's no parallel bridge path anymore.
|
|
14780
|
-
*
|
|
14781
|
-
* The surface is intentionally small — every method corresponds to a
|
|
14782
|
-
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
14783
|
-
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
14784
|
-
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
14785
|
-
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
14786
|
-
*/
|
|
14787
|
-
var StreamSourceEntrySchema$1 = object({
|
|
14788
|
-
id: string(),
|
|
14789
|
-
label: string(),
|
|
14790
|
-
protocol: _enum([
|
|
14791
|
-
"rtsp",
|
|
14792
|
-
"rtmp",
|
|
14793
|
-
"annexb",
|
|
14794
|
-
"http-mjpeg",
|
|
14795
|
-
"webrtc",
|
|
14796
|
-
"custom"
|
|
14797
|
-
]),
|
|
14798
|
-
url: string().optional(),
|
|
14799
|
-
resolution: object({
|
|
14800
|
-
width: number(),
|
|
14801
|
-
height: number()
|
|
14802
|
-
}).optional(),
|
|
14803
|
-
fps: number().optional(),
|
|
14804
|
-
bitrate: number().optional(),
|
|
14805
|
-
codec: string().optional(),
|
|
14806
|
-
profileHint: CamProfileSchema.optional(),
|
|
14807
|
-
sdp: string().optional()
|
|
14808
|
-
});
|
|
14809
|
-
var ConfigEntrySchema$1 = object({
|
|
14810
|
-
key: string(),
|
|
14811
|
-
value: unknown()
|
|
14812
|
-
});
|
|
14813
|
-
var RawStateResultSchema = object({
|
|
14814
|
-
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
14815
|
-
source: string(),
|
|
14816
|
-
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
14817
|
-
data: record(string(), unknown())
|
|
14818
|
-
});
|
|
14819
|
-
method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
14820
|
-
deviceId: number(),
|
|
14821
|
-
values: record(string(), unknown())
|
|
14822
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
14823
|
-
deviceId: number(),
|
|
14824
|
-
action: string().min(1),
|
|
14825
|
-
input: unknown()
|
|
14826
|
-
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
14827
|
-
/**
|
|
14828
14857
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
14829
14858
|
* + auth surface in a vendor-neutral shape.
|
|
14830
14859
|
*
|
|
@@ -18507,6 +18536,12 @@ Object.freeze({
|
|
|
18507
18536
|
addonId: null,
|
|
18508
18537
|
access: "view"
|
|
18509
18538
|
},
|
|
18539
|
+
"metricsProvider.dumpHeapSnapshot": {
|
|
18540
|
+
capName: "metrics-provider",
|
|
18541
|
+
capScope: "system",
|
|
18542
|
+
addonId: null,
|
|
18543
|
+
access: "create"
|
|
18544
|
+
},
|
|
18510
18545
|
"metricsProvider.getAddonStats": {
|
|
18511
18546
|
capName: "metrics-provider",
|
|
18512
18547
|
capScope: "system",
|
|
@@ -20793,7 +20828,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
20793
20828
|
capability: adminUiCapability,
|
|
20794
20829
|
provider: {
|
|
20795
20830
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
20796
|
-
getVersion: async () => ({ version: "1.0.
|
|
20831
|
+
getVersion: async () => ({ version: "1.0.8" })
|
|
20797
20832
|
}
|
|
20798
20833
|
}];
|
|
20799
20834
|
}
|