@camstack/addon-provider-homeassistant 1.2.67 → 1.2.69
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/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BULdaGgg.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-device-source.ts
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-
|
|
1
|
+
import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-CccnKDCg.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-device-source.ts
|
|
@@ -13879,6 +13879,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13879
13879
|
auth: "admin"
|
|
13880
13880
|
});
|
|
13881
13881
|
/**
|
|
13882
|
+
* Transport bounds for AI capability methods.
|
|
13883
|
+
*
|
|
13884
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13885
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13886
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13887
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13888
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13889
|
+
*/
|
|
13890
|
+
/**
|
|
13891
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13892
|
+
*
|
|
13893
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13894
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13895
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13896
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13897
|
+
* the wrong layer and hiding the real one.
|
|
13898
|
+
*
|
|
13899
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13900
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13901
|
+
* exactly 60 s and shipped without its text.
|
|
13902
|
+
*
|
|
13903
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13904
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13905
|
+
* decide when to stop, because only they can say WHY.
|
|
13906
|
+
*/
|
|
13907
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13908
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13909
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13910
|
+
/**
|
|
13882
13911
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13883
13912
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13884
13913
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14150,16 +14179,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14150
14179
|
timeoutMs: number().int().positive().optional()
|
|
14151
14180
|
}), LlmGenerateResultSchema, {
|
|
14152
14181
|
kind: "mutation",
|
|
14153
|
-
auth: "admin"
|
|
14182
|
+
auth: "admin",
|
|
14183
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14154
14184
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14155
14185
|
kind: "mutation",
|
|
14156
|
-
auth: "admin"
|
|
14186
|
+
auth: "admin",
|
|
14187
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14157
14188
|
}), method(object({}), _void(), {
|
|
14158
14189
|
kind: "mutation",
|
|
14159
14190
|
auth: "admin"
|
|
14160
14191
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14161
14192
|
kind: "mutation",
|
|
14162
|
-
auth: "admin"
|
|
14193
|
+
auth: "admin",
|
|
14194
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14163
14195
|
}), method(object({ file: string() }), _void(), {
|
|
14164
14196
|
kind: "mutation",
|
|
14165
14197
|
auth: "admin"
|
|
@@ -14327,7 +14359,13 @@ var ProfileRefInputSchema = object({
|
|
|
14327
14359
|
addonId: string(),
|
|
14328
14360
|
profileId: string()
|
|
14329
14361
|
});
|
|
14330
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14362
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14363
|
+
kind: "mutation",
|
|
14364
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14365
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14366
|
+
kind: "mutation",
|
|
14367
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14368
|
+
}), method(object({
|
|
14331
14369
|
addonId: string().optional(),
|
|
14332
14370
|
requestId: string()
|
|
14333
14371
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14338,7 +14376,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14338
14376
|
auth: "admin"
|
|
14339
14377
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14340
14378
|
kind: "mutation",
|
|
14341
|
-
auth: "admin"
|
|
14379
|
+
auth: "admin",
|
|
14380
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14342
14381
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14343
14382
|
selector: LlmDefaultSelectorSchema,
|
|
14344
14383
|
profileId: string().nullable()
|
|
@@ -13879,6 +13879,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
|
|
|
13879
13879
|
auth: "admin"
|
|
13880
13880
|
});
|
|
13881
13881
|
/**
|
|
13882
|
+
* Transport bounds for AI capability methods.
|
|
13883
|
+
*
|
|
13884
|
+
* Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
|
|
13885
|
+
* each other: declaring the constant in either one hands the other `undefined`
|
|
13886
|
+
* at module-init time, and an undefined `timeoutMs` silently falls back to the
|
|
13887
|
+
* kernel's 60 s default — the exact failure this constant exists to prevent,
|
|
13888
|
+
* reintroduced invisibly. Found by the guard, not by review.
|
|
13889
|
+
*/
|
|
13890
|
+
/**
|
|
13891
|
+
* Ceiling for a cap method that runs inference or loads a model.
|
|
13892
|
+
*
|
|
13893
|
+
* Deliberately far above anything the AI layer itself may wait for (a summary
|
|
13894
|
+
* asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
|
|
13895
|
+
* never be the layer that gives up first: when it does, the failure is
|
|
13896
|
+
* reported as a transport error for a model that was still thinking, naming
|
|
13897
|
+
* the wrong layer and hiding the real one.
|
|
13898
|
+
*
|
|
13899
|
+
* Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
|
|
13900
|
+
* more on a cold model load. With no declaration every digest failed at
|
|
13901
|
+
* exactly 60 s and shipped without its text.
|
|
13902
|
+
*
|
|
13903
|
+
* A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
|
|
13904
|
+
* the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
|
|
13905
|
+
* decide when to stop, because only they can say WHY.
|
|
13906
|
+
*/
|
|
13907
|
+
var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
|
|
13908
|
+
/** A multi-gigabyte download. An hour is not generous, it is honest. */
|
|
13909
|
+
var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
|
|
13910
|
+
/**
|
|
13882
13911
|
* Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
|
|
13883
13912
|
* surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
|
|
13884
13913
|
* caps stay wire-compatible without a circular cap→cap import.
|
|
@@ -14150,16 +14179,19 @@ method(LlmGenerateBaseInputSchema.extend({
|
|
|
14150
14179
|
timeoutMs: number().int().positive().optional()
|
|
14151
14180
|
}), LlmGenerateResultSchema, {
|
|
14152
14181
|
kind: "mutation",
|
|
14153
|
-
auth: "admin"
|
|
14182
|
+
auth: "admin",
|
|
14183
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14154
14184
|
}), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
|
|
14155
14185
|
kind: "mutation",
|
|
14156
|
-
auth: "admin"
|
|
14186
|
+
auth: "admin",
|
|
14187
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14157
14188
|
}), method(object({}), _void(), {
|
|
14158
14189
|
kind: "mutation",
|
|
14159
14190
|
auth: "admin"
|
|
14160
14191
|
}), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
|
|
14161
14192
|
kind: "mutation",
|
|
14162
|
-
auth: "admin"
|
|
14193
|
+
auth: "admin",
|
|
14194
|
+
timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
|
|
14163
14195
|
}), method(object({ file: string() }), _void(), {
|
|
14164
14196
|
kind: "mutation",
|
|
14165
14197
|
auth: "admin"
|
|
@@ -14327,7 +14359,13 @@ var ProfileRefInputSchema = object({
|
|
|
14327
14359
|
addonId: string(),
|
|
14328
14360
|
profileId: string()
|
|
14329
14361
|
});
|
|
14330
|
-
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14362
|
+
method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
|
|
14363
|
+
kind: "mutation",
|
|
14364
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14365
|
+
}), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
|
|
14366
|
+
kind: "mutation",
|
|
14367
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14368
|
+
}), method(object({
|
|
14331
14369
|
addonId: string().optional(),
|
|
14332
14370
|
requestId: string()
|
|
14333
14371
|
}), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
|
|
@@ -14338,7 +14376,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
|
|
|
14338
14376
|
auth: "admin"
|
|
14339
14377
|
}), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
|
|
14340
14378
|
kind: "mutation",
|
|
14341
|
-
auth: "admin"
|
|
14379
|
+
auth: "admin",
|
|
14380
|
+
timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
|
|
14342
14381
|
}), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
|
|
14343
14382
|
selector: LlmDefaultSelectorSchema,
|
|
14344
14383
|
profileId: string().nullable()
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
//#endregion
|
|
6
|
-
const require_dist = require("../dist-
|
|
6
|
+
const require_dist = require("../dist-BULdaGgg.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
//#region src/ha-export/topics.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-
|
|
1
|
+
import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-CccnKDCg.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
3
|
//#region src/ha-export/topics.ts
|
|
4
4
|
/**
|