@camstack/system 1.2.310 → 1.2.312

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 (68) hide show
  1. package/dist/addon-runner.js +6 -8
  2. package/dist/addon-runner.mjs +6 -8
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/autotrack/index.js +1 -1
  10. package/dist/builtins/autotrack/index.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/camera-grid/index.js +1 -1
  14. package/dist/builtins/camera-grid/index.mjs +1 -1
  15. package/dist/builtins/composer/composer.addon.js +1 -1
  16. package/dist/builtins/composer/composer.addon.mjs +1 -1
  17. package/dist/builtins/console-logging/index.js +1 -1
  18. package/dist/builtins/console-logging/index.mjs +1 -1
  19. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  20. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  21. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  22. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  23. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  24. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  25. package/dist/builtins/hub-forwarder/index.js +1 -1
  26. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  27. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  28. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  29. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  30. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  31. package/dist/builtins/local-network/local-network.addon.js +1 -1
  32. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  33. package/dist/builtins/loki-logging/index.js +1 -1
  34. package/dist/builtins/loki-logging/index.mjs +1 -1
  35. package/dist/builtins/native-metrics/native-metrics.addon.js +10 -102
  36. package/dist/builtins/native-metrics/native-metrics.addon.mjs +4 -92
  37. package/dist/builtins/platform-probe/index.js +1 -1
  38. package/dist/builtins/platform-probe/index.mjs +1 -1
  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-settings.addon.js +0 -0
  46. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  47. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  48. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  49. package/dist/builtins/system-config/system-config.addon.js +1 -1
  50. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  51. package/dist/builtins/winston-logging/index.js +1 -1
  52. package/dist/builtins/winston-logging/index.mjs +1 -1
  53. package/dist/{child-cap-dispatch-BCJjUtXV.mjs → child-cap-dispatch-CHTiHbsv.mjs} +294 -10
  54. package/dist/{child-cap-dispatch-Be8e2cBP.js → child-cap-dispatch-Dyn_7ezH.js} +347 -9
  55. package/dist/{dist-B78pkrps.mjs → dist-Cj7pJmXq.mjs} +35 -4
  56. package/dist/{dist-Cy6DFFjs.js → dist-CkRwnhbo.js} +35 -4
  57. package/dist/index.js +88 -18
  58. package/dist/index.mjs +89 -20
  59. package/dist/kernel/index.d.ts +1 -0
  60. package/dist/kernel/moleculer/process-service.d.ts +9 -0
  61. package/dist/kernel/moleculer/runner-process-group.d.ts +92 -0
  62. package/dist/proc-stat-CbC55Kqi.mjs +92 -0
  63. package/dist/proc-stat-DL-WUOhl.js +127 -0
  64. package/dist/{resource-monitor-Vp0bPV3U.mjs → resource-monitor-B1v6E07R.mjs} +1 -1
  65. package/dist/{resource-monitor-LVE1BoLs.js → resource-monitor-DzNn_IZK.js} +5 -5
  66. package/dist/{retired-settings-keys-B4_hiWsm.mjs → retired-settings-keys-C1duPikd.mjs} +1 -1
  67. package/dist/{retired-settings-keys-D9sgD6Yg.js → retired-settings-keys-CGSuXhP8.js} +1 -1
  68. package/package.json +1 -1
@@ -1,4 +1,5 @@
1
- import { Dt as foldSnapshotByFunction, Jt as metricsProviderCapability, Wn as createEvent, an as reducePoints, ir as EventCategory, jn as BaseAddon, kn as errMsg, on as resolveBucketMs } from "../../dist-B78pkrps.mjs";
1
+ import { Dt as foldSnapshotByFunction, Jt as metricsProviderCapability, Wn as createEvent, an as reducePoints, ir as EventCategory, jn as BaseAddon, kn as errMsg, on as resolveBucketMs } from "../../dist-Cj7pJmXq.mjs";
2
+ import { a as parseProcStat, i as nodeProcReader, n as elapsedSecSince, o as parseProcStatusRss, r as lifetimeCpuPercent, t as commandFromCmdline } from "../../proc-stat-CbC55Kqi.mjs";
2
3
  import { access, readFile, readdir } from "node:fs/promises";
3
4
  import * as fs from "node:fs";
4
5
  import { constants, readFileSync } from "node:fs";
@@ -2120,7 +2121,7 @@ var NativeMetricsProvider = class {
2120
2121
  return getCpuTemperatureInternal();
2121
2122
  }
2122
2123
  async getProcessStats(input) {
2123
- const { getPidStats } = await import("../../resource-monitor-Vp0bPV3U.mjs").then((n) => n.r);
2124
+ const { getPidStats } = await import("../../resource-monitor-B1v6E07R.mjs").then((n) => n.r);
2124
2125
  const raw = await getPidStats(input.pids);
2125
2126
  const result = [];
2126
2127
  for (const [pid, s] of raw) result.push({
@@ -2456,95 +2457,6 @@ function execAsync(cmd, args, timeoutMs = 5e3) {
2456
2457
  });
2457
2458
  });
2458
2459
  }
2459
- /**
2460
- * Parse one `/proc/<pid>/stat` line. `null` for a line that does not parse —
2461
- * a process that exited between the readdir and the read leaves a truncated
2462
- * or empty file, and that is normal, not an error.
2463
- */
2464
- function parseProcStat(line) {
2465
- const close = line.lastIndexOf(")");
2466
- const open = line.indexOf("(");
2467
- if (close < 0 || open < 0 || close < open) return null;
2468
- const pid = Number(line.slice(0, open).trim());
2469
- const comm = line.slice(open + 1, close);
2470
- const rest = line.slice(close + 1).trim().split(/\s+/);
2471
- const state = rest[0];
2472
- const ppid = Number(rest[1]);
2473
- const pgid = Number(rest[2]);
2474
- const utime = Number(rest[11]);
2475
- const stime = Number(rest[12]);
2476
- const startTicks = Number(rest[19]);
2477
- const rssPages = Number(rest[21]);
2478
- if (state === void 0 || state === "") return null;
2479
- if (![
2480
- pid,
2481
- ppid,
2482
- pgid,
2483
- utime,
2484
- stime,
2485
- startTicks,
2486
- rssPages
2487
- ].every(Number.isFinite)) return null;
2488
- return {
2489
- pid,
2490
- comm,
2491
- state,
2492
- ppid,
2493
- pgid,
2494
- ticks: utime + stime,
2495
- startTicks,
2496
- rssPages
2497
- };
2498
- }
2499
- function statusKb(status, key) {
2500
- const match = status.match(new RegExp(`^${key}:\\s+(\\d+)`, "m"));
2501
- return match ? parseInt(match[1], 10) * 1024 : void 0;
2502
- }
2503
- /** Read `VmRSS` / `RssAnon` / `RssFile` (kB in the file) out of `/proc/<pid>/status`. */
2504
- function parseProcStatusRss(status) {
2505
- return {
2506
- rssBytes: statusKb(status, "VmRSS"),
2507
- privateBytes: statusKb(status, "RssAnon"),
2508
- sharedBytes: statusKb(status, "RssFile")
2509
- };
2510
- }
2511
- /** Seconds the process has been alive — `ps etime`, whole seconds. */
2512
- function elapsedSecSince(input) {
2513
- return Math.max(0, Math.floor(input.uptimeSec - input.startTicks / 100));
2514
- }
2515
- /**
2516
- * `ps pcpu`: CPU time over elapsed time, as a percentage with one decimal.
2517
- *
2518
- * This is deliberately the LIFETIME average `ps` prints, not an instantaneous
2519
- * rate: the columns fed from it have always shown that quantity, and the
2520
- * instantaneous split is a different number with a different owner
2521
- * (`cpuMainPercent` / `cpuGcPercent` from `thread-cpu-sampler.ts`). A process
2522
- * with no elapsed window yet reports 0, never a division by zero.
2523
- */
2524
- function lifetimeCpuPercent(input) {
2525
- const elapsedSec = input.uptimeSec - input.startTicks / 100;
2526
- if (!(elapsedSec > 0)) return 0;
2527
- const cpuSec = input.ticks / 100;
2528
- return Math.round(cpuSec / elapsedSec * 1e3) / 10;
2529
- }
2530
- var PID_RE = /^\d+$/;
2531
- var nodeProcReader = {
2532
- listPids: async () => (await readdir("/proc")).filter((entry) => PID_RE.test(entry)).map((entry) => Number(entry)),
2533
- readStat: (pid) => readFile(`/proc/${pid}/stat`, "latin1"),
2534
- readStatus: (pid) => readFile(`/proc/${pid}/status`, "latin1"),
2535
- readCmdline: (pid) => readFile(`/proc/${pid}/cmdline`, "latin1"),
2536
- readUptimeSec: async () => {
2537
- const [first] = (await readFile("/proc/uptime", "latin1")).trim().split(/\s+/);
2538
- const seconds = Number(first);
2539
- if (!Number.isFinite(seconds)) throw new Error(`/proc/uptime unreadable: ${String(first)}`);
2540
- return seconds;
2541
- }
2542
- };
2543
- /** `ps command=`: argv joined by spaces, or `[comm]` when there is no argv. */
2544
- function commandFromCmdline(cmdline, comm) {
2545
- const joined = cmdline.split("\0").filter((part) => part.length > 0).join(" ");
2546
- return joined.length > 0 ? joined : `[${comm}]`;
2547
- }
2548
2460
  //#endregion
2549
2461
  //#region src/builtins/native-metrics/proc-process-table.ts
2550
2462
  /**
@@ -3524,4 +3436,4 @@ var NativeMetricsAddon = class NativeMetricsAddon extends BaseAddon {
3524
3436
  }
3525
3437
  };
3526
3438
  //#endregion
3527
- export { NativeMetricsProvider as a, NativeMetricsAddon as default, parseProcStatusRss as i, nodeProcReader as n, parseProcStat as r, lifetimeCpuPercent as t };
3439
+ export { NativeMetricsAddon as default, NativeMetricsProvider as t };
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-Cy6DFFjs.js");
6
+ const require_dist = require("../../dist-CkRwnhbo.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_chunk.__toESM(node_fs);
9
9
  let node_child_process = require("node:child_process");
@@ -1,5 +1,5 @@
1
1
  import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Kn as emitReadiness, fn as scoreRuntimes, ir as EventCategory, jn as BaseAddon, kn as errMsg, nn as platformProbeCapability, vt as enumerateInferenceDevices } from "../../dist-B78pkrps.mjs";
2
+ import { Kn as emitReadiness, fn as scoreRuntimes, ir as EventCategory, jn as BaseAddon, kn as errMsg, nn as platformProbeCapability, vt as enumerateInferenceDevices } from "../../dist-Cj7pJmXq.mjs";
3
3
  import * as fs from "node:fs";
4
4
  import { execFile } from "node:child_process";
5
5
  import * as os from "node:os";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-Cy6DFFjs.js");
6
+ const require_dist = require("../../dist-CkRwnhbo.js");
7
7
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
8
8
  /**
9
9
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -1,4 +1,4 @@
1
- import { ir as EventCategory, jn as BaseAddon } from "../../dist-B78pkrps.mjs";
1
+ import { ir as EventCategory, jn as BaseAddon } from "../../dist-Cj7pJmXq.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-Cy6DFFjs.js");
6
+ const require_dist = require("../../dist-CkRwnhbo.js");
7
7
  const require_snapshot_courtesy = require("../../snapshot-courtesy-Cqs7GkOV.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Fn as DeviceFeature, G as batteryCapability, Ln as DeviceType, W as bareAddonId, Zn as nodePin, a as BatteryStatusSchema, ft as deriveBatteryPresence, hn as snapshotCapability, ir as EventCategory, jn as BaseAddon, kn as errMsg, xn as streamQualityLabel } from "../../dist-B78pkrps.mjs";
1
+ import { Fn as DeviceFeature, G as batteryCapability, Ln as DeviceType, W as bareAddonId, Zn as nodePin, a as BatteryStatusSchema, ft as deriveBatteryPresence, hn as snapshotCapability, ir as EventCategory, jn as BaseAddon, kn as errMsg, xn as streamQualityLabel } from "../../dist-Cj7pJmXq.mjs";
2
2
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CZPvteq2.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-Cy6DFFjs.js");
6
+ const require_dist = require("../../dist-CkRwnhbo.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  let node_fs_promises = require("node:fs/promises");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Et as filesystemBrowseCapability, jn as BaseAddon, yn as storageProviderCapability } from "../../dist-B78pkrps.mjs";
1
+ import { Et as filesystemBrowseCapability, jn as BaseAddon, yn as storageProviderCapability } from "../../dist-Cj7pJmXq.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { mkdir, readdir, realpath, statfs } from "node:fs/promises";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-Cy6DFFjs.js");
6
+ const require_dist = require("../../dist-CkRwnhbo.js");
7
7
  const require_hub_cap_forward = require("../../hub-cap-forward-DmHNjbB0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Ct as evictionPolicyOfLocation, E as REDACTED_SECRET, F as StorageLocationTypeSchema, I as StorageMigrationJobSchema, Kt as mayReadLocation, Mt as isLocationEnabled, N as StorageCleanupJobSchema, On as withLocationMode, P as StorageLocationModeSchema, Qn as parseJsonObject, Y as collectSecretConfigKeys, Yt as modeMayWrite, _n as storageMigrationCapability, b as LegacyStorageLocationDefaultSchema, gn as storageCapability, ir as EventCategory, jn as BaseAddon, kt as gbToBytes, pn as settingsStoreCapability, qt as mayWriteToLocation, sn as resolveLocationMode, zt as legacyModeOf } from "../../dist-B78pkrps.mjs";
1
+ import { Ct as evictionPolicyOfLocation, E as REDACTED_SECRET, F as StorageLocationTypeSchema, I as StorageMigrationJobSchema, Kt as mayReadLocation, Mt as isLocationEnabled, N as StorageCleanupJobSchema, On as withLocationMode, P as StorageLocationModeSchema, Qn as parseJsonObject, Y as collectSecretConfigKeys, Yt as modeMayWrite, _n as storageMigrationCapability, b as LegacyStorageLocationDefaultSchema, gn as storageCapability, ir as EventCategory, jn as BaseAddon, kt as gbToBytes, pn as settingsStoreCapability, qt as mayWriteToLocation, sn as resolveLocationMode, zt as legacyModeOf } from "../../dist-Cj7pJmXq.mjs";
2
2
  import { t as HUB_CAP_FWD_ACTION } from "../../hub-cap-forward-BdT320dq.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-Cy6DFFjs.js");
6
+ const require_dist = require("../../dist-CkRwnhbo.js");
7
7
  //#region src/builtins/system-config/system-config.addon.ts
8
8
  /**
9
9
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -1,4 +1,4 @@
1
- import { Jn as hydrateSchema, jn as BaseAddon, kn as errMsg } from "../../dist-B78pkrps.mjs";
1
+ import { Jn as hydrateSchema, jn as BaseAddon, kn as errMsg } from "../../dist-Cj7pJmXq.mjs";
2
2
  //#region src/builtins/system-config/system-config.addon.ts
3
3
  /**
4
4
  * Built-in `system-config` addon — Phase 4 of the settings redesign.
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-Cy6DFFjs.js");
6
+ const require_dist = require("../../dist-CkRwnhbo.js");
7
7
  const require_formatter = require("../../formatter-DqAKDlvN.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,4 +1,4 @@
1
- import { Ut as logDestinationCapability, jn as BaseAddon } from "../../dist-B78pkrps.mjs";
1
+ import { Ut as logDestinationCapability, jn as BaseAddon } from "../../dist-Cj7pJmXq.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
3
3
  import * as path$1 from "node:path";
4
4
  import path from "node:path";
@@ -1,3 +1,4 @@
1
+ import { a as parseProcStat, i as nodeProcReader } from "./proc-stat-CbC55Kqi.mjs";
1
2
  import "./hub-cap-forward-BdT320dq.mjs";
2
3
  import * as crypto$1 from "node:crypto";
3
4
  import { randomBytes, randomUUID } from "node:crypto";
@@ -3207,7 +3208,7 @@ function createAddonPeerBytesFacility(args) {
3207
3208
  * Failures THROW with an actionable message — a caller must never proceed as
3208
3209
  * if dependencies were installed when they were not.
3209
3210
  */
3210
- var execFileAsync$2 = promisify(execFile);
3211
+ var execFileAsync$3 = promisify(execFile);
3211
3212
  var DEFAULT_REGISTRY = "https://registry.npmjs.org";
3212
3213
  /** Where the bootstrap lands inside `cacheDir` (npm tgz carries a `package/` prefix). */
3213
3214
  function bootstrappedCliPath(cacheDir) {
@@ -3215,7 +3216,7 @@ function bootstrappedCliPath(cacheDir) {
3215
3216
  }
3216
3217
  async function defaultProbeSystemNpm() {
3217
3218
  try {
3218
- await execFileAsync$2("npm", ["--version"], { timeout: 15e3 });
3219
+ await execFileAsync$3("npm", ["--version"], { timeout: 15e3 });
3219
3220
  return true;
3220
3221
  } catch {
3221
3222
  return false;
@@ -3233,7 +3234,7 @@ async function defaultDownloadTarball(url, destTgz) {
3233
3234
  await fs.promises.writeFile(destTgz, bytes);
3234
3235
  }
3235
3236
  async function defaultExtractTarball(tgzPath, destDir) {
3236
- await execFileAsync$2("tar", [
3237
+ await execFileAsync$3("tar", [
3237
3238
  "-xzf",
3238
3239
  tgzPath,
3239
3240
  "-C",
@@ -3304,7 +3305,7 @@ async function runNpm(args, options) {
3304
3305
  registry: options.registry,
3305
3306
  logger: options.logger
3306
3307
  });
3307
- return execFileAsync$2(invocation.command, [...invocation.argsPrefix, ...args], {
3308
+ return execFileAsync$3(invocation.command, [...invocation.argsPrefix, ...args], {
3308
3309
  ...options.cwd !== void 0 ? { cwd: options.cwd } : {},
3309
3310
  timeout: options.timeout ?? 3e5,
3310
3311
  env: buildNpmChildEnv(options.env ?? process.env, process.execPath)
@@ -3385,7 +3386,7 @@ function resolveAddonClass(mod) {
3385
3386
  }
3386
3387
  //#endregion
3387
3388
  //#region src/kernel/deps/manifest-native-deps.ts
3388
- var execFileAsync$1 = promisify(execFile);
3389
+ var execFileAsync$2 = promisify(execFile);
3389
3390
  /**
3390
3391
  * Fallback bootstrap-cache location when the caller doesn't thread one
3391
3392
  * through (the forked addon-runner's spawn-time install). tmpdir survives the
@@ -3694,7 +3695,7 @@ async function rebuildNativeDeps(addonDir, packageNames, logger, npmCacheDir, re
3694
3695
  return;
3695
3696
  }
3696
3697
  logger.warn("@electron/rebuild not available — falling back to npx", { meta: { addonDir } });
3697
- await execFileAsync$1("npx", [
3698
+ await execFileAsync$2("npx", [
3698
3699
  "--yes",
3699
3700
  "electron-rebuild",
3700
3701
  "-m",
@@ -12116,7 +12117,7 @@ function requestPrivilegedInstall(req, socketPath = pkgdSocketPath(), timeoutMs
12116
12117
  * the failure it precedes ("smbclient: ENOENT") arrives minutes later in a
12117
12118
  * different addon's logs.
12118
12119
  */
12119
- var execFileAsync = promisify(execFile);
12120
+ var execFileAsync$1 = promisify(execFile);
12120
12121
  /** How long a single package-manager invocation may take. */
12121
12122
  var INSTALL_TIMEOUT_MS = 300 * 1e3;
12122
12123
  /** How long the `command -v <binary>` presence probe may take. */
@@ -12278,7 +12279,7 @@ function planFor(manager, packageName) {
12278
12279
  }
12279
12280
  async function defaultHasBinary(binary) {
12280
12281
  try {
12281
- await execFileAsync("command", ["-v", binary], {
12282
+ await execFileAsync$1("command", ["-v", binary], {
12282
12283
  timeout: PROBE_TIMEOUT_MS,
12283
12284
  shell: process.platform === "win32" ? false : "/bin/sh"
12284
12285
  });
@@ -12298,7 +12299,290 @@ async function defaultDetectManager() {
12298
12299
  return null;
12299
12300
  }
12300
12301
  async function defaultRun(command, args) {
12301
- await execFileAsync(command, [...args], { timeout: INSTALL_TIMEOUT_MS });
12302
+ await execFileAsync$1(command, [...args], { timeout: INSTALL_TIMEOUT_MS });
12303
+ }
12304
+ //#endregion
12305
+ //#region src/kernel/moleculer/runner-process-group.ts
12306
+ /**
12307
+ * A runner OWNS a process group, and the kernel reaps it on every runner exit (D668).
12308
+ *
12309
+ * ## Why
12310
+ *
12311
+ * An addon-runner spawns long-lived children: recorder ffmpeg writers, stream-broker
12312
+ * ffmpeg, llama-server, tailscaled, cloudflared, HAP ffmpeg. Their only kill was the
12313
+ * addon's own graceful `stop()`, which a runner that dies of SIGABRT (V8 OOM), SIGKILL
12314
+ * or a native crash never runs. ffmpeg ignores SIGPIPE and does not quit on stdin EOF,
12315
+ * so a dead reader does not stop it either. On 2026-09-28 at 10:21 CEST the hub's
12316
+ * recorder runner aborted; 28 ffmpeg writers survived as orphans and kept writing into
12317
+ * the SAME staging directories the respawned runner's 28 new writers used — 13 minutes
12318
+ * of dual writers on every camera, until they were killed by hand.
12319
+ *
12320
+ * Runners were spawned `detached: false`, i.e. inside hub-main's own group, so there
12321
+ * was no handle meaning "this runner and everything under it". Now every runner is
12322
+ * spawned `detached: true` on POSIX, which makes it a SESSION and group leader
12323
+ * (`setsid`): pgid === runner pid, and every descendant that does not itself call
12324
+ * `setsid`/`setpgid` inherits that group. A process group outlives its leader, so
12325
+ * `kill(-pgid)` still reaches the orphans after the runner is gone — which is exactly
12326
+ * the moment it matters.
12327
+ *
12328
+ * ## What `detached` does NOT change
12329
+ *
12330
+ * - The child stays REF'd: nothing calls `unref()`, so the parent still waits on it,
12331
+ * still gets its `exit`, still reads its stdout/stderr pipes.
12332
+ * - `process.ppid` is unchanged, so the runner can detect a lost parent before or
12333
+ * after READY and hard-stop its own group.
12334
+ * - UDS/stdio wiring is fd-based and independent of the session.
12335
+ *
12336
+ * What it DOES change: the runner is no longer in hub-main's group, so a signal sent to
12337
+ * hub-main's group (`kill -- -<pid>` in `server/backend/src/main.ts`, a terminal Ctrl+C)
12338
+ * no longer reaches runners by itself. `signalAllRunnerGroups` is the replacement, and
12339
+ * the process `exit` backstop below hard-stops any groups a hub/agent still owns.
12340
+ *
12341
+ * ## Out of scope, deliberately
12342
+ *
12343
+ * - Windows has no process groups in this sense; nothing here runs on `win32` and the
12344
+ * runner is spawned exactly as before.
12345
+ * - A descendant that calls `setsid`/`setpgid` itself (or is spawned `detached: true`
12346
+ * by an addon) leaves the group and is NOT reaped. No shipped addon does; one that
12347
+ * needs to must own its child's lifetime some other way.
12348
+ * - The kernel knows the runner id, not which device a child served. Per-device
12349
+ * attribution is the addon's (the recorder's own foreign-writer reap, D667).
12350
+ */
12351
+ var execFileAsync = promisify(execFile);
12352
+ /** SIGTERM → SIGKILL grace for a runner's group, in ms. ffmpeg finalises a segment well inside it. */
12353
+ var RUNNER_GROUP_REAP_GRACE_MS = 2e3;
12354
+ /** How often the group is probed for emptiness during the grace. */
12355
+ var GROUP_PROBE_INTERVAL_MS = 100;
12356
+ /** Whether a runner is spawned as a process-group leader on this platform. */
12357
+ function runnerOwnsProcessGroup(platform = process.platform) {
12358
+ return platform !== "win32";
12359
+ }
12360
+ function errnoOf(err) {
12361
+ if (typeof err !== "object" || err === null) return void 0;
12362
+ const code = Reflect.get(err, "code");
12363
+ return typeof code === "string" ? code : void 0;
12364
+ }
12365
+ function signalGroup(ops, pgid, signal) {
12366
+ try {
12367
+ ops.kill(-pgid, signal);
12368
+ return "delivered";
12369
+ } catch (err) {
12370
+ if (errnoOf(err) === "ESRCH") return "empty";
12371
+ return { error: `${errnoOf(err) ?? "unknown"}: ${err instanceof Error ? err.message : String(err)}` };
12372
+ }
12373
+ }
12374
+ function signalPid(ops, pid) {
12375
+ try {
12376
+ ops.kill(pid, 0);
12377
+ return "delivered";
12378
+ } catch (err) {
12379
+ return errnoOf(err) === "ESRCH" ? "empty" : { error: errnoOf(err) ?? "unknown" };
12380
+ }
12381
+ }
12382
+ /**
12383
+ * A pgid this module may address. `kill(-1)` signals every process the caller may
12384
+ * signal and `kill(-0)` is the caller's OWN group — both are catastrophes, not reaps.
12385
+ */
12386
+ function isAddressableGroup(pgid) {
12387
+ return Number.isInteger(pgid) && pgid > 1 && pgid !== process.pid;
12388
+ }
12389
+ /**
12390
+ * SIGTERM the whole group, wait up to `graceMs` for it to empty, SIGKILL what is left.
12391
+ *
12392
+ * pid reuse: POSIX never hands out a pid while a process group with that id exists, so
12393
+ * the SIGTERM always lands on our group. The SIGKILL is sent only when the group is
12394
+ * still populated at the end of the grace, which is the same group; the residual window
12395
+ * (group empties, the pid wraps around AND is reused as a new group leader, all inside
12396
+ * the grace) is not reachable in practice.
12397
+ */
12398
+ async function reapProcessGroup(pgid, ops) {
12399
+ if (!isAddressableGroup(pgid)) return {
12400
+ pgid,
12401
+ membersAtExit: null,
12402
+ killed: null,
12403
+ alreadyEmpty: true,
12404
+ error: `refused pgid ${pgid}`
12405
+ };
12406
+ const membersAtExit = await ops.listMembers(pgid);
12407
+ const term = signalGroup(ops, pgid, "SIGTERM");
12408
+ if (term === "empty") return {
12409
+ pgid,
12410
+ membersAtExit,
12411
+ killed: [],
12412
+ alreadyEmpty: true,
12413
+ error: null
12414
+ };
12415
+ if (typeof term === "object") return {
12416
+ pgid,
12417
+ membersAtExit,
12418
+ killed: null,
12419
+ alreadyEmpty: false,
12420
+ error: term.error
12421
+ };
12422
+ for (let waited = 0; waited < ops.graceMs; waited += GROUP_PROBE_INTERVAL_MS) {
12423
+ await ops.sleep(Math.min(GROUP_PROBE_INTERVAL_MS, ops.graceMs - waited));
12424
+ if (signalGroup(ops, pgid, 0) === "empty") return {
12425
+ pgid,
12426
+ membersAtExit,
12427
+ killed: [],
12428
+ alreadyEmpty: false,
12429
+ error: null
12430
+ };
12431
+ }
12432
+ const survivors = membersAtExit === null ? null : membersAtExit.filter((m) => signalPid(ops, m.pid) === "delivered");
12433
+ const kill = signalGroup(ops, pgid, "SIGKILL");
12434
+ return {
12435
+ pgid,
12436
+ membersAtExit,
12437
+ killed: kill === "empty" ? [] : survivors,
12438
+ alreadyEmpty: false,
12439
+ error: typeof kill === "object" ? kill.error : null
12440
+ };
12441
+ }
12442
+ /** `ffmpeg×28 llama-server×1` — what a reap line says it removed. */
12443
+ function summarizeMembers(members) {
12444
+ const counts = /* @__PURE__ */ new Map();
12445
+ for (const m of members) counts.set(m.command, (counts.get(m.command) ?? 0) + 1);
12446
+ return [...counts.entries()].map(([command, n]) => `${command}×${n}`).join(" ");
12447
+ }
12448
+ async function listMembersFromProc(pgid, reader) {
12449
+ const pids = await reader.listPids();
12450
+ return (await Promise.all(pids.map(async (pid) => {
12451
+ try {
12452
+ return parseProcStat(await reader.readStat(pid));
12453
+ } catch {
12454
+ return null;
12455
+ }
12456
+ }))).flatMap((row) => row !== null && row.pgid === pgid && row.state !== "Z" ? [{
12457
+ pid: row.pid,
12458
+ command: row.comm
12459
+ }] : []);
12460
+ }
12461
+ var PS_GROUP_ROW_RE = /^(\d+)\s+(\d+)\s+(\S+)\s+(.+)$/;
12462
+ /** Parse `ps -A -o pid=,pgid=,stat=,comm=` for one group, zombies excluded. */
12463
+ function parsePsGroupMembers(stdout, pgid) {
12464
+ const members = [];
12465
+ for (const line of stdout.split("\n")) {
12466
+ const match = line.trim().match(PS_GROUP_ROW_RE);
12467
+ if (!match) continue;
12468
+ const [, pidS, pgidS, stat = "", comm = ""] = match;
12469
+ if (Number(pgidS) !== pgid || stat.startsWith("Z")) continue;
12470
+ const command = comm.trim();
12471
+ members.push({
12472
+ pid: Number(pidS),
12473
+ command: command.slice(command.lastIndexOf("/") + 1)
12474
+ });
12475
+ }
12476
+ return members;
12477
+ }
12478
+ async function listMembersFromPs(pgid) {
12479
+ const { stdout } = await execFileAsync("ps", [
12480
+ "-A",
12481
+ "-o",
12482
+ "pid=,pgid=,stat=,comm="
12483
+ ], {
12484
+ timeout: 3e3,
12485
+ maxBuffer: 8 * 1024 * 1024
12486
+ });
12487
+ return parsePsGroupMembers(stdout, pgid);
12488
+ }
12489
+ /** Live members of `pgid`: `/proc` on Linux, `ps` elsewhere; `null` when neither answers. */
12490
+ async function listProcessGroupMembers(pgid, platform = process.platform) {
12491
+ try {
12492
+ return platform === "linux" ? await listMembersFromProc(pgid, nodeProcReader) : await listMembersFromPs(pgid);
12493
+ } catch {
12494
+ return null;
12495
+ }
12496
+ }
12497
+ var defaultProcessGroupOps = {
12498
+ kill: (pid, signal) => {
12499
+ process.kill(pid, signal);
12500
+ },
12501
+ listMembers: (pgid) => listProcessGroupMembers(pgid),
12502
+ sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
12503
+ graceMs: RUNNER_GROUP_REAP_GRACE_MS
12504
+ };
12505
+ /**
12506
+ * Every runner group this process leads and has not finished reaping. Process-wide on
12507
+ * purpose: `process.on('exit')` and hub-main's signal handler must reach the groups of
12508
+ * every `$process` service in the process, and neither holds a service reference.
12509
+ */
12510
+ var ownedGroups = /* @__PURE__ */ new Map();
12511
+ var exitBackstopInstalled = false;
12512
+ function installExitBackstop() {
12513
+ if (exitBackstopInstalled) return;
12514
+ exitBackstopInstalled = true;
12515
+ process.on("exit", () => {
12516
+ for (const [pgid, group] of ownedGroups) try {
12517
+ group.kill(-pgid, "SIGKILL");
12518
+ } catch {}
12519
+ });
12520
+ }
12521
+ function registerRunnerGroup(pgid, group) {
12522
+ if (!isAddressableGroup(pgid)) return;
12523
+ ownedGroups.set(pgid, group);
12524
+ installExitBackstop();
12525
+ }
12526
+ function releaseRunnerGroup(pgid) {
12527
+ ownedGroups.delete(pgid);
12528
+ }
12529
+ /**
12530
+ * Signal every runner group this process owns, synchronously. Hub-main's SIGTERM/SIGINT
12531
+ * handler calls it: before D668 the runners were in hub-main's own group and its
12532
+ * `kill -- -<pid>` reached them and their children; now each is its own group.
12533
+ * Returns how many groups were signalled.
12534
+ */
12535
+ function signalAllRunnerGroups(signal) {
12536
+ let signalled = 0;
12537
+ for (const [pgid, group] of ownedGroups) try {
12538
+ group.kill(-pgid, signal);
12539
+ signalled += 1;
12540
+ } catch {}
12541
+ return signalled;
12542
+ }
12543
+ /**
12544
+ * Arm the runner's parent-death watchdog before addon code starts loading.
12545
+ *
12546
+ * A parent can die while an addon module or `initialize()` is still pending, so
12547
+ * installing this only after READY leaves exactly the boot window where a detached
12548
+ * runner can become an orphan. Any PPID change means the direct parent died and the
12549
+ * kernel reparented us; checking for a change also covers a non-PID-1 subreaper.
12550
+ */
12551
+ function startRunnerParentDeathWatchdog(onParentDeath, options = {}) {
12552
+ const initialPpid = options.initialPpid ?? process.ppid;
12553
+ if (!Number.isInteger(initialPpid) || initialPpid <= 1) return null;
12554
+ const readPpid = options.readPpid ?? (() => process.ppid);
12555
+ const intervalMs = options.intervalMs ?? 5e3;
12556
+ let fired = false;
12557
+ const timer = setInterval(() => {
12558
+ if (fired || readPpid() === initialPpid) return;
12559
+ fired = true;
12560
+ clearInterval(timer);
12561
+ onParentDeath();
12562
+ }, intervalMs);
12563
+ return timer;
12564
+ }
12565
+ /**
12566
+ * Last resort for a detached runner whose direct parent disappeared without an
12567
+ * `exit` hook (SIGKILL, native crash). The runner's own pid is also its pgid, so
12568
+ * one SIGKILL removes the runner and every descendant in that group atomically.
12569
+ *
12570
+ * Calling `kill(-process.pid, ...)` from an ordinary, non-group-leading process
12571
+ * returns ESRCH: while this pid exists, no unrelated process group can have the
12572
+ * same id. That makes the failed call a safe compatibility fallback for an older
12573
+ * parent that did not spawn the runner detached.
12574
+ */
12575
+ function killOwnRunnerGroupAfterParentLoss(platform = process.platform, kill = (target, signal) => {
12576
+ process.kill(target, signal);
12577
+ }) {
12578
+ const pid = process.pid;
12579
+ if (!runnerOwnsProcessGroup(platform) || !Number.isInteger(pid) || pid <= 1) return false;
12580
+ try {
12581
+ kill(-pid, "SIGKILL");
12582
+ return true;
12583
+ } catch {
12584
+ return false;
12585
+ }
12302
12586
  }
12303
12587
  //#endregion
12304
12588
  //#region src/kernel/moleculer/child-cap-dispatch.ts
@@ -12351,4 +12635,4 @@ function createChildCapDispatch(deps) {
12351
12635
  };
12352
12636
  }
12353
12637
  //#endregion
12354
- export { localEndpointPath as $, shouldReclaim as $t, createUdsEventBus as A, createSocketPlaneReader as An, createAddonDataPlaneFacility as At, LocalChildClient as B, CAP_ACTION_OVERFLOW_LABEL as Bn, RSS_BUDGET_RELEASE_RATIO as Bt, brokerTransportLink as C, MESH_QUEUE_TOP_N as Cn, installManifestNativeDeps as Ct, localProviderLink as D, SOCKET_PLANE_TOP_N as Dn, runNpm as Dt, ipcParentLink as E, EMPTY_SOCKET_PLANE_BASELINE as En, resolveNpmInvocation as Et, AGENT_CAP_FWD_SERVICE as F, createSocketDirectionCounters as Fn, HEAP_WATCH_WARN_RATIO as Ft, PARENT_ROUTED_PROVIDER_ADDON_ID as G, createCapActionCensus as Gn, createDeferredHeapWatchSink as Gt, UDS_NO_ROUTE_PREFIX as H, EMPTY_CAP_ACTION_READING as Hn, RUNNER_RSS_BUDGET_ENV as Ht, CapRouteResolver as I, recordSocketFrame as In, HUB_MAIN_HEAP_WATCH_LABEL as It, createLocalTransport as J, createEventPlaneMeter as Jn, describeRss as Jt, __resetCapUsageRegistryForTests as K, diffCapActionCensus as Kn, createLoopDelayMeter as Kt, callWithServiceDiscovery as L, sampleSocketDirection as Ln, HUB_MAIN_RSS_BUDGET_MB as Lt, createUdsLogger as M, formatSocketPlane as Mn, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS as Mt, createUdsLoggerWithControl as N, readSocketQueues as Nn, HEAP_RECLAIM_TRIGGER_MB as Nt, createParentUnownedCallHandler as O, SOCKET_QUEUE_TOP_N as On, createAddonPeerBytesFacility as Ot, AGENT_CAP_FWD_ACTION as P, EMPTY_SOCKET_DIRECTION as Pn, HEAP_WATCH_INTERVAL_MS as Pt, PeerAnsweredError as Q, reclaimIntervalMs as Qt, CapRouteError as R, socketDirectionBytes as Rn, HUB_RSS_BUDGET_ENV as Rt, brokerCallForCap as S, formatOutboundQueueVerdict as Sn, copyBundledNativeModules as St, deviceCapResolverLink as T, formatMeshQueue as Tn, buildNpmChildEnv as Tt, readMoleculerFanoutMode as U, MAX_CAP_ACTIONS_PER_PEER as Un, ZERO_LOOP_DELAY as Ut, LocalChildRegistry as V, CAP_ACTION_UNLABELLED as Vn, RUNNER_HEAP_WATCH_INTERVAL_MS as Vt, CapUsageRegistry as W, capActionLabel as Wn, buildHeapSample as Wt, UdsLocalTransportServer as X, diffEventPlane as Xn, nextRssBudgetState as Xt, UdsLocalTransportClient as Y, createEventPlaneReader as Yn, hubMainRssBudget as Yt, SocketChannel as Z, formatEventPlane as Zn, parseRssBudgetMb as Zt, setNodeEventInterest as _, selectReportedSpaces as _n, deserializeTypedArrays as _t, adaptBrokerToCluster as a, ARRAY_BUFFER_CENSUS_THRESHOLD_MB as an, getWorkerNativeCapProvider as at, createKernelHwAccel as b, OUTBOUND_QUEUE_THRESHOLD_BYTES as bn, CapabilityHandle as bt, getWorkerDeviceRegistry as c, createInspectorArrayBufferCensus as cn, setWorkerNativeCapsChangeListener as ct, setHubConnected as d, DECISIVE_HEAP_SPACES as dn, NATIVE_PROVIDER_SERVICE_INFIX as dt, startHeapWatch as en, FrameDecoder as et, EVENT_TOPIC_PREFIX as f, HEAP_SPACE_REPORT_MIN_MB as fn, capActionName as ft, registerEventBusService as g, readHeapSpaces as gn, parseCapAction as gt, getMoleculerEventStats as h, heapSpaceField as hn, capServiceName as ht, installManifestPythonDeps as i, ARRAY_BUFFER_CENSUS_SUSTAIN_MS as in, createBrokerDeviceManagerApi as it, udsChildLogToWorkerEntry as j, diffSocketPlane as jn, HEAP_RECLAIM_MIN_INTERVAL_MS as jt, createUdsEventBridge as k, createSocketPlaneMeter as kn, hostNodeIdOf as kt, getOrInitReadinessRegistry as l, formatArrayBufferCensus as ln, createAddonService as lt, getBrokerEventBus as m, formatHeapSpaces as mn, capBareAction as mt, createChildCapDispatch as n, strandedMb as nn, buildNativeCapProxy as nt, createAddonContext as o, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO as on, getWorkerNativeCapSnapshot as ot, clusterEventTopic as p, emitHeapDiagnosticReport as pn, capActionSuffix as pt, getCapUsageRegistry as q, EVENT_PLANE_TOP_N as qn, createV8Reclaimer as qt, installManifestSystemDeps as r, ARRAY_BUFFER_CENSUS_COOLDOWN_MS as rn, buildUdsNativeCapProxy as rt, createUdsAddonContext as s, createArrayBufferCensusGate as sn, mountNativeCapService as st, CAP_METHOD_NOT_IMPLEMENTED as t, startRunnerHeapWatch as tn, encodeFrame as tt, getOrInitReadinessRegistryForClient as u, isArrayBufferCensusReport as un, validateProviderRegistrations as ut, subscribePassthrough as v, OUTBOUND_QUEUE_COOLDOWN_MS as vn, serializeTypedArrays as vt, buildLinkChain as w, createMeshQueueReader as wn, resolveAddonClass as wt, resolveHwAccel as x, createOutboundQueueGate as xn, CapabilityUnavailableError as xt, AddonDepsManager as y, OUTBOUND_QUEUE_SUSTAIN_MS as yn, DeviceRegistry as yt, classifyCapRoute as z, socketDirectionMessages as zn, RSS_BUDGET_REANNOUNCE_MIN_MS as zt };
12638
+ export { CapUsageRegistry as $, capActionLabel as $n, buildHeapSample as $t, resolveHwAccel as A, createOutboundQueueGate as An, CapabilityUnavailableError as At, udsChildLogToWorkerEntry as B, diffSocketPlane as Bn, HEAP_RECLAIM_MIN_INTERVAL_MS as Bt, getBrokerEventBus as C, formatHeapSpaces as Cn, capBareAction as Ct, subscribePassthrough as D, OUTBOUND_QUEUE_COOLDOWN_MS as Dn, serializeTypedArrays as Dt, setNodeEventInterest as E, selectReportedSpaces as En, deserializeTypedArrays as Et, ipcParentLink as F, EMPTY_SOCKET_PLANE_BASELINE as Fn, resolveNpmInvocation as Ft, CapRouteResolver as G, recordSocketFrame as Gn, HUB_MAIN_HEAP_WATCH_LABEL as Gt, createUdsLoggerWithControl as H, readSocketQueues as Hn, HEAP_RECLAIM_TRIGGER_MB as Ht, localProviderLink as I, SOCKET_PLANE_TOP_N as In, runNpm as It, classifyCapRoute as J, socketDirectionMessages as Jn, RSS_BUDGET_REANNOUNCE_MIN_MS as Jt, callWithServiceDiscovery as K, sampleSocketDirection as Kn, HUB_MAIN_RSS_BUDGET_MB as Kt, createParentUnownedCallHandler as L, SOCKET_QUEUE_TOP_N as Ln, createAddonPeerBytesFacility as Lt, brokerTransportLink as M, MESH_QUEUE_TOP_N as Mn, installManifestNativeDeps as Mt, buildLinkChain as N, createMeshQueueReader as Nn, resolveAddonClass as Nt, AddonDepsManager as O, OUTBOUND_QUEUE_SUSTAIN_MS as On, DeviceRegistry as Ot, deviceCapResolverLink as P, formatMeshQueue as Pn, buildNpmChildEnv as Pt, readMoleculerFanoutMode as Q, MAX_CAP_ACTIONS_PER_PEER as Qn, ZERO_LOOP_DELAY as Qt, createUdsEventBridge as R, createSocketPlaneMeter as Rn, hostNodeIdOf as Rt, clusterEventTopic as S, emitHeapDiagnosticReport as Sn, capActionSuffix as St, registerEventBusService as T, readHeapSpaces as Tn, parseCapAction as Tt, AGENT_CAP_FWD_ACTION as U, EMPTY_SOCKET_DIRECTION as Un, HEAP_WATCH_INTERVAL_MS as Ut, createUdsLogger as V, formatSocketPlane as Vn, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS as Vt, AGENT_CAP_FWD_SERVICE as W, createSocketDirectionCounters as Wn, HEAP_WATCH_WARN_RATIO as Wt, LocalChildRegistry as X, CAP_ACTION_UNLABELLED as Xn, RUNNER_HEAP_WATCH_INTERVAL_MS as Xt, LocalChildClient as Y, CAP_ACTION_OVERFLOW_LABEL as Yn, RSS_BUDGET_RELEASE_RATIO as Yt, UDS_NO_ROUTE_PREFIX as Z, EMPTY_CAP_ACTION_READING as Zn, RUNNER_RSS_BUDGET_ENV as Zt, getWorkerDeviceRegistry as _, createInspectorArrayBufferCensus as _n, setWorkerNativeCapsChangeListener as _t, reapProcessGroup as a, nextRssBudgetState as an, diffEventPlane as ar, UdsLocalTransportServer as at, setHubConnected as b, DECISIVE_HEAP_SPACES as bn, NATIVE_PROVIDER_SERVICE_INFIX as bt, runnerOwnsProcessGroup as c, shouldReclaim as cn, localEndpointPath as ct, summarizeMembers as d, strandedMb as dn, buildNativeCapProxy as dt, createDeferredHeapWatchSink as en, createCapActionCensus as er, PARENT_ROUTED_PROVIDER_ADDON_ID as et, installManifestSystemDeps as f, ARRAY_BUFFER_CENSUS_COOLDOWN_MS as fn, buildUdsNativeCapProxy as ft, createUdsAddonContext as g, createArrayBufferCensusGate as gn, mountNativeCapService as gt, createAddonContext as h, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO as hn, getWorkerNativeCapSnapshot as ht, killOwnRunnerGroupAfterParentLoss as i, hubMainRssBudget as in, createEventPlaneReader as ir, UdsLocalTransportClient as it, brokerCallForCap as j, formatOutboundQueueVerdict as jn, copyBundledNativeModules as jt, createKernelHwAccel as k, OUTBOUND_QUEUE_THRESHOLD_BYTES as kn, CapabilityHandle as kt, signalAllRunnerGroups as l, startHeapWatch as ln, FrameDecoder as lt, adaptBrokerToCluster as m, ARRAY_BUFFER_CENSUS_THRESHOLD_MB as mn, getWorkerNativeCapProvider as mt, createChildCapDispatch as n, createV8Reclaimer as nn, EVENT_PLANE_TOP_N as nr, getCapUsageRegistry as nt, registerRunnerGroup as o, parseRssBudgetMb as on, formatEventPlane as or, SocketChannel as ot, installManifestPythonDeps as p, ARRAY_BUFFER_CENSUS_SUSTAIN_MS as pn, createBrokerDeviceManagerApi as pt, CapRouteError as q, socketDirectionBytes as qn, HUB_RSS_BUDGET_ENV as qt, defaultProcessGroupOps as r, describeRss as rn, createEventPlaneMeter as rr, createLocalTransport as rt, releaseRunnerGroup as s, reclaimIntervalMs as sn, PeerAnsweredError as st, CAP_METHOD_NOT_IMPLEMENTED as t, createLoopDelayMeter as tn, diffCapActionCensus as tr, __resetCapUsageRegistryForTests as tt, startRunnerParentDeathWatchdog as u, startRunnerHeapWatch as un, encodeFrame as ut, getOrInitReadinessRegistry as v, formatArrayBufferCensus as vn, createAddonService as vt, getMoleculerEventStats as w, heapSpaceField as wn, capServiceName as wt, EVENT_TOPIC_PREFIX as x, HEAP_SPACE_REPORT_MIN_MB as xn, capActionName as xt, getOrInitReadinessRegistryForClient as y, isArrayBufferCensusReport as yn, validateProviderRegistrations as yt, createUdsEventBus as z, createSocketPlaneReader as zn, createAddonDataPlaneFacility as zt };