@camstack/server 1.2.762 → 1.2.764

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 (92) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/api/core/cap-providers.js +21 -2
  3. package/dist/api/trpc/generated-cap-routers.js +10 -0
  4. package/dist/core/addon/integration-visibility.js +1 -0
  5. package/package.json +12 -19
  6. package/system/dist/addon-utils.mjs +1 -1
  7. package/system/dist/{agent-https-UksJdbes.mjs → agent-https-CJmfFcZE.mjs} +1 -1
  8. package/system/dist/{agent-https-BHpDnJr0.js → agent-https-DH_lJHh9.js} +1 -1
  9. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  10. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  11. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  12. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  13. package/system/dist/builtins/alerts/alerts.addon.d.ts +7 -0
  14. package/system/dist/builtins/alerts/alerts.addon.js +50 -3
  15. package/system/dist/builtins/alerts/alerts.addon.mjs +50 -3
  16. package/system/dist/builtins/autotrack/index.js +1 -1
  17. package/system/dist/builtins/autotrack/index.mjs +1 -1
  18. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  19. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  20. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  21. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  22. package/system/dist/builtins/camera-grid/index.js +1 -1
  23. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  24. package/system/dist/builtins/composer/composer.addon.js +3 -3
  25. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  26. package/system/dist/builtins/console-logging/index.js +1 -1
  27. package/system/dist/builtins/console-logging/index.mjs +1 -1
  28. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  29. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  30. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  31. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  32. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  33. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  34. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  35. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  36. package/system/dist/builtins/keychain/index.js +3 -3
  37. package/system/dist/builtins/keychain/index.mjs +3 -3
  38. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  39. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  40. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  41. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  42. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  43. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  44. package/system/dist/builtins/loki-logging/index.js +1 -1
  45. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  46. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  47. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  48. package/system/dist/builtins/platform-probe/index.js +1 -1
  49. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  50. package/system/dist/builtins/record-entries/index.js +1 -1
  51. package/system/dist/builtins/record-entries/index.mjs +1 -1
  52. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  53. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  54. package/system/dist/builtins/snapshot/index.js +1 -1
  55. package/system/dist/builtins/snapshot/index.mjs +1 -1
  56. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  57. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  58. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  59. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  60. package/system/dist/builtins/sqlite-storage/integration-rows-ports.d.ts +14 -0
  61. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +7 -3
  62. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +7 -3
  63. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  64. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  65. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  66. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  67. package/system/dist/builtins/winston-logging/index.js +1 -1
  68. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  69. package/system/dist/{capture-engine-Btq9LseJ.mjs → capture-engine-CQUJKdm-.mjs} +1 -1
  70. package/system/dist/{capture-engine-DgcmHuIi.js → capture-engine-IOE87CGh.js} +1 -1
  71. package/system/dist/{composition-sources-xyPI-9ja.mjs → composition-sources-C4FTY6tR.mjs} +1 -1
  72. package/system/dist/{composition-sources-DrGLoV8D.js → composition-sources-d0b3s931.js} +1 -1
  73. package/system/dist/{constants-B8q9KsGq.mjs → constants-BbSsUU8s.mjs} +1 -1
  74. package/system/dist/{constants-BiE3GU1C.js → constants-Bf3S16sn.js} +1 -1
  75. package/system/dist/{coral-accelerators-DBlgWB8k.mjs → coral-accelerators-BW3OcrLD.mjs} +6 -6
  76. package/system/dist/{custom-action-registry-oHl1xltx.mjs → custom-action-registry-BIJZBObd.mjs} +37 -37
  77. package/system/dist/{device-ca-Bel2vDyJ.js → device-ca-BTCCvC-f.js} +1 -1
  78. package/system/dist/{device-ca-D5U9i2AO.mjs → device-ca-DtVxvkgh.mjs} +1 -1
  79. package/system/dist/{dist-Dd_vXorK.mjs → dist-DRMDBvu-.mjs} +36 -5
  80. package/system/dist/{dist-B6-AUY2T.js → dist-DcyjtBjf.js} +36 -5
  81. package/system/dist/file-host-worker.js +1 -1
  82. package/system/dist/file-host-worker.mjs +1 -1
  83. package/system/dist/{hub-mdns-ciao-Dz9w_pd0.mjs → hub-mdns-ciao-Cljo9BPS.mjs} +2 -2
  84. package/system/dist/{hub-mdns-ciao-DV7bwoub.js → hub-mdns-ciao-DTY0nvBg.js} +2 -2
  85. package/system/dist/index.d.ts +1 -0
  86. package/system/dist/index.js +31 -7
  87. package/system/dist/index.mjs +242 -219
  88. package/system/dist/{restore-archive-BcdcInFR.mjs → restore-archive-5dvmYOeA.mjs} +94 -94
  89. package/system/dist/{restore-archive-BcstsRhG.js → restore-archive-94Ko0oT3.js} +1 -1
  90. package/system/dist/{wal-maintenance-Ctp8Q-y7.mjs → wal-maintenance-C1L9D5dT.mjs} +0 -0
  91. package/system/dist/{wal-maintenance-CzjpuF7n.js → wal-maintenance-uH7RcUuL.js} +0 -0
  92. package/system/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { i as __require } from "./chunk-CNf5ZN-e.mjs";
2
- import { Ci as objectInputDeclaresRequiredDeviceId, Do as DATAPLANE_SECRET_HEADER$1, E as CatalogFileSchema, Ea as supportedRuntimes, Eo as CALLER_STAMPED_CAPABILITIES$1, Go as ReadinessRegistry, Gr as isVoidInput, Gs as parseJsonUnknown, Ii as procedureAuthKey, Ko as ReadinessTimeoutError, Kr as kebabToCamel$1, Lr as isArrayOutputSchema, Nr as interpolate, Oo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Os as isDebugChannelName, Qi as resolveMethodAuth, Rr as isCollectionArrayMethod, Si as objectInputDeclaresAddonId, Ss as expandCapMethods, Ur as isObjectInput, Wo as RUNTIME_DEFAULTS, Ws as parseJsonObject, Ys as resolveCapMount, Zr as lifecycleJobSchema, Zs as scopeKey, a as AGENT_MDNS_TXT_KEYS, ac as userError, ai as looseSchema, as as asNumber, bs as emitDownForOwnedCaps, bt as METHOD_ACCESS_MAP, ca as scopesAllowDeviceCap, dc as EventCategory$1, fs as collectSecretMarkerRefs, i as AGENT_MDNS_SERVICE_TYPE, ii as logLevelAtMost, is as asJsonObject$1, ko as DEVICE_STATUS_METHOD, ln as addonSettingsCapability, ms as createEvent$1, o as ALL_CAPABILITY_DEFINITIONS, oc as withoutCallerStamp, os as asString$1, qs as readinessKey, sa as scopesAllowAddon, uc as errMsg$1, va as splitTranslationRef, vn as bareAddonId, vt as LOG_LEVEL_RANK, ws as getDebugInterest, y as CATALOG_LANGS, yr as extractNestedAddonId, ys as defineRecordKinds } from "./dist-Dd_vXorK.mjs";
3
- import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-D5U9i2AO.mjs";
2
+ import { Ci as objectInputDeclaresRequiredDeviceId, Do as DATAPLANE_SECRET_HEADER$1, E as CatalogFileSchema, Ea as supportedRuntimes, Eo as CALLER_STAMPED_CAPABILITIES$1, Go as ReadinessRegistry, Gr as isVoidInput, Gs as parseJsonUnknown, Ii as procedureAuthKey, Ko as ReadinessTimeoutError, Kr as kebabToCamel$1, Lr as isArrayOutputSchema, Nr as interpolate, Oo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Os as isDebugChannelName, Qi as resolveMethodAuth, Rr as isCollectionArrayMethod, Si as objectInputDeclaresAddonId, Ss as expandCapMethods, Ur as isObjectInput, Wo as RUNTIME_DEFAULTS, Ws as parseJsonObject, Ys as resolveCapMount, Zr as lifecycleJobSchema, Zs as scopeKey, a as AGENT_MDNS_TXT_KEYS, ac as userError, ai as looseSchema, as as asNumber, bs as emitDownForOwnedCaps, bt as METHOD_ACCESS_MAP, ca as scopesAllowDeviceCap, dc as EventCategory$1, fs as collectSecretMarkerRefs, i as AGENT_MDNS_SERVICE_TYPE, ii as logLevelAtMost, is as asJsonObject$1, ko as DEVICE_STATUS_METHOD, ln as addonSettingsCapability, ms as createEvent$1, o as ALL_CAPABILITY_DEFINITIONS, oc as withoutCallerStamp, os as asString$1, qs as readinessKey, sa as scopesAllowAddon, uc as errMsg$1, va as splitTranslationRef, vn as bareAddonId, vt as LOG_LEVEL_RANK, ws as getDebugInterest, y as CATALOG_LANGS, yr as extractNestedAddonId, ys as defineRecordKinds } from "./dist-DRMDBvu-.mjs";
3
+ import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-DtVxvkgh.mjs";
4
4
  import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
5
5
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
6
6
  import "./builtins/alerts/index.mjs";
@@ -25,22 +25,22 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
25
25
  import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
26
26
  import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
27
27
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
28
- import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-Ctp8Q-y7.mjs";
28
+ import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-C1L9D5dT.mjs";
29
29
  import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
30
30
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
31
31
  import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, l as STORAGE_DRAIN_STATE_LEGACY, n as HUB_CAP_FWD_ACTION, o as buildStorageLocationRegistry, r as HUB_CAP_FWD_SERVICE, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
32
32
  import "./builtins/storage-orchestrator/index.mjs";
33
- import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-UksJdbes.mjs";
34
- import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-B8q9KsGq.mjs";
33
+ import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-CJmfFcZE.mjs";
34
+ import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-BbSsUU8s.mjs";
35
35
  import { $ as caFingerprintCompact, A as getProcessNodeMeshTransport, B as MESH_NODE_CERTIFICATES_COLLECTION, C as MESH_TLS_PORT_HELLO_FIELD, Ct as readOriginSetting, D as setProcessMeshTlsEnabler, Dt as readCidrSetting, E as ServiceBroker, Et as parseCidrList, F as renewMeshCertificate, G as getProcessMeshCertificateRegistry, H as MeshCertificateRegistry, I as revokeMeshCertificate, J as processMeshCrl, K as setProcessMeshCertificateRegistry, L as getProcessMeshTlsListenerState, M as isProcessVerifiedMeshPeer, N as onProcessNodeRegistered, O as dropProcessPeer, P as setProcessMeshPeerTransportLookup, Q as caFingerprint, R as openMeshTlsWhenRevocationsLoaded, S as verifyMembershipAnswer, St as parseOriginList, SystemConfigAddon, T as Errors, Tt as normalizeIp, U as RENEWAL_ABANDONED, V as MESH_NODE_CERTIFICATES_COLUMNS, W as describeMeshLeaf, X as getProcessMeshCaState, Y as MeshCaKeeper, Z as requireProcessMeshCa, _ as signPairingProof, _t as verifyAgentUiUnlockTicket, a as hubHostFromMeshAddress, at as issueMeshLeafForNode, b as MembershipResponder, bt as isInsecureOrigin, c as PAIRING_MAX_SESSIONS, ct as AGENT_DASHBOARD_ORIGINS_FIELD, d as PAIRING_PROTOCOL, dt as AGENT_UI_UNLOCK_USE, et as createMeshCsrPem, f as PAIRING_TTL_MS, ft as AGENT_UI_UNLOCK_VERSION, g as keyFingerprintShort, gt as parseAgentDashboardOrigins, h as describeCsr, ht as mintAgentUiUnlockTicket, i as AgentPairing, it as isValidAgentNodeId, j as getProcessPeerLeaf, k as emitProcessNodeRegistered, l as PAIRING_PATHS, lt as AGENT_UI_UNLOCK_TTL_MS, m as computePairingSas, mt as isAllowedAgentDashboardReturnTo, n as HubPairing, nt as generateMeshCa, o as PAIRING_CODE_DIGITS, ot as issueMeshLeafFromCsr, p as computePairingCommitment, pt as UnlockTicketJtiStore, q as MeshCrl, r as PairingHttpError, rt as generateMeshKeyPair, s as PAIRING_MAX_CODE_ATTEMPTS, st as loadMeshCa, tt as exportMeshPrivateKeyPem, u as PAIRING_PIN_DIGITS, ut as AGENT_UI_UNLOCK_TYP, v as verifyPairingProof, vt as InvalidCorsOriginError, w as TlsTcpTransporter, wt as createCidrMatcher, x as signMembershipProof, xt as normalizeOrigin, y as MEMBERSHIP_PATHS, yt as OPAQUE_ORIGIN, z as setProcessMeshTlsListenerState } from "./builtins/system-config/system-config.addon.mjs";
36
36
  import "./builtins/system-config/index.mjs";
37
37
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
38
- import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-oHl1xltx.mjs";
39
- import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-Dz9w_pd0.mjs";
38
+ import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-BIJZBObd.mjs";
39
+ import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-Cljo9BPS.mjs";
40
40
  import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
41
41
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
42
- import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-BcdcInFR.mjs";
43
- import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
42
+ import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-5dvmYOeA.mjs";
43
+ import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-BW3OcrLD.mjs";
44
44
  import { z } from "zod";
45
45
  import * as crypto$1 from "node:crypto";
46
46
  import { createHash, randomBytes, randomUUID } from "node:crypto";
@@ -55,7 +55,7 @@ import { BOOT_RECOVERY_BACKOFF_MS, CALLER_STAMPED_CAPABILITIES, DATAPLANE_SECRET
55
55
  import * as os$1 from "node:os";
56
56
  import { tmpdir } from "node:os";
57
57
  import { pathToFileURL } from "node:url";
58
- import * as fs$1 from "node:fs";
58
+ import * as fs from "node:fs";
59
59
  import { accessSync, constants, createReadStream, createWriteStream, existsSync, readFileSync, readdirSync } from "node:fs";
60
60
  import { execFile, spawn } from "node:child_process";
61
61
  import { once } from "node:events";
@@ -5113,7 +5113,7 @@ var PythonEnvManager = class {
5113
5113
  async ensure(options) {
5114
5114
  const probe = await this.probe();
5115
5115
  if (!probe.available || !probe.path) throw userError("system.python-required", void 0, "Python 3.10+ is required but not found on this system");
5116
- if (!fs$1.existsSync(path$1.join(this.venvPath, "bin", "python"))) await execFileAsync$7(probe.path, [
5116
+ if (!fs.existsSync(path$1.join(this.venvPath, "bin", "python"))) await execFileAsync$7(probe.path, [
5117
5117
  "-m",
5118
5118
  "venv",
5119
5119
  this.venvPath
@@ -5136,7 +5136,7 @@ var PythonEnvManager = class {
5136
5136
  }
5137
5137
  spawn(script, args) {
5138
5138
  const venvPython = path$1.join(this.venvPath, "bin", "python");
5139
- if (!fs$1.existsSync(venvPython)) throw new Error("Python venv not initialized. Call ensure() first.");
5139
+ if (!fs.existsSync(venvPython)) throw new Error("Python venv not initialized. Call ensure() first.");
5140
5140
  return spawn(venvPython, [script, ...args]);
5141
5141
  }
5142
5142
  };
@@ -5488,20 +5488,20 @@ var StorageManager = class {
5488
5488
  const basePath = this.locationManager.getBackend(mappedName).basePath;
5489
5489
  location.files = {
5490
5490
  async readFile(p) {
5491
- return fs$1.promises.readFile(path$1.join(basePath, p));
5491
+ return fs.promises.readFile(path$1.join(basePath, p));
5492
5492
  },
5493
5493
  async writeFile(p, data) {
5494
5494
  const full = path$1.join(basePath, p);
5495
- await fs$1.promises.mkdir(path$1.dirname(full), { recursive: true });
5496
- await fs$1.promises.writeFile(full, data);
5495
+ await fs.promises.mkdir(path$1.dirname(full), { recursive: true });
5496
+ await fs.promises.writeFile(full, data);
5497
5497
  },
5498
5498
  async deleteFile(p) {
5499
- await fs$1.promises.rm(path$1.join(basePath, p), { force: true });
5499
+ await fs.promises.rm(path$1.join(basePath, p), { force: true });
5500
5500
  },
5501
5501
  async listFiles(prefix) {
5502
5502
  const dir = prefix ? path$1.join(basePath, prefix) : basePath;
5503
5503
  try {
5504
- return (await fs$1.promises.readdir(dir)).map((f) => prefix ? `${prefix}/${f}` : f);
5504
+ return (await fs.promises.readdir(dir)).map((f) => prefix ? `${prefix}/${f}` : f);
5505
5505
  } catch {
5506
5506
  return [];
5507
5507
  }
@@ -5511,7 +5511,7 @@ var StorageManager = class {
5511
5511
  },
5512
5512
  async exists(p) {
5513
5513
  try {
5514
- await fs$1.promises.access(path$1.join(basePath, p));
5514
+ await fs.promises.access(path$1.join(basePath, p));
5515
5515
  return true;
5516
5516
  } catch {
5517
5517
  return false;
@@ -6197,6 +6197,29 @@ var IntegrationRegistry = class IntegrationRegistry {
6197
6197
  }
6198
6198
  };
6199
6199
  //#endregion
6200
+ //#region src/builtins/sqlite-storage/integration-rows-ports.ts
6201
+ /**
6202
+ * The system-side ports of `moveIntegrationRowsToRecords` (planning#416): the legacy
6203
+ * `integration_settings` rows are read through the registry and their secrets resolved through the
6204
+ * integration's OWNER keychain door (never exposed further), and cleared together with their
6205
+ * keychain values. The addon's own record kind is reached through its records handle.
6206
+ */
6207
+ /**
6208
+ * The hub-side "clear rows" operation: delete one integration's legacy setting rows AND the
6209
+ * keychain values they pointed at (values first, so a failed delete leaves the rows to retry). The integration itself stays. A rerun on cleared rows is a
6210
+ * no-op. Counts only; never a value.
6211
+ */
6212
+ async function clearIntegrationRows(deps, integrationId) {
6213
+ const stored = await deps.registry.getIntegrationSettings(integrationId);
6214
+ const refs = collectSecretMarkerRefs(stored);
6215
+ if (refs.length > 0 && deps.secrets !== null) await deps.secrets.delete(refs);
6216
+ await deps.registry.clearIntegrationSettings(integrationId);
6217
+ return {
6218
+ rows: Object.keys(stored).length,
6219
+ secrets: refs.length
6220
+ };
6221
+ }
6222
+ //#endregion
6200
6223
  //#region src/builtins/cluster-agent/record-kinds.ts
6201
6224
  /**
6202
6225
  * Record kinds owned by cluster-agent (phase 4 — hub-main).
@@ -6305,7 +6328,7 @@ var TRADITIONAL_NATIVE_PACKAGES = ["better-sqlite3"];
6305
6328
  function hasDotNode(dir, maxDepth) {
6306
6329
  let entries;
6307
6330
  try {
6308
- entries = fs$1.readdirSync(dir, { withFileTypes: true });
6331
+ entries = fs.readdirSync(dir, { withFileTypes: true });
6309
6332
  } catch {
6310
6333
  return false;
6311
6334
  }
@@ -6316,7 +6339,7 @@ function hasDotNode(dir, maxDepth) {
6316
6339
  }
6317
6340
  /** Locate the bundled `prebuild-install` bin.js inside the staged closure. */
6318
6341
  function resolvePrebuildInstallBin(closureDir, moduleDir) {
6319
- return [path$1.join(moduleDir, "node_modules", "prebuild-install", "bin.js"), path$1.join(closureDir, "node_modules", "prebuild-install", "bin.js")].find((c) => fs$1.existsSync(c)) ?? null;
6342
+ return [path$1.join(moduleDir, "node_modules", "prebuild-install", "bin.js"), path$1.join(closureDir, "node_modules", "prebuild-install", "bin.js")].find((c) => fs.existsSync(c)) ?? null;
6320
6343
  }
6321
6344
  /**
6322
6345
  * Default fetcher: run the closure's own `prebuild-install` under the CURRENT
@@ -6369,7 +6392,7 @@ async function ensureNativePrebuilds(closureDir, options) {
6369
6392
  const fetched = [];
6370
6393
  for (const pkg of packages) {
6371
6394
  const moduleDir = path$1.join(nm, pkg);
6372
- if (!fs$1.existsSync(moduleDir)) continue;
6395
+ if (!fs.existsSync(moduleDir)) continue;
6373
6396
  if (hasDotNode(moduleDir, 4)) continue;
6374
6397
  options.logger.warn("staged closure native prebuild missing — fetching for running ABI", { meta: {
6375
6398
  pkg,
@@ -6432,12 +6455,12 @@ async function ensureNativePrebuilds(closureDir, options) {
6432
6455
  function replantFromBundled(srcModuleDir, dstModuleDir, hasNative) {
6433
6456
  if (!hasNative(srcModuleDir)) return false;
6434
6457
  try {
6435
- fs$1.rmSync(dstModuleDir, {
6458
+ fs.rmSync(dstModuleDir, {
6436
6459
  recursive: true,
6437
6460
  force: true
6438
6461
  });
6439
- fs$1.mkdirSync(path$1.dirname(dstModuleDir), { recursive: true });
6440
- fs$1.cpSync(srcModuleDir, dstModuleDir, {
6462
+ fs.mkdirSync(path$1.dirname(dstModuleDir), { recursive: true });
6463
+ fs.cpSync(srcModuleDir, dstModuleDir, {
6441
6464
  recursive: true,
6442
6465
  dereference: true
6443
6466
  });
@@ -6466,7 +6489,7 @@ async function ensureAddonNativePrebuilds(addonDir, options) {
6466
6489
  const missing = [];
6467
6490
  for (const pkg of packages) {
6468
6491
  const moduleDir = path$1.join(nm, pkg);
6469
- if (!fs$1.existsSync(moduleDir)) continue;
6492
+ if (!fs.existsSync(moduleDir)) continue;
6470
6493
  if (hasNative(moduleDir)) {
6471
6494
  results.push({
6472
6495
  pkg,
@@ -6565,7 +6588,7 @@ async function defaultDownloadTarball(url, destTgz) {
6565
6588
  const res = await fetch(url);
6566
6589
  if (!res.ok || !res.body) throw new Error(`HTTP ${res.status} downloading ${url}`);
6567
6590
  const bytes = Buffer.from(await res.arrayBuffer());
6568
- await fs$1.promises.writeFile(destTgz, bytes);
6591
+ await fs.promises.writeFile(destTgz, bytes);
6569
6592
  }
6570
6593
  async function defaultExtractTarball(tgzPath, destDir) {
6571
6594
  await execFileAsync$5("tar", [
@@ -6651,7 +6674,7 @@ async function resolveUncached(options) {
6651
6674
  argsPrefix: []
6652
6675
  };
6653
6676
  const cliPath = bootstrappedCliPath(options.cacheDir);
6654
- if (fs$1.existsSync(cliPath)) {
6677
+ if (fs.existsSync(cliPath)) {
6655
6678
  options.logger.info("system npm unavailable — using bootstrapped npm", { meta: { cliPath } });
6656
6679
  return {
6657
6680
  command: process.execPath,
@@ -6663,12 +6686,12 @@ async function resolveUncached(options) {
6663
6686
  const registry = (options.registry ?? DEFAULT_REGISTRY).replace(/\/+$/, "");
6664
6687
  const tarballUrl = tarballUrlOf(await (options.fetchJson ?? defaultFetchJson)(`${registry}/npm/latest`));
6665
6688
  if (!tarballUrl) throw new Error(`registry metadata for 'npm' carries no dist.tarball (${registry})`);
6666
- await fs$1.promises.mkdir(options.cacheDir, { recursive: true });
6689
+ await fs.promises.mkdir(options.cacheDir, { recursive: true });
6667
6690
  const tgzPath = path$1.join(options.cacheDir, "npm-bootstrap.tgz");
6668
6691
  await (options.downloadTarball ?? defaultDownloadTarball)(tarballUrl, tgzPath);
6669
6692
  await (options.extractTarball ?? defaultExtractTarball)(tgzPath, options.cacheDir);
6670
- await fs$1.promises.rm(tgzPath, { force: true });
6671
- if (!fs$1.existsSync(cliPath)) throw new Error(`extracted npm tarball is missing ${cliPath}`);
6693
+ await fs.promises.rm(tgzPath, { force: true });
6694
+ if (!fs.existsSync(cliPath)) throw new Error(`extracted npm tarball is missing ${cliPath}`);
6672
6695
  options.logger.info("npm bootstrapped", { meta: { cliPath } });
6673
6696
  return {
6674
6697
  command: process.execPath,
@@ -6734,7 +6757,7 @@ function readOwningPackageVersion(entryPath) {
6734
6757
  let dir = path$1.dirname(entryPath);
6735
6758
  for (let hop = 0; hop < PACKAGE_JSON_LOOKUP_DEPTH; hop++) {
6736
6759
  try {
6737
- const version = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8")))?.["version"];
6760
+ const version = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8")))?.["version"];
6738
6761
  if (typeof version === "string" && version.length > 0) return version;
6739
6762
  } catch {}
6740
6763
  const parent = path$1.dirname(dir);
@@ -6778,14 +6801,14 @@ function readOwningPackageVersion(entryPath) {
6778
6801
  function addonModuleCacheKey(entryPath) {
6779
6802
  let stat;
6780
6803
  try {
6781
- stat = fs$1.statSync(entryPath);
6804
+ stat = fs.statSync(entryPath);
6782
6805
  } catch {
6783
6806
  return null;
6784
6807
  }
6785
6808
  const version = readOwningPackageVersion(entryPath) ?? `m${stat.mtimeMs}`;
6786
6809
  let content;
6787
6810
  try {
6788
- content = createHash("sha1").update(fs$1.readFileSync(entryPath)).digest("hex").slice(0, 16);
6811
+ content = createHash("sha1").update(fs.readFileSync(entryPath)).digest("hex").slice(0, 16);
6789
6812
  } catch {
6790
6813
  content = `m${stat.mtimeMs}s${stat.size}`;
6791
6814
  }
@@ -6889,14 +6912,14 @@ var AddonLoader = class {
6889
6912
  * BUILTINS from the active closure, not the (now-inert) addons-dir copy, so
6890
6913
  * the addons-dir `@camstack/server/system` must NOT be double-loaded here. */
6891
6914
  async loadFromDirectory(addonsDir, skipPackages = []) {
6892
- if (!fs$1.existsSync(addonsDir)) return;
6915
+ if (!fs.existsSync(addonsDir)) return;
6893
6916
  const skip = new Set(skipPackages);
6894
- const entries = fs$1.readdirSync(addonsDir, { withFileTypes: true });
6917
+ const entries = fs.readdirSync(addonsDir, { withFileTypes: true });
6895
6918
  for (const entry of entries) {
6896
6919
  if (!isDirectoryEntry(entry, addonsDir)) continue;
6897
6920
  if (entry.name.startsWith("@")) {
6898
6921
  const scopeDir = path$1.join(addonsDir, entry.name);
6899
- const scopeEntries = fs$1.readdirSync(scopeDir, { withFileTypes: true });
6922
+ const scopeEntries = fs.readdirSync(scopeDir, { withFileTypes: true });
6900
6923
  for (const scopeEntry of scopeEntries) {
6901
6924
  if (!isDirectoryEntry(scopeEntry, scopeDir)) continue;
6902
6925
  if (skip.has(`${entry.name}/${scopeEntry.name}`)) continue;
@@ -6910,7 +6933,7 @@ var AddonLoader = class {
6910
6933
  }
6911
6934
  async tryLoadAddon(addonDir) {
6912
6935
  const pkgJsonPath = path$1.join(addonDir, "package.json");
6913
- if (!fs$1.existsSync(pkgJsonPath)) return;
6936
+ if (!fs.existsSync(pkgJsonPath)) return;
6914
6937
  try {
6915
6938
  await this.loadFromAddonDir(addonDir);
6916
6939
  } catch (err) {
@@ -6928,7 +6951,7 @@ var AddonLoader = class {
6928
6951
  /** Load addon from a specific directory (package.json + dist/) */
6929
6952
  async loadFromAddonDir(addonDir) {
6930
6953
  const pkgJsonPath = path$1.join(addonDir, "package.json");
6931
- const pkgJson = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8"))) ?? {};
6954
+ const pkgJson = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8"))) ?? {};
6932
6955
  const packageNameRaw = pkgJson["name"];
6933
6956
  const packageName = typeof packageNameRaw === "string" ? packageNameRaw : "";
6934
6957
  const packageVersionRaw = pkgJson["version"];
@@ -6976,7 +6999,7 @@ var AddonLoader = class {
6976
6999
  }
6977
7000
  const entryFile = declaration.entry.replace(/^\.\//, "").replace(/^src\//, "dist/").replace(/\.ts$/, ".js");
6978
7001
  let entryPath = path$1.resolve(addonDir, entryFile);
6979
- if (!fs$1.existsSync(entryPath)) {
7002
+ if (!fs.existsSync(entryPath)) {
6980
7003
  const base = entryPath.replace(/\.(js|cjs|mjs)$/, "");
6981
7004
  entryPath = [
6982
7005
  `${base}.cjs`,
@@ -6985,9 +7008,9 @@ var AddonLoader = class {
6985
7008
  path$1.resolve(addonDir, "dist", "index.cjs"),
6986
7009
  path$1.resolve(addonDir, "dist", "index.mjs"),
6987
7010
  path$1.resolve(addonDir, declaration.entry)
6988
- ].find((p) => fs$1.existsSync(p)) ?? entryPath;
7011
+ ].find((p) => fs.existsSync(p)) ?? entryPath;
6989
7012
  }
6990
- if (!fs$1.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
7013
+ if (!fs.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
6991
7014
  const modUnknown = await importAddonModuleFresh(entryPath);
6992
7015
  const mod = isRecord$4(modUnknown) ? modUnknown : {};
6993
7016
  const AddonClass = resolveAddonClass(mod);
@@ -7099,7 +7122,7 @@ function isDirectoryEntry(entry, parentDir) {
7099
7122
  if (entry.name.startsWith(".")) return false;
7100
7123
  if (entry.isDirectory()) return true;
7101
7124
  if (entry.isSymbolicLink()) try {
7102
- return fs$1.statSync(path$1.join(parentDir, entry.name)).isDirectory();
7125
+ return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
7103
7126
  } catch {
7104
7127
  return false;
7105
7128
  }
@@ -7193,7 +7216,7 @@ var execFileAsync$4 = promisify(execFile);
7193
7216
  * Single source of truth — replaces scattered mkdirSync calls.
7194
7217
  */
7195
7218
  function ensureDir(dirPath) {
7196
- fs$1.mkdirSync(dirPath, { recursive: true });
7219
+ fs.mkdirSync(dirPath, { recursive: true });
7197
7220
  }
7198
7221
  /**
7199
7222
  * Copy a directory recursively — ASYNC so it never blocks the event loop.
@@ -7206,7 +7229,7 @@ function ensureDir(dirPath) {
7206
7229
  * `fs.promises.cp` keeps the I/O off the event loop. (Node ≥18 stable.)
7207
7230
  */
7208
7231
  async function copyDirRecursive(src, dest) {
7209
- await fs$1.promises.cp(src, dest, {
7232
+ await fs.promises.cp(src, dest, {
7210
7233
  recursive: true,
7211
7234
  force: true
7212
7235
  });
@@ -7311,13 +7334,13 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
7311
7334
  if (typeof fileEntry !== "string") continue;
7312
7335
  if (fileEntry === "dist" || fileEntry.includes("*")) continue;
7313
7336
  const srcPath = path$1.join(sourceDir, fileEntry);
7314
- if (!fs$1.existsSync(srcPath)) continue;
7337
+ if (!fs.existsSync(srcPath)) continue;
7315
7338
  const destPath = path$1.join(destDir, fileEntry);
7316
- const stat = await fs$1.promises.stat(srcPath);
7339
+ const stat = await fs.promises.stat(srcPath);
7317
7340
  if (stat.isDirectory()) await copyDirRecursive(srcPath, destPath);
7318
7341
  else if (stat.isFile()) {
7319
7342
  ensureDir(path$1.dirname(destPath));
7320
- await fs$1.promises.copyFile(srcPath, destPath);
7343
+ await fs.promises.copyFile(srcPath, destPath);
7321
7344
  }
7322
7345
  }
7323
7346
  }
@@ -7328,10 +7351,10 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
7328
7351
  function isSourceNewer(packageDir) {
7329
7352
  const srcDir = path$1.join(packageDir, "src");
7330
7353
  const distDir = path$1.join(packageDir, "dist");
7331
- if (!fs$1.existsSync(srcDir) || !fs$1.existsSync(distDir)) return true;
7354
+ if (!fs.existsSync(srcDir) || !fs.existsSync(distDir)) return true;
7332
7355
  try {
7333
- const distMtime = fs$1.statSync(distDir).mtimeMs;
7334
- const entries = fs$1.readdirSync(srcDir, {
7356
+ const distMtime = fs.statSync(distDir).mtimeMs;
7357
+ const entries = fs.readdirSync(srcDir, {
7335
7358
  withFileTypes: true,
7336
7359
  recursive: true
7337
7360
  });
@@ -7339,7 +7362,7 @@ function isSourceNewer(packageDir) {
7339
7362
  if (!entry.isFile()) continue;
7340
7363
  const parentDir = entry.parentPath ?? String(Reflect.get(entry, "path") ?? "");
7341
7364
  const filePath = path$1.join(parentDir, entry.name);
7342
- if (fs$1.statSync(filePath).mtimeMs > distMtime) return true;
7365
+ if (fs.statSync(filePath).mtimeMs > distMtime) return true;
7343
7366
  }
7344
7367
  return false;
7345
7368
  } catch {
@@ -7356,7 +7379,7 @@ function isSourceNewer(packageDir) {
7356
7379
  * `copyDirRecursive` for the wedge this prevents.
7357
7380
  */
7358
7381
  async function installPackageFromNpm(packageName, targetDir) {
7359
- const tmpDir = await fs$1.promises.mkdtemp(path$1.join(os$1.tmpdir(), "camstack-install-"));
7382
+ const tmpDir = await fs.promises.mkdtemp(path$1.join(os$1.tmpdir(), "camstack-install-"));
7360
7383
  try {
7361
7384
  const { stdout } = await execFileAsync$4("npm", [
7362
7385
  "pack",
@@ -7379,21 +7402,21 @@ async function installPackageFromNpm(packageName, targetDir) {
7379
7402
  extractDir
7380
7403
  ], { timeout: 3e4 });
7381
7404
  const packageSubDir = path$1.join(extractDir, "package");
7382
- const srcPkgJsonDir = fs$1.existsSync(path$1.join(packageSubDir, "package.json")) ? packageSubDir : extractDir;
7383
- await fs$1.promises.rm(targetDir, {
7405
+ const srcPkgJsonDir = fs.existsSync(path$1.join(packageSubDir, "package.json")) ? packageSubDir : extractDir;
7406
+ await fs.promises.rm(targetDir, {
7384
7407
  recursive: true,
7385
7408
  force: true
7386
7409
  });
7387
7410
  ensureDir(targetDir);
7388
- await fs$1.promises.copyFile(path$1.join(srcPkgJsonDir, "package.json"), path$1.join(targetDir, "package.json"));
7411
+ await fs.promises.copyFile(path$1.join(srcPkgJsonDir, "package.json"), path$1.join(targetDir, "package.json"));
7389
7412
  const distSrc = path$1.join(srcPkgJsonDir, "dist");
7390
- if (fs$1.existsSync(distSrc)) await copyDirRecursive(distSrc, path$1.join(targetDir, "dist"));
7413
+ if (fs.existsSync(distSrc)) await copyDirRecursive(distSrc, path$1.join(targetDir, "dist"));
7391
7414
  try {
7392
- const npmPkg = asJsonObject$1(parseJsonUnknown(await fs$1.promises.readFile(path$1.join(srcPkgJsonDir, "package.json"), "utf-8")));
7415
+ const npmPkg = asJsonObject$1(parseJsonUnknown(await fs.promises.readFile(path$1.join(srcPkgJsonDir, "package.json"), "utf-8")));
7393
7416
  if (npmPkg) await copyExtraFileDirs(npmPkg, srcPkgJsonDir, targetDir);
7394
7417
  } catch {}
7395
7418
  } finally {
7396
- await fs$1.promises.rm(tmpDir, {
7419
+ await fs.promises.rm(tmpDir, {
7397
7420
  recursive: true,
7398
7421
  force: true
7399
7422
  });
@@ -7418,7 +7441,7 @@ function packageDirName$1(declaredName) {
7418
7441
  }
7419
7442
  function isDirLike$1(p) {
7420
7443
  try {
7421
- return fs$1.statSync(p).isDirectory();
7444
+ return fs.statSync(p).isDirectory();
7422
7445
  } catch {
7423
7446
  return false;
7424
7447
  }
@@ -7436,12 +7459,12 @@ var AddonManifest = class {
7436
7459
  */
7437
7460
  read() {
7438
7461
  if (this.cache != null) return this.cache;
7439
- if (!fs$1.existsSync(this.manifestPath)) {
7462
+ if (!fs.existsSync(this.manifestPath)) {
7440
7463
  this.cache = this.empty();
7441
7464
  return this.cache;
7442
7465
  }
7443
7466
  try {
7444
- const raw = fs$1.readFileSync(this.manifestPath, "utf-8");
7467
+ const raw = fs.readFileSync(this.manifestPath, "utf-8");
7445
7468
  const parsed = JSON.parse(raw);
7446
7469
  if (parsed.version !== MANIFEST_VERSION) {
7447
7470
  process.stderr.write(`[AddonManifest] schema mismatch (file=${parsed.version} vs runtime=${MANIFEST_VERSION}); starting empty\n`);
@@ -7462,13 +7485,13 @@ var AddonManifest = class {
7462
7485
  * a half-written file.
7463
7486
  */
7464
7487
  write(manifest) {
7465
- fs$1.mkdirSync(path$1.dirname(this.manifestPath), { recursive: true });
7488
+ fs.mkdirSync(path$1.dirname(this.manifestPath), { recursive: true });
7466
7489
  const tmp = `${this.manifestPath}.tmp.${process.pid}.${Date.now()}`;
7467
- fs$1.writeFileSync(tmp, JSON.stringify(manifest, null, 2), {
7490
+ fs.writeFileSync(tmp, JSON.stringify(manifest, null, 2), {
7468
7491
  encoding: "utf-8",
7469
7492
  mode: 384
7470
7493
  });
7471
- fs$1.renameSync(tmp, this.manifestPath);
7494
+ fs.renameSync(tmp, this.manifestPath);
7472
7495
  this.cache = manifest;
7473
7496
  }
7474
7497
  /** Lookup a single addon's manifest entry, or `null` if not tracked. */
@@ -7543,22 +7566,22 @@ var AddonManifest = class {
7543
7566
  * exactly what moved. Returns the total number of changes.
7544
7567
  */
7545
7568
  reconcileFromDisk(addonsDir, onChange) {
7546
- if (!fs$1.existsSync(addonsDir)) return 0;
7569
+ if (!fs.existsSync(addonsDir)) return 0;
7547
7570
  const m = this.read();
7548
7571
  let changes = 0;
7549
7572
  const now = (/* @__PURE__ */ new Date()).toISOString();
7550
7573
  /** Package name → version, for every ADDON package actually installed. */
7551
7574
  const onDisk = /* @__PURE__ */ new Map();
7552
- for (const scope of fs$1.readdirSync(addonsDir, { withFileTypes: true })) {
7575
+ for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
7553
7576
  if (!scope.name.startsWith("@") || !isDirLike$1(path$1.join(addonsDir, scope.name))) continue;
7554
7577
  const scopeDir = path$1.join(addonsDir, scope.name);
7555
- for (const pkg of fs$1.readdirSync(scopeDir, { withFileTypes: true })) {
7578
+ for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
7556
7579
  if (!isDirLike$1(path$1.join(scopeDir, pkg.name))) continue;
7557
7580
  const pkgJsonPath = path$1.join(scopeDir, pkg.name, "package.json");
7558
- if (!fs$1.existsSync(pkgJsonPath)) continue;
7581
+ if (!fs.existsSync(pkgJsonPath)) continue;
7559
7582
  let pkgJson;
7560
7583
  try {
7561
- const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
7584
+ const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
7562
7585
  if (typeof parsed !== "object" || parsed == null) continue;
7563
7586
  pkgJson = parsed;
7564
7587
  } catch {
@@ -7629,28 +7652,28 @@ var AddonManifest = class {
7629
7652
  migrateFromInstallSourceMarkers(addonsDir) {
7630
7653
  const m = this.read();
7631
7654
  if (Object.keys(m.addons).length > 0) return 0;
7632
- if (!fs$1.existsSync(addonsDir)) return 0;
7655
+ if (!fs.existsSync(addonsDir)) return 0;
7633
7656
  let migrated = 0;
7634
7657
  const now = (/* @__PURE__ */ new Date()).toISOString();
7635
- for (const scope of fs$1.readdirSync(addonsDir, { withFileTypes: true })) {
7658
+ for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
7636
7659
  if (!scope.isDirectory() || !scope.name.startsWith("@")) continue;
7637
7660
  const scopeDir = path$1.join(addonsDir, scope.name);
7638
- for (const pkg of fs$1.readdirSync(scopeDir, { withFileTypes: true })) {
7661
+ for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
7639
7662
  if (!pkg.isDirectory()) continue;
7640
7663
  const pkgDir = path$1.join(scopeDir, pkg.name);
7641
7664
  const markerPath = path$1.join(pkgDir, ".install-source");
7642
7665
  const pkgJsonPath = path$1.join(pkgDir, "package.json");
7643
- if (!fs$1.existsSync(pkgJsonPath)) continue;
7666
+ if (!fs.existsSync(pkgJsonPath)) continue;
7644
7667
  let pkgJson;
7645
7668
  try {
7646
- const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
7669
+ const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
7647
7670
  if (typeof parsed !== "object" || parsed == null) continue;
7648
7671
  pkgJson = parsed;
7649
7672
  } catch {
7650
7673
  continue;
7651
7674
  }
7652
7675
  if (!pkgJson.name || !pkgJson.version) continue;
7653
- const source = fs$1.existsSync(markerPath) ? fs$1.readFileSync(markerPath, "utf-8").trim() : "bundled";
7676
+ const source = fs.existsSync(markerPath) ? fs.readFileSync(markerPath, "utf-8").trim() : "bundled";
7654
7677
  m.addons[pkgJson.name] = {
7655
7678
  name: pkgJson.name,
7656
7679
  version: pkgJson.version,
@@ -7854,7 +7877,7 @@ function planClosureDedupe(input) {
7854
7877
  function readTreeManifest(pkgJsonPath) {
7855
7878
  let raw;
7856
7879
  try {
7857
- raw = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8")));
7880
+ raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
7858
7881
  } catch {
7859
7882
  return null;
7860
7883
  }
@@ -7879,7 +7902,7 @@ function readTreeManifest(pkgJsonPath) {
7879
7902
  function listTopLevelEntries(nodeModulesDir) {
7880
7903
  let entries;
7881
7904
  try {
7882
- entries = fs$1.readdirSync(nodeModulesDir, { withFileTypes: true });
7905
+ entries = fs.readdirSync(nodeModulesDir, { withFileTypes: true });
7883
7906
  } catch {
7884
7907
  return [];
7885
7908
  }
@@ -7889,7 +7912,7 @@ function listTopLevelEntries(nodeModulesDir) {
7889
7912
  if (entry.name.startsWith("@")) {
7890
7913
  let inner;
7891
7914
  try {
7892
- inner = fs$1.readdirSync(path$1.join(nodeModulesDir, entry.name), { withFileTypes: true });
7915
+ inner = fs.readdirSync(path$1.join(nodeModulesDir, entry.name), { withFileTypes: true });
7893
7916
  } catch {
7894
7917
  continue;
7895
7918
  }
@@ -7922,14 +7945,14 @@ function collectAddonTreeState(addonDir) {
7922
7945
  const entryDir = path$1.join(nodeModulesDir, name);
7923
7946
  let isLink = false;
7924
7947
  try {
7925
- isLink = fs$1.lstatSync(entryDir).isSymbolicLink();
7948
+ isLink = fs.lstatSync(entryDir).isSymbolicLink();
7926
7949
  } catch {
7927
7950
  continue;
7928
7951
  }
7929
7952
  if (isLink) {
7930
7953
  let target = "";
7931
7954
  try {
7932
- target = fs$1.readlinkSync(entryDir);
7955
+ target = fs.readlinkSync(entryDir);
7933
7956
  } catch {}
7934
7957
  existingLinks.push({
7935
7958
  name,
@@ -7943,7 +7966,7 @@ function collectAddonTreeState(addonDir) {
7943
7966
  version: manifest.version
7944
7967
  });
7945
7968
  for (const [depName, range] of manifest.ranges) {
7946
- if (fs$1.existsSync(path$1.join(entryDir, "node_modules", depName))) continue;
7969
+ if (fs.existsSync(path$1.join(entryDir, "node_modules", depName))) continue;
7947
7970
  addRange(depName, range);
7948
7971
  }
7949
7972
  }
@@ -7973,7 +7996,7 @@ function resolveClosureNodeModulesDir(explicitDir) {
7973
7996
  const frameworkDir = explicitDir ?? process.env["CAMSTACK_FRAMEWORK_DIR"];
7974
7997
  if (frameworkDir === void 0 || frameworkDir.length === 0) return null;
7975
7998
  const nodeModulesDir = explicitDir ?? path$1.join(frameworkDir, "node_modules");
7976
- return fs$1.existsSync(nodeModulesDir) ? nodeModulesDir : null;
7999
+ return fs.existsSync(nodeModulesDir) ? nodeModulesDir : null;
7977
8000
  }
7978
8001
  function symlinkType() {
7979
8002
  return process.platform === "win32" ? "junction" : "dir";
@@ -7992,10 +8015,10 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
7992
8015
  const nodeModulesDir = path$1.join(addonDir, "node_modules");
7993
8016
  const probePath = path$1.join(nodeModulesDir, ".closure-link-probe");
7994
8017
  try {
7995
- fs$1.mkdirSync(nodeModulesDir, { recursive: true });
7996
- fs$1.rmSync(probePath, { force: true });
7997
- fs$1.symlinkSync(closureNodeModulesDir, probePath, symlinkType());
7998
- fs$1.rmSync(probePath, { force: true });
8018
+ fs.mkdirSync(nodeModulesDir, { recursive: true });
8019
+ fs.rmSync(probePath, { force: true });
8020
+ fs.symlinkSync(closureNodeModulesDir, probePath, symlinkType());
8021
+ fs.rmSync(probePath, { force: true });
7999
8022
  } catch (err) {
8000
8023
  logger.warn("closure dedupe skipped — symlinks unavailable on this volume", { meta: {
8001
8024
  addonDir,
@@ -8017,12 +8040,12 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
8017
8040
  }
8018
8041
  const entryDir = path$1.join(nodeModulesDir, link.name);
8019
8042
  try {
8020
- fs$1.rmSync(entryDir, {
8043
+ fs.rmSync(entryDir, {
8021
8044
  recursive: true,
8022
8045
  force: true
8023
8046
  });
8024
- fs$1.mkdirSync(path$1.dirname(entryDir), { recursive: true });
8025
- fs$1.symlinkSync(target, entryDir, symlinkType());
8047
+ fs.mkdirSync(path$1.dirname(entryDir), { recursive: true });
8048
+ fs.symlinkSync(target, entryDir, symlinkType());
8026
8049
  linked.push(link.name);
8027
8050
  } catch (err) {
8028
8051
  logger.warn("closure dedupe — link failed; entry removed copy may need reinstall", { meta: {
@@ -8098,7 +8121,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
8098
8121
  count: Object.keys(native).length
8099
8122
  } });
8100
8123
  try {
8101
- fs$1.writeFileSync(markerFile, markerHash);
8124
+ fs.writeFileSync(markerFile, markerHash);
8102
8125
  } catch (err) {
8103
8126
  logger.warn("Failed to write native deps marker", { meta: {
8104
8127
  markerFile,
@@ -8136,7 +8159,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
8136
8159
  }
8137
8160
  await rebuildNativeDeps(addonDir, pending.map(([name]) => name), logger, npmCacheDir ?? defaultNpmCacheDir(), registry);
8138
8161
  try {
8139
- fs$1.writeFileSync(markerFile, markerHash);
8162
+ fs.writeFileSync(markerFile, markerHash);
8140
8163
  } catch (err) {
8141
8164
  logger.warn("Failed to write native deps marker", { meta: {
8142
8165
  markerFile,
@@ -8158,12 +8181,12 @@ function copyPrebuiltNativeDep(name, addonDir, logger) {
8158
8181
  if (source === target) continue;
8159
8182
  if (!hasBuiltBinary(source)) continue;
8160
8183
  try {
8161
- fs$1.rmSync(target, {
8184
+ fs.rmSync(target, {
8162
8185
  recursive: true,
8163
8186
  force: true
8164
8187
  });
8165
- fs$1.mkdirSync(path$1.dirname(target), { recursive: true });
8166
- fs$1.cpSync(source, target, {
8188
+ fs.mkdirSync(path$1.dirname(target), { recursive: true });
8189
+ fs.cpSync(source, target, {
8167
8190
  recursive: true,
8168
8191
  dereference: true
8169
8192
  });
@@ -8199,7 +8222,7 @@ var BUNDLED_NATIVE_SIBLING_SCOPES = {
8199
8222
  function hasAnyDotNode(dir, maxDepth) {
8200
8223
  let entries;
8201
8224
  try {
8202
- entries = fs$1.readdirSync(dir, { withFileTypes: true });
8225
+ entries = fs.readdirSync(dir, { withFileTypes: true });
8203
8226
  } catch {
8204
8227
  return false;
8205
8228
  }
@@ -8213,12 +8236,12 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
8213
8236
  if (!hasAnyDotNode(src, 5)) return;
8214
8237
  if (hasAnyDotNode(dst, 5)) return;
8215
8238
  try {
8216
- fs$1.rmSync(dst, {
8239
+ fs.rmSync(dst, {
8217
8240
  recursive: true,
8218
8241
  force: true
8219
8242
  });
8220
- fs$1.mkdirSync(path$1.dirname(dst), { recursive: true });
8221
- fs$1.cpSync(src, dst, {
8243
+ fs.mkdirSync(path$1.dirname(dst), { recursive: true });
8244
+ fs.cpSync(src, dst, {
8222
8245
  recursive: true,
8223
8246
  dereference: true
8224
8247
  });
@@ -8253,7 +8276,7 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
8253
8276
  */
8254
8277
  function copyBundledNativeModules(sourceDir, targetDir, logger) {
8255
8278
  const srcNm = path$1.join(sourceDir, "node_modules");
8256
- if (!fs$1.existsSync(srcNm)) return;
8279
+ if (!fs.existsSync(srcNm)) return;
8257
8280
  const dstNm = path$1.join(targetDir, "node_modules");
8258
8281
  for (const [name, scopes] of Object.entries(BUNDLED_NATIVE_SIBLING_SCOPES)) {
8259
8282
  copyPrebuiltModuleDir(path$1.join(srcNm, name), path$1.join(dstNm, name), name, logger);
@@ -8261,7 +8284,7 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
8261
8284
  const scopeSrc = path$1.join(srcNm, scope);
8262
8285
  let siblings;
8263
8286
  try {
8264
- siblings = fs$1.readdirSync(scopeSrc);
8287
+ siblings = fs.readdirSync(scopeSrc);
8265
8288
  } catch {
8266
8289
  continue;
8267
8290
  }
@@ -8271,12 +8294,12 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
8271
8294
  }
8272
8295
  /** A package dir is "built" when it carries a compiled `.node` or a prebuilds tree. */
8273
8296
  function hasBuiltBinary(pkgDir) {
8274
- if (!fs$1.existsSync(path$1.join(pkgDir, "package.json"))) return false;
8297
+ if (!fs.existsSync(path$1.join(pkgDir, "package.json"))) return false;
8275
8298
  const releaseDir = path$1.join(pkgDir, "build", "Release");
8276
8299
  try {
8277
- if (fs$1.existsSync(releaseDir) && fs$1.readdirSync(releaseDir).some((f) => f.endsWith(".node"))) return true;
8300
+ if (fs.existsSync(releaseDir) && fs.readdirSync(releaseDir).some((f) => f.endsWith(".node"))) return true;
8278
8301
  } catch {}
8279
- return fs$1.existsSync(path$1.join(pkgDir, "prebuilds"));
8302
+ return fs.existsSync(path$1.join(pkgDir, "prebuilds"));
8280
8303
  }
8281
8304
  /** Candidate hoisted locations for `<name>`: NODE_PATH entries + ancestors of `addonDir`. */
8282
8305
  function candidateHoistedDirs(name, addonDir) {
@@ -8314,7 +8337,7 @@ function hashDeclaration(deps) {
8314
8337
  }
8315
8338
  function markerMatches(markerFile, expected) {
8316
8339
  try {
8317
- return fs$1.readFileSync(markerFile, "utf-8").trim() === expected;
8340
+ return fs.readFileSync(markerFile, "utf-8").trim() === expected;
8318
8341
  } catch {
8319
8342
  return false;
8320
8343
  }
@@ -8421,7 +8444,7 @@ function parseInstallSource(value) {
8421
8444
  function readPackageJson(pkgJsonPath) {
8422
8445
  let raw;
8423
8446
  try {
8424
- raw = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8")));
8447
+ raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
8425
8448
  } catch {
8426
8449
  return null;
8427
8450
  }
@@ -8463,7 +8486,7 @@ function shouldSkipClosureProvidedSeed(packageName, isResolvable) {
8463
8486
  var REGISTRY_LATEST_TIMEOUT_MS = 15e3;
8464
8487
  function readInstalledPackageVersion(addonDir) {
8465
8488
  try {
8466
- const raw = JSON.parse(fs$1.readFileSync(path$1.join(addonDir, "package.json"), "utf-8"));
8489
+ const raw = JSON.parse(fs.readFileSync(path$1.join(addonDir, "package.json"), "utf-8"));
8467
8490
  if (raw === null || typeof raw !== "object") return null;
8468
8491
  const version = Reflect.get(raw, "version");
8469
8492
  return typeof version === "string" && version.length > 0 ? version : null;
@@ -8604,7 +8627,7 @@ var AddonInstaller = class AddonInstaller {
8604
8627
  } catch {
8605
8628
  return Object.freeze([]);
8606
8629
  }
8607
- const raw = fs$1.readFileSync(pkgPath, "utf-8");
8630
+ const raw = fs.readFileSync(pkgPath, "utf-8");
8608
8631
  const parsed = JSON.parse(raw);
8609
8632
  const deps = Object.keys(parsed.dependencies ?? {});
8610
8633
  const agentOnly = new Set(parsed.camstack?.agentOnlyBootstrapAddons ?? []);
@@ -8649,7 +8672,7 @@ var AddonInstaller = class AddonInstaller {
8649
8672
  } catch {
8650
8673
  return Object.freeze([]);
8651
8674
  }
8652
- const raw = fs$1.readFileSync(pkgPath, "utf-8");
8675
+ const raw = fs.readFileSync(pkgPath, "utf-8");
8653
8676
  const addons = JSON.parse(raw).camstack?.agentBootstrapAddons ?? [];
8654
8677
  return Object.freeze(["@camstack/server", ...addons]);
8655
8678
  }
@@ -8679,7 +8702,7 @@ var AddonInstaller = class AddonInstaller {
8679
8702
  this.logger.info(`Install source: ${isLocal ? `bundle (${this.bundledAddonsDir})` : "npm"}, ${pkgList.length} package(s)`);
8680
8703
  for (const packageName of pkgList) {
8681
8704
  const addonDir = path$1.join(this.addonsDir, packageName);
8682
- if (fs$1.existsSync(path$1.join(addonDir, "package.json"))) {
8705
+ if (fs.existsSync(path$1.join(addonDir, "package.json"))) {
8683
8706
  if (isLocal || shouldSkipClosureProvidedSeed(packageName, this.isResolvableFromClosure(packageName))) {
8684
8707
  this.logger.debug(`${packageName} — already installed, skipping`);
8685
8708
  continue;
@@ -8823,7 +8846,7 @@ var AddonInstaller = class AddonInstaller {
8823
8846
  const installedPackages = this.listInstalled();
8824
8847
  for (const pkg of installedPackages) {
8825
8848
  try {
8826
- if (fs$1.lstatSync(pkg.dir).isSymbolicLink()) continue;
8849
+ if (fs.lstatSync(pkg.dir).isSymbolicLink()) continue;
8827
8850
  } catch {
8828
8851
  continue;
8829
8852
  }
@@ -8863,7 +8886,7 @@ var AddonInstaller = class AddonInstaller {
8863
8886
  if (closureNodeModules !== null) for (const link of state.existingLinks) {
8864
8887
  if (!isClosureLinkTarget(link.target, closureNodeModules)) continue;
8865
8888
  const linkDir = path$1.join(nodeModulesDir, link.name);
8866
- const targetManifest = fs$1.existsSync(path$1.join(linkDir, "package.json"));
8889
+ const targetManifest = fs.existsSync(path$1.join(linkDir, "package.json"));
8867
8890
  const ranges = state.requirements.get(link.name) ?? [];
8868
8891
  let holds = targetManifest;
8869
8892
  if (holds && ranges.length > 0) {
@@ -8872,14 +8895,14 @@ var AddonInstaller = class AddonInstaller {
8872
8895
  }
8873
8896
  if (!holds) {
8874
8897
  this.logger.warn(`${packageName} — closure link for ${link.name} no longer holds; reinstalling this addon's deps`, { meta: { target: link.target } });
8875
- fs$1.rmSync(linkDir, { force: true });
8898
+ fs.rmSync(linkDir, { force: true });
8876
8899
  needsInstall = true;
8877
8900
  }
8878
8901
  }
8879
8902
  const linked = [];
8880
8903
  for (const [depName, range] of declaredEntries) {
8881
8904
  if (typeof range !== "string") continue;
8882
- if (fs$1.existsSync(path$1.join(nodeModulesDir, depName, "package.json"))) continue;
8905
+ if (fs.existsSync(path$1.join(nodeModulesDir, depName, "package.json"))) continue;
8883
8906
  const closureVersion = closureNodeModules === null ? void 0 : readClosureVersions(closureNodeModules, [depName]).get(depName);
8884
8907
  if (closureNodeModules !== null && closureVersion !== void 0 && closureSatisfiesRange(range, closureVersion)) {
8885
8908
  if (executeClosureDedupe(addonDir, closureNodeModules, {
@@ -8912,7 +8935,7 @@ var AddonInstaller = class AddonInstaller {
8912
8935
  const closureNodeModules = resolveClosureNodeModulesDir(this.closureNodeModulesDir);
8913
8936
  if (closureNodeModules !== null) {
8914
8937
  const state = collectAddonTreeState(addonDir);
8915
- for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs$1.rmSync(path$1.join(addonDir, "node_modules", link.name), { force: true });
8938
+ for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs.rmSync(path$1.join(addonDir, "node_modules", link.name), { force: true });
8916
8939
  }
8917
8940
  this.logger.info(`${packageName} — reinstalling runtime dependencies`, { meta: { addonDir } });
8918
8941
  await runNpm([
@@ -8957,7 +8980,7 @@ var AddonInstaller = class AddonInstaller {
8957
8980
  async realignFromClosure(packageName, closureDir) {
8958
8981
  const targetDir = path$1.join(this.addonsDir, packageName);
8959
8982
  const result = await this.installLocal(packageName, closureDir);
8960
- await fs$1.promises.writeFile(path$1.join(targetDir, ".install-source"), "closure");
8983
+ await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "closure");
8961
8984
  this.manifest.upsert(result.name, {
8962
8985
  version: result.version,
8963
8986
  source: "closure"
@@ -8973,17 +8996,17 @@ var AddonInstaller = class AddonInstaller {
8973
8996
  async installCopy(packageName, sourceDir, pkgData, targetDir) {
8974
8997
  await this.ensureBuilt(packageName, sourceDir, pkgData);
8975
8998
  const distDir = path$1.join(sourceDir, "dist");
8976
- if (!fs$1.existsSync(distDir)) throw new Error(`${packageName} has no dist/ after build`);
8977
- await fs$1.promises.rm(targetDir, {
8999
+ if (!fs.existsSync(distDir)) throw new Error(`${packageName} has no dist/ after build`);
9000
+ await fs.promises.rm(targetDir, {
8978
9001
  recursive: true,
8979
9002
  force: true
8980
9003
  });
8981
9004
  ensureDir(targetDir);
8982
- await fs$1.promises.writeFile(path$1.join(targetDir, "package.json"), JSON.stringify(stripBundledDeps(pkgData), null, 2));
9005
+ await fs.promises.writeFile(path$1.join(targetDir, "package.json"), JSON.stringify(stripBundledDeps(pkgData), null, 2));
8983
9006
  await copyDirRecursive(distDir, path$1.join(targetDir, "dist"));
8984
9007
  await copyExtraFileDirs(pkgData, sourceDir, targetDir);
8985
9008
  copyBundledNativeModules(sourceDir, targetDir, this.logger);
8986
- await fs$1.promises.writeFile(path$1.join(targetDir, ".install-source"), "local");
9009
+ await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "local");
8987
9010
  const localPkgVersion = asString$1(pkgData.version, "0.0.0");
8988
9011
  this.manifest.upsert(packageName, {
8989
9012
  version: localPkgVersion,
@@ -9024,7 +9047,7 @@ var AddonInstaller = class AddonInstaller {
9024
9047
  * unusual auth, offline mode, etc).
9025
9048
  */
9026
9049
  async installFromNpm(packageName, version) {
9027
- const tmpDir = fs$1.mkdtempSync(path$1.join(os$1.tmpdir(), "camstack-addon-npm-"));
9050
+ const tmpDir = fs.mkdtempSync(path$1.join(os$1.tmpdir(), "camstack-addon-npm-"));
9028
9051
  const packageSpec = version ? `${packageName}@${version}` : packageName;
9029
9052
  this.logger.info(`${packageName} — installing from npm`);
9030
9053
  try {
@@ -9038,19 +9061,19 @@ var AddonInstaller = class AddonInstaller {
9038
9061
  ];
9039
9062
  if (this.registry) args.push("--registry", this.registry);
9040
9063
  const { stdout } = await runNpm(args, this.npmRunOptions(tmpDir, 12e4));
9041
- const tgzFiles = fs$1.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
9064
+ const tgzFiles = fs.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
9042
9065
  if (tgzFiles.length === 0) throw new Error(`npm pack produced no tgz. stdout: ${stdout.trim()}`);
9043
9066
  return path$1.join(tmpDir, tgzFiles[0]);
9044
9067
  });
9045
9068
  const result = await this.installFromTgz(tgzPath);
9046
- fs$1.writeFileSync(path$1.join(this.addonsDir, result.name, ".install-source"), "npm");
9069
+ fs.writeFileSync(path$1.join(this.addonsDir, result.name, ".install-source"), "npm");
9047
9070
  this.manifest.upsert(result.name, {
9048
9071
  version: result.version,
9049
9072
  source: "npm"
9050
9073
  });
9051
9074
  return result;
9052
9075
  } finally {
9053
- fs$1.rmSync(tmpDir, {
9076
+ fs.rmSync(tmpDir, {
9054
9077
  recursive: true,
9055
9078
  force: true
9056
9079
  });
@@ -9088,7 +9111,7 @@ var AddonInstaller = class AddonInstaller {
9088
9111
  if (!tarRes.ok) throw new Error(`tarball GET ${tarballUrl} → ${tarRes.status}`);
9089
9112
  const tgzPath = path$1.join(tmpDir, `${packageName.replace(/[/@]/g, "-").replace(/^-+/, "")}-${resolvedVersion}.tgz`);
9090
9113
  const buf = Buffer.from(await tarRes.arrayBuffer());
9091
- fs$1.writeFileSync(tgzPath, buf);
9114
+ fs.writeFileSync(tgzPath, buf);
9092
9115
  return tgzPath;
9093
9116
  }
9094
9117
  /**
@@ -9109,7 +9132,7 @@ var AddonInstaller = class AddonInstaller {
9109
9132
  * on the next deploy.
9110
9133
  */
9111
9134
  async evictInstallDir(targetDir) {
9112
- if (!fs$1.existsSync(targetDir)) return;
9135
+ if (!fs.existsSync(targetDir)) return;
9113
9136
  const graveyard = path$1.join(this.addonsDir, ".evicting");
9114
9137
  ensureDir(graveyard);
9115
9138
  await this.sweepGraveyard(graveyard);
@@ -9117,10 +9140,10 @@ var AddonInstaller = class AddonInstaller {
9117
9140
  const flatName = path$1.relative(this.addonsDir, targetDir).replace(/[/\\]/g, "-");
9118
9141
  const asideDir = path$1.join(graveyard, `${flatName}-${ts}`);
9119
9142
  try {
9120
- fs$1.renameSync(targetDir, asideDir);
9143
+ fs.renameSync(targetDir, asideDir);
9121
9144
  } catch (renameErr) {
9122
9145
  if (renameErr.code === "EXDEV") {
9123
- await fs$1.promises.rm(targetDir, {
9146
+ await fs.promises.rm(targetDir, {
9124
9147
  recursive: true,
9125
9148
  force: true
9126
9149
  });
@@ -9128,7 +9151,7 @@ var AddonInstaller = class AddonInstaller {
9128
9151
  }
9129
9152
  throw renameErr;
9130
9153
  }
9131
- await fs$1.promises.rm(asideDir, {
9154
+ await fs.promises.rm(asideDir, {
9132
9155
  recursive: true,
9133
9156
  force: true
9134
9157
  }).catch((cleanupErr) => {
@@ -9149,14 +9172,14 @@ var AddonInstaller = class AddonInstaller {
9149
9172
  async sweepStagingResidue(stagingRoot) {
9150
9173
  let names;
9151
9174
  try {
9152
- names = fs$1.readdirSync(stagingRoot);
9175
+ names = fs.readdirSync(stagingRoot);
9153
9176
  } catch {
9154
9177
  return;
9155
9178
  }
9156
9179
  const now = Date.now();
9157
9180
  const ages = [];
9158
9181
  for (const name of names) try {
9159
- const stat = fs$1.statSync(path$1.join(stagingRoot, name));
9182
+ const stat = fs.statSync(path$1.join(stagingRoot, name));
9160
9183
  ages.push({
9161
9184
  name,
9162
9185
  ageMs: now - stat.mtimeMs
@@ -9167,7 +9190,7 @@ var AddonInstaller = class AddonInstaller {
9167
9190
  stagingRoot,
9168
9191
  entries: sweepable
9169
9192
  } });
9170
- await Promise.all(sweepable.map((name) => fs$1.promises.rm(path$1.join(stagingRoot, name), {
9193
+ await Promise.all(sweepable.map((name) => fs.promises.rm(path$1.join(stagingRoot, name), {
9171
9194
  recursive: true,
9172
9195
  force: true
9173
9196
  }).catch(() => void 0)));
@@ -9176,11 +9199,11 @@ var AddonInstaller = class AddonInstaller {
9176
9199
  async sweepGraveyard(graveyard) {
9177
9200
  let entries;
9178
9201
  try {
9179
- entries = fs$1.readdirSync(graveyard);
9202
+ entries = fs.readdirSync(graveyard);
9180
9203
  } catch {
9181
9204
  return;
9182
9205
  }
9183
- await Promise.all(entries.map((name) => fs$1.promises.rm(path$1.join(graveyard, name), {
9206
+ await Promise.all(entries.map((name) => fs.promises.rm(path$1.join(graveyard, name), {
9184
9207
  recursive: true,
9185
9208
  force: true
9186
9209
  }).catch(() => void 0)));
@@ -9231,7 +9254,7 @@ var AddonInstaller = class AddonInstaller {
9231
9254
  return;
9232
9255
  }
9233
9256
  const strippedManifest = stripBundledDeps(pkgView.raw);
9234
- await fs$1.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
9257
+ await fs.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
9235
9258
  const deps = asJsonObject$1(strippedManifest["dependencies"]);
9236
9259
  const depNames = deps ? Object.keys(deps) : [];
9237
9260
  if (depNames.length === 0) return;
@@ -9363,9 +9386,9 @@ var AddonInstaller = class AddonInstaller {
9363
9386
  "-C",
9364
9387
  stagingDir
9365
9388
  ], { timeout: 12e4 });
9366
- const pkgDir = fs$1.existsSync(path$1.join(stagingDir, "package", "package.json")) ? path$1.join(stagingDir, "package") : stagingDir;
9389
+ const pkgDir = fs.existsSync(path$1.join(stagingDir, "package", "package.json")) ? path$1.join(stagingDir, "package") : stagingDir;
9367
9390
  const pkgJsonPath = path$1.join(pkgDir, "package.json");
9368
- if (!fs$1.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
9391
+ if (!fs.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
9369
9392
  const pkgView = readPackageJson(pkgJsonPath);
9370
9393
  if (!pkgView) throw new Error(`Invalid package.json at ${pkgJsonPath}`);
9371
9394
  if (!pkgView.camstackAddons) throw new Error(`Package ${pkgView.name} has no camstack.addons manifest`);
@@ -9375,7 +9398,7 @@ var AddonInstaller = class AddonInstaller {
9375
9398
  this.dedupeTreeAgainstClosure(pkgDir, pkgView.name);
9376
9399
  await this.evictInstallDir(targetDir);
9377
9400
  ensureDir(path$1.dirname(targetDir));
9378
- await fs$1.promises.rename(pkgDir, targetDir);
9401
+ await fs.promises.rename(pkgDir, targetDir);
9379
9402
  this.manifest.upsert(pkgView.name, {
9380
9403
  version: pkgView.version,
9381
9404
  source: "bundled"
@@ -9386,7 +9409,7 @@ var AddonInstaller = class AddonInstaller {
9386
9409
  };
9387
9410
  } finally {
9388
9411
  this.inFlightStaging.delete(stagingName);
9389
- await fs$1.promises.rm(stagingDir, {
9412
+ await fs.promises.rm(stagingDir, {
9390
9413
  recursive: true,
9391
9414
  force: true
9392
9415
  }).catch(() => void 0);
@@ -9416,24 +9439,24 @@ var AddonInstaller = class AddonInstaller {
9416
9439
  const current = this.manifest.get(packageName);
9417
9440
  if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
9418
9441
  const addonDir = path$1.join(this.addonsDir, packageName);
9419
- if (!fs$1.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
9442
+ if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
9420
9443
  const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
9421
9444
  const backupRoot = path$1.join(this.addonsDir, ".backups", packageName);
9422
9445
  ensureDir(backupRoot);
9423
9446
  const backupDir = path$1.join(backupRoot, ts);
9424
9447
  this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
9425
- fs$1.renameSync(addonDir, backupDir);
9448
+ fs.renameSync(addonDir, backupDir);
9426
9449
  let result;
9427
9450
  try {
9428
9451
  result = await this.installFromNpm(packageName, version);
9429
9452
  } catch (installErr) {
9430
9453
  this.logger.error(`${packageName} — install failed, restoring backup`, { meta: { error: errMsg$1(installErr) } });
9431
9454
  try {
9432
- if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
9455
+ if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
9433
9456
  recursive: true,
9434
9457
  force: true
9435
9458
  });
9436
- fs$1.renameSync(backupDir, addonDir);
9459
+ fs.renameSync(backupDir, addonDir);
9437
9460
  this.manifest.upsert(packageName, {
9438
9461
  version: current.version,
9439
9462
  source: current.source,
@@ -9494,7 +9517,7 @@ var AddonInstaller = class AddonInstaller {
9494
9517
  const current = this.manifest.get(packageName);
9495
9518
  if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
9496
9519
  const addonDir = path$1.join(this.addonsDir, packageName);
9497
- if (!fs$1.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
9520
+ if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
9498
9521
  await this.installRuntimeDependencies(stagedPath, packageName);
9499
9522
  await this.installNativeDependencies(stagedPath, packageName);
9500
9523
  this.dedupeTreeAgainstClosure(stagedPath, packageName);
@@ -9503,14 +9526,14 @@ var AddonInstaller = class AddonInstaller {
9503
9526
  ensureDir(backupRoot);
9504
9527
  const backupDir = path$1.join(backupRoot, ts);
9505
9528
  this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
9506
- fs$1.renameSync(addonDir, backupDir);
9529
+ fs.renameSync(addonDir, backupDir);
9507
9530
  try {
9508
9531
  try {
9509
- fs$1.renameSync(stagedPath, addonDir);
9532
+ fs.renameSync(stagedPath, addonDir);
9510
9533
  } catch (renameErr) {
9511
9534
  if (renameErr.code === "EXDEV") {
9512
- fs$1.cpSync(stagedPath, addonDir, { recursive: true });
9513
- fs$1.rmSync(stagedPath, {
9535
+ fs.cpSync(stagedPath, addonDir, { recursive: true });
9536
+ fs.rmSync(stagedPath, {
9514
9537
  recursive: true,
9515
9538
  force: true
9516
9539
  });
@@ -9519,11 +9542,11 @@ var AddonInstaller = class AddonInstaller {
9519
9542
  } catch (swapErr) {
9520
9543
  this.logger.error(`${packageName} — staged swap failed, restoring backup`, { meta: { error: errMsg$1(swapErr) } });
9521
9544
  try {
9522
- if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
9545
+ if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
9523
9546
  recursive: true,
9524
9547
  force: true
9525
9548
  });
9526
- fs$1.renameSync(backupDir, addonDir);
9549
+ fs.renameSync(backupDir, addonDir);
9527
9550
  this.manifest.upsert(packageName, {
9528
9551
  version: current.version,
9529
9552
  source: current.source,
@@ -9562,20 +9585,20 @@ var AddonInstaller = class AddonInstaller {
9562
9585
  this.logger.warn(`${packageName} — no backup to rollback to`);
9563
9586
  return null;
9564
9587
  }
9565
- if (!fs$1.existsSync(entry.lastBackupDir)) {
9588
+ if (!fs.existsSync(entry.lastBackupDir)) {
9566
9589
  this.logger.warn(`${packageName} — backup dir vanished: ${entry.lastBackupDir}`);
9567
9590
  return null;
9568
9591
  }
9569
9592
  const addonDir = path$1.join(this.addonsDir, packageName);
9570
- if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
9593
+ if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
9571
9594
  recursive: true,
9572
9595
  force: true
9573
9596
  });
9574
- fs$1.renameSync(entry.lastBackupDir, addonDir);
9597
+ fs.renameSync(entry.lastBackupDir, addonDir);
9575
9598
  const pkgJsonPath = path$1.join(addonDir, "package.json");
9576
9599
  let restoredVersion = entry.version;
9577
- if (fs$1.existsSync(pkgJsonPath)) try {
9578
- const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
9600
+ if (fs.existsSync(pkgJsonPath)) try {
9601
+ const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
9579
9602
  if (typeof parsed === "object" && parsed != null) {
9580
9603
  const v = parsed.version;
9581
9604
  if (typeof v === "string" && v.length > 0) restoredVersion = v;
@@ -9623,7 +9646,7 @@ var AddonInstaller = class AddonInstaller {
9623
9646
  return false;
9624
9647
  }
9625
9648
  try {
9626
- await fs$1.promises.rm(target, {
9649
+ await fs.promises.rm(target, {
9627
9650
  recursive: true,
9628
9651
  force: true
9629
9652
  });
@@ -9641,7 +9664,7 @@ var AddonInstaller = class AddonInstaller {
9641
9664
  listBackupsFor(packageName) {
9642
9665
  const dir = path$1.join(this.backupsRoot, packageName);
9643
9666
  try {
9644
- return fs$1.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => path$1.join(dir, e.name)).sort();
9667
+ return fs.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => path$1.join(dir, e.name)).sort();
9645
9668
  } catch {
9646
9669
  return [];
9647
9670
  }
@@ -9673,7 +9696,7 @@ var AddonInstaller = class AddonInstaller {
9673
9696
  for (const dir of [pkgDir, path$1.dirname(pkgDir)]) {
9674
9697
  if (!this.isInsideBackups(dir)) continue;
9675
9698
  try {
9676
- await fs$1.promises.rmdir(dir);
9699
+ await fs.promises.rmdir(dir);
9677
9700
  } catch {
9678
9701
  return;
9679
9702
  }
@@ -9755,7 +9778,7 @@ var AddonInstaller = class AddonInstaller {
9755
9778
  */
9756
9779
  resolveBackupToKeep(packageName, backups) {
9757
9780
  const liveDir = path$1.join(this.addonsDir, packageName);
9758
- if (!fs$1.existsSync(liveDir)) {
9781
+ if (!fs.existsSync(liveDir)) {
9759
9782
  const newest = backups[backups.length - 1] ?? null;
9760
9783
  if (newest != null) this.logger.warn(`${packageName} — live install dir missing; retaining its newest backup as the only surviving copy`, { meta: {
9761
9784
  liveDir,
@@ -9772,7 +9795,7 @@ var AddonInstaller = class AddonInstaller {
9772
9795
  listBackedUpPackages() {
9773
9796
  let entries;
9774
9797
  try {
9775
- entries = fs$1.readdirSync(this.backupsRoot, { withFileTypes: true });
9798
+ entries = fs.readdirSync(this.backupsRoot, { withFileTypes: true });
9776
9799
  } catch {
9777
9800
  return [];
9778
9801
  }
@@ -9784,14 +9807,14 @@ var AddonInstaller = class AddonInstaller {
9784
9807
  continue;
9785
9808
  }
9786
9809
  const scopeDir = path$1.join(this.backupsRoot, entry.name);
9787
- for (const inner of fs$1.readdirSync(scopeDir, { withFileTypes: true })) if (inner.isDirectory()) names.push(`${entry.name}/${inner.name}`);
9810
+ for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (inner.isDirectory()) names.push(`${entry.name}/${inner.name}`);
9788
9811
  }
9789
9812
  return names;
9790
9813
  }
9791
9814
  async uninstall(packageName) {
9792
9815
  const addonDir = path$1.join(this.addonsDir, packageName);
9793
- if (fs$1.existsSync(addonDir)) {
9794
- fs$1.rmSync(addonDir, {
9816
+ if (fs.existsSync(addonDir)) {
9817
+ fs.rmSync(addonDir, {
9795
9818
  recursive: true,
9796
9819
  force: true
9797
9820
  });
@@ -9799,8 +9822,8 @@ var AddonInstaller = class AddonInstaller {
9799
9822
  return;
9800
9823
  }
9801
9824
  const legacyDir = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""));
9802
- if (fs$1.existsSync(legacyDir)) {
9803
- fs$1.rmSync(legacyDir, {
9825
+ if (fs.existsSync(legacyDir)) {
9826
+ fs.rmSync(legacyDir, {
9804
9827
  recursive: true,
9805
9828
  force: true
9806
9829
  });
@@ -9808,22 +9831,22 @@ var AddonInstaller = class AddonInstaller {
9808
9831
  }
9809
9832
  }
9810
9833
  listInstalled() {
9811
- if (!fs$1.existsSync(this.addonsDir)) return [];
9834
+ if (!fs.existsSync(this.addonsDir)) return [];
9812
9835
  const packageDirs = [];
9813
- for (const entry of fs$1.readdirSync(this.addonsDir, { withFileTypes: true })) {
9836
+ for (const entry of fs.readdirSync(this.addonsDir, { withFileTypes: true })) {
9814
9837
  if (!isDirEntry(entry, this.addonsDir)) continue;
9815
9838
  if (entry.name.startsWith("@")) {
9816
9839
  const scopeDir = path$1.join(this.addonsDir, entry.name);
9817
- for (const inner of fs$1.readdirSync(scopeDir, { withFileTypes: true })) if (isDirEntry(inner, scopeDir)) packageDirs.push(path$1.join(scopeDir, inner.name));
9840
+ for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (isDirEntry(inner, scopeDir)) packageDirs.push(path$1.join(scopeDir, inner.name));
9818
9841
  } else packageDirs.push(path$1.join(this.addonsDir, entry.name));
9819
9842
  }
9820
9843
  return packageDirs.map((dir) => {
9821
9844
  const pkgPath = path$1.join(dir, "package.json");
9822
- if (!fs$1.existsSync(pkgPath)) return null;
9845
+ if (!fs.existsSync(pkgPath)) return null;
9823
9846
  const pkg = readPackageJson(pkgPath);
9824
9847
  if (!pkg || !pkg.camstackAddons) return null;
9825
9848
  const sourceFile = path$1.join(dir, ".install-source");
9826
- const installSource = fs$1.existsSync(sourceFile) ? parseInstallSource(fs$1.readFileSync(sourceFile, "utf-8").trim()) : void 0;
9849
+ const installSource = fs.existsSync(sourceFile) ? parseInstallSource(fs.readFileSync(sourceFile, "utf-8").trim()) : void 0;
9827
9850
  return {
9828
9851
  name: pkg.name,
9829
9852
  version: pkg.version,
@@ -9833,13 +9856,13 @@ var AddonInstaller = class AddonInstaller {
9833
9856
  }).filter((item) => item !== null);
9834
9857
  }
9835
9858
  isInstalled(packageName) {
9836
- if (fs$1.existsSync(path$1.join(this.addonsDir, packageName, "package.json"))) return true;
9837
- return fs$1.existsSync(path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json"));
9859
+ if (fs.existsSync(path$1.join(this.addonsDir, packageName, "package.json"))) return true;
9860
+ return fs.existsSync(path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json"));
9838
9861
  }
9839
9862
  getInstalledPackage(packageName) {
9840
9863
  let pkgPath = path$1.join(this.addonsDir, packageName, "package.json");
9841
- if (!fs$1.existsSync(pkgPath)) pkgPath = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json");
9842
- if (!fs$1.existsSync(pkgPath)) return null;
9864
+ if (!fs.existsSync(pkgPath)) pkgPath = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json");
9865
+ if (!fs.existsSync(pkgPath)) return null;
9843
9866
  const pkg = readPackageJson(pkgPath);
9844
9867
  if (!pkg) return null;
9845
9868
  return {
@@ -9858,7 +9881,7 @@ var AddonInstaller = class AddonInstaller {
9858
9881
  ]) {
9859
9882
  const candidate = path$1.join(this.bundledAddonsDir, dirName);
9860
9883
  try {
9861
- const pkg = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(path$1.join(candidate, "package.json"), "utf-8")));
9884
+ const pkg = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(candidate, "package.json"), "utf-8")));
9862
9885
  if (pkg && asString$1(pkg["name"]) === packageName) return candidate;
9863
9886
  } catch {}
9864
9887
  }
@@ -9867,7 +9890,7 @@ var AddonInstaller = class AddonInstaller {
9867
9890
  /** Ensure a package is built (dist/ exists and page bundles present) */
9868
9891
  async ensureBuilt(packageName, sourceDir, pkgData) {
9869
9892
  const distDir = path$1.join(sourceDir, "dist");
9870
- if (!(!fs$1.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
9893
+ if (!(!fs.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
9871
9894
  this.logger.info(`${packageName} — building (dist/ missing or incomplete)`);
9872
9895
  try {
9873
9896
  await runNpm(["run", "build"], this.npmRunOptions(sourceDir, 18e4));
@@ -9882,7 +9905,7 @@ var AddonInstaller = class AddonInstaller {
9882
9905
  if (!camstack?.addons) return false;
9883
9906
  for (const addon of camstack.addons) {
9884
9907
  if (!addon.pages) continue;
9885
- for (const page of addon.pages) if (page.bundle && !fs$1.existsSync(path$1.join(sourceDir, "dist", page.bundle))) return true;
9908
+ for (const page of addon.pages) if (page.bundle && !fs.existsSync(path$1.join(sourceDir, "dist", page.bundle))) return true;
9886
9909
  }
9887
9910
  return false;
9888
9911
  }
@@ -9891,7 +9914,7 @@ var AddonInstaller = class AddonInstaller {
9891
9914
  function isDirEntry(entry, parentDir) {
9892
9915
  if (entry.isDirectory()) return true;
9893
9916
  if (entry.isSymbolicLink()) try {
9894
- return fs$1.statSync(path$1.join(parentDir, entry.name)).isDirectory();
9917
+ return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
9895
9918
  } catch {
9896
9919
  return false;
9897
9920
  }
@@ -9990,7 +10013,7 @@ function selectAddonResidue(candidates) {
9990
10013
  }
9991
10014
  function readDeclaredName(dir) {
9992
10015
  try {
9993
- const parsed = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
10016
+ const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
9994
10017
  if (typeof parsed !== "object" || parsed === null) return null;
9995
10018
  const name = parsed.name;
9996
10019
  return typeof name === "string" ? name : null;
@@ -10000,7 +10023,7 @@ function readDeclaredName(dir) {
10000
10023
  }
10001
10024
  function readDeclaredVersion(dir) {
10002
10025
  try {
10003
- const parsed = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
10026
+ const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
10004
10027
  if (typeof parsed !== "object" || parsed === null) return null;
10005
10028
  const version = parsed.version;
10006
10029
  return typeof version === "string" ? version : null;
@@ -10010,7 +10033,7 @@ function readDeclaredVersion(dir) {
10010
10033
  }
10011
10034
  function isDirLike(p) {
10012
10035
  try {
10013
- return fs$1.statSync(p).isDirectory();
10036
+ return fs.statSync(p).isDirectory();
10014
10037
  } catch {
10015
10038
  return false;
10016
10039
  }
@@ -10020,7 +10043,7 @@ function freeQuarantineTarget(store, scope, dirName) {
10020
10043
  const base = scope === null ? dirName : `${scope.replace("@", "")}__${dirName}`;
10021
10044
  let candidate = path$1.join(store, base);
10022
10045
  let n = 1;
10023
- while (fs$1.existsSync(candidate)) {
10046
+ while (fs.existsSync(candidate)) {
10024
10047
  candidate = path$1.join(store, `${base}-${n}`);
10025
10048
  n += 1;
10026
10049
  }
@@ -10037,7 +10060,7 @@ function freeQuarantineTarget(store, scope, dirName) {
10037
10060
  function quarantineAddonResidue(addonsDir, log) {
10038
10061
  const quarantined = [];
10039
10062
  const failed = [];
10040
- if (!fs$1.existsSync(addonsDir)) return {
10063
+ if (!fs.existsSync(addonsDir)) return {
10041
10064
  quarantined,
10042
10065
  failed
10043
10066
  };
@@ -10045,7 +10068,7 @@ function quarantineAddonResidue(addonsDir, log) {
10045
10068
  const scan = (parent, scope) => {
10046
10069
  let names;
10047
10070
  try {
10048
- names = fs$1.readdirSync(parent);
10071
+ names = fs.readdirSync(parent);
10049
10072
  } catch {
10050
10073
  return;
10051
10074
  }
@@ -10064,8 +10087,8 @@ function quarantineAddonResidue(addonsDir, log) {
10064
10087
  const version = readDeclaredVersion(full);
10065
10088
  const to = freeQuarantineTarget(store, scope, dirName);
10066
10089
  try {
10067
- fs$1.mkdirSync(store, { recursive: true });
10068
- fs$1.renameSync(full, to);
10090
+ fs.mkdirSync(store, { recursive: true });
10091
+ fs.renameSync(full, to);
10069
10092
  } catch (err) {
10070
10093
  const error = err instanceof Error ? err.message : String(err);
10071
10094
  failed.push({
@@ -10123,11 +10146,11 @@ function getRestartMarkerPath(dataDir) {
10123
10146
  * intact or no marker at all (never a half-written file).
10124
10147
  */
10125
10148
  function writePendingRestart(dataDir, marker) {
10126
- fs$1.mkdirSync(dataDir, { recursive: true });
10149
+ fs.mkdirSync(dataDir, { recursive: true });
10127
10150
  const markerPath = getRestartMarkerPath(dataDir);
10128
10151
  const tmpPath = `${markerPath}.tmp`;
10129
- fs$1.writeFileSync(tmpPath, JSON.stringify(marker, null, 2), "utf-8");
10130
- fs$1.renameSync(tmpPath, markerPath);
10152
+ fs.writeFileSync(tmpPath, JSON.stringify(marker, null, 2), "utf-8");
10153
+ fs.renameSync(tmpPath, markerPath);
10131
10154
  }
10132
10155
  /**
10133
10156
  * Read + consume the marker. Returns the parsed payload on success and
@@ -10152,10 +10175,10 @@ function writePendingRestart(dataDir, marker) {
10152
10175
  */
10153
10176
  function readPendingRestart(dataDir) {
10154
10177
  const markerPath = getRestartMarkerPath(dataDir);
10155
- if (!fs$1.existsSync(markerPath)) return null;
10178
+ if (!fs.existsSync(markerPath)) return null;
10156
10179
  let raw;
10157
10180
  try {
10158
- raw = fs$1.readFileSync(markerPath, "utf-8");
10181
+ raw = fs.readFileSync(markerPath, "utf-8");
10159
10182
  } catch (err) {
10160
10183
  console.error("[restart-coordinator] Marker unreadable — leaving in place:", err);
10161
10184
  return null;
@@ -10194,7 +10217,7 @@ function readPendingRestart(dataDir) {
10194
10217
  /** Remove the marker if present. No-op if missing. */
10195
10218
  function clearPendingRestart(dataDir) {
10196
10219
  const markerPath = getRestartMarkerPath(dataDir);
10197
- fs$1.rmSync(markerPath, { force: true });
10220
+ fs.rmSync(markerPath, { force: true });
10198
10221
  }
10199
10222
  function isRestartKind(value) {
10200
10223
  return value === "framework-update" || value === "manual" || value === "system";
@@ -10206,7 +10229,7 @@ function scheduleSelfRestart(options = {}) {
10206
10229
  const touchTarget = process.env["CAMSTACK_RESTART_TOUCH_FILE"];
10207
10230
  if (touchTarget !== void 0 && touchTarget.length > 0) try {
10208
10231
  const now = /* @__PURE__ */ new Date();
10209
- fs$1.utimesSync(touchTarget, now, now);
10232
+ fs.utimesSync(touchTarget, now, now);
10210
10233
  return;
10211
10234
  } catch (err) {
10212
10235
  console.error("[restart-coordinator] dev touch-reload failed; falling through to process exit:", err);
@@ -14570,11 +14593,11 @@ function applyEnvOverrides(raw) {
14570
14593
  return result;
14571
14594
  }
14572
14595
  function loadYaml(configPath) {
14573
- if (!fs$1.existsSync(configPath)) {
14596
+ if (!fs.existsSync(configPath)) {
14574
14597
  console.warn(`[ConfigManager] Config file not found at: ${configPath}\n → Using built-in defaults. Set CONFIG_PATH env var or create the file.\n → Example path from project root: ./server/backend/data/config.yaml`);
14575
14598
  return {};
14576
14599
  }
14577
- const parsed = load(fs$1.readFileSync(configPath, "utf-8")) ?? {};
14600
+ const parsed = load(fs.readFileSync(configPath, "utf-8")) ?? {};
14578
14601
  console.log(`[ConfigManager] Loaded config from: ${configPath}`);
14579
14602
  return parsed;
14580
14603
  }
@@ -22729,7 +22752,7 @@ async function probeVaapiInit(renderNode) {
22729
22752
  */
22730
22753
  function safeExistsSync(path) {
22731
22754
  try {
22732
- return fs$1.existsSync(path);
22755
+ return fs.existsSync(path);
22733
22756
  } catch {
22734
22757
  return false;
22735
22758
  }
@@ -22748,11 +22771,11 @@ function probeLinuxGpus() {
22748
22771
  if (safeExistsSync("/dev/nvidia0") || safeExistsSync("/proc/driver/nvidia/version")) signals.hasNvidiaGpu = true;
22749
22772
  try {
22750
22773
  const drmDir = "/sys/class/drm";
22751
- if (fs$1.existsSync(drmDir)) for (const entry of fs$1.readdirSync(drmDir)) {
22774
+ if (fs.existsSync(drmDir)) for (const entry of fs.readdirSync(drmDir)) {
22752
22775
  if (!entry.startsWith("card")) continue;
22753
22776
  const vendorPath = `${drmDir}/${entry}/device/vendor`;
22754
22777
  if (!safeExistsSync(vendorPath)) continue;
22755
- const vendor = fs$1.readFileSync(vendorPath, "utf8").trim().toLowerCase();
22778
+ const vendor = fs.readFileSync(vendorPath, "utf8").trim().toLowerCase();
22756
22779
  if (vendor === "0x10de") signals.hasNvidiaGpu = true;
22757
22780
  else if (vendor === "0x1002") signals.hasAmdGpu = true;
22758
22781
  else if (vendor === "0x8086") signals.hasIntelGpu = true;
@@ -22970,21 +22993,21 @@ function sleep$1(ms) {
22970
22993
  * crashed holder) is stolen.
22971
22994
  */
22972
22995
  async function withFileLock(lockPath, fn) {
22973
- fs$1.mkdirSync(join(lockPath, ".."), { recursive: true });
22996
+ fs.mkdirSync(join(lockPath, ".."), { recursive: true });
22974
22997
  for (;;) try {
22975
- const fd = fs$1.openSync(lockPath, "wx");
22976
- fs$1.closeSync(fd);
22998
+ const fd = fs.openSync(lockPath, "wx");
22999
+ fs.closeSync(fd);
22977
23000
  break;
22978
23001
  } catch {
22979
23002
  try {
22980
- if (Date.now() - fs$1.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs$1.rmSync(lockPath, { force: true });
23003
+ if (Date.now() - fs.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs.rmSync(lockPath, { force: true });
22981
23004
  else await sleep$1(LOCK_POLL_MS);
22982
23005
  } catch {}
22983
23006
  }
22984
23007
  try {
22985
23008
  return await fn();
22986
23009
  } finally {
22987
- fs$1.rmSync(lockPath, { force: true });
23010
+ fs.rmSync(lockPath, { force: true });
22988
23011
  }
22989
23012
  }
22990
23013
  /** Coalesce in-process + serialize cross-process for one binary id. */
@@ -23042,7 +23065,7 @@ var AddonDepsManager = class {
23042
23065
  * failed or tampered download throws, and provisioning reports it.
23043
23066
  */
23044
23067
  async stageNativeDepsDeclaredBy(requirementsFile) {
23045
- if (!declaresEdgetpuDelegate(fs$1.readFileSync(requirementsFile, "utf8"))) return;
23068
+ if (!declaresEdgetpuDelegate(fs.readFileSync(requirementsFile, "utf8"))) return;
23046
23069
  await singleFlight(this.depsDir, "edgetpu-delegate", () => ensureEdgetpuDelegate(this.nodeRoot, this.logger));
23047
23070
  }
23048
23071
  getDepsDir() {
@@ -24073,7 +24096,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
24073
24096
  const addonId = declaration.id;
24074
24097
  const nodeDataDir = process.env["CAMSTACK_DATA"] ?? dataDir;
24075
24098
  const addonDataDir = path$1.resolve(nodeDataDir, "addons-data", addonId);
24076
- fs$1.mkdirSync(addonDataDir, { recursive: true });
24099
+ fs.mkdirSync(addonDataDir, { recursive: true });
24077
24100
  if (runtime.mode === "broker") ensureBindingSubscription(runtime.broker);
24078
24101
  const regs = getRegistries(nodeId);
24079
24102
  const workerResolver = {
@@ -25879,7 +25902,7 @@ var FailedRunnerRetryLedger = class {
25879
25902
  function readRunnerPackageVersions(addonDirs) {
25880
25903
  const out = {};
25881
25904
  for (const dir of addonDirs) try {
25882
- const raw = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
25905
+ const raw = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
25883
25906
  const version = typeof raw === "object" && raw !== null ? Reflect.get(raw, "version") : null;
25884
25907
  out[dir] = typeof version === "string" && version.length > 0 ? version : null;
25885
25908
  } catch {
@@ -25940,7 +25963,7 @@ function readAddonHeapDeclaration(spec) {
25940
25963
  if (cached !== void 0) return cached;
25941
25964
  let declaration = EMPTY_HEAP_DECLARATION;
25942
25965
  for (const manifestPath of [path$1.join(spec.addonDir, "package.json"), path$1.join(path$1.dirname(spec.addonDir), "package.json")]) try {
25943
- const raw = fs$1.readFileSync(manifestPath, "utf8");
25966
+ const raw = fs.readFileSync(manifestPath, "utf8");
25944
25967
  const parsed = JSON.parse(raw);
25945
25968
  const profile = extractHeapProfile(parsed, spec.addonId);
25946
25969
  const maxOldSpaceMb = extractMaxOldSpaceMb(parsed, spec.addonId);
@@ -27162,17 +27185,17 @@ var JobJournal = class {
27162
27185
  return path$1.join(this.jobsDir, `${id}.json`);
27163
27186
  }
27164
27187
  writeAtomic(filePath, data) {
27165
- fs$1.mkdirSync(path$1.dirname(filePath), { recursive: true });
27188
+ fs.mkdirSync(path$1.dirname(filePath), { recursive: true });
27166
27189
  const tmp = `${filePath}.tmp.${process.pid}.${Date.now()}`;
27167
- fs$1.writeFileSync(tmp, JSON.stringify(data, null, 2), {
27190
+ fs.writeFileSync(tmp, JSON.stringify(data, null, 2), {
27168
27191
  encoding: "utf-8",
27169
27192
  mode: 384
27170
27193
  });
27171
- fs$1.renameSync(tmp, filePath);
27194
+ fs.renameSync(tmp, filePath);
27172
27195
  }
27173
27196
  readIndex() {
27174
27197
  try {
27175
- const raw = JSON.parse(fs$1.readFileSync(this.indexPath, "utf-8"));
27198
+ const raw = JSON.parse(fs.readFileSync(this.indexPath, "utf-8"));
27176
27199
  if (raw && Array.isArray(raw.jobIds)) return {
27177
27200
  version: 1,
27178
27201
  jobIds: raw.jobIds
@@ -27197,7 +27220,7 @@ var JobJournal = class {
27197
27220
  }
27198
27221
  getJob(id) {
27199
27222
  try {
27200
- const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs$1.readFileSync(this.jobPath(id), "utf-8")));
27223
+ const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs.readFileSync(this.jobPath(id), "utf-8")));
27201
27224
  return parsed.success ? parsed.data : null;
27202
27225
  } catch {
27203
27226
  return null;
@@ -27262,14 +27285,14 @@ var StagingArea = class {
27262
27285
  }
27263
27286
  async fetchAndStage(input) {
27264
27287
  const destDir = path$1.join(this.stagingDir, input.jobId, safeSegment(input.name));
27265
- fs$1.rmSync(destDir, {
27288
+ fs.rmSync(destDir, {
27266
27289
  recursive: true,
27267
27290
  force: true
27268
27291
  });
27269
27292
  const tgz = await this.deps.fetchTarball(input.name, input.version, input.signal);
27270
27293
  if (input.signal.aborted) throw new Error("staging aborted after fetch");
27271
27294
  await this.deps.extract(tgz, destDir);
27272
- const raw = JSON.parse(fs$1.readFileSync(path$1.join(destDir, "package.json"), "utf-8"));
27295
+ const raw = JSON.parse(fs.readFileSync(path$1.join(destDir, "package.json"), "utf-8"));
27273
27296
  if (typeof raw.version !== "string" || raw.version.length === 0) throw new Error(`staging validation failed: ${input.name} staged a package.json with no version`);
27274
27297
  if (EXACT_SEMVER.test(input.version) && raw.version !== input.version) throw new Error(`staging validation failed: ${input.name} expected version ${input.version}, got ${raw.version}`);
27275
27298
  return {
@@ -27278,7 +27301,7 @@ var StagingArea = class {
27278
27301
  };
27279
27302
  }
27280
27303
  cleanup(jobId) {
27281
- fs$1.rmSync(path$1.join(this.stagingDir, jobId), {
27304
+ fs.rmSync(path$1.join(this.stagingDir, jobId), {
27282
27305
  recursive: true,
27283
27306
  force: true
27284
27307
  });
@@ -27293,13 +27316,13 @@ var StagingArea = class {
27293
27316
  sweepOrphans() {
27294
27317
  let entries;
27295
27318
  try {
27296
- entries = fs$1.readdirSync(this.stagingDir);
27319
+ entries = fs.readdirSync(this.stagingDir);
27297
27320
  } catch {
27298
27321
  return 0;
27299
27322
  }
27300
27323
  let removed = 0;
27301
27324
  for (const name of entries) try {
27302
- fs$1.rmSync(path$1.join(this.stagingDir, name), {
27325
+ fs.rmSync(path$1.join(this.stagingDir, name), {
27303
27326
  recursive: true,
27304
27327
  force: true
27305
27328
  });
@@ -27477,7 +27500,7 @@ var LifecycleJobEngine = class {
27477
27500
  * on failure → `failed`.
27478
27501
  */
27479
27502
  async reconcileJob(job) {
27480
- const exists = this.deps.stagedPathExists ?? ((p) => fs$1.existsSync(p));
27503
+ const exists = this.deps.stagedPathExists ?? ((p) => fs.existsSync(p));
27481
27504
  for (const task of job.tasks) {
27482
27505
  if (task.target === "framework") {
27483
27506
  if (!this.isTerminal(task.phase)) this.skipFrameworkTask(job, task);
@@ -28118,7 +28141,7 @@ var CatalogRegistry = class {
28118
28141
  const file = path$1.join(packageDir, "i18n", `${lang}.json`);
28119
28142
  let text;
28120
28143
  try {
28121
- text = fs$1.readFileSync(file, "utf8");
28144
+ text = fs.readFileSync(file, "utf8");
28122
28145
  } catch {
28123
28146
  continue;
28124
28147
  }
@@ -28174,4 +28197,4 @@ function resetCatalogRegistryForTests() {
28174
28197
  }
28175
28198
  //#endregion
28176
28199
  var readAllRows = import_read_all_rows.readAllRows;
28177
- export { ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, 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, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, 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, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, INTEGRATIONS_LEGACY, INTEGRATION_SETTINGS_LEGACY, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, 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, RecordsEngine, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORAGE_DRAIN_STATE_LEGACY, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHttpsListener, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };
28200
+ export { ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, 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, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, 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, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, INTEGRATIONS_LEGACY, INTEGRATION_SETTINGS_LEGACY, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, 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, RecordsEngine, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORAGE_DRAIN_STATE_LEGACY, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHttpsListener, clearIntegrationRows, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };