camstack 1.2.79 → 1.2.81

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.
@@ -21546,6 +21546,8 @@ var filesystemBrowseCapability = {
21546
21546
  })
21547
21547
  }
21548
21548
  };
21549
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
21550
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
21549
21551
  var LlmUsageSchema = external_exports.object({
21550
21552
  inputTokens: external_exports.number(),
21551
21553
  outputTokens: external_exports.number()
@@ -21797,11 +21799,13 @@ var llmRuntimeCapability = {
21797
21799
  */
21798
21800
  complete: method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
21799
21801
  kind: "mutation",
21800
- auth: "admin"
21802
+ auth: "admin",
21803
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
21801
21804
  }),
21802
21805
  ensureStarted: method(external_exports.object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
21803
21806
  kind: "mutation",
21804
- auth: "admin"
21807
+ auth: "admin",
21808
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
21805
21809
  }),
21806
21810
  stop: method(external_exports.object({}), external_exports.void(), {
21807
21811
  kind: "mutation",
@@ -21810,7 +21814,8 @@ var llmRuntimeCapability = {
21810
21814
  status: method(external_exports.object({}), LlmRuntimeStatusSchema, { auth: "admin" }),
21811
21815
  installModel: method(external_exports.object({ model: ManagedModelRefSchema }), external_exports.void(), {
21812
21816
  kind: "mutation",
21813
- auth: "admin"
21817
+ auth: "admin",
21818
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
21814
21819
  }),
21815
21820
  deleteModel: method(external_exports.object({ file: external_exports.string() }), external_exports.void(), {
21816
21821
  kind: "mutation",
@@ -21967,8 +21972,14 @@ var llmCapability = {
21967
21972
  /** `nodeId` inputs below are DATA (the hub provider pins itself), never routing. */
21968
21973
  nodeIdMode: "data",
21969
21974
  methods: {
21970
- generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
21971
- generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
21975
+ generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
21976
+ kind: "mutation",
21977
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
21978
+ }),
21979
+ generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
21980
+ kind: "mutation",
21981
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
21982
+ }),
21972
21983
  /**
21973
21984
  * Stop a generation started with a `requestId`.
21974
21985
  *
@@ -21992,7 +22003,8 @@ var llmCapability = {
21992
22003
  }),
21993
22004
  testProfile: method(ProfileRefInputSchema, LlmGenerateResultSchema, {
21994
22005
  kind: "mutation",
21995
- auth: "admin"
22006
+ auth: "admin",
22007
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
21996
22008
  }),
21997
22009
  /** Live vendor enumeration (GET /models etc.). */
21998
22010
  listModels: method(ProfileRefInputSchema, external_exports.array(external_exports.string())),
@@ -22446,18 +22458,6 @@ var ContainerMemoryPointSchema = external_exports.object({
22446
22458
  */
22447
22459
  gpuShmemBytes: external_exports.number().nullable()
22448
22460
  }).extend({ atMs: external_exports.number() });
22449
- var DumpHeapSnapshotInputSchema = external_exports.object({
22450
- /** The addon whose runner should dump a heap snapshot. */
22451
- addonId: external_exports.string()
22452
- });
22453
- var DumpHeapSnapshotResultSchema = external_exports.object({
22454
- success: external_exports.boolean(),
22455
- /** Path of the written .heapsnapshot inside the runner's container/host. */
22456
- path: external_exports.string().optional(),
22457
- /** Process pid that was signalled. */
22458
- pid: external_exports.number().optional(),
22459
- reason: external_exports.string().optional()
22460
- });
22461
22461
  var LoadPointSchema = external_exports.object({
22462
22462
  /** Bucket START, or the snapshot's own timestamp when unreduced. */
22463
22463
  atMs: external_exports.number(),
@@ -22631,19 +22631,7 @@ var metricsProviderCapability = {
22631
22631
  * agent's ring alone (`durable: false`). Empty is a legitimate answer: a
22632
22632
  * node nobody has heard from has no series, and saying so is the truth.
22633
22633
  */
22634
- getLoadSeries: method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema),
22635
- /**
22636
- * Tell the addon's forked runner to write a V8 heap snapshot to disk (via
22637
- * SIGUSR2 — the runner's diagnostic handler). Also logs its
22638
- * `process.memoryUsage()` + heap-space breakdown. Resolves the pid from
22639
- * `$process.list`, so it can only reach a runner this node spawned. Use
22640
- * for deep per-addon memory attribution; copy the returned path off the
22641
- * node to analyze.
22642
- */
22643
- dumpHeapSnapshot: method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
22644
- kind: "mutation",
22645
- auth: "admin"
22646
- })
22634
+ getLoadSeries: method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
22647
22635
  }
22648
22636
  };
22649
22637
  var ModelConvertInputSchema = external_exports.object({
@@ -26289,7 +26277,8 @@ var MediaFileKindEnum = external_exports.enum([
26289
26277
  "plateCrop",
26290
26278
  "keyFrame",
26291
26279
  "keyFrameSmall",
26292
- "thumbnailSmall"
26280
+ "thumbnailSmall",
26281
+ "sceneFrame"
26293
26282
  ]);
26294
26283
  var MediaFileRefSchema = external_exports.object({
26295
26284
  key: external_exports.string(),
@@ -41790,12 +41779,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
41790
41779
  addonId: null,
41791
41780
  access: "view"
41792
41781
  },
41793
- "metricsProvider.dumpHeapSnapshot": {
41794
- capName: "metrics-provider",
41795
- capScope: "system",
41796
- addonId: null,
41797
- access: "create"
41798
- },
41799
41782
  "metricsProvider.getAddonStats": {
41800
41783
  capName: "metrics-provider",
41801
41784
  capScope: "system",
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runDiscover
4
- } from "./chunk-EDAEBWHA.js";
4
+ } from "./chunk-QSGSW74H.js";
5
5
  import "./chunk-LMMQX4CK.js";
6
6
 
7
7
  // src/cli.ts
@@ -38,7 +38,7 @@ async function runServe(args) {
38
38
  ...typeof values.data === "string" ? { data: values.data } : {}
39
39
  };
40
40
  Object.assign(process.env, buildServeEnv(opts));
41
- await import("./launcher-BA4I4JAU.js");
41
+ await import("./launcher-RKRQJIVN.js");
42
42
  }
43
43
 
44
44
  // src/commands/agent.ts
@@ -83,7 +83,7 @@ async function runAgent(args) {
83
83
  ...typeof values.port === "string" ? { port: values.port } : {}
84
84
  };
85
85
  Object.assign(process.env, buildAgentEnv(opts));
86
- await import("./launcher-BA4I4JAU.js");
86
+ await import("./launcher-RKRQJIVN.js");
87
87
  }
88
88
 
89
89
  // src/commands/setup.ts
@@ -1130,7 +1130,7 @@ function isUnknown(_value) {
1130
1130
  return true;
1131
1131
  }
1132
1132
  async function resolveServerInteractive(presetNamespace) {
1133
- const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-HIST37I5.js");
1133
+ const { discoverNodes, resolveHubFromDiscovered, filterHubNodes, DEFAULT_HUB_HTTPS_PORT } = await import("./discover-JG76SRMM.js");
1134
1134
  if (presetNamespace) {
1135
1135
  const spinner4 = clack.spinner();
1136
1136
  spinner4.start(`Discovering hub on LAN (namespace "${presetNamespace}")`);
@@ -5,7 +5,7 @@ import {
5
5
  filterHubNodes,
6
6
  resolveHubFromDiscovered,
7
7
  runDiscover
8
- } from "./chunk-EDAEBWHA.js";
8
+ } from "./chunk-QSGSW74H.js";
9
9
  import "./chunk-LMMQX4CK.js";
10
10
  export {
11
11
  DEFAULT_HUB_HTTPS_PORT,
@@ -23633,9 +23633,9 @@ var require_zod = __commonJS({
23633
23633
  }
23634
23634
  });
23635
23635
 
23636
- // ../system/dist/dist-BzPNEPHo.js
23637
- var require_dist_BzPNEPHo = __commonJS({
23638
- "../system/dist/dist-BzPNEPHo.js"(exports) {
23636
+ // ../system/dist/dist-DkVaJ5vG.js
23637
+ var require_dist_DkVaJ5vG = __commonJS({
23638
+ "../system/dist/dist-DkVaJ5vG.js"(exports) {
23639
23639
  "use strict";
23640
23640
  var zod = require_zod();
23641
23641
  var EventCategory = /* @__PURE__ */ (function(EventCategory2) {
@@ -32259,6 +32259,8 @@ var require_dist_BzPNEPHo = __commonJS({
32259
32259
  })
32260
32260
  }
32261
32261
  };
32262
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
32263
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
32262
32264
  var LlmUsageSchema = zod.z.object({
32263
32265
  inputTokens: zod.z.number(),
32264
32266
  outputTokens: zod.z.number()
@@ -32509,11 +32511,13 @@ var require_dist_BzPNEPHo = __commonJS({
32509
32511
  timeoutMs: zod.z.number().int().positive().optional()
32510
32512
  }), LlmGenerateResultSchema, {
32511
32513
  kind: "mutation",
32512
- auth: "admin"
32514
+ auth: "admin",
32515
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
32513
32516
  }),
32514
32517
  ensureStarted: method(zod.z.object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
32515
32518
  kind: "mutation",
32516
- auth: "admin"
32519
+ auth: "admin",
32520
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
32517
32521
  }),
32518
32522
  stop: method(zod.z.object({}), zod.z.void(), {
32519
32523
  kind: "mutation",
@@ -32522,7 +32526,8 @@ var require_dist_BzPNEPHo = __commonJS({
32522
32526
  status: method(zod.z.object({}), LlmRuntimeStatusSchema, { auth: "admin" }),
32523
32527
  installModel: method(zod.z.object({ model: ManagedModelRefSchema }), zod.z.void(), {
32524
32528
  kind: "mutation",
32525
- auth: "admin"
32529
+ auth: "admin",
32530
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
32526
32531
  }),
32527
32532
  deleteModel: method(zod.z.object({ file: zod.z.string() }), zod.z.void(), {
32528
32533
  kind: "mutation",
@@ -32679,8 +32684,14 @@ var require_dist_BzPNEPHo = __commonJS({
32679
32684
  /** `nodeId` inputs below are DATA (the hub provider pins itself), never routing. */
32680
32685
  nodeIdMode: "data",
32681
32686
  methods: {
32682
- generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
32683
- generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
32687
+ generate: method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
32688
+ kind: "mutation",
32689
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
32690
+ }),
32691
+ generateVision: method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
32692
+ kind: "mutation",
32693
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
32694
+ }),
32684
32695
  /**
32685
32696
  * Stop a generation started with a `requestId`.
32686
32697
  *
@@ -32704,7 +32715,8 @@ var require_dist_BzPNEPHo = __commonJS({
32704
32715
  }),
32705
32716
  testProfile: method(ProfileRefInputSchema, LlmGenerateResultSchema, {
32706
32717
  kind: "mutation",
32707
- auth: "admin"
32718
+ auth: "admin",
32719
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
32708
32720
  }),
32709
32721
  /** Live vendor enumeration (GET /models etc.). */
32710
32722
  listModels: method(ProfileRefInputSchema, zod.z.array(zod.z.string())),
@@ -33156,18 +33168,6 @@ var require_dist_BzPNEPHo = __commonJS({
33156
33168
  */
33157
33169
  gpuShmemBytes: zod.z.number().nullable()
33158
33170
  }).extend({ atMs: zod.z.number() });
33159
- var DumpHeapSnapshotInputSchema = zod.z.object({
33160
- /** The addon whose runner should dump a heap snapshot. */
33161
- addonId: zod.z.string()
33162
- });
33163
- var DumpHeapSnapshotResultSchema = zod.z.object({
33164
- success: zod.z.boolean(),
33165
- /** Path of the written .heapsnapshot inside the runner's container/host. */
33166
- path: zod.z.string().optional(),
33167
- /** Process pid that was signalled. */
33168
- pid: zod.z.number().optional(),
33169
- reason: zod.z.string().optional()
33170
- });
33171
33171
  var LoadPointSchema = zod.z.object({
33172
33172
  /** Bucket START, or the snapshot's own timestamp when unreduced. */
33173
33173
  atMs: zod.z.number(),
@@ -33341,19 +33341,7 @@ var require_dist_BzPNEPHo = __commonJS({
33341
33341
  * agent's ring alone (`durable: false`). Empty is a legitimate answer: a
33342
33342
  * node nobody has heard from has no series, and saying so is the truth.
33343
33343
  */
33344
- getLoadSeries: method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema),
33345
- /**
33346
- * Tell the addon's forked runner to write a V8 heap snapshot to disk (via
33347
- * SIGUSR2 — the runner's diagnostic handler). Also logs its
33348
- * `process.memoryUsage()` + heap-space breakdown. Resolves the pid from
33349
- * `$process.list`, so it can only reach a runner this node spawned. Use
33350
- * for deep per-addon memory attribution; copy the returned path off the
33351
- * node to analyze.
33352
- */
33353
- dumpHeapSnapshot: method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
33354
- kind: "mutation",
33355
- auth: "admin"
33356
- })
33344
+ getLoadSeries: method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
33357
33345
  }
33358
33346
  };
33359
33347
  var modelConvertCapability = {
@@ -36995,7 +36983,8 @@ var require_dist_BzPNEPHo = __commonJS({
36995
36983
  "plateCrop",
36996
36984
  "keyFrame",
36997
36985
  "keyFrameSmall",
36998
- "thumbnailSmall"
36986
+ "thumbnailSmall",
36987
+ "sceneFrame"
36999
36988
  ]);
37000
36989
  var MediaFileSchema = zod.z.object({
37001
36990
  key: zod.z.string(),
@@ -53116,12 +53105,6 @@ var require_dist_BzPNEPHo = __commonJS({
53116
53105
  addonId: null,
53117
53106
  access: "view"
53118
53107
  },
53119
- "metricsProvider.dumpHeapSnapshot": {
53120
- capName: "metrics-provider",
53121
- capScope: "system",
53122
- addonId: null,
53123
- access: "create"
53124
- },
53125
53108
  "metricsProvider.getAddonStats": {
53126
53109
  capName: "metrics-provider",
53127
53110
  capScope: "system",
@@ -59786,7 +59769,7 @@ var require_alerts_addon = __commonJS({
59786
59769
  [Symbol.toStringTag]: { value: "Module" }
59787
59770
  });
59788
59771
  require_chunk_Cek0wNdY();
59789
- var require_dist10 = require_dist_BzPNEPHo();
59772
+ var require_dist10 = require_dist_DkVaJ5vG();
59790
59773
  function selectExpired(alerts, cutoffMs) {
59791
59774
  return alerts.filter((a) => a.createdAt < cutoffMs).sort((a, b) => a.createdAt - b.createdAt).map((a) => a.id);
59792
59775
  }
@@ -60605,7 +60588,7 @@ var require_console_logging = __commonJS({
60605
60588
  [Symbol.toStringTag]: { value: "Module" }
60606
60589
  });
60607
60590
  require_chunk_Cek0wNdY();
60608
- var require_dist10 = require_dist_BzPNEPHo();
60591
+ var require_dist10 = require_dist_DkVaJ5vG();
60609
60592
  var require_formatter = require_formatter_DqAKDlvN();
60610
60593
  var LEVEL_RANK = {
60611
60594
  debug: 0,
@@ -60699,7 +60682,7 @@ var require_core_blocks_addon = __commonJS({
60699
60682
  "use strict";
60700
60683
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
60701
60684
  var require_chunk = require_chunk_Cek0wNdY();
60702
- var require_dist10 = require_dist_BzPNEPHo();
60685
+ var require_dist10 = require_dist_DkVaJ5vG();
60703
60686
  var node_crypto = __require("crypto");
60704
60687
  var node_fs_promises = __require("fs/promises");
60705
60688
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -61596,11 +61579,11 @@ var require_core_blocks = __commonJS({
61596
61579
  }
61597
61580
  });
61598
61581
 
61599
- // ../system/dist/retired-settings-keys-DZmeJ8ja.js
61600
- var require_retired_settings_keys_DZmeJ8ja = __commonJS({
61601
- "../system/dist/retired-settings-keys-DZmeJ8ja.js"(exports) {
61582
+ // ../system/dist/retired-settings-keys-B1ij-xtH.js
61583
+ var require_retired_settings_keys_B1ij_xtH = __commonJS({
61584
+ "../system/dist/retired-settings-keys-B1ij-xtH.js"(exports) {
61602
61585
  "use strict";
61603
- var require_dist10 = require_dist_BzPNEPHo();
61586
+ var require_dist10 = require_dist_DkVaJ5vG();
61604
61587
  function settingsStoreIsAuthoritativeHere(env) {
61605
61588
  const raw = (env["CAMSTACK_ROLE"] ?? "").trim().toLowerCase();
61606
61589
  return raw === "" || raw === "hub";
@@ -63814,8 +63797,8 @@ var require_device_manager_addon = __commonJS({
63814
63797
  [Symbol.toStringTag]: { value: "Module" }
63815
63798
  });
63816
63799
  require_chunk_Cek0wNdY();
63817
- var require_dist10 = require_dist_BzPNEPHo();
63818
- var require_retired_settings_keys = require_retired_settings_keys_DZmeJ8ja();
63800
+ var require_dist10 = require_dist_DkVaJ5vG();
63801
+ var require_retired_settings_keys = require_retired_settings_keys_B1ij_xtH();
63819
63802
  var node_crypto = __require("crypto");
63820
63803
  var _camstack_types_node = require_node();
63821
63804
  var JOB_HISTORY = 20;
@@ -68851,7 +68834,7 @@ var require_hub_forwarder = __commonJS({
68851
68834
  [Symbol.toStringTag]: { value: "Module" }
68852
68835
  });
68853
68836
  require_chunk_Cek0wNdY();
68854
- var require_dist10 = require_dist_BzPNEPHo();
68837
+ var require_dist10 = require_dist_DkVaJ5vG();
68855
68838
  var require_formatter = require_formatter_DqAKDlvN();
68856
68839
  var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
68857
68840
  var HubForwarderDestination = class {
@@ -68988,7 +68971,7 @@ var require_liveness_monitor_addon = __commonJS({
68988
68971
  "use strict";
68989
68972
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
68990
68973
  require_chunk_Cek0wNdY();
68991
- var require_dist10 = require_dist_BzPNEPHo();
68974
+ var require_dist10 = require_dist_DkVaJ5vG();
68992
68975
  var NO_DEVICES = "liveness:no-devices";
68993
68976
  var ALL_OFFLINE = "liveness:all-devices-offline";
68994
68977
  var NO_FOOTAGE_PREFIX = "liveness:no-footage:";
@@ -69178,7 +69161,7 @@ var require_local_auth_addon = __commonJS({
69178
69161
  [Symbol.toStringTag]: { value: "Module" }
69179
69162
  });
69180
69163
  var require_chunk = require_chunk_Cek0wNdY();
69181
- var require_dist10 = require_dist_BzPNEPHo();
69164
+ var require_dist10 = require_dist_DkVaJ5vG();
69182
69165
  var node_crypto = __require("crypto");
69183
69166
  node_crypto = require_chunk.__toESM(node_crypto);
69184
69167
  var crypto$1 = __require("crypto");
@@ -76991,7 +76974,7 @@ var require_loki_logging = __commonJS({
76991
76974
  [Symbol.toStringTag]: { value: "Module" }
76992
76975
  });
76993
76976
  require_chunk_Cek0wNdY();
76994
- var require_dist10 = require_dist_BzPNEPHo();
76977
+ var require_dist10 = require_dist_DkVaJ5vG();
76995
76978
  function sanitizeLabelName(raw) {
76996
76979
  const replaced = raw.replaceAll(/[^a-zA-Z0-9_]/g, "_");
76997
76980
  return /^[a-zA-Z_]/.test(replaced) ? replaced : `_${replaced}`;
@@ -77556,7 +77539,7 @@ var require_native_metrics_addon = __commonJS({
77556
77539
  [Symbol.toStringTag]: { value: "Module" }
77557
77540
  });
77558
77541
  var require_chunk = require_chunk_Cek0wNdY();
77559
- var require_dist10 = require_dist_BzPNEPHo();
77542
+ var require_dist10 = require_dist_DkVaJ5vG();
77560
77543
  var node_fs_promises = __require("fs/promises");
77561
77544
  var node_child_process = __require("child_process");
77562
77545
  var node_util = __require("util");
@@ -79665,8 +79648,7 @@ var require_native_metrics_addon = __commonJS({
79665
79648
  listAddonInstances: () => this.listAddonInstances(),
79666
79649
  getAddonStats: (params) => this.getAddonStats(params.addonId),
79667
79650
  listNodeProcesses: () => this.listNodeProcesses(),
79668
- getLoadSeries: (params) => this.readLoadSeries(params),
79669
- dumpHeapSnapshot: (params) => this.dumpHeapSnapshot(params)
79651
+ getLoadSeries: (params) => this.readLoadSeries(params)
79670
79652
  };
79671
79653
  this.applyLoadSeriesConfig();
79672
79654
  if (this.isHub) {
@@ -80000,43 +79982,6 @@ var require_native_metrics_addon = __commonJS({
80000
79982
  * and signals it; the runner writes `/tmp/heap-<sanitized nodeId>.heapsnapshot`
80001
79983
  * and logs its memoryUsage + heap-space breakdown. '$hub' targets this process.
80002
79984
  */
80003
- async dumpHeapSnapshot(input) {
80004
- const sanitize = (nodeId2) => nodeId2.replace(/[^\w.-]/g, "_");
80005
- let pid;
80006
- let nodeId;
80007
- if (input.addonId === "$hub") {
80008
- pid = process.pid;
80009
- nodeId = this.ctx.kernel.cluster?.broker?.nodeID ?? "$hub";
80010
- } else {
80011
- const target = (await this.listWorkerInstances()).find((w) => w.addonId === input.addonId);
80012
- if (!target) return {
80013
- success: false,
80014
- reason: `no runner process for addon '${input.addonId}'`
80015
- };
80016
- pid = target.pid;
80017
- nodeId = target.nodeId;
80018
- }
80019
- const path = `/tmp/heap-${sanitize(nodeId)}.heapsnapshot`;
80020
- try {
80021
- process.kill(pid, "SIGUSR2");
80022
- this.ctx.logger.info("Requested heap snapshot from runner", { meta: {
80023
- addonId: input.addonId,
80024
- pid,
80025
- path
80026
- } });
80027
- return {
80028
- success: true,
80029
- pid,
80030
- path
80031
- };
80032
- } catch (err) {
80033
- return {
80034
- success: false,
80035
- reason: err instanceof Error ? err.message : String(err),
80036
- pid
80037
- };
80038
- }
80039
- }
80040
79985
  /** Raw `ps` scan returning every pid + command + resource stats. */
80041
79986
  async runPs() {
80042
79987
  try {
@@ -80178,7 +80123,7 @@ var require_filesystem_storage_addon = __commonJS({
80178
80123
  [Symbol.toStringTag]: { value: "Module" }
80179
80124
  });
80180
80125
  var require_chunk = require_chunk_Cek0wNdY();
80181
- var require_dist10 = require_dist_BzPNEPHo();
80126
+ var require_dist10 = require_dist_DkVaJ5vG();
80182
80127
  var node_crypto = __require("crypto");
80183
80128
  var node_fs_promises = __require("fs/promises");
80184
80129
  var node_path = __require("path");
@@ -81294,8 +81239,8 @@ var require_sqlite_settings_addon = __commonJS({
81294
81239
  [Symbol.toStringTag]: { value: "Module" }
81295
81240
  });
81296
81241
  var require_chunk = require_chunk_Cek0wNdY();
81297
- var require_dist10 = require_dist_BzPNEPHo();
81298
- var require_retired_settings_keys = require_retired_settings_keys_DZmeJ8ja();
81242
+ var require_dist10 = require_dist_DkVaJ5vG();
81243
+ var require_retired_settings_keys = require_retired_settings_keys_B1ij_xtH();
81299
81244
  var node_crypto = __require("crypto");
81300
81245
  var node_fs = __require("fs");
81301
81246
  var node_module = __require("module");
@@ -83777,7 +83722,7 @@ var require_storage_orchestrator_addon = __commonJS({
83777
83722
  [Symbol.toStringTag]: { value: "Module" }
83778
83723
  });
83779
83724
  var require_chunk = require_chunk_Cek0wNdY();
83780
- var require_dist10 = require_dist_BzPNEPHo();
83725
+ var require_dist10 = require_dist_DkVaJ5vG();
83781
83726
  var require_hub_cap_forward = require_hub_cap_forward_DmHNjbB0();
83782
83727
  var zod = require_zod();
83783
83728
  var node_crypto = __require("crypto");
@@ -86728,7 +86673,7 @@ var require_system_config_addon = __commonJS({
86728
86673
  [Symbol.toStringTag]: { value: "Module" }
86729
86674
  });
86730
86675
  require_chunk_Cek0wNdY();
86731
- var require_dist10 = require_dist_BzPNEPHo();
86676
+ var require_dist10 = require_dist_DkVaJ5vG();
86732
86677
  var SECTION_TITLES = {
86733
86678
  server: "Server",
86734
86679
  auth: "Authentication"
@@ -104789,7 +104734,7 @@ var require_winston_logging = __commonJS({
104789
104734
  [Symbol.toStringTag]: { value: "Module" }
104790
104735
  });
104791
104736
  var require_chunk = require_chunk_Cek0wNdY();
104792
- var require_dist10 = require_dist_BzPNEPHo();
104737
+ var require_dist10 = require_dist_DkVaJ5vG();
104793
104738
  var require_formatter = require_formatter_DqAKDlvN();
104794
104739
  var node_path = __require("path");
104795
104740
  node_path = require_chunk.__toESM(node_path);
@@ -117289,12 +117234,12 @@ var require_dist2 = __commonJS({
117289
117234
  }
117290
117235
  });
117291
117236
 
117292
- // ../system/dist/manifest-system-deps-B0mzJPmb.js
117293
- var require_manifest_system_deps_B0mzJPmb = __commonJS({
117294
- "../system/dist/manifest-system-deps-B0mzJPmb.js"(exports) {
117237
+ // ../system/dist/manifest-system-deps-BbB94ozU.js
117238
+ var require_manifest_system_deps_BbB94ozU = __commonJS({
117239
+ "../system/dist/manifest-system-deps-BbB94ozU.js"(exports) {
117295
117240
  "use strict";
117296
117241
  var require_chunk = require_chunk_Cek0wNdY();
117297
- require_dist_BzPNEPHo();
117242
+ require_dist_DkVaJ5vG();
117298
117243
  require_hub_cap_forward_DmHNjbB0();
117299
117244
  var node_crypto = __require("crypto");
117300
117245
  node_crypto = require_chunk.__toESM(node_crypto);
@@ -117579,16 +117524,9 @@ var require_manifest_system_deps_B0mzJPmb = __commonJS({
117579
117524
  if (selected.length === 0) return "";
117580
117525
  return ` ${selected.map((s) => `${heapSpaceField(s.name)}=${mb(s.usedBytes)}MB`).join(" ")}`;
117581
117526
  }
117582
- var RUNNER_HEAP_SNAPSHOT_ENV = "CAMSTACK_RUNNER_HEAP_SNAPSHOT";
117583
- function heapSnapshotAuthorised(env = process.env) {
117584
- return env[RUNNER_HEAP_SNAPSHOT_ENV] === "on";
117585
- }
117586
117527
  var defaultDeps = {
117587
117528
  readMemory: () => process.memoryUsage(),
117588
117529
  readSpaces: readHeapSpaces,
117589
- writeSnapshot: (path) => {
117590
- node_v8.writeHeapSnapshot(path);
117591
- },
117592
117530
  env: process.env
117593
117531
  };
117594
117532
  function emitHeapDiagnosticReport(request, deps = defaultDeps) {
@@ -117599,16 +117537,6 @@ var require_manifest_system_deps_B0mzJPmb = __commonJS({
117599
117537
  } catch (error) {
117600
117538
  request.sink.warn(`[mem] node="${request.label}" space report failed: ${error instanceof Error ? error.message : String(error)}`);
117601
117539
  }
117602
- if (!heapSnapshotAuthorised(deps.env)) {
117603
- request.sink.info(`[mem] node="${request.label}" heap snapshot NOT taken \u2014 it is an admin mutation (a multi-GB write and a stop-the-world walk of the heap). The per-space breakdown above is the free half and needs no authorisation. Set ${RUNNER_HEAP_SNAPSHOT_ENV}=on for this runner and signal again to take one.`);
117604
- return;
117605
- }
117606
- try {
117607
- deps.writeSnapshot(request.snapshotPath);
117608
- request.sink.info(`[mem] node="${request.label}" heap snapshot written -> ${request.snapshotPath}`);
117609
- } catch (error) {
117610
- request.sink.warn(`[mem] node="${request.label}" snapshot failed: ${error instanceof Error ? error.message : String(error)}`);
117611
- }
117612
117540
  }
117613
117541
  var HUB_MAIN_HEAP_WATCH_LABEL = "hub-main";
117614
117542
  var HEAP_WATCH_INTERVAL_MS = 6e4;
@@ -124994,12 +124922,6 @@ var require_manifest_system_deps_B0mzJPmb = __commonJS({
124994
124922
  return RSS_BUDGET_RELEASE_RATIO;
124995
124923
  }
124996
124924
  });
124997
- Object.defineProperty(exports, "RUNNER_HEAP_SNAPSHOT_ENV", {
124998
- enumerable: true,
124999
- get: function() {
125000
- return RUNNER_HEAP_SNAPSHOT_ENV;
125001
- }
125002
- });
125003
124925
  Object.defineProperty(exports, "RUNNER_HEAP_WATCH_INTERVAL_MS", {
125004
124926
  enumerable: true,
125005
124927
  get: function() {
@@ -125366,12 +125288,6 @@ var require_manifest_system_deps_B0mzJPmb = __commonJS({
125366
125288
  return getWorkerNativeCapSnapshot;
125367
125289
  }
125368
125290
  });
125369
- Object.defineProperty(exports, "heapSnapshotAuthorised", {
125370
- enumerable: true,
125371
- get: function() {
125372
- return heapSnapshotAuthorised;
125373
- }
125374
- });
125375
125291
  Object.defineProperty(exports, "heapSpaceField", {
125376
125292
  enumerable: true,
125377
125293
  get: function() {
@@ -129390,7 +129306,7 @@ var require_dist3 = __commonJS({
129390
129306
  "use strict";
129391
129307
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
129392
129308
  var require_chunk = require_chunk_Cek0wNdY();
129393
- var require_dist10 = require_dist_BzPNEPHo();
129309
+ var require_dist10 = require_dist_DkVaJ5vG();
129394
129310
  var require_builtins_alerts_alerts_addon = require_alerts_addon();
129395
129311
  require_alerts();
129396
129312
  var require_formatter = require_formatter_DqAKDlvN();
@@ -129417,7 +129333,7 @@ var require_dist3 = __commonJS({
129417
129333
  var require_builtins_winston_logging_index = require_winston_logging();
129418
129334
  var require_file_data_plane = require_file_data_plane_DO8KbxCe();
129419
129335
  var require_tls$1 = require_tls_BxQlomxd();
129420
- var require_manifest_system_deps = require_manifest_system_deps_B0mzJPmb();
129336
+ var require_manifest_system_deps = require_manifest_system_deps_BbB94ozU();
129421
129337
  var require_resource_monitor = require_resource_monitor_CdnzxBLP();
129422
129338
  var require_custom_action_registry = require_custom_action_registry_jY0NOZK8();
129423
129339
  var zod = require_zod();
@@ -209774,7 +209690,6 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
209774
209690
  exports.RESTART_MARKER_FILE = RESTART_MARKER_FILE;
209775
209691
  exports.RSS_BUDGET_REANNOUNCE_MIN_MS = require_manifest_system_deps.RSS_BUDGET_REANNOUNCE_MIN_MS;
209776
209692
  exports.RSS_BUDGET_RELEASE_RATIO = require_manifest_system_deps.RSS_BUDGET_RELEASE_RATIO;
209777
- exports.RUNNER_HEAP_SNAPSHOT_ENV = require_manifest_system_deps.RUNNER_HEAP_SNAPSHOT_ENV;
209778
209693
  exports.RUNNER_HEAP_WATCH_INTERVAL_MS = require_manifest_system_deps.RUNNER_HEAP_WATCH_INTERVAL_MS;
209779
209694
  exports.RUNNER_RSS_BUDGET_ENV = require_manifest_system_deps.RUNNER_RSS_BUDGET_ENV;
209780
209695
  exports.RUNTIME_DEFAULTS = require_dist10.RUNTIME_DEFAULTS;
@@ -209965,7 +209880,6 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
209965
209880
  exports.getWorkerDeviceRegistry = require_manifest_system_deps.getWorkerDeviceRegistry;
209966
209881
  exports.hasDotNode = hasDotNode;
209967
209882
  exports.hashClusterSecret = hashClusterSecret;
209968
- exports.heapSnapshotAuthorised = require_manifest_system_deps.heapSnapshotAuthorised;
209969
209883
  exports.heapSpaceField = require_manifest_system_deps.heapSpaceField;
209970
209884
  exports.hubMainRssBudget = require_manifest_system_deps.hubMainRssBudget;
209971
209885
  exports.installManifestNativeDeps = require_manifest_system_deps.installManifestNativeDeps;
@@ -218568,6 +218482,8 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
218568
218482
  })
218569
218483
  }
218570
218484
  };
218485
+ var AI_CAP_TRANSPORT_TIMEOUT_MS = 6e5;
218486
+ var AI_MODEL_INSTALL_TIMEOUT_MS = 60 * 6e4;
218571
218487
  var LlmUsageSchema = zod.z.object({
218572
218488
  inputTokens: zod.z.number(),
218573
218489
  outputTokens: zod.z.number()
@@ -218825,11 +218741,13 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
218825
218741
  */
218826
218742
  complete: require_sleep.method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
218827
218743
  kind: "mutation",
218828
- auth: "admin"
218744
+ auth: "admin",
218745
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
218829
218746
  }),
218830
218747
  ensureStarted: require_sleep.method(zod.z.object({ runtime: ManagedRuntimeConfigSchema }), LlmRuntimeStatusSchema, {
218831
218748
  kind: "mutation",
218832
- auth: "admin"
218749
+ auth: "admin",
218750
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
218833
218751
  }),
218834
218752
  stop: require_sleep.method(zod.z.object({}), zod.z.void(), {
218835
218753
  kind: "mutation",
@@ -218838,7 +218756,8 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
218838
218756
  status: require_sleep.method(zod.z.object({}), LlmRuntimeStatusSchema, { auth: "admin" }),
218839
218757
  installModel: require_sleep.method(zod.z.object({ model: ManagedModelRefSchema }), zod.z.void(), {
218840
218758
  kind: "mutation",
218841
- auth: "admin"
218759
+ auth: "admin",
218760
+ timeoutMs: AI_MODEL_INSTALL_TIMEOUT_MS
218842
218761
  }),
218843
218762
  deleteModel: require_sleep.method(zod.z.object({ file: zod.z.string() }), zod.z.void(), {
218844
218763
  kind: "mutation",
@@ -218995,8 +218914,14 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
218995
218914
  /** `nodeId` inputs below are DATA (the hub provider pins itself), never routing. */
218996
218915
  nodeIdMode: "data",
218997
218916
  methods: {
218998
- generate: require_sleep.method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
218999
- generateVision: require_sleep.method(GenerateVisionInputSchema, LlmGenerateResultSchema, { kind: "mutation" }),
218917
+ generate: require_sleep.method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
218918
+ kind: "mutation",
218919
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
218920
+ }),
218921
+ generateVision: require_sleep.method(GenerateVisionInputSchema, LlmGenerateResultSchema, {
218922
+ kind: "mutation",
218923
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
218924
+ }),
219000
218925
  /**
219001
218926
  * Stop a generation started with a `requestId`.
219002
218927
  *
@@ -219020,7 +218945,8 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
219020
218945
  }),
219021
218946
  testProfile: require_sleep.method(ProfileRefInputSchema, LlmGenerateResultSchema, {
219022
218947
  kind: "mutation",
219023
- auth: "admin"
218948
+ auth: "admin",
218949
+ timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
219024
218950
  }),
219025
218951
  /** Live vendor enumeration (GET /models etc.). */
219026
218952
  listModels: require_sleep.method(ProfileRefInputSchema, zod.z.array(zod.z.string())),
@@ -219474,18 +219400,6 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
219474
219400
  */
219475
219401
  gpuShmemBytes: zod.z.number().nullable()
219476
219402
  }).extend({ atMs: zod.z.number() });
219477
- var DumpHeapSnapshotInputSchema = zod.z.object({
219478
- /** The addon whose runner should dump a heap snapshot. */
219479
- addonId: zod.z.string()
219480
- });
219481
- var DumpHeapSnapshotResultSchema = zod.z.object({
219482
- success: zod.z.boolean(),
219483
- /** Path of the written .heapsnapshot inside the runner's container/host. */
219484
- path: zod.z.string().optional(),
219485
- /** Process pid that was signalled. */
219486
- pid: zod.z.number().optional(),
219487
- reason: zod.z.string().optional()
219488
- });
219489
219403
  var LoadPointSchema = zod.z.object({
219490
219404
  /** Bucket START, or the snapshot's own timestamp when unreduced. */
219491
219405
  atMs: zod.z.number(),
@@ -219659,19 +219573,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
219659
219573
  * agent's ring alone (`durable: false`). Empty is a legitimate answer: a
219660
219574
  * node nobody has heard from has no series, and saying so is the truth.
219661
219575
  */
219662
- getLoadSeries: require_sleep.method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema),
219663
- /**
219664
- * Tell the addon's forked runner to write a V8 heap snapshot to disk (via
219665
- * SIGUSR2 — the runner's diagnostic handler). Also logs its
219666
- * `process.memoryUsage()` + heap-space breakdown. Resolves the pid from
219667
- * `$process.list`, so it can only reach a runner this node spawned. Use
219668
- * for deep per-addon memory attribution; copy the returned path off the
219669
- * node to analyze.
219670
- */
219671
- dumpHeapSnapshot: require_sleep.method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
219672
- kind: "mutation",
219673
- auth: "admin"
219674
- })
219576
+ getLoadSeries: require_sleep.method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
219675
219577
  }
219676
219578
  };
219677
219579
  var ModelConvertInputSchema = zod.z.object({
@@ -224116,7 +224018,8 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
224116
224018
  "plateCrop",
224117
224019
  "keyFrame",
224118
224020
  "keyFrameSmall",
224119
- "thumbnailSmall"
224021
+ "thumbnailSmall",
224022
+ "sceneFrame"
224120
224023
  ]);
224121
224024
  var MediaFileRefSchema = zod.z.object({
224122
224025
  key: zod.z.string(),
@@ -243349,12 +243252,6 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
243349
243252
  addonId: null,
243350
243253
  access: "view"
243351
243254
  },
243352
- "metricsProvider.dumpHeapSnapshot": {
243353
- capName: "metrics-provider",
243354
- capScope: "system",
243355
- addonId: null,
243356
- access: "create"
243357
- },
243358
243255
  "metricsProvider.getAddonStats": {
243359
243256
  capName: "metrics-provider",
243360
243257
  capScope: "system",
@@ -249719,8 +249616,7 @@ ${recipe.triggers.map((t, i) => emitTrigger(t, i)).join("\n\n")}
249719
249616
  listAddonInstances: (input) => dispatch("metricsProvider", "listAddonInstances", "query", input),
249720
249617
  getAddonStats: (input) => dispatch("metricsProvider", "getAddonStats", "query", input),
249721
249618
  listNodeProcesses: (input) => dispatch("metricsProvider", "listNodeProcesses", "query", input),
249722
- getLoadSeries: (input) => dispatch("metricsProvider", "getLoadSeries", "query", input),
249723
- dumpHeapSnapshot: (input) => dispatch("metricsProvider", "dumpHeapSnapshot", "mutation", input)
249619
+ getLoadSeries: (input) => dispatch("metricsProvider", "getLoadSeries", "query", input)
249724
249620
  },
249725
249621
  mqttBroker: {
249726
249622
  listBrokers: (input) => dispatch("mqttBroker", "listBrokers", "query", input),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "camstack",
3
- "version": "1.2.79",
3
+ "version": "1.2.81",
4
4
  "description": "CLI tool for managing and running CamStack server",
5
5
  "keywords": [
6
6
  "camstack",