@camstack/system 1.2.62 → 1.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/addon-runner.js +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/core-blocks/block-package.d.ts +9 -27
- package/dist/builtins/core-blocks/block-supervisor.d.ts +15 -0
- package/dist/builtins/core-blocks/core-blocks.addon.js +91 -24
- package/dist/builtins/core-blocks/core-blocks.addon.mjs +91 -25
- package/dist/builtins/device-manager/device-bindings-store.d.ts +28 -5
- package/dist/builtins/device-manager/device-linked-devices.d.ts +2 -2
- package/dist/builtins/device-manager/device-manager.addon.d.ts +3 -45
- package/dist/builtins/device-manager/device-manager.addon.js +123 -884
- package/dist/builtins/device-manager/device-manager.addon.mjs +123 -884
- package/dist/builtins/device-manager/device-meta-actions.d.ts +0 -8
- package/dist/builtins/device-manager/device-meta-store.d.ts +1 -28
- package/dist/builtins/device-manager/device-meta-types.d.ts +2 -6
- package/dist/builtins/device-manager/device-projection.d.ts +1 -2
- package/dist/builtins/device-manager/device-provider-context.d.ts +2 -13
- package/dist/builtins/device-manager/device-queries.d.ts +1 -1
- package/dist/builtins/device-manager/device-state-mirror.d.ts +8 -49
- package/dist/builtins/device-manager/device-sync-resolvers.d.ts +0 -11
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/dist/builtins/local-auth/homeassistant-integration.d.ts +7 -0
- package/dist/builtins/local-auth/index.d.ts +1 -0
- package/dist/builtins/local-auth/index.js +1 -0
- package/dist/builtins/local-auth/index.mjs +2 -2
- package/dist/builtins/local-auth/local-auth.addon.js +561 -497
- package/dist/builtins/local-auth/local-auth.addon.mjs +580 -517
- package/dist/builtins/local-auth/oauth-grants.d.ts +11 -0
- package/dist/builtins/local-auth/oauth-session-manager.d.ts +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/loki-logging/index.js +1 -1
- package/dist/builtins/loki-logging/index.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +319 -20
- package/dist/builtins/snapshot/index.mjs +319 -20
- package/dist/builtins/snapshot/snapshot-keep-warm.d.ts +86 -0
- package/dist/builtins/snapshot/snapshot-media-handler.d.ts +48 -1
- package/dist/builtins/snapshot/snapshot.addon.d.ts +65 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/retired-settings-keys.d.ts +15 -0
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +45 -5
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +45 -5
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{dist-DnKpFaP1.mjs → dist-BJ2w3uoN.mjs} +1188 -1329
- package/dist/{dist-DgPUarcs.js → dist-LDrOFrd-.js} +1212 -1365
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +4 -4
- package/dist/kernel/moleculer/device-cap-proxy.d.ts +2 -2
- package/dist/{manifest-python-deps-CX5tGRqf.mjs → manifest-python-deps-CopL1_5C.mjs} +20 -14
- package/dist/{manifest-python-deps-d4acYXVV.js → manifest-python-deps-DNfmBu20.js} +20 -14
- package/package.json +5 -1
- package/dist/builtins/device-manager/device-link-cycle.d.ts +0 -18
- package/dist/builtins/device-manager/device-link-overlay.d.ts +0 -33
- package/dist/builtins/device-manager/device-link-resolver.d.ts +0 -44
- package/dist/main-CVLq8IzA.js +0 -2356
- package/dist/main-CzH19GkU.mjs +0 -2353
package/dist/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ export { LivenessMonitorAddon } from './builtins/liveness-monitor/index.js';
|
|
|
51
51
|
export { NativeMetricsProvider } from './builtins/native-metrics/native-metrics-provider.js';
|
|
52
52
|
export { SystemConfigAddon } from './builtins/system-config/index.js';
|
|
53
53
|
export { CoreBlocksAddon } from './builtins/core-blocks/index.js';
|
|
54
|
-
export { LocalAuthAddon } from './builtins/local-auth/index.js';
|
|
54
|
+
export { LocalAuthAddon, HOME_ASSISTANT_OAUTH_INTEGRATION } from './builtins/local-auth/index.js';
|
|
55
55
|
export { DeviceManagerAddon } from './builtins/device-manager/index.js';
|
|
56
56
|
export { LifecycleStateMachine } from './lifecycle/lifecycle-state-machine.js';
|
|
57
57
|
export type { ElementState, ElementStatus, } from './lifecycle/lifecycle-state-machine.js';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
3
|
+
const require_dist = require("./dist-LDrOFrd-.js");
|
|
4
4
|
const require_model_download_service = require("./model-download-service-Cpc6SWzV.js");
|
|
5
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
5
|
+
const require_manifest_python_deps = require("./manifest-python-deps-DNfmBu20.js");
|
|
6
6
|
const require_resource_monitor = require("./resource-monitor-DNNomR-i.js");
|
|
7
7
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
@@ -94886,6 +94886,7 @@ exports.HEAP_RECLAIM_MIN_INTERVAL_MS = HEAP_RECLAIM_MIN_INTERVAL_MS;
|
|
|
94886
94886
|
exports.HEAP_RECLAIM_TRIGGER_MB = HEAP_RECLAIM_TRIGGER_MB;
|
|
94887
94887
|
exports.HEAP_WATCH_INTERVAL_MS = HEAP_WATCH_INTERVAL_MS;
|
|
94888
94888
|
exports.HEAP_WATCH_WARN_RATIO = HEAP_WATCH_WARN_RATIO;
|
|
94889
|
+
exports.HOME_ASSISTANT_OAUTH_INTEGRATION = require_builtins_local_auth_local_auth_addon.HOME_ASSISTANT_OAUTH_INTEGRATION;
|
|
94889
94890
|
exports.HUB_CAP_FWD_ACTION = require_manifest_python_deps.HUB_CAP_FWD_ACTION;
|
|
94890
94891
|
exports.HUB_CAP_FWD_SERVICE = require_manifest_python_deps.HUB_CAP_FWD_SERVICE;
|
|
94891
94892
|
exports.HubForwarderAddon = require_builtins_hub_forwarder_index.HubForwarderAddon$1;
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 {
|
|
2
|
+
import { Ct as asString$1, Dt as expandCapMethods, F as extractNestedAddonId, Ft as scopeKey, H as kebabToCamel, K as logLevelAtMost, L as isArrayOutputSchema, Lt as EventCategory$1, Mt as parseJsonUnknown$1, Nt as readinessKey, Pt as resolveCapMount, R as isCollectionArrayMethod, St as asNumber, Tt as emitDownForOwnedCaps, U as lifecycleJobSchema, V as isVoidInput, Z as objectInputDeclaresAddonId, et as procedureAuthKey, ft as DATAPLANE_SECRET_HEADER$1, g as addonSettingsCapability, jt as parseJsonObject, l as METHOD_ACCESS_MAP, mt as DEVICE_STATUS_METHOD, pt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, q as looseSchema, t as ALL_CAPABILITY_DEFINITIONS, u as RUNTIME_DEFAULTS, ut as errMsg$1, vt as ReadinessRegistry, wt as createEvent, xt as asJsonObject$1, yt as ReadinessTimeoutError, z as isObjectInput } from "./dist-BJ2w3uoN.mjs";
|
|
3
3
|
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-D8B-4ktF.mjs";
|
|
4
|
-
import { $ as buildNativeCapProxy, A as createHubCapForwardService, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as resolveAddonClass, 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 runNpm, 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 resolveNpmInvocation, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-
|
|
4
|
+
import { $ as buildNativeCapProxy, A as createHubCapForwardService, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as resolveAddonClass, 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 runNpm, 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 resolveNpmInvocation, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-CopL1_5C.mjs";
|
|
5
5
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BkP504Vq.mjs";
|
|
6
6
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
7
7
|
import { SqliteSettingsAddon, o as SqliteSettingsBackend } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
@@ -22,7 +22,7 @@ import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.
|
|
|
22
22
|
import "./builtins/system-config/index.mjs";
|
|
23
23
|
import { CoreBlocksAddon } from "./builtins/core-blocks/core-blocks.addon.mjs";
|
|
24
24
|
import "./builtins/core-blocks/index.mjs";
|
|
25
|
-
import { LocalAuthAddon, a as
|
|
25
|
+
import { LocalAuthAddon, a as require_safe_buffer, i as require_ms, n as ScopedTokenManager, o as ApiKeyManager, r as AuthManager, s as HOME_ASSISTANT_OAUTH_INTEGRATION, t as UserManager } from "./builtins/local-auth/local-auth.addon.mjs";
|
|
26
26
|
import "./builtins/local-auth/index.mjs";
|
|
27
27
|
import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
|
|
28
28
|
import "./builtins/device-manager/index.mjs";
|
|
@@ -94826,4 +94826,4 @@ var LifecycleJobEngine = class {
|
|
|
94826
94826
|
}
|
|
94827
94827
|
};
|
|
94828
94828
|
//#endregion
|
|
94829
|
-
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 };
|
|
94829
|
+
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, HOME_ASSISTANT_OAUTH_INTEGRATION, 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 };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { AddonApi, CapabilityDefinition, DeviceManagerApi, IDevice, IEventBus, IKernelStreamProbe, InferProvider, IScopedLogger } from '@camstack/types';
|
|
1
2
|
import { deviceOpsCapability } from '@camstack/types/addon';
|
|
2
|
-
import { AddonApi, CapabilityDefinition, DeviceManagerApi, IDevice, IEventBus, IKernelStreamProbe, IScopedLogger, InferProvider } from '@camstack/types';
|
|
3
3
|
import { ServiceBroker } from 'moleculer';
|
|
4
|
-
import { DeviceRegistry } from '../device-registry.js';
|
|
5
4
|
import { CapabilityRegistry } from '../capability-registry.js';
|
|
5
|
+
import { DeviceRegistry } from '../device-registry.js';
|
|
6
6
|
import { LocalChildRegistry } from '../transport/local-child-registry.js';
|
|
7
7
|
export { NATIVE_PROVIDER_SERVICE_INFIX } from '../transport/cap-action-name.js';
|
|
8
8
|
export interface WorkerDeviceManagerOptions {
|
|
@@ -1777,18 +1777,6 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
1777
1777
|
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
1778
1778
|
});
|
|
1779
1779
|
});
|
|
1780
|
-
if (initialMeta.deviceLinks !== void 0) await callDeviceManager(api, "setDeviceLinks", {
|
|
1781
|
-
deviceId: id,
|
|
1782
|
-
deviceLinks: initialMeta.deviceLinks
|
|
1783
|
-
}).catch((err) => {
|
|
1784
|
-
opts.logger.warn("create: setDeviceLinks pre-seed failed", {
|
|
1785
|
-
tags: {
|
|
1786
|
-
stableId,
|
|
1787
|
-
deviceId: id
|
|
1788
|
-
},
|
|
1789
|
-
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
1790
|
-
});
|
|
1791
|
-
});
|
|
1792
1780
|
if (initialMeta.display !== void 0) await callDeviceManager(api, "setDisplay", {
|
|
1793
1781
|
deviceId: id,
|
|
1794
1782
|
display: initialMeta.display
|
|
@@ -3521,6 +3509,16 @@ function encodeFrame(value) {
|
|
|
3521
3509
|
/** Bytes in the big-endian length prefix that opens every frame. */
|
|
3522
3510
|
var HEADER_BYTES = 4;
|
|
3523
3511
|
/**
|
|
3512
|
+
* Copy a frame body out of its backing store before decoding when the store
|
|
3513
|
+
* holds this many bytes MORE than the frame itself. msgpack `bin` fields
|
|
3514
|
+
* decode as VIEWS of the decode input, so one retained field (a state slice,
|
|
3515
|
+
* a forwarded log payload) pins the input's WHOLE backing store — with 64 KiB
|
|
3516
|
+
* socket read chunks that pinned 55k chunks (3.5 GB off-heap) on hub-main.
|
|
3517
|
+
* The exact-fit reassembly path (media frames, `Buffer.concat` sized to the
|
|
3518
|
+
* frame) wastes only the 4-byte header and stays zero-extra-copy.
|
|
3519
|
+
*/
|
|
3520
|
+
var SLAB_WASTE_MAX_BYTES = 4096;
|
|
3521
|
+
/**
|
|
3524
3522
|
* Reassembles length-prefixed MsgPack frames from a byte stream.
|
|
3525
3523
|
*
|
|
3526
3524
|
* **Why this is a chunk LIST and not a growing Buffer.** The original
|
|
@@ -3556,9 +3554,17 @@ var FrameDecoder = class {
|
|
|
3556
3554
|
}
|
|
3557
3555
|
const frames = [];
|
|
3558
3556
|
while (this.buffered >= HEADER_BYTES) {
|
|
3559
|
-
const
|
|
3557
|
+
const len = this.readLength();
|
|
3558
|
+
const total = HEADER_BYTES + len;
|
|
3560
3559
|
if (this.buffered < total) break;
|
|
3561
|
-
|
|
3560
|
+
const frame = this.take(total);
|
|
3561
|
+
const wasted = frame.buffer.byteLength - frame.byteLength;
|
|
3562
|
+
let body;
|
|
3563
|
+
if (wasted > SLAB_WASTE_MAX_BYTES) {
|
|
3564
|
+
body = Buffer.allocUnsafeSlow(len);
|
|
3565
|
+
frame.copy(body, 0, HEADER_BYTES);
|
|
3566
|
+
} else body = frame.subarray(HEADER_BYTES);
|
|
3567
|
+
frames.push(decode(body));
|
|
3562
3568
|
}
|
|
3563
3569
|
return frames;
|
|
3564
3570
|
}
|
|
@@ -1779,18 +1779,6 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
1779
1779
|
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
1780
1780
|
});
|
|
1781
1781
|
});
|
|
1782
|
-
if (initialMeta.deviceLinks !== void 0) await callDeviceManager(api, "setDeviceLinks", {
|
|
1783
|
-
deviceId: id,
|
|
1784
|
-
deviceLinks: initialMeta.deviceLinks
|
|
1785
|
-
}).catch((err) => {
|
|
1786
|
-
opts.logger.warn("create: setDeviceLinks pre-seed failed", {
|
|
1787
|
-
tags: {
|
|
1788
|
-
stableId,
|
|
1789
|
-
deviceId: id
|
|
1790
|
-
},
|
|
1791
|
-
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
1792
|
-
});
|
|
1793
|
-
});
|
|
1794
1782
|
if (initialMeta.display !== void 0) await callDeviceManager(api, "setDisplay", {
|
|
1795
1783
|
deviceId: id,
|
|
1796
1784
|
display: initialMeta.display
|
|
@@ -3523,6 +3511,16 @@ function encodeFrame(value) {
|
|
|
3523
3511
|
/** Bytes in the big-endian length prefix that opens every frame. */
|
|
3524
3512
|
var HEADER_BYTES = 4;
|
|
3525
3513
|
/**
|
|
3514
|
+
* Copy a frame body out of its backing store before decoding when the store
|
|
3515
|
+
* holds this many bytes MORE than the frame itself. msgpack `bin` fields
|
|
3516
|
+
* decode as VIEWS of the decode input, so one retained field (a state slice,
|
|
3517
|
+
* a forwarded log payload) pins the input's WHOLE backing store — with 64 KiB
|
|
3518
|
+
* socket read chunks that pinned 55k chunks (3.5 GB off-heap) on hub-main.
|
|
3519
|
+
* The exact-fit reassembly path (media frames, `Buffer.concat` sized to the
|
|
3520
|
+
* frame) wastes only the 4-byte header and stays zero-extra-copy.
|
|
3521
|
+
*/
|
|
3522
|
+
var SLAB_WASTE_MAX_BYTES = 4096;
|
|
3523
|
+
/**
|
|
3526
3524
|
* Reassembles length-prefixed MsgPack frames from a byte stream.
|
|
3527
3525
|
*
|
|
3528
3526
|
* **Why this is a chunk LIST and not a growing Buffer.** The original
|
|
@@ -3558,9 +3556,17 @@ var FrameDecoder = class {
|
|
|
3558
3556
|
}
|
|
3559
3557
|
const frames = [];
|
|
3560
3558
|
while (this.buffered >= HEADER_BYTES) {
|
|
3561
|
-
const
|
|
3559
|
+
const len = this.readLength();
|
|
3560
|
+
const total = HEADER_BYTES + len;
|
|
3562
3561
|
if (this.buffered < total) break;
|
|
3563
|
-
|
|
3562
|
+
const frame = this.take(total);
|
|
3563
|
+
const wasted = frame.buffer.byteLength - frame.byteLength;
|
|
3564
|
+
let body;
|
|
3565
|
+
if (wasted > SLAB_WASTE_MAX_BYTES) {
|
|
3566
|
+
body = Buffer.allocUnsafeSlow(len);
|
|
3567
|
+
frame.copy(body, 0, HEADER_BYTES);
|
|
3568
|
+
} else body = frame.subarray(HEADER_BYTES);
|
|
3569
|
+
frames.push(decode(body));
|
|
3564
3570
|
}
|
|
3565
3571
|
return frames;
|
|
3566
3572
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/system",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.63",
|
|
4
4
|
"description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -267,6 +267,9 @@
|
|
|
267
267
|
},
|
|
268
268
|
{
|
|
269
269
|
"name": "user-management"
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"name": "oauth-integration"
|
|
270
273
|
}
|
|
271
274
|
]
|
|
272
275
|
},
|
|
@@ -349,6 +352,7 @@
|
|
|
349
352
|
"bcryptjs": "^3.0.3",
|
|
350
353
|
"better-sqlite3": "^12.8.0",
|
|
351
354
|
"croner": "^10.0.1",
|
|
355
|
+
"esbuild": "^0.27.7",
|
|
352
356
|
"js-yaml": "^4.1.0",
|
|
353
357
|
"jsonwebtoken": "^9.0.0",
|
|
354
358
|
"moleculer": "^0.15.0",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DeviceLink } from '@camstack/types';
|
|
2
|
-
/** The slice of a persisted meta row cycle detection needs. Structural subset
|
|
3
|
-
* of `PersistedDeviceMeta` so tests (and future callers) can pass plain rows. */
|
|
4
|
-
export interface LinkCycleMetaRow {
|
|
5
|
-
readonly id: number;
|
|
6
|
-
readonly stableId: string;
|
|
7
|
-
readonly parentDeviceId: number | null;
|
|
8
|
-
readonly deviceLinks?: readonly DeviceLink[];
|
|
9
|
-
}
|
|
10
|
-
/** Node key of the dependency graph: `${deviceId}:${cap}`. */
|
|
11
|
-
type NodeKey = string;
|
|
12
|
-
/**
|
|
13
|
-
* Detect whether replacing `editedDeviceId`'s links with `editedLinks` closes
|
|
14
|
-
* a dependency cycle. Returns the cycle as an ordered list of node keys
|
|
15
|
-
* (first node repeated at the end) or null when the set is safe.
|
|
16
|
-
*/
|
|
17
|
-
export declare function findDeviceLinkCycle(allMeta: Record<string, LinkCycleMetaRow>, editedDeviceId: number, editedLinks: readonly DeviceLink[]): readonly NodeKey[] | null;
|
|
18
|
-
export {};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { DeviceLink } from '@camstack/types';
|
|
2
|
-
/** A target link with its source already resolved to a live numeric id. */
|
|
3
|
-
export interface ResolvedTargetLink {
|
|
4
|
-
readonly link: DeviceLink;
|
|
5
|
-
/** Resolved source device id for scalar sources; `-1` sentinel for a literal
|
|
6
|
-
* source AND for an expression source (whose per-binding ids live below). */
|
|
7
|
-
readonly sourceDeviceId: number;
|
|
8
|
-
/** Expression links only: binding name → resolved source device id. Literal
|
|
9
|
-
* bindings and unresolved bindings are ABSENT from the map. */
|
|
10
|
-
readonly bindingSourceIds?: Readonly<Record<string, number>>;
|
|
11
|
-
}
|
|
12
|
-
/** A target that depends on a given source slice (for reactive re-emit). */
|
|
13
|
-
export interface DependentLink {
|
|
14
|
-
readonly targetDeviceId: number;
|
|
15
|
-
readonly targetCap: string;
|
|
16
|
-
}
|
|
17
|
-
export interface LinkIndexes {
|
|
18
|
-
/** `${targetDeviceId}:${targetCap}` → the resolved links feeding it. */
|
|
19
|
-
readonly targets: Map<string, ResolvedTargetLink[]>;
|
|
20
|
-
/** `${sourceDeviceId}:${sourceCap}` → targets to recompute on a source change. */
|
|
21
|
-
readonly dependents: Map<string, DependentLink[]>;
|
|
22
|
-
}
|
|
23
|
-
/** One resolved link entry fed to `buildLinkIndexes`. */
|
|
24
|
-
export interface LinkIndexEntry {
|
|
25
|
-
readonly targetDeviceId: number;
|
|
26
|
-
readonly link: DeviceLink;
|
|
27
|
-
/** Resolved scalar source id; `-1` for literal/expression sources. */
|
|
28
|
-
readonly sourceDeviceId: number;
|
|
29
|
-
/** Expression links: binding name → resolved source device id. */
|
|
30
|
-
readonly bindingSourceIds?: Readonly<Record<string, number>>;
|
|
31
|
-
}
|
|
32
|
-
/** Build both lookup maps from resolved link entries. Pure — order-preserving. */
|
|
33
|
-
export declare function buildLinkIndexes(entries: ReadonlyArray<LinkIndexEntry>): LinkIndexes;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { CapabilityStatusItemArray, DeviceLink } from '@camstack/types';
|
|
3
|
-
import { ResolvedTargetLink } from './device-link-overlay.js';
|
|
4
|
-
/** One resolved source reading paired with the link that produced it. The
|
|
5
|
-
* `sourceValue` is already transformed; `undefined` skips the overlay. */
|
|
6
|
-
export interface ResolvedLinkValue {
|
|
7
|
-
readonly link: DeviceLink;
|
|
8
|
-
readonly sourceValue: unknown;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Resolve one link's transformed value. Field sources read via `readField`
|
|
12
|
-
* (the caller supplies the sibling lookup — sync, e.g. the in-hub state
|
|
13
|
-
* mirror); literal sources use their per-device constant and never consult
|
|
14
|
-
* the reader. Returns `undefined` to skip the overlay (unreadable field).
|
|
15
|
-
* Pure. Async source reads (`resolveLinkedStatus`'s provider `getStatus`
|
|
16
|
-
* path) cannot use this helper for field sources — they branch on
|
|
17
|
-
* `source.kind` directly.
|
|
18
|
-
*/
|
|
19
|
-
export declare function resolveLinkValue(link: DeviceLink, readField: (cap: string, fieldPath: string) => unknown): unknown;
|
|
20
|
-
/**
|
|
21
|
-
* Sync-channel expression resolution: bindings read from the mirror via
|
|
22
|
-
* `readField(deviceId, cap, fieldPath)` using the pre-resolved per-binding ids
|
|
23
|
-
* on the `ResolvedTargetLink`. A literal binding uses its constant; an absent
|
|
24
|
-
* binding id (dangling source) or a non-primitive read resolves to `null`.
|
|
25
|
-
* Returns `undefined` on parse/eval failure (skip overlay) — silent by design:
|
|
26
|
-
* the mirror path is hot and churn-free; the async channel logs. Compile
|
|
27
|
-
* failures cost one parse ever thanks to the negative LRU compile cache. Pure.
|
|
28
|
-
*/
|
|
29
|
-
export declare function resolveExpressionLinkValue(rl: ResolvedTargetLink, readField: (deviceId: number, cap: string, fieldPath: string) => unknown, now: number): unknown;
|
|
30
|
-
/**
|
|
31
|
-
* Overlay transformed source values onto `base` by dot-path, then validate the
|
|
32
|
-
* result against the target cap's `statusSchema`. On validation failure the
|
|
33
|
-
* overlay is discarded and `base` is returned unchanged (a misconfigured link
|
|
34
|
-
* must never corrupt a cap response). Pure — all I/O happens in the caller.
|
|
35
|
-
*
|
|
36
|
-
* Item-array grouping (P2b): when the cap declares `status.itemArray`, links
|
|
37
|
-
* carrying a `target.itemKey` are grouped per key and upserted as items into
|
|
38
|
-
* the array (see `upsertItemArrayLinks`); their `fieldPath` is relative to
|
|
39
|
-
* ONE item ('level', 'status', 'label'). Links WITHOUT an itemKey keep the
|
|
40
|
-
* scalar dot-path behavior unchanged. A link with an itemKey on a cap that
|
|
41
|
-
* declares NO `itemArray` is dropped (its item-relative path must never be
|
|
42
|
-
* scalar-applied to the status root).
|
|
43
|
-
*/
|
|
44
|
-
export declare function mergeLinkedStatus(base: Record<string, unknown>, resolved: readonly ResolvedLinkValue[], statusSchema?: z.ZodType, itemArray?: CapabilityStatusItemArray): Record<string, unknown>;
|