@camstack/addon-provider-amcrest 0.2.54 → 0.2.56

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
@@ -13514,6 +13514,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13514
13514
  auth: "admin"
13515
13515
  });
13516
13516
  /**
13517
+ * Transport bounds for AI capability methods.
13518
+ *
13519
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13520
+ * each other: declaring the constant in either one hands the other `undefined`
13521
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13522
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13523
+ * reintroduced invisibly. Found by the guard, not by review.
13524
+ */
13525
+ /**
13526
+ * Ceiling for a cap method that runs inference or loads a model.
13527
+ *
13528
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13529
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13530
+ * never be the layer that gives up first: when it does, the failure is
13531
+ * reported as a transport error for a model that was still thinking, naming
13532
+ * the wrong layer and hiding the real one.
13533
+ *
13534
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13535
+ * more on a cold model load. With no declaration every digest failed at
13536
+ * exactly 60 s and shipped without its text.
13537
+ *
13538
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13539
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13540
+ * decide when to stop, because only they can say WHY.
13541
+ */
13542
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13543
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13544
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13545
+ /**
13517
13546
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13518
13547
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13519
13548
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13785,16 +13814,19 @@ method(LlmGenerateBaseInputSchema.extend({
13785
13814
  timeoutMs: number().int().positive().optional()
13786
13815
  }), LlmGenerateResultSchema, {
13787
13816
  kind: "mutation",
13788
- auth: "admin"
13817
+ auth: "admin",
13818
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13789
13819
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13790
13820
  kind: "mutation",
13791
- auth: "admin"
13821
+ auth: "admin",
13822
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13792
13823
  }), method(object({}), _void(), {
13793
13824
  kind: "mutation",
13794
13825
  auth: "admin"
13795
13826
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13796
13827
  kind: "mutation",
13797
- auth: "admin"
13828
+ auth: "admin",
13829
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13798
13830
  }), method(object({ file: string() }), _void(), {
13799
13831
  kind: "mutation",
13800
13832
  auth: "admin"
@@ -13962,7 +13994,13 @@ var ProfileRefInputSchema = object({
13962
13994
  addonId: string(),
13963
13995
  profileId: string()
13964
13996
  });
13965
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13997
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13998
+ kind: "mutation",
13999
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14000
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14001
+ kind: "mutation",
14002
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14003
+ }), method(object({
13966
14004
  addonId: string().optional(),
13967
14005
  requestId: string()
13968
14006
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13973,7 +14011,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13973
14011
  auth: "admin"
13974
14012
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13975
14013
  kind: "mutation",
13976
- auth: "admin"
14014
+ auth: "admin",
14015
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13977
14016
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13978
14017
  selector: LlmDefaultSelectorSchema,
13979
14018
  profileId: string().nullable()
package/dist/addon.mjs CHANGED
@@ -13515,6 +13515,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13515
13515
  auth: "admin"
13516
13516
  });
13517
13517
  /**
13518
+ * Transport bounds for AI capability methods.
13519
+ *
13520
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13521
+ * each other: declaring the constant in either one hands the other `undefined`
13522
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13523
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13524
+ * reintroduced invisibly. Found by the guard, not by review.
13525
+ */
13526
+ /**
13527
+ * Ceiling for a cap method that runs inference or loads a model.
13528
+ *
13529
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13530
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13531
+ * never be the layer that gives up first: when it does, the failure is
13532
+ * reported as a transport error for a model that was still thinking, naming
13533
+ * the wrong layer and hiding the real one.
13534
+ *
13535
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13536
+ * more on a cold model load. With no declaration every digest failed at
13537
+ * exactly 60 s and shipped without its text.
13538
+ *
13539
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13540
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13541
+ * decide when to stop, because only they can say WHY.
13542
+ */
13543
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13544
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13545
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13546
+ /**
13518
13547
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13519
13548
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13520
13549
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13786,16 +13815,19 @@ method(LlmGenerateBaseInputSchema.extend({
13786
13815
  timeoutMs: number().int().positive().optional()
13787
13816
  }), LlmGenerateResultSchema, {
13788
13817
  kind: "mutation",
13789
- auth: "admin"
13818
+ auth: "admin",
13819
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13790
13820
  }), method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13791
13821
  kind: "mutation",
13792
- auth: "admin"
13822
+ auth: "admin",
13823
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13793
13824
  }), method(object({}), _void(), {
13794
13825
  kind: "mutation",
13795
13826
  auth: "admin"
13796
13827
  }), method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }), method(object({ model: ManagedModelRefSchema }), _void(), {
13797
13828
  kind: "mutation",
13798
- auth: "admin"
13829
+ auth: "admin",
13830
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13799
13831
  }), method(object({ file: string() }), _void(), {
13800
13832
  kind: "mutation",
13801
13833
  auth: "admin"
@@ -13963,7 +13995,13 @@ var ProfileRefInputSchema = object({
13963
13995
  addonId: string(),
13964
13996
  profileId: string()
13965
13997
  });
13966
- method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }), method(object({
13998
+ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13999
+ kind: "mutation",
14000
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14001
+ }), method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14002
+ kind: "mutation",
14003
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14004
+ }), method(object({
13967
14005
  addonId: string().optional(),
13968
14006
  requestId: string()
13969
14007
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
@@ -13974,7 +14012,8 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }
13974
14012
  auth: "admin"
13975
14013
  }), method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13976
14014
  kind: "mutation",
13977
- auth: "admin"
14015
+ auth: "admin",
14016
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13978
14017
  }), method(ProfileRefInputSchema, array(string())), method(object({}), array(LlmDefaultSchema)), method(object({
13979
14018
  selector: LlmDefaultSelectorSchema,
13980
14019
  profileId: string().nullable()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-amcrest",
3
- "version": "0.2.54",
3
+ "version": "0.2.56",
4
4
  "description": "Amcrest/Dahua camera device provider addon for CamStack — Dahua CGI over HTTP(S) with digest auth (snapshot, RTSP catalog, PTZ, image/day-night config)",
5
5
  "keywords": [
6
6
  "camstack",