@camstack/addon-export-hap 1.2.64 → 1.2.66

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.
@@ -14058,6 +14058,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
14058
14058
  auth: "admin"
14059
14059
  });
14060
14060
  /**
14061
+ * Transport bounds for AI capability methods.
14062
+ *
14063
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
14064
+ * each other: declaring the constant in either one hands the other `undefined`
14065
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
14066
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
14067
+ * reintroduced invisibly. Found by the guard, not by review.
14068
+ */
14069
+ /**
14070
+ * Ceiling for a cap method that runs inference or loads a model.
14071
+ *
14072
+ * Deliberately far above anything the AI layer itself may wait for (a summary
14073
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
14074
+ * never be the layer that gives up first: when it does, the failure is
14075
+ * reported as a transport error for a model that was still thinking, naming
14076
+ * the wrong layer and hiding the real one.
14077
+ *
14078
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
14079
+ * more on a cold model load. With no declaration every digest failed at
14080
+ * exactly 60 s and shipped without its text.
14081
+ *
14082
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
14083
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
14084
+ * decide when to stop, because only they can say WHY.
14085
+ */
14086
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
14087
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
14088
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
14089
+ /**
14061
14090
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
14062
14091
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
14063
14092
  * caps stay wire-compatible without a circular cap→cap import.
@@ -14329,16 +14358,19 @@ method(LlmGenerateBaseInputSchema.extend({
14329
14358
  timeoutMs: number().int().positive().optional()
14330
14359
  }), LlmGenerateResultSchema, {
14331
14360
  kind: "mutation",
14332
- auth: "admin"
14361
+ auth: "admin",
14362
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14333
14363
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
14334
14364
  kind: "mutation",
14335
- auth: "admin"
14365
+ auth: "admin",
14366
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14336
14367
  }), method(object({}), _void(), {
14337
14368
  kind: "mutation",
14338
14369
  auth: "admin"
14339
14370
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
14340
14371
  kind: "mutation",
14341
- auth: "admin"
14372
+ auth: "admin",
14373
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
14342
14374
  }), method(object({ file: string() }), _void(), {
14343
14375
  kind: "mutation",
14344
14376
  auth: "admin"
@@ -14506,7 +14538,13 @@ var ProfileRefInputSchema = object({
14506
14538
  addonId: string(),
14507
14539
  profileId: string()
14508
14540
  });
14509
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14541
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14542
+ kind: "mutation",
14543
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14544
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14545
+ kind: "mutation",
14546
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14547
+ }), method(object({
14510
14548
  addonId: string().optional(),
14511
14549
  requestId: string()
14512
14550
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -14517,7 +14555,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
14517
14555
  auth: "admin"
14518
14556
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
14519
14557
  kind: "mutation",
14520
- auth: "admin"
14558
+ auth: "admin",
14559
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14521
14560
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
14522
14561
  selector: LlmDefaultSelectorSchema,
14523
14562
  profileId: string().nullable()
@@ -14046,6 +14046,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
14046
14046
  auth: "admin"
14047
14047
  });
14048
14048
  /**
14049
+ * Transport bounds for AI capability methods.
14050
+ *
14051
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
14052
+ * each other: declaring the constant in either one hands the other `undefined`
14053
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
14054
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
14055
+ * reintroduced invisibly. Found by the guard, not by review.
14056
+ */
14057
+ /**
14058
+ * Ceiling for a cap method that runs inference or loads a model.
14059
+ *
14060
+ * Deliberately far above anything the AI layer itself may wait for (a summary
14061
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
14062
+ * never be the layer that gives up first: when it does, the failure is
14063
+ * reported as a transport error for a model that was still thinking, naming
14064
+ * the wrong layer and hiding the real one.
14065
+ *
14066
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
14067
+ * more on a cold model load. With no declaration every digest failed at
14068
+ * exactly 60 s and shipped without its text.
14069
+ *
14070
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
14071
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
14072
+ * decide when to stop, because only they can say WHY.
14073
+ */
14074
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
14075
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
14076
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
14077
+ /**
14049
14078
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
14050
14079
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
14051
14080
  * caps stay wire-compatible without a circular cap→cap import.
@@ -14317,16 +14346,19 @@ method(LlmGenerateBaseInputSchema.extend({
14317
14346
  timeoutMs: number().int().positive().optional()
14318
14347
  }), LlmGenerateResultSchema, {
14319
14348
  kind: "mutation",
14320
- auth: "admin"
14349
+ auth: "admin",
14350
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14321
14351
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
14322
14352
  kind: "mutation",
14323
- auth: "admin"
14353
+ auth: "admin",
14354
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14324
14355
  }), method(object({}), _void(), {
14325
14356
  kind: "mutation",
14326
14357
  auth: "admin"
14327
14358
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
14328
14359
  kind: "mutation",
14329
- auth: "admin"
14360
+ auth: "admin",
14361
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
14330
14362
  }), method(object({ file: string() }), _void(), {
14331
14363
  kind: "mutation",
14332
14364
  auth: "admin"
@@ -14494,7 +14526,13 @@ var ProfileRefInputSchema = object({
14494
14526
  addonId: string(),
14495
14527
  profileId: string()
14496
14528
  });
14497
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
14529
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14530
+ kind: "mutation",
14531
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14532
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14533
+ kind: "mutation",
14534
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14535
+ }), method(object({
14498
14536
  addonId: string().optional(),
14499
14537
  requestId: string()
14500
14538
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -14505,7 +14543,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
14505
14543
  auth: "admin"
14506
14544
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
14507
14545
  kind: "mutation",
14508
- auth: "admin"
14546
+ auth: "admin",
14547
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14509
14548
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
14510
14549
  selector: LlmDefaultSelectorSchema,
14511
14550
  profileId: string().nullable()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.2.64",
3
+ "version": "1.2.66",
4
4
  "description": "HomeKit (HAP) exporter for CamStack devices. Publishes each exposed device as its own HomeKit accessory: cameras and doorbells with SRTP streaming, HomeKit Secure Video, motion, two-way audio, PTZ and battery; switches, lights, locks and sensors through a capability→service table.",
5
5
  "keywords": [
6
6
  "camstack",