@camstack/addon-ai 0.4.54 → 0.4.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
@@ -13460,6 +13460,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13460
13460
  auth: "admin"
13461
13461
  });
13462
13462
  /**
13463
+ * Transport bounds for AI capability methods.
13464
+ *
13465
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13466
+ * each other: declaring the constant in either one hands the other `undefined`
13467
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13468
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13469
+ * reintroduced invisibly. Found by the guard, not by review.
13470
+ */
13471
+ /**
13472
+ * Ceiling for a cap method that runs inference or loads a model.
13473
+ *
13474
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13475
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13476
+ * never be the layer that gives up first: when it does, the failure is
13477
+ * reported as a transport error for a model that was still thinking, naming
13478
+ * the wrong layer and hiding the real one.
13479
+ *
13480
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13481
+ * more on a cold model load. With no declaration every digest failed at
13482
+ * exactly 60 s and shipped without its text.
13483
+ *
13484
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13485
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13486
+ * decide when to stop, because only they can say WHY.
13487
+ */
13488
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13489
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13490
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13491
+ /**
13463
13492
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13464
13493
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13465
13494
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13768,11 +13797,13 @@ var llmRuntimeCapability = {
13768
13797
  timeoutMs: number$1().int().positive().optional()
13769
13798
  }), LlmGenerateResultSchema, {
13770
13799
  kind: "mutation",
13771
- auth: "admin"
13800
+ auth: "admin",
13801
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13772
13802
  }),
13773
13803
  ensureStarted: method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13774
13804
  kind: "mutation",
13775
- auth: "admin"
13805
+ auth: "admin",
13806
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13776
13807
  }),
13777
13808
  stop: method(object({}), _void(), {
13778
13809
  kind: "mutation",
@@ -13781,7 +13812,8 @@ var llmRuntimeCapability = {
13781
13812
  status: method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }),
13782
13813
  installModel: method(object({ model: ManagedModelRefSchema }), _void(), {
13783
13814
  kind: "mutation",
13784
- auth: "admin"
13815
+ auth: "admin",
13816
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13785
13817
  }),
13786
13818
  deleteModel: method(object({ file: string() }), _void(), {
13787
13819
  kind: "mutation",
@@ -13963,8 +13995,14 @@ var llmCapability = {
13963
13995
  /** `nodeId` inputs below are DATA (the hub provider pins itself), never routing. */
13964
13996
  nodeIdMode: "data",
13965
13997
  methods: {
13966
- generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
13967
- generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
13998
+ generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
13999
+ kind: "mutation",
14000
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14001
+ }),
14002
+ generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14003
+ kind: "mutation",
14004
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14005
+ }),
13968
14006
  /**
13969
14007
  * Stop a generation started with a `requestId`.
13970
14008
  *
@@ -13988,7 +14026,8 @@ var llmCapability = {
13988
14026
  }),
13989
14027
  testProfile: method(ProfileRefInputSchema, LlmGenerateResultSchema, {
13990
14028
  kind: "mutation",
13991
- auth: "admin"
14029
+ auth: "admin",
14030
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13992
14031
  }),
13993
14032
  /** Live vendor enumeration (GET /models etc.). */
13994
14033
  listModels: method(ProfileRefInputSchema, array(string())),
@@ -14479,17 +14518,6 @@ var ContainerMemoryPointSchema = object({
14479
14518
  */
14480
14519
  gpuShmemBytes: number$1().nullable()
14481
14520
  }).extend({ atMs: number$1() });
14482
- var DumpHeapSnapshotInputSchema = object({
14483
- /** The addon whose runner should dump a heap snapshot. */
14484
- addonId: string() });
14485
- var DumpHeapSnapshotResultSchema = object({
14486
- success: boolean(),
14487
- /** Path of the written .heapsnapshot inside the runner's container/host. */
14488
- path: string().optional(),
14489
- /** Process pid that was signalled. */
14490
- pid: number$1().optional(),
14491
- reason: string().optional()
14492
- });
14493
14521
  /**
14494
14522
  * One point of one function's series.
14495
14523
  *
@@ -14613,10 +14641,7 @@ var SystemMetricsSchema = object({
14613
14641
  gpuPercent: number$1().optional(),
14614
14642
  gpuMemoryPercent: number$1().optional()
14615
14643
  });
14616
- method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number$1().nullable()), method(object({ pids: array(number$1()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
14617
- kind: "mutation",
14618
- auth: "admin"
14619
- });
14644
+ method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number$1().nullable()), method(object({ pids: array(number$1()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema);
14620
14645
  method(object({
14621
14646
  sourceUrl: string(),
14622
14647
  metadata: ModelConvertMetadataSchema,
@@ -18850,7 +18875,8 @@ var MediaFileKindEnum = _enum([
18850
18875
  "plateCrop",
18851
18876
  "keyFrame",
18852
18877
  "keyFrameSmall",
18853
- "thumbnailSmall"
18878
+ "thumbnailSmall",
18879
+ "sceneFrame"
18854
18880
  ]);
18855
18881
  /**
18856
18882
  * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
@@ -31668,12 +31694,6 @@ Object.freeze({
31668
31694
  addonId: null,
31669
31695
  access: "view"
31670
31696
  },
31671
- "metricsProvider.dumpHeapSnapshot": {
31672
- capName: "metrics-provider",
31673
- capScope: "system",
31674
- addonId: null,
31675
- access: "create"
31676
- },
31677
31697
  "metricsProvider.getAddonStats": {
31678
31698
  capName: "metrics-provider",
31679
31699
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -13487,6 +13487,35 @@ method(_void(), array(string()).readonly(), { auth: "admin" }), method(object({
13487
13487
  auth: "admin"
13488
13488
  });
13489
13489
  /**
13490
+ * Transport bounds for AI capability methods.
13491
+ *
13492
+ * Its own module because `llm.cap.ts` and `llm-runtime.cap.ts` already import
13493
+ * each other: declaring the constant in either one hands the other `undefined`
13494
+ * at module-init time, and an undefined `timeoutMs` silently falls back to the
13495
+ * kernel's 60 s default — the exact failure this constant exists to prevent,
13496
+ * reintroduced invisibly. Found by the guard, not by review.
13497
+ */
13498
+ /**
13499
+ * Ceiling for a cap method that runs inference or loads a model.
13500
+ *
13501
+ * Deliberately far above anything the AI layer itself may wait for (a summary
13502
+ * asks 180 s by default, a rule may ask 600 s), because the TRANSPORT must
13503
+ * never be the layer that gives up first: when it does, the failure is
13504
+ * reported as a transport error for a model that was still thinking, naming
13505
+ * the wrong layer and hiding the real one.
13506
+ *
13507
+ * Measured 2026-09-03: a 6-image vision request needs 44.8 s warm and ~20 s
13508
+ * more on a cold model load. With no declaration every digest failed at
13509
+ * exactly 60 s and shipped without its text.
13510
+ *
13511
+ * A ceiling, not a budget. The AI layer's own timeouts (the rule's `timeoutMs`,
13512
+ * the profile's `timeoutMs` / `firstTokenTimeoutMs`) remain the things that
13513
+ * decide when to stop, because only they can say WHY.
13514
+ */
13515
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
13516
+ /** A multi-gigabyte download. An hour is not generous, it is honest. */
13517
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
13518
+ /**
13490
13519
  * Shared LLM generate contracts — imported by BOTH `llm.cap.ts` (consumer
13491
13520
  * surface) and `llm-runtime.cap.ts` (node-side managed executor) so the two
13492
13521
  * caps stay wire-compatible without a circular cap→cap import.
@@ -13795,11 +13824,13 @@ var llmRuntimeCapability = {
13795
13824
  timeoutMs: number$1().int().positive().optional()
13796
13825
  }), LlmGenerateResultSchema, {
13797
13826
  kind: "mutation",
13798
- auth: "admin"
13827
+ auth: "admin",
13828
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13799
13829
  }),
13800
13830
  ensureStarted: method(object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
13801
13831
  kind: "mutation",
13802
- auth: "admin"
13832
+ auth: "admin",
13833
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
13803
13834
  }),
13804
13835
  stop: method(object({}), _void(), {
13805
13836
  kind: "mutation",
@@ -13808,7 +13839,8 @@ var llmRuntimeCapability = {
13808
13839
  status: method(object({}), LlmRuntimeStatusSchema, { auth: "admin" }),
13809
13840
  installModel: method(object({ model: ManagedModelRefSchema }), _void(), {
13810
13841
  kind: "mutation",
13811
- auth: "admin"
13842
+ auth: "admin",
13843
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
13812
13844
  }),
13813
13845
  deleteModel: method(object({ file: string() }), _void(), {
13814
13846
  kind: "mutation",
@@ -13990,8 +14022,14 @@ var llmCapability = {
13990
14022
  /** `nodeId` inputs below are DATA (the hub provider pins itself), never routing. */
13991
14023
  nodeIdMode: "data",
13992
14024
  methods: {
13993
- generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
13994
- generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
14025
+ generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
14026
+ kind: "mutation",
14027
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14028
+ }),
14029
+ generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
14030
+ kind: "mutation",
14031
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14032
+ }),
13995
14033
  /**
13996
14034
  * Stop a generation started with a `requestId`.
13997
14035
  *
@@ -14015,7 +14053,8 @@ var llmCapability = {
14015
14053
  }),
14016
14054
  testProfile: method(ProfileRefInputSchema, LlmGenerateResultSchema, {
14017
14055
  kind: "mutation",
14018
- auth: "admin"
14056
+ auth: "admin",
14057
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
14019
14058
  }),
14020
14059
  /** Live vendor enumeration (GET /models etc.). */
14021
14060
  listModels: method(ProfileRefInputSchema, array(string())),
@@ -14506,17 +14545,6 @@ var ContainerMemoryPointSchema = object({
14506
14545
  */
14507
14546
  gpuShmemBytes: number$1().nullable()
14508
14547
  }).extend({ atMs: number$1() });
14509
- var DumpHeapSnapshotInputSchema = object({
14510
- /** The addon whose runner should dump a heap snapshot. */
14511
- addonId: string() });
14512
- var DumpHeapSnapshotResultSchema = object({
14513
- success: boolean(),
14514
- /** Path of the written .heapsnapshot inside the runner's container/host. */
14515
- path: string().optional(),
14516
- /** Process pid that was signalled. */
14517
- pid: number$1().optional(),
14518
- reason: string().optional()
14519
- });
14520
14548
  /**
14521
14549
  * One point of one function's series.
14522
14550
  *
@@ -14640,10 +14668,7 @@ var SystemMetricsSchema = object({
14640
14668
  gpuPercent: number$1().optional(),
14641
14669
  gpuMemoryPercent: number$1().optional()
14642
14670
  });
14643
- method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number$1().nullable()), method(object({ pids: array(number$1()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema), method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
14644
- kind: "mutation",
14645
- auth: "admin"
14646
- });
14671
+ method(_void(), SystemResourceSnapshotSchema), method(_void(), SystemResourceSnapshotSchema.nullable()), method(_void(), SystemMetricsSchema), method(object({ dirPath: string() }), DiskSpaceInfoSchema), method(_void(), MetricsGpuInfoSchema.nullable()), method(_void(), number$1().nullable()), method(object({ pids: array(number$1()) }), array(PidResourceStatsSchema)), method(_void(), array(AddonInstanceSchema).readonly()), method(object({ addonId: string() }), PidResourceStatsSchema.nullable()), method(_void(), array(NodeProcessSchema).readonly()), method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema);
14647
14672
  method(object({
14648
14673
  sourceUrl: string(),
14649
14674
  metadata: ModelConvertMetadataSchema,
@@ -18877,7 +18902,8 @@ var MediaFileKindEnum = _enum([
18877
18902
  "plateCrop",
18878
18903
  "keyFrame",
18879
18904
  "keyFrameSmall",
18880
- "thumbnailSmall"
18905
+ "thumbnailSmall",
18906
+ "sceneFrame"
18881
18907
  ]);
18882
18908
  /**
18883
18909
  * One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
@@ -31695,12 +31721,6 @@ Object.freeze({
31695
31721
  addonId: null,
31696
31722
  access: "view"
31697
31723
  },
31698
- "metricsProvider.dumpHeapSnapshot": {
31699
- capName: "metrics-provider",
31700
- capScope: "system",
31701
- addonId: null,
31702
- access: "create"
31703
- },
31704
31724
  "metricsProvider.getAddonStats": {
31705
31725
  capName: "metrics-provider",
31706
31726
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.4.54",
3
+ "version": "0.4.56",
4
4
  "description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
5
5
  "keywords": [
6
6
  "camstack",