@camstack/system 1.2.176 → 1.2.177
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon-runner.js +2 -3
- package/dist/addon-runner.mjs +2 -3
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.d.ts +0 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +2 -40
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +2 -40
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-BianbXLH.mjs → dist-C-8k9Z9W.mjs} +3 -31
- package/dist/{dist-KItAWyKG.js → dist-DkVaJ5vG.js} +3 -31
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -4
- package/dist/index.mjs +3 -3
- package/dist/kernel/heap-allocation-sample.d.ts +107 -0
- package/dist/kernel/heap-spaces.d.ts +1 -6
- package/dist/{manifest-system-deps-BPpzK6cH.mjs → manifest-system-deps-4NeY_8iQ.mjs} +3 -36
- package/dist/{manifest-system-deps-DU0BvqV-.js → manifest-system-deps-BbB94ozU.js} +2 -47
- package/dist/{retired-settings-keys-DfNTZPhu.js → retired-settings-keys-B1ij-xtH.js} +1 -1
- package/dist/{retired-settings-keys-CXYnLa7d.mjs → retired-settings-keys-wfKn2-Sk.mjs} +1 -1
- package/package.json +1 -1
package/dist/addon-runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_manifest_system_deps = require("./manifest-system-deps-
|
|
2
|
+
const require_manifest_system_deps = require("./manifest-system-deps-BbB94ozU.js");
|
|
3
3
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
4
4
|
let node_path = require("node:path");
|
|
5
5
|
node_path = require_chunk.__toESM(node_path);
|
|
@@ -714,8 +714,7 @@ async function main() {
|
|
|
714
714
|
warn: (line) => {
|
|
715
715
|
runnerLog.warn(line);
|
|
716
716
|
}
|
|
717
|
-
}
|
|
718
|
-
snapshotPath: `/tmp/heap-${nodeId.replace(/[^\w.-]/g, "_")}.heapsnapshot`
|
|
717
|
+
}
|
|
719
718
|
});
|
|
720
719
|
});
|
|
721
720
|
const shutdown = async () => {
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as createUdsLoggerWithControl, Ft as RUNNER_RSS_BUDGET_ENV, Jt as startRunnerHeapWatch, Qt as emitHeapDiagnosticReport, a as createUdsAddonContext, bt as resolveAddonClass, it as setWorkerNativeCapsChangeListener, j as LocalChildClient, n as installManifestPythonDeps, nt as getWorkerNativeCapSnapshot, ot as validateProviderRegistrations, t as installManifestSystemDeps, tt as getWorkerNativeCapProvider, yt as installManifestNativeDeps } from "./manifest-system-deps-4NeY_8iQ.mjs";
|
|
2
2
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
3
3
|
import { register } from "node:module";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -711,8 +711,7 @@ async function main() {
|
|
|
711
711
|
warn: (line) => {
|
|
712
712
|
runnerLog.warn(line);
|
|
713
713
|
}
|
|
714
|
-
}
|
|
715
|
-
snapshotPath: `/tmp/heap-${nodeId.replace(/[^\w.-]/g, "_")}.heapsnapshot`
|
|
714
|
+
}
|
|
716
715
|
});
|
|
717
716
|
});
|
|
718
717
|
const shutdown = async () => {
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as addonPagesCapability, Nt as errMsg, Pt as BaseAddon, on as EventCategory } from "../../dist-
|
|
1
|
+
import { E as addonPagesCapability, Nt as errMsg, Pt as BaseAddon, on as EventCategory } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nt as errMsg, O as addonWidgetsCapability, Pt as BaseAddon, on as EventCategory } from "../../dist-
|
|
1
|
+
import { Nt as errMsg, O as addonWidgetsCapability, Pt as BaseAddon, on as EventCategory } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
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
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
//#region src/builtins/alerts/prune-policy.ts
|
|
8
8
|
/**
|
|
9
9
|
* Ids older than `cutoffMs`, oldest first.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nt as errMsg, Pt as BaseAddon, k as alertsCapability, n as AlertSchema, on as EventCategory, qt as createEvent } from "../../dist-
|
|
1
|
+
import { Nt as errMsg, Pt as BaseAddon, k as alertsCapability, n as AlertSchema, on as EventCategory, qt as createEvent } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
//#region src/builtins/alerts/prune-policy.ts
|
|
3
3
|
/**
|
|
4
4
|
* Ids older than `cutoffMs`, oldest first.
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
let buffer = require("buffer");
|
|
9
9
|
let node_fs_promises = require("node:fs/promises");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pt as BaseAddon, j as backupCapability, on as EventCategory } from "../../dist-
|
|
1
|
+
import { Pt as BaseAddon, j as backupCapability, on as EventCategory } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
3
3
|
import { Buffer as Buffer$1 } from "buffer";
|
|
4
4
|
import * as fsp from "node:fs/promises";
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/console-logging/console-destination.ts
|
|
4
4
|
var LEVEL_RANK = {
|
|
@@ -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-
|
|
3
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
6
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as coreBlockAddonId, L as coreBlockIdFromAddonId, Nt as errMsg, Pt as BaseAddon, R as coreBlocksCapability, c as CORE_BLOCK_ADDON_PREFIX, d as DeclaredDevices, l as CoreBlockSchema, s as CORE_BLOCKS_ADDON_ID } from "../../dist-
|
|
1
|
+
import { I as coreBlockAddonId, L as coreBlockIdFromAddonId, Nt as errMsg, Pt as BaseAddon, R as coreBlocksCapability, c as CORE_BLOCK_ADDON_PREFIX, d as DeclaredDevices, l as CoreBlockSchema, s as CORE_BLOCKS_ADDON_ID } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import * as fs from "node:fs/promises";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,8 +3,8 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_retired_settings_keys = require("../../retired-settings-keys-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
|
+
const require_retired_settings_keys = require("../../retired-settings-keys-B1ij-xtH.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
10
10
|
//#region src/builtins/device-manager/adoption-job-engine.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bt as DeviceType, H as deviceManagerCapability, J as enumerateSchemaFields, Nt as errMsg, P as buildStreamParamsConfigSchema, Pt as BaseAddon, Qt as isDeviceConfigCap, Rt as DeviceFeature, U as deviceStateCapability, Ut as WELL_KNOWN_TAB_MAP, W as deviceStatusCapability, a as CAMERA_SWITCH_ORDER, an as sleep, b as STREAM_PROFILE_META, bt as runtimeStatePolicyFor, f as DeviceStatusSchema, ft as normalizeUnit, mt as parseStreamParamsFormPatch, o as CAP_NAMES_WITH_STATUS, on as EventCategory, q as enumerateItemArrayFields, t as ALL_CAPABILITY_DEFINITIONS, zt as DeviceRole } from "../../dist-
|
|
2
|
-
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-
|
|
1
|
+
import { Bt as DeviceType, H as deviceManagerCapability, J as enumerateSchemaFields, Nt as errMsg, P as buildStreamParamsConfigSchema, Pt as BaseAddon, Qt as isDeviceConfigCap, Rt as DeviceFeature, U as deviceStateCapability, Ut as WELL_KNOWN_TAB_MAP, W as deviceStatusCapability, a as CAMERA_SWITCH_ORDER, an as sleep, b as STREAM_PROFILE_META, bt as runtimeStatePolicyFor, f as DeviceStatusSchema, ft as normalizeUnit, mt as parseStreamParamsFormPatch, o as CAP_NAMES_WITH_STATUS, on as EventCategory, q as enumerateItemArrayFields, t as ALL_CAPABILITY_DEFINITIONS, zt as DeviceRole } from "../../dist-C-8k9Z9W.mjs";
|
|
2
|
+
import { n as purgeRetiredSettingsRows } from "../../retired-settings-keys-wfKn2-Sk.mjs";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { canonicalDeviceFingerprint } from "@camstack/types/node";
|
|
5
5
|
//#region src/builtins/device-manager/adoption-job-engine.ts
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
//#region src/builtins/doorbell/trigger-engine.ts
|
|
8
8
|
/**
|
|
9
9
|
* Pure trigger logic for the virtual-doorbell builtin — edge detection over
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bt as DeviceType, G as doorbellCapability, M as bareAddonId, Nt as errMsg, Pt as BaseAddon, Y as evaluateSensorEdge, _ as SOURCE_CAPS, nt as isSameAddonId, on as EventCategory, qt as createEvent, rt as isSourceCap, v as SOURCE_DEVICE_TYPES } from "../../dist-
|
|
1
|
+
import { Bt as DeviceType, G as doorbellCapability, M as bareAddonId, Nt as errMsg, Pt as BaseAddon, Y as evaluateSensorEdge, _ as SOURCE_CAPS, nt as isSameAddonId, on as EventCategory, qt as createEvent, rt as isSourceCap, v as SOURCE_DEVICE_TYPES } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
//#region src/builtins/doorbell/trigger-engine.ts
|
|
3
3
|
/**
|
|
4
4
|
* Pure trigger logic for the virtual-doorbell builtin — edge detection over
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
const require_formatter = require("../../formatter-DqAKDlvN.js");
|
|
8
8
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
9
9
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
import { t as formatLogLine } from "../../formatter-B7qW8bPJ.mjs";
|
|
3
3
|
//#region src/builtins/hub-forwarder/hub-forwarder-destination.ts
|
|
4
4
|
var DEFAULT_OUTBOUND_BUFFER_SIZE = 500;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
4
4
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
5
5
|
var NO_DEVICES = "liveness:no-devices";
|
|
6
6
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nt as errMsg, Pt as BaseAddon, on as EventCategory, qt as createEvent } from "../../dist-
|
|
1
|
+
import { Nt as errMsg, Pt as BaseAddon, on as EventCategory, qt as createEvent } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
//#region src/builtins/liveness-monitor/liveness-checks.ts
|
|
3
3
|
var NO_DEVICES = "liveness:no-devices";
|
|
4
4
|
var ALL_OFFLINE = "liveness:all-devices-offline";
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
let node_crypto = require("node:crypto");
|
|
8
8
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
9
9
|
let crypto$1 = require("crypto");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { A as authProviderCapability, At as userManagementCapability, Pt as BaseAddon, T as UserRecordSchema, r as ApiKeyRecordSchema, x as ScopedTokenSchema } from "../../dist-
|
|
2
|
+
import { A as authProviderCapability, At as userManagementCapability, Pt as BaseAddon, T as UserRecordSchema, r as ApiKeyRecordSchema, x as ScopedTokenSchema } from "../../dist-C-8k9Z9W.mjs";
|
|
3
3
|
import * as crypto$2 from "node:crypto";
|
|
4
4
|
import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
|
|
5
5
|
import nodeCrypto from "crypto";
|
|
@@ -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-
|
|
3
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
4
4
|
const require_tls = require("../../tls-BxQlomxd.js");
|
|
5
5
|
let node_fs_promises = require("node:fs/promises");
|
|
6
6
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pt as BaseAddon, on as EventCategory, st as localNetworkCapability } from "../../dist-
|
|
1
|
+
import { Pt as BaseAddon, on as EventCategory, st as localNetworkCapability } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
import { S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, i as writeExtraSans, l as reissueTlsLeaf, n as readTlsAccessStatus, o as validateUploadedTls, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, y as applyLanHttp } from "../../tls-DOTmtLCW.mjs";
|
|
3
3
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
8
8
|
/**
|
|
9
9
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
//#region src/builtins/loki-logging/loki-payload.ts
|
|
3
3
|
/**
|
|
4
4
|
* Loki rejects a label name that is not a valid Prometheus label
|
|
@@ -177,7 +177,6 @@ export default class NativeMetricsAddon extends BaseAddon<NativeMetricsConfig> {
|
|
|
177
177
|
* and signals it; the runner writes `/tmp/heap-<sanitized nodeId>.heapsnapshot`
|
|
178
178
|
* and logs its memoryUsage + heap-space breakdown. '$hub' targets this process.
|
|
179
179
|
*/
|
|
180
|
-
private dumpHeapSnapshot;
|
|
181
180
|
/** Raw `ps` scan returning every pid + command + resource stats. */
|
|
182
181
|
private runPs;
|
|
183
182
|
/**
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
let node_fs_promises = require("node:fs/promises");
|
|
8
8
|
let node_child_process = require("node:child_process");
|
|
9
9
|
let node_util = require("node:util");
|
|
@@ -2636,8 +2636,7 @@ var NativeMetricsAddon = class NativeMetricsAddon extends require_dist.BaseAddon
|
|
|
2636
2636
|
listAddonInstances: () => this.listAddonInstances(),
|
|
2637
2637
|
getAddonStats: (params) => this.getAddonStats(params.addonId),
|
|
2638
2638
|
listNodeProcesses: () => this.listNodeProcesses(),
|
|
2639
|
-
getLoadSeries: (params) => this.readLoadSeries(params)
|
|
2640
|
-
dumpHeapSnapshot: (params) => this.dumpHeapSnapshot(params)
|
|
2639
|
+
getLoadSeries: (params) => this.readLoadSeries(params)
|
|
2641
2640
|
};
|
|
2642
2641
|
this.applyLoadSeriesConfig();
|
|
2643
2642
|
if (this.isHub) {
|
|
@@ -2970,43 +2969,6 @@ var NativeMetricsAddon = class NativeMetricsAddon extends require_dist.BaseAddon
|
|
|
2970
2969
|
* and signals it; the runner writes `/tmp/heap-<sanitized nodeId>.heapsnapshot`
|
|
2971
2970
|
* and logs its memoryUsage + heap-space breakdown. '$hub' targets this process.
|
|
2972
2971
|
*/
|
|
2973
|
-
async dumpHeapSnapshot(input) {
|
|
2974
|
-
const sanitize = (nodeId) => nodeId.replace(/[^\w.-]/g, "_");
|
|
2975
|
-
let pid;
|
|
2976
|
-
let nodeId;
|
|
2977
|
-
if (input.addonId === "$hub") {
|
|
2978
|
-
pid = process.pid;
|
|
2979
|
-
nodeId = this.ctx.kernel.cluster?.broker?.nodeID ?? "$hub";
|
|
2980
|
-
} else {
|
|
2981
|
-
const target = (await this.listWorkerInstances()).find((w) => w.addonId === input.addonId);
|
|
2982
|
-
if (!target) return {
|
|
2983
|
-
success: false,
|
|
2984
|
-
reason: `no runner process for addon '${input.addonId}'`
|
|
2985
|
-
};
|
|
2986
|
-
pid = target.pid;
|
|
2987
|
-
nodeId = target.nodeId;
|
|
2988
|
-
}
|
|
2989
|
-
const path = `/tmp/heap-${sanitize(nodeId)}.heapsnapshot`;
|
|
2990
|
-
try {
|
|
2991
|
-
process.kill(pid, "SIGUSR2");
|
|
2992
|
-
this.ctx.logger.info("Requested heap snapshot from runner", { meta: {
|
|
2993
|
-
addonId: input.addonId,
|
|
2994
|
-
pid,
|
|
2995
|
-
path
|
|
2996
|
-
} });
|
|
2997
|
-
return {
|
|
2998
|
-
success: true,
|
|
2999
|
-
pid,
|
|
3000
|
-
path
|
|
3001
|
-
};
|
|
3002
|
-
} catch (err) {
|
|
3003
|
-
return {
|
|
3004
|
-
success: false,
|
|
3005
|
-
reason: err instanceof Error ? err.message : String(err),
|
|
3006
|
-
pid
|
|
3007
|
-
};
|
|
3008
|
-
}
|
|
3009
|
-
}
|
|
3010
2972
|
/** Raw `ps` scan returning every pid + command + resource stats. */
|
|
3011
2973
|
async runPs() {
|
|
3012
2974
|
try {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Nt as errMsg, Pt as BaseAddon, Q as foldSnapshotByFunction, _t as reducePoints, dt as metricsProviderCapability, on as EventCategory, qt as createEvent, vt as resolveBucketMs } from "../../dist-
|
|
1
|
+
import { Nt as errMsg, Pt as BaseAddon, Q as foldSnapshotByFunction, _t as reducePoints, dt as metricsProviderCapability, on as EventCategory, qt as createEvent, vt as resolveBucketMs } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
import { readFile, readdir } from "node:fs/promises";
|
|
3
3
|
import { execFile, execFileSync } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
|
@@ -2630,8 +2630,7 @@ var NativeMetricsAddon = class NativeMetricsAddon extends BaseAddon {
|
|
|
2630
2630
|
listAddonInstances: () => this.listAddonInstances(),
|
|
2631
2631
|
getAddonStats: (params) => this.getAddonStats(params.addonId),
|
|
2632
2632
|
listNodeProcesses: () => this.listNodeProcesses(),
|
|
2633
|
-
getLoadSeries: (params) => this.readLoadSeries(params)
|
|
2634
|
-
dumpHeapSnapshot: (params) => this.dumpHeapSnapshot(params)
|
|
2633
|
+
getLoadSeries: (params) => this.readLoadSeries(params)
|
|
2635
2634
|
};
|
|
2636
2635
|
this.applyLoadSeriesConfig();
|
|
2637
2636
|
if (this.isHub) {
|
|
@@ -2964,43 +2963,6 @@ var NativeMetricsAddon = class NativeMetricsAddon extends BaseAddon {
|
|
|
2964
2963
|
* and signals it; the runner writes `/tmp/heap-<sanitized nodeId>.heapsnapshot`
|
|
2965
2964
|
* and logs its memoryUsage + heap-space breakdown. '$hub' targets this process.
|
|
2966
2965
|
*/
|
|
2967
|
-
async dumpHeapSnapshot(input) {
|
|
2968
|
-
const sanitize = (nodeId) => nodeId.replace(/[^\w.-]/g, "_");
|
|
2969
|
-
let pid;
|
|
2970
|
-
let nodeId;
|
|
2971
|
-
if (input.addonId === "$hub") {
|
|
2972
|
-
pid = process.pid;
|
|
2973
|
-
nodeId = this.ctx.kernel.cluster?.broker?.nodeID ?? "$hub";
|
|
2974
|
-
} else {
|
|
2975
|
-
const target = (await this.listWorkerInstances()).find((w) => w.addonId === input.addonId);
|
|
2976
|
-
if (!target) return {
|
|
2977
|
-
success: false,
|
|
2978
|
-
reason: `no runner process for addon '${input.addonId}'`
|
|
2979
|
-
};
|
|
2980
|
-
pid = target.pid;
|
|
2981
|
-
nodeId = target.nodeId;
|
|
2982
|
-
}
|
|
2983
|
-
const path = `/tmp/heap-${sanitize(nodeId)}.heapsnapshot`;
|
|
2984
|
-
try {
|
|
2985
|
-
process.kill(pid, "SIGUSR2");
|
|
2986
|
-
this.ctx.logger.info("Requested heap snapshot from runner", { meta: {
|
|
2987
|
-
addonId: input.addonId,
|
|
2988
|
-
pid,
|
|
2989
|
-
path
|
|
2990
|
-
} });
|
|
2991
|
-
return {
|
|
2992
|
-
success: true,
|
|
2993
|
-
pid,
|
|
2994
|
-
path
|
|
2995
|
-
};
|
|
2996
|
-
} catch (err) {
|
|
2997
|
-
return {
|
|
2998
|
-
success: false,
|
|
2999
|
-
reason: err instanceof Error ? err.message : String(err),
|
|
3000
|
-
pid
|
|
3001
|
-
};
|
|
3002
|
-
}
|
|
3003
|
-
}
|
|
3004
2966
|
/** Raw `ps` scan returning every pid + command + resource stats. */
|
|
3005
2967
|
async runPs() {
|
|
3006
2968
|
try {
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
let node_util = require("node:util");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { o as __toESM } from "../../chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { Ct as scoreRuntimes, K as enumerateInferenceDevices, Nt as errMsg, Pt as BaseAddon, Yt as emitReadiness, ht as platformProbeCapability, on as EventCategory } from "../../dist-
|
|
2
|
+
import { Ct as scoreRuntimes, K as enumerateInferenceDevices, Nt as errMsg, Pt as BaseAddon, Yt as emitReadiness, ht as platformProbeCapability, on as EventCategory } from "../../dist-C-8k9Z9W.mjs";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
|
5
5
|
import * as fs from "node:fs";
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.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 { Pt as BaseAddon, on as EventCategory } from "../../dist-
|
|
1
|
+
import { Pt as BaseAddon, on as EventCategory } from "../../dist-C-8k9Z9W.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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as nodePin, Bt as DeviceType, M as bareAddonId, N as batteryCapability, Nt as errMsg, Pt as BaseAddon, Rt as DeviceFeature, Tt as snapshotCapability, V as deriveBatteryPresence, i as BatteryStatusSchema, kt as streamQualityLabel, on as EventCategory } from "../../dist-
|
|
1
|
+
import { $t as nodePin, Bt as DeviceType, M as bareAddonId, N as batteryCapability, Nt as errMsg, Pt as BaseAddon, Rt as DeviceFeature, Tt as snapshotCapability, V as deriveBatteryPresence, i as BatteryStatusSchema, kt as streamQualityLabel, on as EventCategory } from "../../dist-C-8k9Z9W.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
import { signExpiringUrl, verifyExpiringUrl } from "@camstack/types/node";
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.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 { Ot as storageProviderCapability, Pt as BaseAddon, Z as filesystemBrowseCapability } from "../../dist-
|
|
1
|
+
import { Ot as storageProviderCapability, Pt as BaseAddon, Z as filesystemBrowseCapability } from "../../dist-C-8k9Z9W.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";
|
|
Binary file
|
|
Binary file
|
|
@@ -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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.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 { C as StorageLocationTypeSchema, Dt as storageMigrationCapability, Et as storageCapability, F as collectSecretConfigKeys, Pt as BaseAddon, S as StorageCleanupJobSchema, en as parseJsonObject, h as REDACTED_SECRET, w as StorageMigrationJobSchema, wt as settingsStoreCapability } from "../../dist-
|
|
1
|
+
import { C as StorageLocationTypeSchema, Dt as storageMigrationCapability, Et as storageCapability, F as collectSecretConfigKeys, Pt as BaseAddon, S as StorageCleanupJobSchema, en as parseJsonObject, h as REDACTED_SECRET, w as StorageMigrationJobSchema, wt as settingsStoreCapability } from "../../dist-C-8k9Z9W.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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.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 { Nt as errMsg, Pt as BaseAddon, Zt as hydrateSchema } from "../../dist-
|
|
1
|
+
import { Nt as errMsg, Pt as BaseAddon, Zt as hydrateSchema } from "../../dist-C-8k9Z9W.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-
|
|
6
|
+
const require_dist = require("../../dist-DkVaJ5vG.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 { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Pt as BaseAddon, ct as logDestinationCapability } from "../../dist-C-8k9Z9W.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";
|
|
@@ -12842,17 +12842,6 @@ var ContainerMemoryPointSchema = z.object({
|
|
|
12842
12842
|
*/
|
|
12843
12843
|
gpuShmemBytes: z.number().nullable()
|
|
12844
12844
|
}).extend({ atMs: z.number() });
|
|
12845
|
-
var DumpHeapSnapshotInputSchema = z.object({
|
|
12846
|
-
/** The addon whose runner should dump a heap snapshot. */
|
|
12847
|
-
addonId: z.string() });
|
|
12848
|
-
var DumpHeapSnapshotResultSchema = z.object({
|
|
12849
|
-
success: z.boolean(),
|
|
12850
|
-
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
12851
|
-
path: z.string().optional(),
|
|
12852
|
-
/** Process pid that was signalled. */
|
|
12853
|
-
pid: z.number().optional(),
|
|
12854
|
-
reason: z.string().optional()
|
|
12855
|
-
});
|
|
12856
12845
|
/**
|
|
12857
12846
|
* One point of one function's series.
|
|
12858
12847
|
*
|
|
@@ -13041,19 +13030,7 @@ var metricsProviderCapability = {
|
|
|
13041
13030
|
* agent's ring alone (`durable: false`). Empty is a legitimate answer: a
|
|
13042
13031
|
* node nobody has heard from has no series, and saying so is the truth.
|
|
13043
13032
|
*/
|
|
13044
|
-
getLoadSeries: method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
|
|
13045
|
-
/**
|
|
13046
|
-
* Tell the addon's forked runner to write a V8 heap snapshot to disk (via
|
|
13047
|
-
* SIGUSR2 — the runner's diagnostic handler). Also logs its
|
|
13048
|
-
* `process.memoryUsage()` + heap-space breakdown. Resolves the pid from
|
|
13049
|
-
* `$process.list`, so it can only reach a runner this node spawned. Use
|
|
13050
|
-
* for deep per-addon memory attribution; copy the returned path off the
|
|
13051
|
-
* node to analyze.
|
|
13052
|
-
*/
|
|
13053
|
-
dumpHeapSnapshot: method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
13054
|
-
kind: "mutation",
|
|
13055
|
-
auth: "admin"
|
|
13056
|
-
})
|
|
13033
|
+
getLoadSeries: method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
|
|
13057
13034
|
}
|
|
13058
13035
|
};
|
|
13059
13036
|
var modelConvertCapability = {
|
|
@@ -17777,7 +17754,8 @@ var MediaFileKindEnum = z.enum([
|
|
|
17777
17754
|
"plateCrop",
|
|
17778
17755
|
"keyFrame",
|
|
17779
17756
|
"keyFrameSmall",
|
|
17780
|
-
"thumbnailSmall"
|
|
17757
|
+
"thumbnailSmall",
|
|
17758
|
+
"sceneFrame"
|
|
17781
17759
|
]);
|
|
17782
17760
|
/**
|
|
17783
17761
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -36881,12 +36859,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
36881
36859
|
addonId: null,
|
|
36882
36860
|
access: "view"
|
|
36883
36861
|
},
|
|
36884
|
-
"metricsProvider.dumpHeapSnapshot": {
|
|
36885
|
-
capName: "metrics-provider",
|
|
36886
|
-
capScope: "system",
|
|
36887
|
-
addonId: null,
|
|
36888
|
-
access: "create"
|
|
36889
|
-
},
|
|
36890
36862
|
"metricsProvider.getAddonStats": {
|
|
36891
36863
|
capName: "metrics-provider",
|
|
36892
36864
|
capScope: "system",
|
|
@@ -12842,17 +12842,6 @@ var ContainerMemoryPointSchema = zod.z.object({
|
|
|
12842
12842
|
*/
|
|
12843
12843
|
gpuShmemBytes: zod.z.number().nullable()
|
|
12844
12844
|
}).extend({ atMs: zod.z.number() });
|
|
12845
|
-
var DumpHeapSnapshotInputSchema = zod.z.object({
|
|
12846
|
-
/** The addon whose runner should dump a heap snapshot. */
|
|
12847
|
-
addonId: zod.z.string() });
|
|
12848
|
-
var DumpHeapSnapshotResultSchema = zod.z.object({
|
|
12849
|
-
success: zod.z.boolean(),
|
|
12850
|
-
/** Path of the written .heapsnapshot inside the runner's container/host. */
|
|
12851
|
-
path: zod.z.string().optional(),
|
|
12852
|
-
/** Process pid that was signalled. */
|
|
12853
|
-
pid: zod.z.number().optional(),
|
|
12854
|
-
reason: zod.z.string().optional()
|
|
12855
|
-
});
|
|
12856
12845
|
/**
|
|
12857
12846
|
* One point of one function's series.
|
|
12858
12847
|
*
|
|
@@ -13041,19 +13030,7 @@ var metricsProviderCapability = {
|
|
|
13041
13030
|
* agent's ring alone (`durable: false`). Empty is a legitimate answer: a
|
|
13042
13031
|
* node nobody has heard from has no series, and saying so is the truth.
|
|
13043
13032
|
*/
|
|
13044
|
-
getLoadSeries: method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
|
|
13045
|
-
/**
|
|
13046
|
-
* Tell the addon's forked runner to write a V8 heap snapshot to disk (via
|
|
13047
|
-
* SIGUSR2 — the runner's diagnostic handler). Also logs its
|
|
13048
|
-
* `process.memoryUsage()` + heap-space breakdown. Resolves the pid from
|
|
13049
|
-
* `$process.list`, so it can only reach a runner this node spawned. Use
|
|
13050
|
-
* for deep per-addon memory attribution; copy the returned path off the
|
|
13051
|
-
* node to analyze.
|
|
13052
|
-
*/
|
|
13053
|
-
dumpHeapSnapshot: method(DumpHeapSnapshotInputSchema, DumpHeapSnapshotResultSchema, {
|
|
13054
|
-
kind: "mutation",
|
|
13055
|
-
auth: "admin"
|
|
13056
|
-
})
|
|
13033
|
+
getLoadSeries: method(GetLoadSeriesInputSchema, NodeLoadSeriesSchema)
|
|
13057
13034
|
}
|
|
13058
13035
|
};
|
|
13059
13036
|
var modelConvertCapability = {
|
|
@@ -17777,7 +17754,8 @@ var MediaFileKindEnum = zod.z.enum([
|
|
|
17777
17754
|
"plateCrop",
|
|
17778
17755
|
"keyFrame",
|
|
17779
17756
|
"keyFrameSmall",
|
|
17780
|
-
"thumbnailSmall"
|
|
17757
|
+
"thumbnailSmall",
|
|
17758
|
+
"sceneFrame"
|
|
17781
17759
|
]);
|
|
17782
17760
|
/**
|
|
17783
17761
|
* One media row ON THE WIRE: what it is, how big it is, and WHERE ITS BYTES
|
|
@@ -36881,12 +36859,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
|
|
|
36881
36859
|
addonId: null,
|
|
36882
36860
|
access: "view"
|
|
36883
36861
|
},
|
|
36884
|
-
"metricsProvider.dumpHeapSnapshot": {
|
|
36885
|
-
capName: "metrics-provider",
|
|
36886
|
-
capScope: "system",
|
|
36887
|
-
addonId: null,
|
|
36888
|
-
access: "create"
|
|
36889
|
-
},
|
|
36890
36862
|
"metricsProvider.getAddonStats": {
|
|
36891
36863
|
capName: "metrics-provider",
|
|
36892
36864
|
capScope: "system",
|
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export { createEventPlaneMeter, createEventPlaneReader, diffEventPlane, EVENT_PL
|
|
|
51
51
|
export type { SocketPeerDelta, SocketPeerSample, SocketPlaneBaseline, SocketPlaneCounters, SocketPlaneMeter, SocketPlaneReader, SocketPlaneRegistry, SocketPlaneRegistryChild, SocketPlaneSources, SocketPlaneWindow, } from './kernel/socket-plane-report.js';
|
|
52
52
|
export { createSocketPlaneMeter, createSocketPlaneReader, diffSocketPlane, EMPTY_SOCKET_PLANE_BASELINE, formatSocketPlane, SOCKET_PLANE_TOP_N, } from './kernel/socket-plane-report.js';
|
|
53
53
|
export type { HeapDiagnosticDeps, HeapDiagnosticRequest, HeapSpaceReader, HeapSpaceUsage, } from './kernel/heap-spaces.js';
|
|
54
|
-
export { DECISIVE_HEAP_SPACES, emitHeapDiagnosticReport, formatHeapSpaces, HEAP_SPACE_REPORT_MIN_MB,
|
|
54
|
+
export { DECISIVE_HEAP_SPACES, emitHeapDiagnosticReport, formatHeapSpaces, HEAP_SPACE_REPORT_MIN_MB, heapSpaceField, readHeapSpaces, selectReportedSpaces, } from './kernel/heap-spaces.js';
|
|
55
55
|
export type { DeferredHeapWatchSink, HeapReclaimer, HeapReclaimOptions, HeapSample, HeapWatchProbes, HeapWatchSink, LoopDelayMeter, LoopDelaySample, RssBreakdown, RssBudgetOptions, RssBudgetState, RssGrowthShape, RunnerHeapWatchOptions, } from './kernel/heap-watch.js';
|
|
56
56
|
export { buildHeapSample, createDeferredHeapWatchSink, createLoopDelayMeter, createV8Reclaimer, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, hubMainRssBudget, describeRss, nextRssBudgetState, parseRssBudgetMb, reclaimIntervalMs, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, ZERO_LOOP_DELAY, } from './kernel/heap-watch.js';
|
|
57
57
|
export type { AddonDataPlaneFacility, DataPlaneSink, } from './kernel/moleculer/addon-data-plane-facility.js';
|
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-
|
|
3
|
+
const require_dist = require("./dist-DkVaJ5vG.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");
|
|
@@ -27,7 +27,7 @@ require("./builtins/system-config/index.js");
|
|
|
27
27
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
28
28
|
const require_file_data_plane = require("./file-data-plane-DO8KbxCe.js");
|
|
29
29
|
const require_tls$1 = require("./tls-BxQlomxd.js");
|
|
30
|
-
const require_manifest_system_deps = require("./manifest-system-deps-
|
|
30
|
+
const require_manifest_system_deps = require("./manifest-system-deps-BbB94ozU.js");
|
|
31
31
|
const require_resource_monitor = require("./resource-monitor-CdnzxBLP.js");
|
|
32
32
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
33
33
|
let zod = require("zod");
|
|
@@ -95354,7 +95354,6 @@ exports.QUARANTINE_DIRNAME = QUARANTINE_DIRNAME;
|
|
|
95354
95354
|
exports.RESTART_MARKER_FILE = RESTART_MARKER_FILE;
|
|
95355
95355
|
exports.RSS_BUDGET_REANNOUNCE_MIN_MS = require_manifest_system_deps.RSS_BUDGET_REANNOUNCE_MIN_MS;
|
|
95356
95356
|
exports.RSS_BUDGET_RELEASE_RATIO = require_manifest_system_deps.RSS_BUDGET_RELEASE_RATIO;
|
|
95357
|
-
exports.RUNNER_HEAP_SNAPSHOT_ENV = require_manifest_system_deps.RUNNER_HEAP_SNAPSHOT_ENV;
|
|
95358
95357
|
exports.RUNNER_HEAP_WATCH_INTERVAL_MS = require_manifest_system_deps.RUNNER_HEAP_WATCH_INTERVAL_MS;
|
|
95359
95358
|
exports.RUNNER_RSS_BUDGET_ENV = require_manifest_system_deps.RUNNER_RSS_BUDGET_ENV;
|
|
95360
95359
|
exports.RUNTIME_DEFAULTS = require_dist.RUNTIME_DEFAULTS;
|
|
@@ -95545,7 +95544,6 @@ exports.getSinglePidStats = require_resource_monitor.getSinglePidStats;
|
|
|
95545
95544
|
exports.getWorkerDeviceRegistry = require_manifest_system_deps.getWorkerDeviceRegistry;
|
|
95546
95545
|
exports.hasDotNode = hasDotNode;
|
|
95547
95546
|
exports.hashClusterSecret = hashClusterSecret;
|
|
95548
|
-
exports.heapSnapshotAuthorised = require_manifest_system_deps.heapSnapshotAuthorised;
|
|
95549
95547
|
exports.heapSpaceField = require_manifest_system_deps.heapSpaceField;
|
|
95550
95548
|
exports.hubMainRssBudget = require_manifest_system_deps.hubMainRssBudget;
|
|
95551
95549
|
exports.installManifestNativeDeps = require_manifest_system_deps.installManifestNativeDeps;
|
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 { $ as isArrayOutputSchema, D as addonSettingsCapability, Ft as DATAPLANE_SECRET_HEADER$1, Gt as asNumber, Ht as ReadinessTimeoutError, It as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Jt as emitDownForOwnedCaps, Kt as asString$1, Lt as DEVICE_STATUS_METHOD, Nt as errMsg$1, St as scopesAllowDeviceCap, Vt as ReadinessRegistry, Wt as asJsonObject$1, X as extractNestedAddonId, Xt as expandCapMethods, at as kebabToCamel, en as parseJsonObject, et as isCollectionArrayMethod, g as RUNTIME_DEFAULTS, gt as procedureAuthKey, in as scopeKey, it as isVoidInput, lt as logLevelAtMost, m as METHOD_ACCESS_MAP, nn as readinessKey, on as EventCategory$1, ot as lifecycleJobSchema, p as LOG_LEVEL_RANK, pt as objectInputDeclaresAddonId, qt as createEvent, rn as resolveCapMount, t as ALL_CAPABILITY_DEFINITIONS, tn as parseJsonUnknown, tt as isObjectInput, ut as looseSchema, xt as scopesAllowAddon, yt as resolveMethodAuth } from "./dist-
|
|
2
|
+
import { $ as isArrayOutputSchema, D as addonSettingsCapability, Ft as DATAPLANE_SECRET_HEADER$1, Gt as asNumber, Ht as ReadinessTimeoutError, It as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Jt as emitDownForOwnedCaps, Kt as asString$1, Lt as DEVICE_STATUS_METHOD, Nt as errMsg$1, St as scopesAllowDeviceCap, Vt as ReadinessRegistry, Wt as asJsonObject$1, X as extractNestedAddonId, Xt as expandCapMethods, at as kebabToCamel, en as parseJsonObject, et as isCollectionArrayMethod, g as RUNTIME_DEFAULTS, gt as procedureAuthKey, in as scopeKey, it as isVoidInput, lt as logLevelAtMost, m as METHOD_ACCESS_MAP, nn as readinessKey, on as EventCategory$1, ot as lifecycleJobSchema, p as LOG_LEVEL_RANK, pt as objectInputDeclaresAddonId, qt as createEvent, rn as resolveCapMount, t as ALL_CAPABILITY_DEFINITIONS, tn as parseJsonUnknown, tt as isObjectInput, ut as looseSchema, xt as scopesAllowAddon, yt as resolveMethodAuth } from "./dist-C-8k9Z9W.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";
|
|
@@ -26,7 +26,7 @@ import "./builtins/system-config/index.mjs";
|
|
|
26
26
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
27
27
|
import { a as parseTokenizedUrl, c as collectModelFiles, d as downloadModel, f as ensureModel, h as isModelDownloaded, i as parseRangeHeader, l as deleteModelFromDisk, m as getModelFilePath, n as contentTypeFor, o as resolveFilePath, p as fetchJson, r as createAuthenticatedFileServer, s as ModelDownloadService, t as createFileDataPlaneHandler, u as downloadFile } from "./file-data-plane-BhKdxJgf.mjs";
|
|
28
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
|
|
29
|
+
import { $ as buildUdsNativeCapProxy, $t as formatHeapSpaces, A as createUdsLoggerWithControl, At as HUB_MAIN_RSS_BUDGET_MB, B as readMoleculerFanoutMode, Bt as createV8Reclaimer, C as ipcParentLink, Ct as createAddonDataPlaneFacility, D as createUdsEventBus, Dt as HEAP_WATCH_INTERVAL_MS, E as createUdsEventBridge, 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 emitHeapDiagnosticReport, R as classifyCapRoute, Rt as createDeferredHeapWatchSink, S as buildLinkChain, St as runNpm, T as createParentUnownedCallHandler, 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 DECISIVE_HEAP_SPACES, Y as localEndpointPath, Yt as strandedMb, Z as encodeFrame, Zt as HEAP_SPACE_REPORT_MIN_MB, _ as AddonDepsManager, _n as createEventPlaneReader, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as createSocketPlaneMeter, at as createAddonService, b as brokerCallForCap, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as formatSocketPlane, ct as capActionName, d as clusterEventTopic, dn as recordSocketFrame, dt as capServiceName, en as heapSpaceField, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as sampleSocketDirection, ft as parseCapAction, g as subscribePassthrough, gn as createEventPlaneMeter, gt as CapabilityHandle, h as setNodeEventInterest, hn as EVENT_PLANE_TOP_N, ht as DeviceRegistry, i as createAddonContext, in as SOCKET_PLANE_TOP_N, j as LocalChildClient, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as EMPTY_SOCKET_DIRECTION, lt as capActionSuffix, m as registerEventBusService, mn as socketDirectionMessages, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as selectReportedSpaces, o as getWorkerDeviceRegistry, on as createSocketPlaneReader, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as socketDirectionBytes, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as EMPTY_SOCKET_PLANE_BASELINE, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as diffSocketPlane, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as readHeapSpaces, u as EVENT_TOPIC_PREFIX, un as createSocketDirectionCounters, ut as capBareAction, v as createKernelHwAccel, vn as diffEventPlane, vt as copyBundledNativeModules, w as localProviderLink, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xt as resolveNpmInvocation, y as resolveHwAccel, yn as formatEventPlane, yt as installManifestNativeDeps, z as callWithServiceDiscovery, zt as createLoopDelayMeter } from "./manifest-system-deps-4NeY_8iQ.mjs";
|
|
30
30
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
|
|
31
31
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
32
32
|
import { z } from "zod";
|
|
@@ -95238,4 +95238,4 @@ var LifecycleJobEngine = class {
|
|
|
95238
95238
|
}
|
|
95239
95239
|
};
|
|
95240
95240
|
//#endregion
|
|
95241
|
-
export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, 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,
|
|
95241
|
+
export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, 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, 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, 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, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, 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, 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, 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, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WHERE the bytes come from, without stopping the process.
|
|
3
|
+
*
|
|
4
|
+
* A heap SNAPSHOT answers "what is retained" and costs a stop-the-world walk
|
|
5
|
+
* plus a multi-gigabyte write. On this hub that took the machine down twice;
|
|
6
|
+
* the second attempt did not even finish — it left a 0-byte file and an
|
|
7
|
+
* unresponsive host that had to be rebooted. The remotely-triggerable command
|
|
8
|
+
* is gone (`scripts/check-no-heap-dump-command.ts`).
|
|
9
|
+
*
|
|
10
|
+
* V8's SAMPLING heap profiler answers a cheaper, different question: which
|
|
11
|
+
* allocation SITES the bytes came from, statistically, with no pause and
|
|
12
|
+
* nothing written. Measured locally: 51 ms for a window that allocated 200 000
|
|
13
|
+
* objects.
|
|
14
|
+
*
|
|
15
|
+
* ## What this is NOT
|
|
16
|
+
*
|
|
17
|
+
* It is not retention analysis. It says where bytes were BORN, not what is
|
|
18
|
+
* holding them alive, and a leak is about the second. It is still the right
|
|
19
|
+
* first instrument for the recorder's ~900 MB of large objects that "no
|
|
20
|
+
* allocation site in its tree can produce" — because naming the sites is
|
|
21
|
+
* exactly the claim under test, and if the sites turn out to be ordinary, the
|
|
22
|
+
* retention question is the one that survives.
|
|
23
|
+
*
|
|
24
|
+
* This module is the PURE half: it folds the profile V8 hands back. The
|
|
25
|
+
* sampling belongs to the caller, so the fold is testable without a profiler.
|
|
26
|
+
*/
|
|
27
|
+
/** One frame as the inspector protocol reports it. */
|
|
28
|
+
export interface AllocationCallFrame {
|
|
29
|
+
readonly functionName: string;
|
|
30
|
+
readonly url: string;
|
|
31
|
+
readonly lineNumber: number;
|
|
32
|
+
}
|
|
33
|
+
/** One node of `HeapProfiler.stopSampling`'s profile tree. */
|
|
34
|
+
export interface AllocationProfileNode {
|
|
35
|
+
readonly selfSize: number;
|
|
36
|
+
readonly callFrame: AllocationCallFrame;
|
|
37
|
+
readonly children?: readonly AllocationProfileNode[];
|
|
38
|
+
}
|
|
39
|
+
export interface AllocationSite {
|
|
40
|
+
readonly functionName: string;
|
|
41
|
+
/** `file.js:line` — what a human reads in a log line. */
|
|
42
|
+
readonly site: string;
|
|
43
|
+
readonly bytes: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Fold the tree into the biggest allocation sites.
|
|
47
|
+
*
|
|
48
|
+
* Sites are SUMMED across call paths: one site reached from two callers is one
|
|
49
|
+
* site, and reporting it twice at half the size is how a dominant allocator
|
|
50
|
+
* hides in a long tail. Identity is (function, url, line) — the same line of
|
|
51
|
+
* two files is two sites.
|
|
52
|
+
*/
|
|
53
|
+
export declare function summariseAllocationProfile(head: AllocationProfileNode, limit: number): readonly AllocationSite[];
|
|
54
|
+
/**
|
|
55
|
+
* The inspector session slice this needs. Injected so the sampler is testable
|
|
56
|
+
* without an inspector, and so nothing here reaches for a global.
|
|
57
|
+
*/
|
|
58
|
+
export interface HeapProfilerSession {
|
|
59
|
+
connect: () => void;
|
|
60
|
+
disconnect: () => void;
|
|
61
|
+
post: (method: string, paramsOrCb: unknown, maybeCb?: unknown) => void;
|
|
62
|
+
}
|
|
63
|
+
export interface SampleHeapAllocationsInput {
|
|
64
|
+
readonly session: HeapProfilerSession;
|
|
65
|
+
/** How long to sample. Bounded by the caller; this module never loops. */
|
|
66
|
+
readonly durationMs: number;
|
|
67
|
+
readonly limit: number;
|
|
68
|
+
readonly wait: (ms: number) => Promise<void>;
|
|
69
|
+
/** Bytes between samples. Larger = cheaper and coarser. */
|
|
70
|
+
readonly samplingInterval?: number;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Sample allocations for a bounded window and answer with the top sites.
|
|
74
|
+
*
|
|
75
|
+
* Writes NOTHING and pauses nothing. The profiler is stopped and the session
|
|
76
|
+
* disconnected in a `finally`, because a sampler left running is a tax on the
|
|
77
|
+
* process that outlives whoever enabled it — and the failure that made this
|
|
78
|
+
* module necessary was a diagnostic nobody could turn off from outside.
|
|
79
|
+
*/
|
|
80
|
+
export declare function sampleHeapAllocations(input: SampleHeapAllocationsInput): Promise<readonly AllocationSite[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Per-runner opt-in for allocation sampling.
|
|
83
|
+
*
|
|
84
|
+
* Explicit `'on'` only — the same discipline the snapshot flag had. The
|
|
85
|
+
* DIFFERENCE is what it authorises: that flag allowed a stop-the-world walk and
|
|
86
|
+
* a multi-gigabyte write, so leaving it on in production (which is exactly what
|
|
87
|
+
* happened) was an outage waiting for a signal. This one allows ~50 ms of
|
|
88
|
+
* statistical sampling and one log line, so a runner left with it on is simply
|
|
89
|
+
* a runner that reports where its bytes come from.
|
|
90
|
+
*/
|
|
91
|
+
export declare const RUNNER_ALLOC_SAMPLE_ENV = "CAMSTACK_RUNNER_ALLOC_SAMPLE";
|
|
92
|
+
export declare function allocationSamplingEnabled(env?: NodeJS.ProcessEnv): boolean;
|
|
93
|
+
/** Sample on every Nth heartbeat — one sample per ~10 minutes at a 60 s beat. */
|
|
94
|
+
export declare const ALLOCATION_SAMPLE_EVERY_N_BEATS = 10;
|
|
95
|
+
/** How long one sample runs. Short enough that two can never overlap. */
|
|
96
|
+
export declare const ALLOCATION_SAMPLE_WINDOW_MS = 5000;
|
|
97
|
+
/** How many sites one log line carries. */
|
|
98
|
+
export declare const ALLOCATION_SAMPLE_TOP_N = 8;
|
|
99
|
+
/**
|
|
100
|
+
* Is this the beat that samples?
|
|
101
|
+
*
|
|
102
|
+
* Beat 0 never samples: a runner that has just booted has allocated nothing
|
|
103
|
+
* worth ranking. A non-positive cadence samples NEVER rather than always — a
|
|
104
|
+
* misconfigured `0` must not turn a diagnostic into a permanent load, which is
|
|
105
|
+
* the failure mode this whole module exists because of.
|
|
106
|
+
*/
|
|
107
|
+
export declare function shouldSampleAllocations(beat: number, everyN: number): boolean;
|
|
@@ -97,7 +97,6 @@ export declare function formatHeapSpaces(spaces: readonly HeapSpaceUsage[], minM
|
|
|
97
97
|
* seconds. The per-space breakdown is ~1.2 µs and changes nothing. Welding them
|
|
98
98
|
* to one signal priced the free answer at the cost of the expensive one.
|
|
99
99
|
*/
|
|
100
|
-
export declare const RUNNER_HEAP_SNAPSHOT_ENV = "CAMSTACK_RUNNER_HEAP_SNAPSHOT";
|
|
101
100
|
/**
|
|
102
101
|
* Whether the operator has authorised the snapshot half of SIGUSR2.
|
|
103
102
|
*
|
|
@@ -105,26 +104,22 @@ export declare const RUNNER_HEAP_SNAPSHOT_ENV = "CAMSTACK_RUNNER_HEAP_SNAPSHOT";
|
|
|
105
104
|
* authorisation: a multi-GB stop-the-world write must never be reachable by a
|
|
106
105
|
* value someone set for a different purpose.
|
|
107
106
|
*/
|
|
108
|
-
export declare function heapSnapshotAuthorised(env?: NodeJS.ProcessEnv): boolean;
|
|
109
107
|
/** What a diagnostic report is ABOUT. */
|
|
110
108
|
export interface HeapDiagnosticRequest {
|
|
111
109
|
/** The runner's nodeId, so the line groups with its `[mem]` heartbeat. */
|
|
112
110
|
readonly label: string;
|
|
113
111
|
readonly addons: readonly string[];
|
|
114
112
|
readonly sink: HeapWatchSink;
|
|
115
|
-
/** Where a snapshot would be written, if one is authorised. */
|
|
116
|
-
readonly snapshotPath: string;
|
|
117
113
|
}
|
|
118
114
|
/** Everything the report READS. Injected so the split itself is testable. */
|
|
119
115
|
export interface HeapDiagnosticDeps {
|
|
120
116
|
readonly readMemory: () => NodeJS.MemoryUsage;
|
|
121
117
|
readonly readSpaces: HeapSpaceReader;
|
|
122
|
-
readonly writeSnapshot: (path: string) => void;
|
|
123
118
|
readonly env: NodeJS.ProcessEnv;
|
|
124
119
|
}
|
|
125
120
|
/**
|
|
126
121
|
* The SIGUSR2 report — memory + the FULL per-space breakdown, always; the
|
|
127
|
-
* snapshot
|
|
122
|
+
* snapshot NEVER — see the note in the body.
|
|
128
123
|
*
|
|
129
124
|
* The breakdown here keeps every non-empty space at 0.1 MB, unlike the
|
|
130
125
|
* heartbeat's filtered whole-MB pair: this is a hand-fired diagnostic read once
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./dist-
|
|
1
|
+
import "./dist-C-8k9Z9W.mjs";
|
|
2
2
|
import "./hub-cap-forward-BdT320dq.mjs";
|
|
3
3
|
import * as crypto$1 from "node:crypto";
|
|
4
4
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
@@ -576,37 +576,14 @@ function formatHeapSpaces(spaces, minMb = 32) {
|
|
|
576
576
|
if (selected.length === 0) return "";
|
|
577
577
|
return ` ${selected.map((s) => `${heapSpaceField(s.name)}=${mb(s.usedBytes)}MB`).join(" ")}`;
|
|
578
578
|
}
|
|
579
|
-
/**
|
|
580
|
-
* Env var that authorises a heap snapshot on SIGUSR2.
|
|
581
|
-
*
|
|
582
|
-
* A snapshot is an admin mutation on a production hub: `writeHeapSnapshot`
|
|
583
|
-
* streams a file the size of the heap to `/tmp` and stops the world while it
|
|
584
|
-
* walks it — on the recorder that is a multi-GB file and a stall measured in
|
|
585
|
-
* seconds. The per-space breakdown is ~1.2 µs and changes nothing. Welding them
|
|
586
|
-
* to one signal priced the free answer at the cost of the expensive one.
|
|
587
|
-
*/
|
|
588
|
-
var RUNNER_HEAP_SNAPSHOT_ENV = "CAMSTACK_RUNNER_HEAP_SNAPSHOT";
|
|
589
|
-
/**
|
|
590
|
-
* Whether the operator has authorised the snapshot half of SIGUSR2.
|
|
591
|
-
*
|
|
592
|
-
* Explicit `'on'` only. Anything else — unset, empty, `'true'`, `'1'` — is NOT
|
|
593
|
-
* authorisation: a multi-GB stop-the-world write must never be reachable by a
|
|
594
|
-
* value someone set for a different purpose.
|
|
595
|
-
*/
|
|
596
|
-
function heapSnapshotAuthorised(env = process.env) {
|
|
597
|
-
return env[RUNNER_HEAP_SNAPSHOT_ENV] === "on";
|
|
598
|
-
}
|
|
599
579
|
var defaultDeps = {
|
|
600
580
|
readMemory: () => process.memoryUsage(),
|
|
601
581
|
readSpaces: readHeapSpaces,
|
|
602
|
-
writeSnapshot: (path) => {
|
|
603
|
-
v8.writeHeapSnapshot(path);
|
|
604
|
-
},
|
|
605
582
|
env: process.env
|
|
606
583
|
};
|
|
607
584
|
/**
|
|
608
585
|
* The SIGUSR2 report — memory + the FULL per-space breakdown, always; the
|
|
609
|
-
* snapshot
|
|
586
|
+
* snapshot NEVER — see the note in the body.
|
|
610
587
|
*
|
|
611
588
|
* The breakdown here keeps every non-empty space at 0.1 MB, unlike the
|
|
612
589
|
* heartbeat's filtered whole-MB pair: this is a hand-fired diagnostic read once
|
|
@@ -625,16 +602,6 @@ function emitHeapDiagnosticReport(request, deps = defaultDeps) {
|
|
|
625
602
|
} catch (error) {
|
|
626
603
|
request.sink.warn(`[mem] node="${request.label}" space report failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
627
604
|
}
|
|
628
|
-
if (!heapSnapshotAuthorised(deps.env)) {
|
|
629
|
-
request.sink.info(`[mem] node="${request.label}" heap snapshot NOT taken — it is an admin mutation (a multi-GB write and a stop-the-world walk of the heap). The per-space breakdown above is the free half and needs no authorisation. Set ${RUNNER_HEAP_SNAPSHOT_ENV}=on for this runner and signal again to take one.`);
|
|
630
|
-
return;
|
|
631
|
-
}
|
|
632
|
-
try {
|
|
633
|
-
deps.writeSnapshot(request.snapshotPath);
|
|
634
|
-
request.sink.info(`[mem] node="${request.label}" heap snapshot written -> ${request.snapshotPath}`);
|
|
635
|
-
} catch (error) {
|
|
636
|
-
request.sink.warn(`[mem] node="${request.label}" snapshot failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
637
|
-
}
|
|
638
605
|
}
|
|
639
606
|
//#endregion
|
|
640
607
|
//#region src/kernel/heap-watch.ts
|
|
@@ -9968,4 +9935,4 @@ async function defaultRun(command, args) {
|
|
|
9968
9935
|
await execFileAsync(command, [...args], { timeout: INSTALL_TIMEOUT_MS });
|
|
9969
9936
|
}
|
|
9970
9937
|
//#endregion
|
|
9971
|
-
export { buildUdsNativeCapProxy as $,
|
|
9938
|
+
export { buildUdsNativeCapProxy as $, formatHeapSpaces as $t, createUdsLoggerWithControl as A, HUB_MAIN_RSS_BUDGET_MB as At, readMoleculerFanoutMode as B, createV8Reclaimer as Bt, ipcParentLink as C, createAddonDataPlaneFacility as Ct, createUdsEventBus as D, HEAP_WATCH_INTERVAL_MS as Dt, createUdsEventBridge as E, HEAP_RECLAIM_TRIGGER_MB as Et, AGENT_CAP_FWD_SERVICE as F, RUNNER_RSS_BUDGET_ENV as Ft, createLocalTransport as G, reclaimIntervalMs as Gt, PARENT_ROUTED_PROVIDER_ADDON_ID as H, hubMainRssBudget as Ht, CapRouteResolver as I, ZERO_LOOP_DELAY as It, SocketChannel as J, startRunnerHeapWatch as Jt, UdsLocalTransportClient as K, shouldReclaim as Kt, CapRouteError as L, buildHeapSample as Lt, LocalChildRegistry as M, RSS_BUDGET_REANNOUNCE_MIN_MS as Mt, UDS_NO_ROUTE_PREFIX as N, RSS_BUDGET_RELEASE_RATIO as Nt, udsChildLogToWorkerEntry as O, HEAP_WATCH_WARN_RATIO as Ot, AGENT_CAP_FWD_ACTION as P, RUNNER_HEAP_WATCH_INTERVAL_MS as Pt, buildNativeCapProxy as Q, emitHeapDiagnosticReport as Qt, classifyCapRoute as R, createDeferredHeapWatchSink as Rt, buildLinkChain as S, runNpm as St, createParentUnownedCallHandler as T, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS as Tt, __resetCapUsageRegistryForTests as U, nextRssBudgetState as Ut, CapUsageRegistry as V, describeRss as Vt, getCapUsageRegistry as W, parseRssBudgetMb as Wt, FrameDecoder as X, DECISIVE_HEAP_SPACES as Xt, localEndpointPath as Y, strandedMb as Yt, encodeFrame as Z, HEAP_SPACE_REPORT_MIN_MB as Zt, AddonDepsManager as _, createEventPlaneReader as _n, CapabilityUnavailableError as _t, createUdsAddonContext as a, createSocketPlaneMeter as an, createAddonService as at, brokerCallForCap as b, resolveAddonClass as bt, getOrInitReadinessRegistryForClient as c, formatSocketPlane as cn, capActionName as ct, clusterEventTopic as d, recordSocketFrame as dn, capServiceName as dt, heapSpaceField as en, createBrokerDeviceManagerApi as et, getBrokerEventBus as f, sampleSocketDirection as fn, parseCapAction as ft, subscribePassthrough as g, createEventPlaneMeter as gn, CapabilityHandle as gt, setNodeEventInterest as h, EVENT_PLANE_TOP_N as hn, DeviceRegistry as ht, createAddonContext as i, SOCKET_PLANE_TOP_N as in, setWorkerNativeCapsChangeListener as it, LocalChildClient as j, HUB_RSS_BUDGET_ENV as jt, createUdsLogger as k, HUB_MAIN_HEAP_WATCH_LABEL as kt, setHubConnected as l, EMPTY_SOCKET_DIRECTION as ln, capActionSuffix as lt, registerEventBusService as m, socketDirectionMessages as mn, serializeTypedArrays as mt, installManifestPythonDeps as n, selectReportedSpaces as nn, getWorkerNativeCapSnapshot as nt, getWorkerDeviceRegistry as o, createSocketPlaneReader as on, validateProviderRegistrations as ot, getMoleculerEventStats as p, socketDirectionBytes as pn, deserializeTypedArrays as pt, UdsLocalTransportServer as q, startHeapWatch as qt, adaptBrokerToCluster as r, EMPTY_SOCKET_PLANE_BASELINE as rn, mountNativeCapService as rt, getOrInitReadinessRegistry as s, diffSocketPlane as sn, NATIVE_PROVIDER_SERVICE_INFIX as st, installManifestSystemDeps as t, readHeapSpaces as tn, getWorkerNativeCapProvider as tt, EVENT_TOPIC_PREFIX as u, createSocketDirectionCounters as un, capBareAction as ut, createKernelHwAccel as v, diffEventPlane as vn, copyBundledNativeModules as vt, localProviderLink as w, HEAP_RECLAIM_MIN_INTERVAL_MS as wt, brokerTransportLink as x, resolveNpmInvocation as xt, resolveHwAccel as y, formatEventPlane as yn, installManifestNativeDeps as yt, callWithServiceDiscovery as z, createLoopDelayMeter as zt };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
require("./dist-
|
|
2
|
+
require("./dist-DkVaJ5vG.js");
|
|
3
3
|
require("./hub-cap-forward-DmHNjbB0.js");
|
|
4
4
|
let node_crypto = require("node:crypto");
|
|
5
5
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
@@ -579,37 +579,14 @@ function formatHeapSpaces(spaces, minMb = 32) {
|
|
|
579
579
|
if (selected.length === 0) return "";
|
|
580
580
|
return ` ${selected.map((s) => `${heapSpaceField(s.name)}=${mb(s.usedBytes)}MB`).join(" ")}`;
|
|
581
581
|
}
|
|
582
|
-
/**
|
|
583
|
-
* Env var that authorises a heap snapshot on SIGUSR2.
|
|
584
|
-
*
|
|
585
|
-
* A snapshot is an admin mutation on a production hub: `writeHeapSnapshot`
|
|
586
|
-
* streams a file the size of the heap to `/tmp` and stops the world while it
|
|
587
|
-
* walks it — on the recorder that is a multi-GB file and a stall measured in
|
|
588
|
-
* seconds. The per-space breakdown is ~1.2 µs and changes nothing. Welding them
|
|
589
|
-
* to one signal priced the free answer at the cost of the expensive one.
|
|
590
|
-
*/
|
|
591
|
-
var RUNNER_HEAP_SNAPSHOT_ENV = "CAMSTACK_RUNNER_HEAP_SNAPSHOT";
|
|
592
|
-
/**
|
|
593
|
-
* Whether the operator has authorised the snapshot half of SIGUSR2.
|
|
594
|
-
*
|
|
595
|
-
* Explicit `'on'` only. Anything else — unset, empty, `'true'`, `'1'` — is NOT
|
|
596
|
-
* authorisation: a multi-GB stop-the-world write must never be reachable by a
|
|
597
|
-
* value someone set for a different purpose.
|
|
598
|
-
*/
|
|
599
|
-
function heapSnapshotAuthorised(env = process.env) {
|
|
600
|
-
return env[RUNNER_HEAP_SNAPSHOT_ENV] === "on";
|
|
601
|
-
}
|
|
602
582
|
var defaultDeps = {
|
|
603
583
|
readMemory: () => process.memoryUsage(),
|
|
604
584
|
readSpaces: readHeapSpaces,
|
|
605
|
-
writeSnapshot: (path) => {
|
|
606
|
-
node_v8.writeHeapSnapshot(path);
|
|
607
|
-
},
|
|
608
585
|
env: process.env
|
|
609
586
|
};
|
|
610
587
|
/**
|
|
611
588
|
* The SIGUSR2 report — memory + the FULL per-space breakdown, always; the
|
|
612
|
-
* snapshot
|
|
589
|
+
* snapshot NEVER — see the note in the body.
|
|
613
590
|
*
|
|
614
591
|
* The breakdown here keeps every non-empty space at 0.1 MB, unlike the
|
|
615
592
|
* heartbeat's filtered whole-MB pair: this is a hand-fired diagnostic read once
|
|
@@ -628,16 +605,6 @@ function emitHeapDiagnosticReport(request, deps = defaultDeps) {
|
|
|
628
605
|
} catch (error) {
|
|
629
606
|
request.sink.warn(`[mem] node="${request.label}" space report failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
630
607
|
}
|
|
631
|
-
if (!heapSnapshotAuthorised(deps.env)) {
|
|
632
|
-
request.sink.info(`[mem] node="${request.label}" heap snapshot NOT taken — it is an admin mutation (a multi-GB write and a stop-the-world walk of the heap). The per-space breakdown above is the free half and needs no authorisation. Set ${RUNNER_HEAP_SNAPSHOT_ENV}=on for this runner and signal again to take one.`);
|
|
633
|
-
return;
|
|
634
|
-
}
|
|
635
|
-
try {
|
|
636
|
-
deps.writeSnapshot(request.snapshotPath);
|
|
637
|
-
request.sink.info(`[mem] node="${request.label}" heap snapshot written -> ${request.snapshotPath}`);
|
|
638
|
-
} catch (error) {
|
|
639
|
-
request.sink.warn(`[mem] node="${request.label}" snapshot failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
640
|
-
}
|
|
641
608
|
}
|
|
642
609
|
//#endregion
|
|
643
610
|
//#region src/kernel/heap-watch.ts
|
|
@@ -10151,12 +10118,6 @@ Object.defineProperty(exports, "RSS_BUDGET_RELEASE_RATIO", {
|
|
|
10151
10118
|
return RSS_BUDGET_RELEASE_RATIO;
|
|
10152
10119
|
}
|
|
10153
10120
|
});
|
|
10154
|
-
Object.defineProperty(exports, "RUNNER_HEAP_SNAPSHOT_ENV", {
|
|
10155
|
-
enumerable: true,
|
|
10156
|
-
get: function() {
|
|
10157
|
-
return RUNNER_HEAP_SNAPSHOT_ENV;
|
|
10158
|
-
}
|
|
10159
|
-
});
|
|
10160
10121
|
Object.defineProperty(exports, "RUNNER_HEAP_WATCH_INTERVAL_MS", {
|
|
10161
10122
|
enumerable: true,
|
|
10162
10123
|
get: function() {
|
|
@@ -10523,12 +10484,6 @@ Object.defineProperty(exports, "getWorkerNativeCapSnapshot", {
|
|
|
10523
10484
|
return getWorkerNativeCapSnapshot;
|
|
10524
10485
|
}
|
|
10525
10486
|
});
|
|
10526
|
-
Object.defineProperty(exports, "heapSnapshotAuthorised", {
|
|
10527
|
-
enumerable: true,
|
|
10528
|
-
get: function() {
|
|
10529
|
-
return heapSnapshotAuthorised;
|
|
10530
|
-
}
|
|
10531
|
-
});
|
|
10532
10487
|
Object.defineProperty(exports, "heapSpaceField", {
|
|
10533
10488
|
enumerable: true,
|
|
10534
10489
|
get: function() {
|