@camstack/system 1.2.119 → 1.2.121

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.
@@ -22,6 +22,16 @@ export declare class SqliteSettingsAddon extends BaseAddon {
22
22
  private vectorIndex;
23
23
  private walMaintenance;
24
24
  constructor();
25
+ /**
26
+ * The engine behind `settings-store` cannot read that door during
27
+ * `initialize()`. `BaseAddon` always `await`s `resolveConfig()` first;
28
+ * on an isolated sqlite that round-trip is a UDS call to the parent,
29
+ * and the parent is waiting for THIS child's post-init handshake before
30
+ * it builds the door (D233). Live 1.2.152: 30 s hang, timeout, every
31
+ * in-process builtin skipped, then this addon finished one second later.
32
+ * Constructor defaults (`{}`) are the whole config this addon has.
33
+ */
34
+ protected resolveConfig(): Promise<void>;
25
35
  protected onInitialize(): Promise<ProviderRegistration[]>;
26
36
  protected onShutdown(): Promise<void>;
27
37
  getBackend(): SqliteSettingsBackend | null;
@@ -1727,6 +1727,16 @@ var SqliteSettingsAddon = class extends require_dist.BaseAddon {
1727
1727
  constructor() {
1728
1728
  super({});
1729
1729
  }
1730
+ /**
1731
+ * The engine behind `settings-store` cannot read that door during
1732
+ * `initialize()`. `BaseAddon` always `await`s `resolveConfig()` first;
1733
+ * on an isolated sqlite that round-trip is a UDS call to the parent,
1734
+ * and the parent is waiting for THIS child's post-init handshake before
1735
+ * it builds the door (D233). Live 1.2.152: 30 s hang, timeout, every
1736
+ * in-process builtin skipped, then this addon finished one second later.
1737
+ * Constructor defaults (`{}`) are the whole config this addon has.
1738
+ */
1739
+ async resolveConfig() {}
1730
1740
  async onInitialize() {
1731
1741
  const addonId = require_dist.bareAddonId(this.ctx.id);
1732
1742
  const path = await import("node:path");
@@ -1721,6 +1721,16 @@ var SqliteSettingsAddon = class extends BaseAddon {
1721
1721
  constructor() {
1722
1722
  super({});
1723
1723
  }
1724
+ /**
1725
+ * The engine behind `settings-store` cannot read that door during
1726
+ * `initialize()`. `BaseAddon` always `await`s `resolveConfig()` first;
1727
+ * on an isolated sqlite that round-trip is a UDS call to the parent,
1728
+ * and the parent is waiting for THIS child's post-init handshake before
1729
+ * it builds the door (D233). Live 1.2.152: 30 s hang, timeout, every
1730
+ * in-process builtin skipped, then this addon finished one second later.
1731
+ * Constructor defaults (`{}`) are the whole config this addon has.
1732
+ */
1733
+ async resolveConfig() {}
1724
1734
  async onInitialize() {
1725
1735
  const addonId = bareAddonId(this.ctx.id);
1726
1736
  const path = await import("node:path");
package/dist/index.js CHANGED
@@ -6661,6 +6661,22 @@ function partitionIsolatedBuiltinIds(ids, capabilitiesOf) {
6661
6661
  consumers
6662
6662
  };
6663
6663
  }
6664
+ /**
6665
+ * Spawn of an infra isolate returns when the child process exists, not when
6666
+ * its UDS handshake has put the engine in the parent's `getCollection`.
6667
+ * In-process builtins that read the door before that handshake throw D44
6668
+ * ("nothing behind it") and are skipped for the rest of the boot.
6669
+ */
6670
+ async function waitUntilReady(isReady, options) {
6671
+ const deadline = Date.now() + options.timeoutMs;
6672
+ for (;;) {
6673
+ if (isReady()) return;
6674
+ if (Date.now() >= deadline) throw new Error(`Timed out waiting for ${options.what}`);
6675
+ await new Promise((resolve) => {
6676
+ setTimeout(resolve, options.intervalMs);
6677
+ });
6678
+ }
6679
+ }
6664
6680
  //#endregion
6665
6681
  //#region src/kernel/settings-door-view.ts
6666
6682
  function isRecord$1(value) {
@@ -95311,6 +95327,7 @@ exports.subscribePassthrough = require_manifest_python_deps.subscribePassthrough
95311
95327
  exports.udsChildLogToWorkerEntry = require_manifest_python_deps.udsChildLogToWorkerEntry;
95312
95328
  exports.validateProviderRegistrations = require_manifest_python_deps.validateProviderRegistrations;
95313
95329
  exports.validateUploadedTls = require_lan_http_bind.validateUploadedTls;
95330
+ exports.waitUntilReady = waitUntilReady;
95314
95331
  exports.writeExtraSans = require_lan_http_bind.writeExtraSans;
95315
95332
  exports.writePendingRestart = writePendingRestart;
95316
95333
  exports.writeTlsMode = require_lan_http_bind.writeTlsMode;
package/dist/index.mjs CHANGED
@@ -6654,6 +6654,22 @@ function partitionIsolatedBuiltinIds(ids, capabilitiesOf) {
6654
6654
  consumers
6655
6655
  };
6656
6656
  }
6657
+ /**
6658
+ * Spawn of an infra isolate returns when the child process exists, not when
6659
+ * its UDS handshake has put the engine in the parent's `getCollection`.
6660
+ * In-process builtins that read the door before that handshake throw D44
6661
+ * ("nothing behind it") and are skipped for the rest of the boot.
6662
+ */
6663
+ async function waitUntilReady(isReady, options) {
6664
+ const deadline = Date.now() + options.timeoutMs;
6665
+ for (;;) {
6666
+ if (isReady()) return;
6667
+ if (Date.now() >= deadline) throw new Error(`Timed out waiting for ${options.what}`);
6668
+ await new Promise((resolve) => {
6669
+ setTimeout(resolve, options.intervalMs);
6670
+ });
6671
+ }
6672
+ }
6657
6673
  //#endregion
6658
6674
  //#region src/kernel/settings-door-view.ts
6659
6675
  function isRecord$1(value) {
@@ -94974,4 +94990,4 @@ var LifecycleJobEngine = class {
94974
94990
  }
94975
94991
  };
94976
94992
  //#endregion
94977
- 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, 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, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, 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, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LokiDestination, LokiLoggingAddon, MAX_LEAF_VALIDITY_DAYS, 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, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, 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, allFamiliesListenHost, applyLanHttp, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createDoorSettingsView, 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, evaluateExistingCert, 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, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readLanHttpState, readPendingRestart, readTlsAccessStatus, readTlsMode, readinessKey, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runNpm, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, writeExtraSans, writePendingRestart, writeTlsMode };
94993
+ 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, 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, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, 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, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LokiDestination, LokiLoggingAddon, MAX_LEAF_VALIDITY_DAYS, 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, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, 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, allFamiliesListenHost, applyLanHttp, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createDoorSettingsView, 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, evaluateExistingCert, 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, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readLanHttpState, readPendingRestart, readTlsAccessStatus, readTlsMode, readinessKey, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runNpm, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
@@ -21,8 +21,8 @@ export type { CapabilityRouter, CapabilityRouterFactory, ConfigReader, ProviderO
21
21
  export { CustomActionRegistry, type CustomActionEntry } from './custom-action-registry.js';
22
22
  export { INFRA_CAPABILITIES, isInfraCapability } from './infra-capabilities.js';
23
23
  export type { InfraCapability } from './infra-capabilities.js';
24
- export { isolatedBuiltinPhase, partitionIsolatedBuiltinIds, } from './isolated-builtin-phase.js';
25
- export type { IsolatedBuiltinPhase, IsolatedBuiltinWaves, CapabilityName, } from './isolated-builtin-phase.js';
24
+ export { isolatedBuiltinPhase, partitionIsolatedBuiltinIds, waitUntilReady, } from './isolated-builtin-phase.js';
25
+ export type { IsolatedBuiltinPhase, IsolatedBuiltinWaves, CapabilityName, WaitUntilReadyOptions, } from './isolated-builtin-phase.js';
26
26
  export { createDoorSettingsView } from './settings-door-view.js';
27
27
  export { ConfigManager } from './config-manager.js';
28
28
  export type { ISettingsStore } from './config-manager.js';
@@ -19,3 +19,15 @@ export interface IsolatedBuiltinWaves {
19
19
  readonly consumers: readonly string[];
20
20
  }
21
21
  export declare function partitionIsolatedBuiltinIds(ids: readonly string[], capabilitiesOf: (id: string) => readonly CapabilityName[]): IsolatedBuiltinWaves;
22
+ export interface WaitUntilReadyOptions {
23
+ readonly timeoutMs: number;
24
+ readonly intervalMs: number;
25
+ readonly what: string;
26
+ }
27
+ /**
28
+ * Spawn of an infra isolate returns when the child process exists, not when
29
+ * its UDS handshake has put the engine in the parent's `getCollection`.
30
+ * In-process builtins that read the door before that handshake throw D44
31
+ * ("nothing behind it") and are skipped for the rest of the boot.
32
+ */
33
+ export declare function waitUntilReady(isReady: () => boolean, options: WaitUntilReadyOptions): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/system",
3
- "version": "1.2.119",
3
+ "version": "1.2.121",
4
4
  "description": "Core addon for CamStack — builtins, pipeline, process management, auth, logging, events",
5
5
  "keywords": [
6
6
  "camstack",