@camstack/addon-provider-tuya 0.2.53 → 0.2.55

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
@@ -14358,6 +14358,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
14358
14358
  auth: "admin"
14359
14359
  });
14360
14360
  /**
14361
+ * Transport bounds for AI capability methods.
14362
+ *
14363
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
14364
+ * each other: declaring the constant in either one hands the other `undefined`
14365
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
14366
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
14367
+ * reintroduced invisibly. Found by the guard, not by review.
14368
+ */
14369
+ /**
14370
+ * Ceiling for a cap method that runs inference or loads a model.
14371
+ *
14372
+ * Deliberately far above anything the AI layer itself may wait for (a summary
14373
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
14374
+ * never be the layer that gives up first: when it does, the failure is
14375
+ * reported as a transport error for a model that was still thinking, naming
14376
+ * the wrong layer and hiding the real one.
14377
+ *
14378
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
14379
+ * more on a cold model load. With no declaration every digest failed at
14380
+ * exactly 60 s and shipped without its text.
14381
+ *
14382
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
14383
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
14384
+ * decide when to stop, because only they can say WHY.
14385
+ */
14386
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
14387
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
14388
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
14389
+ /**
14361
14390
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
14362
14391
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
14363
14392
  * caps stay wire-compatible without a circular cap→cap import.
@@ -14629,16 +14658,19 @@ method(LlmGenerateBaseInputSchema.extend({
14629
14658
  timeoutMs: number().int().positive().optional()
14630
14659
  }), LlmGenerateResultSchema, {
14631
14660
  kind: "mutation",
14632
- auth: "admin"
14661
+ auth: "admin",
14662
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14633
14663
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
14634
14664
  kind: "mutation",
14635
- auth: "admin"
14665
+ auth: "admin",
14666
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14636
14667
  }), method(object({}), _void(), {
14637
14668
  kind: "mutation",
14638
14669
  auth: "admin"
14639
14670
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
14640
14671
  kind: "mutation",
14641
- auth: "admin"
14672
+ auth: "admin",
14673
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
14642
14674
  }), method(object({ file: string() }), _void(), {
14643
14675
  kind: "mutation",
14644
14676
  auth: "admin"
@@ -14806,7 +14838,13 @@ var ProfileRefInputSchema = object({
14806
14838
  addonId: string(),
14807
14839
  profileId: string()
14808
14840
  });
14809
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14841
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14842
+ kind: "mutation",
14843
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14844
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14845
+ kind: "mutation",
14846
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14847
+ }), method(object({
14810
14848
  addonId: string().optional(),
14811
14849
  requestId: string()
14812
14850
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -14817,7 +14855,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
14817
14855
  auth: "admin"
14818
14856
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
14819
14857
  kind: "mutation",
14820
- auth: "admin"
14858
+ auth: "admin",
14859
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14821
14860
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
14822
14861
  selector: LlmDefaultSelectorSchema,
14823
14862
  profileId: string().nullable()
package/dist/addon.mjs CHANGED
@@ -14357,6 +14357,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
14357
14357
  auth: "admin"
14358
14358
  });
14359
14359
  /**
14360
+ * Transport bounds for AI capability methods.
14361
+ *
14362
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
14363
+ * each other: declaring the constant in either one hands the other `undefined`
14364
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
14365
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
14366
+ * reintroduced invisibly. Found by the guard, not by review.
14367
+ */
14368
+ /**
14369
+ * Ceiling for a cap method that runs inference or loads a model.
14370
+ *
14371
+ * Deliberately far above anything the AI layer itself may wait for (a summary
14372
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
14373
+ * never be the layer that gives up first: when it does, the failure is
14374
+ * reported as a transport error for a model that was still thinking, naming
14375
+ * the wrong layer and hiding the real one.
14376
+ *
14377
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
14378
+ * more on a cold model load. With no declaration every digest failed at
14379
+ * exactly 60 s and shipped without its text.
14380
+ *
14381
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
14382
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
14383
+ * decide when to stop, because only they can say WHY.
14384
+ */
14385
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
14386
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
14387
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
14388
+ /**
14360
14389
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
14361
14390
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
14362
14391
  * caps stay wire-compatible without a circular cap→cap import.
@@ -14628,16 +14657,19 @@ method(LlmGenerateBaseInputSchema.extend({
14628
14657
  timeoutMs: number().int().positive().optional()
14629
14658
  }), LlmGenerateResultSchema, {
14630
14659
  kind: "mutation",
14631
- auth: "admin"
14660
+ auth: "admin",
14661
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14632
14662
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
14633
14663
  kind: "mutation",
14634
- auth: "admin"
14664
+ auth: "admin",
14665
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14635
14666
  }), method(object({}), _void(), {
14636
14667
  kind: "mutation",
14637
14668
  auth: "admin"
14638
14669
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
14639
14670
  kind: "mutation",
14640
- auth: "admin"
14671
+ auth: "admin",
14672
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
14641
14673
  }), method(object({ file: string() }), _void(), {
14642
14674
  kind: "mutation",
14643
14675
  auth: "admin"
@@ -14805,7 +14837,13 @@ var ProfileRefInputSchema = object({
14805
14837
  addonId: string(),
14806
14838
  profileId: string()
14807
14839
  });
14808
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14840
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14841
+ kind: "mutation",
14842
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14843
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14844
+ kind: "mutation",
14845
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14846
+ }), method(object({
14809
14847
  addonId: string().optional(),
14810
14848
  requestId: string()
14811
14849
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -14816,7 +14854,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
14816
14854
  auth: "admin"
14817
14855
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
14818
14856
  kind: "mutation",
14819
- auth: "admin"
14857
+ auth: "admin",
14858
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14820
14859
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
14821
14860
  selector: LlmDefaultSelectorSchema,
14822
14861
  profileId: string().nullable()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-tuya",
3
- "version": "0.2.53",
3
+ "version": "0.2.55",
4
4
  "description": "Tuya / Smart Life device-provider addon for CamStack — account-onboarded (Tuya IoT cloud fetch of device localKeys) + LOCAL DP control via the @apocaliss92/nodetuya encrypted-LAN client, exposing switch / water-heater-family kettle entities",
5
5
  "keywords": [
6
6
  "camstack",