@camstack/system 1.1.51 → 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.
Files changed (61) hide show
  1. package/dist/addon-runner.js +2 -2
  2. package/dist/addon-runner.mjs +2 -2
  3. package/dist/addon-utils.js +1 -1
  4. package/dist/addon-utils.mjs +1 -1
  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/device-manager/device-linked-devices.d.ts +47 -0
  16. package/dist/builtins/device-manager/device-manager.addon.js +2821 -2683
  17. package/dist/builtins/device-manager/device-manager.addon.mjs +2821 -2683
  18. package/dist/builtins/doorbell/index.d.ts +2 -0
  19. package/dist/builtins/doorbell/index.js +8 -0
  20. package/dist/builtins/doorbell/index.mjs +2 -0
  21. package/dist/builtins/doorbell/trigger-engine.d.ts +69 -0
  22. package/dist/builtins/doorbell/virtual-doorbell.addon.d.ts +87 -0
  23. package/dist/builtins/doorbell/virtual-doorbell.addon.js +489 -0
  24. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +483 -0
  25. package/dist/builtins/hub-forwarder/index.js +1 -1
  26. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  27. package/dist/builtins/local-auth/local-auth.addon.js +2 -2
  28. package/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  29. package/dist/builtins/local-network/local-network.addon.js +1 -1
  30. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  31. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  32. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  33. package/dist/builtins/platform-probe/index.js +1 -1
  34. package/dist/builtins/platform-probe/index.mjs +1 -1
  35. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  36. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  37. package/dist/builtins/snapshot/index.js +1 -1
  38. package/dist/builtins/snapshot/index.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  40. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  41. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +11 -3
  42. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +11 -3
  43. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  44. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  45. package/dist/builtins/system-config/system-config.addon.js +4 -4
  46. package/dist/builtins/system-config/system-config.addon.mjs +4 -4
  47. package/dist/builtins/winston-logging/index.js +1 -1
  48. package/dist/builtins/winston-logging/index.mjs +1 -1
  49. package/dist/{dist-C3uHEBtP.js → dist-BNro5CRu.js} +325 -27
  50. package/dist/{dist-BWQX9yUj.mjs → dist-D7_69kDt.mjs} +320 -28
  51. package/dist/http/file-data-plane.d.ts +8 -0
  52. package/dist/index.js +23 -6
  53. package/dist/index.mjs +23 -7
  54. package/dist/kernel/index.d.ts +1 -1
  55. package/dist/kernel/moleculer/readiness-context.d.ts +12 -8
  56. package/dist/kernel/moleculer/readiness-service.d.ts +16 -1
  57. package/dist/{manifest-python-deps-CVcJ9hDX.js → manifest-python-deps-DszE7bYn.js} +35 -9
  58. package/dist/{manifest-python-deps-BA6KA9If.mjs → manifest-python-deps-EM2H-jjS.mjs} +35 -9
  59. package/dist/{model-download-service-C-IHWnXx.mjs → model-download-service-Cp9f4dk6.mjs} +1 -1
  60. package/dist/{model-download-service-D-Umz4-L.js → model-download-service-hf0ookyy.js} +1 -1
  61. package/package.json +13 -1
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { A as isCollectionArrayMethod, Ct as parseJsonUnknown$1, E as extractNestedAddonId, Et as scopeKey, L as looseSchema, M as isVoidInput, N as kebabToCamel, Ot as EventCategory$1, P as lifecycleJobSchema, St as parseJsonObject, Tt as resolveCapMount, V as objectInputDeclaresAddonId, W as procedureAuthKey, _t as emitDownForOwnedCaps, at as DEVICE_SETTINGS_CONTRIBUTION_METHODS, dt as ReadinessTimeoutError, gt as createEvent, ht as asString$1, it as DATAPLANE_SECRET_HEADER$1, j as isObjectInput, k as isArrayOutputSchema, mt as asNumber, nt as errMsg$1, o as METHOD_ACCESS_MAP, ot as DEVICE_STATUS_METHOD, p as addonSettingsCapability, pt as asJsonObject$1, s as RUNTIME_DEFAULTS, t as ALL_CAPABILITY_DEFINITIONS, ut as ReadinessRegistry, wt as readinessKey, yt as expandCapMethods } from "./dist-BWQX9yUj.mjs";
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-C-IHWnXx.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-BA6KA9If.mjs";
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
+ 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-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({ getSnapshot: () => registry.getSnapshotForTransport() });
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 };
@@ -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
- * **No `$services.changed` reconcile signal needed:**
49
- * The broker-mode `$services.changed` reconcile existed because Moleculer
50
- * broadcasts can be dropped during the boot window. Over UDS the parent
51
- * reliably forwards every `system.ready-state` delta to each child (via
52
- * the event bridge wired in Phase C). Dropped deltas are not a concern;
53
- * the initial snapshot + live event bus is sufficient. A new
54
- * parent-to-child "topology changed, re-pull" signal is therefore NOT
55
- * added it would be redundant and would complicate the protocol.
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-C3uHEBtP.js");
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
- * **No `$services.changed` reconcile signal needed:**
6693
- * The broker-mode `$services.changed` reconcile existed because Moleculer
6694
- * broadcasts can be dropped during the boot window. Over UDS the parent
6695
- * reliably forwards every `system.ready-state` delta to each child (via
6696
- * the event bridge wired in Phase C). Dropped deltas are not a concern;
6697
- * the initial snapshot + live event bus is sufficient. A new
6698
- * parent-to-child "topology changed, re-pull" signal is therefore NOT
6699
- * added it would be redundant and would complicate the protocol.
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 { G as readNodePin } from "./dist-BWQX9yUj.mjs";
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
- * **No `$services.changed` reconcile signal needed:**
6691
- * The broker-mode `$services.changed` reconcile existed because Moleculer
6692
- * broadcasts can be dropped during the boot window. Over UDS the parent
6693
- * reliably forwards every `system.ready-state` delta to each child (via
6694
- * the event bridge wired in Phase C). Dropped deltas are not a concern;
6695
- * the initial snapshot + live event bus is sufficient. A new
6696
- * parent-to-child "topology changed, re-pull" signal is therefore NOT
6697
- * added it would be redundant and would complicate the protocol.
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
@@ -268,7 +268,7 @@ function createFileDataPlaneHandler(opts) {
268
268
  const baseHeaders = {
269
269
  "content-type": contentTypeFor(absPath, opts.contentTypes),
270
270
  "accept-ranges": "bytes",
271
- "cache-control": "no-cache"
271
+ "cache-control": opts.cacheControl?.(rel) ?? "no-cache"
272
272
  };
273
273
  const range = parseRangeHeader(req.headers.range, size);
274
274
  if (range) {
@@ -269,7 +269,7 @@ function createFileDataPlaneHandler(opts) {
269
269
  const baseHeaders = {
270
270
  "content-type": contentTypeFor(absPath, opts.contentTypes),
271
271
  "accept-ranges": "bytes",
272
- "cache-control": "no-cache"
272
+ "cache-control": opts.cacheControl?.(rel) ?? "no-cache"
273
273
  };
274
274
  const range = parseRangeHeader(req.headers.range, size);
275
275
  if (range) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.1.51",
3
+ "version": "1.1.53",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",
@@ -152,6 +152,18 @@
152
152
  }
153
153
  ]
154
154
  },
155
+ {
156
+ "id": "virtual-doorbell",
157
+ "category": "system",
158
+ "name": "Virtual Doorbell",
159
+ "description": "Wrapper over the `doorbell` cap — turns any binary-ish device (contact sensor, switch, event emitter, flood/gas/CO sensor) into a per-camera doorbell. Operator binds it per camera and picks the source device + trigger in the camera's settings.",
160
+ "entry": "./dist/builtins/doorbell/index.js",
161
+ "capabilities": [
162
+ {
163
+ "name": "doorbell"
164
+ }
165
+ ]
166
+ },
155
167
  {
156
168
  "id": "alert-center",
157
169
  "category": "system",