@camstack/system 1.2.151 → 1.2.154
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 +14 -15
- package/dist/addon-runner.mjs +14 -14
- 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 +3 -3
- package/dist/builtins/local-network/local-network.addon.mjs +3 -3
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/cgroup-memory.d.ts +193 -0
- package/dist/builtins/native-metrics/container-memory-series.d.ts +226 -0
- package/dist/builtins/native-metrics/native-metrics.addon.d.ts +26 -0
- package/dist/builtins/native-metrics/native-metrics.addon.js +1536 -661
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1536 -660
- package/dist/builtins/platform-probe/index.js +3 -3
- package/dist/builtins/platform-probe/index.mjs +2 -2
- 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 +2 -2
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +2 -2
- 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-CImxMt5h.js → dist-BPlfW-CG.js} +96 -10
- package/dist/{dist-CbRciAbu.mjs → dist-D_NyUV6Y.mjs} +96 -10
- package/dist/index.d.ts +6 -2
- package/dist/index.js +24 -5
- package/dist/index.mjs +5 -5
- package/dist/kernel/event-plane-report.d.ts +202 -0
- package/dist/kernel/heap-spaces.d.ts +138 -0
- package/dist/kernel/heap-watch.d.ts +142 -5
- package/dist/kernel/index.d.ts +2 -0
- package/dist/kernel/transport/local-child-registry.d.ts +22 -0
- package/dist/{manifest-python-deps-DuQ3Uqoq.mjs → manifest-python-deps-BILJm2mI.mjs} +522 -15
- package/dist/{manifest-python-deps-BqWrDjSN.js → manifest-python-deps-COeSr7el.js} +636 -15
- package/dist/{retired-settings-keys-DhFPXIRD.mjs → retired-settings-keys-Bq1Tb84I.mjs} +1 -1
- package/dist/{retired-settings-keys-C7gLUS3x.js → retired-settings-keys-DBY6ebwV.js} +1 -1
- package/package.json +1 -1
- package/dist/{tls-u8QCJCFE.js → tls-BxQlomxd.js} +1 -1
- package/dist/{tls-CQhPGSJm.mjs → tls-DOTmtLCW.mjs} +1 -1
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-BPlfW-CG.js");
|
|
4
4
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
5
5
|
require("./builtins/alerts/index.js");
|
|
6
6
|
const require_formatter = require("./formatter-DqAKDlvN.js");
|
|
@@ -25,8 +25,8 @@ const require_builtins_system_config_system_config_addon = require("./builtins/s
|
|
|
25
25
|
require("./builtins/system-config/index.js");
|
|
26
26
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
27
27
|
const require_file_data_plane = require("./file-data-plane-DO8KbxCe.js");
|
|
28
|
-
const require_tls$1 = require("./tls-
|
|
29
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
28
|
+
const require_tls$1 = require("./tls-BxQlomxd.js");
|
|
29
|
+
const require_manifest_python_deps = require("./manifest-python-deps-COeSr7el.js");
|
|
30
30
|
const require_resource_monitor = require("./resource-monitor-CdnzxBLP.js");
|
|
31
31
|
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
32
32
|
let zod = require("zod");
|
|
@@ -38,11 +38,11 @@ node_path = require_chunk.__toESM(node_path, 1);
|
|
|
38
38
|
let node_child_process = require("node:child_process");
|
|
39
39
|
let node_util = require("node:util");
|
|
40
40
|
node_util = require_chunk.__toESM(node_util);
|
|
41
|
-
let node_os = require("node:os");
|
|
42
|
-
node_os = require_chunk.__toESM(node_os);
|
|
43
41
|
let node_fs = require("node:fs");
|
|
44
42
|
let node_fs$1 = require_chunk.__toESM(node_fs, 1);
|
|
45
43
|
node_fs = require_chunk.__toESM(node_fs);
|
|
44
|
+
let node_os = require("node:os");
|
|
45
|
+
node_os = require_chunk.__toESM(node_os);
|
|
46
46
|
let node_http = require("node:http");
|
|
47
47
|
let node_vm = require("node:vm");
|
|
48
48
|
node_vm = require_chunk.__toESM(node_vm);
|
|
@@ -95322,6 +95322,7 @@ exports.ConsoleDestination = require_builtins_console_logging_index.ConsoleDesti
|
|
|
95322
95322
|
exports.ConsoleLoggingAddon = require_builtins_console_logging_index.ConsoleLoggingAddon$1;
|
|
95323
95323
|
exports.CoreBlocksAddon = require_builtins_core_blocks_core_blocks_addon.CoreBlocksAddon;
|
|
95324
95324
|
exports.CustomActionRegistry = require_custom_action_registry.CustomActionRegistry;
|
|
95325
|
+
exports.DECISIVE_HEAP_SPACES = require_manifest_python_deps.DECISIVE_HEAP_SPACES;
|
|
95325
95326
|
exports.DEFAULT_DATA_PATH = DEFAULT_DATA_PATH;
|
|
95326
95327
|
exports.DEFAULT_LAN_HTTP_PORT = require_tls$1.DEFAULT_LAN_HTTP_PORT;
|
|
95327
95328
|
exports.DEFAULT_LOG_LEVEL = DEFAULT_LOG_LEVEL;
|
|
@@ -95331,6 +95332,7 @@ exports.DataPlaneRegistry = DataPlaneRegistry;
|
|
|
95331
95332
|
exports.DeviceManagerAddon = require_builtins_device_manager_device_manager_addon.DeviceManagerAddon;
|
|
95332
95333
|
exports.DeviceRegistry = require_manifest_python_deps.DeviceRegistry;
|
|
95333
95334
|
exports.DeviceStore = require_builtins_sqlite_storage_index.DeviceStore$1;
|
|
95335
|
+
exports.EVENT_PLANE_TOP_N = require_manifest_python_deps.EVENT_PLANE_TOP_N;
|
|
95334
95336
|
exports.EVENT_TOPIC_PREFIX = require_manifest_python_deps.EVENT_TOPIC_PREFIX;
|
|
95335
95337
|
exports.EngineManagerResolver = EngineManagerResolver;
|
|
95336
95338
|
exports.EventBus = EventBus;
|
|
@@ -95343,7 +95345,9 @@ exports.HEALTH_MONITOR_GRACE_PERIOD_MS = HEALTH_MONITOR_GRACE_PERIOD_MS;
|
|
|
95343
95345
|
exports.HEALTH_MONITOR_RETRY_INTERVALS_MS = HEALTH_MONITOR_RETRY_INTERVALS_MS;
|
|
95344
95346
|
exports.HEALTH_MONITOR_TICK_MS = HEALTH_MONITOR_TICK_MS;
|
|
95345
95347
|
exports.HEAP_RECLAIM_MIN_INTERVAL_MS = require_manifest_python_deps.HEAP_RECLAIM_MIN_INTERVAL_MS;
|
|
95348
|
+
exports.HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS = require_manifest_python_deps.HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS;
|
|
95346
95349
|
exports.HEAP_RECLAIM_TRIGGER_MB = require_manifest_python_deps.HEAP_RECLAIM_TRIGGER_MB;
|
|
95350
|
+
exports.HEAP_SPACE_REPORT_MIN_MB = require_manifest_python_deps.HEAP_SPACE_REPORT_MIN_MB;
|
|
95347
95351
|
exports.HEAP_WATCH_INTERVAL_MS = require_manifest_python_deps.HEAP_WATCH_INTERVAL_MS;
|
|
95348
95352
|
exports.HEAP_WATCH_WARN_RATIO = require_manifest_python_deps.HEAP_WATCH_WARN_RATIO;
|
|
95349
95353
|
exports.HUB_CAP_FWD_ACTION = require_manifest_python_deps.HUB_CAP_FWD_ACTION;
|
|
@@ -95392,6 +95396,7 @@ exports.QUARANTINE_DIRNAME = QUARANTINE_DIRNAME;
|
|
|
95392
95396
|
exports.RESTART_MARKER_FILE = RESTART_MARKER_FILE;
|
|
95393
95397
|
exports.RSS_BUDGET_REANNOUNCE_MIN_MS = require_manifest_python_deps.RSS_BUDGET_REANNOUNCE_MIN_MS;
|
|
95394
95398
|
exports.RSS_BUDGET_RELEASE_RATIO = require_manifest_python_deps.RSS_BUDGET_RELEASE_RATIO;
|
|
95399
|
+
exports.RUNNER_HEAP_SNAPSHOT_ENV = require_manifest_python_deps.RUNNER_HEAP_SNAPSHOT_ENV;
|
|
95395
95400
|
exports.RUNNER_HEAP_WATCH_INTERVAL_MS = require_manifest_python_deps.RUNNER_HEAP_WATCH_INTERVAL_MS;
|
|
95396
95401
|
exports.RUNNER_RSS_BUDGET_ENV = require_manifest_python_deps.RUNNER_RSS_BUDGET_ENV;
|
|
95397
95402
|
exports.RUNTIME_DEFAULTS = require_dist.RUNTIME_DEFAULTS;
|
|
@@ -95420,6 +95425,7 @@ exports.UdsLocalTransportServer = require_manifest_python_deps.UdsLocalTransport
|
|
|
95420
95425
|
exports.UserManager = require_builtins_local_auth_local_auth_addon.UserManager;
|
|
95421
95426
|
exports.WinstonDestination = require_builtins_winston_logging_index.WinstonDestination$1;
|
|
95422
95427
|
exports.WinstonLoggingAddon = require_builtins_winston_logging_index.WinstonLoggingAddon$1;
|
|
95428
|
+
exports.ZERO_LOOP_DELAY = require_manifest_python_deps.ZERO_LOOP_DELAY;
|
|
95423
95429
|
exports.__resetCapUsageRegistryForTests = require_manifest_python_deps.__resetCapUsageRegistryForTests;
|
|
95424
95430
|
exports.__resetLoggingGateForTests = __resetLoggingGateForTests;
|
|
95425
95431
|
exports.adaptBrokerToCluster = require_manifest_python_deps.adaptBrokerToCluster;
|
|
@@ -95471,11 +95477,14 @@ exports.createBrokerDeviceManagerApi = require_manifest_python_deps.createBroker
|
|
|
95471
95477
|
exports.createCoreCapService = createCoreCapService;
|
|
95472
95478
|
exports.createDeferredHeapWatchSink = require_manifest_python_deps.createDeferredHeapWatchSink;
|
|
95473
95479
|
exports.createDoorSettingsView = createDoorSettingsView;
|
|
95480
|
+
exports.createEventPlaneMeter = require_manifest_python_deps.createEventPlaneMeter;
|
|
95481
|
+
exports.createEventPlaneReader = require_manifest_python_deps.createEventPlaneReader;
|
|
95474
95482
|
exports.createFileDataPlaneHandler = require_file_data_plane.createFileDataPlaneHandler;
|
|
95475
95483
|
exports.createHubCapForwardService = require_manifest_python_deps.createHubCapForwardService;
|
|
95476
95484
|
exports.createHubService = createHubService;
|
|
95477
95485
|
exports.createKernelHwAccel = require_manifest_python_deps.createKernelHwAccel;
|
|
95478
95486
|
exports.createLocalTransport = require_manifest_python_deps.createLocalTransport;
|
|
95487
|
+
exports.createLoopDelayMeter = require_manifest_python_deps.createLoopDelayMeter;
|
|
95479
95488
|
exports.createParentUnownedCallHandler = require_manifest_python_deps.createParentUnownedCallHandler;
|
|
95480
95489
|
exports.createProcessService = createProcessService;
|
|
95481
95490
|
exports.createReadinessService = createReadinessService;
|
|
@@ -95493,6 +95502,7 @@ exports.deriveAgentListenPort = deriveAgentListenPort;
|
|
|
95493
95502
|
exports.describeProviderKindDrift = describeProviderKindDrift;
|
|
95494
95503
|
exports.describeRss = require_manifest_python_deps.describeRss;
|
|
95495
95504
|
exports.detectWorkspacePackagesDir = detectWorkspacePackagesDir;
|
|
95505
|
+
exports.diffEventPlane = require_manifest_python_deps.diffEventPlane;
|
|
95496
95506
|
Object.defineProperty(exports, "downloadBinary", {
|
|
95497
95507
|
enumerable: true,
|
|
95498
95508
|
get: function() {
|
|
@@ -95502,6 +95512,7 @@ Object.defineProperty(exports, "downloadBinary", {
|
|
|
95502
95512
|
exports.downloadFile = require_file_data_plane.downloadFile;
|
|
95503
95513
|
exports.downloadModel = require_file_data_plane.downloadModel;
|
|
95504
95514
|
exports.emitDownForOwnedCaps = require_dist.emitDownForOwnedCaps;
|
|
95515
|
+
exports.emitHeapDiagnosticReport = require_manifest_python_deps.emitHeapDiagnosticReport;
|
|
95505
95516
|
exports.encodeFrame = require_manifest_python_deps.encodeFrame;
|
|
95506
95517
|
exports.ensureAddonNativePrebuilds = ensureAddonNativePrebuilds;
|
|
95507
95518
|
Object.defineProperty(exports, "ensureBinary", {
|
|
@@ -95536,6 +95547,8 @@ Object.defineProperty(exports, "findInPath", {
|
|
|
95536
95547
|
return _camstack_types_node.findInPath;
|
|
95537
95548
|
}
|
|
95538
95549
|
});
|
|
95550
|
+
exports.formatEventPlane = require_manifest_python_deps.formatEventPlane;
|
|
95551
|
+
exports.formatHeapSpaces = require_manifest_python_deps.formatHeapSpaces;
|
|
95539
95552
|
exports.formatLogLine = require_formatter.formatLogLine;
|
|
95540
95553
|
exports.getBrokerEventBus = require_manifest_python_deps.getBrokerEventBus;
|
|
95541
95554
|
exports.getCapUsageRegistry = require_manifest_python_deps.getCapUsageRegistry;
|
|
@@ -95568,6 +95581,8 @@ exports.getSinglePidStats = require_resource_monitor.getSinglePidStats;
|
|
|
95568
95581
|
exports.getWorkerDeviceRegistry = require_manifest_python_deps.getWorkerDeviceRegistry;
|
|
95569
95582
|
exports.hasDotNode = hasDotNode;
|
|
95570
95583
|
exports.hashClusterSecret = hashClusterSecret;
|
|
95584
|
+
exports.heapSnapshotAuthorised = require_manifest_python_deps.heapSnapshotAuthorised;
|
|
95585
|
+
exports.heapSpaceField = require_manifest_python_deps.heapSpaceField;
|
|
95571
95586
|
exports.hubMainRssBudget = require_manifest_python_deps.hubMainRssBudget;
|
|
95572
95587
|
exports.installManifestNativeDeps = require_manifest_python_deps.installManifestNativeDeps;
|
|
95573
95588
|
exports.installManifestPythonDeps = require_manifest_python_deps.installManifestPythonDeps;
|
|
@@ -95606,11 +95621,14 @@ exports.partitionIsolatedBuiltinIds = partitionIsolatedBuiltinIds;
|
|
|
95606
95621
|
exports.proxyToUpstream = proxyToUpstream;
|
|
95607
95622
|
exports.quarantineAddonResidue = quarantineAddonResidue;
|
|
95608
95623
|
exports.readExtraSans = require_tls$1.readExtraSans;
|
|
95624
|
+
exports.readHeapSpaces = require_manifest_python_deps.readHeapSpaces;
|
|
95609
95625
|
exports.readLanHttpState = require_tls$1.readLanHttpState;
|
|
95626
|
+
exports.readMoleculerFanoutMode = require_manifest_python_deps.readMoleculerFanoutMode;
|
|
95610
95627
|
exports.readPendingRestart = readPendingRestart;
|
|
95611
95628
|
exports.readTlsAccessStatus = require_tls$1.readTlsAccessStatus;
|
|
95612
95629
|
exports.readTlsMode = require_tls$1.readTlsMode;
|
|
95613
95630
|
exports.readinessKey = require_dist.readinessKey;
|
|
95631
|
+
exports.reclaimIntervalMs = require_manifest_python_deps.reclaimIntervalMs;
|
|
95614
95632
|
exports.registerEventBusService = require_manifest_python_deps.registerEventBusService;
|
|
95615
95633
|
exports.registerLanHttpHandler = require_tls$1.registerLanHttpHandler;
|
|
95616
95634
|
exports.reissueTlsLeaf = require_tls$1.reissueTlsLeaf;
|
|
@@ -95624,6 +95642,7 @@ exports.scopeKey = require_dist.scopeKey;
|
|
|
95624
95642
|
exports.scopesAllowAddon = require_dist.scopesAllowAddon;
|
|
95625
95643
|
exports.scopesAllowDeviceCap = require_dist.scopesAllowDeviceCap;
|
|
95626
95644
|
exports.selectAddonResidue = selectAddonResidue;
|
|
95645
|
+
exports.selectReportedSpaces = require_manifest_python_deps.selectReportedSpaces;
|
|
95627
95646
|
exports.serializeTypedArrays = require_manifest_python_deps.serializeTypedArrays;
|
|
95628
95647
|
exports.setHubConnected = require_manifest_python_deps.setHubConnected;
|
|
95629
95648
|
exports.setNodeEventInterest = require_manifest_python_deps.setNodeEventInterest;
|
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 isVoidInput, $t as scopeKey, At as DATAPLANE_SECRET_HEADER$1, Bt as asNumber, C as addonSettingsCapability, G as extractNestedAddonId, Gt as expandCapMethods, Ht as createEvent, It as ReadinessRegistry, J as isArrayOutputSchema, Lt as ReadinessTimeoutError, Mt as DEVICE_STATUS_METHOD, Ot as errMsg$1, Qt as resolveCapMount, Ut as emitDownForOwnedCaps, Vt as asString$1, X as isObjectInput, Xt as parseJsonUnknown$1, Y as isCollectionArrayMethod, Yt as parseJsonObject, Zt as readinessKey, _t as scopesAllowDeviceCap, at as looseSchema, ct as objectInputDeclaresAddonId, dt as procedureAuthKey, et as kebabToCamel, f as LOG_LEVEL_RANK, gt as scopesAllowAddon, it as logLevelAtMost, jt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, m as RUNTIME_DEFAULTS, mt as resolveMethodAuth, p as METHOD_ACCESS_MAP, t as ALL_CAPABILITY_DEFINITIONS, tn as EventCategory$1, tt as lifecycleJobSchema, zt as asJsonObject$1 } from "./dist-
|
|
2
|
+
import { $ as isVoidInput, $t as scopeKey, At as DATAPLANE_SECRET_HEADER$1, Bt as asNumber, C as addonSettingsCapability, G as extractNestedAddonId, Gt as expandCapMethods, Ht as createEvent, It as ReadinessRegistry, J as isArrayOutputSchema, Lt as ReadinessTimeoutError, Mt as DEVICE_STATUS_METHOD, Ot as errMsg$1, Qt as resolveCapMount, Ut as emitDownForOwnedCaps, Vt as asString$1, X as isObjectInput, Xt as parseJsonUnknown$1, Y as isCollectionArrayMethod, Yt as parseJsonObject, Zt as readinessKey, _t as scopesAllowDeviceCap, at as looseSchema, ct as objectInputDeclaresAddonId, dt as procedureAuthKey, et as kebabToCamel, f as LOG_LEVEL_RANK, gt as scopesAllowAddon, it as logLevelAtMost, jt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, m as RUNTIME_DEFAULTS, mt as resolveMethodAuth, p as METHOD_ACCESS_MAP, t as ALL_CAPABILITY_DEFINITIONS, tn as EventCategory$1, tt as lifecycleJobSchema, zt as asJsonObject$1 } from "./dist-D_NyUV6Y.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";
|
|
@@ -24,8 +24,8 @@ import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.
|
|
|
24
24
|
import "./builtins/system-config/index.mjs";
|
|
25
25
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
26
26
|
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";
|
|
27
|
-
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-
|
|
28
|
-
import { $ as
|
|
27
|
+
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";
|
|
28
|
+
import { $ as buildNativeCapProxy, $t as RUNNER_HEAP_SNAPSHOT_ENV, A as createParentUnownedCallHandler, At as HUB_MAIN_HEAP_WATCH_LABEL, B as AGENT_CAP_FWD_SERVICE, Bt as createLoopDelayMeter, C as brokerTransportLink, Ct as runNpm, D as HUB_CAP_FWD_ACTION, Dt as HEAP_RECLAIM_TRIGGER_MB, E as localProviderLink, Et as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, F as createUdsLoggerWithControl, Ft as RUNNER_HEAP_WATCH_INTERVAL_MS, G as readMoleculerFanoutMode, Gt as parseRssBudgetMb, H as CapRouteError, Ht as describeRss, I as LocalChildClient, It as RUNNER_RSS_BUDGET_ENV, J as UdsLocalTransportServer, Jt as startHeapWatch, K as createLocalTransport, Kt as reclaimIntervalMs, L as LocalChildRegistry, Lt as ZERO_LOOP_DELAY, M as createUdsEventBus, Mt as HUB_RSS_BUDGET_ENV, N as udsChildLogToWorkerEntry, Nt as RSS_BUDGET_REANNOUNCE_MIN_MS, O as HUB_CAP_FWD_SERVICE, Ot as HEAP_WATCH_INTERVAL_MS, P as createUdsLogger, Pt as RSS_BUDGET_RELEASE_RATIO, Q as encodeFrame, Qt as HEAP_SPACE_REPORT_MIN_MB, R as UDS_NO_ROUTE_PREFIX, Rt as buildHeapSample, S as brokerCallForCap, St as resolveNpmInvocation, T as ipcParentLink, Tt as HEAP_RECLAIM_MIN_INTERVAL_MS, U as classifyCapRoute, Ut as hubMainRssBudget, V as CapRouteResolver, Vt as createV8Reclaimer, W as callWithServiceDiscovery, Wt as nextRssBudgetState, X as localEndpointPath, Xt as strandedMb, Y as SocketChannel, Yt as startRunnerHeapWatch, Z as FrameDecoder, Zt as DECISIVE_HEAP_SPACES, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, an as selectReportedSpaces, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, cn as createEventPlaneReader, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, en as emitHeapDiagnosticReport, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, in as readHeapSpaces, it as mountNativeCapService, j as createUdsEventBridge, jt as HUB_MAIN_RSS_BUDGET_MB, k as createHubCapForwardService, kt as HEAP_WATCH_WARN_RATIO, l as EVENT_TOPIC_PREFIX, ln as diffEventPlane, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, nn as heapSnapshotAuthorised, o as getOrInitReadinessRegistry, on as EVENT_PLANE_TOP_N, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, qt as shouldReclaim, r as createAddonContext, rn as heapSpaceField, s as getOrInitReadinessRegistryForClient, sn as createEventPlaneMeter, st as validateProviderRegistrations, t as installManifestPythonDeps, tn as formatHeapSpaces, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, un as formatEventPlane, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveAddonClass, y as CapUsageRegistry, yt as copyBundledNativeModules, z as AGENT_CAP_FWD_ACTION, zt as createDeferredHeapWatchSink } from "./manifest-python-deps-BILJm2mI.mjs";
|
|
29
29
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
|
|
30
30
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
31
31
|
import { z } from "zod";
|
|
@@ -37,9 +37,9 @@ import { dirname, isAbsolute, join, posix, resolve, win32 } from "node:path";
|
|
|
37
37
|
import { execFile, spawn } from "node:child_process";
|
|
38
38
|
import * as util$10 from "node:util";
|
|
39
39
|
import { promisify } from "node:util";
|
|
40
|
-
import * as os$18 from "node:os";
|
|
41
40
|
import * as fs$17 from "node:fs";
|
|
42
41
|
import { accessSync, constants, existsSync } from "node:fs";
|
|
42
|
+
import * as os$18 from "node:os";
|
|
43
43
|
import { request } from "node:http";
|
|
44
44
|
import * as vm from "node:vm";
|
|
45
45
|
import { asJsonObject, errMsg, parseJsonUnknown } from "@camstack/types/addon";
|
|
@@ -95283,4 +95283,4 @@ var LifecycleJobEngine = class {
|
|
|
95283
95283
|
}
|
|
95284
95284
|
};
|
|
95285
95285
|
//#endregion
|
|
95286
|
-
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, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, 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_TRIGGER_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, 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, 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, __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, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createKernelHwAccel, createLocalTransport, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, 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, readLanHttpState, readPendingRestart, readTlsAccessStatus, readTlsMode, readinessKey, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
|
|
95286
|
+
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, 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, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_SNAPSHOT_ENV, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, 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, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, diffEventPlane, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, emitHeapDiagnosticReport, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatEventPlane, formatHeapSpaces, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, heapSnapshotAuthorised, heapSpaceField, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, 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, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* event-plane-report — the fan-out counters this cluster has always kept and
|
|
3
|
+
* never read, on the line it already emits.
|
|
4
|
+
*
|
|
5
|
+
* ## Why this exists
|
|
6
|
+
*
|
|
7
|
+
* hub-main's memory is a RATE, not a set. Measured 2026-08-29 over the first 25
|
|
8
|
+
* minutes of telemetry this process has ever produced: every forced compaction
|
|
9
|
+
* drops `arrayBuffers` to **12–29 MB** — ten passes out of ten — so a reading of
|
|
10
|
+
* 726 MB is 707 MB of dead Buffers not yet swept, not a retained set. The real
|
|
11
|
+
* quantity is the slope: **181–330 MB/min steady, with one burst of ≥1.3 GB in
|
|
12
|
+
* ≤11 s**.
|
|
13
|
+
*
|
|
14
|
+
* And it is sockets, not media. `/proc/<pid>/io` over the same windows: ~21 800
|
|
15
|
+
* reads/s and ~22 500 writes/s at a **0.33 KB mean**, with regular-file reads at
|
|
16
|
+
* 0.73 MB/min. A 64 KB proxy chunk or a 200 KB JPEG cannot hide inside a 0.33 KB
|
|
17
|
+
* mean, so the cost is per MESSAGE on a fan-out plane nobody has ever counted —
|
|
18
|
+
* an IDLE addon still reads 82 messages/s of it, across ~38 runners.
|
|
19
|
+
*
|
|
20
|
+
* The strongest single number available is that **78–82% of hub-main's outbound
|
|
21
|
+
* bytes correlate with `hub/pipeline-analytics`, in both windows** — but `rchar`
|
|
22
|
+
* on that runner also counts page-cache reads and it owns a vector store, so the
|
|
23
|
+
* correlation is not an attribution. `fanoutTop` turns it into one.
|
|
24
|
+
*
|
|
25
|
+
* ## And the burn-in that has been running forever
|
|
26
|
+
*
|
|
27
|
+
* `event-bus-core.ts:310` states the procedure in its own words: *"Recommended
|
|
28
|
+
* first fleet-wide enable: `shadow` on both, watch the suppressed counters
|
|
29
|
+
* (`getMoleculerEventStats` / `getChildEventStats`), then flip to `filter` once
|
|
30
|
+
* burn-in shows zero would-be-starved deliveries."*
|
|
31
|
+
*
|
|
32
|
+
* The hub runs with `CAMSTACK_MOLECULER_EVENT_FANOUT=shadow` — which computes
|
|
33
|
+
* the drop decision, counts the would-suppresses and **still delivers every
|
|
34
|
+
* event** — and **neither counter has ever had a production caller**: both
|
|
35
|
+
* functions are reachable only from barrel re-exports and unit tests. So the
|
|
36
|
+
* burn-in has no end condition, and the promotion to `filter` never happened
|
|
37
|
+
* because the evidence that would authorise it was never surfaced. This module
|
|
38
|
+
* surfaces it. It changes no default and flips no env: the promotion stays a
|
|
39
|
+
* one-env decision for the operator, and it now has a number behind it.
|
|
40
|
+
*
|
|
41
|
+
* Read the modes with the counts, always. A suppressed count of 0 means
|
|
42
|
+
* "nothing would have been dropped" under `shadow` and "nothing WAS dropped"
|
|
43
|
+
* under `filter`, and those are different claims. A count printed without its
|
|
44
|
+
* regime is unreadable, and the regime is read ONCE at construction — invisible
|
|
45
|
+
* at runtime until now.
|
|
46
|
+
*
|
|
47
|
+
* ## The fail-open nobody can see
|
|
48
|
+
*
|
|
49
|
+
* A child that never declares its pattern set (`eventPatterns === null`,
|
|
50
|
+
* `local-child-registry.ts:170`) makes the per-child gate fail OPEN, and per
|
|
51
|
+
* `setNodeEventInterest` ANY undeclared child makes the whole node's inbound
|
|
52
|
+
* cross-node gate fail open too. **One legacy runner silently disables the
|
|
53
|
+
* filtering on both planes**, and nothing reported it. `childrenUndeclared` is
|
|
54
|
+
* printed even at zero for the same reason `largeObjectSpace=0MB` is: absence
|
|
55
|
+
* must never be ambiguous.
|
|
56
|
+
*
|
|
57
|
+
* ## Deltas, never totals
|
|
58
|
+
*
|
|
59
|
+
* Both registries count cumulatively for the life of the process. A cumulative
|
|
60
|
+
* number on a heartbeat answers "how much since boot", which nobody asked; the
|
|
61
|
+
* question is "which peer receives the 22 500 writes/s", and that is a rate. So
|
|
62
|
+
* the meter is read ONCE PER LINE and reports the window since the previous read
|
|
63
|
+
* — the same discipline the loop-delay histogram already follows, for the same
|
|
64
|
+
* reason.
|
|
65
|
+
*
|
|
66
|
+
* ## What this is NOT evidence of
|
|
67
|
+
*
|
|
68
|
+
* `shadow` is the CROSS-NODE plane. The local UDS plane defaults to `filter` and
|
|
69
|
+
* its env is unset, so it is filtering. hub-main's ~44 000 socket syscalls/s are
|
|
70
|
+
* mostly to LOCAL runners, so the shadow mode is a real defect and is **not**
|
|
71
|
+
* established as the source of that load. Do not read these two facts as one.
|
|
72
|
+
*/
|
|
73
|
+
/** Fan-out regime for one plane. Same three values on both. */
|
|
74
|
+
export type EventFanoutMode = 'filter' | 'shadow' | 'broadcast';
|
|
75
|
+
/** One child's fan-out counters, as the registry keeps them (cumulative). */
|
|
76
|
+
export interface ChildFanoutSample {
|
|
77
|
+
readonly childId: string;
|
|
78
|
+
readonly sent: number;
|
|
79
|
+
readonly suppressed: number;
|
|
80
|
+
}
|
|
81
|
+
/** One child's fan-out over the window since the previous read. */
|
|
82
|
+
export interface ChildFanoutDelta {
|
|
83
|
+
readonly childId: string;
|
|
84
|
+
readonly sent: number;
|
|
85
|
+
readonly suppressed: number;
|
|
86
|
+
}
|
|
87
|
+
/** What `LocalChildRegistry` exposes, structurally — the kernel's heartbeat
|
|
88
|
+
* must not depend on the transport layer's class. */
|
|
89
|
+
export interface ChildFanoutRegistryChild {
|
|
90
|
+
readonly childId: string;
|
|
91
|
+
}
|
|
92
|
+
export interface ChildFanoutRegistryStats {
|
|
93
|
+
readonly sent: number;
|
|
94
|
+
readonly suppressed: number;
|
|
95
|
+
}
|
|
96
|
+
export interface ChildFanoutRegistry {
|
|
97
|
+
readonly listChildren: () => readonly ChildFanoutRegistryChild[];
|
|
98
|
+
readonly getChildEventStats: (childId: string) => ChildFanoutRegistryStats | null;
|
|
99
|
+
readonly undeclaredChildCount: () => number;
|
|
100
|
+
readonly eventFanoutMode: EventFanoutMode;
|
|
101
|
+
}
|
|
102
|
+
/** What `getMoleculerEventStats` returns, structurally. */
|
|
103
|
+
export interface CrossNodeEventStats {
|
|
104
|
+
readonly delivered: number;
|
|
105
|
+
readonly suppressed: number;
|
|
106
|
+
}
|
|
107
|
+
/** One cumulative reading of both planes. */
|
|
108
|
+
export interface EventPlaneCounters {
|
|
109
|
+
readonly udsMode: EventFanoutMode;
|
|
110
|
+
readonly crossNodeMode: EventFanoutMode;
|
|
111
|
+
readonly children: readonly ChildFanoutSample[];
|
|
112
|
+
readonly childrenConnected: number;
|
|
113
|
+
readonly childrenUndeclared: number;
|
|
114
|
+
readonly crossNodeDelivered: number;
|
|
115
|
+
readonly crossNodeSuppressed: number;
|
|
116
|
+
}
|
|
117
|
+
/** `undefined` = this process has no event plane to report (every forked
|
|
118
|
+
* runner, and hub-main before the registry exists). */
|
|
119
|
+
export type EventPlaneReader = () => EventPlaneCounters | undefined;
|
|
120
|
+
/** Where a reader gets each part. Every one is late-bound, because the
|
|
121
|
+
* heartbeat starts before any of them exist. */
|
|
122
|
+
export interface EventPlaneSources {
|
|
123
|
+
readonly registry: () => ChildFanoutRegistry | null;
|
|
124
|
+
readonly crossNodeStats: () => CrossNodeEventStats | null;
|
|
125
|
+
readonly crossNodeMode: () => EventFanoutMode;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Build a reader over the two registries.
|
|
129
|
+
*
|
|
130
|
+
* Returns `undefined` until the child registry exists — the heartbeat starts as
|
|
131
|
+
* the FIRST statement of `bootstrap()` (a process that dies early still leaves
|
|
132
|
+
* samples) and `LocalChildRegistry` is built hundreds of lines later inside
|
|
133
|
+
* `MoleculerService.onModuleInit`. Printing zeros in that window would report a
|
|
134
|
+
* silent plane where there is no plane at all.
|
|
135
|
+
*
|
|
136
|
+
* Wrapped: a registry mid-teardown may throw, and a diagnostic that can crash
|
|
137
|
+
* the process it watches is worse than none.
|
|
138
|
+
*/
|
|
139
|
+
export declare function createEventPlaneReader(sources: EventPlaneSources): EventPlaneReader;
|
|
140
|
+
/**
|
|
141
|
+
* How many children get named on the line.
|
|
142
|
+
*
|
|
143
|
+
* Five, because the question is which peer DOMINATES and the measured
|
|
144
|
+
* distribution is not flat: one peer accounted for 78–82% of outbound bytes and
|
|
145
|
+
* the runner-up for ~6%. Five names the dominant peer, its challenger and enough
|
|
146
|
+
* of the tail to see the shape change; naming all ~38 would put a kilobyte-long
|
|
147
|
+
* line in the hub's shared log every minute, which is how a log stops being read.
|
|
148
|
+
*/
|
|
149
|
+
export declare const EVENT_PLANE_TOP_N = 5;
|
|
150
|
+
/** Both planes over one heartbeat window. */
|
|
151
|
+
export interface EventPlaneWindow {
|
|
152
|
+
readonly udsMode: EventFanoutMode;
|
|
153
|
+
readonly crossNodeMode: EventFanoutMode;
|
|
154
|
+
readonly childrenConnected: number;
|
|
155
|
+
readonly childrenUndeclared: number;
|
|
156
|
+
readonly fanoutSent: number;
|
|
157
|
+
readonly fanoutSuppressed: number;
|
|
158
|
+
readonly crossNodeDelivered: number;
|
|
159
|
+
readonly crossNodeSuppressed: number;
|
|
160
|
+
/** Largest `sent` first, at most {@link EVENT_PLANE_TOP_N} entries. */
|
|
161
|
+
readonly top: readonly ChildFanoutDelta[];
|
|
162
|
+
}
|
|
163
|
+
/** Previous cumulative reading, kept between lines. */
|
|
164
|
+
export interface EventPlaneBaseline {
|
|
165
|
+
readonly children: ReadonlyMap<string, ChildFanoutSample>;
|
|
166
|
+
readonly crossNodeDelivered: number;
|
|
167
|
+
readonly crossNodeSuppressed: number;
|
|
168
|
+
}
|
|
169
|
+
/** A process that has never read a plane. */
|
|
170
|
+
export declare const EMPTY_EVENT_PLANE_BASELINE: EventPlaneBaseline;
|
|
171
|
+
/**
|
|
172
|
+
* Subtract the previous cumulative reading from the current one.
|
|
173
|
+
*
|
|
174
|
+
* A child that RESTARTED has counters that went backwards — the registry keys by
|
|
175
|
+
* childId and a respawned runner reconnects under the same id with a fresh
|
|
176
|
+
* entry. Clamping at 0 reports the restart as a quiet window rather than as a
|
|
177
|
+
* negative rate: the window's traffic is genuinely unknown, and a negative
|
|
178
|
+
* number on a rate reads as a broken meter.
|
|
179
|
+
*/
|
|
180
|
+
export declare function diffEventPlane(baseline: EventPlaneBaseline, current: EventPlaneCounters, topN?: number): EventPlaneWindow;
|
|
181
|
+
/** Reads the delta since the PREVIOUS read. Same contract as the loop meter. */
|
|
182
|
+
export interface EventPlaneMeter {
|
|
183
|
+
readonly read: () => EventPlaneWindow | undefined;
|
|
184
|
+
}
|
|
185
|
+
export declare function createEventPlaneMeter(reader: EventPlaneReader, topN?: number): EventPlaneMeter;
|
|
186
|
+
/**
|
|
187
|
+
* The suffix appended to a `[mem]` line — leading space included, empty when
|
|
188
|
+
* this process has no event plane.
|
|
189
|
+
*
|
|
190
|
+
* Only two processes in the cluster have one (hub-main, and an agent's main), so
|
|
191
|
+
* these fields never appear on the ~38 runner lines that share the same log
|
|
192
|
+
* stream. On the two that do, every field is printed on every line INCLUDING at
|
|
193
|
+
* zero: the modes because a suppressed count without its regime is unreadable,
|
|
194
|
+
* `childrenUndeclared` because one undeclared child silently disables both
|
|
195
|
+
* gates, and the deltas because "the plane went quiet for a minute" is a
|
|
196
|
+
* reading, not a blank.
|
|
197
|
+
*
|
|
198
|
+
* `fanoutTop` is the one conditional field — a ranked list of nothing is noise —
|
|
199
|
+
* and it is a single comma-separated value so the field COUNT does not change
|
|
200
|
+
* from line to line: `childId:sent/suppressed`, largest first.
|
|
201
|
+
*/
|
|
202
|
+
export declare function formatEventPlane(window: EventPlaneWindow | undefined): string;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { HeapWatchSink } from './heap-watch.js';
|
|
2
|
+
/** One V8 space, as V8 names it, with the bytes it is holding. */
|
|
3
|
+
export interface HeapSpaceUsage {
|
|
4
|
+
/** V8's own `space_name`, e.g. `old_space`. Never renamed here. */
|
|
5
|
+
readonly name: string;
|
|
6
|
+
readonly usedBytes: number;
|
|
7
|
+
}
|
|
8
|
+
/** A reading of every space. Injectable so a test can pose a known heap state. */
|
|
9
|
+
export type HeapSpaceReader = () => readonly HeapSpaceUsage[];
|
|
10
|
+
/**
|
|
11
|
+
* The two spaces that ANSWER the question, printed always — including at zero.
|
|
12
|
+
*
|
|
13
|
+
* Node 24 reports thirteen spaces (measured on 24.17: `read_only_space`,
|
|
14
|
+
* `new_space`, `old_space`, `code_space`, `shared_space`, `trusted_space`,
|
|
15
|
+
* `shared_trusted_space`, `new_large_object_space`, `large_object_space`,
|
|
16
|
+
* `code_large_object_space`, `shared_large_object_space`,
|
|
17
|
+
* `shared_trusted_large_object_space`, `trusted_large_object_space`). Printing
|
|
18
|
+
* all thirteen once a minute per process would add ~13 fields to a line that
|
|
19
|
+
* already carries eleven, on every runner, forever — and eleven of the thirteen
|
|
20
|
+
* cannot be the answer to a 1.4 GB retained-set question.
|
|
21
|
+
*
|
|
22
|
+
* These two are printed unconditionally because **absence must never be
|
|
23
|
+
* ambiguous**. A threshold-only rule would drop `large_object_space` at 20 MB,
|
|
24
|
+
* and a reader would not be able to tell "small" from "this build does not
|
|
25
|
+
* report it" — which is the same class of mistake as a heartbeat with no
|
|
26
|
+
* destination (D285). `largeObjectSpace=0MB` is a load-bearing reading: it says
|
|
27
|
+
* the retainer is NOT a handful of huge objects.
|
|
28
|
+
*/
|
|
29
|
+
export declare const DECISIVE_HEAP_SPACES: readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* A non-decisive space is printed only once it holds at least this many MB.
|
|
32
|
+
*
|
|
33
|
+
* 32 MB, and the number comes from the smallest heap this line is ever asked to
|
|
34
|
+
* explain: the control in the 2026-08-29 pass is an idle `recorder` runner at
|
|
35
|
+
* **52 MB** of `heapUsed`. A threshold below that means no space that could
|
|
36
|
+
* dominate even the smallest watched process is ever hidden, while a quiet
|
|
37
|
+
* process — measured on a bare Node 24.17: `new_space` 0.7 MB, `code_space`
|
|
38
|
+
* 0.25 MB, `trusted_space` 0.9 MB — prints nothing but the decisive pair.
|
|
39
|
+
*
|
|
40
|
+
* What this drops, and why it is right to drop it: `new_space` is the scavenger's
|
|
41
|
+
* semi-space and is bounded by `--max-semi-space-size`, so it can never be a
|
|
42
|
+
* retained set; `code_space` and `read_only_space` are JIT output and V8's own
|
|
43
|
+
* immutable roots, both bounded by the code that exists rather than by the data
|
|
44
|
+
* it touches; the `shared_*` spaces are empty outside a worker-threads
|
|
45
|
+
* deployment, which this cluster does not run. None of them has ever been the
|
|
46
|
+
* answer to "what is this process holding", and each would cost a field on
|
|
47
|
+
* every `[mem]` line in the fleet.
|
|
48
|
+
*
|
|
49
|
+
* They are not censored, though — a space over the threshold prints, whatever it
|
|
50
|
+
* is. If `code_space` ever reaches 32 MB that is itself the finding.
|
|
51
|
+
*/
|
|
52
|
+
export declare const HEAP_SPACE_REPORT_MIN_MB = 32;
|
|
53
|
+
/**
|
|
54
|
+
* Read every space from V8.
|
|
55
|
+
*
|
|
56
|
+
* Wrapped: a diagnostic that can crash the process it watches is worse than
|
|
57
|
+
* none, and this is called from a heartbeat whose whole contract is that it
|
|
58
|
+
* survives whatever it is measuring. An empty reading prints no fields, which
|
|
59
|
+
* is exactly what a heartbeat that could not read the heap should say.
|
|
60
|
+
*/
|
|
61
|
+
export declare function readHeapSpaces(): readonly HeapSpaceUsage[];
|
|
62
|
+
/**
|
|
63
|
+
* `old_space` → `oldSpace`. Mechanical and total, so a space V8 adds tomorrow
|
|
64
|
+
* gets a field name without anyone editing a table.
|
|
65
|
+
*
|
|
66
|
+
* camelCase because that is the vocabulary of every other field on this line
|
|
67
|
+
* (`heapUsed`, `heapTotal`, `arrayBuffers`, `rssBudget`, `loopP99`). A line that
|
|
68
|
+
* mixed `heapUsed=` with `old_space=` would be two conventions for one record.
|
|
69
|
+
*/
|
|
70
|
+
export declare function heapSpaceField(v8Name: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* The spaces worth a field on this line: the decisive pair (in that order,
|
|
73
|
+
* always), then every other space at or above `minMb`, largest first.
|
|
74
|
+
*
|
|
75
|
+
* Largest-first for the tail because the tail only ever appears when something
|
|
76
|
+
* unexpected is holding memory, and the biggest surprise should be the first
|
|
77
|
+
* thing read. The decisive pair keeps a FIXED position so the two numbers a
|
|
78
|
+
* reader is comparing are always in the same place on every line.
|
|
79
|
+
*/
|
|
80
|
+
export declare function selectReportedSpaces(spaces: readonly HeapSpaceUsage[], minMb?: number): readonly HeapSpaceUsage[];
|
|
81
|
+
/**
|
|
82
|
+
* The suffix appended to a `[mem]` line — leading space included, empty when
|
|
83
|
+
* there is nothing to say.
|
|
84
|
+
*
|
|
85
|
+
* APPENDED, never interleaved: every existing field keeps its name AND its
|
|
86
|
+
* position, so a `hl loki-query` pipeline written against the old line still
|
|
87
|
+
* matches. Prefix stability is the only change to a log line that cannot break
|
|
88
|
+
* a query someone already wrote.
|
|
89
|
+
*/
|
|
90
|
+
export declare function formatHeapSpaces(spaces: readonly HeapSpaceUsage[], minMb?: number): string;
|
|
91
|
+
/**
|
|
92
|
+
* Env var that authorises a heap snapshot on SIGUSR2.
|
|
93
|
+
*
|
|
94
|
+
* A snapshot is an admin mutation on a production hub: `writeHeapSnapshot`
|
|
95
|
+
* streams a file the size of the heap to `/tmp` and stops the world while it
|
|
96
|
+
* walks it — on the recorder that is a multi-GB file and a stall measured in
|
|
97
|
+
* seconds. The per-space breakdown is ~1.2 µs and changes nothing. Welding them
|
|
98
|
+
* to one signal priced the free answer at the cost of the expensive one.
|
|
99
|
+
*/
|
|
100
|
+
export declare const RUNNER_HEAP_SNAPSHOT_ENV = "CAMSTACK_RUNNER_HEAP_SNAPSHOT";
|
|
101
|
+
/**
|
|
102
|
+
* Whether the operator has authorised the snapshot half of SIGUSR2.
|
|
103
|
+
*
|
|
104
|
+
* Explicit `'on'` only. Anything else — unset, empty, `'true'`, `'1'` — is NOT
|
|
105
|
+
* authorisation: a multi-GB stop-the-world write must never be reachable by a
|
|
106
|
+
* value someone set for a different purpose.
|
|
107
|
+
*/
|
|
108
|
+
export declare function heapSnapshotAuthorised(env?: NodeJS.ProcessEnv): boolean;
|
|
109
|
+
/** What a diagnostic report is ABOUT. */
|
|
110
|
+
export interface HeapDiagnosticRequest {
|
|
111
|
+
/** The runner's nodeId, so the line groups with its `[mem]` heartbeat. */
|
|
112
|
+
readonly label: string;
|
|
113
|
+
readonly addons: readonly string[];
|
|
114
|
+
readonly sink: HeapWatchSink;
|
|
115
|
+
/** Where a snapshot would be written, if one is authorised. */
|
|
116
|
+
readonly snapshotPath: string;
|
|
117
|
+
}
|
|
118
|
+
/** Everything the report READS. Injected so the split itself is testable. */
|
|
119
|
+
export interface HeapDiagnosticDeps {
|
|
120
|
+
readonly readMemory: () => NodeJS.MemoryUsage;
|
|
121
|
+
readonly readSpaces: HeapSpaceReader;
|
|
122
|
+
readonly writeSnapshot: (path: string) => void;
|
|
123
|
+
readonly env: NodeJS.ProcessEnv;
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The SIGUSR2 report — memory + the FULL per-space breakdown, always; the
|
|
127
|
+
* snapshot only when {@link heapSnapshotAuthorised}.
|
|
128
|
+
*
|
|
129
|
+
* The breakdown here keeps every non-empty space at 0.1 MB, unlike the
|
|
130
|
+
* heartbeat's filtered whole-MB pair: this is a hand-fired diagnostic read once
|
|
131
|
+
* by a human who asked for it, so completeness costs nothing. The heartbeat runs
|
|
132
|
+
* unattended on every runner forever, so it pays for every field it prints.
|
|
133
|
+
*
|
|
134
|
+
* A refused snapshot SAYS SO. A branch that drops work silently reads as "it was
|
|
135
|
+
* never requested", and this one is fired by an operator who is standing there
|
|
136
|
+
* waiting for a file.
|
|
137
|
+
*/
|
|
138
|
+
export declare function emitHeapDiagnosticReport(request: HeapDiagnosticRequest, deps?: HeapDiagnosticDeps): void;
|