@camstack/system 1.2.218 → 1.2.220

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.
Files changed (97) hide show
  1. package/dist/addon-runner.js +2 -2
  2. package/dist/addon-runner.mjs +2 -2
  3. package/dist/addon-utils.js +2 -2
  4. package/dist/addon-utils.mjs +2 -2
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/console-logging/index.js +1 -1
  14. package/dist/builtins/console-logging/index.mjs +1 -1
  15. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  17. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  18. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  19. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  20. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  21. package/dist/builtins/hub-forwarder/index.js +1 -1
  22. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  23. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  24. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  25. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  26. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  27. package/dist/builtins/local-network/local-network.addon.js +2 -2
  28. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  29. package/dist/builtins/loki-logging/index.js +1 -1
  30. package/dist/builtins/loki-logging/index.mjs +1 -1
  31. package/dist/builtins/native-metrics/gpu-probe.d.ts +18 -0
  32. package/dist/builtins/native-metrics/native-metrics-provider.d.ts +1 -1
  33. package/dist/builtins/native-metrics/native-metrics.addon.d.ts +26 -3
  34. package/dist/builtins/native-metrics/native-metrics.addon.js +1320 -1093
  35. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1320 -1096
  36. package/dist/builtins/native-metrics/proc-process-table.d.ts +25 -0
  37. package/dist/builtins/platform-probe/index.js +3 -3
  38. package/dist/builtins/platform-probe/index.mjs +3 -3
  39. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  40. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  41. package/dist/builtins/snapshot/index.js +1 -1
  42. package/dist/builtins/snapshot/index.mjs +1 -1
  43. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  44. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  45. package/dist/builtins/sqlite-storage/sqlite-pragmas.d.ts +23 -0
  46. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +1 -1
  47. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +1 -0
  48. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  49. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  50. package/dist/builtins/sqlite-storage/wal-checkpoint-policy.d.ts +115 -0
  51. package/dist/builtins/sqlite-storage/wal-checkpoint-worker.d.ts +1 -0
  52. package/dist/builtins/sqlite-storage/wal-checkpointer.d.ts +70 -0
  53. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  54. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  55. package/dist/builtins/system-config/system-config.addon.js +1 -1
  56. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  57. package/dist/builtins/winston-logging/index.js +1 -1
  58. package/dist/builtins/winston-logging/index.mjs +1 -1
  59. package/dist/{custom-action-registry-BDwM5qAK.js → custom-action-registry-B42MC_Pv.js} +1 -1
  60. package/dist/{custom-action-registry-CsONUlhC.mjs → custom-action-registry-CpR58DXT.mjs} +1 -1
  61. package/dist/{dist-DigmGsQS.mjs → dist-Ca_jaxXs.mjs} +232 -4
  62. package/dist/{dist-BOlMCOeT.js → dist-CllKpcTd.js} +232 -4
  63. package/dist/index.d.ts +6 -1
  64. package/dist/index.js +99 -65
  65. package/dist/index.mjs +84 -67
  66. package/dist/kernel/gc-census.d.ts +144 -0
  67. package/dist/kernel/heap-watch.d.ts +32 -1
  68. package/dist/kernel/moleculer/mesh-queue-report.d.ts +51 -0
  69. package/dist/kernel/outbound-queue-watch.d.ts +94 -0
  70. package/dist/kernel/socket-plane-report.d.ts +112 -4
  71. package/dist/kernel/transport/cap-action-census.d.ts +218 -0
  72. package/dist/kernel/transport/cap-child-index.d.ts +49 -0
  73. package/dist/kernel/transport/cap-routing-hints.d.ts +21 -0
  74. package/dist/kernel/transport/child-cap-protocol.d.ts +28 -2
  75. package/dist/kernel/transport/frame-codec.d.ts +49 -0
  76. package/dist/kernel/transport/index.d.ts +2 -0
  77. package/dist/kernel/transport/local-child-client.d.ts +7 -0
  78. package/dist/kernel/transport/local-child-registry.d.ts +99 -5
  79. package/dist/kernel/transport/local-transport.d.ts +54 -2
  80. package/dist/kernel/transport/socket-channel.d.ts +40 -1
  81. package/dist/{manifest-system-deps-Bo92lg5u.js → manifest-system-deps-DfpwaXkh.js} +1725 -614
  82. package/dist/{manifest-system-deps-D--wyMD9.mjs → manifest-system-deps-iadzxSBr.mjs} +1850 -841
  83. package/dist/process/proc-stat.d.ts +75 -0
  84. package/dist/process/resource-monitor.d.ts +9 -1
  85. package/dist/{resource-monitor-CdnzxBLP.js → resource-monitor-LVE1BoLs.js} +42 -23
  86. package/dist/{resource-monitor-BWmQ5i-o.mjs → resource-monitor-Vp0bPV3U.mjs} +42 -22
  87. package/dist/{retired-settings-keys-xEAlYnv7.js → retired-settings-keys-7iEsSzmD.js} +1 -1
  88. package/dist/{retired-settings-keys-vK_U-CG2.mjs → retired-settings-keys-DQnfr__p.mjs} +1 -1
  89. package/dist/wal-checkpoint-policy-CAcg63o-.mjs +92 -0
  90. package/dist/wal-checkpoint-policy-CCJZngds.js +127 -0
  91. package/dist/wal-checkpoint-worker.js +138 -0
  92. package/dist/wal-checkpoint-worker.mjs +137 -0
  93. package/package.json +1 -1
  94. package/dist/{event-loop-stall-monitor-DM9OAzy8.js → event-loop-stall-monitor-CAsHdMwP.js} +1 -1
  95. package/dist/{event-loop-stall-monitor-B3CFd9tM.mjs → event-loop-stall-monitor-GPrVvx14.mjs} +1 -1
  96. package/dist/{tls-DOTmtLCW.mjs → tls-2xbgg78V.mjs} +2 -2
  97. package/dist/{tls-BxQlomxd.js → tls-BFs4PzoW.js} +2 -2
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-BOlMCOeT.js");
3
+ const require_dist = require("./dist-CllKpcTd.js");
4
4
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
5
5
  require("./builtins/alerts/index.js");
6
6
  const require_formatter = require("./formatter-DqAKDlvN.js");
@@ -25,25 +25,25 @@ require("./builtins/storage-orchestrator/index.js");
25
25
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
26
26
  require("./builtins/system-config/index.js");
27
27
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
28
- const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-DM9OAzy8.js");
29
- const require_tls$1 = require("./tls-BxQlomxd.js");
30
- const require_manifest_system_deps = require("./manifest-system-deps-Bo92lg5u.js");
31
- const require_resource_monitor = require("./resource-monitor-CdnzxBLP.js");
32
- const require_custom_action_registry = require("./custom-action-registry-BDwM5qAK.js");
28
+ const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-CAsHdMwP.js");
29
+ const require_tls$1 = require("./tls-BFs4PzoW.js");
30
+ const require_manifest_system_deps = require("./manifest-system-deps-DfpwaXkh.js");
31
+ const require_resource_monitor = require("./resource-monitor-LVE1BoLs.js");
32
+ const require_custom_action_registry = require("./custom-action-registry-B42MC_Pv.js");
33
33
  let zod = require("zod");
34
34
  let node_crypto = require("node:crypto");
35
35
  let _camstack_types_node = require("@camstack/types/node");
36
36
  let node_fs_promises = require("node:fs/promises");
37
37
  let node_path = require("node:path");
38
38
  node_path = require_chunk.__toESM(node_path, 1);
39
- let node_child_process = require("node:child_process");
40
- let node_util = require("node:util");
41
- node_util = require_chunk.__toESM(node_util);
42
39
  let node_fs = require("node:fs");
43
40
  let node_fs$1 = require_chunk.__toESM(node_fs, 1);
44
41
  node_fs = require_chunk.__toESM(node_fs);
42
+ let node_child_process = require("node:child_process");
45
43
  let node_os = require("node:os");
46
44
  node_os = require_chunk.__toESM(node_os);
45
+ let node_util = require("node:util");
46
+ node_util = require_chunk.__toESM(node_util);
47
47
  let node_http = require("node:http");
48
48
  let node_vm = require("node:vm");
49
49
  node_vm = require_chunk.__toESM(node_vm);
@@ -78885,16 +78885,36 @@ var require_udp_broadcaster = /* @__PURE__ */ require_chunk.__commonJSMin(((expo
78885
78885
  var require_parser = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, module) => {
78886
78886
  var Writable = require("stream").Writable;
78887
78887
  var { resolvePacketType } = require_constants();
78888
- /**
78889
- * Import types
78890
- *
78891
- * @typedef {import("./parser")} ParserClass
78892
- */
78888
+ /** Moleculer TCP framing: CRC byte, 4-byte BE total length, type byte, payload. */
78889
+ var HEADER_BYTES = 6;
78893
78890
  /**
78894
78891
  * TCP packet parser
78895
78892
  * @class Parser
78896
78893
  * @extends {Writable}
78897
78894
  * @implements {ParserClass}
78895
+ *
78896
+ * ── CamStack patch (D457) — the accumulator is no longer quadratic ─────────
78897
+ *
78898
+ * The shipped `_write` did, ONCE PER SOCKET CHUNK that left a partial packet:
78899
+ *
78900
+ * packet = Buffer.concat([this.buf, chunk]); // copies the whole pending
78901
+ * this.buf = Buffer.from(packet); // copies it AGAIN
78902
+ *
78903
+ * so a message of M bytes arriving in chunks of c copied ~2·M²/2c bytes on the
78904
+ * receiving event loop — quadratic in the chunk COUNT. On CamStack's hub the
78905
+ * mesh carries base64 JPEG cross-node (`pipelineRunner.getNativeCrop`
78906
+ * with `encodeJpeg`, `pipelineRunner.runStatelessStep{frameJpeg}`) at
78907
+ * `maxPacketSize: 10 MiB`, and a 50 s V8 profile of hub-main put **20.8 % of
78908
+ * its busy main thread inside this one function**.
78909
+ *
78910
+ * The fix is the same one CamStack applied to its own UDS `FrameDecoder`:
78911
+ * hold the pending chunks in a LIST, concatenate ONCE when a whole packet is
78912
+ * available, and never at all while one is still incomplete. Everything else —
78913
+ * the framing, the CRC check and its position, the `maxPacketSize` rule
78914
+ * (accumulated bytes, not the declared length, exactly as before), the `data`
78915
+ * event shape, the error text — is byte-for-byte the original behaviour, and
78916
+ * `packages/system/src/kernel/__tests__/moleculer/mesh-tcp-parser.spec.ts`
78917
+ * asserts each of those cases alongside the copy accounting.
78898
78918
  */
78899
78919
  var Parser = class extends Writable {
78900
78920
  /**
@@ -78905,32 +78925,44 @@ var require_parser = /* @__PURE__ */ require_chunk.__commonJSMin(((exports, modu
78905
78925
  constructor(options, maxPacketSize) {
78906
78926
  super(options);
78907
78927
  this.maxPacketSize = maxPacketSize;
78908
- this.buf = null;
78928
+ /** Pending chunks, newest last. Never concatenated until a packet completes. */
78929
+ this.bufs = [];
78930
+ /** Total bytes across `bufs` — the old `this.buf.length`. */
78931
+ this.bufLen = 0;
78932
+ }
78933
+ /** The first `HEADER_BYTES` pending bytes, without flattening the rest. */
78934
+ _header() {
78935
+ const first = this.bufs[0];
78936
+ if (first.length >= HEADER_BYTES) return first;
78937
+ const head = Buffer.allocUnsafe(HEADER_BYTES);
78938
+ let written = 0;
78939
+ for (let i = 0; i < this.bufs.length && written < HEADER_BYTES; i++) {
78940
+ const b = this.bufs[i];
78941
+ const take = Math.min(HEADER_BYTES - written, b.length);
78942
+ b.copy(head, written, 0, take);
78943
+ written += take;
78944
+ }
78945
+ return head;
78909
78946
  }
78910
78947
  _write(chunk, encoding, cb) {
78911
- let packet = chunk;
78912
- if (this.buf && this.buf.length > 0) {
78913
- packet = Buffer.concat([this.buf, chunk]);
78914
- this.buf = null;
78915
- }
78916
- while (packet.length > 0) {
78917
- if (packet.length < 6) {
78918
- this.buf = Buffer.from(packet);
78919
- return cb();
78920
- }
78921
- if (this.maxPacketSize && packet.length > this.maxPacketSize) return cb(/* @__PURE__ */ new Error(`Incoming packet is larger than the 'maxPacketSize' limit (${packet.length} > ${this.maxPacketSize})!`));
78922
- const crc = packet[1] ^ packet[2] ^ packet[3] ^ packet[4] ^ packet[5];
78923
- if (crc !== packet[0]) return cb(/* @__PURE__ */ new Error("Invalid packet CRC! " + crc));
78924
- const length = packet.readInt32BE(1);
78925
- if (packet.length >= length) {
78926
- const msg = packet.slice(6, length);
78927
- const type = resolvePacketType(packet[5]);
78928
- this.emit("data", type, msg);
78929
- packet = packet.slice(length);
78930
- } else {
78931
- this.buf = Buffer.from(packet);
78932
- return cb();
78933
- }
78948
+ if (this.bufLen > 0) this.bufs.push(chunk);
78949
+ else this.bufs = [chunk];
78950
+ this.bufLen += chunk.length;
78951
+ while (this.bufLen > 0) {
78952
+ if (this.bufLen < HEADER_BYTES) return cb();
78953
+ if (this.maxPacketSize && this.bufLen > this.maxPacketSize) return cb(/* @__PURE__ */ new Error(`Incoming packet is larger than the 'maxPacketSize' limit (${this.bufLen} > ${this.maxPacketSize})!`));
78954
+ const header = this._header();
78955
+ const crc = header[1] ^ header[2] ^ header[3] ^ header[4] ^ header[5];
78956
+ if (crc !== header[0]) return cb(/* @__PURE__ */ new Error("Invalid packet CRC! " + crc));
78957
+ const length = header.readInt32BE(1);
78958
+ if (this.bufLen < length) return cb();
78959
+ const packet = this.bufs.length === 1 ? this.bufs[0] : Buffer.concat(this.bufs, this.bufLen);
78960
+ const msg = packet.slice(HEADER_BYTES, length);
78961
+ const type = resolvePacketType(packet[5]);
78962
+ this.emit("data", type, msg);
78963
+ const rest = packet.slice(length);
78964
+ this.bufs = rest.length > 0 ? [rest] : [];
78965
+ this.bufLen = rest.length;
78934
78966
  }
78935
78967
  cb();
78936
78968
  }
@@ -94700,35 +94732,20 @@ function forceMoleculerDisconnect(broker, nodeId) {
94700
94732
  nodes.delete(nodeId);
94701
94733
  } catch {}
94702
94734
  }
94703
- /** Read CPU% and RSS for a set of PIDs via `ps`. */
94735
+ /**
94736
+ * CPU% and RSS for a set of PIDs — `/proc` on Linux, `ps -p` elsewhere.
94737
+ * One reader for the whole kernel (`process/resource-monitor.ts`): this used
94738
+ * to be a second `ps` fork of its own, from hub-main, on every
94739
+ * `$process.list` (D452).
94740
+ */
94704
94741
  async function getPidStats$1(pids) {
94705
- if (pids.length === 0) return /* @__PURE__ */ new Map();
94706
- return new Promise((resolve) => {
94707
- (0, node_child_process.execFile)("ps", [
94708
- "-o",
94709
- "pid=,pcpu=,rss=",
94710
- "-p",
94711
- pids.join(",")
94712
- ], { timeout: 5e3 }, (err, stdout) => {
94713
- const result = /* @__PURE__ */ new Map();
94714
- if (err || !stdout) {
94715
- resolve(result);
94716
- return;
94717
- }
94718
- for (const line of stdout.trim().split("\n")) {
94719
- const parts = line.trim().split(/\s+/);
94720
- if (parts.length < 3) continue;
94721
- const pid = parseInt(parts[0], 10);
94722
- const cpu = parseFloat(parts[1]);
94723
- const rssKb = parseInt(parts[2], 10);
94724
- if (!isNaN(pid) && !isNaN(cpu) && !isNaN(rssKb)) result.set(pid, {
94725
- cpu: Math.round(cpu * 10) / 10,
94726
- memoryRss: rssKb * 1024
94727
- });
94728
- }
94729
- resolve(result);
94730
- });
94742
+ const stats = await require_resource_monitor.getPidStats(pids);
94743
+ const result = /* @__PURE__ */ new Map();
94744
+ for (const [pid, s] of stats) result.set(pid, {
94745
+ cpu: s.cpu,
94746
+ memoryRss: s.memory
94731
94747
  });
94748
+ return result;
94732
94749
  }
94733
94750
  var EMPTY_HEAP_DECLARATION = {
94734
94751
  profile: void 0,
@@ -95792,6 +95809,8 @@ exports.AddonRouteRegistry = AddonRouteRegistry;
95792
95809
  exports.AlertCenterAddon = require_builtins_alerts_alerts_addon.AlertCenterAddon;
95793
95810
  exports.ApiKeyManager = require_builtins_local_auth_local_auth_addon.ApiKeyManager;
95794
95811
  exports.AuthManager = require_builtins_local_auth_local_auth_addon.AuthManager;
95812
+ exports.CAP_ACTION_OVERFLOW_LABEL = require_manifest_system_deps.CAP_ACTION_OVERFLOW_LABEL;
95813
+ exports.CAP_ACTION_UNLABELLED = require_manifest_system_deps.CAP_ACTION_UNLABELLED;
95795
95814
  exports.CA_COMMON_NAME = require_tls$1.CA_COMMON_NAME;
95796
95815
  exports.CA_VALIDITY_DAYS = require_tls$1.CA_VALIDITY_DAYS;
95797
95816
  exports.CLUSTER_SECRET_MISMATCH_TYPE = CLUSTER_SECRET_MISMATCH_TYPE;
@@ -95819,6 +95838,7 @@ exports.DataPlaneRegistry = DataPlaneRegistry;
95819
95838
  exports.DeviceManagerAddon = require_builtins_device_manager_device_manager_addon.DeviceManagerAddon;
95820
95839
  exports.DeviceRegistry = require_manifest_system_deps.DeviceRegistry;
95821
95840
  exports.DeviceStore = require_builtins_sqlite_storage_index.DeviceStore$1;
95841
+ exports.EMPTY_CAP_ACTION_READING = require_manifest_system_deps.EMPTY_CAP_ACTION_READING;
95822
95842
  exports.EMPTY_SOCKET_DIRECTION = require_manifest_system_deps.EMPTY_SOCKET_DIRECTION;
95823
95843
  exports.EMPTY_SOCKET_PLANE_BASELINE = require_manifest_system_deps.EMPTY_SOCKET_PLANE_BASELINE;
95824
95844
  exports.EVENT_PLANE_TOP_N = require_manifest_system_deps.EVENT_PLANE_TOP_N;
@@ -95863,7 +95883,9 @@ exports.LogRingBuffer = LogRingBuffer;
95863
95883
  exports.LoggingGate = LoggingGate;
95864
95884
  exports.LokiDestination = require_builtins_loki_logging_index.LokiDestination$1;
95865
95885
  exports.LokiLoggingAddon = require_builtins_loki_logging_index.LokiLoggingAddon$1;
95886
+ exports.MAX_CAP_ACTIONS_PER_PEER = require_manifest_system_deps.MAX_CAP_ACTIONS_PER_PEER;
95866
95887
  exports.MAX_LEAF_VALIDITY_DAYS = require_tls$1.MAX_LEAF_VALIDITY_DAYS;
95888
+ exports.MESH_QUEUE_TOP_N = require_manifest_system_deps.MESH_QUEUE_TOP_N;
95867
95889
  exports.METHOD_ACCESS_MAP = require_dist.METHOD_ACCESS_MAP;
95868
95890
  exports.ModelDownloadService = require_event_loop_stall_monitor.ModelDownloadService;
95869
95891
  exports.NATIVE_PROVIDER_SERVICE_INFIX = require_manifest_system_deps.NATIVE_PROVIDER_SERVICE_INFIX;
@@ -95872,6 +95894,9 @@ exports.NativeMetricsAddon = require_builtins_native_metrics_native_metrics_addo
95872
95894
  exports.NativeMetricsProvider = require_builtins_native_metrics_native_metrics_addon.NativeMetricsProvider;
95873
95895
  exports.NetworkQualityTracker = NetworkQualityTracker;
95874
95896
  exports.NotificationService = NotificationService;
95897
+ exports.OUTBOUND_QUEUE_COOLDOWN_MS = require_manifest_system_deps.OUTBOUND_QUEUE_COOLDOWN_MS;
95898
+ exports.OUTBOUND_QUEUE_SUSTAIN_MS = require_manifest_system_deps.OUTBOUND_QUEUE_SUSTAIN_MS;
95899
+ exports.OUTBOUND_QUEUE_THRESHOLD_BYTES = require_manifest_system_deps.OUTBOUND_QUEUE_THRESHOLD_BYTES;
95875
95900
  exports.PARENT_ROUTED_PROVIDER_ADDON_ID = require_manifest_system_deps.PARENT_ROUTED_PROVIDER_ADDON_ID;
95876
95901
  Object.defineProperty(exports, "PYTHON_VERSION", {
95877
95902
  enumerable: true,
@@ -95895,6 +95920,7 @@ exports.ReplEngine = ReplEngine;
95895
95920
  exports.RingBuffer = RingBuffer;
95896
95921
  exports.SERVER_AUTH_OID = require_tls$1.SERVER_AUTH_OID;
95897
95922
  exports.SOCKET_PLANE_TOP_N = require_manifest_system_deps.SOCKET_PLANE_TOP_N;
95923
+ exports.SOCKET_QUEUE_TOP_N = require_manifest_system_deps.SOCKET_QUEUE_TOP_N;
95898
95924
  exports.STALL_REPORT_MS = require_event_loop_stall_monitor.STALL_REPORT_MS;
95899
95925
  exports.STALL_TICK_MS = require_event_loop_stall_monitor.STALL_TICK_MS;
95900
95926
  exports.ScopedLogger = ScopedLogger;
@@ -95946,6 +95972,7 @@ exports.builderMountedCapNames = builderMountedCapNames;
95946
95972
  exports.callRegisterNodeWithRetry = callRegisterNodeWithRetry;
95947
95973
  exports.callWithServiceDiscovery = require_manifest_system_deps.callWithServiceDiscovery;
95948
95974
  exports.canServeDataPlane = canServeDataPlane;
95975
+ exports.capActionLabel = require_manifest_system_deps.capActionLabel;
95949
95976
  exports.capActionName = require_manifest_system_deps.capActionName;
95950
95977
  exports.capActionSuffix = require_manifest_system_deps.capActionSuffix;
95951
95978
  exports.capBareAction = require_manifest_system_deps.capBareAction;
@@ -95968,6 +95995,7 @@ exports.createArrayBufferCensusGate = require_manifest_system_deps.createArrayBu
95968
95995
  exports.createAuthenticatedFileServer = require_event_loop_stall_monitor.createAuthenticatedFileServer;
95969
95996
  exports.createBroker = createBroker;
95970
95997
  exports.createBrokerDeviceManagerApi = require_manifest_system_deps.createBrokerDeviceManagerApi;
95998
+ exports.createCapActionCensus = require_manifest_system_deps.createCapActionCensus;
95971
95999
  exports.createCoreCapService = createCoreCapService;
95972
96000
  exports.createDeferredHeapWatchSink = require_manifest_system_deps.createDeferredHeapWatchSink;
95973
96001
  exports.createDoorSettingsView = createDoorSettingsView;
@@ -95980,6 +96008,8 @@ exports.createInspectorArrayBufferCensus = require_manifest_system_deps.createIn
95980
96008
  exports.createKernelHwAccel = require_manifest_system_deps.createKernelHwAccel;
95981
96009
  exports.createLocalTransport = require_manifest_system_deps.createLocalTransport;
95982
96010
  exports.createLoopDelayMeter = require_manifest_system_deps.createLoopDelayMeter;
96011
+ exports.createMeshQueueReader = require_manifest_system_deps.createMeshQueueReader;
96012
+ exports.createOutboundQueueGate = require_manifest_system_deps.createOutboundQueueGate;
95983
96013
  exports.createParentUnownedCallHandler = require_manifest_system_deps.createParentUnownedCallHandler;
95984
96014
  exports.createProcessService = createProcessService;
95985
96015
  exports.createReadinessService = createReadinessService;
@@ -96000,6 +96030,7 @@ exports.deriveAgentListenPort = deriveAgentListenPort;
96000
96030
  exports.describeProviderKindDrift = describeProviderKindDrift;
96001
96031
  exports.describeRss = require_manifest_system_deps.describeRss;
96002
96032
  exports.detectWorkspacePackagesDir = detectWorkspacePackagesDir;
96033
+ exports.diffCapActionCensus = require_manifest_system_deps.diffCapActionCensus;
96003
96034
  exports.diffEventPlane = require_manifest_system_deps.diffEventPlane;
96004
96035
  exports.diffSocketPlane = require_manifest_system_deps.diffSocketPlane;
96005
96036
  Object.defineProperty(exports, "downloadBinary", {
@@ -96050,6 +96081,8 @@ exports.formatArrayBufferCensus = require_manifest_system_deps.formatArrayBuffer
96050
96081
  exports.formatEventPlane = require_manifest_system_deps.formatEventPlane;
96051
96082
  exports.formatHeapSpaces = require_manifest_system_deps.formatHeapSpaces;
96052
96083
  exports.formatLogLine = require_formatter.formatLogLine;
96084
+ exports.formatMeshQueue = require_manifest_system_deps.formatMeshQueue;
96085
+ exports.formatOutboundQueueVerdict = require_manifest_system_deps.formatOutboundQueueVerdict;
96053
96086
  exports.formatSocketPlane = require_manifest_system_deps.formatSocketPlane;
96054
96087
  exports.getBrokerEventBus = require_manifest_system_deps.getBrokerEventBus;
96055
96088
  exports.getCapUsageRegistry = require_manifest_system_deps.getCapUsageRegistry;
@@ -96127,6 +96160,7 @@ exports.readHeapSpaces = require_manifest_system_deps.readHeapSpaces;
96127
96160
  exports.readLanHttpState = require_tls$1.readLanHttpState;
96128
96161
  exports.readMoleculerFanoutMode = require_manifest_system_deps.readMoleculerFanoutMode;
96129
96162
  exports.readPendingRestart = readPendingRestart;
96163
+ exports.readSocketQueues = require_manifest_system_deps.readSocketQueues;
96130
96164
  exports.readTlsAccessStatus = require_tls$1.readTlsAccessStatus;
96131
96165
  exports.readTlsMode = require_tls$1.readTlsMode;
96132
96166
  exports.readinessKey = require_dist.readinessKey;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
2
- import { A as addonSettingsCapability, Dt as procedureAuthKey, Ft as scopesAllowDeviceCap, Jt as errMsg$1, Mt as resolveMethodAuth, Pt as scopesAllowAddon, Qt as DEVICE_STATUS_METHOD, Xt as DATAPLANE_SECRET_HEADER$1, Zt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, _ as RUNTIME_DEFAULTS, _n as readinessKey, _t as logLevelAtMost, an as asJsonObject$1, at as isArrayOutputSchema, cn as createEvent, ct as isObjectInput, dn as expandCapMethods, dt as isVoidInput, ft as kebabToCamel, gn as parseJsonUnknown, h as METHOD_ACCESS_MAP, hn as parseJsonObject, ln as emitDownForOwnedCaps, mt as lifecycleJobSchema, nn as ReadinessRegistry, on as asNumber, ot as isCollectionArrayMethod, p as LOG_LEVEL_RANK, rn as ReadinessTimeoutError, sn as asString$1, t as ALL_CAPABILITY_DEFINITIONS, tt as extractNestedAddonId, vn as resolveCapMount, vt as looseSchema, wt as objectInputDeclaresAddonId, xn as EventCategory$1, yn as scopeKey } from "./dist-DigmGsQS.mjs";
2
+ import { A as addonSettingsCapability, Dt as procedureAuthKey, Ft as scopesAllowDeviceCap, Jt as errMsg$1, Mt as resolveMethodAuth, Pt as scopesAllowAddon, Qt as DEVICE_STATUS_METHOD, Xt as DATAPLANE_SECRET_HEADER$1, Zt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, _ as RUNTIME_DEFAULTS, _n as readinessKey, _t as logLevelAtMost, an as asJsonObject$1, at as isArrayOutputSchema, cn as createEvent, ct as isObjectInput, dn as expandCapMethods, dt as isVoidInput, ft as kebabToCamel, gn as parseJsonUnknown, h as METHOD_ACCESS_MAP, hn as parseJsonObject, ln as emitDownForOwnedCaps, mt as lifecycleJobSchema, nn as ReadinessRegistry, on as asNumber, ot as isCollectionArrayMethod, p as LOG_LEVEL_RANK, rn as ReadinessTimeoutError, sn as asString$1, t as ALL_CAPABILITY_DEFINITIONS, tt as extractNestedAddonId, vn as resolveCapMount, vt as looseSchema, wt as objectInputDeclaresAddonId, xn as EventCategory$1, yn as scopeKey } from "./dist-Ca_jaxXs.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
@@ -14,7 +14,7 @@ import "./builtins/liveness-monitor/index.mjs";
14
14
  import { LocalAuthAddon, a as require_safe_buffer, i as require_ms, n as ScopedTokenManager, o as ApiKeyManager, r as AuthManager, t as UserManager } from "./builtins/local-auth/local-auth.addon.mjs";
15
15
  import "./builtins/local-auth/index.mjs";
16
16
  import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index.mjs";
17
- import NativeMetricsAddon, { t as NativeMetricsProvider } from "./builtins/native-metrics/native-metrics.addon.mjs";
17
+ import NativeMetricsAddon, { a as NativeMetricsProvider } from "./builtins/native-metrics/native-metrics.addon.mjs";
18
18
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
19
19
  import { SqliteSettingsAddon, o as SqliteSettingsBackend, s as prefixRange } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
20
20
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
@@ -24,23 +24,23 @@ import "./builtins/storage-orchestrator/index.mjs";
24
24
  import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.mjs";
25
25
  import "./builtins/system-config/index.mjs";
26
26
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
27
- import { _ as fetchJson, a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, f as collectModelFiles, g as ensureModel, h as downloadModel, i as startEventLoopStallMonitor, l as parseTokenizedUrl, m as downloadFile, n as STALL_TICK_MS, o as contentTypeFor, p as deleteModelFromDisk, r as attributeStall, s as createAuthenticatedFileServer, t as STALL_REPORT_MS, u as resolveFilePath, v as getModelFilePath, y as isModelDownloaded } from "./event-loop-stall-monitor-B3CFd9tM.mjs";
28
- import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-DOTmtLCW.mjs";
29
- import { $ as buildUdsNativeCapProxy, $t as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, A as createUdsLoggerWithControl, At as HUB_MAIN_RSS_BUDGET_MB, B as readMoleculerFanoutMode, Bt as createV8Reclaimer, C as ipcParentLink, Cn as EVENT_PLANE_TOP_N, Ct as createAddonDataPlaneFacility, D as createUdsEventBus, Dn as formatEventPlane, Dt as HEAP_WATCH_INTERVAL_MS, E as createUdsEventBridge, En as diffEventPlane, Et as HEAP_RECLAIM_TRIGGER_MB, F as AGENT_CAP_FWD_SERVICE, Ft as RUNNER_RSS_BUDGET_ENV, G as createLocalTransport, Gt as reclaimIntervalMs, H as PARENT_ROUTED_PROVIDER_ADDON_ID, Ht as hubMainRssBudget, I as CapRouteResolver, It as ZERO_LOOP_DELAY, J as SocketChannel, Jt as startRunnerHeapWatch, K as UdsLocalTransportClient, Kt as shouldReclaim, L as CapRouteError, Lt as buildHeapSample, M as LocalChildRegistry, Mt as RSS_BUDGET_REANNOUNCE_MIN_MS, N as UDS_NO_ROUTE_PREFIX, Nt as RSS_BUDGET_RELEASE_RATIO, O as udsChildLogToWorkerEntry, Ot as HEAP_WATCH_WARN_RATIO, P as AGENT_CAP_FWD_ACTION, Pt as RUNNER_HEAP_WATCH_INTERVAL_MS, Q as buildNativeCapProxy, Qt as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, R as classifyCapRoute, Rt as createDeferredHeapWatchSink, S as buildLinkChain, Sn as socketDirectionMessages, St as runNpm, T as createParentUnownedCallHandler, Tn as createEventPlaneReader, Tt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, U as __resetCapUsageRegistryForTests, Ut as nextRssBudgetState, V as CapUsageRegistry, Vt as describeRss, W as getCapUsageRegistry, Wt as parseRssBudgetMb, X as FrameDecoder, Xt as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, Y as localEndpointPath, Yt as strandedMb, Z as encodeFrame, Zt as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, _ as AddonDepsManager, _n as EMPTY_SOCKET_DIRECTION, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as HEAP_SPACE_REPORT_MIN_MB, at as createAddonService, b as brokerCallForCap, bn as sampleSocketDirection, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as heapSpaceField, ct as capActionName, d as clusterEventTopic, dn as EMPTY_SOCKET_PLANE_BASELINE, dt as capServiceName, en as createArrayBufferCensusGate, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as SOCKET_PLANE_TOP_N, ft as parseCapAction, g as subscribePassthrough, gn as formatSocketPlane, gt as CapabilityHandle, h as setNodeEventInterest, hn as diffSocketPlane, ht as DeviceRegistry, i as createAddonContext, in as DECISIVE_HEAP_SPACES, j as LocalChildClient, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as readHeapSpaces, lt as capActionSuffix, m as registerEventBusService, mn as createSocketPlaneReader, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as formatArrayBufferCensus, o as getWorkerDeviceRegistry, on as emitHeapDiagnosticReport, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as createSocketPlaneMeter, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as isArrayBufferCensusReport, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as formatHeapSpaces, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as createInspectorArrayBufferCensus, u as EVENT_TOPIC_PREFIX, un as selectReportedSpaces, ut as capBareAction, v as createKernelHwAccel, vn as createSocketDirectionCounters, vt as copyBundledNativeModules, w as localProviderLink, wn as createEventPlaneMeter, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xn as socketDirectionBytes, xt as resolveNpmInvocation, y as resolveHwAccel, yn as recordSocketFrame, yt as installManifestNativeDeps, z as callWithServiceDiscovery, zt as createLoopDelayMeter } from "./manifest-system-deps-D--wyMD9.mjs";
30
- import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
31
- import { t as CustomActionRegistry } from "./custom-action-registry-CsONUlhC.mjs";
27
+ import { _ as fetchJson, a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, f as collectModelFiles, g as ensureModel, h as downloadModel, i as startEventLoopStallMonitor, l as parseTokenizedUrl, m as downloadFile, n as STALL_TICK_MS, o as contentTypeFor, p as deleteModelFromDisk, r as attributeStall, s as createAuthenticatedFileServer, t as STALL_REPORT_MS, u as resolveFilePath, v as getModelFilePath, y as isModelDownloaded } from "./event-loop-stall-monitor-GPrVvx14.mjs";
28
+ import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-2xbgg78V.mjs";
29
+ import { $ as buildUdsNativeCapProxy, $t as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, A as createUdsLoggerWithControl, An as sampleSocketDirection, At as HUB_MAIN_RSS_BUDGET_MB, B as readMoleculerFanoutMode, Bn as EVENT_PLANE_TOP_N, Bt as createV8Reclaimer, C as ipcParentLink, Cn as createSocketPlaneReader, Ct as createAddonDataPlaneFacility, D as createUdsEventBus, Dn as EMPTY_SOCKET_DIRECTION, Dt as HEAP_WATCH_INTERVAL_MS, E as createUdsEventBridge, En as readSocketQueues, Et as HEAP_RECLAIM_TRIGGER_MB, F as CapRouteError, Fn as EMPTY_CAP_ACTION_READING, Ft as RUNNER_RSS_BUDGET_ENV, G as createLocalTransport, Gt as reclaimIntervalMs, H as PARENT_ROUTED_PROVIDER_ADDON_ID, Hn as createEventPlaneReader, Ht as hubMainRssBudget, I as classifyCapRoute, In as MAX_CAP_ACTIONS_PER_PEER, It as ZERO_LOOP_DELAY, J as SocketChannel, Jt as startRunnerHeapWatch, K as UdsLocalTransportClient, Kt as shouldReclaim, L as LocalChildClient, Ln as capActionLabel, Lt as buildHeapSample, M as AGENT_CAP_FWD_SERVICE, Mn as socketDirectionMessages, Mt as RSS_BUDGET_REANNOUNCE_MIN_MS, N as CapRouteResolver, Nn as CAP_ACTION_OVERFLOW_LABEL, Nt as RSS_BUDGET_RELEASE_RATIO, O as udsChildLogToWorkerEntry, On as createSocketDirectionCounters, Ot as HEAP_WATCH_WARN_RATIO, P as callWithServiceDiscovery, Pn as CAP_ACTION_UNLABELLED, Pt as RUNNER_HEAP_WATCH_INTERVAL_MS, Q as buildNativeCapProxy, Qt as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, R as LocalChildRegistry, Rn as createCapActionCensus, Rt as createDeferredHeapWatchSink, S as buildLinkChain, Sn as createSocketPlaneMeter, St as runNpm, T as createParentUnownedCallHandler, Tn as formatSocketPlane, Tt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, U as __resetCapUsageRegistryForTests, Un as diffEventPlane, Ut as nextRssBudgetState, V as CapUsageRegistry, Vn as createEventPlaneMeter, Vt as describeRss, W as getCapUsageRegistry, Wn as formatEventPlane, Wt as parseRssBudgetMb, X as FrameDecoder, Xt as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, Y as localEndpointPath, Yt as strandedMb, Z as encodeFrame, Zt as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, _ as AddonDepsManager, _n as createMeshQueueReader, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as HEAP_SPACE_REPORT_MIN_MB, at as createAddonService, b as brokerCallForCap, bn as SOCKET_PLANE_TOP_N, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as heapSpaceField, ct as capActionName, d as clusterEventTopic, dn as OUTBOUND_QUEUE_COOLDOWN_MS, dt as capServiceName, en as createArrayBufferCensusGate, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as OUTBOUND_QUEUE_SUSTAIN_MS, ft as parseCapAction, g as subscribePassthrough, gn as MESH_QUEUE_TOP_N, gt as CapabilityHandle, h as setNodeEventInterest, hn as formatOutboundQueueVerdict, ht as DeviceRegistry, i as createAddonContext, in as DECISIVE_HEAP_SPACES, j as AGENT_CAP_FWD_ACTION, jn as socketDirectionBytes, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kn as recordSocketFrame, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as readHeapSpaces, lt as capActionSuffix, m as registerEventBusService, mn as createOutboundQueueGate, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as formatArrayBufferCensus, o as getWorkerDeviceRegistry, on as emitHeapDiagnosticReport, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as OUTBOUND_QUEUE_THRESHOLD_BYTES, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as isArrayBufferCensusReport, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as formatHeapSpaces, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as createInspectorArrayBufferCensus, u as EVENT_TOPIC_PREFIX, un as selectReportedSpaces, ut as capBareAction, v as createKernelHwAccel, vn as formatMeshQueue, vt as copyBundledNativeModules, w as localProviderLink, wn as diffSocketPlane, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xn as SOCKET_QUEUE_TOP_N, xt as resolveNpmInvocation, y as resolveHwAccel, yn as EMPTY_SOCKET_PLANE_BASELINE, yt as installManifestNativeDeps, z as UDS_NO_ROUTE_PREFIX, zn as diffCapActionCensus, zt as createLoopDelayMeter } from "./manifest-system-deps-iadzxSBr.mjs";
30
+ import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Vp0bPV3U.mjs";
31
+ import { t as CustomActionRegistry } from "./custom-action-registry-CpR58DXT.mjs";
32
32
  import { z } from "zod";
33
33
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
34
34
  import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
35
35
  import { lstat, readdir, readlink, realpath } from "node:fs/promises";
36
36
  import * as path$39 from "node:path";
37
37
  import { dirname, isAbsolute, join, posix, resolve, win32 } from "node:path";
38
- import { execFile, spawn } from "node:child_process";
39
- import * as util$10 from "node:util";
40
- import { promisify } from "node:util";
41
38
  import * as fs$17 from "node:fs";
42
39
  import { accessSync, constants, existsSync } from "node:fs";
40
+ import { execFile, spawn } from "node:child_process";
43
41
  import * as os$18 from "node:os";
42
+ import * as util$10 from "node:util";
43
+ import { promisify } from "node:util";
44
44
  import { request } from "node:http";
45
45
  import * as vm from "node:vm";
46
46
  import { asJsonObject, errMsg } from "@camstack/types/addon";
@@ -78878,16 +78878,36 @@ var require_udp_broadcaster = /* @__PURE__ */ __commonJSMin$1(((exports, module)
78878
78878
  var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
78879
78879
  var Writable = __require("stream").Writable;
78880
78880
  var { resolvePacketType } = require_constants();
78881
- /**
78882
- * Import types
78883
- *
78884
- * @typedef {import("./parser")} ParserClass
78885
- */
78881
+ /** Moleculer TCP framing: CRC byte, 4-byte BE total length, type byte, payload. */
78882
+ var HEADER_BYTES = 6;
78886
78883
  /**
78887
78884
  * TCP packet parser
78888
78885
  * @class Parser
78889
78886
  * @extends {Writable}
78890
78887
  * @implements {ParserClass}
78888
+ *
78889
+ * ── CamStack patch (D457) — the accumulator is no longer quadratic ─────────
78890
+ *
78891
+ * The shipped `_write` did, ONCE PER SOCKET CHUNK that left a partial packet:
78892
+ *
78893
+ * packet = Buffer.concat([this.buf, chunk]); // copies the whole pending
78894
+ * this.buf = Buffer.from(packet); // copies it AGAIN
78895
+ *
78896
+ * so a message of M bytes arriving in chunks of c copied ~2·M²/2c bytes on the
78897
+ * receiving event loop — quadratic in the chunk COUNT. On CamStack's hub the
78898
+ * mesh carries base64 JPEG cross-node (`pipelineRunner.getNativeCrop`
78899
+ * with `encodeJpeg`, `pipelineRunner.runStatelessStep{frameJpeg}`) at
78900
+ * `maxPacketSize: 10 MiB`, and a 50 s V8 profile of hub-main put **20.8 % of
78901
+ * its busy main thread inside this one function**.
78902
+ *
78903
+ * The fix is the same one CamStack applied to its own UDS `FrameDecoder`:
78904
+ * hold the pending chunks in a LIST, concatenate ONCE when a whole packet is
78905
+ * available, and never at all while one is still incomplete. Everything else —
78906
+ * the framing, the CRC check and its position, the `maxPacketSize` rule
78907
+ * (accumulated bytes, not the declared length, exactly as before), the `data`
78908
+ * event shape, the error text — is byte-for-byte the original behaviour, and
78909
+ * `packages/system/src/kernel/__tests__/moleculer/mesh-tcp-parser.spec.ts`
78910
+ * asserts each of those cases alongside the copy accounting.
78891
78911
  */
78892
78912
  var Parser = class extends Writable {
78893
78913
  /**
@@ -78898,32 +78918,44 @@ var require_parser = /* @__PURE__ */ __commonJSMin$1(((exports, module) => {
78898
78918
  constructor(options, maxPacketSize) {
78899
78919
  super(options);
78900
78920
  this.maxPacketSize = maxPacketSize;
78901
- this.buf = null;
78921
+ /** Pending chunks, newest last. Never concatenated until a packet completes. */
78922
+ this.bufs = [];
78923
+ /** Total bytes across `bufs` — the old `this.buf.length`. */
78924
+ this.bufLen = 0;
78925
+ }
78926
+ /** The first `HEADER_BYTES` pending bytes, without flattening the rest. */
78927
+ _header() {
78928
+ const first = this.bufs[0];
78929
+ if (first.length >= HEADER_BYTES) return first;
78930
+ const head = Buffer.allocUnsafe(HEADER_BYTES);
78931
+ let written = 0;
78932
+ for (let i = 0; i < this.bufs.length && written < HEADER_BYTES; i++) {
78933
+ const b = this.bufs[i];
78934
+ const take = Math.min(HEADER_BYTES - written, b.length);
78935
+ b.copy(head, written, 0, take);
78936
+ written += take;
78937
+ }
78938
+ return head;
78902
78939
  }
78903
78940
  _write(chunk, encoding, cb) {
78904
- let packet = chunk;
78905
- if (this.buf && this.buf.length > 0) {
78906
- packet = Buffer.concat([this.buf, chunk]);
78907
- this.buf = null;
78908
- }
78909
- while (packet.length > 0) {
78910
- if (packet.length < 6) {
78911
- this.buf = Buffer.from(packet);
78912
- return cb();
78913
- }
78914
- if (this.maxPacketSize && packet.length > this.maxPacketSize) return cb(/* @__PURE__ */ new Error(`Incoming packet is larger than the 'maxPacketSize' limit (${packet.length} > ${this.maxPacketSize})!`));
78915
- const crc = packet[1] ^ packet[2] ^ packet[3] ^ packet[4] ^ packet[5];
78916
- if (crc !== packet[0]) return cb(/* @__PURE__ */ new Error("Invalid packet CRC! " + crc));
78917
- const length = packet.readInt32BE(1);
78918
- if (packet.length >= length) {
78919
- const msg = packet.slice(6, length);
78920
- const type = resolvePacketType(packet[5]);
78921
- this.emit("data", type, msg);
78922
- packet = packet.slice(length);
78923
- } else {
78924
- this.buf = Buffer.from(packet);
78925
- return cb();
78926
- }
78941
+ if (this.bufLen > 0) this.bufs.push(chunk);
78942
+ else this.bufs = [chunk];
78943
+ this.bufLen += chunk.length;
78944
+ while (this.bufLen > 0) {
78945
+ if (this.bufLen < HEADER_BYTES) return cb();
78946
+ if (this.maxPacketSize && this.bufLen > this.maxPacketSize) return cb(/* @__PURE__ */ new Error(`Incoming packet is larger than the 'maxPacketSize' limit (${this.bufLen} > ${this.maxPacketSize})!`));
78947
+ const header = this._header();
78948
+ const crc = header[1] ^ header[2] ^ header[3] ^ header[4] ^ header[5];
78949
+ if (crc !== header[0]) return cb(/* @__PURE__ */ new Error("Invalid packet CRC! " + crc));
78950
+ const length = header.readInt32BE(1);
78951
+ if (this.bufLen < length) return cb();
78952
+ const packet = this.bufs.length === 1 ? this.bufs[0] : Buffer.concat(this.bufs, this.bufLen);
78953
+ const msg = packet.slice(HEADER_BYTES, length);
78954
+ const type = resolvePacketType(packet[5]);
78955
+ this.emit("data", type, msg);
78956
+ const rest = packet.slice(length);
78957
+ this.bufs = rest.length > 0 ? [rest] : [];
78958
+ this.bufLen = rest.length;
78927
78959
  }
78928
78960
  cb();
78929
78961
  }
@@ -94693,35 +94725,20 @@ function forceMoleculerDisconnect(broker, nodeId) {
94693
94725
  nodes.delete(nodeId);
94694
94726
  } catch {}
94695
94727
  }
94696
- /** Read CPU% and RSS for a set of PIDs via `ps`. */
94728
+ /**
94729
+ * CPU% and RSS for a set of PIDs — `/proc` on Linux, `ps -p` elsewhere.
94730
+ * One reader for the whole kernel (`process/resource-monitor.ts`): this used
94731
+ * to be a second `ps` fork of its own, from hub-main, on every
94732
+ * `$process.list` (D452).
94733
+ */
94697
94734
  async function getPidStats$1(pids) {
94698
- if (pids.length === 0) return /* @__PURE__ */ new Map();
94699
- return new Promise((resolve) => {
94700
- execFile("ps", [
94701
- "-o",
94702
- "pid=,pcpu=,rss=",
94703
- "-p",
94704
- pids.join(",")
94705
- ], { timeout: 5e3 }, (err, stdout) => {
94706
- const result = /* @__PURE__ */ new Map();
94707
- if (err || !stdout) {
94708
- resolve(result);
94709
- return;
94710
- }
94711
- for (const line of stdout.trim().split("\n")) {
94712
- const parts = line.trim().split(/\s+/);
94713
- if (parts.length < 3) continue;
94714
- const pid = parseInt(parts[0], 10);
94715
- const cpu = parseFloat(parts[1]);
94716
- const rssKb = parseInt(parts[2], 10);
94717
- if (!isNaN(pid) && !isNaN(cpu) && !isNaN(rssKb)) result.set(pid, {
94718
- cpu: Math.round(cpu * 10) / 10,
94719
- memoryRss: rssKb * 1024
94720
- });
94721
- }
94722
- resolve(result);
94723
- });
94735
+ const stats = await getPidStats(pids);
94736
+ const result = /* @__PURE__ */ new Map();
94737
+ for (const [pid, s] of stats) result.set(pid, {
94738
+ cpu: s.cpu,
94739
+ memoryRss: s.memory
94724
94740
  });
94741
+ return result;
94725
94742
  }
94726
94743
  var EMPTY_HEAP_DECLARATION = {
94727
94744
  profile: void 0,
@@ -95766,4 +95783,4 @@ var LifecycleJobEngine = class {
95766
95783
  }
95767
95784
  };
95768
95785
  //#endregion
95769
- export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LokiDestination, LokiLoggingAddon, MAX_LEAF_VALIDITY_DAYS, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PARENT_ROUTED_PROVIDER_ADDON_ID, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, SOCKET_PLANE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createLocalTransport, createLoopDelayMeter, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, diffEventPlane, diffSocketPlane, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, emitHeapDiagnosticReport, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatSocketPlane, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, heapSpaceField, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isArrayBufferCensusReport, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, nextRssBudgetState, parseCapAction, parseRangeHeader, parseRssBudgetMb, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readHeapSpaces, readLanHttpState, readMoleculerFanoutMode, readPendingRestart, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, socketDirectionBytes, socketDirectionMessages, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
95786
+ export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MESH_QUEUE_TOP_N, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PARENT_ROUTED_PROVIDER_ADDON_ID, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCoreCapService, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createLocalTransport, createLoopDelayMeter, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, diffCapActionCensus, diffEventPlane, diffSocketPlane, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, emitHeapDiagnosticReport, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, heapSpaceField, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isArrayBufferCensusReport, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, nextRssBudgetState, parseCapAction, parseRangeHeader, parseRssBudgetMb, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readHeapSpaces, readLanHttpState, readMoleculerFanoutMode, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, socketDirectionBytes, socketDirectionMessages, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };