@camstack/system 1.2.169 → 1.2.170
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 +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +1 -1
- package/dist/builtins/snapshot/index.mjs +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
- package/dist/builtins/storage-orchestrator/data-store-dispatch.d.ts +18 -6
- package/dist/builtins/storage-orchestrator/hub-settings-forward.d.ts +68 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +27 -3
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +235 -57
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +235 -57
- 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-digPByP6.mjs → dist-1DEQFmTq.mjs} +165 -6
- package/dist/{dist-D6kBG4fg.js → dist-DsoVfJSR.js} +165 -6
- package/dist/hub-cap-forward-BdT320dq.mjs +53 -0
- package/dist/hub-cap-forward-DmHNjbB0.js +70 -0
- package/dist/index.js +6 -5
- package/dist/index.mjs +3 -2
- package/dist/{manifest-system-deps-onn-Eawl.mjs → manifest-system-deps-Da6sme9C.mjs} +3 -54
- package/dist/{manifest-system-deps-BjMNGEpl.js → manifest-system-deps-ir_XTNpe.js} +2 -71
- package/dist/{retired-settings-keys-B5D2hfoN.mjs → retired-settings-keys-ChS1Q2Kv.mjs} +1 -1
- package/dist/{retired-settings-keys-BywIz4dZ.js → retired-settings-keys-DTE5k4lU.js} +1 -1
- package/package.json +1 -1
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 isCollectionArrayMethod, $t as parseJsonObject, Bt as ReadinessRegistry, E as addonSettingsCapability, Ft as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Gt as asString$1, It as DEVICE_STATUS_METHOD, Kt as createEvent, Mt as errMsg$1, Pt as DATAPLANE_SECRET_HEADER$1, Q as isArrayOutputSchema, Ut as asJsonObject$1, Vt as ReadinessTimeoutError, Wt as asNumber, Y as extractNestedAddonId, Yt as expandCapMethods, an as EventCategory$1, at as lifecycleJobSchema, bt as scopesAllowAddon, ct as logLevelAtMost, en as parseJsonUnknown$1, et as isObjectInput, f as LOG_LEVEL_RANK, ft as objectInputDeclaresAddonId, h as RUNTIME_DEFAULTS, ht as procedureAuthKey, it as kebabToCamel, lt as looseSchema, nn as resolveCapMount, p as METHOD_ACCESS_MAP, qt as emitDownForOwnedCaps, rn as scopeKey, rt as isVoidInput, t as ALL_CAPABILITY_DEFINITIONS, tn as readinessKey, vt as resolveMethodAuth, xt as scopesAllowDeviceCap } from "./dist-
|
|
2
|
+
import { $ as isCollectionArrayMethod, $t as parseJsonObject, Bt as ReadinessRegistry, E as addonSettingsCapability, Ft as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Gt as asString$1, It as DEVICE_STATUS_METHOD, Kt as createEvent, Mt as errMsg$1, Pt as DATAPLANE_SECRET_HEADER$1, Q as isArrayOutputSchema, Ut as asJsonObject$1, Vt as ReadinessTimeoutError, Wt as asNumber, Y as extractNestedAddonId, Yt as expandCapMethods, an as EventCategory$1, at as lifecycleJobSchema, bt as scopesAllowAddon, ct as logLevelAtMost, en as parseJsonUnknown$1, et as isObjectInput, f as LOG_LEVEL_RANK, ft as objectInputDeclaresAddonId, h as RUNTIME_DEFAULTS, ht as procedureAuthKey, it as kebabToCamel, lt as looseSchema, nn as resolveCapMount, p as METHOD_ACCESS_MAP, qt as emitDownForOwnedCaps, rn as scopeKey, rt as isVoidInput, t as ALL_CAPABILITY_DEFINITIONS, tn as readinessKey, vt as resolveMethodAuth, xt as scopesAllowDeviceCap } from "./dist-1DEQFmTq.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";
|
|
@@ -18,6 +18,7 @@ import NativeMetricsAddon, { t as NativeMetricsProvider } from "./builtins/nativ
|
|
|
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";
|
|
21
|
+
import { n as HUB_CAP_FWD_SERVICE, r as createHubCapForwardService, t as HUB_CAP_FWD_ACTION } from "./hub-cap-forward-BdT320dq.mjs";
|
|
21
22
|
import { StorageOrchestratorAddon, n as buildStorageLocationRegistry, t as StorageOrchestratorService } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
22
23
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
23
24
|
import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.mjs";
|
|
@@ -25,7 +26,7 @@ import "./builtins/system-config/index.mjs";
|
|
|
25
26
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
26
27
|
import { a as parseTokenizedUrl, c as collectModelFiles, d as downloadModel, f as ensureModel, h as isModelDownloaded, i as parseRangeHeader, l as deleteModelFromDisk, m as getModelFilePath, n as contentTypeFor, o as resolveFilePath, p as fetchJson, r as createAuthenticatedFileServer, s as ModelDownloadService, t as createFileDataPlaneHandler, u as downloadFile } from "./file-data-plane-BhKdxJgf.mjs";
|
|
27
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";
|
|
28
|
-
import { $ as
|
|
29
|
+
import { $ as buildUdsNativeCapProxy, $t as emitHeapDiagnosticReport, A as createUdsLoggerWithControl, At as HUB_MAIN_RSS_BUDGET_MB, B as readMoleculerFanoutMode, Bt as createV8Reclaimer, C as ipcParentLink, Ct as createAddonDataPlaneFacility, D as createUdsEventBus, Dt as HEAP_WATCH_INTERVAL_MS, E as createUdsEventBridge, Et as HEAP_RECLAIM_TRIGGER_MB, F as AGENT_CAP_FWD_SERVICE, Ft as RUNNER_RSS_BUDGET_ENV, G as createLocalTransport, Gt as reclaimIntervalMs, H as PARENT_ROUTED_PROVIDER_ADDON_ID, Ht as hubMainRssBudget, I as CapRouteResolver, It as ZERO_LOOP_DELAY, J as SocketChannel, Jt as startRunnerHeapWatch, K as UdsLocalTransportClient, Kt as shouldReclaim, L as CapRouteError, Lt as buildHeapSample, M as LocalChildRegistry, Mt as RSS_BUDGET_REANNOUNCE_MIN_MS, N as UDS_NO_ROUTE_PREFIX, Nt as RSS_BUDGET_RELEASE_RATIO, O as udsChildLogToWorkerEntry, Ot as HEAP_WATCH_WARN_RATIO, P as AGENT_CAP_FWD_ACTION, Pt as RUNNER_HEAP_WATCH_INTERVAL_MS, Q as buildNativeCapProxy, Qt as RUNNER_HEAP_SNAPSHOT_ENV, R as classifyCapRoute, Rt as createDeferredHeapWatchSink, S as buildLinkChain, St as runNpm, T as createParentUnownedCallHandler, Tt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, U as __resetCapUsageRegistryForTests, Ut as nextRssBudgetState, V as CapUsageRegistry, Vt as describeRss, W as getCapUsageRegistry, Wt as parseRssBudgetMb, X as FrameDecoder, Xt as DECISIVE_HEAP_SPACES, Y as localEndpointPath, Yt as strandedMb, Z as encodeFrame, Zt as HEAP_SPACE_REPORT_MIN_MB, _ as AddonDepsManager, _n as EVENT_PLANE_TOP_N, _t as CapabilityUnavailableError, a as createUdsAddonContext, an as EMPTY_SOCKET_PLANE_BASELINE, at as createAddonService, b as brokerCallForCap, bn as diffEventPlane, bt as resolveAddonClass, c as getOrInitReadinessRegistryForClient, cn as createSocketPlaneReader, ct as capActionName, d as clusterEventTopic, dn as EMPTY_SOCKET_DIRECTION, dt as capServiceName, en as formatHeapSpaces, et as createBrokerDeviceManagerApi, f as getBrokerEventBus, fn as createSocketDirectionCounters, ft as parseCapAction, g as subscribePassthrough, gn as socketDirectionMessages, gt as CapabilityHandle, h as setNodeEventInterest, hn as socketDirectionBytes, ht as DeviceRegistry, i as createAddonContext, in as selectReportedSpaces, j as LocalChildClient, jt as HUB_RSS_BUDGET_ENV, k as createUdsLogger, kt as HUB_MAIN_HEAP_WATCH_LABEL, l as setHubConnected, ln as diffSocketPlane, lt as capActionSuffix, m as registerEventBusService, mn as sampleSocketDirection, mt as serializeTypedArrays, n as installManifestPythonDeps, nn as heapSpaceField, o as getWorkerDeviceRegistry, on as SOCKET_PLANE_TOP_N, ot as validateProviderRegistrations, p as getMoleculerEventStats, pn as recordSocketFrame, pt as deserializeTypedArrays, q as UdsLocalTransportServer, qt as startHeapWatch, r as adaptBrokerToCluster, rn as readHeapSpaces, rt as mountNativeCapService, s as getOrInitReadinessRegistry, sn as createSocketPlaneMeter, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestSystemDeps, tn as heapSnapshotAuthorised, u as EVENT_TOPIC_PREFIX, un as formatSocketPlane, ut as capBareAction, v as createKernelHwAccel, vn as createEventPlaneMeter, vt as copyBundledNativeModules, w as localProviderLink, wt as HEAP_RECLAIM_MIN_INTERVAL_MS, x as brokerTransportLink, xn as formatEventPlane, xt as resolveNpmInvocation, y as resolveHwAccel, yn as createEventPlaneReader, yt as installManifestNativeDeps, z as callWithServiceDiscovery, zt as createLoopDelayMeter } from "./manifest-system-deps-Da6sme9C.mjs";
|
|
29
30
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
|
|
30
31
|
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
31
32
|
import { z } from "zod";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import "./dist-
|
|
1
|
+
import "./dist-1DEQFmTq.mjs";
|
|
2
|
+
import "./hub-cap-forward-BdT320dq.mjs";
|
|
2
3
|
import * as crypto$1 from "node:crypto";
|
|
3
4
|
import { randomBytes, randomUUID } from "node:crypto";
|
|
4
5
|
import { ensureBinary, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
@@ -7647,58 +7648,6 @@ function createParentUnownedCallHandler(deps) {
|
|
|
7647
7648
|
}
|
|
7648
7649
|
};
|
|
7649
7650
|
}
|
|
7650
|
-
//#endregion
|
|
7651
|
-
//#region src/kernel/transport/hub-cap-forward.ts
|
|
7652
|
-
/** The Moleculer service name the hub registers for agent→hub cap forwarding. */
|
|
7653
|
-
var HUB_CAP_FWD_SERVICE = "$hub-cap-fwd";
|
|
7654
|
-
/** The Moleculer action (service.action) for hub cap forwarding. */
|
|
7655
|
-
var HUB_CAP_FWD_ACTION = `${HUB_CAP_FWD_SERVICE}.forward`;
|
|
7656
|
-
/**
|
|
7657
|
-
* Narrow Moleculer's loosely-typed `ctx.params` to {@link HubCapForwardParams}
|
|
7658
|
-
* without unsafe casts — mirrors `agent-cap-dispatch-service.ts:narrowParams`.
|
|
7659
|
-
*/
|
|
7660
|
-
function narrowParams(raw) {
|
|
7661
|
-
if (raw === null || typeof raw !== "object") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
|
|
7662
|
-
const capName = Reflect.get(raw, "capName");
|
|
7663
|
-
const method = Reflect.get(raw, "method");
|
|
7664
|
-
if (typeof capName !== "string" || typeof method !== "string") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
|
|
7665
|
-
const deviceId = Reflect.get(raw, "deviceId");
|
|
7666
|
-
const nodeId = Reflect.get(raw, "nodeId");
|
|
7667
|
-
const native = Reflect.get(raw, "native");
|
|
7668
|
-
return {
|
|
7669
|
-
capName,
|
|
7670
|
-
method,
|
|
7671
|
-
args: Reflect.get(raw, "args"),
|
|
7672
|
-
deviceId: typeof deviceId === "number" ? deviceId : void 0,
|
|
7673
|
-
nodeId: typeof nodeId === "string" && nodeId.length > 0 ? nodeId : void 0,
|
|
7674
|
-
native: native === true ? true : void 0
|
|
7675
|
-
};
|
|
7676
|
-
}
|
|
7677
|
-
/**
|
|
7678
|
-
* Build the `$hub-cap-fwd` Moleculer `ServiceSchema`. The hub registers this on
|
|
7679
|
-
* its broker (only the hub registers it → an agent's `broker.call` for
|
|
7680
|
-
* `$hub-cap-fwd.forward` discovers it on the hub with no explicit nodeID pin).
|
|
7681
|
-
*
|
|
7682
|
-
* @param onUnownedCall The hub's cap routing handler (from
|
|
7683
|
-
* `createParentUnownedCallHandler`). Reused verbatim so
|
|
7684
|
-
* forwarded calls route exactly like a hub-local child's.
|
|
7685
|
-
*/
|
|
7686
|
-
function createHubCapForwardService(onUnownedCall) {
|
|
7687
|
-
return {
|
|
7688
|
-
name: HUB_CAP_FWD_SERVICE,
|
|
7689
|
-
actions: { forward: { handler: async (ctx) => {
|
|
7690
|
-
const { capName, method, args, deviceId, nodeId, native } = narrowParams(ctx.params);
|
|
7691
|
-
return onUnownedCall({
|
|
7692
|
-
capName,
|
|
7693
|
-
method,
|
|
7694
|
-
args,
|
|
7695
|
-
...deviceId !== void 0 ? { deviceId } : {},
|
|
7696
|
-
...nodeId !== void 0 ? { nodeId } : {},
|
|
7697
|
-
...native === true ? { native: true } : {}
|
|
7698
|
-
});
|
|
7699
|
-
} } }
|
|
7700
|
-
};
|
|
7701
|
-
}
|
|
7702
7651
|
/**
|
|
7703
7652
|
* Record one cap call, if an observer is configured. Extracted so the rule —
|
|
7704
7653
|
* an unresolved provider never erases the caller — has ONE place and a test.
|
|
@@ -10019,4 +9968,4 @@ async function defaultRun(command, args) {
|
|
|
10019
9968
|
await execFileAsync(command, [...args], { timeout: INSTALL_TIMEOUT_MS });
|
|
10020
9969
|
}
|
|
10021
9970
|
//#endregion
|
|
10022
|
-
export {
|
|
9971
|
+
export { buildUdsNativeCapProxy as $, emitHeapDiagnosticReport as $t, createUdsLoggerWithControl as A, HUB_MAIN_RSS_BUDGET_MB as At, readMoleculerFanoutMode as B, createV8Reclaimer as Bt, ipcParentLink as C, createAddonDataPlaneFacility as Ct, createUdsEventBus as D, HEAP_WATCH_INTERVAL_MS as Dt, createUdsEventBridge as E, HEAP_RECLAIM_TRIGGER_MB as Et, AGENT_CAP_FWD_SERVICE as F, RUNNER_RSS_BUDGET_ENV as Ft, createLocalTransport as G, reclaimIntervalMs as Gt, PARENT_ROUTED_PROVIDER_ADDON_ID as H, hubMainRssBudget as Ht, CapRouteResolver as I, ZERO_LOOP_DELAY as It, SocketChannel as J, startRunnerHeapWatch as Jt, UdsLocalTransportClient as K, shouldReclaim as Kt, CapRouteError as L, buildHeapSample as Lt, LocalChildRegistry as M, RSS_BUDGET_REANNOUNCE_MIN_MS as Mt, UDS_NO_ROUTE_PREFIX as N, RSS_BUDGET_RELEASE_RATIO as Nt, udsChildLogToWorkerEntry as O, HEAP_WATCH_WARN_RATIO as Ot, AGENT_CAP_FWD_ACTION as P, RUNNER_HEAP_WATCH_INTERVAL_MS as Pt, buildNativeCapProxy as Q, RUNNER_HEAP_SNAPSHOT_ENV as Qt, classifyCapRoute as R, createDeferredHeapWatchSink as Rt, buildLinkChain as S, runNpm as St, createParentUnownedCallHandler as T, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS as Tt, __resetCapUsageRegistryForTests as U, nextRssBudgetState as Ut, CapUsageRegistry as V, describeRss as Vt, getCapUsageRegistry as W, parseRssBudgetMb as Wt, FrameDecoder as X, DECISIVE_HEAP_SPACES as Xt, localEndpointPath as Y, strandedMb as Yt, encodeFrame as Z, HEAP_SPACE_REPORT_MIN_MB as Zt, AddonDepsManager as _, EVENT_PLANE_TOP_N as _n, CapabilityUnavailableError as _t, createUdsAddonContext as a, EMPTY_SOCKET_PLANE_BASELINE as an, createAddonService as at, brokerCallForCap as b, diffEventPlane as bn, resolveAddonClass as bt, getOrInitReadinessRegistryForClient as c, createSocketPlaneReader as cn, capActionName as ct, clusterEventTopic as d, EMPTY_SOCKET_DIRECTION as dn, capServiceName as dt, formatHeapSpaces as en, createBrokerDeviceManagerApi as et, getBrokerEventBus as f, createSocketDirectionCounters as fn, parseCapAction as ft, subscribePassthrough as g, socketDirectionMessages as gn, CapabilityHandle as gt, setNodeEventInterest as h, socketDirectionBytes as hn, DeviceRegistry as ht, createAddonContext as i, selectReportedSpaces as in, setWorkerNativeCapsChangeListener as it, LocalChildClient as j, HUB_RSS_BUDGET_ENV as jt, createUdsLogger as k, HUB_MAIN_HEAP_WATCH_LABEL as kt, setHubConnected as l, diffSocketPlane as ln, capActionSuffix as lt, registerEventBusService as m, sampleSocketDirection as mn, serializeTypedArrays as mt, installManifestPythonDeps as n, heapSpaceField as nn, getWorkerNativeCapSnapshot as nt, getWorkerDeviceRegistry as o, SOCKET_PLANE_TOP_N as on, validateProviderRegistrations as ot, getMoleculerEventStats as p, recordSocketFrame as pn, deserializeTypedArrays as pt, UdsLocalTransportServer as q, startHeapWatch as qt, adaptBrokerToCluster as r, readHeapSpaces as rn, mountNativeCapService as rt, getOrInitReadinessRegistry as s, createSocketPlaneMeter as sn, NATIVE_PROVIDER_SERVICE_INFIX as st, installManifestSystemDeps as t, heapSnapshotAuthorised as tn, getWorkerNativeCapProvider as tt, EVENT_TOPIC_PREFIX as u, formatSocketPlane as un, capBareAction as ut, createKernelHwAccel as v, createEventPlaneMeter as vn, copyBundledNativeModules as vt, localProviderLink as w, HEAP_RECLAIM_MIN_INTERVAL_MS as wt, brokerTransportLink as x, formatEventPlane as xn, resolveNpmInvocation as xt, resolveHwAccel as y, createEventPlaneReader as yn, installManifestNativeDeps as yt, callWithServiceDiscovery as z, createLoopDelayMeter as zt };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
require("./dist-
|
|
2
|
+
require("./dist-DsoVfJSR.js");
|
|
3
|
+
require("./hub-cap-forward-DmHNjbB0.js");
|
|
3
4
|
let node_crypto = require("node:crypto");
|
|
4
5
|
node_crypto = require_chunk.__toESM(node_crypto);
|
|
5
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -7650,58 +7651,6 @@ function createParentUnownedCallHandler(deps) {
|
|
|
7650
7651
|
}
|
|
7651
7652
|
};
|
|
7652
7653
|
}
|
|
7653
|
-
//#endregion
|
|
7654
|
-
//#region src/kernel/transport/hub-cap-forward.ts
|
|
7655
|
-
/** The Moleculer service name the hub registers for agent→hub cap forwarding. */
|
|
7656
|
-
var HUB_CAP_FWD_SERVICE = "$hub-cap-fwd";
|
|
7657
|
-
/** The Moleculer action (service.action) for hub cap forwarding. */
|
|
7658
|
-
var HUB_CAP_FWD_ACTION = `${HUB_CAP_FWD_SERVICE}.forward`;
|
|
7659
|
-
/**
|
|
7660
|
-
* Narrow Moleculer's loosely-typed `ctx.params` to {@link HubCapForwardParams}
|
|
7661
|
-
* without unsafe casts — mirrors `agent-cap-dispatch-service.ts:narrowParams`.
|
|
7662
|
-
*/
|
|
7663
|
-
function narrowParams(raw) {
|
|
7664
|
-
if (raw === null || typeof raw !== "object") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
|
|
7665
|
-
const capName = Reflect.get(raw, "capName");
|
|
7666
|
-
const method = Reflect.get(raw, "method");
|
|
7667
|
-
if (typeof capName !== "string" || typeof method !== "string") throw new Error("$hub-cap-fwd.forward: invalid params — capName and method are required strings");
|
|
7668
|
-
const deviceId = Reflect.get(raw, "deviceId");
|
|
7669
|
-
const nodeId = Reflect.get(raw, "nodeId");
|
|
7670
|
-
const native = Reflect.get(raw, "native");
|
|
7671
|
-
return {
|
|
7672
|
-
capName,
|
|
7673
|
-
method,
|
|
7674
|
-
args: Reflect.get(raw, "args"),
|
|
7675
|
-
deviceId: typeof deviceId === "number" ? deviceId : void 0,
|
|
7676
|
-
nodeId: typeof nodeId === "string" && nodeId.length > 0 ? nodeId : void 0,
|
|
7677
|
-
native: native === true ? true : void 0
|
|
7678
|
-
};
|
|
7679
|
-
}
|
|
7680
|
-
/**
|
|
7681
|
-
* Build the `$hub-cap-fwd` Moleculer `ServiceSchema`. The hub registers this on
|
|
7682
|
-
* its broker (only the hub registers it → an agent's `broker.call` for
|
|
7683
|
-
* `$hub-cap-fwd.forward` discovers it on the hub with no explicit nodeID pin).
|
|
7684
|
-
*
|
|
7685
|
-
* @param onUnownedCall The hub's cap routing handler (from
|
|
7686
|
-
* `createParentUnownedCallHandler`). Reused verbatim so
|
|
7687
|
-
* forwarded calls route exactly like a hub-local child's.
|
|
7688
|
-
*/
|
|
7689
|
-
function createHubCapForwardService(onUnownedCall) {
|
|
7690
|
-
return {
|
|
7691
|
-
name: HUB_CAP_FWD_SERVICE,
|
|
7692
|
-
actions: { forward: { handler: async (ctx) => {
|
|
7693
|
-
const { capName, method, args, deviceId, nodeId, native } = narrowParams(ctx.params);
|
|
7694
|
-
return onUnownedCall({
|
|
7695
|
-
capName,
|
|
7696
|
-
method,
|
|
7697
|
-
args,
|
|
7698
|
-
...deviceId !== void 0 ? { deviceId } : {},
|
|
7699
|
-
...nodeId !== void 0 ? { nodeId } : {},
|
|
7700
|
-
...native === true ? { native: true } : {}
|
|
7701
|
-
});
|
|
7702
|
-
} } }
|
|
7703
|
-
};
|
|
7704
|
-
}
|
|
7705
7654
|
/**
|
|
7706
7655
|
* Record one cap call, if an observer is configured. Extracted so the rule —
|
|
7707
7656
|
* an unresolved provider never erases the caller — has ONE place and a test.
|
|
@@ -10148,18 +10097,6 @@ Object.defineProperty(exports, "HEAP_WATCH_WARN_RATIO", {
|
|
|
10148
10097
|
return HEAP_WATCH_WARN_RATIO;
|
|
10149
10098
|
}
|
|
10150
10099
|
});
|
|
10151
|
-
Object.defineProperty(exports, "HUB_CAP_FWD_ACTION", {
|
|
10152
|
-
enumerable: true,
|
|
10153
|
-
get: function() {
|
|
10154
|
-
return HUB_CAP_FWD_ACTION;
|
|
10155
|
-
}
|
|
10156
|
-
});
|
|
10157
|
-
Object.defineProperty(exports, "HUB_CAP_FWD_SERVICE", {
|
|
10158
|
-
enumerable: true,
|
|
10159
|
-
get: function() {
|
|
10160
|
-
return HUB_CAP_FWD_SERVICE;
|
|
10161
|
-
}
|
|
10162
|
-
});
|
|
10163
10100
|
Object.defineProperty(exports, "HUB_MAIN_HEAP_WATCH_LABEL", {
|
|
10164
10101
|
enumerable: true,
|
|
10165
10102
|
get: function() {
|
|
@@ -10406,12 +10343,6 @@ Object.defineProperty(exports, "createEventPlaneReader", {
|
|
|
10406
10343
|
return createEventPlaneReader;
|
|
10407
10344
|
}
|
|
10408
10345
|
});
|
|
10409
|
-
Object.defineProperty(exports, "createHubCapForwardService", {
|
|
10410
|
-
enumerable: true,
|
|
10411
|
-
get: function() {
|
|
10412
|
-
return createHubCapForwardService;
|
|
10413
|
-
}
|
|
10414
|
-
});
|
|
10415
10346
|
Object.defineProperty(exports, "createKernelHwAccel", {
|
|
10416
10347
|
enumerable: true,
|
|
10417
10348
|
get: function() {
|