@camstack/system 1.2.70 → 1.2.72

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 (59) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  3. package/dist/auth/auth-manager.d.ts +13 -29
  4. package/dist/auth/scope-matcher.d.ts +6 -5
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/console-logging/index.js +1 -1
  14. package/dist/builtins/console-logging/index.mjs +1 -1
  15. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  17. package/dist/builtins/device-manager/device-manager.addon.js +1 -1
  18. package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  19. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  20. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  21. package/dist/builtins/hub-forwarder/index.js +1 -1
  22. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  23. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  24. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  25. package/dist/builtins/local-auth/local-auth.addon.js +4756 -4717
  26. package/dist/builtins/local-auth/local-auth.addon.mjs +4747 -4708
  27. package/dist/builtins/local-auth/oauth-grants.d.ts +15 -0
  28. package/dist/builtins/local-network/local-network.addon.js +1 -1
  29. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  30. package/dist/builtins/loki-logging/index.js +1 -1
  31. package/dist/builtins/loki-logging/index.mjs +1 -1
  32. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  33. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  34. package/dist/builtins/platform-probe/index.js +1 -1
  35. package/dist/builtins/platform-probe/index.mjs +1 -1
  36. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  37. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  38. package/dist/builtins/snapshot/index.js +1 -1
  39. package/dist/builtins/snapshot/index.mjs +1 -1
  40. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  41. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  42. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
  43. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
  44. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  45. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  46. package/dist/builtins/system-config/system-config.addon.js +1 -1
  47. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  48. package/dist/builtins/winston-logging/index.js +1 -1
  49. package/dist/builtins/winston-logging/index.mjs +1 -1
  50. package/dist/{dist-CnQXXnK1.mjs → dist-Daxx9CB0.mjs} +92 -17
  51. package/dist/{dist-DCLoJf2T.js → dist-I0WgqQQ-.js} +103 -16
  52. package/dist/index.d.ts +1 -1
  53. package/dist/index.js +4 -13
  54. package/dist/index.mjs +3 -13
  55. package/dist/kernel/transport/local-child-registry.d.ts +22 -0
  56. package/dist/kernel/transport/parent-unowned-call.d.ts +27 -0
  57. package/dist/{manifest-python-deps-DKrHcUZj.mjs → manifest-python-deps-C1DMs1J9.mjs} +7 -1
  58. package/dist/{manifest-python-deps-DafB-1hp.js → manifest-python-deps-DG_LLcZF.js} +7 -1
  59. 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 { B as isCollectionArrayMethod, Ct as asNumber, Et as emitDownForOwnedCaps, Ft as resolveCapMount, G as lifecycleJobSchema, It as scopeKey, J as logLevelAtMost, L as extractNestedAddonId, Mt as parseJsonObject, Nt as parseJsonUnknown$1, Ot as expandCapMethods, Pt as readinessKey, Q as objectInputDeclaresAddonId, Rt as EventCategory$1, St as asJsonObject$1, Tt as createEvent, U as isVoidInput, V as isObjectInput, W as kebabToCamel, Y as looseSchema, bt as ReadinessTimeoutError, d as METHOD_ACCESS_MAP, dt as errMsg$1, f as RUNTIME_DEFAULTS, ht as DEVICE_STATUS_METHOD, mt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, pt as DATAPLANE_SECRET_HEADER$1, t as ALL_CAPABILITY_DEFINITIONS, tt as procedureAuthKey, v as addonSettingsCapability, wt as asString$1, yt as ReadinessRegistry, z as isArrayOutputSchema } from "./dist-CnQXXnK1.mjs";
2
+ import { At as expandCapMethods, B as isCollectionArrayMethod, Bt as EventCategory$1, Dt as createEvent, Et as asString$1, Ft as parseJsonUnknown$1, G as lifecycleJobSchema, It as readinessKey, J as logLevelAtMost, L as extractNestedAddonId, Lt as resolveCapMount, Ot as emitDownForOwnedCaps, Pt as parseJsonObject, Q as objectInputDeclaresAddonId, Rt as scopeKey, St as ReadinessTimeoutError, Tt as asNumber, U as isVoidInput, V as isObjectInput, W as kebabToCamel, Y as looseSchema, _t as DEVICE_STATUS_METHOD, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, gt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, ht as DATAPLANE_SECRET_HEADER$1, nt as scopesAllowAddon, pt as errMsg$1, rt as scopesAllowDeviceCap, t as ALL_CAPABILITY_DEFINITIONS, tt as procedureAuthKey, v as addonSettingsCapability, wt as asJsonObject$1, xt as ReadinessRegistry, z as isArrayOutputSchema } from "./dist-Daxx9CB0.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
@@ -24,7 +24,7 @@ import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.
24
24
  import "./builtins/system-config/index.mjs";
25
25
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
26
26
  import { a as parseTokenizedUrl, c as collectModelFiles, d as downloadModel, f as ensureModel, h as isModelDownloaded, i as parseRangeHeader, l as deleteModelFromDisk, m as getModelFilePath, n as contentTypeFor, o as resolveFilePath, p as fetchJson, r as createAuthenticatedFileServer, s as ModelDownloadService, t as createFileDataPlaneHandler, u as downloadFile } from "./file-data-plane-CuE_hBli.mjs";
27
- import { $ as buildNativeCapProxy, A as createHubCapForwardService, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as runNpm, D as localProviderLink, E as ipcParentLink, F as createUdsLogger, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, N as createUdsEventBus, O as HUB_CAP_FWD_ACTION, P as udsChildLogToWorkerEntry, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as resolveNpmInvocation, T as ipcChildLink, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, k as HUB_CAP_FWD_SERVICE, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveAddonClass, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-DKrHcUZj.mjs";
27
+ import { $ as buildNativeCapProxy, A as createHubCapForwardService, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as runNpm, D as localProviderLink, E as ipcParentLink, F as createUdsLogger, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, N as createUdsEventBus, O as HUB_CAP_FWD_ACTION, P as udsChildLogToWorkerEntry, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as resolveNpmInvocation, T as ipcChildLink, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, k as HUB_CAP_FWD_SERVICE, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveAddonClass, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-C1DMs1J9.mjs";
28
28
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
29
29
  import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
30
30
  import { z } from "zod";
@@ -175,16 +175,6 @@ function matchPath(pattern, path) {
175
175
  return params;
176
176
  }
177
177
  //#endregion
178
- //#region src/auth/scope-matcher.ts
179
- /**
180
- * True if the scope set grants `access` on device-scoped capabilities.
181
- * A `category:device` grant covers every device cap (the broad grant).
182
- * Mirrors the OR-semantics of the existing token scope matcher.
183
- */
184
- function scopesAllowDeviceCap(scopes, access) {
185
- return scopes.some((s) => s.type === "category" && s.target === "device" && s.access.includes(access));
186
- }
187
- //#endregion
188
178
  //#region src/events/event-bus.ts
189
179
  var EventBus = class {
190
180
  listeners = /* @__PURE__ */ new Map();
@@ -94938,4 +94928,4 @@ var LifecycleJobEngine = class {
94938
94928
  }
94939
94929
  };
94940
94930
  //#endregion
94941
- 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, CoreBlocksAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LokiDestination, LokiLoggingAddon, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, clusterEventTopic, 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, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, proxyToUpstream, quarantineAddonResidue, readPendingRestart, readinessKey, registerEventBusService, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runNpm, scheduleSelfRestart, scopeKey, scopesAllowDeviceCap, selectAddonResidue, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, writePendingRestart };
94931
+ 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, CoreBlocksAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LokiDestination, LokiLoggingAddon, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, clusterEventTopic, 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, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, proxyToUpstream, quarantineAddonResidue, readPendingRestart, readinessKey, registerEventBusService, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runNpm, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, writePendingRestart };
@@ -95,6 +95,27 @@ export interface LocalChildRegistryOptions {
95
95
  * everything). The kernel has no cap registry, so the wiring side injects it.
96
96
  */
97
97
  readonly isAggregatedCollectionMethod?: (capName: string, method: string) => boolean;
98
+ /**
99
+ * Does this call carry an explicit `{ addonId }` selector naming the provider
100
+ * it wants? Such a call must NOT be short-circuited to a local sibling
101
+ * either: `resolveChildId` picks the FIRST-registered child for the cap name,
102
+ * which is the one thing the caller took the trouble to say it did not want.
103
+ * It goes to `onUnownedCall`, which resolves the named provider.
104
+ *
105
+ * The array-method bypass above and this one are the same defect seen twice.
106
+ * `broker.getBrokerConfig({id:'ha_001', addonId:'provider-homeassistant'})`
107
+ * from the Home Assistant export was answered by `provider-homematic` — which
108
+ * returns `null` for a broker it does not own, indistinguishable from "no
109
+ * such broker" — so the export could never open a link. Fixing only
110
+ * `onUnownedCall` did nothing, because this decision is made first: measured
111
+ * on the live hub with a deliberately bogus addonId, which came back `null`
112
+ * instead of refused (2026-08-09, [D105]).
113
+ *
114
+ * Omitted ⇒ prior behaviour exactly. The kernel has no cap registry, so the
115
+ * wiring side injects it, sharing the predicate with the handler that then
116
+ * performs the routing — a rule implemented twice is a rule that drifts.
117
+ */
118
+ readonly isAddonPinnedCall?: (capName: string, method: string, args: unknown) => boolean;
98
119
  /**
99
120
  * Per-cap-method bound for UDS cap calls, in ms — read from the cap
100
121
  * definition's declared `timeoutMs`. The SAME resolver the remote plane uses
@@ -130,6 +151,7 @@ export declare class LocalChildRegistry {
130
151
  private readonly ownNodeId?;
131
152
  /** See {@link LocalChildRegistryOptions.isAggregatedCollectionMethod}. */
132
153
  private readonly isAggregatedCollectionMethod?;
154
+ private readonly isAddonPinnedCall?;
133
155
  /** See {@link LocalChildRegistryOptions.capTimeoutMs}. */
134
156
  private readonly capTimeoutMs?;
135
157
  /** Tracks capNames already logged as UDS-routed; one INFO line per capName per process. */
@@ -132,6 +132,33 @@ export interface ParentUnownedCallDeps {
132
132
  * so the two answers cannot drift).
133
133
  */
134
134
  readonly callCollectionAggregate?: (capName: string, method: string, args: unknown) => Promise<readonly unknown[] | null>;
135
+ /**
136
+ * Optional `{ addonId }` PIN for a collection cap's SCALAR method — the twin
137
+ * of {@link callCollectionAggregate}, for the same reason.
138
+ *
139
+ * On a system-scoped collection cap `addonId` is not provider data: the
140
+ * codegen injects it as the `{nodeId?, addonId?}` selector on every method,
141
+ * and the hub's tRPC cap-router routes by it. This handler lifted only
142
+ * `nodeId` and `deviceId` out of a child's args, so a forked addon's pin was
143
+ * DISCARDED IN SILENCE and the call was answered by whichever provider
144
+ * registered first. `broker.getBrokerConfig({id:'ha_001', addonId:'provider-
145
+ * homeassistant'})` therefore returned Homematic's `null` — indistinguishable
146
+ * from "no such broker" — and the Home Assistant export could never open a
147
+ * link. Every write-up that "proved the pin works" had measured the hub's
148
+ * tRPC surface, never this path (2026-08-09).
149
+ *
150
+ * Returns a `{ value }` box so a legitimate `null` result is distinguishable
151
+ * from "not a pinned collection call, route normally", and THROWS when the
152
+ * pin names a non-provider — a pin that silently degrades to another
153
+ * provider's answer is worse than no pin. Array methods are never pinned
154
+ * here: their contract is the union above.
155
+ *
156
+ * The kernel layer has no cap registry, so the wiring side injects this and
157
+ * it shares the tRPC path's provider resolution — the two must not drift.
158
+ */
159
+ readonly callPinnedCollection?: (capName: string, method: string, args: unknown) => Promise<{
160
+ readonly value: unknown;
161
+ } | null>;
135
162
  /**
136
163
  * Optional predicate — returns `true` when `capName` is a HUB-CORE `$`-service
137
164
  * cap (`system`, `addons`, `nodes`, `capabilities`, `stream-probe`, …): served
@@ -4438,6 +4438,7 @@ var LocalChildRegistry = class {
4438
4438
  ownNodeId;
4439
4439
  /** See {@link LocalChildRegistryOptions.isAggregatedCollectionMethod}. */
4440
4440
  isAggregatedCollectionMethod;
4441
+ isAddonPinnedCall;
4441
4442
  /** See {@link LocalChildRegistryOptions.capTimeoutMs}. */
4442
4443
  capTimeoutMs;
4443
4444
  /** Tracks capNames already logged as UDS-routed; one INFO line per capName per process. */
@@ -4469,6 +4470,7 @@ var LocalChildRegistry = class {
4469
4470
  this.resolveChildIdForAddon = opts.resolveChildIdForAddon;
4470
4471
  this.ownNodeId = opts.ownNodeId;
4471
4472
  this.isAggregatedCollectionMethod = opts.isAggregatedCollectionMethod;
4473
+ this.isAddonPinnedCall = opts.isAddonPinnedCall;
4472
4474
  this.capTimeoutMs = opts.capTimeoutMs;
4473
4475
  } else {
4474
4476
  this.server = serverOrOptions;
@@ -4842,7 +4844,9 @@ var LocalChildRegistry = class {
4842
4844
  };
4843
4845
  const pinnedNodeId = out.nodeId ?? extractNodeId(out.args);
4844
4846
  const pinTargetsThisNode = pinnedNodeId !== void 0 && this.ownNodeId !== void 0 && pinnedNodeId === this.ownNodeId;
4845
- if ((!(pinnedNodeId === void 0 && this.isAggregatedCollectionMethod?.(out.capName, out.method) === true) && (pinnedNodeId === void 0 || pinTargetsThisNode) ? this.resolveChildId(out.capName, out.deviceId) : null) !== null) {
4847
+ const aggregated = pinnedNodeId === void 0 && this.isAggregatedCollectionMethod?.(out.capName, out.method) === true;
4848
+ const addonPinned = pinnedNodeId === void 0 && this.isAddonPinnedCall?.(out.capName, out.method, out.args) === true;
4849
+ if ((!aggregated && !addonPinned && (pinnedNodeId === void 0 || pinTargetsThisNode) ? this.resolveChildId(out.capName, out.deviceId) : null) !== null) {
4846
4850
  if (!this.egressRoutedCaps.has(out.capName)) {
4847
4851
  this.egressRoutedCaps.add(out.capName);
4848
4852
  this.logger?.info("routed child egress over UDS", { capName: out.capName });
@@ -5421,6 +5425,8 @@ function createParentUnownedCallHandler(deps) {
5421
5425
  if (empty != null) return empty;
5422
5426
  const aggregate = await deps.callCollectionAggregate?.(input.capName, input.method, input.args);
5423
5427
  if (aggregate != null) return aggregate;
5428
+ const pinned = await deps.callPinnedCollection?.(input.capName, input.method, input.args);
5429
+ if (pinned !== null && pinned !== void 0) return pinned.value;
5424
5430
  }
5425
5431
  const resolver = deps.getResolver();
5426
5432
  if (resolver !== null) try {
@@ -4440,6 +4440,7 @@ var LocalChildRegistry = class {
4440
4440
  ownNodeId;
4441
4441
  /** See {@link LocalChildRegistryOptions.isAggregatedCollectionMethod}. */
4442
4442
  isAggregatedCollectionMethod;
4443
+ isAddonPinnedCall;
4443
4444
  /** See {@link LocalChildRegistryOptions.capTimeoutMs}. */
4444
4445
  capTimeoutMs;
4445
4446
  /** Tracks capNames already logged as UDS-routed; one INFO line per capName per process. */
@@ -4471,6 +4472,7 @@ var LocalChildRegistry = class {
4471
4472
  this.resolveChildIdForAddon = opts.resolveChildIdForAddon;
4472
4473
  this.ownNodeId = opts.ownNodeId;
4473
4474
  this.isAggregatedCollectionMethod = opts.isAggregatedCollectionMethod;
4475
+ this.isAddonPinnedCall = opts.isAddonPinnedCall;
4474
4476
  this.capTimeoutMs = opts.capTimeoutMs;
4475
4477
  } else {
4476
4478
  this.server = serverOrOptions;
@@ -4844,7 +4846,9 @@ var LocalChildRegistry = class {
4844
4846
  };
4845
4847
  const pinnedNodeId = out.nodeId ?? extractNodeId(out.args);
4846
4848
  const pinTargetsThisNode = pinnedNodeId !== void 0 && this.ownNodeId !== void 0 && pinnedNodeId === this.ownNodeId;
4847
- if ((!(pinnedNodeId === void 0 && this.isAggregatedCollectionMethod?.(out.capName, out.method) === true) && (pinnedNodeId === void 0 || pinTargetsThisNode) ? this.resolveChildId(out.capName, out.deviceId) : null) !== null) {
4849
+ const aggregated = pinnedNodeId === void 0 && this.isAggregatedCollectionMethod?.(out.capName, out.method) === true;
4850
+ const addonPinned = pinnedNodeId === void 0 && this.isAddonPinnedCall?.(out.capName, out.method, out.args) === true;
4851
+ if ((!aggregated && !addonPinned && (pinnedNodeId === void 0 || pinTargetsThisNode) ? this.resolveChildId(out.capName, out.deviceId) : null) !== null) {
4848
4852
  if (!this.egressRoutedCaps.has(out.capName)) {
4849
4853
  this.egressRoutedCaps.add(out.capName);
4850
4854
  this.logger?.info("routed child egress over UDS", { capName: out.capName });
@@ -5423,6 +5427,8 @@ function createParentUnownedCallHandler(deps) {
5423
5427
  if (empty != null) return empty;
5424
5428
  const aggregate = await deps.callCollectionAggregate?.(input.capName, input.method, input.args);
5425
5429
  if (aggregate != null) return aggregate;
5430
+ const pinned = await deps.callPinnedCollection?.(input.capName, input.method, input.args);
5431
+ if (pinned !== null && pinned !== void 0) return pinned.value;
5426
5432
  }
5427
5433
  const resolver = deps.getResolver();
5428
5434
  if (resolver !== null) try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.70",
3
+ "version": "1.2.72",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",