@camstack/system 1.1.52 → 1.1.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon-runner.js +2 -2
- package/dist/addon-runner.mjs +2 -2
- 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/device-manager/device-linked-devices.d.ts +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1595 -1585
- package/dist/builtins/device-manager/device-manager.addon.mjs +1595 -1585
- 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/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/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 +11 -3
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +11 -3
- 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-BduBhv6N.js → dist-BNro5CRu.js} +92 -16
- package/dist/{dist-B_PSvr-m.mjs → dist-D7_69kDt.mjs} +92 -16
- package/dist/index.js +22 -5
- package/dist/index.mjs +22 -6
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/moleculer/readiness-context.d.ts +12 -8
- package/dist/kernel/moleculer/readiness-service.d.ts +16 -1
- package/dist/{manifest-python-deps-CPAMH5gV.js → manifest-python-deps-DszE7bYn.js} +35 -9
- package/dist/{manifest-python-deps-CIyvuHAB.mjs → manifest-python-deps-EM2H-jjS.mjs} +35 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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-BNro5CRu.js");
|
|
4
4
|
const require_model_download_service = require("./model-download-service-hf0ookyy.js");
|
|
5
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
5
|
+
const require_manifest_python_deps = require("./manifest-python-deps-DszE7bYn.js");
|
|
6
6
|
const require_resource_monitor = require("./resource-monitor-DNNomR-i.js");
|
|
7
7
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
@@ -92047,16 +92047,32 @@ async function callRegisterNodeWithRetry(broker, params, opts) {
|
|
|
92047
92047
|
}
|
|
92048
92048
|
//#endregion
|
|
92049
92049
|
//#region src/kernel/moleculer/readiness-service.ts
|
|
92050
|
+
/**
|
|
92051
|
+
* Service name AGENTS register their own readiness snapshot under.
|
|
92052
|
+
*
|
|
92053
|
+
* Deliberately NOT `$readiness`: agents call `$readiness.getSnapshot`
|
|
92054
|
+
* UNQUALIFIED to reach the hub's authoritative registry, and Moleculer
|
|
92055
|
+
* prefers a local service for an unqualified call — an agent registering
|
|
92056
|
+
* `$readiness` would shadow the hub and hydrate from itself. The hub
|
|
92057
|
+
* pulls `$agent-readiness.getSnapshot` with an explicit `{ nodeID }` on
|
|
92058
|
+
* every agent (re)connect + periodically, closing the reverse leg of the
|
|
92059
|
+
* D8 snapshot-reconcile (the hub otherwise learns agent readiness only
|
|
92060
|
+
* from lossy cross-node event broadcasts).
|
|
92061
|
+
*/
|
|
92062
|
+
var AGENT_READINESS_SERVICE_NAME = "$agent-readiness";
|
|
92050
92063
|
function createReadinessService(deps) {
|
|
92051
92064
|
return {
|
|
92052
|
-
name: "$readiness",
|
|
92065
|
+
name: deps.name ?? "$readiness",
|
|
92053
92066
|
actions: { getSnapshot: { handler() {
|
|
92054
92067
|
return deps.getSnapshot();
|
|
92055
92068
|
} } }
|
|
92056
92069
|
};
|
|
92057
92070
|
}
|
|
92058
|
-
function createReadinessServiceForRegistry(registry) {
|
|
92059
|
-
return createReadinessService({
|
|
92071
|
+
function createReadinessServiceForRegistry(registry, name) {
|
|
92072
|
+
return createReadinessService({
|
|
92073
|
+
getSnapshot: () => registry.getSnapshotForTransport(),
|
|
92074
|
+
...name !== void 0 ? { name } : {}
|
|
92075
|
+
});
|
|
92060
92076
|
}
|
|
92061
92077
|
//#endregion
|
|
92062
92078
|
//#region src/kernel/moleculer/stream-probe-service.ts
|
|
@@ -93391,6 +93407,7 @@ async function stageFrameworkLockstep(input) {
|
|
|
93391
93407
|
//#endregion
|
|
93392
93408
|
exports.AGENT_CAP_FWD_ACTION = require_manifest_python_deps.AGENT_CAP_FWD_ACTION;
|
|
93393
93409
|
exports.AGENT_CAP_FWD_SERVICE = require_manifest_python_deps.AGENT_CAP_FWD_SERVICE;
|
|
93410
|
+
exports.AGENT_READINESS_SERVICE_NAME = AGENT_READINESS_SERVICE_NAME;
|
|
93394
93411
|
exports.ALL_CAPABILITY_DEFINITIONS = require_dist.ALL_CAPABILITY_DEFINITIONS;
|
|
93395
93412
|
exports.AddonApiFactory = AddonApiFactory;
|
|
93396
93413
|
exports.AddonDepsManager = require_manifest_python_deps.AddonDepsManager;
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as isArrayOutputSchema, Ct as parseJsonObject, D as extractNestedAddonId, Dt as scopeKey, Et as resolveCapMount, F as lifecycleJobSchema, G as procedureAuthKey, H as objectInputDeclaresAddonId, M as isObjectInput, N as isVoidInput, P as kebabToCamel, R as looseSchema, Tt as readinessKey, _t as createEvent, at as DATAPLANE_SECRET_HEADER$1, bt as expandCapMethods, dt as ReadinessRegistry, ft as ReadinessTimeoutError, gt as asString$1, ht as asNumber, j as isCollectionArrayMethod, kt as EventCategory$1, mt as asJsonObject$1, o as METHOD_ACCESS_MAP, ot as DEVICE_SETTINGS_CONTRIBUTION_METHODS, p as addonSettingsCapability, rt as errMsg$1, s as RUNTIME_DEFAULTS, st as DEVICE_STATUS_METHOD, t as ALL_CAPABILITY_DEFINITIONS, vt as emitDownForOwnedCaps, wt as parseJsonUnknown$1 } from "./dist-
|
|
1
|
+
import { A as isArrayOutputSchema, Ct as parseJsonObject, D as extractNestedAddonId, Dt as scopeKey, Et as resolveCapMount, F as lifecycleJobSchema, G as procedureAuthKey, H as objectInputDeclaresAddonId, M as isObjectInput, N as isVoidInput, P as kebabToCamel, R as looseSchema, Tt as readinessKey, _t as createEvent, at as DATAPLANE_SECRET_HEADER$1, bt as expandCapMethods, dt as ReadinessRegistry, ft as ReadinessTimeoutError, gt as asString$1, ht as asNumber, j as isCollectionArrayMethod, kt as EventCategory$1, mt as asJsonObject$1, o as METHOD_ACCESS_MAP, ot as DEVICE_SETTINGS_CONTRIBUTION_METHODS, p as addonSettingsCapability, rt as errMsg$1, s as RUNTIME_DEFAULTS, st as DEVICE_STATUS_METHOD, t as ALL_CAPABILITY_DEFINITIONS, vt as emitDownForOwnedCaps, wt as parseJsonUnknown$1 } from "./dist-D7_69kDt.mjs";
|
|
2
2
|
import { a as downloadModel, c as getModelFilePath, d as contentTypeFor, f as createAuthenticatedFileServer, h as resolveFilePath, i as downloadFile, l as isModelDownloaded, m as parseTokenizedUrl, n as collectModelFiles, o as ensureModel, p as parseRangeHeader, r as deleteModelFromDisk, s as fetchJson, t as ModelDownloadService, u as createFileDataPlaneHandler } from "./model-download-service-Cp9f4dk6.mjs";
|
|
3
|
-
import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, bt as resolveAddonClass, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, xt as createAddonDataPlaneFacility, y as __resetCapUsageRegistryForTests, yt as runNpm, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-
|
|
3
|
+
import { $ as buildUdsNativeCapProxy, A as createParentUnownedCallHandler, B as AGENT_CAP_FWD_SERVICE, C as buildLinkChain, D as HUB_CAP_FWD_ACTION, E as localProviderLink, F as createUdsLoggerWithControl, G as createLocalTransport, H as CapRouteError, I as LocalChildClient, J as SocketChannel, K as UdsLocalTransportClient, L as LocalChildRegistry, M as createUdsEventBus, N as udsChildLogToWorkerEntry, O as HUB_CAP_FWD_SERVICE, P as createUdsLogger, Q as buildNativeCapProxy, R as UDS_NO_ROUTE_PREFIX, S as brokerTransportLink, T as ipcParentLink, U as classifyCapRoute, V as CapRouteResolver, W as callWithServiceDiscovery, X as FrameDecoder, Y as localEndpointPath, Z as encodeFrame, _ as resolveHwAccel, _t as CapabilityUnavailableError, a as getWorkerDeviceRegistry, at as createAddonService, b as getCapUsageRegistry, bt as resolveAddonClass, c as setHubConnected, ct as capActionName, d as getMoleculerEventStats, dt as capServiceName, et as createBrokerDeviceManagerApi, f as registerEventBusService, ft as parseCapAction, g as createKernelHwAccel, gt as CapabilityHandle, h as AddonDepsManager, ht as DeviceRegistry, i as createUdsAddonContext, j as createUdsEventBridge, k as createHubCapForwardService, l as EVENT_TOPIC_PREFIX, lt as capActionSuffix, m as subscribePassthrough, mt as serializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as validateProviderRegistrations, p as setNodeEventInterest, pt as deserializeTypedArrays, q as UdsLocalTransportServer, r as createAddonContext, rt as mountNativeCapService, s as getOrInitReadinessRegistryForClient, st as NATIVE_PROVIDER_SERVICE_INFIX, t as installManifestPythonDeps, u as getBrokerEventBus, ut as capBareAction, v as CapUsageRegistry, vt as installManifestNativeDeps, w as ipcChildLink, x as brokerCallForCap, xt as createAddonDataPlaneFacility, y as __resetCapUsageRegistryForTests, yt as runNpm, z as AGENT_CAP_FWD_ACTION } from "./manifest-python-deps-EM2H-jjS.mjs";
|
|
4
4
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Le3l0qS2.mjs";
|
|
5
5
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
6
6
|
import { SqliteSettingsAddon, t as SqliteSettingsBackend } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
@@ -92039,16 +92039,32 @@ async function callRegisterNodeWithRetry(broker, params, opts) {
|
|
|
92039
92039
|
}
|
|
92040
92040
|
//#endregion
|
|
92041
92041
|
//#region src/kernel/moleculer/readiness-service.ts
|
|
92042
|
+
/**
|
|
92043
|
+
* Service name AGENTS register their own readiness snapshot under.
|
|
92044
|
+
*
|
|
92045
|
+
* Deliberately NOT `$readiness`: agents call `$readiness.getSnapshot`
|
|
92046
|
+
* UNQUALIFIED to reach the hub's authoritative registry, and Moleculer
|
|
92047
|
+
* prefers a local service for an unqualified call — an agent registering
|
|
92048
|
+
* `$readiness` would shadow the hub and hydrate from itself. The hub
|
|
92049
|
+
* pulls `$agent-readiness.getSnapshot` with an explicit `{ nodeID }` on
|
|
92050
|
+
* every agent (re)connect + periodically, closing the reverse leg of the
|
|
92051
|
+
* D8 snapshot-reconcile (the hub otherwise learns agent readiness only
|
|
92052
|
+
* from lossy cross-node event broadcasts).
|
|
92053
|
+
*/
|
|
92054
|
+
var AGENT_READINESS_SERVICE_NAME = "$agent-readiness";
|
|
92042
92055
|
function createReadinessService(deps) {
|
|
92043
92056
|
return {
|
|
92044
|
-
name: "$readiness",
|
|
92057
|
+
name: deps.name ?? "$readiness",
|
|
92045
92058
|
actions: { getSnapshot: { handler() {
|
|
92046
92059
|
return deps.getSnapshot();
|
|
92047
92060
|
} } }
|
|
92048
92061
|
};
|
|
92049
92062
|
}
|
|
92050
|
-
function createReadinessServiceForRegistry(registry) {
|
|
92051
|
-
return createReadinessService({
|
|
92063
|
+
function createReadinessServiceForRegistry(registry, name) {
|
|
92064
|
+
return createReadinessService({
|
|
92065
|
+
getSnapshot: () => registry.getSnapshotForTransport(),
|
|
92066
|
+
...name !== void 0 ? { name } : {}
|
|
92067
|
+
});
|
|
92052
92068
|
}
|
|
92053
92069
|
//#endregion
|
|
92054
92070
|
//#region src/kernel/moleculer/stream-probe-service.ts
|
|
@@ -93381,4 +93397,4 @@ async function stageFrameworkLockstep(input) {
|
|
|
93381
93397
|
return results;
|
|
93382
93398
|
}
|
|
93383
93399
|
//#endregion
|
|
93384
|
-
export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, ALL_CAPABILITY_DEFINITIONS, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FRAMEWORK_LOCKSTEP, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LifecycleJobEngine, LifecycleStateMachine, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, RESTART_MARKER_FILE, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyCapRoute, clearPendingRestart, clusterSecretMatches, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createKernelHwAccel, createLocalTransport, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensurePython, ensureTlsCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, proxyToUpstream, readPendingRestart, readinessKey, registerEventBusService, resolveFilePath, resolveHwAccel, scheduleSelfRestart, scopeKey, scopesAllowDeviceCap, serializeTypedArrays, setHubConnected, setNodeEventInterest, stageFrameworkLockstep, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, writePendingRestart };
|
|
93400
|
+
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, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FRAMEWORK_LOCKSTEP, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LifecycleJobEngine, LifecycleStateMachine, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, RESTART_MARKER_FILE, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyCapRoute, clearPendingRestart, clusterSecretMatches, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createKernelHwAccel, createLocalTransport, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensurePython, ensureTlsCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, proxyToUpstream, readPendingRestart, readinessKey, registerEventBusService, resolveFilePath, resolveHwAccel, scheduleSelfRestart, scopeKey, scopesAllowDeviceCap, serializeTypedArrays, setHubConnected, setNodeEventInterest, stageFrameworkLockstep, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, writePendingRestart };
|
package/dist/kernel/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export { callRegisterNodeWithRetry, buildNodeManifest } from './moleculer/regist
|
|
|
44
44
|
export type { RegisterNodeBroker, CallRegisterNodeOptions, } from './moleculer/register-node-client.js';
|
|
45
45
|
export { hashClusterSecret, clusterSecretMatches, isClusterSecretMismatchError, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, } from './moleculer/cluster-secret.js';
|
|
46
46
|
export { serializeTypedArrays } from './moleculer/typed-array-serde.js';
|
|
47
|
-
export { createReadinessService, createReadinessServiceForRegistry, } from './moleculer/readiness-service.js';
|
|
47
|
+
export { createReadinessService, createReadinessServiceForRegistry, AGENT_READINESS_SERVICE_NAME, } from './moleculer/readiness-service.js';
|
|
48
48
|
export type { ReadinessServiceDeps } from './moleculer/readiness-service.js';
|
|
49
49
|
export { getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, } from './moleculer/readiness-context.js';
|
|
50
50
|
export type { UdsReadinessClient } from './moleculer/readiness-context.js';
|
|
@@ -45,14 +45,18 @@ declare function getOrInitReadinessRegistry(broker: ServiceBroker, eventBus: IEv
|
|
|
45
45
|
* (Phase C) — the registry ingests them through its own event-bus
|
|
46
46
|
* subscription, exactly as in broker mode.
|
|
47
47
|
*
|
|
48
|
-
* **
|
|
49
|
-
* The
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* the
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
48
|
+
* **Periodic reconcile (D8):**
|
|
49
|
+
* The original design assumed the parent reliably forwards every
|
|
50
|
+
* `system.ready-state` delta over UDS, so no reconcile signal beyond
|
|
51
|
+
* the (re)connect hydrate was added. The 2026-07-17 incident disproved
|
|
52
|
+
* the assumption end-to-end: a delta can be lost across the full
|
|
53
|
+
* producer→parent→child path (restart churn, subscription races), and
|
|
54
|
+
* a child that saw `starting` then never got `ready` wedged forever.
|
|
55
|
+
* The registry therefore ALSO re-pulls the parent snapshot every
|
|
56
|
+
* `READINESS_RECONCILE_INTERVAL_MS` while connected — combined with
|
|
57
|
+
* `hydrate`'s advance semantics, a lost delta costs one reconcile
|
|
58
|
+
* round, never forever. No new parent-to-child protocol message is
|
|
59
|
+
* needed (the existing snapshot request is reused).
|
|
56
60
|
*
|
|
57
61
|
* **`awaitReady`/`acquireCapability`/`onReadyState` semantics unchanged.**
|
|
58
62
|
*
|
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { ServiceSchema } from 'moleculer';
|
|
2
2
|
import { IReadinessRegistry, IReadinessRegistryRecord } from '@camstack/types';
|
|
3
|
+
/**
|
|
4
|
+
* Service name AGENTS register their own readiness snapshot under.
|
|
5
|
+
*
|
|
6
|
+
* Deliberately NOT `$readiness`: agents call `$readiness.getSnapshot`
|
|
7
|
+
* UNQUALIFIED to reach the hub's authoritative registry, and Moleculer
|
|
8
|
+
* prefers a local service for an unqualified call — an agent registering
|
|
9
|
+
* `$readiness` would shadow the hub and hydrate from itself. The hub
|
|
10
|
+
* pulls `$agent-readiness.getSnapshot` with an explicit `{ nodeID }` on
|
|
11
|
+
* every agent (re)connect + periodically, closing the reverse leg of the
|
|
12
|
+
* D8 snapshot-reconcile (the hub otherwise learns agent readiness only
|
|
13
|
+
* from lossy cross-node event broadcasts).
|
|
14
|
+
*/
|
|
15
|
+
export declare const AGENT_READINESS_SERVICE_NAME = "$agent-readiness";
|
|
3
16
|
export interface ReadinessServiceDeps {
|
|
4
17
|
readonly getSnapshot: () => readonly IReadinessRegistryRecord[];
|
|
18
|
+
/** Service name override — default `$readiness` (the hub-authoritative instance). */
|
|
19
|
+
readonly name?: string;
|
|
5
20
|
}
|
|
6
21
|
export declare function createReadinessService(deps: ReadinessServiceDeps): ServiceSchema;
|
|
7
|
-
export declare function createReadinessServiceForRegistry(registry: IReadinessRegistry): ServiceSchema;
|
|
22
|
+
export declare function createReadinessServiceForRegistry(registry: IReadinessRegistry, name?: string): ServiceSchema;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-BNro5CRu.js");
|
|
3
3
|
let _camstack_types_node = require("@camstack/types/node");
|
|
4
4
|
let node_http = require("node:http");
|
|
5
5
|
let node_fs = require("node:fs");
|
|
@@ -6621,6 +6621,20 @@ var brokerReadinessRegistries = /* @__PURE__ */ new WeakMap();
|
|
|
6621
6621
|
*/
|
|
6622
6622
|
var clientReadinessRegistries = /* @__PURE__ */ new Map();
|
|
6623
6623
|
/**
|
|
6624
|
+
* Fixed-period authoritative snapshot re-pull (D8 reconcile). Readiness
|
|
6625
|
+
* deltas are telemetry — lossy across the UDS/Moleculer hops — and the
|
|
6626
|
+
* on-(re)connect hydrate alone cannot repair a delta lost while
|
|
6627
|
+
* CONNECTED (2026-07-17: the agent's platform-probe `ready` never
|
|
6628
|
+
* reached the detection runner child; the child held `starting` forever
|
|
6629
|
+
* and every waiter wedged). With `ReadinessRegistry.hydrate` able to
|
|
6630
|
+
* ADVANCE stale records, this periodic re-pull bounds the damage of any
|
|
6631
|
+
* lost delta to one reconcile round. Not a retry backoff — a
|
|
6632
|
+
* steady-state reconcile against the authority. `unref()`d so the timer
|
|
6633
|
+
* never keeps a process alive; registries are process-lifetime, so the
|
|
6634
|
+
* interval is never cleared.
|
|
6635
|
+
*/
|
|
6636
|
+
var READINESS_RECONCILE_INTERVAL_MS = 6e4;
|
|
6637
|
+
/**
|
|
6624
6638
|
* Return the shared ReadinessRegistry for this broker — one per
|
|
6625
6639
|
* process is enough. Every addon context on the same broker gets the
|
|
6626
6640
|
* same instance via `ctx.kernel.readinessRegistry`.
|
|
@@ -6671,6 +6685,10 @@ function getOrInitReadinessRegistry(broker, eventBus, logger) {
|
|
|
6671
6685
|
}, 200);
|
|
6672
6686
|
};
|
|
6673
6687
|
bkr.localBus.on("$services.changed", scheduleRehydrate);
|
|
6688
|
+
const reconcileTimer = setInterval(() => {
|
|
6689
|
+
hydrateFromHub();
|
|
6690
|
+
}, READINESS_RECONCILE_INTERVAL_MS);
|
|
6691
|
+
if (typeof reconcileTimer.unref === "function") reconcileTimer.unref();
|
|
6674
6692
|
}
|
|
6675
6693
|
return registry;
|
|
6676
6694
|
}
|
|
@@ -6689,14 +6707,18 @@ function getOrInitReadinessRegistry(broker, eventBus, logger) {
|
|
|
6689
6707
|
* (Phase C) — the registry ingests them through its own event-bus
|
|
6690
6708
|
* subscription, exactly as in broker mode.
|
|
6691
6709
|
*
|
|
6692
|
-
* **
|
|
6693
|
-
* The
|
|
6694
|
-
*
|
|
6695
|
-
*
|
|
6696
|
-
* the
|
|
6697
|
-
*
|
|
6698
|
-
*
|
|
6699
|
-
*
|
|
6710
|
+
* **Periodic reconcile (D8):**
|
|
6711
|
+
* The original design assumed the parent reliably forwards every
|
|
6712
|
+
* `system.ready-state` delta over UDS, so no reconcile signal beyond
|
|
6713
|
+
* the (re)connect hydrate was added. The 2026-07-17 incident disproved
|
|
6714
|
+
* the assumption end-to-end: a delta can be lost across the full
|
|
6715
|
+
* producer→parent→child path (restart churn, subscription races), and
|
|
6716
|
+
* a child that saw `starting` then never got `ready` wedged forever.
|
|
6717
|
+
* The registry therefore ALSO re-pulls the parent snapshot every
|
|
6718
|
+
* `READINESS_RECONCILE_INTERVAL_MS` while connected — combined with
|
|
6719
|
+
* `hydrate`'s advance semantics, a lost delta costs one reconcile
|
|
6720
|
+
* round, never forever. No new parent-to-child protocol message is
|
|
6721
|
+
* needed (the existing snapshot request is reused).
|
|
6700
6722
|
*
|
|
6701
6723
|
* **`awaitReady`/`acquireCapability`/`onReadyState` semantics unchanged.**
|
|
6702
6724
|
*
|
|
@@ -6727,6 +6749,10 @@ function getOrInitReadinessRegistryForClient(client, eventBus, logger, nodeId) {
|
|
|
6727
6749
|
hydrateFromParent();
|
|
6728
6750
|
});
|
|
6729
6751
|
if (client.isConnected) hydrateFromParent();
|
|
6752
|
+
const reconcileTimer = setInterval(() => {
|
|
6753
|
+
if (client.isConnected) hydrateFromParent();
|
|
6754
|
+
}, READINESS_RECONCILE_INTERVAL_MS);
|
|
6755
|
+
if (typeof reconcileTimer.unref === "function") reconcileTimer.unref();
|
|
6730
6756
|
return registry;
|
|
6731
6757
|
}
|
|
6732
6758
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as readNodePin } from "./dist-
|
|
1
|
+
import { K as readNodePin } from "./dist-D7_69kDt.mjs";
|
|
2
2
|
import { ensureBinary, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -6619,6 +6619,20 @@ var brokerReadinessRegistries = /* @__PURE__ */ new WeakMap();
|
|
|
6619
6619
|
*/
|
|
6620
6620
|
var clientReadinessRegistries = /* @__PURE__ */ new Map();
|
|
6621
6621
|
/**
|
|
6622
|
+
* Fixed-period authoritative snapshot re-pull (D8 reconcile). Readiness
|
|
6623
|
+
* deltas are telemetry — lossy across the UDS/Moleculer hops — and the
|
|
6624
|
+
* on-(re)connect hydrate alone cannot repair a delta lost while
|
|
6625
|
+
* CONNECTED (2026-07-17: the agent's platform-probe `ready` never
|
|
6626
|
+
* reached the detection runner child; the child held `starting` forever
|
|
6627
|
+
* and every waiter wedged). With `ReadinessRegistry.hydrate` able to
|
|
6628
|
+
* ADVANCE stale records, this periodic re-pull bounds the damage of any
|
|
6629
|
+
* lost delta to one reconcile round. Not a retry backoff — a
|
|
6630
|
+
* steady-state reconcile against the authority. `unref()`d so the timer
|
|
6631
|
+
* never keeps a process alive; registries are process-lifetime, so the
|
|
6632
|
+
* interval is never cleared.
|
|
6633
|
+
*/
|
|
6634
|
+
var READINESS_RECONCILE_INTERVAL_MS = 6e4;
|
|
6635
|
+
/**
|
|
6622
6636
|
* Return the shared ReadinessRegistry for this broker — one per
|
|
6623
6637
|
* process is enough. Every addon context on the same broker gets the
|
|
6624
6638
|
* same instance via `ctx.kernel.readinessRegistry`.
|
|
@@ -6669,6 +6683,10 @@ function getOrInitReadinessRegistry(broker, eventBus, logger) {
|
|
|
6669
6683
|
}, 200);
|
|
6670
6684
|
};
|
|
6671
6685
|
bkr.localBus.on("$services.changed", scheduleRehydrate);
|
|
6686
|
+
const reconcileTimer = setInterval(() => {
|
|
6687
|
+
hydrateFromHub();
|
|
6688
|
+
}, READINESS_RECONCILE_INTERVAL_MS);
|
|
6689
|
+
if (typeof reconcileTimer.unref === "function") reconcileTimer.unref();
|
|
6672
6690
|
}
|
|
6673
6691
|
return registry;
|
|
6674
6692
|
}
|
|
@@ -6687,14 +6705,18 @@ function getOrInitReadinessRegistry(broker, eventBus, logger) {
|
|
|
6687
6705
|
* (Phase C) — the registry ingests them through its own event-bus
|
|
6688
6706
|
* subscription, exactly as in broker mode.
|
|
6689
6707
|
*
|
|
6690
|
-
* **
|
|
6691
|
-
* The
|
|
6692
|
-
*
|
|
6693
|
-
*
|
|
6694
|
-
* the
|
|
6695
|
-
*
|
|
6696
|
-
*
|
|
6697
|
-
*
|
|
6708
|
+
* **Periodic reconcile (D8):**
|
|
6709
|
+
* The original design assumed the parent reliably forwards every
|
|
6710
|
+
* `system.ready-state` delta over UDS, so no reconcile signal beyond
|
|
6711
|
+
* the (re)connect hydrate was added. The 2026-07-17 incident disproved
|
|
6712
|
+
* the assumption end-to-end: a delta can be lost across the full
|
|
6713
|
+
* producer→parent→child path (restart churn, subscription races), and
|
|
6714
|
+
* a child that saw `starting` then never got `ready` wedged forever.
|
|
6715
|
+
* The registry therefore ALSO re-pulls the parent snapshot every
|
|
6716
|
+
* `READINESS_RECONCILE_INTERVAL_MS` while connected — combined with
|
|
6717
|
+
* `hydrate`'s advance semantics, a lost delta costs one reconcile
|
|
6718
|
+
* round, never forever. No new parent-to-child protocol message is
|
|
6719
|
+
* needed (the existing snapshot request is reused).
|
|
6698
6720
|
*
|
|
6699
6721
|
* **`awaitReady`/`acquireCapability`/`onReadyState` semantics unchanged.**
|
|
6700
6722
|
*
|
|
@@ -6725,6 +6747,10 @@ function getOrInitReadinessRegistryForClient(client, eventBus, logger, nodeId) {
|
|
|
6725
6747
|
hydrateFromParent();
|
|
6726
6748
|
});
|
|
6727
6749
|
if (client.isConnected) hydrateFromParent();
|
|
6750
|
+
const reconcileTimer = setInterval(() => {
|
|
6751
|
+
if (client.isConnected) hydrateFromParent();
|
|
6752
|
+
}, READINESS_RECONCILE_INTERVAL_MS);
|
|
6753
|
+
if (typeof reconcileTimer.unref === "function") reconcileTimer.unref();
|
|
6728
6754
|
return registry;
|
|
6729
6755
|
}
|
|
6730
6756
|
//#endregion
|