@camstack/system 1.2.218 → 1.2.219

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/addon-runner.js +2 -2
  2. package/dist/addon-runner.mjs +2 -2
  3. package/dist/addon-utils.js +2 -2
  4. package/dist/addon-utils.mjs +2 -2
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/console-logging/index.js +1 -1
  14. package/dist/builtins/console-logging/index.mjs +1 -1
  15. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  17. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  18. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  19. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  20. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  21. package/dist/builtins/hub-forwarder/index.js +1 -1
  22. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  23. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  24. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  25. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  26. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  27. package/dist/builtins/local-network/local-network.addon.js +2 -2
  28. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  29. package/dist/builtins/loki-logging/index.js +1 -1
  30. package/dist/builtins/loki-logging/index.mjs +1 -1
  31. package/dist/builtins/native-metrics/gpu-probe.d.ts +18 -0
  32. package/dist/builtins/native-metrics/native-metrics-provider.d.ts +1 -1
  33. package/dist/builtins/native-metrics/native-metrics.addon.d.ts +26 -3
  34. package/dist/builtins/native-metrics/native-metrics.addon.js +1320 -1093
  35. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1320 -1096
  36. package/dist/builtins/native-metrics/proc-process-table.d.ts +25 -0
  37. package/dist/builtins/platform-probe/index.js +3 -3
  38. package/dist/builtins/platform-probe/index.mjs +3 -3
  39. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  40. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  41. package/dist/builtins/snapshot/index.js +1 -1
  42. package/dist/builtins/snapshot/index.mjs +1 -1
  43. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  44. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  45. package/dist/builtins/sqlite-storage/sqlite-pragmas.d.ts +23 -0
  46. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +1 -1
  47. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +1 -0
  48. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  49. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  50. package/dist/builtins/sqlite-storage/wal-checkpoint-policy.d.ts +115 -0
  51. package/dist/builtins/sqlite-storage/wal-checkpoint-worker.d.ts +1 -0
  52. package/dist/builtins/sqlite-storage/wal-checkpointer.d.ts +70 -0
  53. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  54. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  55. package/dist/builtins/system-config/system-config.addon.js +1 -1
  56. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  57. package/dist/builtins/winston-logging/index.js +1 -1
  58. package/dist/builtins/winston-logging/index.mjs +1 -1
  59. package/dist/{custom-action-registry-CsONUlhC.mjs → custom-action-registry-B6gOtUWA.mjs} +1 -1
  60. package/dist/{custom-action-registry-BDwM5qAK.js → custom-action-registry-DKWhaWL1.js} +1 -1
  61. package/dist/{dist-BOlMCOeT.js → dist-B17W9ngu.js} +2 -2
  62. package/dist/{dist-DigmGsQS.mjs → dist-Cyz5_i7z.mjs} +2 -2
  63. package/dist/index.d.ts +6 -1
  64. package/dist/index.js +31 -36
  65. package/dist/index.mjs +23 -38
  66. package/dist/kernel/heap-watch.d.ts +24 -1
  67. package/dist/kernel/moleculer/mesh-queue-report.d.ts +51 -0
  68. package/dist/kernel/outbound-queue-watch.d.ts +94 -0
  69. package/dist/kernel/socket-plane-report.d.ts +75 -4
  70. package/dist/kernel/transport/cap-routing-hints.d.ts +21 -0
  71. package/dist/kernel/transport/child-cap-protocol.d.ts +28 -2
  72. package/dist/kernel/transport/frame-codec.d.ts +49 -0
  73. package/dist/kernel/transport/local-child-client.d.ts +7 -0
  74. package/dist/kernel/transport/local-child-registry.d.ts +36 -1
  75. package/dist/kernel/transport/local-transport.d.ts +45 -2
  76. package/dist/kernel/transport/socket-channel.d.ts +19 -1
  77. package/dist/{manifest-system-deps-D--wyMD9.mjs → manifest-system-deps-C7dihwWT.mjs} +1210 -682
  78. package/dist/{manifest-system-deps-Bo92lg5u.js → manifest-system-deps-g_nK0xsF.js} +1252 -664
  79. package/dist/process/proc-stat.d.ts +75 -0
  80. package/dist/process/resource-monitor.d.ts +9 -1
  81. package/dist/{resource-monitor-CdnzxBLP.js → resource-monitor-LVE1BoLs.js} +42 -23
  82. package/dist/{resource-monitor-BWmQ5i-o.mjs → resource-monitor-Vp0bPV3U.mjs} +42 -22
  83. package/dist/{retired-settings-keys-vK_U-CG2.mjs → retired-settings-keys-BCYUrdsA.mjs} +1 -1
  84. package/dist/{retired-settings-keys-xEAlYnv7.js → retired-settings-keys-CjvB7Etx.js} +1 -1
  85. package/dist/wal-checkpoint-policy-CAcg63o-.mjs +92 -0
  86. package/dist/wal-checkpoint-policy-CCJZngds.js +127 -0
  87. package/dist/wal-checkpoint-worker.js +138 -0
  88. package/dist/wal-checkpoint-worker.mjs +137 -0
  89. package/package.json +1 -1
  90. package/dist/{event-loop-stall-monitor-DM9OAzy8.js → event-loop-stall-monitor-CAsHdMwP.js} +1 -1
  91. package/dist/{event-loop-stall-monitor-B3CFd9tM.mjs → event-loop-stall-monitor-GPrVvx14.mjs} +1 -1
  92. package/dist/{tls-DOTmtLCW.mjs → tls-2xbgg78V.mjs} +2 -2
  93. package/dist/{tls-BxQlomxd.js → tls-BFs4PzoW.js} +2 -2
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
2
- import { A as addonSettingsCapability, Dt as procedureAuthKey, Ft as scopesAllowDeviceCap, Jt as errMsg$1, Mt as resolveMethodAuth, Pt as scopesAllowAddon, Qt as DEVICE_STATUS_METHOD, Xt as DATAPLANE_SECRET_HEADER$1, Zt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, _ as RUNTIME_DEFAULTS, _n as readinessKey, _t as logLevelAtMost, an as asJsonObject$1, at as isArrayOutputSchema, cn as createEvent, ct as isObjectInput, dn as expandCapMethods, dt as isVoidInput, ft as kebabToCamel, gn as parseJsonUnknown, h as METHOD_ACCESS_MAP, hn as parseJsonObject, ln as emitDownForOwnedCaps, mt as lifecycleJobSchema, nn as ReadinessRegistry, on as asNumber, ot as isCollectionArrayMethod, p as LOG_LEVEL_RANK, rn as ReadinessTimeoutError, sn as asString$1, t as ALL_CAPABILITY_DEFINITIONS, tt as extractNestedAddonId, vn as resolveCapMount, vt as looseSchema, wt as objectInputDeclaresAddonId, xn as EventCategory$1, yn as scopeKey } from "./dist-DigmGsQS.mjs";
2
+ import { A as addonSettingsCapability, Dt as procedureAuthKey, Ft as scopesAllowDeviceCap, Jt as errMsg$1, Mt as resolveMethodAuth, Pt as scopesAllowAddon, Qt as DEVICE_STATUS_METHOD, Xt as DATAPLANE_SECRET_HEADER$1, Zt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, _ as RUNTIME_DEFAULTS, _n as readinessKey, _t as logLevelAtMost, an as asJsonObject$1, at as isArrayOutputSchema, cn as createEvent, ct as isObjectInput, dn as expandCapMethods, dt as isVoidInput, ft as kebabToCamel, gn as parseJsonUnknown, h as METHOD_ACCESS_MAP, hn as parseJsonObject, ln as emitDownForOwnedCaps, mt as lifecycleJobSchema, nn as ReadinessRegistry, on as asNumber, ot as isCollectionArrayMethod, p as LOG_LEVEL_RANK, rn as ReadinessTimeoutError, sn as asString$1, t as ALL_CAPABILITY_DEFINITIONS, tt as extractNestedAddonId, vn as resolveCapMount, vt as looseSchema, wt as objectInputDeclaresAddonId, xn as EventCategory$1, yn as scopeKey } from "./dist-Cyz5_i7z.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
@@ -14,7 +14,7 @@ import "./builtins/liveness-monitor/index.mjs";
14
14
  import { LocalAuthAddon, a as require_safe_buffer, i as require_ms, n as ScopedTokenManager, o as ApiKeyManager, r as AuthManager, t as UserManager } from "./builtins/local-auth/local-auth.addon.mjs";
15
15
  import "./builtins/local-auth/index.mjs";
16
16
  import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index.mjs";
17
- import NativeMetricsAddon, { t as NativeMetricsProvider } from "./builtins/native-metrics/native-metrics.addon.mjs";
17
+ import NativeMetricsAddon, { a as NativeMetricsProvider } from "./builtins/native-metrics/native-metrics.addon.mjs";
18
18
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
19
19
  import { SqliteSettingsAddon, o as SqliteSettingsBackend, s as prefixRange } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
20
20
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
@@ -24,23 +24,23 @@ import "./builtins/storage-orchestrator/index.mjs";
24
24
  import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.mjs";
25
25
  import "./builtins/system-config/index.mjs";
26
26
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
27
- import { _ as fetchJson, a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, f as collectModelFiles, g as ensureModel, h as downloadModel, i as startEventLoopStallMonitor, l as parseTokenizedUrl, m as downloadFile, n as STALL_TICK_MS, o as contentTypeFor, p as deleteModelFromDisk, r as attributeStall, s as createAuthenticatedFileServer, t as STALL_REPORT_MS, u as resolveFilePath, v as getModelFilePath, y as isModelDownloaded } from "./event-loop-stall-monitor-B3CFd9tM.mjs";
28
- import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-DOTmtLCW.mjs";
29
- import { $ as buildUdsNativeCapProxy, $t as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, A as createUdsLoggerWithControl, At as HUB_MAIN_RSS_BUDGET_MB, B as readMoleculerFanoutMode, Bt as createV8Reclaimer, C as ipcParentLink, Cn as EVENT_PLANE_TOP_N, Ct as createAddonDataPlaneFacility, D as createUdsEventBus, Dn as formatEventPlane, Dt as HEAP_WATCH_INTERVAL_MS, E as createUdsEventBridge, En as diffEventPlane, Et as HEAP_RECLAIM_TRIGGER_MB, F as AGENT_CAP_FWD_SERVICE, Ft as RUNNER_RSS_BUDGET_ENV, G as createLocalTransport, Gt as reclaimIntervalMs, H as PARENT_ROUTED_PROVIDER_ADDON_ID, Ht as hubMainRssBudget, I as CapRouteResolver, It as ZERO_LOOP_DELAY, J as SocketChannel, Jt as startRunnerHeapWatch, K as UdsLocalTransportClient, Kt as shouldReclaim, L as CapRouteError, Lt as buildHeapSample, M as LocalChildRegistry, Mt as RSS_BUDGET_REANNOUNCE_MIN_MS, N as UDS_NO_ROUTE_PREFIX, Nt as RSS_BUDGET_RELEASE_RATIO, O as udsChildLogToWorkerEntry, Ot as HEAP_WATCH_WARN_RATIO, P as AGENT_CAP_FWD_ACTION, Pt as RUNNER_HEAP_WATCH_INTERVAL_MS, Q as buildNativeCapProxy, Qt as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, R as classifyCapRoute, Rt as createDeferredHeapWatchSink, S as buildLinkChain, Sn as socketDirectionMessages, St as runNpm, T as createParentUnownedCallHandler, Tn as createEventPlaneReader, Tt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, U as __resetCapUsageRegistryForTests, Ut as nextRssBudgetState, V as CapUsageRegistry, Vt as describeRss, W as getCapUsageRegistry, Wt as parseRssBudgetMb, X as FrameDecoder, Xt as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, Y as localEndpointPath, Yt as strandedMb, Z as encodeFrame, Zt as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, _ as AddonDepsManager, _n as EMPTY_SOCKET_DIRECTION, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as HEAP_SPACE_REPORT_MIN_MB, at as createAddonService, b as brokerCallForCap, bn as sampleSocketDirection, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as heapSpaceField, ct as capActionName, d as clusterEventTopic, dn as EMPTY_SOCKET_PLANE_BASELINE, dt as capServiceName, en as createArrayBufferCensusGate, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as SOCKET_PLANE_TOP_N, ft as parseCapAction, g as subscribePassthrough, gn as formatSocketPlane, gt as CapabilityHandle, h as setNodeEventInterest, hn as diffSocketPlane, ht as DeviceRegistry, i as createAddonContext, in as DECISIVE_HEAP_SPACES, j as LocalChildClient, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as readHeapSpaces, lt as capActionSuffix, m as registerEventBusService, mn as createSocketPlaneReader, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as formatArrayBufferCensus, o as getWorkerDeviceRegistry, on as emitHeapDiagnosticReport, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as createSocketPlaneMeter, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as isArrayBufferCensusReport, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as formatHeapSpaces, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as createInspectorArrayBufferCensus, u as EVENT_TOPIC_PREFIX, un as selectReportedSpaces, ut as capBareAction, v as createKernelHwAccel, vn as createSocketDirectionCounters, vt as copyBundledNativeModules, w as localProviderLink, wn as createEventPlaneMeter, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xn as socketDirectionBytes, xt as resolveNpmInvocation, y as resolveHwAccel, yn as recordSocketFrame, yt as installManifestNativeDeps, z as callWithServiceDiscovery, zt as createLoopDelayMeter } from "./manifest-system-deps-D--wyMD9.mjs";
30
- import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
31
- import { t as CustomActionRegistry } from "./custom-action-registry-CsONUlhC.mjs";
27
+ import { _ as fetchJson, a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, f as collectModelFiles, g as ensureModel, h as downloadModel, i as startEventLoopStallMonitor, l as parseTokenizedUrl, m as downloadFile, n as STALL_TICK_MS, o as contentTypeFor, p as deleteModelFromDisk, r as attributeStall, s as createAuthenticatedFileServer, t as STALL_REPORT_MS, u as resolveFilePath, v as getModelFilePath, y as isModelDownloaded } from "./event-loop-stall-monitor-GPrVvx14.mjs";
28
+ import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-2xbgg78V.mjs";
29
+ import { $ as buildUdsNativeCapProxy, $t as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, A as createUdsLoggerWithControl, An as sampleSocketDirection, At as HUB_MAIN_RSS_BUDGET_MB, B as readMoleculerFanoutMode, Bt as createV8Reclaimer, C as ipcParentLink, Cn as createSocketPlaneReader, Ct as createAddonDataPlaneFacility, D as createUdsEventBus, Dn as EMPTY_SOCKET_DIRECTION, Dt as HEAP_WATCH_INTERVAL_MS, E as createUdsEventBridge, En as readSocketQueues, Et as HEAP_RECLAIM_TRIGGER_MB, F as CapRouteError, Fn as createEventPlaneReader, Ft as RUNNER_RSS_BUDGET_ENV, G as createLocalTransport, Gt as reclaimIntervalMs, H as PARENT_ROUTED_PROVIDER_ADDON_ID, Ht as hubMainRssBudget, I as classifyCapRoute, In as diffEventPlane, It as ZERO_LOOP_DELAY, J as SocketChannel, Jt as startRunnerHeapWatch, K as UdsLocalTransportClient, Kt as shouldReclaim, L as LocalChildClient, Ln as formatEventPlane, Lt as buildHeapSample, M as AGENT_CAP_FWD_SERVICE, Mn as socketDirectionMessages, Mt as RSS_BUDGET_REANNOUNCE_MIN_MS, N as CapRouteResolver, Nn as EVENT_PLANE_TOP_N, Nt as RSS_BUDGET_RELEASE_RATIO, O as udsChildLogToWorkerEntry, On as createSocketDirectionCounters, Ot as HEAP_WATCH_WARN_RATIO, P as callWithServiceDiscovery, Pn as createEventPlaneMeter, Pt as RUNNER_HEAP_WATCH_INTERVAL_MS, Q as buildNativeCapProxy, Qt as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, R as LocalChildRegistry, Rt as createDeferredHeapWatchSink, S as buildLinkChain, Sn as createSocketPlaneMeter, St as runNpm, T as createParentUnownedCallHandler, Tn as formatSocketPlane, Tt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, U as __resetCapUsageRegistryForTests, Ut as nextRssBudgetState, V as CapUsageRegistry, Vt as describeRss, W as getCapUsageRegistry, Wt as parseRssBudgetMb, X as FrameDecoder, Xt as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, Y as localEndpointPath, Yt as strandedMb, Z as encodeFrame, Zt as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, _ as AddonDepsManager, _n as createMeshQueueReader, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as HEAP_SPACE_REPORT_MIN_MB, at as createAddonService, b as brokerCallForCap, bn as SOCKET_PLANE_TOP_N, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as heapSpaceField, ct as capActionName, d as clusterEventTopic, dn as OUTBOUND_QUEUE_COOLDOWN_MS, dt as capServiceName, en as createArrayBufferCensusGate, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as OUTBOUND_QUEUE_SUSTAIN_MS, ft as parseCapAction, g as subscribePassthrough, gn as MESH_QUEUE_TOP_N, gt as CapabilityHandle, h as setNodeEventInterest, hn as formatOutboundQueueVerdict, ht as DeviceRegistry, i as createAddonContext, in as DECISIVE_HEAP_SPACES, j as AGENT_CAP_FWD_ACTION, jn as socketDirectionBytes, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kn as recordSocketFrame, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as readHeapSpaces, lt as capActionSuffix, m as registerEventBusService, mn as createOutboundQueueGate, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as formatArrayBufferCensus, o as getWorkerDeviceRegistry, on as emitHeapDiagnosticReport, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as OUTBOUND_QUEUE_THRESHOLD_BYTES, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as isArrayBufferCensusReport, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as formatHeapSpaces, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as createInspectorArrayBufferCensus, u as EVENT_TOPIC_PREFIX, un as selectReportedSpaces, ut as capBareAction, v as createKernelHwAccel, vn as formatMeshQueue, vt as copyBundledNativeModules, w as localProviderLink, wn as diffSocketPlane, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xn as SOCKET_QUEUE_TOP_N, xt as resolveNpmInvocation, y as resolveHwAccel, yn as EMPTY_SOCKET_PLANE_BASELINE, yt as installManifestNativeDeps, z as UDS_NO_ROUTE_PREFIX, zt as createLoopDelayMeter } from "./manifest-system-deps-C7dihwWT.mjs";
30
+ import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Vp0bPV3U.mjs";
31
+ import { t as CustomActionRegistry } from "./custom-action-registry-B6gOtUWA.mjs";
32
32
  import { z } from "zod";
33
33
  import { createHash, randomUUID, timingSafeEqual } from "node:crypto";
34
34
  import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
35
35
  import { lstat, readdir, readlink, realpath } from "node:fs/promises";
36
36
  import * as path$39 from "node:path";
37
37
  import { dirname, isAbsolute, join, posix, resolve, win32 } from "node:path";
38
- import { execFile, spawn } from "node:child_process";
39
- import * as util$10 from "node:util";
40
- import { promisify } from "node:util";
41
38
  import * as fs$17 from "node:fs";
42
39
  import { accessSync, constants, existsSync } from "node:fs";
40
+ import { execFile, spawn } from "node:child_process";
43
41
  import * as os$18 from "node:os";
42
+ import * as util$10 from "node:util";
43
+ import { promisify } from "node:util";
44
44
  import { request } from "node:http";
45
45
  import * as vm from "node:vm";
46
46
  import { asJsonObject, errMsg } from "@camstack/types/addon";
@@ -94693,35 +94693,20 @@ function forceMoleculerDisconnect(broker, nodeId) {
94693
94693
  nodes.delete(nodeId);
94694
94694
  } catch {}
94695
94695
  }
94696
- /** Read CPU% and RSS for a set of PIDs via `ps`. */
94696
+ /**
94697
+ * CPU% and RSS for a set of PIDs — `/proc` on Linux, `ps -p` elsewhere.
94698
+ * One reader for the whole kernel (`process/resource-monitor.ts`): this used
94699
+ * to be a second `ps` fork of its own, from hub-main, on every
94700
+ * `$process.list` (D452).
94701
+ */
94697
94702
  async function getPidStats$1(pids) {
94698
- if (pids.length === 0) return /* @__PURE__ */ new Map();
94699
- return new Promise((resolve) => {
94700
- execFile("ps", [
94701
- "-o",
94702
- "pid=,pcpu=,rss=",
94703
- "-p",
94704
- pids.join(",")
94705
- ], { timeout: 5e3 }, (err, stdout) => {
94706
- const result = /* @__PURE__ */ new Map();
94707
- if (err || !stdout) {
94708
- resolve(result);
94709
- return;
94710
- }
94711
- for (const line of stdout.trim().split("\n")) {
94712
- const parts = line.trim().split(/\s+/);
94713
- if (parts.length < 3) continue;
94714
- const pid = parseInt(parts[0], 10);
94715
- const cpu = parseFloat(parts[1]);
94716
- const rssKb = parseInt(parts[2], 10);
94717
- if (!isNaN(pid) && !isNaN(cpu) && !isNaN(rssKb)) result.set(pid, {
94718
- cpu: Math.round(cpu * 10) / 10,
94719
- memoryRss: rssKb * 1024
94720
- });
94721
- }
94722
- resolve(result);
94723
- });
94703
+ const stats = await getPidStats(pids);
94704
+ const result = /* @__PURE__ */ new Map();
94705
+ for (const [pid, s] of stats) result.set(pid, {
94706
+ cpu: s.cpu,
94707
+ memoryRss: s.memory
94724
94708
  });
94709
+ return result;
94725
94710
  }
94726
94711
  var EMPTY_HEAP_DECLARATION = {
94727
94712
  profile: void 0,
@@ -95766,4 +95751,4 @@ var LifecycleJobEngine = class {
95766
95751
  }
95767
95752
  };
95768
95753
  //#endregion
95769
- export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LokiDestination, LokiLoggingAddon, MAX_LEAF_VALIDITY_DAYS, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PARENT_ROUTED_PROVIDER_ADDON_ID, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, SOCKET_PLANE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createLocalTransport, createLoopDelayMeter, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, diffEventPlane, diffSocketPlane, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, emitHeapDiagnosticReport, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatSocketPlane, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, heapSpaceField, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isArrayBufferCensusReport, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, nextRssBudgetState, parseCapAction, parseRangeHeader, parseRssBudgetMb, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readHeapSpaces, readLanHttpState, readMoleculerFanoutMode, readPendingRestart, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, socketDirectionBytes, socketDirectionMessages, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
95754
+ export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LokiDestination, LokiLoggingAddon, MAX_LEAF_VALIDITY_DAYS, MESH_QUEUE_TOP_N, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PARENT_ROUTED_PROVIDER_ADDON_ID, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createLocalTransport, createLoopDelayMeter, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, diffEventPlane, diffSocketPlane, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, emitHeapDiagnosticReport, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, heapSpaceField, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isArrayBufferCensusReport, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, nextRssBudgetState, parseCapAction, parseRangeHeader, parseRssBudgetMb, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readHeapSpaces, readLanHttpState, readMoleculerFanoutMode, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, socketDirectionBytes, socketDirectionMessages, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
@@ -1,5 +1,7 @@
1
1
  import { EventPlaneReader } from './event-plane-report.js';
2
- import { SocketPlaneReader } from './socket-plane-report.js';
2
+ import { SocketPlaneCounters, SocketPlaneReader } from './socket-plane-report.js';
3
+ import { MeshPeerQueue, MeshQueueReader } from './moleculer/mesh-queue-report.js';
4
+ import { OutboundQueueGateOptions, OutboundQueueReading } from './outbound-queue-watch.js';
3
5
  import { HeapSpaceReader } from './heap-spaces.js';
4
6
  import { ArrayBufferCensus, ArrayBufferCensusGateOptions } from './array-buffer-census.js';
5
7
  /**
@@ -607,6 +609,20 @@ export interface HeapWatchProbes {
607
609
  * from the parent's side. Only hub-main and an agent's main pass one.
608
610
  */
609
611
  readonly socketPlane?: SocketPlaneReader;
612
+ /**
613
+ * The write queue of every Moleculer TCP socket to a peer node. No default:
614
+ * only a process with a broker on a real transporter has one. Those sockets
615
+ * are UNREF'D by Moleculer, so a sum over `_getActiveHandles()` never listed
616
+ * them — the hole in the 2026-09-10 exclusion of "every socket queue"
617
+ * (D446). Read on every probe, judged with the UDS queues below.
618
+ */
619
+ readonly meshQueue?: MeshQueueReader;
620
+ /**
621
+ * Thresholds for the outbound-queue gate. The gate itself is created
622
+ * whenever {@link socketPlane} or {@link meshQueue} is given; this only
623
+ * tunes it (tests, or a process with a different notion of "held").
624
+ */
625
+ readonly outboundQueue?: OutboundQueueGateOptions;
610
626
  /**
611
627
  * The ArrayBuffer census that ARMS ITSELF. No default: it costs a forced
612
628
  * full GC when it fires, and only hub-main has an episode on record (two
@@ -622,6 +638,13 @@ export interface HeapWatchProbes {
622
638
  export interface ArrayBufferCensusProbe extends ArrayBufferCensusGateOptions {
623
639
  readonly census: ArrayBufferCensus;
624
640
  }
641
+ /**
642
+ * Every outbound queue the heartbeat can reach, as the gate wants them: the
643
+ * UDS children (only those whose channel keeps a reading — an unmeasured
644
+ * peer is not a zero) and the mesh writer sockets, each prefixed with its
645
+ * plane.
646
+ */
647
+ export declare function outboundQueueReadings(uds: SocketPlaneCounters | undefined, mesh: readonly MeshPeerQueue[] | undefined): readonly OutboundQueueReading[];
625
648
  /**
626
649
  * Start the heartbeat. Returns a stop function.
627
650
  *
@@ -0,0 +1,51 @@
1
+ /**
2
+ * mesh-queue-report — the write queue of every Moleculer TCP socket this
3
+ * process holds to a peer node, on the `[mem]` line (D446).
4
+ *
5
+ * ## Why a separate reader
6
+ *
7
+ * The UDS plane is measured on the channel (`SocketChannel.queuedBytes`). The
8
+ * mesh plane is Moleculer's: `TcpTransporter.writer` is a `TcpWriter` whose
9
+ * `sockets` map holds one `net.Socket` per peer node, opened lazily on the
10
+ * first send and — this is the point — `unref()`'d at connect
11
+ * (`transporters/tcp/tcp-writer.js`). An unref'd handle is not in
12
+ * `process._getActiveHandles()`, so the 2026-09-10 census that summed
13
+ * `writableLength` over that list and excluded "every socket queue" could not
14
+ * have seen a backlog to an agent, however large.
15
+ *
16
+ * ## What is read, and how carefully
17
+ *
18
+ * `broker.transit.tx.writer.sockets` — an internal path, walked with type
19
+ * guards and never a cast. Every step that is not the expected shape yields
20
+ * `undefined` for the WHOLE reading: a test broker (`Fake` transporter), a
21
+ * broker that does not exist yet, a Moleculer whose internals moved. `undefined`
22
+ * is "this process has no mesh writer to report", never "the mesh is quiet".
23
+ * A socket entry without numeric `writableLength`/`bytesWritten` is skipped
24
+ * on its own.
25
+ */
26
+ /** One peer node's outbound socket, as the writer holds it. */
27
+ export interface MeshPeerQueue {
28
+ readonly nodeId: string;
29
+ /** Bytes handed to the socket that the kernel has not taken yet. */
30
+ readonly queuedBytes: number;
31
+ /** Lifetime bytes written on this socket — so a stalled queue can be read
32
+ * against the peer's normal rate. */
33
+ readonly bytesWritten: number;
34
+ }
35
+ /** `undefined` = no mesh writer to report (no broker, `Fake` transporter). */
36
+ export type MeshQueueReader = () => readonly MeshPeerQueue[] | undefined;
37
+ /**
38
+ * Build a reader over a lazily-resolved broker. Wrapped: a broker mid-teardown
39
+ * may throw, and a diagnostic that can crash the process it watches is worse
40
+ * than none.
41
+ */
42
+ export declare function createMeshQueueReader(getBroker: () => unknown): MeshQueueReader;
43
+ /** At most this many nodes named. A cluster has a handful. */
44
+ export declare const MESH_QUEUE_TOP_N = 3;
45
+ /**
46
+ * The suffix appended to a `[mem]` line — leading space included, empty when
47
+ * this process has no mesh writer. `meshQueued` is printed always, at zero
48
+ * included: a quiet mesh is a reading. `meshQueuedTop` names only nodes with
49
+ * a queue, largest first — a ranked list of zeros is noise.
50
+ */
51
+ export declare function formatMeshQueue(peers: readonly MeshPeerQueue[] | undefined): string;
@@ -0,0 +1,94 @@
1
+ /**
2
+ * outbound-queue-watch — an outbound socket queue that HOLDS is named, and its
3
+ * release is timestamped (D446).
4
+ *
5
+ * ## The blind spot this closes
6
+ *
7
+ * On 2026-09-10 hub-main's `arrayBuffers` climbed twice at a constant rate
8
+ * (20 MB/min to 1 264 MB; 63 MB/min for 77 min to 4 968 MB), LIVE across a
9
+ * forced compaction, with ~4 % of JS heap alongside, and each time released in
10
+ * one instant with no line from any owner. The investigation excluded "every
11
+ * socket write queue" by summing `writableLength` over
12
+ * `process._getActiveHandles()` — 84 MB, all of it the phone's WebSocket.
13
+ *
14
+ * `_getActiveHandles()` lists only handles that keep the loop alive. An
15
+ * UNREF'D socket is not one of them, and Moleculer's `TcpWriter.connect`
16
+ * unrefs every socket it opens to a peer node (`transporters/tcp/tcp-writer.js`,
17
+ * `socket.unref()`). So the one outbound plane that writes to another MACHINE
18
+ * — where a reader that stops draining is the ordinary failure — was never in
19
+ * the sum. The UDS children were in it, but only as a total, at one instant,
20
+ * by hand.
21
+ *
22
+ * ## What this is
23
+ *
24
+ * A pure gate over per-peer queue depths the heartbeat reads on every probe:
25
+ * the UDS children's `socket.writableLength` (`SocketChannel.queuedBytes`) and
26
+ * the mesh writer sockets' (`mesh-queue-report.ts`). It says three things and
27
+ * nothing else:
28
+ *
29
+ * - a peer whose queue has been at or above {@link OUTBOUND_QUEUE_THRESHOLD_BYTES}
30
+ * for {@link OUTBOUND_QUEUE_SUSTAIN_MS} is NAMED, with its current and peak
31
+ * depth and how long it has held — at most once per
32
+ * {@link OUTBOUND_QUEUE_COOLDOWN_MS};
33
+ * - a named peer whose queue then falls under half the threshold, or that
34
+ * vanishes from the readings (its socket died — which is how a queue is
35
+ * dropped in one instant), is reported as RELEASED with its peak and the
36
+ * hold, so the release the episodes never logged has a line and a peer;
37
+ * - a burst that drains inside the sustain window says nothing. Backpressure
38
+ * measures LIVENESS, not identity (D444): a peer momentarily behind is
39
+ * coming back.
40
+ *
41
+ * ## What it is NOT
42
+ *
43
+ * Not a bound. It terminates nothing: a UDS child whose channel is destroyed
44
+ * loses every in-flight call, and a mesh socket Moleculer reconnects on its
45
+ * own terms. The WS guard (`ws-slow-consumer-guard.ts`) bounds the one plane
46
+ * whose client is expendable. Here the line is the deliverable; what to do
47
+ * about a peer that holds is decided with the peer named, not before.
48
+ */
49
+ /** 64 MiB. Below this a queue is a burst on a busy peer (the orchestrator's
50
+ * channel moves ~1.5 MB/s of audio responses); above it, and held, it is
51
+ * retention with a name. */
52
+ export declare const OUTBOUND_QUEUE_THRESHOLD_BYTES: number;
53
+ /** Matches the ArrayBuffer census sustain: a minute above the bound. */
54
+ export declare const OUTBOUND_QUEUE_SUSTAIN_MS = 60000;
55
+ /** A held queue is re-named every ten minutes, not every probe. */
56
+ export declare const OUTBOUND_QUEUE_COOLDOWN_MS: number;
57
+ /** One outbound channel's queue depth at one probe. `peerId` carries its
58
+ * plane as a prefix (`uds:<childId>`, `mesh:<nodeId>`). */
59
+ export interface OutboundQueueReading {
60
+ readonly peerId: string;
61
+ readonly bytes: number;
62
+ }
63
+ export type OutboundQueueVerdict = {
64
+ readonly kind: 'sustained';
65
+ readonly peerId: string;
66
+ readonly bytes: number;
67
+ readonly peakBytes: number;
68
+ readonly heldForMs: number;
69
+ } | {
70
+ readonly kind: 'released';
71
+ readonly peerId: string;
72
+ readonly peakBytes: number;
73
+ readonly toBytes: number;
74
+ readonly heldForMs: number;
75
+ /** The peer left the readings altogether — its socket is gone. */
76
+ readonly gone: boolean;
77
+ };
78
+ export interface OutboundQueueGateOptions {
79
+ readonly thresholdBytes?: number;
80
+ readonly sustainMs?: number;
81
+ readonly cooldownMs?: number;
82
+ }
83
+ export interface OutboundQueueGate {
84
+ /** Judge one probe's readings. Every peer is judged on its own. */
85
+ readonly observe: (readings: readonly OutboundQueueReading[], at: number) => readonly OutboundQueueVerdict[];
86
+ }
87
+ /**
88
+ * The pure decision — threshold, sustain, cooldown, release, gone — testable
89
+ * without a socket.
90
+ */
91
+ export declare function createOutboundQueueGate(options?: OutboundQueueGateOptions): OutboundQueueGate;
92
+ /** The line for one verdict. Both carry the peer, the bytes and the hold;
93
+ * the sustained one also says why the older census could not see it. */
94
+ export declare function formatOutboundQueueVerdict(label: string, verdict: OutboundQueueVerdict): string;
@@ -1,24 +1,52 @@
1
1
  import { SocketDirectionSample, SocketTrafficSample } from './transport/socket-traffic.js';
2
- /** One peer's cumulative traffic, as the channel keeps it. */
2
+ /** One peer's cumulative traffic, as the channel keeps it, plus its outbound
3
+ * queue depth at the instant of the read. */
3
4
  export interface SocketPeerSample {
4
5
  readonly peerId: string;
5
6
  readonly tx: SocketDirectionSample;
6
7
  readonly rx: SocketDirectionSample;
8
+ /**
9
+ * Bytes written to this peer that it has not yet taken — `writableLength`
10
+ * on the channel, read live (D446). `null` when the channel keeps no such
11
+ * reading: a measurement that failed is null, never 0 (D393), and the
12
+ * window counts it as unmeasured rather than as empty.
13
+ */
14
+ readonly queuedBytes: number | null;
7
15
  }
8
16
  /** What `LocalChildRegistry` exposes, structurally — the kernel's heartbeat
9
17
  * must not depend on the transport layer's class. */
10
18
  export interface SocketPlaneRegistryChild {
11
19
  readonly childId: string;
12
20
  }
21
+ /**
22
+ * How many child→sibling cap calls the parent forwarded without reading
23
+ * their args (`raw`) against how many it decoded — see
24
+ * `transport/local-child-registry.ts` `ForwardCensus`. Cumulative on the
25
+ * registry; a delta on the window.
26
+ */
27
+ export interface SocketForwardCensus {
28
+ readonly raw: number;
29
+ readonly decoded: number;
30
+ }
13
31
  export interface SocketPlaneRegistry {
14
32
  readonly listChildren: () => readonly SocketPlaneRegistryChild[];
15
33
  readonly getChildSocketTraffic: (childId: string) => SocketTrafficSample | null;
34
+ /** Live outbound queue depth to one child, or `null` when unmeasured. */
35
+ readonly getChildQueuedBytes: (childId: string) => number | null;
36
+ /**
37
+ * The raw-forward census, when the registry keeps one. OPTIONAL: a registry
38
+ * that predates raw-forward has no such number, and the line must then omit
39
+ * the field rather than print a zero that reads as "nothing was forwarded".
40
+ */
41
+ readonly readForwardCensus?: () => SocketForwardCensus;
16
42
  }
17
43
  /** One cumulative reading of every measured peer. */
18
44
  export interface SocketPlaneCounters {
19
45
  readonly peers: readonly SocketPeerSample[];
20
46
  /** Connected children, INCLUDING any whose channel keeps no counters. */
21
47
  readonly peersConnected: number;
48
+ /** Cumulative forward census, absent when the registry keeps none. */
49
+ readonly forward?: SocketForwardCensus;
22
50
  }
23
51
  /** `undefined` = this process has no local socket plane to report (every forked
24
52
  * runner, and hub-main before the registry exists). */
@@ -57,6 +85,23 @@ export interface SocketPeerDelta {
57
85
  readonly tx: SocketDirectionSample;
58
86
  readonly rx: SocketDirectionSample;
59
87
  }
88
+ /** One peer holding an outbound queue at the instant of the read. */
89
+ export interface SocketPeerQueue {
90
+ readonly peerId: string;
91
+ readonly bytes: number;
92
+ }
93
+ /**
94
+ * The outbound queues at the instant of the read — NOT a delta: a queue is a
95
+ * level, and the level is the reading (D446).
96
+ */
97
+ export interface SocketQueueReading {
98
+ /** Summed over every peer with a reading. */
99
+ readonly totalBytes: number;
100
+ /** Peers whose channel keeps no queue reading. Never folded into the total. */
101
+ readonly unmeasured: number;
102
+ /** Peers holding a queue, largest first, at most {@link SOCKET_QUEUE_TOP_N}. */
103
+ readonly top: readonly SocketPeerQueue[];
104
+ }
60
105
  /** The whole plane over one heartbeat window. */
61
106
  export interface SocketPlaneWindow {
62
107
  readonly peersConnected: number;
@@ -67,10 +112,31 @@ export interface SocketPlaneWindow {
67
112
  readonly rx: SocketDirectionSample;
68
113
  /** Busiest first (tx+rx messages), at most {@link SOCKET_PLANE_TOP_N}. */
69
114
  readonly top: readonly SocketPeerDelta[];
115
+ /**
116
+ * Heaviest first (tx+rx BYTES), at most {@link SOCKET_PLANE_TOP_N}.
117
+ *
118
+ * A separate ranking rather than a replacement, because the two questions
119
+ * have different answers and both are live: `top` names the peer paying for
120
+ * round trips (`audio-codec` at 8 379 calls/min of small frames), `topBytes`
121
+ * names the peer paying for copies and GC. A peer that moves FEW, HUGE
122
+ * frames is absent from `top` by construction — measured 2026-09-11, the
123
+ * five peers named by messages left 116 MB/min of hub-main's outbound bytes
124
+ * with no name on them (D454).
125
+ */
126
+ readonly topBytes: readonly SocketPeerDelta[];
127
+ readonly queued: SocketQueueReading;
128
+ /** Forwards in this window, absent when the registry keeps no census. */
129
+ readonly forward?: SocketForwardCensus;
70
130
  }
131
+ /** How many queue-holding peers get named. Three: a queue is an exception,
132
+ * and the line already carries five names for traffic. */
133
+ export declare const SOCKET_QUEUE_TOP_N = 3;
134
+ /** The queue reading over the current counters — a level, so no baseline. */
135
+ export declare function readSocketQueues(current: SocketPlaneCounters): SocketQueueReading;
71
136
  /** Previous cumulative reading, kept between lines. */
72
137
  export interface SocketPlaneBaseline {
73
138
  readonly peers: ReadonlyMap<string, SocketPeerSample>;
139
+ readonly forward?: SocketForwardCensus;
74
140
  }
75
141
  /** A process that has never read the plane. */
76
142
  export declare const EMPTY_SOCKET_PLANE_BASELINE: SocketPlaneBaseline;
@@ -92,8 +158,13 @@ export declare function createSocketPlaneMeter(reader: SocketPlaneReader, topN?:
92
158
  * is the only way to see an unmeasured channel, and the per-kind splits because
93
159
  * "the plane went quiet for a minute" is a reading.
94
160
  *
95
- * `socketTop` is the one conditional field — a ranked list of nothing is noise —
96
- * and it is a single comma-separated value so the field COUNT does not change
97
- * from line to line.
161
+ * `socketTop` is a conditional field — a ranked list of nothing is noise — and
162
+ * it is a single comma-separated value so the field COUNT does not change from
163
+ * line to line.
164
+ *
165
+ * `socketTopBytes` is the other one, and its PRESENCE is the reading: it is
166
+ * printed only when ranking by bytes names a peer that ranking by messages
167
+ * does not. A line without it says the two rankings agree; a line with it says
168
+ * a peer is moving few, heavy frames and names it (D454).
98
169
  */
99
170
  export declare function formatSocketPlane(window: SocketPlaneWindow | undefined): string;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The routing facts a parent reads OUT OF a cap call's args.
3
+ *
4
+ * `LocalChildRegistry` routes a child's `cap-call-out` on two things it used
5
+ * to read straight out of `args`: an inline `nodeId` (the historical per-call
6
+ * node pin — `extractNodeId`) and an `addonId` selector on a collection cap
7
+ * (`addonPinOf`). Under raw-forward the parent never decodes `args`, so the
8
+ * SENDER lifts those two fields into the envelope, and the parent routes on
9
+ * the lifted copy in both modes — one code path, whichever way the args
10
+ * travelled.
11
+ *
12
+ * Only top-level string fields are lifted, which is exactly what the two
13
+ * readers ever looked at. Nothing else about the args is visible to the
14
+ * parent under raw-forward, and that is the point.
15
+ */
16
+ export interface CapRoutingHints {
17
+ readonly nodeId?: string;
18
+ readonly addonId?: string;
19
+ }
20
+ /** Lift {@link CapRoutingHints} from a call's args. Never throws. */
21
+ export declare function liftRoutingHints(args: unknown): CapRoutingHints;
@@ -1,4 +1,5 @@
1
1
  import { ChildCustomActionCatalogs, CustomActionCaller, IReadinessRegistryRecord, LogLevel, LogTags, SystemEvent } from '@camstack/types';
2
+ import { CapRoutingHints } from './cap-routing-hints.js';
2
3
  /**
3
4
  * Routing descriptor a child sends so the parent can route cap calls to it.
4
5
  * The provider implementation never crosses the wire — only these keys do.
@@ -47,6 +48,22 @@ export interface RegisterMessage {
47
48
  * and from a legacy child; absent means "not described yet", never "none".
48
49
  */
49
50
  readonly customActions?: ChildCustomActionCatalogs;
51
+ /**
52
+ * The child can RECEIVE a `cap-call` whose args ride as an opaque payload
53
+ * beside the envelope (raw-forward), and answer with one. Declared, never
54
+ * assumed: a parent forwards a payload only to a child that said so, and
55
+ * decodes it for one that did not. Absent = legacy child = inline args.
56
+ */
57
+ readonly rawForward?: true;
58
+ }
59
+ /**
60
+ * Parent → child answer to `register`. `rawForward` says the parent accepts
61
+ * a `cap-call-out` whose args ride as a payload — a child packs its args
62
+ * only after seeing it. Absent = legacy parent = inline args.
63
+ */
64
+ export interface RegisterAck {
65
+ readonly ok: true;
66
+ readonly rawForward?: true;
50
67
  }
51
68
  /**
52
69
  * Child → parent, fire-and-forget: the child's category-pattern subscription
@@ -59,12 +76,21 @@ export interface EventSubUpdateMessage {
59
76
  readonly kind: 'event-sub';
60
77
  readonly patterns: readonly string[];
61
78
  }
62
- /** Child → parent outbound cap invocation — the child asks the parent to route a cap call it does not own. */
79
+ /**
80
+ * Child → parent outbound cap invocation — the child asks the parent to route
81
+ * a cap call it does not own.
82
+ *
83
+ * Under raw-forward `args` is ABSENT from the envelope: the packed args ride
84
+ * as the frame's opaque payload and `hints` carries the two fields the parent
85
+ * routes on. A legacy child sends `args` inline and no `hints`; the parent
86
+ * lifts the hints itself. See `cap-routing-hints.ts`.
87
+ */
63
88
  export interface CapCallOutMessage {
64
89
  readonly kind: 'cap-call-out';
65
90
  readonly capName: string;
66
91
  readonly method: string;
67
- readonly args: unknown;
92
+ readonly args?: unknown;
93
+ readonly hints?: CapRoutingHints;
68
94
  readonly deviceId?: number;
69
95
  /**
70
96
  * Optional per-call node pin (out-of-band; NOT part of the validated method
@@ -1,5 +1,54 @@
1
1
  /** Encode a value as a length-prefixed (4-byte big-endian) MsgPack frame. */
2
2
  export declare function encodeFrame(value: unknown): Buffer;
3
+ /**
4
+ * The key under which an opaque payload rides on a frame — see
5
+ * {@link encodeFrameHead}. Short on purpose: it is written once per frame by
6
+ * hand, and it is the one msgpack key on this plane a decoder must never
7
+ * interpret.
8
+ */
9
+ export declare const PAYLOAD_KEY = "pl";
10
+ /**
11
+ * Encode the HEAD of a frame that carries an opaque payload: the length
12
+ * prefix, the msgpack envelope with one extra key ({@link PAYLOAD_KEY}), and
13
+ * the `bin 32` header for the payload — everything but the payload bytes
14
+ * themselves, which the caller writes straight after it.
15
+ *
16
+ * ## Why the payload is the frame's TAIL and not a field
17
+ *
18
+ * hub-main routes every sibling↔sibling call. Until this existed it decoded
19
+ * the whole request (args included), built a new message, and re-encoded it
20
+ * — walking a 13.5 KB PCM chunk or a 2 000-row settings answer twice on the
21
+ * one thread that serves every tRPC request, and allocating an `Encoder`
22
+ * buffer that doubles from 2 KiB up to the body's size on every write
23
+ * (D441: ~27 % of hub-main's busy time in msgpack decode, ~6 % in encode,
24
+ * and the churn that fed a 29.5 % GC share).
25
+ *
26
+ * With the payload appended as the LAST key of the map, the receiver's
27
+ * ordinary msgpack decode yields it as a zero-copy VIEW of the frame
28
+ * (`@msgpack/msgpack` decodes `bin` as `subarray`), the router reads only the
29
+ * envelope, and forwarding is: encode a ~60-byte head, write it, write the
30
+ * view. The wire stays plain msgpack — a peer that never heard of payloads
31
+ * decodes `{ …frame, pl: <bytes> }` and can be told, at register, not to be
32
+ * sent one.
33
+ *
34
+ * ## The one hand-written msgpack in this repository
35
+ *
36
+ * `@msgpack/msgpack` has no "encode a map, then append a key" API, so the
37
+ * envelope is encoded normally and its `fixmap` count byte is bumped by one
38
+ * before the key and the `bin 32` header are appended. That patch is only
39
+ * valid for a `fixmap` (≤ 15 keys); a `Frame` has at most four, and anything
40
+ * else is refused rather than silently corrupted.
41
+ */
42
+ export declare function encodeFrameHead(frame: Record<string, unknown>, payload: Uint8Array): Buffer;
43
+ /**
44
+ * Serialise a value into the bytes a payload carries. The SAME options as the
45
+ * envelope codec, so `undefined` properties are omitted rather than turned
46
+ * into `null` — a `z.void()` cap output must read back as `undefined` on the
47
+ * far side exactly as it did when it travelled inline.
48
+ */
49
+ export declare function packPayload(value: unknown): Uint8Array;
50
+ /** Inverse of {@link packPayload}. A `bin` inside decodes as a view of `bytes`. */
51
+ export declare function unpackPayload(bytes: Uint8Array): unknown;
3
52
  /**
4
53
  * Reassembles length-prefixed MsgPack frames from a byte stream.
5
54
  *
@@ -67,6 +67,13 @@ export declare class LocalChildClient {
67
67
  private latestCustomActions;
68
68
  /** Events and logs queued while the channel is not yet open. */
69
69
  private readonly pendingEmits;
70
+ /**
71
+ * Whether the parent acknowledged raw-forward at `register`. Until it has,
72
+ * `callOut` sends args inline exactly as every child always did — a legacy
73
+ * parent would decode a payload-borne call to `args: undefined` and run the
74
+ * provider on nothing, silently. Re-read on every re-register.
75
+ */
76
+ private parentRawForward;
70
77
  /** Handler for parent→child events. Registered via `onEvent`. */
71
78
  private eventHandler;
72
79
  /**