@camstack/addon-mqtt-broker 1.0.5 → 1.0.7
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/mqtt-broker.addon.js +502 -467
- package/dist/mqtt-broker.addon.mjs +502 -467
- package/package.json +1 -1
|
@@ -4668,63 +4668,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4668
4668
|
return inst;
|
|
4669
4669
|
}
|
|
4670
4670
|
//#endregion
|
|
4671
|
-
//#region ../types/dist/
|
|
4672
|
-
/**
|
|
4673
|
-
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
4674
|
-
* every declared capability + widget of every installed plugin, on every
|
|
4675
|
-
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
4676
|
-
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
4677
|
-
*
|
|
4678
|
-
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
4679
|
-
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
4680
|
-
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
4681
|
-
*/
|
|
4682
|
-
/** What kind of target a probe addressed. */
|
|
4683
|
-
var wiringProbeKindSchema = _enum([
|
|
4684
|
-
"singleton",
|
|
4685
|
-
"device",
|
|
4686
|
-
"widget"
|
|
4687
|
-
]);
|
|
4688
|
-
/** Result of probing a single (cap|widget [, device]) target. */
|
|
4689
|
-
var wiringProbeResultSchema = object({
|
|
4690
|
-
capName: string(),
|
|
4691
|
-
kind: wiringProbeKindSchema,
|
|
4692
|
-
deviceId: number().optional(),
|
|
4693
|
-
reachable: boolean(),
|
|
4694
|
-
latencyMs: number(),
|
|
4695
|
-
error: string().optional()
|
|
4696
|
-
});
|
|
4697
|
-
/** Per-addon roll-up of cap + widget probe results. */
|
|
4698
|
-
var wiringAddonHealthSchema = object({
|
|
4699
|
-
addonId: string(),
|
|
4700
|
-
caps: array(wiringProbeResultSchema).readonly(),
|
|
4701
|
-
widgets: array(wiringProbeResultSchema).readonly()
|
|
4702
|
-
});
|
|
4703
|
-
/** Per-node roll-up. */
|
|
4704
|
-
var wiringNodeHealthSchema = object({
|
|
4705
|
-
nodeId: string(),
|
|
4706
|
-
addons: array(wiringAddonHealthSchema).readonly()
|
|
4707
|
-
});
|
|
4708
|
-
object({
|
|
4709
|
-
/** True only when every probed target is reachable. */
|
|
4710
|
-
ok: boolean(),
|
|
4711
|
-
/** True when at least one target is unreachable. */
|
|
4712
|
-
degraded: boolean(),
|
|
4713
|
-
checkedAt: string(),
|
|
4714
|
-
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
4715
|
-
summary: object({
|
|
4716
|
-
total: number(),
|
|
4717
|
-
reachable: number(),
|
|
4718
|
-
unreachable: number()
|
|
4719
|
-
})
|
|
4720
|
-
});
|
|
4721
|
-
var MODEL_FORMATS = [
|
|
4722
|
-
"onnx",
|
|
4723
|
-
"coreml",
|
|
4724
|
-
"openvino",
|
|
4725
|
-
"tflite",
|
|
4726
|
-
"pt"
|
|
4727
|
-
];
|
|
4671
|
+
//#region ../types/dist/sleep-B1dKJAMJ.mjs
|
|
4728
4672
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4729
4673
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4730
4674
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5698,7 +5642,7 @@ var BaseAddon = class {
|
|
|
5698
5642
|
deviceSettingsSchema() {
|
|
5699
5643
|
return null;
|
|
5700
5644
|
}
|
|
5701
|
-
async getGlobalSettings(overlay, cap) {
|
|
5645
|
+
async getGlobalSettings(overlay, cap, _nodeId) {
|
|
5702
5646
|
const schema = this.globalSettingsSchema(cap);
|
|
5703
5647
|
if (!schema) return { sections: [] };
|
|
5704
5648
|
const raw = await this._ctx?.settings?.readAddonStore() ?? {};
|
|
@@ -5707,7 +5651,7 @@ var BaseAddon = class {
|
|
|
5707
5651
|
...overlay
|
|
5708
5652
|
} : raw);
|
|
5709
5653
|
}
|
|
5710
|
-
async updateGlobalSettings(patch) {
|
|
5654
|
+
async updateGlobalSettings(patch, _nodeId) {
|
|
5711
5655
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
5712
5656
|
await this.resolveConfig();
|
|
5713
5657
|
await this.onConfigChanged();
|
|
@@ -6047,7 +5991,7 @@ var ProfileSlotSchema = object({
|
|
|
6047
5991
|
* Zod schema for StreamSourceEntry — the canonical stream descriptor
|
|
6048
5992
|
* exposed by ICameraDevice.getStreamSources() and consumed by the broker.
|
|
6049
5993
|
*/
|
|
6050
|
-
var StreamSourceEntrySchema = object({
|
|
5994
|
+
var StreamSourceEntrySchema$1 = object({
|
|
6051
5995
|
id: string(),
|
|
6052
5996
|
label: string(),
|
|
6053
5997
|
protocol: _enum([
|
|
@@ -6269,6 +6213,468 @@ var ProfileRtspEntrySchema = object({
|
|
|
6269
6213
|
codec: string().optional(),
|
|
6270
6214
|
resolution: CamStreamResolutionSchema.optional()
|
|
6271
6215
|
});
|
|
6216
|
+
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6217
|
+
DeviceType["Camera"] = "camera";
|
|
6218
|
+
DeviceType["Hub"] = "hub";
|
|
6219
|
+
DeviceType["Light"] = "light";
|
|
6220
|
+
DeviceType["Siren"] = "siren";
|
|
6221
|
+
DeviceType["Switch"] = "switch";
|
|
6222
|
+
DeviceType["Sensor"] = "sensor";
|
|
6223
|
+
DeviceType["Thermostat"] = "thermostat";
|
|
6224
|
+
DeviceType["Button"] = "button";
|
|
6225
|
+
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6226
|
+
* event vocabulary verbatim (no normalization). Installed with the
|
|
6227
|
+
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6228
|
+
* HA bus events (e.g. `zha_event`, generic). */
|
|
6229
|
+
DeviceType["EventEmitter"] = "event-emitter";
|
|
6230
|
+
/** Firmware/software update entity — current vs available version,
|
|
6231
|
+
* updatable flag, update state, and an install action. Installed with
|
|
6232
|
+
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6233
|
+
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6234
|
+
DeviceType["Update"] = "update";
|
|
6235
|
+
DeviceType["Generic"] = "generic";
|
|
6236
|
+
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6237
|
+
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6238
|
+
* endpoint; the `notifier` cap defines the send surface. */
|
|
6239
|
+
DeviceType["Notifier"] = "notifier";
|
|
6240
|
+
/** Pre-recorded action sequence with optional parameters
|
|
6241
|
+
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6242
|
+
DeviceType["Script"] = "script";
|
|
6243
|
+
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6244
|
+
* trigger surface exposed via `automation-control` cap. */
|
|
6245
|
+
DeviceType["Automation"] = "automation";
|
|
6246
|
+
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6247
|
+
DeviceType["Lock"] = "lock";
|
|
6248
|
+
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6249
|
+
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6250
|
+
DeviceType["Cover"] = "cover";
|
|
6251
|
+
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6252
|
+
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6253
|
+
* modelled on the same open/closed lifecycle. */
|
|
6254
|
+
DeviceType["Valve"] = "valve";
|
|
6255
|
+
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6256
|
+
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6257
|
+
* modelled on the same target / mode lifecycle. */
|
|
6258
|
+
DeviceType["Humidifier"] = "humidifier";
|
|
6259
|
+
/** Water heater / boiler with target temperature + operation mode +
|
|
6260
|
+
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6261
|
+
* climate-family actuator. */
|
|
6262
|
+
DeviceType["WaterHeater"] = "water-heater";
|
|
6263
|
+
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6264
|
+
DeviceType["Fan"] = "fan";
|
|
6265
|
+
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6266
|
+
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6267
|
+
DeviceType["MediaPlayer"] = "media-player";
|
|
6268
|
+
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6269
|
+
* `alarm-panel` cap. */
|
|
6270
|
+
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6271
|
+
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6272
|
+
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6273
|
+
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6274
|
+
* TextControl / DateTimeControl. */
|
|
6275
|
+
DeviceType["Control"] = "control";
|
|
6276
|
+
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6277
|
+
* `presence` cap. */
|
|
6278
|
+
DeviceType["Presence"] = "presence";
|
|
6279
|
+
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6280
|
+
* `weather` cap. */
|
|
6281
|
+
DeviceType["Weather"] = "weather";
|
|
6282
|
+
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6283
|
+
DeviceType["Vacuum"] = "vacuum";
|
|
6284
|
+
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6285
|
+
* `lawn-mower-control` cap. */
|
|
6286
|
+
DeviceType["LawnMower"] = "lawn-mower";
|
|
6287
|
+
/** Physical HA device group — parent container for entity-children
|
|
6288
|
+
* adopted from a single HA device entry. Not renderable as a
|
|
6289
|
+
* standalone device; exists only to anchor child entities. */
|
|
6290
|
+
DeviceType["Container"] = "container";
|
|
6291
|
+
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6292
|
+
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6293
|
+
DeviceType["Image"] = "image";
|
|
6294
|
+
return DeviceType;
|
|
6295
|
+
}({});
|
|
6296
|
+
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6297
|
+
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6298
|
+
DeviceFeature["Rebootable"] = "rebootable";
|
|
6299
|
+
/**
|
|
6300
|
+
* Device supports an on-demand re-sync of its derived spec with its
|
|
6301
|
+
* upstream source — drives the generic Re-sync button. The owning
|
|
6302
|
+
* provider implements the action via the `device-adoption.resync` cap.
|
|
6303
|
+
*/
|
|
6304
|
+
DeviceFeature["Resyncable"] = "resyncable";
|
|
6305
|
+
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6306
|
+
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6307
|
+
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6308
|
+
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6309
|
+
/**
|
|
6310
|
+
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6311
|
+
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6312
|
+
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6313
|
+
* the autotrack toggle / settings card without re-deriving from
|
|
6314
|
+
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6315
|
+
* driver sets this feature when probe confirms the firmware
|
|
6316
|
+
* surface, and registers the cap in the same code path.
|
|
6317
|
+
*/
|
|
6318
|
+
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6319
|
+
/**
|
|
6320
|
+
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6321
|
+
* motion detection automatically activates this device. Mirrors
|
|
6322
|
+
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6323
|
+
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6324
|
+
*
|
|
6325
|
+
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6326
|
+
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6327
|
+
* filters that want "all devices with on-motion behaviour".
|
|
6328
|
+
*/
|
|
6329
|
+
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6330
|
+
/** Light supports rgb-triplet color via `color` cap. */
|
|
6331
|
+
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6332
|
+
/** Light supports HSV color via `color` cap. */
|
|
6333
|
+
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6334
|
+
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6335
|
+
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6336
|
+
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6337
|
+
* targetHigh). Gates the range slider UI. */
|
|
6338
|
+
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
6339
|
+
/** Thermostat exposes target humidity and/or current humidity
|
|
6340
|
+
* readings. Gates the humidity controls. */
|
|
6341
|
+
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
6342
|
+
/** Thermostat exposes a fan-mode selector. */
|
|
6343
|
+
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
6344
|
+
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
6345
|
+
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
6346
|
+
/** Cover exposes intermediate position control (0..100). Gates the
|
|
6347
|
+
* position slider UI. */
|
|
6348
|
+
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
6349
|
+
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
6350
|
+
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
6351
|
+
/** Valve exposes intermediate position control (0..100). Gates the
|
|
6352
|
+
* position slider / drag surface UI. */
|
|
6353
|
+
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
6354
|
+
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
6355
|
+
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
6356
|
+
/** Fan exposes a preset mode selector. */
|
|
6357
|
+
DeviceFeature["FanPreset"] = "fan-preset";
|
|
6358
|
+
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
6359
|
+
* ceiling fans. */
|
|
6360
|
+
DeviceFeature["FanDirection"] = "fan-direction";
|
|
6361
|
+
/** Fan exposes an oscillation toggle. */
|
|
6362
|
+
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
6363
|
+
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
6364
|
+
* field on the UI lock-controls panel. */
|
|
6365
|
+
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
6366
|
+
/** Lock supports a latch-release ("open door") action distinct from
|
|
6367
|
+
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
6368
|
+
* `supported_features`. Gates the Open Door button in the UI. */
|
|
6369
|
+
DeviceFeature["LockOpen"] = "lock-open";
|
|
6370
|
+
/** Media player exposes a seek-to-position surface. */
|
|
6371
|
+
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
6372
|
+
/** Media player exposes a volume-level setter. */
|
|
6373
|
+
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
6374
|
+
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
6375
|
+
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
6376
|
+
/** Media player exposes a shuffle toggle. */
|
|
6377
|
+
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
6378
|
+
/** Media player exposes a repeat mode (off / all / one). */
|
|
6379
|
+
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
6380
|
+
/** Media player exposes a source / input selector. */
|
|
6381
|
+
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
6382
|
+
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
6383
|
+
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
6384
|
+
/** Media player exposes next-track. */
|
|
6385
|
+
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
6386
|
+
/** Media player exposes previous-track. */
|
|
6387
|
+
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
6388
|
+
/** Media player exposes stop distinct from pause. */
|
|
6389
|
+
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
6390
|
+
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
6391
|
+
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
6392
|
+
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
6393
|
+
* addition to a textual location. */
|
|
6394
|
+
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
6395
|
+
/** Notifier accepts an inline / URL image attachment. */
|
|
6396
|
+
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
6397
|
+
/** Notifier accepts a priority hint (high/normal/low). */
|
|
6398
|
+
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
6399
|
+
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
6400
|
+
* fields. */
|
|
6401
|
+
DeviceFeature["NotifierData"] = "notifier-data";
|
|
6402
|
+
/** Notifier supports interactive action buttons / callbacks. */
|
|
6403
|
+
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
6404
|
+
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
6405
|
+
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
6406
|
+
/** Script runner accepts a variables map on each run invocation. */
|
|
6407
|
+
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
6408
|
+
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
6409
|
+
* automation's actions while bypassing its condition block. */
|
|
6410
|
+
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
6411
|
+
return DeviceFeature;
|
|
6412
|
+
}({});
|
|
6413
|
+
/**
|
|
6414
|
+
* Semantic role a device plays within its parent. Populated by driver
|
|
6415
|
+
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
6416
|
+
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
6417
|
+
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
6418
|
+
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
6419
|
+
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
6420
|
+
*
|
|
6421
|
+
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
6422
|
+
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
6423
|
+
*/
|
|
6424
|
+
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
6425
|
+
DeviceRole["Siren"] = "siren";
|
|
6426
|
+
DeviceRole["Floodlight"] = "floodlight";
|
|
6427
|
+
DeviceRole["Spotlight"] = "spotlight";
|
|
6428
|
+
DeviceRole["PirSensor"] = "pir-sensor";
|
|
6429
|
+
DeviceRole["Chime"] = "chime";
|
|
6430
|
+
DeviceRole["Autotrack"] = "autotrack";
|
|
6431
|
+
DeviceRole["Nightvision"] = "nightvision";
|
|
6432
|
+
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
6433
|
+
DeviceRole["Doorbell"] = "doorbell";
|
|
6434
|
+
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
6435
|
+
* real Switch device for UI rendering / export adapters. */
|
|
6436
|
+
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
6437
|
+
/** Generic motion / occupancy / moving event source. Distinct from
|
|
6438
|
+
* the camera accessory PirSensor role: that one is a camera child;
|
|
6439
|
+
* this is a standalone HA / 3rd-party motion sensor. */
|
|
6440
|
+
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
6441
|
+
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
6442
|
+
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
6443
|
+
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
6444
|
+
DeviceRole["COSensor"] = "co-sensor";
|
|
6445
|
+
DeviceRole["GasSensor"] = "gas-sensor";
|
|
6446
|
+
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
6447
|
+
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
6448
|
+
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
6449
|
+
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
6450
|
+
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
6451
|
+
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
6452
|
+
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
6453
|
+
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
6454
|
+
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
6455
|
+
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
6456
|
+
DeviceRole["PowerSensor"] = "power-sensor";
|
|
6457
|
+
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
6458
|
+
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
6459
|
+
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
6460
|
+
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
6461
|
+
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
6462
|
+
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
6463
|
+
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
6464
|
+
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
6465
|
+
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
6466
|
+
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
6467
|
+
* `attributes.options`). */
|
|
6468
|
+
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
6469
|
+
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
6470
|
+
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
6471
|
+
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
6472
|
+
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
6473
|
+
/** Last-resort fallback when nothing else matches. */
|
|
6474
|
+
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
6475
|
+
DeviceRole["NumericControl"] = "numeric-control";
|
|
6476
|
+
DeviceRole["SelectControl"] = "select-control";
|
|
6477
|
+
DeviceRole["TextControl"] = "text-control";
|
|
6478
|
+
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
6479
|
+
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
6480
|
+
* rich features (image, priority, channel routing). */
|
|
6481
|
+
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
6482
|
+
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
6483
|
+
* `notify.discord_*`, etc.). */
|
|
6484
|
+
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
6485
|
+
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
6486
|
+
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
6487
|
+
/** Fallback when the notifier service name doesn't match a known
|
|
6488
|
+
* pattern. */
|
|
6489
|
+
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
6490
|
+
return DeviceRole;
|
|
6491
|
+
}({});
|
|
6492
|
+
/**
|
|
6493
|
+
* Generic types for capability definitions.
|
|
6494
|
+
*
|
|
6495
|
+
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
6496
|
+
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
6497
|
+
*
|
|
6498
|
+
* Pattern:
|
|
6499
|
+
* 1. Define Zod schemas for data, methods, settings
|
|
6500
|
+
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
6501
|
+
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
6502
|
+
* 4. Addon implements IProvider
|
|
6503
|
+
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
6504
|
+
*/
|
|
6505
|
+
/**
|
|
6506
|
+
* Output schema shared by the contribution + live methods.
|
|
6507
|
+
*
|
|
6508
|
+
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
6509
|
+
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
6510
|
+
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
6511
|
+
* (using `z.unknown()` here collapses unrelated router branches to
|
|
6512
|
+
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
6513
|
+
*
|
|
6514
|
+
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
6515
|
+
* extensions the caller adds (showWhen, displayScale, …) without
|
|
6516
|
+
* rebuilding every time a new field kind is introduced.
|
|
6517
|
+
*/
|
|
6518
|
+
var ContributionSectionSchema = object({
|
|
6519
|
+
id: string(),
|
|
6520
|
+
title: string(),
|
|
6521
|
+
description: string().optional(),
|
|
6522
|
+
style: _enum(["card", "accordion"]).optional(),
|
|
6523
|
+
defaultCollapsed: boolean().optional(),
|
|
6524
|
+
columns: union([
|
|
6525
|
+
literal(1),
|
|
6526
|
+
literal(2),
|
|
6527
|
+
literal(3),
|
|
6528
|
+
literal(4)
|
|
6529
|
+
]).optional(),
|
|
6530
|
+
tab: string().optional(),
|
|
6531
|
+
location: _enum(["settings", "top-tab"]).optional(),
|
|
6532
|
+
order: number().optional(),
|
|
6533
|
+
fields: array(any())
|
|
6534
|
+
});
|
|
6535
|
+
object({
|
|
6536
|
+
tabs: array(object({
|
|
6537
|
+
id: string(),
|
|
6538
|
+
label: string(),
|
|
6539
|
+
icon: string(),
|
|
6540
|
+
order: number().optional()
|
|
6541
|
+
})).optional(),
|
|
6542
|
+
sections: array(ContributionSectionSchema)
|
|
6543
|
+
}).nullable();
|
|
6544
|
+
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
6545
|
+
deviceId: number(),
|
|
6546
|
+
patch: record(string(), unknown())
|
|
6547
|
+
}), object({ success: literal(true) });
|
|
6548
|
+
object({ deviceId: number() }), unknown().nullable();
|
|
6549
|
+
/** Shorthand to define a method schema */
|
|
6550
|
+
function method(input, output, options) {
|
|
6551
|
+
return {
|
|
6552
|
+
input,
|
|
6553
|
+
output,
|
|
6554
|
+
kind: options?.kind ?? "query",
|
|
6555
|
+
auth: options?.auth ?? "protected",
|
|
6556
|
+
...options?.access !== void 0 ? { access: options.access } : {},
|
|
6557
|
+
timeoutMs: options?.timeoutMs
|
|
6558
|
+
};
|
|
6559
|
+
}
|
|
6560
|
+
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
6561
|
+
var VersionOutputSchema = object({ version: string() });
|
|
6562
|
+
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
6563
|
+
/**
|
|
6564
|
+
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
6565
|
+
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
6566
|
+
*
|
|
6567
|
+
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
6568
|
+
* provider for this cap (per device) backed by its local
|
|
6569
|
+
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
6570
|
+
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
6571
|
+
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
6572
|
+
* so there's no parallel bridge path anymore.
|
|
6573
|
+
*
|
|
6574
|
+
* The surface is intentionally small — every method corresponds to a
|
|
6575
|
+
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
6576
|
+
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
6577
|
+
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
6578
|
+
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
6579
|
+
*/
|
|
6580
|
+
var StreamSourceEntrySchema = object({
|
|
6581
|
+
id: string(),
|
|
6582
|
+
label: string(),
|
|
6583
|
+
protocol: _enum([
|
|
6584
|
+
"rtsp",
|
|
6585
|
+
"rtmp",
|
|
6586
|
+
"annexb",
|
|
6587
|
+
"http-mjpeg",
|
|
6588
|
+
"webrtc",
|
|
6589
|
+
"custom"
|
|
6590
|
+
]),
|
|
6591
|
+
url: string().optional(),
|
|
6592
|
+
resolution: object({
|
|
6593
|
+
width: number(),
|
|
6594
|
+
height: number()
|
|
6595
|
+
}).optional(),
|
|
6596
|
+
fps: number().optional(),
|
|
6597
|
+
bitrate: number().optional(),
|
|
6598
|
+
codec: string().optional(),
|
|
6599
|
+
profileHint: CamProfileSchema.optional(),
|
|
6600
|
+
sdp: string().optional()
|
|
6601
|
+
});
|
|
6602
|
+
var ConfigEntrySchema$1 = object({
|
|
6603
|
+
key: string(),
|
|
6604
|
+
value: unknown()
|
|
6605
|
+
});
|
|
6606
|
+
var RawStateResultSchema = object({
|
|
6607
|
+
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
6608
|
+
source: string(),
|
|
6609
|
+
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
6610
|
+
data: record(string(), unknown())
|
|
6611
|
+
});
|
|
6612
|
+
method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
6613
|
+
deviceId: number(),
|
|
6614
|
+
values: record(string(), unknown())
|
|
6615
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
6616
|
+
deviceId: number(),
|
|
6617
|
+
action: string().min(1),
|
|
6618
|
+
input: unknown()
|
|
6619
|
+
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
6620
|
+
//#endregion
|
|
6621
|
+
//#region ../types/dist/index.mjs
|
|
6622
|
+
/**
|
|
6623
|
+
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
6624
|
+
* every declared capability + widget of every installed plugin, on every
|
|
6625
|
+
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
6626
|
+
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
6627
|
+
*
|
|
6628
|
+
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
6629
|
+
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
6630
|
+
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
6631
|
+
*/
|
|
6632
|
+
/** What kind of target a probe addressed. */
|
|
6633
|
+
var wiringProbeKindSchema = _enum([
|
|
6634
|
+
"singleton",
|
|
6635
|
+
"device",
|
|
6636
|
+
"widget"
|
|
6637
|
+
]);
|
|
6638
|
+
/** Result of probing a single (cap|widget [, device]) target. */
|
|
6639
|
+
var wiringProbeResultSchema = object({
|
|
6640
|
+
capName: string(),
|
|
6641
|
+
kind: wiringProbeKindSchema,
|
|
6642
|
+
deviceId: number().optional(),
|
|
6643
|
+
reachable: boolean(),
|
|
6644
|
+
latencyMs: number(),
|
|
6645
|
+
error: string().optional()
|
|
6646
|
+
});
|
|
6647
|
+
/** Per-addon roll-up of cap + widget probe results. */
|
|
6648
|
+
var wiringAddonHealthSchema = object({
|
|
6649
|
+
addonId: string(),
|
|
6650
|
+
caps: array(wiringProbeResultSchema).readonly(),
|
|
6651
|
+
widgets: array(wiringProbeResultSchema).readonly()
|
|
6652
|
+
});
|
|
6653
|
+
/** Per-node roll-up. */
|
|
6654
|
+
var wiringNodeHealthSchema = object({
|
|
6655
|
+
nodeId: string(),
|
|
6656
|
+
addons: array(wiringAddonHealthSchema).readonly()
|
|
6657
|
+
});
|
|
6658
|
+
object({
|
|
6659
|
+
/** True only when every probed target is reachable. */
|
|
6660
|
+
ok: boolean(),
|
|
6661
|
+
/** True when at least one target is unreachable. */
|
|
6662
|
+
degraded: boolean(),
|
|
6663
|
+
checkedAt: string(),
|
|
6664
|
+
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
6665
|
+
summary: object({
|
|
6666
|
+
total: number(),
|
|
6667
|
+
reachable: number(),
|
|
6668
|
+
unreachable: number()
|
|
6669
|
+
})
|
|
6670
|
+
});
|
|
6671
|
+
var MODEL_FORMATS = [
|
|
6672
|
+
"onnx",
|
|
6673
|
+
"coreml",
|
|
6674
|
+
"openvino",
|
|
6675
|
+
"tflite",
|
|
6676
|
+
"pt"
|
|
6677
|
+
];
|
|
6272
6678
|
/**
|
|
6273
6679
|
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
6274
6680
|
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
@@ -6881,282 +7287,6 @@ var APPLE_SA_TO_MACRO = {
|
|
|
6881
7287
|
var _macroLookup = /* @__PURE__ */ new Map();
|
|
6882
7288
|
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6883
7289
|
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6884
|
-
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6885
|
-
DeviceType["Camera"] = "camera";
|
|
6886
|
-
DeviceType["Hub"] = "hub";
|
|
6887
|
-
DeviceType["Light"] = "light";
|
|
6888
|
-
DeviceType["Siren"] = "siren";
|
|
6889
|
-
DeviceType["Switch"] = "switch";
|
|
6890
|
-
DeviceType["Sensor"] = "sensor";
|
|
6891
|
-
DeviceType["Thermostat"] = "thermostat";
|
|
6892
|
-
DeviceType["Button"] = "button";
|
|
6893
|
-
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6894
|
-
* event vocabulary verbatim (no normalization). Installed with the
|
|
6895
|
-
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6896
|
-
* HA bus events (e.g. `zha_event`, generic). */
|
|
6897
|
-
DeviceType["EventEmitter"] = "event-emitter";
|
|
6898
|
-
/** Firmware/software update entity — current vs available version,
|
|
6899
|
-
* updatable flag, update state, and an install action. Installed with
|
|
6900
|
-
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6901
|
-
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6902
|
-
DeviceType["Update"] = "update";
|
|
6903
|
-
DeviceType["Generic"] = "generic";
|
|
6904
|
-
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6905
|
-
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6906
|
-
* endpoint; the `notifier` cap defines the send surface. */
|
|
6907
|
-
DeviceType["Notifier"] = "notifier";
|
|
6908
|
-
/** Pre-recorded action sequence with optional parameters
|
|
6909
|
-
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6910
|
-
DeviceType["Script"] = "script";
|
|
6911
|
-
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6912
|
-
* trigger surface exposed via `automation-control` cap. */
|
|
6913
|
-
DeviceType["Automation"] = "automation";
|
|
6914
|
-
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6915
|
-
DeviceType["Lock"] = "lock";
|
|
6916
|
-
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6917
|
-
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6918
|
-
DeviceType["Cover"] = "cover";
|
|
6919
|
-
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6920
|
-
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6921
|
-
* modelled on the same open/closed lifecycle. */
|
|
6922
|
-
DeviceType["Valve"] = "valve";
|
|
6923
|
-
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6924
|
-
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6925
|
-
* modelled on the same target / mode lifecycle. */
|
|
6926
|
-
DeviceType["Humidifier"] = "humidifier";
|
|
6927
|
-
/** Water heater / boiler with target temperature + operation mode +
|
|
6928
|
-
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6929
|
-
* climate-family actuator. */
|
|
6930
|
-
DeviceType["WaterHeater"] = "water-heater";
|
|
6931
|
-
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6932
|
-
DeviceType["Fan"] = "fan";
|
|
6933
|
-
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6934
|
-
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6935
|
-
DeviceType["MediaPlayer"] = "media-player";
|
|
6936
|
-
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6937
|
-
* `alarm-panel` cap. */
|
|
6938
|
-
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6939
|
-
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6940
|
-
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6941
|
-
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6942
|
-
* TextControl / DateTimeControl. */
|
|
6943
|
-
DeviceType["Control"] = "control";
|
|
6944
|
-
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6945
|
-
* `presence` cap. */
|
|
6946
|
-
DeviceType["Presence"] = "presence";
|
|
6947
|
-
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6948
|
-
* `weather` cap. */
|
|
6949
|
-
DeviceType["Weather"] = "weather";
|
|
6950
|
-
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6951
|
-
DeviceType["Vacuum"] = "vacuum";
|
|
6952
|
-
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6953
|
-
* `lawn-mower-control` cap. */
|
|
6954
|
-
DeviceType["LawnMower"] = "lawn-mower";
|
|
6955
|
-
/** Physical HA device group — parent container for entity-children
|
|
6956
|
-
* adopted from a single HA device entry. Not renderable as a
|
|
6957
|
-
* standalone device; exists only to anchor child entities. */
|
|
6958
|
-
DeviceType["Container"] = "container";
|
|
6959
|
-
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6960
|
-
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6961
|
-
DeviceType["Image"] = "image";
|
|
6962
|
-
return DeviceType;
|
|
6963
|
-
}({});
|
|
6964
|
-
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6965
|
-
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6966
|
-
DeviceFeature["Rebootable"] = "rebootable";
|
|
6967
|
-
/**
|
|
6968
|
-
* Device supports an on-demand re-sync of its derived spec with its
|
|
6969
|
-
* upstream source — drives the generic Re-sync button. The owning
|
|
6970
|
-
* provider implements the action via the `device-adoption.resync` cap.
|
|
6971
|
-
*/
|
|
6972
|
-
DeviceFeature["Resyncable"] = "resyncable";
|
|
6973
|
-
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6974
|
-
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6975
|
-
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6976
|
-
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6977
|
-
/**
|
|
6978
|
-
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6979
|
-
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6980
|
-
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6981
|
-
* the autotrack toggle / settings card without re-deriving from
|
|
6982
|
-
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6983
|
-
* driver sets this feature when probe confirms the firmware
|
|
6984
|
-
* surface, and registers the cap in the same code path.
|
|
6985
|
-
*/
|
|
6986
|
-
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6987
|
-
/**
|
|
6988
|
-
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6989
|
-
* motion detection automatically activates this device. Mirrors
|
|
6990
|
-
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6991
|
-
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6992
|
-
*
|
|
6993
|
-
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6994
|
-
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6995
|
-
* filters that want "all devices with on-motion behaviour".
|
|
6996
|
-
*/
|
|
6997
|
-
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6998
|
-
/** Light supports rgb-triplet color via `color` cap. */
|
|
6999
|
-
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
7000
|
-
/** Light supports HSV color via `color` cap. */
|
|
7001
|
-
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
7002
|
-
/** Light supports color-temperature (mired) via `color` cap. */
|
|
7003
|
-
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
7004
|
-
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
7005
|
-
* targetHigh). Gates the range slider UI. */
|
|
7006
|
-
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
7007
|
-
/** Thermostat exposes target humidity and/or current humidity
|
|
7008
|
-
* readings. Gates the humidity controls. */
|
|
7009
|
-
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
7010
|
-
/** Thermostat exposes a fan-mode selector. */
|
|
7011
|
-
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
7012
|
-
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
7013
|
-
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
7014
|
-
/** Cover exposes intermediate position control (0..100). Gates the
|
|
7015
|
-
* position slider UI. */
|
|
7016
|
-
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
7017
|
-
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
7018
|
-
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
7019
|
-
/** Valve exposes intermediate position control (0..100). Gates the
|
|
7020
|
-
* position slider / drag surface UI. */
|
|
7021
|
-
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
7022
|
-
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
7023
|
-
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
7024
|
-
/** Fan exposes a preset mode selector. */
|
|
7025
|
-
DeviceFeature["FanPreset"] = "fan-preset";
|
|
7026
|
-
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
7027
|
-
* ceiling fans. */
|
|
7028
|
-
DeviceFeature["FanDirection"] = "fan-direction";
|
|
7029
|
-
/** Fan exposes an oscillation toggle. */
|
|
7030
|
-
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
7031
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
7032
|
-
* field on the UI lock-controls panel. */
|
|
7033
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
7034
|
-
/** Lock supports a latch-release ("open door") action distinct from
|
|
7035
|
-
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
7036
|
-
* `supported_features`. Gates the Open Door button in the UI. */
|
|
7037
|
-
DeviceFeature["LockOpen"] = "lock-open";
|
|
7038
|
-
/** Media player exposes a seek-to-position surface. */
|
|
7039
|
-
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
7040
|
-
/** Media player exposes a volume-level setter. */
|
|
7041
|
-
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
7042
|
-
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
7043
|
-
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
7044
|
-
/** Media player exposes a shuffle toggle. */
|
|
7045
|
-
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
7046
|
-
/** Media player exposes a repeat mode (off / all / one). */
|
|
7047
|
-
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
7048
|
-
/** Media player exposes a source / input selector. */
|
|
7049
|
-
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
7050
|
-
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
7051
|
-
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
7052
|
-
/** Media player exposes next-track. */
|
|
7053
|
-
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
7054
|
-
/** Media player exposes previous-track. */
|
|
7055
|
-
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
7056
|
-
/** Media player exposes stop distinct from pause. */
|
|
7057
|
-
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
7058
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
7059
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
7060
|
-
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
7061
|
-
* addition to a textual location. */
|
|
7062
|
-
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
7063
|
-
/** Notifier accepts an inline / URL image attachment. */
|
|
7064
|
-
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
7065
|
-
/** Notifier accepts a priority hint (high/normal/low). */
|
|
7066
|
-
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
7067
|
-
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
7068
|
-
* fields. */
|
|
7069
|
-
DeviceFeature["NotifierData"] = "notifier-data";
|
|
7070
|
-
/** Notifier supports interactive action buttons / callbacks. */
|
|
7071
|
-
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
7072
|
-
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
7073
|
-
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
7074
|
-
/** Script runner accepts a variables map on each run invocation. */
|
|
7075
|
-
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
7076
|
-
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
7077
|
-
* automation's actions while bypassing its condition block. */
|
|
7078
|
-
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
7079
|
-
return DeviceFeature;
|
|
7080
|
-
}({});
|
|
7081
|
-
/**
|
|
7082
|
-
* Semantic role a device plays within its parent. Populated by driver
|
|
7083
|
-
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
7084
|
-
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
7085
|
-
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
7086
|
-
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
7087
|
-
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
7088
|
-
*
|
|
7089
|
-
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
7090
|
-
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
7091
|
-
*/
|
|
7092
|
-
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
7093
|
-
DeviceRole["Siren"] = "siren";
|
|
7094
|
-
DeviceRole["Floodlight"] = "floodlight";
|
|
7095
|
-
DeviceRole["Spotlight"] = "spotlight";
|
|
7096
|
-
DeviceRole["PirSensor"] = "pir-sensor";
|
|
7097
|
-
DeviceRole["Chime"] = "chime";
|
|
7098
|
-
DeviceRole["Autotrack"] = "autotrack";
|
|
7099
|
-
DeviceRole["Nightvision"] = "nightvision";
|
|
7100
|
-
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
7101
|
-
DeviceRole["Doorbell"] = "doorbell";
|
|
7102
|
-
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
7103
|
-
* real Switch device for UI rendering / export adapters. */
|
|
7104
|
-
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
7105
|
-
/** Generic motion / occupancy / moving event source. Distinct from
|
|
7106
|
-
* the camera accessory PirSensor role: that one is a camera child;
|
|
7107
|
-
* this is a standalone HA / 3rd-party motion sensor. */
|
|
7108
|
-
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
7109
|
-
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
7110
|
-
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
7111
|
-
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
7112
|
-
DeviceRole["COSensor"] = "co-sensor";
|
|
7113
|
-
DeviceRole["GasSensor"] = "gas-sensor";
|
|
7114
|
-
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
7115
|
-
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
7116
|
-
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
7117
|
-
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
7118
|
-
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
7119
|
-
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
7120
|
-
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
7121
|
-
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
7122
|
-
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
7123
|
-
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
7124
|
-
DeviceRole["PowerSensor"] = "power-sensor";
|
|
7125
|
-
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
7126
|
-
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
7127
|
-
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
7128
|
-
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
7129
|
-
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
7130
|
-
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
7131
|
-
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
7132
|
-
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
7133
|
-
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
7134
|
-
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
7135
|
-
* `attributes.options`). */
|
|
7136
|
-
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
7137
|
-
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
7138
|
-
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
7139
|
-
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
7140
|
-
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
7141
|
-
/** Last-resort fallback when nothing else matches. */
|
|
7142
|
-
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
7143
|
-
DeviceRole["NumericControl"] = "numeric-control";
|
|
7144
|
-
DeviceRole["SelectControl"] = "select-control";
|
|
7145
|
-
DeviceRole["TextControl"] = "text-control";
|
|
7146
|
-
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
7147
|
-
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
7148
|
-
* rich features (image, priority, channel routing). */
|
|
7149
|
-
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
7150
|
-
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
7151
|
-
* `notify.discord_*`, etc.). */
|
|
7152
|
-
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
7153
|
-
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
7154
|
-
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
7155
|
-
/** Fallback when the notifier service name doesn't match a known
|
|
7156
|
-
* pattern. */
|
|
7157
|
-
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
7158
|
-
return DeviceRole;
|
|
7159
|
-
}({});
|
|
7160
7290
|
/**
|
|
7161
7291
|
* Accessory device helpers — shared across drivers.
|
|
7162
7292
|
*
|
|
@@ -7316,74 +7446,6 @@ object({
|
|
|
7316
7446
|
});
|
|
7317
7447
|
DeviceType.Sensor;
|
|
7318
7448
|
/**
|
|
7319
|
-
* Generic types for capability definitions.
|
|
7320
|
-
*
|
|
7321
|
-
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
7322
|
-
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
7323
|
-
*
|
|
7324
|
-
* Pattern:
|
|
7325
|
-
* 1. Define Zod schemas for data, methods, settings
|
|
7326
|
-
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
7327
|
-
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
7328
|
-
* 4. Addon implements IProvider
|
|
7329
|
-
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
7330
|
-
*/
|
|
7331
|
-
/**
|
|
7332
|
-
* Output schema shared by the contribution + live methods.
|
|
7333
|
-
*
|
|
7334
|
-
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
7335
|
-
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
7336
|
-
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
7337
|
-
* (using `z.unknown()` here collapses unrelated router branches to
|
|
7338
|
-
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
7339
|
-
*
|
|
7340
|
-
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
7341
|
-
* extensions the caller adds (showWhen, displayScale, …) without
|
|
7342
|
-
* rebuilding every time a new field kind is introduced.
|
|
7343
|
-
*/
|
|
7344
|
-
var ContributionSectionSchema = object({
|
|
7345
|
-
id: string(),
|
|
7346
|
-
title: string(),
|
|
7347
|
-
description: string().optional(),
|
|
7348
|
-
style: _enum(["card", "accordion"]).optional(),
|
|
7349
|
-
defaultCollapsed: boolean().optional(),
|
|
7350
|
-
columns: union([
|
|
7351
|
-
literal(1),
|
|
7352
|
-
literal(2),
|
|
7353
|
-
literal(3),
|
|
7354
|
-
literal(4)
|
|
7355
|
-
]).optional(),
|
|
7356
|
-
tab: string().optional(),
|
|
7357
|
-
location: _enum(["settings", "top-tab"]).optional(),
|
|
7358
|
-
order: number().optional(),
|
|
7359
|
-
fields: array(any())
|
|
7360
|
-
});
|
|
7361
|
-
object({
|
|
7362
|
-
tabs: array(object({
|
|
7363
|
-
id: string(),
|
|
7364
|
-
label: string(),
|
|
7365
|
-
icon: string(),
|
|
7366
|
-
order: number().optional()
|
|
7367
|
-
})).optional(),
|
|
7368
|
-
sections: array(ContributionSectionSchema)
|
|
7369
|
-
}).nullable();
|
|
7370
|
-
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
7371
|
-
deviceId: number(),
|
|
7372
|
-
patch: record(string(), unknown())
|
|
7373
|
-
}), object({ success: literal(true) });
|
|
7374
|
-
object({ deviceId: number() }), unknown().nullable();
|
|
7375
|
-
/** Shorthand to define a method schema */
|
|
7376
|
-
function method(input, output, options) {
|
|
7377
|
-
return {
|
|
7378
|
-
input,
|
|
7379
|
-
output,
|
|
7380
|
-
kind: options?.kind ?? "query",
|
|
7381
|
-
auth: options?.auth ?? "protected",
|
|
7382
|
-
...options?.access !== void 0 ? { access: options.access } : {},
|
|
7383
|
-
timeoutMs: options?.timeoutMs
|
|
7384
|
-
};
|
|
7385
|
-
}
|
|
7386
|
-
/**
|
|
7387
7449
|
* Alarm-panel cap. Models HA `alarm_control_panel.*` on
|
|
7388
7450
|
* `DeviceType.AlarmPanel`. State follows HA's canonical lifecycle
|
|
7389
7451
|
* across disarmed / armed_(home|away|night|vacation|custom_bypass) /
|
|
@@ -11385,9 +11447,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
11385
11447
|
limit: number().optional(),
|
|
11386
11448
|
tags: record(string(), string()).optional()
|
|
11387
11449
|
}), array(LogEntrySchema).readonly());
|
|
11388
|
-
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
11389
|
-
var VersionOutputSchema = object({ version: string() });
|
|
11390
|
-
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
11391
11450
|
/**
|
|
11392
11451
|
* Zod schemas for persisted record types.
|
|
11393
11452
|
*
|
|
@@ -13756,7 +13815,7 @@ method(object({
|
|
|
13756
13815
|
}), _void(), {
|
|
13757
13816
|
kind: "mutation",
|
|
13758
13817
|
auth: "admin"
|
|
13759
|
-
}), 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({
|
|
13818
|
+
}), 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({
|
|
13760
13819
|
deviceId: number(),
|
|
13761
13820
|
values: record(string(), unknown())
|
|
13762
13821
|
}), object({ success: literal(true) }), {
|
|
@@ -14438,7 +14497,20 @@ var DiskSpaceInfoSchema = object({
|
|
|
14438
14497
|
var PidResourceStatsSchema = object({
|
|
14439
14498
|
pid: number(),
|
|
14440
14499
|
cpu: number(),
|
|
14441
|
-
memory: number()
|
|
14500
|
+
memory: number(),
|
|
14501
|
+
/**
|
|
14502
|
+
* Private (anonymous) resident bytes — the per-process V8 heap + native
|
|
14503
|
+
* allocations NOT shared with other processes (Linux RssAnon). This is the
|
|
14504
|
+
* "real" per-runner cost; summing it across runners is meaningful, unlike
|
|
14505
|
+
* `memory` (RSS), which double-counts the shared mmap'd framework code.
|
|
14506
|
+
* Undefined where /proc is unavailable (e.g. macOS).
|
|
14507
|
+
*/
|
|
14508
|
+
privateBytes: number().optional(),
|
|
14509
|
+
/**
|
|
14510
|
+
* Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
|
|
14511
|
+
* code shared copy-on-write across runners. Undefined on macOS.
|
|
14512
|
+
*/
|
|
14513
|
+
sharedBytes: number().optional()
|
|
14442
14514
|
});
|
|
14443
14515
|
var AddonInstanceSchema = object({
|
|
14444
14516
|
addonId: string(),
|
|
@@ -14487,6 +14559,17 @@ var KillProcessResultSchema = object({
|
|
|
14487
14559
|
reason: string().optional(),
|
|
14488
14560
|
signal: _enum(["SIGTERM", "SIGKILL"]).optional()
|
|
14489
14561
|
});
|
|
14562
|
+
var DumpHeapSnapshotInputSchema = object({
|
|
14563
|
+
/** The addon whose runner should dump a heap snapshot. */
|
|
14564
|
+
addonId: string() });
|
|
14565
|
+
var DumpHeapSnapshotResultSchema = object({
|
|
14566
|
+
success: boolean(),
|
|
14567
|
+
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
14568
|
+
path: string().optional(),
|
|
14569
|
+
/** Process pid that was signalled. */
|
|
14570
|
+
pid: number().optional(),
|
|
14571
|
+
reason: string().optional()
|
|
14572
|
+
});
|
|
14490
14573
|
var SystemMetricsSchema = object({
|
|
14491
14574
|
cpuPercent: number(),
|
|
14492
14575
|
memoryPercent: number(),
|
|
@@ -14500,6 +14583,9 @@ var SystemMetricsSchema = object({
|
|
|
14500
14583
|
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, {
|
|
14501
14584
|
kind: "mutation",
|
|
14502
14585
|
auth: "admin"
|
|
14586
|
+
}), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
14587
|
+
kind: "mutation",
|
|
14588
|
+
auth: "admin"
|
|
14503
14589
|
});
|
|
14504
14590
|
var PtzPresetSchema = object({
|
|
14505
14591
|
id: string(),
|
|
@@ -14866,63 +14952,6 @@ method(object({
|
|
|
14866
14952
|
auth: "admin"
|
|
14867
14953
|
});
|
|
14868
14954
|
/**
|
|
14869
|
-
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
14870
|
-
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
14871
|
-
*
|
|
14872
|
-
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
14873
|
-
* provider for this cap (per device) backed by its local
|
|
14874
|
-
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
14875
|
-
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
14876
|
-
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
14877
|
-
* so there's no parallel bridge path anymore.
|
|
14878
|
-
*
|
|
14879
|
-
* The surface is intentionally small — every method corresponds to a
|
|
14880
|
-
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
14881
|
-
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
14882
|
-
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
14883
|
-
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
14884
|
-
*/
|
|
14885
|
-
var StreamSourceEntrySchema$1 = object({
|
|
14886
|
-
id: string(),
|
|
14887
|
-
label: string(),
|
|
14888
|
-
protocol: _enum([
|
|
14889
|
-
"rtsp",
|
|
14890
|
-
"rtmp",
|
|
14891
|
-
"annexb",
|
|
14892
|
-
"http-mjpeg",
|
|
14893
|
-
"webrtc",
|
|
14894
|
-
"custom"
|
|
14895
|
-
]),
|
|
14896
|
-
url: string().optional(),
|
|
14897
|
-
resolution: object({
|
|
14898
|
-
width: number(),
|
|
14899
|
-
height: number()
|
|
14900
|
-
}).optional(),
|
|
14901
|
-
fps: number().optional(),
|
|
14902
|
-
bitrate: number().optional(),
|
|
14903
|
-
codec: string().optional(),
|
|
14904
|
-
profileHint: CamProfileSchema.optional(),
|
|
14905
|
-
sdp: string().optional()
|
|
14906
|
-
});
|
|
14907
|
-
var ConfigEntrySchema$1 = object({
|
|
14908
|
-
key: string(),
|
|
14909
|
-
value: unknown()
|
|
14910
|
-
});
|
|
14911
|
-
var RawStateResultSchema = object({
|
|
14912
|
-
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
14913
|
-
source: string(),
|
|
14914
|
-
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
14915
|
-
data: record(string(), unknown())
|
|
14916
|
-
});
|
|
14917
|
-
method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
14918
|
-
deviceId: number(),
|
|
14919
|
-
values: record(string(), unknown())
|
|
14920
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
14921
|
-
deviceId: number(),
|
|
14922
|
-
action: string().min(1),
|
|
14923
|
-
input: unknown()
|
|
14924
|
-
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
14925
|
-
/**
|
|
14926
14955
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
14927
14956
|
* + auth surface in a vendor-neutral shape.
|
|
14928
14957
|
*
|
|
@@ -18605,6 +18634,12 @@ Object.freeze({
|
|
|
18605
18634
|
addonId: null,
|
|
18606
18635
|
access: "view"
|
|
18607
18636
|
},
|
|
18637
|
+
"metricsProvider.dumpHeapSnapshot": {
|
|
18638
|
+
capName: "metrics-provider",
|
|
18639
|
+
capScope: "system",
|
|
18640
|
+
addonId: null,
|
|
18641
|
+
access: "create"
|
|
18642
|
+
},
|
|
18608
18643
|
"metricsProvider.getAddonStats": {
|
|
18609
18644
|
capName: "metrics-provider",
|
|
18610
18645
|
capScope: "system",
|
|
@@ -52766,7 +52801,7 @@ var BrokerProbeCache = class {
|
|
|
52766
52801
|
try {
|
|
52767
52802
|
const brokers = this.getBrokers();
|
|
52768
52803
|
const liveIds = new Set(brokers.map((b) => b.id));
|
|
52769
|
-
for (const cachedId of
|
|
52804
|
+
for (const cachedId of Array.from(this.cache.keys())) if (!liveIds.has(cachedId)) this.cache.delete(cachedId);
|
|
52770
52805
|
await Promise.all(brokers.map(async (broker) => {
|
|
52771
52806
|
if (this.stopped) return;
|
|
52772
52807
|
try {
|