@camstack/system 1.2.275 → 1.2.277

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 (63) hide show
  1. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  2. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  3. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/alerts/alerts.addon.js +1 -1
  6. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  7. package/dist/builtins/autotrack/index.js +1 -1
  8. package/dist/builtins/autotrack/index.mjs +1 -1
  9. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/camera-grid/grid-last-frame-store.d.ts +39 -0
  12. package/dist/builtins/camera-grid/index.js +67 -12
  13. package/dist/builtins/camera-grid/index.mjs +67 -12
  14. package/dist/builtins/console-logging/index.js +1 -1
  15. package/dist/builtins/console-logging/index.mjs +1 -1
  16. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  17. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  18. package/dist/builtins/device-manager/device-aggregation.d.ts +0 -6
  19. package/dist/builtins/device-manager/device-bindings-store.d.ts +22 -2
  20. package/dist/builtins/device-manager/device-manager.addon.d.ts +4 -0
  21. package/dist/builtins/device-manager/device-manager.addon.js +122 -58
  22. package/dist/builtins/device-manager/device-manager.addon.mjs +122 -59
  23. package/dist/builtins/device-manager/device-meta-types.d.ts +24 -3
  24. package/dist/builtins/device-manager/device-source-activation.d.ts +36 -0
  25. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  26. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  27. package/dist/builtins/hub-forwarder/index.js +1 -1
  28. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  29. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  30. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  31. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  32. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  33. package/dist/builtins/local-network/local-network.addon.js +1 -1
  34. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  35. package/dist/builtins/loki-logging/index.js +1 -1
  36. package/dist/builtins/loki-logging/index.mjs +1 -1
  37. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  38. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  39. package/dist/builtins/platform-probe/index.js +1 -1
  40. package/dist/builtins/platform-probe/index.mjs +1 -1
  41. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  42. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  43. package/dist/builtins/snapshot/index.js +1 -1
  44. package/dist/builtins/snapshot/index.mjs +1 -1
  45. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  46. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  47. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  48. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  49. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  50. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  51. package/dist/builtins/system-config/system-config.addon.js +1 -1
  52. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  53. package/dist/builtins/winston-logging/index.js +1 -1
  54. package/dist/builtins/winston-logging/index.mjs +1 -1
  55. package/dist/{dist-CYXhwfDf.js → dist-Bu8HN-KS.js} +354 -11
  56. package/dist/{dist-DWSJVcZe.mjs → dist-DOF9wnat.mjs} +349 -12
  57. package/dist/index.d.ts +7 -0
  58. package/dist/index.js +61 -48
  59. package/dist/index.mjs +62 -50
  60. package/dist/kernel/capability-registry.d.ts +28 -8
  61. package/dist/{retired-settings-keys-DEFtUH8o.js → retired-settings-keys-BwE6S2eQ.js} +1 -1
  62. package/dist/{retired-settings-keys-BHGnCLW0.mjs → retired-settings-keys-DXMfts8c.mjs} +1 -1
  63. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -1,12 +1,12 @@
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 { An as readinessKey, Cn as expandCapMethods, F as addonSettingsCapability, Ft as procedureAuthKey, Mn as scopeKey, Mt as objectInputDeclaresAddonId, On as parseJsonObject, Pn as EventCategory$1, S as RUNTIME_DEFAULTS, Tt as looseSchema, Ut as scopesAllowAddon, Vt as resolveMethodAuth, Wt as scopesAllowDeviceCap, _n as asJsonObject$1, _t as isVoidInput, an as errMsg$1, bn as createEvent, bt as lifecycleJobSchema, cn as DATAPLANE_SECRET_HEADER$1, dt as isArrayOutputSchema, ft as isCollectionArrayMethod, g as LOG_LEVEL_RANK, hn as ReadinessTimeoutError, jn as resolveCapMount, kn as parseJsonUnknown, ln as DEVICE_SETTINGS_CONTRIBUTION_METHODS, mn as ReadinessRegistry, mt as isObjectInput, st as extractNestedAddonId, t as ALL_CAPABILITY_DEFINITIONS, un as DEVICE_STATUS_METHOD, vn as asNumber, vt as kebabToCamel, wt as logLevelAtMost, xn as emitDownForOwnedCaps, y as METHOD_ACCESS_MAP, yn as asString$1 } from "./dist-DWSJVcZe.mjs";
2
+ import { An as parseJsonUnknown, F as addonSettingsCapability, Fn as EventCategory$1, Gt as scopesAllowDeviceCap, Ht as resolveMethodAuth, It as procedureAuthKey, Mn as resolveCapMount, Mt as objectInputDeclaresAddonId, Nn as scopeKey, Nt as objectInputDeclaresRequiredDeviceId, S as RUNTIME_DEFAULTS, Sn as emitDownForOwnedCaps, Tt as looseSchema, Wt as scopesAllowAddon, _t as isVoidInput, bn as asString$1, bt as lifecycleJobSchema, dn as DEVICE_STATUS_METHOD, dt as isArrayOutputSchema, ft as isCollectionArrayMethod, g as LOG_LEVEL_RANK, gn as ReadinessTimeoutError, hn as ReadinessRegistry, jn as readinessKey, kn as parseJsonObject, ln as DATAPLANE_SECRET_HEADER$1, mt as isObjectInput, on as errMsg$1, st as extractNestedAddonId, t as ALL_CAPABILITY_DEFINITIONS, un as DEVICE_SETTINGS_CONTRIBUTION_METHODS, vn as asJsonObject$1, vt as kebabToCamel, wn as expandCapMethods, wt as logLevelAtMost, xn as createEvent, y as METHOD_ACCESS_MAP, yn as asNumber } from "./dist-DOF9wnat.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";
6
6
  import { ConsoleDestination, ConsoleLoggingAddon } from "./builtins/console-logging/index.mjs";
7
7
  import { CoreBlocksAddon } from "./builtins/core-blocks/core-blocks.addon.mjs";
8
8
  import "./builtins/core-blocks/index.mjs";
9
- import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
9
+ import { DeviceManagerAddon, t as setWrapperActive } from "./builtins/device-manager/device-manager.addon.mjs";
10
10
  import "./builtins/device-manager/index.mjs";
11
11
  import { HubForwarderAddon, HubForwarderDestination } from "./builtins/hub-forwarder/index.mjs";
12
12
  import { LivenessMonitorAddon } from "./builtins/liveness-monitor/liveness-monitor.addon.mjs";
@@ -5885,8 +5885,22 @@ var CapabilityRegistry = class CapabilityRegistry {
5885
5885
  singletonNodeOverrides = /* @__PURE__ */ new Map();
5886
5886
  /** Optional reader for persisted per-node overrides: (cap, nodeId) → addonId. */
5887
5887
  nodeConfigReader = null;
5888
- /** Per-device collection filters: deviceId → (capability → addonIds[]) */
5889
- deviceCollectionFilters = /* @__PURE__ */ new Map();
5888
+ /**
5889
+ * Per-device SOURCE deactivations: deviceId → (capability → disabled addon ids).
5890
+ *
5891
+ * The in-memory PROJECTION of the persisted wrapper activation
5892
+ * (`deviceBindings[deviceId][capName].disabledSourceAddonIds`, written by
5893
+ * `setWrapperActive`), and never an authority of its own —
5894
+ * [D556](../../../../docs/decisions/adr-0556-a-per-device-source-switch-is-the-wrapper-activation-and-the-registry-holds-only-its-projection.md).
5895
+ * Nothing but `device-source-activation.ts` writes it: the operator's verb
5896
+ * is `deviceManager.setWrapperActive`, and a second writable surface here is
5897
+ * exactly the two-authorities defect D62 exists for.
5898
+ *
5899
+ * A DENY list, not an allow list, and that is the deliberate answer to what
5900
+ * "unset" means: a source nobody has ruled out is a source. An untouched
5901
+ * camera keeps every provider it has today, and a provider that registers
5902
+ * after the operator's last toggle needs no second write to be seen.
5903
+ */
5890
5904
  /** autoActivate flags per (capability, addonId) — from addon manifests */
5891
5905
  autoActivateFlags = /* @__PURE__ */ new Map();
5892
5906
  /**
@@ -6782,54 +6796,24 @@ var CapabilityRegistry = class CapabilityRegistry {
6782
6796
  for (const [addonId, provider] of state.providers) if (this.isActiveForSystem(capability, addonId)) return asProvider(provider);
6783
6797
  return null;
6784
6798
  }
6785
- /** Set a per-device collection filter. */
6786
- setDeviceCollectionFilter(deviceId, capability, addonIds) {
6787
- if (!this.capabilities.get(capability)) {
6788
- this.logger.warn("Cannot set device collection filter for undeclared capability", { meta: { capability } });
6789
- return;
6790
- }
6791
- let deviceMap = this.deviceCollectionFilters.get(deviceId);
6792
- if (!deviceMap) {
6793
- deviceMap = /* @__PURE__ */ new Map();
6794
- this.deviceCollectionFilters.set(deviceId, deviceMap);
6795
- }
6796
- deviceMap.set(capability, [...addonIds]);
6797
- this.logger.info("Device collection filter set", {
6798
- tags: { deviceId: Number(deviceId) },
6799
- meta: {
6800
- capability,
6801
- addonIds
6802
- }
6803
- });
6804
- }
6805
- /** Clear a per-device collection filter. */
6806
- clearDeviceCollectionFilter(deviceId, capability) {
6807
- const deviceMap = this.deviceCollectionFilters.get(deviceId);
6808
- if (!deviceMap) return;
6809
- deviceMap.delete(capability);
6810
- if (deviceMap.size === 0) this.deviceCollectionFilters.delete(deviceId);
6811
- this.logger.info("Device collection filter cleared", {
6812
- tags: { deviceId: Number(deviceId) },
6813
- meta: { capability }
6814
- });
6815
- }
6816
6799
  /**
6817
6800
  * Resolve collection providers for a specific device.
6818
- * Filters by activation (the manifest's autoActivate) and optional collection filter.
6801
+ *
6802
+ * Filters by activation (the manifest's autoActivate) and by nothing else.
6803
+ * The per-device DENY set that used to filter here is gone with the switch
6804
+ * it projected (2026-09-20): *"tutti i providers funzionano sempre"*. WHICH
6805
+ * providers a device has is now answered by its BINDINGS
6806
+ * (`device-bindings-store.ts` step 0), which is a different question from
6807
+ * which of them are registered and running — this one.
6808
+ *
6809
+ * `deviceId` is kept in the signature and deliberately unused: the resolution
6810
+ * is per-device by CONTRACT, and a caller that stops passing one is a caller
6811
+ * that has stopped asking about a device.
6819
6812
  */
6820
- resolveCollectionForDevice(capability, deviceId) {
6813
+ resolveCollectionForDevice(capability, _deviceId) {
6821
6814
  const state = this.capabilities.get(capability);
6822
6815
  if (!state || state.definition.mode !== "collection") return [];
6823
- let entries = [...state.providers.entries()].filter(([addonId]) => !state.disabledProviders.has(addonId)).filter(([addonId]) => this.isActiveForSystem(capability, addonId));
6824
- const deviceMap = this.deviceCollectionFilters.get(deviceId);
6825
- if (deviceMap) {
6826
- const filterAddonIds = deviceMap.get(capability);
6827
- if (filterAddonIds) {
6828
- const filterSet = new Set(filterAddonIds);
6829
- entries = entries.filter(([addonId]) => filterSet.has(addonId));
6830
- }
6831
- }
6832
- return entries.map(([, provider]) => asProvider(provider));
6816
+ return [...state.providers.entries()].filter(([addonId]) => !state.disabledProviders.has(addonId)).filter(([addonId]) => this.isActiveForSystem(capability, addonId)).map(([, provider]) => asProvider(provider));
6833
6817
  }
6834
6818
  /** Check if all dependencies for a capability are satisfied. */
6835
6819
  areDependenciesMet(capabilityName) {
@@ -6993,6 +6977,35 @@ var CapabilityRegistry = class CapabilityRegistry {
6993
6977
  function systemMountKindFor(def) {
6994
6978
  return def.mode === "collection" ? "collection" : "singleton";
6995
6979
  }
6980
+ /**
6981
+ * The mount kind ONE method resolves through — the cap's mount, except where
6982
+ * the method cannot be dispatched per device.
6983
+ *
6984
+ * Two ways a method leaves a per-device mount for the cap's SYSTEM provider:
6985
+ *
6986
+ * - `systemOnly: true` — declared via the `systemMethod()` factory. The
6987
+ * author said so; it wins everywhere, including on a `device-native` cap
6988
+ * (`snapshot.getSnapshotOverview`).
6989
+ * - a `device-scoped` cap's method whose input declares no top-level REQUIRED
6990
+ * numeric `deviceId`. The per-device dispatcher demands one on every call
6991
+ * (`requireDeviceScoped`), so such a method would answer BAD_REQUEST
6992
+ * "input must carry numeric deviceId" for every caller — unreachable. It
6993
+ * names no device, so there is no per-device provider to resolve: the cap's
6994
+ * hub-resident system/wrapper provider is the only honest destination, and
6995
+ * it is where that method already resolved before the mount was fixed.
6996
+ *
6997
+ * NOT applied to `device-native`, deliberately: there the native IS the device
6998
+ * and a deviceId-less method is a definition error the author must resolve
6999
+ * with `systemMethod()` — which is what `snapshot` does. This rule exists for
7000
+ * the mount kind that was DERIVED under caps that never opted in, where a
7001
+ * silent 400 would be a regression introduced by the derivation itself.
7002
+ */
7003
+ function methodMountKindFor(def, mountKind, method) {
7004
+ if (method.schema.systemOnly === true) return systemMountKindFor(def);
7005
+ if (mountKind !== "device-scoped") return mountKind;
7006
+ if (objectInputDeclaresRequiredDeviceId(method.schema.input)) return mountKind;
7007
+ return systemMountKindFor(def);
7008
+ }
6996
7009
  function methodsFor(def) {
6997
7010
  const effective = expandCapMethods(def);
6998
7011
  return Object.entries(effective).map(([name, schema]) => {
@@ -7119,12 +7132,11 @@ function requireLocal(capName, getLocal, services) {
7119
7132
  function buildOneCapRouter(def, primitives, services) {
7120
7133
  const capName = def.name;
7121
7134
  const mount = resolveCapMount(def);
7122
- const systemMountKind = systemMountKindFor(def);
7123
7135
  const nodeIdData = def.nodeIdMode === "data";
7124
7136
  const procedures = {};
7125
7137
  for (const method of methodsFor(def)) {
7126
7138
  if (method.callerRequired && (method.kind === "subscription" || !method.isObject)) throw new Error(`Cap "${capName}" method "${method.name}": caller: 'required' is only supported on query/mutation methods with an object input schema`);
7127
- const effectiveMountKind = method.schema.systemOnly === true ? systemMountKind : mount.kind;
7139
+ const effectiveMountKind = methodMountKindFor(def, mount.kind, method);
7128
7140
  const isCollection = effectiveMountKind === "collection";
7129
7141
  const getLocal = (ctx, addonId) => services.getLocalProvider(capName, effectiveMountKind, ctx, addonId);
7130
7142
  const base = primitives.procedures[procedureAuthKey(method.auth)];
@@ -95817,4 +95829,4 @@ var LifecycleJobEngine = class {
95817
95829
  }
95818
95830
  };
95819
95831
  //#endregion
95820
- export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MESH_QUEUE_TOP_N, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PARENT_ROUTED_PROVIDER_ADDON_ID, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCoreCapService, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createLocalTransport, createLoopDelayMeter, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, deviceCapResolverLink, diffCapActionCensus, diffEventPlane, diffSocketPlane, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, emitHeapDiagnosticReport, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, heapSpaceField, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isArrayBufferCensusReport, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, nextRssBudgetState, parseCapAction, parseRangeHeader, parseRssBudgetMb, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readHeapSpaces, readLanHttpState, readMoleculerFanoutMode, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, socketDirectionBytes, socketDirectionMessages, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
95832
+ export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MESH_QUEUE_TOP_N, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PARENT_ROUTED_PROVIDER_ADDON_ID, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCoreCapService, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createLocalTransport, createLoopDelayMeter, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, deviceCapResolverLink, diffCapActionCensus, diffEventPlane, diffSocketPlane, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, emitHeapDiagnosticReport, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, heapSpaceField, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isArrayBufferCensusReport, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, nextRssBudgetState, parseCapAction, parseRangeHeader, parseRssBudgetMb, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readHeapSpaces, readLanHttpState, readMoleculerFanoutMode, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, setHubConnected, setNodeEventInterest, setWrapperActive, shouldReclaim, socketDirectionBytes, socketDirectionMessages, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
@@ -59,8 +59,22 @@ export declare class CapabilityRegistry {
59
59
  private readonly singletonNodeOverrides;
60
60
  /** Optional reader for persisted per-node overrides: (cap, nodeId) → addonId. */
61
61
  private nodeConfigReader;
62
- /** Per-device collection filters: deviceId → (capability → addonIds[]) */
63
- private readonly deviceCollectionFilters;
62
+ /**
63
+ * Per-device SOURCE deactivations: deviceId → (capability → disabled addon ids).
64
+ *
65
+ * The in-memory PROJECTION of the persisted wrapper activation
66
+ * (`deviceBindings[deviceId][capName].disabledSourceAddonIds`, written by
67
+ * `setWrapperActive`), and never an authority of its own —
68
+ * [D556](../../../../docs/decisions/adr-0556-a-per-device-source-switch-is-the-wrapper-activation-and-the-registry-holds-only-its-projection.md).
69
+ * Nothing but `device-source-activation.ts` writes it: the operator's verb
70
+ * is `deviceManager.setWrapperActive`, and a second writable surface here is
71
+ * exactly the two-authorities defect D62 exists for.
72
+ *
73
+ * A DENY list, not an allow list, and that is the deliberate answer to what
74
+ * "unset" means: a source nobody has ruled out is a source. An untouched
75
+ * camera keeps every provider it has today, and a provider that registers
76
+ * after the operator's last toggle needs no second write to be seen.
77
+ */
64
78
  /** autoActivate flags per (capability, addonId) — from addon manifests */
65
79
  private readonly autoActivateFlags;
66
80
  /**
@@ -465,15 +479,21 @@ export declare class CapabilityRegistry {
465
479
  * singleton override — the in-memory provider pin, not a persisted flag.
466
480
  */
467
481
  resolveForDevice<T = unknown>(capability: string, deviceId: string): T | null;
468
- /** Set a per-device collection filter. */
469
- setDeviceCollectionFilter(deviceId: string, capability: string, addonIds: string[]): void;
470
- /** Clear a per-device collection filter. */
471
- clearDeviceCollectionFilter(deviceId: string, capability: string): void;
472
482
  /**
473
483
  * Resolve collection providers for a specific device.
474
- * Filters by activation (the manifest's autoActivate) and optional collection filter.
484
+ *
485
+ * Filters by activation (the manifest's autoActivate) and by nothing else.
486
+ * The per-device DENY set that used to filter here is gone with the switch
487
+ * it projected (2026-09-20): *"tutti i providers funzionano sempre"*. WHICH
488
+ * providers a device has is now answered by its BINDINGS
489
+ * (`device-bindings-store.ts` step 0), which is a different question from
490
+ * which of them are registered and running — this one.
491
+ *
492
+ * `deviceId` is kept in the signature and deliberately unused: the resolution
493
+ * is per-device by CONTRACT, and a caller that stops passing one is a caller
494
+ * that has stopped asking about a device.
475
495
  */
476
- resolveCollectionForDevice<T = unknown>(capability: string, deviceId: string): readonly T[];
496
+ resolveCollectionForDevice<T = unknown>(capability: string, _deviceId: string): readonly T[];
477
497
  /** Check if all dependencies for a capability are satisfied. */
478
498
  areDependenciesMet(capabilityName: string): boolean;
479
499
  /** Get topologically sorted boot order based on dependsOn. */
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CYXhwfDf.js");
1
+ const require_dist = require("./dist-Bu8HN-KS.js");
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
@@ -1,4 +1,4 @@
1
- import { _n as asJsonObject } from "./dist-DWSJVcZe.mjs";
1
+ import { vn as asJsonObject } from "./dist-DOF9wnat.mjs";
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.275",
3
+ "version": "1.2.277",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",
@@ -392,7 +392,6 @@
392
392
  "@camstack/sdk": "*",
393
393
  "@camstack/types": "*",
394
394
  "@msgpack/msgpack": "^3.1.3",
395
- "@peculiar/x509": "^1.14.3",
396
395
  "@trpc/client": "^11.16.0",
397
396
  "@trpc/server": "^11.16.0",
398
397
  "bcryptjs": "^3.0.3",
@@ -416,6 +415,7 @@
416
415
  },
417
416
  "devDependencies": {
418
417
  "@camstack/types": "*",
418
+ "@peculiar/x509": "^1.14.3",
419
419
  "@types/bcryptjs": "^2.4.6",
420
420
  "@types/better-sqlite3": "^7.6.13",
421
421
  "@types/js-yaml": "^4.0.9",