@camstack/addon-smtp-nodemailer 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/smtp.addon.js +717 -682
- package/dist/smtp.addon.mjs +717 -682
- package/package.json +1 -1
package/dist/smtp.addon.js
CHANGED
|
@@ -4665,63 +4665,7 @@ function _instanceof(cls, params = {}) {
|
|
|
4665
4665
|
return inst;
|
|
4666
4666
|
}
|
|
4667
4667
|
//#endregion
|
|
4668
|
-
//#region ../types/dist/
|
|
4669
|
-
/**
|
|
4670
|
-
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
4671
|
-
* every declared capability + widget of every installed plugin, on every
|
|
4672
|
-
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
4673
|
-
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
4674
|
-
*
|
|
4675
|
-
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
4676
|
-
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
4677
|
-
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
4678
|
-
*/
|
|
4679
|
-
/** What kind of target a probe addressed. */
|
|
4680
|
-
var wiringProbeKindSchema = _enum([
|
|
4681
|
-
"singleton",
|
|
4682
|
-
"device",
|
|
4683
|
-
"widget"
|
|
4684
|
-
]);
|
|
4685
|
-
/** Result of probing a single (cap|widget [, device]) target. */
|
|
4686
|
-
var wiringProbeResultSchema = object({
|
|
4687
|
-
capName: string(),
|
|
4688
|
-
kind: wiringProbeKindSchema,
|
|
4689
|
-
deviceId: number().optional(),
|
|
4690
|
-
reachable: boolean(),
|
|
4691
|
-
latencyMs: number(),
|
|
4692
|
-
error: string().optional()
|
|
4693
|
-
});
|
|
4694
|
-
/** Per-addon roll-up of cap + widget probe results. */
|
|
4695
|
-
var wiringAddonHealthSchema = object({
|
|
4696
|
-
addonId: string(),
|
|
4697
|
-
caps: array(wiringProbeResultSchema).readonly(),
|
|
4698
|
-
widgets: array(wiringProbeResultSchema).readonly()
|
|
4699
|
-
});
|
|
4700
|
-
/** Per-node roll-up. */
|
|
4701
|
-
var wiringNodeHealthSchema = object({
|
|
4702
|
-
nodeId: string(),
|
|
4703
|
-
addons: array(wiringAddonHealthSchema).readonly()
|
|
4704
|
-
});
|
|
4705
|
-
object({
|
|
4706
|
-
/** True only when every probed target is reachable. */
|
|
4707
|
-
ok: boolean(),
|
|
4708
|
-
/** True when at least one target is unreachable. */
|
|
4709
|
-
degraded: boolean(),
|
|
4710
|
-
checkedAt: string(),
|
|
4711
|
-
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
4712
|
-
summary: object({
|
|
4713
|
-
total: number(),
|
|
4714
|
-
reachable: number(),
|
|
4715
|
-
unreachable: number()
|
|
4716
|
-
})
|
|
4717
|
-
});
|
|
4718
|
-
var MODEL_FORMATS = [
|
|
4719
|
-
"onnx",
|
|
4720
|
-
"coreml",
|
|
4721
|
-
"openvino",
|
|
4722
|
-
"tflite",
|
|
4723
|
-
"pt"
|
|
4724
|
-
];
|
|
4668
|
+
//#region ../types/dist/sleep-B1dKJAMJ.mjs
|
|
4725
4669
|
var EventCategory = /* @__PURE__ */ function(EventCategory) {
|
|
4726
4670
|
EventCategory["SystemBoot"] = "system.boot";
|
|
4727
4671
|
EventCategory["SystemAddonsReady"] = "system.addons-ready";
|
|
@@ -5695,7 +5639,7 @@ var BaseAddon = class {
|
|
|
5695
5639
|
deviceSettingsSchema() {
|
|
5696
5640
|
return null;
|
|
5697
5641
|
}
|
|
5698
|
-
async getGlobalSettings(overlay, cap) {
|
|
5642
|
+
async getGlobalSettings(overlay, cap, _nodeId) {
|
|
5699
5643
|
const schema = this.globalSettingsSchema(cap);
|
|
5700
5644
|
if (!schema) return { sections: [] };
|
|
5701
5645
|
const raw = await this._ctx?.settings?.readAddonStore() ?? {};
|
|
@@ -5704,7 +5648,7 @@ var BaseAddon = class {
|
|
|
5704
5648
|
...overlay
|
|
5705
5649
|
} : raw);
|
|
5706
5650
|
}
|
|
5707
|
-
async updateGlobalSettings(patch) {
|
|
5651
|
+
async updateGlobalSettings(patch, _nodeId) {
|
|
5708
5652
|
await this._ctx?.settings?.writeAddonStore(patch);
|
|
5709
5653
|
await this.resolveConfig();
|
|
5710
5654
|
await this.onConfigChanged();
|
|
@@ -6044,7 +5988,7 @@ var ProfileSlotSchema = object({
|
|
|
6044
5988
|
* Zod schema for StreamSourceEntry — the canonical stream descriptor
|
|
6045
5989
|
* exposed by ICameraDevice.getStreamSources() and consumed by the broker.
|
|
6046
5990
|
*/
|
|
6047
|
-
var StreamSourceEntrySchema = object({
|
|
5991
|
+
var StreamSourceEntrySchema$1 = object({
|
|
6048
5992
|
id: string(),
|
|
6049
5993
|
label: string(),
|
|
6050
5994
|
protocol: _enum([
|
|
@@ -6266,121 +6210,583 @@ var ProfileRtspEntrySchema = object({
|
|
|
6266
6210
|
codec: string().optional(),
|
|
6267
6211
|
resolution: CamStreamResolutionSchema.optional()
|
|
6268
6212
|
});
|
|
6213
|
+
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6214
|
+
DeviceType["Camera"] = "camera";
|
|
6215
|
+
DeviceType["Hub"] = "hub";
|
|
6216
|
+
DeviceType["Light"] = "light";
|
|
6217
|
+
DeviceType["Siren"] = "siren";
|
|
6218
|
+
DeviceType["Switch"] = "switch";
|
|
6219
|
+
DeviceType["Sensor"] = "sensor";
|
|
6220
|
+
DeviceType["Thermostat"] = "thermostat";
|
|
6221
|
+
DeviceType["Button"] = "button";
|
|
6222
|
+
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6223
|
+
* event vocabulary verbatim (no normalization). Installed with the
|
|
6224
|
+
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6225
|
+
* HA bus events (e.g. `zha_event`, generic). */
|
|
6226
|
+
DeviceType["EventEmitter"] = "event-emitter";
|
|
6227
|
+
/** Firmware/software update entity — current vs available version,
|
|
6228
|
+
* updatable flag, update state, and an install action. Installed with
|
|
6229
|
+
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6230
|
+
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6231
|
+
DeviceType["Update"] = "update";
|
|
6232
|
+
DeviceType["Generic"] = "generic";
|
|
6233
|
+
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6234
|
+
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6235
|
+
* endpoint; the `notifier` cap defines the send surface. */
|
|
6236
|
+
DeviceType["Notifier"] = "notifier";
|
|
6237
|
+
/** Pre-recorded action sequence with optional parameters
|
|
6238
|
+
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6239
|
+
DeviceType["Script"] = "script";
|
|
6240
|
+
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6241
|
+
* trigger surface exposed via `automation-control` cap. */
|
|
6242
|
+
DeviceType["Automation"] = "automation";
|
|
6243
|
+
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6244
|
+
DeviceType["Lock"] = "lock";
|
|
6245
|
+
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6246
|
+
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6247
|
+
DeviceType["Cover"] = "cover";
|
|
6248
|
+
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6249
|
+
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6250
|
+
* modelled on the same open/closed lifecycle. */
|
|
6251
|
+
DeviceType["Valve"] = "valve";
|
|
6252
|
+
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6253
|
+
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6254
|
+
* modelled on the same target / mode lifecycle. */
|
|
6255
|
+
DeviceType["Humidifier"] = "humidifier";
|
|
6256
|
+
/** Water heater / boiler with target temperature + operation mode +
|
|
6257
|
+
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6258
|
+
* climate-family actuator. */
|
|
6259
|
+
DeviceType["WaterHeater"] = "water-heater";
|
|
6260
|
+
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6261
|
+
DeviceType["Fan"] = "fan";
|
|
6262
|
+
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6263
|
+
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6264
|
+
DeviceType["MediaPlayer"] = "media-player";
|
|
6265
|
+
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6266
|
+
* `alarm-panel` cap. */
|
|
6267
|
+
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6268
|
+
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6269
|
+
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6270
|
+
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6271
|
+
* TextControl / DateTimeControl. */
|
|
6272
|
+
DeviceType["Control"] = "control";
|
|
6273
|
+
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6274
|
+
* `presence` cap. */
|
|
6275
|
+
DeviceType["Presence"] = "presence";
|
|
6276
|
+
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6277
|
+
* `weather` cap. */
|
|
6278
|
+
DeviceType["Weather"] = "weather";
|
|
6279
|
+
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6280
|
+
DeviceType["Vacuum"] = "vacuum";
|
|
6281
|
+
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6282
|
+
* `lawn-mower-control` cap. */
|
|
6283
|
+
DeviceType["LawnMower"] = "lawn-mower";
|
|
6284
|
+
/** Physical HA device group — parent container for entity-children
|
|
6285
|
+
* adopted from a single HA device entry. Not renderable as a
|
|
6286
|
+
* standalone device; exists only to anchor child entities. */
|
|
6287
|
+
DeviceType["Container"] = "container";
|
|
6288
|
+
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6289
|
+
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6290
|
+
DeviceType["Image"] = "image";
|
|
6291
|
+
return DeviceType;
|
|
6292
|
+
}({});
|
|
6293
|
+
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6294
|
+
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6295
|
+
DeviceFeature["Rebootable"] = "rebootable";
|
|
6296
|
+
/**
|
|
6297
|
+
* Device supports an on-demand re-sync of its derived spec with its
|
|
6298
|
+
* upstream source — drives the generic Re-sync button. The owning
|
|
6299
|
+
* provider implements the action via the `device-adoption.resync` cap.
|
|
6300
|
+
*/
|
|
6301
|
+
DeviceFeature["Resyncable"] = "resyncable";
|
|
6302
|
+
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6303
|
+
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6304
|
+
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6305
|
+
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6306
|
+
/**
|
|
6307
|
+
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6308
|
+
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6309
|
+
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6310
|
+
* the autotrack toggle / settings card without re-deriving from
|
|
6311
|
+
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6312
|
+
* driver sets this feature when probe confirms the firmware
|
|
6313
|
+
* surface, and registers the cap in the same code path.
|
|
6314
|
+
*/
|
|
6315
|
+
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6316
|
+
/**
|
|
6317
|
+
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6318
|
+
* motion detection automatically activates this device. Mirrors
|
|
6319
|
+
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6320
|
+
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6321
|
+
*
|
|
6322
|
+
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6323
|
+
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6324
|
+
* filters that want "all devices with on-motion behaviour".
|
|
6325
|
+
*/
|
|
6326
|
+
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6327
|
+
/** Light supports rgb-triplet color via `color` cap. */
|
|
6328
|
+
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6329
|
+
/** Light supports HSV color via `color` cap. */
|
|
6330
|
+
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6331
|
+
/** Light supports color-temperature (mired) via `color` cap. */
|
|
6332
|
+
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
6333
|
+
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
6334
|
+
* targetHigh). Gates the range slider UI. */
|
|
6335
|
+
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
6336
|
+
/** Thermostat exposes target humidity and/or current humidity
|
|
6337
|
+
* readings. Gates the humidity controls. */
|
|
6338
|
+
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
6339
|
+
/** Thermostat exposes a fan-mode selector. */
|
|
6340
|
+
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
6341
|
+
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
6342
|
+
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
6343
|
+
/** Cover exposes intermediate position control (0..100). Gates the
|
|
6344
|
+
* position slider UI. */
|
|
6345
|
+
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
6346
|
+
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
6347
|
+
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
6348
|
+
/** Valve exposes intermediate position control (0..100). Gates the
|
|
6349
|
+
* position slider / drag surface UI. */
|
|
6350
|
+
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
6351
|
+
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
6352
|
+
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
6353
|
+
/** Fan exposes a preset mode selector. */
|
|
6354
|
+
DeviceFeature["FanPreset"] = "fan-preset";
|
|
6355
|
+
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
6356
|
+
* ceiling fans. */
|
|
6357
|
+
DeviceFeature["FanDirection"] = "fan-direction";
|
|
6358
|
+
/** Fan exposes an oscillation toggle. */
|
|
6359
|
+
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
6360
|
+
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
6361
|
+
* field on the UI lock-controls panel. */
|
|
6362
|
+
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
6363
|
+
/** Lock supports a latch-release ("open door") action distinct from
|
|
6364
|
+
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
6365
|
+
* `supported_features`. Gates the Open Door button in the UI. */
|
|
6366
|
+
DeviceFeature["LockOpen"] = "lock-open";
|
|
6367
|
+
/** Media player exposes a seek-to-position surface. */
|
|
6368
|
+
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
6369
|
+
/** Media player exposes a volume-level setter. */
|
|
6370
|
+
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
6371
|
+
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
6372
|
+
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
6373
|
+
/** Media player exposes a shuffle toggle. */
|
|
6374
|
+
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
6375
|
+
/** Media player exposes a repeat mode (off / all / one). */
|
|
6376
|
+
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
6377
|
+
/** Media player exposes a source / input selector. */
|
|
6378
|
+
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
6379
|
+
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
6380
|
+
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
6381
|
+
/** Media player exposes next-track. */
|
|
6382
|
+
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
6383
|
+
/** Media player exposes previous-track. */
|
|
6384
|
+
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
6385
|
+
/** Media player exposes stop distinct from pause. */
|
|
6386
|
+
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
6387
|
+
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
6388
|
+
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
6389
|
+
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
6390
|
+
* addition to a textual location. */
|
|
6391
|
+
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
6392
|
+
/** Notifier accepts an inline / URL image attachment. */
|
|
6393
|
+
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
6394
|
+
/** Notifier accepts a priority hint (high/normal/low). */
|
|
6395
|
+
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
6396
|
+
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
6397
|
+
* fields. */
|
|
6398
|
+
DeviceFeature["NotifierData"] = "notifier-data";
|
|
6399
|
+
/** Notifier supports interactive action buttons / callbacks. */
|
|
6400
|
+
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
6401
|
+
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
6402
|
+
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
6403
|
+
/** Script runner accepts a variables map on each run invocation. */
|
|
6404
|
+
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
6405
|
+
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
6406
|
+
* automation's actions while bypassing its condition block. */
|
|
6407
|
+
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
6408
|
+
return DeviceFeature;
|
|
6409
|
+
}({});
|
|
6269
6410
|
/**
|
|
6270
|
-
*
|
|
6271
|
-
*
|
|
6272
|
-
*
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
6277
|
-
kind: literal("timeOfDay"),
|
|
6278
|
-
start: string().regex(HHMM),
|
|
6279
|
-
end: string().regex(HHMM),
|
|
6280
|
-
/** Restrict to these weekdays; omit = every day. */
|
|
6281
|
-
days: array(RecordingWeekdaySchema).optional()
|
|
6282
|
-
})]);
|
|
6283
|
-
var RecordingModeSchema = _enum([
|
|
6284
|
-
"continuous",
|
|
6285
|
-
"onMotion",
|
|
6286
|
-
"onAudioThreshold"
|
|
6287
|
-
]);
|
|
6288
|
-
/**
|
|
6289
|
-
* First-class, authoritative per-camera storage mode — the netta choice the UI
|
|
6290
|
-
* reads directly (never inferred from `rules`):
|
|
6291
|
-
* - `off` — not recording.
|
|
6292
|
-
* - `events` — record only around triggers (motion / audio threshold),
|
|
6293
|
-
* with pre/post-buffer.
|
|
6294
|
-
* - `continuous` — record 24/7 within the schedule.
|
|
6411
|
+
* Semantic role a device plays within its parent. Populated by driver
|
|
6412
|
+
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
6413
|
+
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
6414
|
+
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
6415
|
+
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
6416
|
+
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
6295
6417
|
*
|
|
6296
|
-
*
|
|
6297
|
-
*
|
|
6418
|
+
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
6419
|
+
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
6298
6420
|
*/
|
|
6299
|
-
var
|
|
6300
|
-
"
|
|
6301
|
-
"
|
|
6302
|
-
"
|
|
6303
|
-
]
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6421
|
+
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
6422
|
+
DeviceRole["Siren"] = "siren";
|
|
6423
|
+
DeviceRole["Floodlight"] = "floodlight";
|
|
6424
|
+
DeviceRole["Spotlight"] = "spotlight";
|
|
6425
|
+
DeviceRole["PirSensor"] = "pir-sensor";
|
|
6426
|
+
DeviceRole["Chime"] = "chime";
|
|
6427
|
+
DeviceRole["Autotrack"] = "autotrack";
|
|
6428
|
+
DeviceRole["Nightvision"] = "nightvision";
|
|
6429
|
+
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
6430
|
+
DeviceRole["Doorbell"] = "doorbell";
|
|
6431
|
+
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
6432
|
+
* real Switch device for UI rendering / export adapters. */
|
|
6433
|
+
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
6434
|
+
/** Generic motion / occupancy / moving event source. Distinct from
|
|
6435
|
+
* the camera accessory PirSensor role: that one is a camera child;
|
|
6436
|
+
* this is a standalone HA / 3rd-party motion sensor. */
|
|
6437
|
+
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
6438
|
+
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
6439
|
+
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
6440
|
+
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
6441
|
+
DeviceRole["COSensor"] = "co-sensor";
|
|
6442
|
+
DeviceRole["GasSensor"] = "gas-sensor";
|
|
6443
|
+
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
6444
|
+
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
6445
|
+
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
6446
|
+
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
6447
|
+
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
6448
|
+
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
6449
|
+
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
6450
|
+
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
6451
|
+
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
6452
|
+
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
6453
|
+
DeviceRole["PowerSensor"] = "power-sensor";
|
|
6454
|
+
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
6455
|
+
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
6456
|
+
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
6457
|
+
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
6458
|
+
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
6459
|
+
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
6460
|
+
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
6461
|
+
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
6462
|
+
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
6463
|
+
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
6464
|
+
* `attributes.options`). */
|
|
6465
|
+
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
6466
|
+
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
6467
|
+
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
6468
|
+
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
6469
|
+
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
6470
|
+
/** Last-resort fallback when nothing else matches. */
|
|
6471
|
+
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
6472
|
+
DeviceRole["NumericControl"] = "numeric-control";
|
|
6473
|
+
DeviceRole["SelectControl"] = "select-control";
|
|
6474
|
+
DeviceRole["TextControl"] = "text-control";
|
|
6475
|
+
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
6476
|
+
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
6477
|
+
* rich features (image, priority, channel routing). */
|
|
6478
|
+
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
6479
|
+
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
6480
|
+
* `notify.discord_*`, etc.). */
|
|
6481
|
+
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
6482
|
+
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
6483
|
+
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
6484
|
+
/** Fallback when the notifier service name doesn't match a known
|
|
6485
|
+
* pattern. */
|
|
6486
|
+
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
6487
|
+
return DeviceRole;
|
|
6488
|
+
}({});
|
|
6309
6489
|
/**
|
|
6310
|
-
*
|
|
6490
|
+
* Generic types for capability definitions.
|
|
6311
6491
|
*
|
|
6312
|
-
*
|
|
6313
|
-
*
|
|
6314
|
-
* covering band, not by a band value.
|
|
6315
|
-
*/
|
|
6316
|
-
var RecordingBandModeSchema = _enum(["continuous", "events"]);
|
|
6317
|
-
/**
|
|
6318
|
-
* Triggers for an `events`-mode band. Identical shape to
|
|
6319
|
-
* `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
|
|
6320
|
-
* two never drift.
|
|
6321
|
-
*/
|
|
6322
|
-
var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
6323
|
-
/**
|
|
6324
|
-
* A single mode-per-band window — the canonical recorder band shape, the
|
|
6325
|
-
* single source of truth re-used by `addon-pipeline/recorder`.
|
|
6492
|
+
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
6493
|
+
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
6326
6494
|
*
|
|
6327
|
-
*
|
|
6328
|
-
*
|
|
6329
|
-
*
|
|
6495
|
+
* Pattern:
|
|
6496
|
+
* 1. Define Zod schemas for data, methods, settings
|
|
6497
|
+
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
6498
|
+
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
6499
|
+
* 4. Addon implements IProvider
|
|
6500
|
+
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
6330
6501
|
*/
|
|
6331
|
-
var RecordingBandSchema = object({
|
|
6332
|
-
days: array(RecordingWeekdaySchema),
|
|
6333
|
-
start: string().regex(HHMM),
|
|
6334
|
-
end: string().regex(HHMM),
|
|
6335
|
-
mode: RecordingBandModeSchema,
|
|
6336
|
-
triggers: RecordingBandTriggersSchema.optional(),
|
|
6337
|
-
preBufferSec: number().min(0).optional(),
|
|
6338
|
-
postBufferSec: number().min(0).optional()
|
|
6339
|
-
});
|
|
6340
|
-
var RecordingRuleSchema = object({
|
|
6341
|
-
schedule: RecordingScheduleSchema,
|
|
6342
|
-
mode: RecordingModeSchema,
|
|
6343
|
-
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
6344
|
-
preBufferSec: number().min(0).default(0),
|
|
6345
|
-
/** Keep recording until this many seconds after the last trigger. */
|
|
6346
|
-
postBufferSec: number().min(0).default(0),
|
|
6347
|
-
/** Each new trigger restarts the post-buffer window. */
|
|
6348
|
-
resetTimeoutOnNewEvent: boolean().default(true),
|
|
6349
|
-
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
6350
|
-
thresholdDbfs: number().optional()
|
|
6351
|
-
});
|
|
6352
6502
|
/**
|
|
6353
|
-
*
|
|
6354
|
-
*
|
|
6355
|
-
*
|
|
6356
|
-
*
|
|
6357
|
-
*
|
|
6358
|
-
*
|
|
6503
|
+
* Output schema shared by the contribution + live methods.
|
|
6504
|
+
*
|
|
6505
|
+
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
6506
|
+
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
6507
|
+
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
6508
|
+
* (using `z.unknown()` here collapses unrelated router branches to
|
|
6509
|
+
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
6510
|
+
*
|
|
6511
|
+
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
6512
|
+
* extensions the caller adds (showWhen, displayScale, …) without
|
|
6513
|
+
* rebuilding every time a new field kind is introduced.
|
|
6359
6514
|
*/
|
|
6360
|
-
var
|
|
6361
|
-
|
|
6362
|
-
|
|
6515
|
+
var ContributionSectionSchema = object({
|
|
6516
|
+
id: string(),
|
|
6517
|
+
title: string(),
|
|
6518
|
+
description: string().optional(),
|
|
6519
|
+
style: _enum(["card", "accordion"]).optional(),
|
|
6520
|
+
defaultCollapsed: boolean().optional(),
|
|
6521
|
+
columns: union([
|
|
6522
|
+
literal(1),
|
|
6523
|
+
literal(2),
|
|
6524
|
+
literal(3),
|
|
6525
|
+
literal(4)
|
|
6526
|
+
]).optional(),
|
|
6527
|
+
tab: string().optional(),
|
|
6528
|
+
location: _enum(["settings", "top-tab"]).optional(),
|
|
6529
|
+
order: number().optional(),
|
|
6530
|
+
fields: array(any())
|
|
6363
6531
|
});
|
|
6532
|
+
object({
|
|
6533
|
+
tabs: array(object({
|
|
6534
|
+
id: string(),
|
|
6535
|
+
label: string(),
|
|
6536
|
+
icon: string(),
|
|
6537
|
+
order: number().optional()
|
|
6538
|
+
})).optional(),
|
|
6539
|
+
sections: array(ContributionSectionSchema)
|
|
6540
|
+
}).nullable();
|
|
6541
|
+
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
6542
|
+
deviceId: number(),
|
|
6543
|
+
patch: record(string(), unknown())
|
|
6544
|
+
}), object({ success: literal(true) });
|
|
6545
|
+
object({ deviceId: number() }), unknown().nullable();
|
|
6546
|
+
/** Shorthand to define a method schema */
|
|
6547
|
+
function method(input, output, options) {
|
|
6548
|
+
return {
|
|
6549
|
+
input,
|
|
6550
|
+
output,
|
|
6551
|
+
kind: options?.kind ?? "query",
|
|
6552
|
+
auth: options?.auth ?? "protected",
|
|
6553
|
+
...options?.access !== void 0 ? { access: options.access } : {},
|
|
6554
|
+
timeoutMs: options?.timeoutMs
|
|
6555
|
+
};
|
|
6556
|
+
}
|
|
6557
|
+
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
6558
|
+
var VersionOutputSchema = object({ version: string() });
|
|
6559
|
+
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
6364
6560
|
/**
|
|
6365
|
-
*
|
|
6561
|
+
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
6562
|
+
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
6366
6563
|
*
|
|
6367
|
-
*
|
|
6368
|
-
*
|
|
6369
|
-
*
|
|
6370
|
-
*
|
|
6564
|
+
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
6565
|
+
* provider for this cap (per device) backed by its local
|
|
6566
|
+
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
6567
|
+
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
6568
|
+
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
6569
|
+
* so there's no parallel bridge path anymore.
|
|
6570
|
+
*
|
|
6571
|
+
* The surface is intentionally small — every method corresponds to a
|
|
6572
|
+
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
6573
|
+
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
6574
|
+
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
6575
|
+
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
6371
6576
|
*/
|
|
6372
|
-
var
|
|
6373
|
-
|
|
6374
|
-
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6577
|
+
var StreamSourceEntrySchema = object({
|
|
6578
|
+
id: string(),
|
|
6579
|
+
label: string(),
|
|
6580
|
+
protocol: _enum([
|
|
6581
|
+
"rtsp",
|
|
6582
|
+
"rtmp",
|
|
6583
|
+
"annexb",
|
|
6584
|
+
"http-mjpeg",
|
|
6585
|
+
"webrtc",
|
|
6586
|
+
"custom"
|
|
6587
|
+
]),
|
|
6588
|
+
url: string().optional(),
|
|
6589
|
+
resolution: object({
|
|
6590
|
+
width: number(),
|
|
6591
|
+
height: number()
|
|
6592
|
+
}).optional(),
|
|
6593
|
+
fps: number().optional(),
|
|
6594
|
+
bitrate: number().optional(),
|
|
6595
|
+
codec: string().optional(),
|
|
6596
|
+
profileHint: CamProfileSchema.optional(),
|
|
6597
|
+
sdp: string().optional()
|
|
6598
|
+
});
|
|
6599
|
+
var ConfigEntrySchema$1 = object({
|
|
6600
|
+
key: string(),
|
|
6601
|
+
value: unknown()
|
|
6602
|
+
});
|
|
6603
|
+
var RawStateResultSchema = object({
|
|
6604
|
+
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
6605
|
+
source: string(),
|
|
6606
|
+
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
6607
|
+
data: record(string(), unknown())
|
|
6608
|
+
});
|
|
6609
|
+
method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
6610
|
+
deviceId: number(),
|
|
6611
|
+
values: record(string(), unknown())
|
|
6612
|
+
}), _void(), { kind: "mutation" }), method(object({
|
|
6613
|
+
deviceId: number(),
|
|
6614
|
+
action: string().min(1),
|
|
6615
|
+
input: unknown()
|
|
6616
|
+
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
6617
|
+
//#endregion
|
|
6618
|
+
//#region ../types/dist/index.mjs
|
|
6619
|
+
/**
|
|
6620
|
+
* Deep wiring healthcheck — snapshot of active reachability probes across
|
|
6621
|
+
* every declared capability + widget of every installed plugin, on every
|
|
6622
|
+
* node. Produced by the backend `WiringHealthService` and surfaced via
|
|
6623
|
+
* `GET /health/wiring`, the tRPC `health.wiring` query, and the boot-gate.
|
|
6624
|
+
*
|
|
6625
|
+
* Unlike `/health` (process liveness), this reflects whether each cap/widget
|
|
6626
|
+
* is actually *reachable* over the real cap-dispatch path. See spec
|
|
6627
|
+
* `docs/superpowers/specs/2026-05-23-deep-healthcheck-design.md`.
|
|
6628
|
+
*/
|
|
6629
|
+
/** What kind of target a probe addressed. */
|
|
6630
|
+
var wiringProbeKindSchema = _enum([
|
|
6631
|
+
"singleton",
|
|
6632
|
+
"device",
|
|
6633
|
+
"widget"
|
|
6634
|
+
]);
|
|
6635
|
+
/** Result of probing a single (cap|widget [, device]) target. */
|
|
6636
|
+
var wiringProbeResultSchema = object({
|
|
6637
|
+
capName: string(),
|
|
6638
|
+
kind: wiringProbeKindSchema,
|
|
6639
|
+
deviceId: number().optional(),
|
|
6640
|
+
reachable: boolean(),
|
|
6641
|
+
latencyMs: number(),
|
|
6642
|
+
error: string().optional()
|
|
6643
|
+
});
|
|
6644
|
+
/** Per-addon roll-up of cap + widget probe results. */
|
|
6645
|
+
var wiringAddonHealthSchema = object({
|
|
6646
|
+
addonId: string(),
|
|
6647
|
+
caps: array(wiringProbeResultSchema).readonly(),
|
|
6648
|
+
widgets: array(wiringProbeResultSchema).readonly()
|
|
6649
|
+
});
|
|
6650
|
+
/** Per-node roll-up. */
|
|
6651
|
+
var wiringNodeHealthSchema = object({
|
|
6652
|
+
nodeId: string(),
|
|
6653
|
+
addons: array(wiringAddonHealthSchema).readonly()
|
|
6654
|
+
});
|
|
6655
|
+
object({
|
|
6656
|
+
/** True only when every probed target is reachable. */
|
|
6657
|
+
ok: boolean(),
|
|
6658
|
+
/** True when at least one target is unreachable. */
|
|
6659
|
+
degraded: boolean(),
|
|
6660
|
+
checkedAt: string(),
|
|
6661
|
+
nodes: array(wiringNodeHealthSchema).readonly(),
|
|
6662
|
+
summary: object({
|
|
6663
|
+
total: number(),
|
|
6664
|
+
reachable: number(),
|
|
6665
|
+
unreachable: number()
|
|
6666
|
+
})
|
|
6667
|
+
});
|
|
6668
|
+
var MODEL_FORMATS = [
|
|
6669
|
+
"onnx",
|
|
6670
|
+
"coreml",
|
|
6671
|
+
"openvino",
|
|
6672
|
+
"tflite",
|
|
6673
|
+
"pt"
|
|
6674
|
+
];
|
|
6675
|
+
/**
|
|
6676
|
+
* Numeric day-of-week: 0 = Sunday … 6 = Saturday (matches `Date.getDay`).
|
|
6677
|
+
* Named `RecordingWeekday` to avoid collision with the string-union
|
|
6678
|
+
* `Weekday` exported from `interfaces/timezones.ts`.
|
|
6679
|
+
*/
|
|
6680
|
+
var RecordingWeekdaySchema = number().int().min(0).max(6);
|
|
6681
|
+
var HHMM = /^([01]\d|2[0-3]):[0-5]\d$/;
|
|
6682
|
+
var RecordingScheduleSchema = discriminatedUnion("kind", [object({ kind: literal("always") }), object({
|
|
6683
|
+
kind: literal("timeOfDay"),
|
|
6684
|
+
start: string().regex(HHMM),
|
|
6685
|
+
end: string().regex(HHMM),
|
|
6686
|
+
/** Restrict to these weekdays; omit = every day. */
|
|
6687
|
+
days: array(RecordingWeekdaySchema).optional()
|
|
6688
|
+
})]);
|
|
6689
|
+
var RecordingModeSchema = _enum([
|
|
6690
|
+
"continuous",
|
|
6691
|
+
"onMotion",
|
|
6692
|
+
"onAudioThreshold"
|
|
6693
|
+
]);
|
|
6694
|
+
/**
|
|
6695
|
+
* First-class, authoritative per-camera storage mode — the netta choice the UI
|
|
6696
|
+
* reads directly (never inferred from `rules`):
|
|
6697
|
+
* - `off` — not recording.
|
|
6698
|
+
* - `events` — record only around triggers (motion / audio threshold),
|
|
6699
|
+
* with pre/post-buffer.
|
|
6700
|
+
* - `continuous` — record 24/7 within the schedule.
|
|
6701
|
+
*
|
|
6702
|
+
* `mode` compiles one-way to the internal `rules[]` consumed by the policy
|
|
6703
|
+
* engine (see `compileRules`); `rules[]` is never authored directly anymore.
|
|
6704
|
+
*/
|
|
6705
|
+
var RecordingStorageModeSchema = _enum([
|
|
6706
|
+
"off",
|
|
6707
|
+
"events",
|
|
6708
|
+
"continuous"
|
|
6709
|
+
]);
|
|
6710
|
+
/** Which detectors trigger an `events`-mode recording. */
|
|
6711
|
+
var RecordingTriggersSchema = object({
|
|
6712
|
+
motion: boolean().optional(),
|
|
6713
|
+
audioThresholdDbfs: number().optional()
|
|
6714
|
+
});
|
|
6715
|
+
/**
|
|
6716
|
+
* Mode of a single recording band — the recorder per-band vocabulary.
|
|
6717
|
+
*
|
|
6718
|
+
* Distinct from `RecordingStorageModeSchema` (which carries `off`): a band is
|
|
6719
|
+
* only ever `continuous` or `events`; "off" is expressed by the absence of a
|
|
6720
|
+
* covering band, not by a band value.
|
|
6721
|
+
*/
|
|
6722
|
+
var RecordingBandModeSchema = _enum(["continuous", "events"]);
|
|
6723
|
+
/**
|
|
6724
|
+
* Triggers for an `events`-mode band. Identical shape to
|
|
6725
|
+
* `RecordingTriggersSchema` — reuse that schema as the band trigger type so the
|
|
6726
|
+
* two never drift.
|
|
6727
|
+
*/
|
|
6728
|
+
var RecordingBandTriggersSchema = RecordingTriggersSchema;
|
|
6729
|
+
/**
|
|
6730
|
+
* A single mode-per-band window — the canonical recorder band shape, the
|
|
6731
|
+
* single source of truth re-used by `addon-pipeline/recorder`.
|
|
6732
|
+
*
|
|
6733
|
+
* `days` lists the weekdays the band covers (empty = every day, matching the
|
|
6734
|
+
* band engine's `applies` rule). `start`/`end` are `HH:MM`; an `end <= start`
|
|
6735
|
+
* span wraps past midnight (handled by the band engine).
|
|
6736
|
+
*/
|
|
6737
|
+
var RecordingBandSchema = object({
|
|
6738
|
+
days: array(RecordingWeekdaySchema),
|
|
6739
|
+
start: string().regex(HHMM),
|
|
6740
|
+
end: string().regex(HHMM),
|
|
6741
|
+
mode: RecordingBandModeSchema,
|
|
6742
|
+
triggers: RecordingBandTriggersSchema.optional(),
|
|
6743
|
+
preBufferSec: number().min(0).optional(),
|
|
6744
|
+
postBufferSec: number().min(0).optional()
|
|
6745
|
+
});
|
|
6746
|
+
var RecordingRuleSchema = object({
|
|
6747
|
+
schedule: RecordingScheduleSchema,
|
|
6748
|
+
mode: RecordingModeSchema,
|
|
6749
|
+
/** Seconds of footage to retain BEFORE a trigger (applied at keep/discard). */
|
|
6750
|
+
preBufferSec: number().min(0).default(0),
|
|
6751
|
+
/** Keep recording until this many seconds after the last trigger. */
|
|
6752
|
+
postBufferSec: number().min(0).default(0),
|
|
6753
|
+
/** Each new trigger restarts the post-buffer window. */
|
|
6754
|
+
resetTimeoutOnNewEvent: boolean().default(true),
|
|
6755
|
+
/** onAudioThreshold only — dBFS level that counts as a trigger. */
|
|
6756
|
+
thresholdDbfs: number().optional()
|
|
6757
|
+
});
|
|
6758
|
+
/**
|
|
6759
|
+
* Per-device retention overrides. Every field is optional; an unset or `0`
|
|
6760
|
+
* value inherits the node-wide recorder default. Only footage-lifetime limits
|
|
6761
|
+
* live per-camera: `maxAgeDays` and `maxSizeGb`. The disk-occupancy threshold
|
|
6762
|
+
* (when the volume is too full to keep recording) is NOT a per-camera concern —
|
|
6763
|
+
* it belongs to the StorageLocation (`StorageLocation.config.minFreePercent`),
|
|
6764
|
+
* shared by every camera writing to that volume.
|
|
6765
|
+
*/
|
|
6766
|
+
var RecordingRetentionSchema = object({
|
|
6767
|
+
maxAgeDays: number().min(0).optional(),
|
|
6768
|
+
maxSizeGb: number().min(0).optional()
|
|
6769
|
+
});
|
|
6770
|
+
/**
|
|
6771
|
+
* The full per-camera recording intent — the wire shape of a RecordingTarget.
|
|
6772
|
+
*
|
|
6773
|
+
* `mode` is the authoritative storage choice; `schedule`/`triggers`/`pre`/`post`
|
|
6774
|
+
* are its mode-specific parameters. `rules` is a DEPRECATED authoring input kept
|
|
6775
|
+
* only for transition + migration (`migrateRulesToMode`); the policy engine
|
|
6776
|
+
* consumes the compiled output of `compileRules(config)`, never `rules` directly.
|
|
6777
|
+
*/
|
|
6778
|
+
var RecordingConfigSchema = object({
|
|
6779
|
+
enabled: boolean(),
|
|
6780
|
+
/** Authoritative storage mode. Absent on legacy targets → derived once via
|
|
6781
|
+
* `migrateRulesToMode`, then persisted. */
|
|
6782
|
+
mode: RecordingStorageModeSchema.optional(),
|
|
6783
|
+
profiles: array(CamProfileSchema).optional(),
|
|
6784
|
+
segmentSeconds: number().int().positive().optional(),
|
|
6785
|
+
/** Shared recording time-bands for `events` & `continuous` — record only when
|
|
6786
|
+
* the wall-clock falls inside one of these windows. Omit or empty = always.
|
|
6787
|
+
* `continuous` compiles to one rule per band; `events` to band × trigger. */
|
|
6788
|
+
schedules: array(RecordingScheduleSchema).optional(),
|
|
6789
|
+
/** Legacy single-band predecessor of `schedules`. Read-compat only — it is
|
|
6384
6790
|
* normalized into `schedules` on read and never written going forward. (Not
|
|
6385
6791
|
* tagged `@deprecated`: the normalization paths must read it cast-free.) */
|
|
6386
6792
|
schedule: RecordingScheduleSchema.optional(),
|
|
@@ -6764,396 +7170,120 @@ var YAMNET_TO_MACRO = {
|
|
|
6764
7170
|
"Hubbub, speech noise, speech babble": "crowd",
|
|
6765
7171
|
Telephone: "telephone",
|
|
6766
7172
|
"Telephone bell ringing": "telephone",
|
|
6767
|
-
Ringtone: "telephone",
|
|
6768
|
-
"Telephone dialing, DTMF": "telephone",
|
|
6769
|
-
"Busy signal": "telephone",
|
|
6770
|
-
Engine: "engine",
|
|
6771
|
-
"Engine starting": "engine",
|
|
6772
|
-
Idling: "engine",
|
|
6773
|
-
"Accelerating, revving, vroom": "engine",
|
|
6774
|
-
"Light engine (high frequency)": "engine",
|
|
6775
|
-
"Medium engine (mid frequency)": "engine",
|
|
6776
|
-
"Heavy engine (low frequency)": "engine",
|
|
6777
|
-
"Lawn mower": "engine",
|
|
6778
|
-
Chainsaw: "engine",
|
|
6779
|
-
Hammer: "tools",
|
|
6780
|
-
Jackhammer: "tools",
|
|
6781
|
-
Sawing: "tools",
|
|
6782
|
-
"Power tool": "tools",
|
|
6783
|
-
Drill: "tools",
|
|
6784
|
-
Sanding: "tools",
|
|
6785
|
-
Silence: "silence"
|
|
6786
|
-
},
|
|
6787
|
-
preserveOriginal: false
|
|
6788
|
-
};
|
|
6789
|
-
var APPLE_SA_TO_MACRO = {
|
|
6790
|
-
mapping: {
|
|
6791
|
-
speech: "speech",
|
|
6792
|
-
child_speech: "speech",
|
|
6793
|
-
conversation: "speech",
|
|
6794
|
-
whispering: "speech",
|
|
6795
|
-
singing: "speech",
|
|
6796
|
-
humming: "speech",
|
|
6797
|
-
shout: "scream",
|
|
6798
|
-
yell: "scream",
|
|
6799
|
-
screaming: "scream",
|
|
6800
|
-
crying: "crying",
|
|
6801
|
-
baby_crying: "crying",
|
|
6802
|
-
sobbing: "crying",
|
|
6803
|
-
laughter: "laughter",
|
|
6804
|
-
baby_laughter: "laughter",
|
|
6805
|
-
giggling: "laughter",
|
|
6806
|
-
music: "music",
|
|
6807
|
-
guitar: "music",
|
|
6808
|
-
piano: "music",
|
|
6809
|
-
drums: "music",
|
|
6810
|
-
dog_bark: "dog",
|
|
6811
|
-
dog_bow_wow: "dog",
|
|
6812
|
-
dog_growling: "dog",
|
|
6813
|
-
dog_howl: "dog",
|
|
6814
|
-
cat_meow: "cat",
|
|
6815
|
-
cat_purr: "cat",
|
|
6816
|
-
cat_hiss: "cat",
|
|
6817
|
-
bird: "bird",
|
|
6818
|
-
bird_chirp: "bird",
|
|
6819
|
-
bird_squawk: "bird",
|
|
6820
|
-
animal: "animal",
|
|
6821
|
-
horse: "animal",
|
|
6822
|
-
cow_moo: "animal",
|
|
6823
|
-
insect: "animal",
|
|
6824
|
-
alarm: "alarm",
|
|
6825
|
-
smoke_alarm: "alarm",
|
|
6826
|
-
fire_alarm: "alarm",
|
|
6827
|
-
car_alarm: "alarm",
|
|
6828
|
-
siren: "siren",
|
|
6829
|
-
police_siren: "siren",
|
|
6830
|
-
ambulance_siren: "siren",
|
|
6831
|
-
doorbell: "doorbell",
|
|
6832
|
-
door_knock: "doorbell",
|
|
6833
|
-
knocking: "doorbell",
|
|
6834
|
-
glass_breaking: "glass_breaking",
|
|
6835
|
-
glass_shatter: "glass_breaking",
|
|
6836
|
-
gunshot: "gunshot",
|
|
6837
|
-
explosion: "gunshot",
|
|
6838
|
-
fireworks: "gunshot",
|
|
6839
|
-
car: "vehicle",
|
|
6840
|
-
truck: "vehicle",
|
|
6841
|
-
motorcycle: "vehicle",
|
|
6842
|
-
car_horn: "vehicle",
|
|
6843
|
-
vehicle_horn: "vehicle",
|
|
6844
|
-
traffic: "vehicle",
|
|
6845
|
-
fire: "fire",
|
|
6846
|
-
fire_crackle: "fire",
|
|
6847
|
-
water: "water",
|
|
6848
|
-
rain: "water",
|
|
6849
|
-
ocean: "water",
|
|
6850
|
-
splash: "water",
|
|
6851
|
-
wind: "wind",
|
|
6852
|
-
thunder: "wind",
|
|
6853
|
-
thunderstorm: "wind",
|
|
6854
|
-
door: "door",
|
|
6855
|
-
door_slam: "door",
|
|
6856
|
-
sliding_door: "door",
|
|
6857
|
-
footsteps: "footsteps",
|
|
6858
|
-
walking: "footsteps",
|
|
6859
|
-
running: "footsteps",
|
|
6860
|
-
crowd: "crowd",
|
|
6861
|
-
chatter: "crowd",
|
|
6862
|
-
cheering: "crowd",
|
|
6863
|
-
applause: "crowd",
|
|
6864
|
-
telephone_ring: "telephone",
|
|
6865
|
-
ringtone: "telephone",
|
|
6866
|
-
engine: "engine",
|
|
6867
|
-
engine_starting: "engine",
|
|
6868
|
-
lawn_mower: "engine",
|
|
6869
|
-
chainsaw: "engine",
|
|
6870
|
-
hammer: "tools",
|
|
6871
|
-
jackhammer: "tools",
|
|
6872
|
-
drill: "tools",
|
|
6873
|
-
power_tool: "tools",
|
|
6874
|
-
silence: "silence"
|
|
6875
|
-
},
|
|
6876
|
-
preserveOriginal: false
|
|
6877
|
-
};
|
|
6878
|
-
var _macroLookup = /* @__PURE__ */ new Map();
|
|
6879
|
-
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6880
|
-
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
6881
|
-
var DeviceType = /* @__PURE__ */ function(DeviceType) {
|
|
6882
|
-
DeviceType["Camera"] = "camera";
|
|
6883
|
-
DeviceType["Hub"] = "hub";
|
|
6884
|
-
DeviceType["Light"] = "light";
|
|
6885
|
-
DeviceType["Siren"] = "siren";
|
|
6886
|
-
DeviceType["Switch"] = "switch";
|
|
6887
|
-
DeviceType["Sensor"] = "sensor";
|
|
6888
|
-
DeviceType["Thermostat"] = "thermostat";
|
|
6889
|
-
DeviceType["Button"] = "button";
|
|
6890
|
-
/** Generic stateless event emitter — carries a device's EXACT declared
|
|
6891
|
-
* event vocabulary verbatim (no normalization). Installed with the
|
|
6892
|
-
* `event-emitter` cap. Sources: HA `event.*` entities (structured) and
|
|
6893
|
-
* HA bus events (e.g. `zha_event`, generic). */
|
|
6894
|
-
DeviceType["EventEmitter"] = "event-emitter";
|
|
6895
|
-
/** Firmware/software update entity — current vs available version,
|
|
6896
|
-
* updatable flag, update state, and an install action. Installed with
|
|
6897
|
-
* the `update` cap. Sources: Homematic firmware-update channels (and
|
|
6898
|
-
* reusable by other providers, e.g. HA `update.*` entities). */
|
|
6899
|
-
DeviceType["Update"] = "update";
|
|
6900
|
-
DeviceType["Generic"] = "generic";
|
|
6901
|
-
/** Generic notification delivery target (HA `notify.<service>`, future
|
|
6902
|
-
* Telegram / Discord / ntfy / SMTP, …). One device per delivery
|
|
6903
|
-
* endpoint; the `notifier` cap defines the send surface. */
|
|
6904
|
-
DeviceType["Notifier"] = "notifier";
|
|
6905
|
-
/** Pre-recorded action sequence with optional parameters
|
|
6906
|
-
* (HA `script.*`). Runnable via `script-runner` cap. */
|
|
6907
|
-
DeviceType["Script"] = "script";
|
|
6908
|
-
/** Automation rule (HA `automation.*`) — enable/disable + manual
|
|
6909
|
-
* trigger surface exposed via `automation-control` cap. */
|
|
6910
|
-
DeviceType["Automation"] = "automation";
|
|
6911
|
-
/** Door / smart lock device (HA `lock.*`). `lock-control` cap. */
|
|
6912
|
-
DeviceType["Lock"] = "lock";
|
|
6913
|
-
/** Window covering, blinds, garage door, valve, etc. (HA `cover.*`,
|
|
6914
|
-
* `valve.*`). `cover` cap with sub-roles for variant. */
|
|
6915
|
-
DeviceType["Cover"] = "cover";
|
|
6916
|
-
/** Pipe / water / gas valve with open/close/stop and optional
|
|
6917
|
-
* position (HA `valve.*`). `valve` cap — a cover-sibling actuator
|
|
6918
|
-
* modelled on the same open/closed lifecycle. */
|
|
6919
|
-
DeviceType["Valve"] = "valve";
|
|
6920
|
-
/** Humidifier / dehumidifier with on/off + target humidity + mode
|
|
6921
|
-
* (HA `humidifier.*`). `humidifier` cap — a climate-family actuator
|
|
6922
|
-
* modelled on the same target / mode lifecycle. */
|
|
6923
|
-
DeviceType["Humidifier"] = "humidifier";
|
|
6924
|
-
/** Water heater / boiler with target temperature + operation mode +
|
|
6925
|
-
* away mode (HA `water_heater.*`). `water-heater` cap — a
|
|
6926
|
-
* climate-family actuator. */
|
|
6927
|
-
DeviceType["WaterHeater"] = "water-heater";
|
|
6928
|
-
/** Ceiling / standing / exhaust fan (HA `fan.*`). `fan-control` cap. */
|
|
6929
|
-
DeviceType["Fan"] = "fan";
|
|
6930
|
-
/** Audio / video playback endpoint (HA `media_player.*`). Disjoint from
|
|
6931
|
-
* the camera surface — those use `Camera`. `media-player` cap. */
|
|
6932
|
-
DeviceType["MediaPlayer"] = "media-player";
|
|
6933
|
-
/** Security panel / alarm system (HA `alarm_control_panel.*`).
|
|
6934
|
-
* `alarm-panel` cap. */
|
|
6935
|
-
DeviceType["AlarmPanel"] = "alarm-panel";
|
|
6936
|
-
/** Generic user-settable input (HA `number` / `input_number` / `select`
|
|
6937
|
-
* / `input_select` / `text` / `input_text` / `input_datetime`).
|
|
6938
|
-
* Sub-type via `DeviceRole`: NumericControl / SelectControl /
|
|
6939
|
-
* TextControl / DateTimeControl. */
|
|
6940
|
-
DeviceType["Control"] = "control";
|
|
6941
|
-
/** Person / device-tracker presence (HA `person.*`, `device_tracker.*`).
|
|
6942
|
-
* `presence` cap. */
|
|
6943
|
-
DeviceType["Presence"] = "presence";
|
|
6944
|
-
/** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
|
|
6945
|
-
* `weather` cap. */
|
|
6946
|
-
DeviceType["Weather"] = "weather";
|
|
6947
|
-
/** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
|
|
6948
|
-
DeviceType["Vacuum"] = "vacuum";
|
|
6949
|
-
/** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
|
|
6950
|
-
* `lawn-mower-control` cap. */
|
|
6951
|
-
DeviceType["LawnMower"] = "lawn-mower";
|
|
6952
|
-
/** Physical HA device group — parent container for entity-children
|
|
6953
|
-
* adopted from a single HA device entry. Not renderable as a
|
|
6954
|
-
* standalone device; exists only to anchor child entities. */
|
|
6955
|
-
DeviceType["Container"] = "container";
|
|
6956
|
-
/** Single still-image entity (HA `image.*`). Read-only display of an
|
|
6957
|
-
* `entity_picture` signed URL the browser loads directly. `image` cap. */
|
|
6958
|
-
DeviceType["Image"] = "image";
|
|
6959
|
-
return DeviceType;
|
|
6960
|
-
}({});
|
|
6961
|
-
var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
|
|
6962
|
-
DeviceFeature["BatteryOperated"] = "battery-operated";
|
|
6963
|
-
DeviceFeature["Rebootable"] = "rebootable";
|
|
6964
|
-
/**
|
|
6965
|
-
* Device supports an on-demand re-sync of its derived spec with its
|
|
6966
|
-
* upstream source — drives the generic Re-sync button. The owning
|
|
6967
|
-
* provider implements the action via the `device-adoption.resync` cap.
|
|
6968
|
-
*/
|
|
6969
|
-
DeviceFeature["Resyncable"] = "resyncable";
|
|
6970
|
-
DeviceFeature["NativeSnapshot"] = "native-snapshot";
|
|
6971
|
-
DeviceFeature["DoorbellButton"] = "doorbell-button";
|
|
6972
|
-
DeviceFeature["TwoWayAudio"] = "two-way-audio";
|
|
6973
|
-
DeviceFeature["PanTiltZoom"] = "pan-tilt-zoom";
|
|
6974
|
-
/**
|
|
6975
|
-
* Camera supports the on-firmware autotrack subsystem (subject-
|
|
6976
|
-
* following). Distinct from `PanTiltZoom` because not every PTZ
|
|
6977
|
-
* camera ships autotrack — the admin UI uses this flag to gate
|
|
6978
|
-
* the autotrack toggle / settings card without re-deriving from
|
|
6979
|
-
* the cap registry. Mirrors `ptz-autotrack` cap registration:
|
|
6980
|
-
* driver sets this feature when probe confirms the firmware
|
|
6981
|
-
* surface, and registers the cap in the same code path.
|
|
6982
|
-
*/
|
|
6983
|
-
DeviceFeature["PtzAutotrack"] = "ptz-autotrack";
|
|
6984
|
-
/**
|
|
6985
|
-
* Accessory exposes a "trigger on motion" toggle — the parent camera's
|
|
6986
|
-
* motion detection automatically activates this device. Mirrors
|
|
6987
|
-
* `motion-trigger` cap registration: drivers set this feature in the
|
|
6988
|
-
* same code path that calls `ctx.registerNativeCap(motionTriggerCapability, ...)`.
|
|
6989
|
-
*
|
|
6990
|
-
* Used by admin UI (gate the in-hero `MotionTriggerToggle` against a
|
|
6991
|
-
* fast scalar without binding fetch), notifier rules, and `listAll`
|
|
6992
|
-
* filters that want "all devices with on-motion behaviour".
|
|
6993
|
-
*/
|
|
6994
|
-
DeviceFeature["MotionTrigger"] = "motion-trigger";
|
|
6995
|
-
/** Light supports rgb-triplet color via `color` cap. */
|
|
6996
|
-
DeviceFeature["LightColorRgb"] = "light-color-rgb";
|
|
6997
|
-
/** Light supports HSV color via `color` cap. */
|
|
6998
|
-
DeviceFeature["LightColorHsv"] = "light-color-hsv";
|
|
6999
|
-
/** Light supports color-temperature (mired) via `color` cap. */
|
|
7000
|
-
DeviceFeature["LightColorMired"] = "light-color-mired";
|
|
7001
|
-
/** Thermostat supports a `heat_cool` dual setpoint (targetLow +
|
|
7002
|
-
* targetHigh). Gates the range slider UI. */
|
|
7003
|
-
DeviceFeature["ClimateDualSetpoint"] = "climate-dual-setpoint";
|
|
7004
|
-
/** Thermostat exposes target humidity and/or current humidity
|
|
7005
|
-
* readings. Gates the humidity controls. */
|
|
7006
|
-
DeviceFeature["ClimateHumidity"] = "climate-humidity";
|
|
7007
|
-
/** Thermostat exposes a fan-mode selector. */
|
|
7008
|
-
DeviceFeature["ClimateFanMode"] = "climate-fan-mode";
|
|
7009
|
-
/** Thermostat exposes preset modes (eco / away / sleep / vendor). */
|
|
7010
|
-
DeviceFeature["ClimatePreset"] = "climate-preset";
|
|
7011
|
-
/** Cover exposes intermediate position control (0..100). Gates the
|
|
7012
|
-
* position slider UI. */
|
|
7013
|
-
DeviceFeature["CoverPositionable"] = "cover-positionable";
|
|
7014
|
-
/** Cover exposes slat-tilt control. Gates the tilt slider UI. */
|
|
7015
|
-
DeviceFeature["CoverTilt"] = "cover-tilt";
|
|
7016
|
-
/** Valve exposes intermediate position control (0..100). Gates the
|
|
7017
|
-
* position slider / drag surface UI. */
|
|
7018
|
-
DeviceFeature["ValvePositionable"] = "valve-positionable";
|
|
7019
|
-
/** Fan exposes a speed-percentage setter. Gates the speed slider UI. */
|
|
7020
|
-
DeviceFeature["FanSpeed"] = "fan-speed";
|
|
7021
|
-
/** Fan exposes a preset mode selector. */
|
|
7022
|
-
DeviceFeature["FanPreset"] = "fan-preset";
|
|
7023
|
-
/** Fan exposes blade direction (forward/reverse) — typical of
|
|
7024
|
-
* ceiling fans. */
|
|
7025
|
-
DeviceFeature["FanDirection"] = "fan-direction";
|
|
7026
|
-
/** Fan exposes an oscillation toggle. */
|
|
7027
|
-
DeviceFeature["FanOscillating"] = "fan-oscillating";
|
|
7028
|
-
/** Lock requires a PIN code on lock/unlock. Gates the code-entry
|
|
7029
|
-
* field on the UI lock-controls panel. */
|
|
7030
|
-
DeviceFeature["LockPinRequired"] = "lock-pin-required";
|
|
7031
|
-
/** Lock supports a latch-release ("open door") action distinct from
|
|
7032
|
-
* unlock. Mirrors HA `LockEntityFeature.OPEN` (bit 1) in
|
|
7033
|
-
* `supported_features`. Gates the Open Door button in the UI. */
|
|
7034
|
-
DeviceFeature["LockOpen"] = "lock-open";
|
|
7035
|
-
/** Media player exposes a seek-to-position surface. */
|
|
7036
|
-
DeviceFeature["MediaPlayerSeek"] = "media-player-seek";
|
|
7037
|
-
/** Media player exposes a volume-level setter. */
|
|
7038
|
-
DeviceFeature["MediaPlayerVolume"] = "media-player-volume";
|
|
7039
|
-
/** Media player exposes a mute toggle distinct from volume=0. */
|
|
7040
|
-
DeviceFeature["MediaPlayerMute"] = "media-player-mute";
|
|
7041
|
-
/** Media player exposes a shuffle toggle. */
|
|
7042
|
-
DeviceFeature["MediaPlayerShuffle"] = "media-player-shuffle";
|
|
7043
|
-
/** Media player exposes a repeat mode (off / all / one). */
|
|
7044
|
-
DeviceFeature["MediaPlayerRepeat"] = "media-player-repeat";
|
|
7045
|
-
/** Media player exposes a source / input selector. */
|
|
7046
|
-
DeviceFeature["MediaPlayerSelectSource"] = "media-player-select-source";
|
|
7047
|
-
/** Media player exposes a play-arbitrary-media surface (URL / id). */
|
|
7048
|
-
DeviceFeature["MediaPlayerPlayMedia"] = "media-player-play-media";
|
|
7049
|
-
/** Media player exposes next-track. */
|
|
7050
|
-
DeviceFeature["MediaPlayerNext"] = "media-player-next";
|
|
7051
|
-
/** Media player exposes previous-track. */
|
|
7052
|
-
DeviceFeature["MediaPlayerPrevious"] = "media-player-previous";
|
|
7053
|
-
/** Media player exposes stop distinct from pause. */
|
|
7054
|
-
DeviceFeature["MediaPlayerStop"] = "media-player-stop";
|
|
7055
|
-
/** Alarm panel requires a PIN code on arm/disarm. */
|
|
7056
|
-
DeviceFeature["AlarmPinRequired"] = "alarm-pin-required";
|
|
7057
|
-
/** Presence device carries GPS coordinates (lat/lng/accuracy) in
|
|
7058
|
-
* addition to a textual location. */
|
|
7059
|
-
DeviceFeature["PresenceGps"] = "presence-gps";
|
|
7060
|
-
/** Notifier accepts an inline / URL image attachment. */
|
|
7061
|
-
DeviceFeature["NotifierImage"] = "notifier-image";
|
|
7062
|
-
/** Notifier accepts a priority hint (high/normal/low). */
|
|
7063
|
-
DeviceFeature["NotifierPriority"] = "notifier-priority";
|
|
7064
|
-
/** Notifier accepts a free-form `data` payload for platform-specific
|
|
7065
|
-
* fields. */
|
|
7066
|
-
DeviceFeature["NotifierData"] = "notifier-data";
|
|
7067
|
-
/** Notifier supports interactive action buttons / callbacks. */
|
|
7068
|
-
DeviceFeature["NotifierActions"] = "notifier-actions";
|
|
7069
|
-
/** Notifier supports per-call recipient targeting (multi-user). */
|
|
7070
|
-
DeviceFeature["NotifierRecipients"] = "notifier-recipients";
|
|
7071
|
-
/** Script runner accepts a variables map on each run invocation. */
|
|
7072
|
-
DeviceFeature["ScriptVariables"] = "script-variables";
|
|
7073
|
-
/** Automation `trigger` accepts a skipCondition flag — fires the
|
|
7074
|
-
* automation's actions while bypassing its condition block. */
|
|
7075
|
-
DeviceFeature["AutomationSkipCondition"] = "automation-skip-condition";
|
|
7076
|
-
return DeviceFeature;
|
|
7077
|
-
}({});
|
|
7078
|
-
/**
|
|
7079
|
-
* Semantic role a device plays within its parent. Populated by driver
|
|
7080
|
-
* addons when creating accessory devices (Reolink siren/floodlight/
|
|
7081
|
-
* PIR/chime/autotrack/doorbell, ONVIF relay outputs, …). Used by the
|
|
7082
|
-
* admin UI to pick icons, labels, and widgets — a `Switch` with
|
|
7083
|
-
* `role: Floodlight` renders as a bulb with a brightness slider,
|
|
7084
|
-
* whereas a `Switch` with `role: Siren` renders as a klaxon.
|
|
7085
|
-
*
|
|
7086
|
-
* Undefined for top-level devices (cameras, NVRs, hubs). Persisted in
|
|
7087
|
-
* sqlite as a nullable TEXT column — old rows keep working unchanged.
|
|
7088
|
-
*/
|
|
7089
|
-
var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
|
|
7090
|
-
DeviceRole["Siren"] = "siren";
|
|
7091
|
-
DeviceRole["Floodlight"] = "floodlight";
|
|
7092
|
-
DeviceRole["Spotlight"] = "spotlight";
|
|
7093
|
-
DeviceRole["PirSensor"] = "pir-sensor";
|
|
7094
|
-
DeviceRole["Chime"] = "chime";
|
|
7095
|
-
DeviceRole["Autotrack"] = "autotrack";
|
|
7096
|
-
DeviceRole["Nightvision"] = "nightvision";
|
|
7097
|
-
DeviceRole["PrivacyMask"] = "privacy-mask";
|
|
7098
|
-
DeviceRole["Doorbell"] = "doorbell";
|
|
7099
|
-
/** Virtual HA toggle (input_boolean.*) — distinguishable from a
|
|
7100
|
-
* real Switch device for UI rendering / export adapters. */
|
|
7101
|
-
DeviceRole["BinaryHelper"] = "binary-helper";
|
|
7102
|
-
/** Generic motion / occupancy / moving event source. Distinct from
|
|
7103
|
-
* the camera accessory PirSensor role: that one is a camera child;
|
|
7104
|
-
* this is a standalone HA / 3rd-party motion sensor. */
|
|
7105
|
-
DeviceRole["MotionSensor"] = "motion-sensor";
|
|
7106
|
-
DeviceRole["ContactSensor"] = "contact-sensor";
|
|
7107
|
-
DeviceRole["LeakSensor"] = "leak-sensor";
|
|
7108
|
-
DeviceRole["SmokeSensor"] = "smoke-sensor";
|
|
7109
|
-
DeviceRole["COSensor"] = "co-sensor";
|
|
7110
|
-
DeviceRole["GasSensor"] = "gas-sensor";
|
|
7111
|
-
DeviceRole["TamperSensor"] = "tamper-sensor";
|
|
7112
|
-
DeviceRole["VibrationSensor"] = "vibration-sensor";
|
|
7113
|
-
DeviceRole["ConnectivitySensor"] = "connectivity-sensor";
|
|
7114
|
-
DeviceRole["SoundSensor"] = "sound-sensor";
|
|
7115
|
-
/** Fallback for `binary_sensor` without a known `device_class`. */
|
|
7116
|
-
DeviceRole["BinarySensor"] = "binary-sensor";
|
|
7117
|
-
DeviceRole["TemperatureSensor"] = "temperature-sensor";
|
|
7118
|
-
DeviceRole["HumiditySensor"] = "humidity-sensor";
|
|
7119
|
-
DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
|
|
7120
|
-
DeviceRole["PressureSensor"] = "pressure-sensor";
|
|
7121
|
-
DeviceRole["PowerSensor"] = "power-sensor";
|
|
7122
|
-
DeviceRole["EnergySensor"] = "energy-sensor";
|
|
7123
|
-
DeviceRole["VoltageSensor"] = "voltage-sensor";
|
|
7124
|
-
DeviceRole["CurrentSensor"] = "current-sensor";
|
|
7125
|
-
DeviceRole["AirQualitySensor"] = "air-quality-sensor";
|
|
7126
|
-
/** Battery level (numeric % via `sensor` OR low-bool via
|
|
7127
|
-
* `binary_sensor` — the cap distinguishes via the value type). */
|
|
7128
|
-
DeviceRole["BatterySensor"] = "battery-sensor";
|
|
7129
|
-
/** Fallback for `sensor` numeric without a known `device_class`. */
|
|
7130
|
-
DeviceRole["NumericSensor"] = "numeric-sensor";
|
|
7131
|
-
/** String / enum state (HA `sensor` with `state_class: enum` or
|
|
7132
|
-
* `attributes.options`). */
|
|
7133
|
-
DeviceRole["EnumSensor"] = "enum-sensor";
|
|
7134
|
-
/** Date / timestamp state (HA `sensor` with `device_class: timestamp`
|
|
7135
|
-
* or `date`). The slice carries the raw ISO string verbatim (hosted on
|
|
7136
|
-
* the `enum-sensor` cap); the UI renders it locale-formatted. */
|
|
7137
|
-
DeviceRole["DateTimeSensor"] = "datetime-sensor";
|
|
7138
|
-
/** Last-resort fallback when nothing else matches. */
|
|
7139
|
-
DeviceRole["GenericSensor"] = "generic-sensor";
|
|
7140
|
-
DeviceRole["NumericControl"] = "numeric-control";
|
|
7141
|
-
DeviceRole["SelectControl"] = "select-control";
|
|
7142
|
-
DeviceRole["TextControl"] = "text-control";
|
|
7143
|
-
DeviceRole["DateTimeControl"] = "datetime-control";
|
|
7144
|
-
/** Mobile push notifier (HA `notify.mobile_app_*`) — supports
|
|
7145
|
-
* rich features (image, priority, channel routing). */
|
|
7146
|
-
DeviceRole["MobilePushNotifier"] = "mobile-push-notifier";
|
|
7147
|
-
/** Chat / messaging service (HA `notify.telegram_*`,
|
|
7148
|
-
* `notify.discord_*`, etc.). */
|
|
7149
|
-
DeviceRole["MessagingNotifier"] = "messaging-notifier";
|
|
7150
|
-
/** Email-based delivery (HA `notify.smtp`, etc.). */
|
|
7151
|
-
DeviceRole["EmailNotifier"] = "email-notifier";
|
|
7152
|
-
/** Fallback when the notifier service name doesn't match a known
|
|
7153
|
-
* pattern. */
|
|
7154
|
-
DeviceRole["GenericNotifier"] = "generic-notifier";
|
|
7155
|
-
return DeviceRole;
|
|
7156
|
-
}({});
|
|
7173
|
+
Ringtone: "telephone",
|
|
7174
|
+
"Telephone dialing, DTMF": "telephone",
|
|
7175
|
+
"Busy signal": "telephone",
|
|
7176
|
+
Engine: "engine",
|
|
7177
|
+
"Engine starting": "engine",
|
|
7178
|
+
Idling: "engine",
|
|
7179
|
+
"Accelerating, revving, vroom": "engine",
|
|
7180
|
+
"Light engine (high frequency)": "engine",
|
|
7181
|
+
"Medium engine (mid frequency)": "engine",
|
|
7182
|
+
"Heavy engine (low frequency)": "engine",
|
|
7183
|
+
"Lawn mower": "engine",
|
|
7184
|
+
Chainsaw: "engine",
|
|
7185
|
+
Hammer: "tools",
|
|
7186
|
+
Jackhammer: "tools",
|
|
7187
|
+
Sawing: "tools",
|
|
7188
|
+
"Power tool": "tools",
|
|
7189
|
+
Drill: "tools",
|
|
7190
|
+
Sanding: "tools",
|
|
7191
|
+
Silence: "silence"
|
|
7192
|
+
},
|
|
7193
|
+
preserveOriginal: false
|
|
7194
|
+
};
|
|
7195
|
+
var APPLE_SA_TO_MACRO = {
|
|
7196
|
+
mapping: {
|
|
7197
|
+
speech: "speech",
|
|
7198
|
+
child_speech: "speech",
|
|
7199
|
+
conversation: "speech",
|
|
7200
|
+
whispering: "speech",
|
|
7201
|
+
singing: "speech",
|
|
7202
|
+
humming: "speech",
|
|
7203
|
+
shout: "scream",
|
|
7204
|
+
yell: "scream",
|
|
7205
|
+
screaming: "scream",
|
|
7206
|
+
crying: "crying",
|
|
7207
|
+
baby_crying: "crying",
|
|
7208
|
+
sobbing: "crying",
|
|
7209
|
+
laughter: "laughter",
|
|
7210
|
+
baby_laughter: "laughter",
|
|
7211
|
+
giggling: "laughter",
|
|
7212
|
+
music: "music",
|
|
7213
|
+
guitar: "music",
|
|
7214
|
+
piano: "music",
|
|
7215
|
+
drums: "music",
|
|
7216
|
+
dog_bark: "dog",
|
|
7217
|
+
dog_bow_wow: "dog",
|
|
7218
|
+
dog_growling: "dog",
|
|
7219
|
+
dog_howl: "dog",
|
|
7220
|
+
cat_meow: "cat",
|
|
7221
|
+
cat_purr: "cat",
|
|
7222
|
+
cat_hiss: "cat",
|
|
7223
|
+
bird: "bird",
|
|
7224
|
+
bird_chirp: "bird",
|
|
7225
|
+
bird_squawk: "bird",
|
|
7226
|
+
animal: "animal",
|
|
7227
|
+
horse: "animal",
|
|
7228
|
+
cow_moo: "animal",
|
|
7229
|
+
insect: "animal",
|
|
7230
|
+
alarm: "alarm",
|
|
7231
|
+
smoke_alarm: "alarm",
|
|
7232
|
+
fire_alarm: "alarm",
|
|
7233
|
+
car_alarm: "alarm",
|
|
7234
|
+
siren: "siren",
|
|
7235
|
+
police_siren: "siren",
|
|
7236
|
+
ambulance_siren: "siren",
|
|
7237
|
+
doorbell: "doorbell",
|
|
7238
|
+
door_knock: "doorbell",
|
|
7239
|
+
knocking: "doorbell",
|
|
7240
|
+
glass_breaking: "glass_breaking",
|
|
7241
|
+
glass_shatter: "glass_breaking",
|
|
7242
|
+
gunshot: "gunshot",
|
|
7243
|
+
explosion: "gunshot",
|
|
7244
|
+
fireworks: "gunshot",
|
|
7245
|
+
car: "vehicle",
|
|
7246
|
+
truck: "vehicle",
|
|
7247
|
+
motorcycle: "vehicle",
|
|
7248
|
+
car_horn: "vehicle",
|
|
7249
|
+
vehicle_horn: "vehicle",
|
|
7250
|
+
traffic: "vehicle",
|
|
7251
|
+
fire: "fire",
|
|
7252
|
+
fire_crackle: "fire",
|
|
7253
|
+
water: "water",
|
|
7254
|
+
rain: "water",
|
|
7255
|
+
ocean: "water",
|
|
7256
|
+
splash: "water",
|
|
7257
|
+
wind: "wind",
|
|
7258
|
+
thunder: "wind",
|
|
7259
|
+
thunderstorm: "wind",
|
|
7260
|
+
door: "door",
|
|
7261
|
+
door_slam: "door",
|
|
7262
|
+
sliding_door: "door",
|
|
7263
|
+
footsteps: "footsteps",
|
|
7264
|
+
walking: "footsteps",
|
|
7265
|
+
running: "footsteps",
|
|
7266
|
+
crowd: "crowd",
|
|
7267
|
+
chatter: "crowd",
|
|
7268
|
+
cheering: "crowd",
|
|
7269
|
+
applause: "crowd",
|
|
7270
|
+
telephone_ring: "telephone",
|
|
7271
|
+
ringtone: "telephone",
|
|
7272
|
+
engine: "engine",
|
|
7273
|
+
engine_starting: "engine",
|
|
7274
|
+
lawn_mower: "engine",
|
|
7275
|
+
chainsaw: "engine",
|
|
7276
|
+
hammer: "tools",
|
|
7277
|
+
jackhammer: "tools",
|
|
7278
|
+
drill: "tools",
|
|
7279
|
+
power_tool: "tools",
|
|
7280
|
+
silence: "silence"
|
|
7281
|
+
},
|
|
7282
|
+
preserveOriginal: false
|
|
7283
|
+
};
|
|
7284
|
+
var _macroLookup = /* @__PURE__ */ new Map();
|
|
7285
|
+
for (const [k, v] of Object.entries(YAMNET_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7286
|
+
for (const [k, v] of Object.entries(APPLE_SA_TO_MACRO.mapping)) _macroLookup.set(k.toLowerCase(), v);
|
|
7157
7287
|
/**
|
|
7158
7288
|
* Accessory device helpers — shared across drivers.
|
|
7159
7289
|
*
|
|
@@ -7313,74 +7443,6 @@ object({
|
|
|
7313
7443
|
});
|
|
7314
7444
|
DeviceType.Sensor;
|
|
7315
7445
|
/**
|
|
7316
|
-
* Generic types for capability definitions.
|
|
7317
|
-
*
|
|
7318
|
-
* A capability is defined with Zod schemas for methods, events, and settings.
|
|
7319
|
-
* TypeScript types are inferred via z.infer<> — zero duplication.
|
|
7320
|
-
*
|
|
7321
|
-
* Pattern:
|
|
7322
|
-
* 1. Define Zod schemas for data, methods, settings
|
|
7323
|
-
* 2. Export const capabilityDef = { ... } satisfies CapabilityDefinition
|
|
7324
|
-
* 3. Export type IProvider = InferProvider<typeof capabilityDef>
|
|
7325
|
-
* 4. Addon implements IProvider
|
|
7326
|
-
* 5. Registry auto-mounts tRPC router from definition.methods
|
|
7327
|
-
*/
|
|
7328
|
-
/**
|
|
7329
|
-
* Output schema shared by the contribution + live methods.
|
|
7330
|
-
*
|
|
7331
|
-
* Mirrors the `ConfigUISchemaWithValues` shape (sections[] + optional
|
|
7332
|
-
* tabs[]) without importing from `../interfaces/config-ui.js` — a
|
|
7333
|
-
* concrete-but-lenient Zod object keeps tRPC output inference happy
|
|
7334
|
-
* (using `z.unknown()` here collapses unrelated router branches to
|
|
7335
|
-
* `unknown` when the generator re-inlines the huge AppRouter type).
|
|
7336
|
-
*
|
|
7337
|
-
* `.passthrough()` on sections/fields accepts whatever FormBuilder
|
|
7338
|
-
* extensions the caller adds (showWhen, displayScale, …) without
|
|
7339
|
-
* rebuilding every time a new field kind is introduced.
|
|
7340
|
-
*/
|
|
7341
|
-
var ContributionSectionSchema = object({
|
|
7342
|
-
id: string(),
|
|
7343
|
-
title: string(),
|
|
7344
|
-
description: string().optional(),
|
|
7345
|
-
style: _enum(["card", "accordion"]).optional(),
|
|
7346
|
-
defaultCollapsed: boolean().optional(),
|
|
7347
|
-
columns: union([
|
|
7348
|
-
literal(1),
|
|
7349
|
-
literal(2),
|
|
7350
|
-
literal(3),
|
|
7351
|
-
literal(4)
|
|
7352
|
-
]).optional(),
|
|
7353
|
-
tab: string().optional(),
|
|
7354
|
-
location: _enum(["settings", "top-tab"]).optional(),
|
|
7355
|
-
order: number().optional(),
|
|
7356
|
-
fields: array(any())
|
|
7357
|
-
});
|
|
7358
|
-
object({
|
|
7359
|
-
tabs: array(object({
|
|
7360
|
-
id: string(),
|
|
7361
|
-
label: string(),
|
|
7362
|
-
icon: string(),
|
|
7363
|
-
order: number().optional()
|
|
7364
|
-
})).optional(),
|
|
7365
|
-
sections: array(ContributionSectionSchema)
|
|
7366
|
-
}).nullable();
|
|
7367
|
-
object({ deviceId: number() }), object({ deviceId: number() }), object({
|
|
7368
|
-
deviceId: number(),
|
|
7369
|
-
patch: record(string(), unknown())
|
|
7370
|
-
}), object({ success: literal(true) });
|
|
7371
|
-
object({ deviceId: number() }), unknown().nullable();
|
|
7372
|
-
/** Shorthand to define a method schema */
|
|
7373
|
-
function method(input, output, options) {
|
|
7374
|
-
return {
|
|
7375
|
-
input,
|
|
7376
|
-
output,
|
|
7377
|
-
kind: options?.kind ?? "query",
|
|
7378
|
-
auth: options?.auth ?? "protected",
|
|
7379
|
-
...options?.access !== void 0 ? { access: options.access } : {},
|
|
7380
|
-
timeoutMs: options?.timeoutMs
|
|
7381
|
-
};
|
|
7382
|
-
}
|
|
7383
|
-
/**
|
|
7384
7446
|
* Alarm-panel cap. Models HA `alarm_control_panel.*` on
|
|
7385
7447
|
* `DeviceType.AlarmPanel`. State follows HA's canonical lifecycle
|
|
7386
7448
|
* across disarmed / armed_(home|away|night|vacation|custom_bypass) /
|
|
@@ -11382,9 +11444,6 @@ method(LogEntrySchema, _void(), { kind: "mutation" }), method(object({
|
|
|
11382
11444
|
limit: number().optional(),
|
|
11383
11445
|
tags: record(string(), string()).optional()
|
|
11384
11446
|
}), array(LogEntrySchema).readonly());
|
|
11385
|
-
var StaticDirOutputSchema = object({ staticDir: string() });
|
|
11386
|
-
var VersionOutputSchema = object({ version: string() });
|
|
11387
|
-
method(_void(), StaticDirOutputSchema), method(_void(), VersionOutputSchema);
|
|
11388
11447
|
/**
|
|
11389
11448
|
* Zod schemas for persisted record types.
|
|
11390
11449
|
*
|
|
@@ -13698,7 +13757,7 @@ method(object({
|
|
|
13698
13757
|
}), _void(), {
|
|
13699
13758
|
kind: "mutation",
|
|
13700
13759
|
auth: "admin"
|
|
13701
|
-
}), 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({
|
|
13760
|
+
}), 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({
|
|
13702
13761
|
deviceId: number(),
|
|
13703
13762
|
values: record(string(), unknown())
|
|
13704
13763
|
}), object({ success: literal(true) }), {
|
|
@@ -14380,7 +14439,20 @@ var DiskSpaceInfoSchema = object({
|
|
|
14380
14439
|
var PidResourceStatsSchema = object({
|
|
14381
14440
|
pid: number(),
|
|
14382
14441
|
cpu: number(),
|
|
14383
|
-
memory: number()
|
|
14442
|
+
memory: number(),
|
|
14443
|
+
/**
|
|
14444
|
+
* Private (anonymous) resident bytes — the per-process V8 heap + native
|
|
14445
|
+
* allocations NOT shared with other processes (Linux RssAnon). This is the
|
|
14446
|
+
* "real" per-runner cost; summing it across runners is meaningful, unlike
|
|
14447
|
+
* `memory` (RSS), which double-counts the shared mmap'd framework code.
|
|
14448
|
+
* Undefined where /proc is unavailable (e.g. macOS).
|
|
14449
|
+
*/
|
|
14450
|
+
privateBytes: number().optional(),
|
|
14451
|
+
/**
|
|
14452
|
+
* Shared file-backed resident bytes (Linux RssFile) — mmap'd framework/lib
|
|
14453
|
+
* code shared copy-on-write across runners. Undefined on macOS.
|
|
14454
|
+
*/
|
|
14455
|
+
sharedBytes: number().optional()
|
|
14384
14456
|
});
|
|
14385
14457
|
var AddonInstanceSchema = object({
|
|
14386
14458
|
addonId: string(),
|
|
@@ -14429,6 +14501,17 @@ var KillProcessResultSchema = object({
|
|
|
14429
14501
|
reason: string().optional(),
|
|
14430
14502
|
signal: _enum(["SIGTERM", "SIGKILL"]).optional()
|
|
14431
14503
|
});
|
|
14504
|
+
var DumpHeapSnapshotInputSchema = object({
|
|
14505
|
+
/** The addon whose runner should dump a heap snapshot. */
|
|
14506
|
+
addonId: string() });
|
|
14507
|
+
var DumpHeapSnapshotResultSchema = object({
|
|
14508
|
+
success: boolean(),
|
|
14509
|
+
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
14510
|
+
path: string().optional(),
|
|
14511
|
+
/** Process pid that was signalled. */
|
|
14512
|
+
pid: number().optional(),
|
|
14513
|
+
reason: string().optional()
|
|
14514
|
+
});
|
|
14432
14515
|
var SystemMetricsSchema = object({
|
|
14433
14516
|
cpuPercent: number(),
|
|
14434
14517
|
memoryPercent: number(),
|
|
@@ -14442,6 +14525,9 @@ var SystemMetricsSchema = object({
|
|
|
14442
14525
|
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, {
|
|
14443
14526
|
kind: "mutation",
|
|
14444
14527
|
auth: "admin"
|
|
14528
|
+
}), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
14529
|
+
kind: "mutation",
|
|
14530
|
+
auth: "admin"
|
|
14445
14531
|
});
|
|
14446
14532
|
var PtzPresetSchema = object({
|
|
14447
14533
|
id: string(),
|
|
@@ -14808,63 +14894,6 @@ method(object({
|
|
|
14808
14894
|
auth: "admin"
|
|
14809
14895
|
});
|
|
14810
14896
|
/**
|
|
14811
|
-
* device-ops — device-scoped cap that unifies the per-IDevice operations
|
|
14812
|
-
* previously routed through the `.device-ops` Moleculer bridge service.
|
|
14813
|
-
*
|
|
14814
|
-
* Each worker that hosts live `IDevice` instances auto-registers a native
|
|
14815
|
-
* provider for this cap (per device) backed by its local
|
|
14816
|
-
* `DeviceRegistry`. Hub-side callers reach it transparently through
|
|
14817
|
-
* `ctx.fetchDevice(id).deviceOps.*` — the DeviceProxy injects
|
|
14818
|
-
* `deviceId` + `nodeId` and dispatches through the standard cap-router,
|
|
14819
|
-
* so there's no parallel bridge path anymore.
|
|
14820
|
-
*
|
|
14821
|
-
* The surface is intentionally small — every method corresponds to a
|
|
14822
|
-
* single action on the live `IDevice` (or `ICameraDevice` for
|
|
14823
|
-
* `getStreamSources`). Richer orchestration (enable/disable with
|
|
14824
|
-
* integration plumbing, bulk updates) stays in the `device-manager` cap;
|
|
14825
|
-
* `device-ops` is the per-device primitive the device-manager routes to.
|
|
14826
|
-
*/
|
|
14827
|
-
var StreamSourceEntrySchema$1 = object({
|
|
14828
|
-
id: string(),
|
|
14829
|
-
label: string(),
|
|
14830
|
-
protocol: _enum([
|
|
14831
|
-
"rtsp",
|
|
14832
|
-
"rtmp",
|
|
14833
|
-
"annexb",
|
|
14834
|
-
"http-mjpeg",
|
|
14835
|
-
"webrtc",
|
|
14836
|
-
"custom"
|
|
14837
|
-
]),
|
|
14838
|
-
url: string().optional(),
|
|
14839
|
-
resolution: object({
|
|
14840
|
-
width: number(),
|
|
14841
|
-
height: number()
|
|
14842
|
-
}).optional(),
|
|
14843
|
-
fps: number().optional(),
|
|
14844
|
-
bitrate: number().optional(),
|
|
14845
|
-
codec: string().optional(),
|
|
14846
|
-
profileHint: CamProfileSchema.optional(),
|
|
14847
|
-
sdp: string().optional()
|
|
14848
|
-
});
|
|
14849
|
-
var ConfigEntrySchema$1 = object({
|
|
14850
|
-
key: string(),
|
|
14851
|
-
value: unknown()
|
|
14852
|
-
});
|
|
14853
|
-
var RawStateResultSchema = object({
|
|
14854
|
-
/** Originating provider id, e.g. 'homeassistant' | 'reolink' | 'hikvision'. */
|
|
14855
|
-
source: string(),
|
|
14856
|
-
/** Opaque, DISPLAY-SAFE upstream blob (no secrets/PII). */
|
|
14857
|
-
data: record(string(), unknown())
|
|
14858
|
-
});
|
|
14859
|
-
method(object({ deviceId: number() }), array(StreamSourceEntrySchema$1)), method(object({ deviceId: number() }), array(ConfigEntrySchema$1)), method(object({
|
|
14860
|
-
deviceId: number(),
|
|
14861
|
-
values: record(string(), unknown())
|
|
14862
|
-
}), _void(), { kind: "mutation" }), method(object({
|
|
14863
|
-
deviceId: number(),
|
|
14864
|
-
action: string().min(1),
|
|
14865
|
-
input: unknown()
|
|
14866
|
-
}), unknown(), { kind: "mutation" }), method(object({ deviceId: number() }), _void(), { kind: "mutation" }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
|
|
14867
|
-
/**
|
|
14868
14897
|
* camera-credentials — device-scoped cap exposing the camera's network
|
|
14869
14898
|
* + auth surface in a vendor-neutral shape.
|
|
14870
14899
|
*
|
|
@@ -18547,6 +18576,12 @@ Object.freeze({
|
|
|
18547
18576
|
addonId: null,
|
|
18548
18577
|
access: "view"
|
|
18549
18578
|
},
|
|
18579
|
+
"metricsProvider.dumpHeapSnapshot": {
|
|
18580
|
+
capName: "metrics-provider",
|
|
18581
|
+
capScope: "system",
|
|
18582
|
+
addonId: null,
|
|
18583
|
+
access: "create"
|
|
18584
|
+
},
|
|
18550
18585
|
"metricsProvider.getAddonStats": {
|
|
18551
18586
|
capName: "metrics-provider",
|
|
18552
18587
|
capScope: "system",
|