@camstack/server 1.2.786 → 1.2.788

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 (104) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/api/core/cap-providers.js +62 -96
  3. package/dist/api/trpc/generated-cap-mounts.js +1 -10
  4. package/dist/api/trpc/generated-cap-routers.js +2289 -2366
  5. package/dist/core/addon/addon-registry.service.js +29 -28
  6. package/dist/core/addon/boot-health-snapshot.js +42 -0
  7. package/dist/core/addon/hub-spawn-gate.js +1 -0
  8. package/dist/core/addon/instances-of-cap.js +35 -0
  9. package/package.json +64 -46
  10. package/system/dist/addon-utils.mjs +1 -1
  11. package/system/dist/{agent-https-snFEmSqQ.js → agent-https-jJDe-XNl.js} +1 -1
  12. package/system/dist/{agent-https-D779EYj3.mjs → agent-https-szf2FU49.mjs} +1 -1
  13. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  14. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  15. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  16. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  17. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  18. package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
  19. package/system/dist/builtins/autotrack/index.js +1 -1
  20. package/system/dist/builtins/autotrack/index.mjs +1 -1
  21. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  22. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  23. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  24. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  25. package/system/dist/builtins/camera-grid/index.js +1 -1
  26. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  27. package/system/dist/builtins/composer/composer.addon.js +3 -3
  28. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  29. package/system/dist/builtins/console-logging/index.js +1 -1
  30. package/system/dist/builtins/console-logging/index.mjs +1 -1
  31. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  32. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  33. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  34. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  35. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  36. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  37. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  38. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  39. package/system/dist/builtins/keychain/index.js +4 -4
  40. package/system/dist/builtins/keychain/index.mjs +4 -4
  41. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  42. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  43. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  44. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  45. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  46. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  47. package/system/dist/builtins/loki-logging/index.js +1 -1
  48. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  49. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  50. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  51. package/system/dist/builtins/platform-probe/index.js +1 -1
  52. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  53. package/system/dist/builtins/record-entries/index.js +1 -1
  54. package/system/dist/builtins/record-entries/index.mjs +1 -1
  55. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  56. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  57. package/system/dist/builtins/snapshot/index.js +1 -1
  58. package/system/dist/builtins/snapshot/index.mjs +1 -1
  59. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  60. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  61. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  62. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  63. package/system/dist/builtins/sqlite-storage/integration-record-kinds.d.ts +0 -1
  64. package/system/dist/builtins/sqlite-storage/integration-registry.d.ts +2 -4
  65. package/system/dist/builtins/sqlite-storage/migrations/migration-types.d.ts +6 -1
  66. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +7 -4
  67. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +7 -4
  68. package/system/dist/builtins/storage-orchestrator/drain-state-store.d.ts +4 -8
  69. package/system/dist/builtins/storage-orchestrator/location-store.d.ts +9 -26
  70. package/system/dist/builtins/storage-orchestrator/record-kinds.d.ts +0 -1
  71. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +35 -407
  72. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +36 -407
  73. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  74. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  75. package/system/dist/builtins/winston-logging/index.js +1 -1
  76. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  77. package/system/dist/{capture-engine-DkTEWrRe.mjs → capture-engine-BsKY_3xa.mjs} +1 -1
  78. package/system/dist/{capture-engine-NZ11ORZS.js → capture-engine-DNHgjQot.js} +1 -1
  79. package/system/dist/{composition-sources-B9-lkIvO.mjs → composition-sources-BRdGsbVT.mjs} +1 -1
  80. package/system/dist/{composition-sources-B6GYTy_7.js → composition-sources-BgO0GQYW.js} +1 -1
  81. package/system/dist/{constants-DR8hdi45.js → constants-C3jGKQSQ.js} +1 -1
  82. package/system/dist/{constants--9ui1LK0.mjs → constants-CQeMrR4f.mjs} +1 -1
  83. package/system/dist/{coral-accelerators-DBlgWB8k.mjs → coral-accelerators-BW3OcrLD.mjs} +6 -6
  84. package/system/dist/{custom-action-registry-B9zFBNVa.mjs → custom-action-registry-N7flBDwT.mjs} +37 -37
  85. package/system/dist/{device-ca-D-7tAHJ_.mjs → device-ca-ByVi5eUC.mjs} +1 -1
  86. package/system/dist/{device-ca-sIFmKkGM.js → device-ca-D3y6wGmn.js} +1 -1
  87. package/system/dist/{dist-h3Yla8gE.js → dist-BRI-Mwx0.js} +824 -957
  88. package/system/dist/{dist-D-iGSnX_.mjs → dist-BsQA6-0i.mjs} +824 -957
  89. package/system/dist/file-host-worker.js +1 -1
  90. package/system/dist/file-host-worker.mjs +1 -1
  91. package/system/dist/{hub-mdns-ciao-DuEfM0fI.mjs → hub-mdns-ciao-8dJTW2LI.mjs} +2 -2
  92. package/system/dist/{hub-mdns-ciao-C5DkUEZF.js → hub-mdns-ciao-Ry_Jpljx.js} +2 -2
  93. package/system/dist/index.d.ts +2 -2
  94. package/system/dist/index.js +85 -223
  95. package/system/dist/index.mjs +298 -434
  96. package/system/dist/kernel/addon-health-monitor.d.ts +21 -0
  97. package/system/dist/{legacy-integration-rows-door-BTdhD-Yp.mjs → legacy-integration-rows-door-CjXTbmvH.mjs} +1 -1
  98. package/system/dist/{legacy-integration-rows-door-DTDD5wwC.js → legacy-integration-rows-door-D5BdSNla.js} +1 -1
  99. package/system/dist/migrations/hub/2026-11-06-drop-legacy-integrations-and-storage-locations.d.ts +12 -0
  100. package/system/dist/{restore-archive-DQWz5Wp-.mjs → restore-archive-Co2lk3OU.mjs} +94 -94
  101. package/system/dist/{restore-archive-CkAD_-E9.js → restore-archive-GoWJMdHy.js} +1 -1
  102. package/system/dist/{wal-maintenance-CB-O-GPP.js → wal-maintenance-C1Haue74.js} +0 -0
  103. package/system/dist/{wal-maintenance-DouX1XsY.mjs → wal-maintenance-DRnV6QYu.mjs} +0 -0
  104. package/system/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { i as __require } from "./chunk-CNf5ZN-e.mjs";
2
- import { Aa as splitTranslationRef, Bo as DATAPLANE_SECRET_HEADER$1, D as CatalogFileSchema, Ec as EventCategory$1, Es as collectSecretMarkerRefs, Hn as compareVersions, Ho as DEVICE_STATUS_METHOD, Hr as interpolate, Hs as isDebugChannelName, Is as expandCapMethods, Kr as isArrayOutputSchema, Mi as objectInputDeclaresRequiredDeviceId, Ns as defineRecordKinds, Nt as PackageRequiresSchema, Or as extractNestedAddonId, Os as createEvent$1, Ps as emitDownForOwnedCaps, Qr as isObjectInput, Ra as supportedRuntimes, Rs as getDebugInterest, St as METHOD_ACCESS_MAP, Tc as errMsg$1, Vo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Wa as unmetRequirements, a as AGENT_MDNS_SERVICE_TYPE, ac as parseJsonObject, as as ReadinessTimeoutError, b as CATALOG_LANGS, ba as scopesAllowDeviceCap, bc as userError, bs as asString$1, bt as LOG_LEVEL_RANK, cc as readinessKey, dr as describeUnmet, ei as isVoidInput, fc as scopeKey, hn as addonSettingsCapability, is as ReadinessRegistry, ji as objectInputDeclaresAddonId, mi as looseSchema, o as AGENT_MDNS_TXT_KEYS, oc as parseJsonUnknown, oi as lifecycleJobSchema, pi as logLevelAtMost, qi as procedureAuthKey, qr as isCollectionArrayMethod, rs as RUNTIME_DEFAULTS, s as ALL_CAPABILITY_DEFINITIONS, ti as kebabToCamel$1, ua as resolveMethodAuth, uc as resolveCapMount, vs as asJsonObject$1, wn as bareAddonId, xc as withoutCallerStamp, ya as scopesAllowAddon, ys as asNumber, zo as CALLER_STAMPED_CAPABILITIES$1 } from "./dist-D-iGSnX_.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-D-7tAHJ_.mjs";
2
+ import { Aa as splitTranslationRef, Bo as DATAPLANE_SECRET_HEADER$1, D as CatalogFileSchema, Ec as EventCategory$1, Es as collectSecretMarkerRefs, Hn as compareVersions, Ho as DEVICE_STATUS_METHOD, Hr as interpolate, Hs as isDebugChannelName, Is as expandCapMethods, Kr as isArrayOutputSchema, Mi as objectInputDeclaresRequiredDeviceId, Ns as defineRecordKinds, Nt as PackageRequiresSchema, Or as extractNestedAddonId, Os as createEvent$1, Ps as emitDownForOwnedCaps, Qr as isObjectInput, Ra as supportedRuntimes, Rs as getDebugInterest, St as METHOD_ACCESS_MAP, Tc as errMsg$1, Vo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Wa as unmetRequirements, a as AGENT_MDNS_SERVICE_TYPE, ac as parseJsonObject, as as ReadinessTimeoutError, b as CATALOG_LANGS, ba as scopesAllowDeviceCap, bc as userError, bs as asString$1, bt as LOG_LEVEL_RANK, cc as readinessKey, dr as describeUnmet, ei as isVoidInput, fc as scopeKey, hn as addonSettingsCapability, is as ReadinessRegistry, ji as objectInputDeclaresAddonId, mi as looseSchema, o as AGENT_MDNS_TXT_KEYS, oc as parseJsonUnknown, oi as lifecycleJobSchema, pi as logLevelAtMost, qi as procedureAuthKey, qr as isCollectionArrayMethod, rs as RUNTIME_DEFAULTS, s as ALL_CAPABILITY_DEFINITIONS, ti as kebabToCamel$1, ua as resolveMethodAuth, uc as resolveCapMount, vs as asJsonObject$1, wn as bareAddonId, xc as withoutCallerStamp, ya as scopesAllowAddon, ys as asNumber, zo as CALLER_STAMPED_CAPABILITIES$1 } from "./dist-BsQA6-0i.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-ByVi5eUC.mjs";
4
4
  import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
5
5
  import { AlertCenterAddon, a as redactLogEntry, i as isCredentialKeyName, n as lastCauseAfterChunk, o as redactLogMeta, r as readRunnerDisplayName, s as redactLogText, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
6
6
  import "./builtins/alerts/index.mjs";
@@ -25,29 +25,29 @@ 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-DouX1XsY.mjs";
29
- import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-BTdhD-Yp.mjs";
28
+ import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-DRnV6QYu.mjs";
29
+ import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-CjXTbmvH.mjs";
30
30
  import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
31
31
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
32
- 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
+ import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, l as storageOrchestratorRecordKinds, n as HUB_CAP_FWD_ACTION, o as buildStorageLocationRegistry, r as HUB_CAP_FWD_SERVICE, t as StorageOrchestratorService } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
33
33
  import "./builtins/storage-orchestrator/index.mjs";
34
- 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-D779EYj3.mjs";
35
- 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--9ui1LK0.mjs";
34
+ 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-szf2FU49.mjs";
35
+ 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-CQeMrR4f.mjs";
36
36
  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";
37
37
  import "./builtins/system-config/index.mjs";
38
38
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
39
- 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-B9zFBNVa.mjs";
40
- 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-DuEfM0fI.mjs";
39
+ 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-N7flBDwT.mjs";
40
+ 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-8dJTW2LI.mjs";
41
41
  import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
42
42
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
43
- 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-DQWz5Wp-.mjs";
44
- import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
43
+ 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-Co2lk3OU.mjs";
44
+ import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-BW3OcrLD.mjs";
45
45
  import { z } from "zod";
46
46
  import * as crypto$1 from "node:crypto";
47
47
  import { createHash, randomBytes, randomUUID } from "node:crypto";
48
48
  import { PYTHON_VERSION, buildBinaryPath, declaresEdgetpuDelegate, downloadBinary, ensureBinary, ensureBinary as ensureBinary$1, ensureEdgetpuDelegate, ensureFfmpeg, ensureFfmpeg as ensureFfmpeg$1, ensurePython, ensurePython as ensurePython$1, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonPackages as installPythonPackages$1, installPythonRequirements, installPythonRequirements as installPythonRequirements$1 } from "@camstack/types/node";
49
49
  import { connect, createConnection, createServer } from "node:net";
50
- import * as fs$1 from "node:fs";
50
+ import * as fs from "node:fs";
51
51
  import { accessSync, constants, createReadStream, createWriteStream, existsSync, readFileSync, readdirSync } from "node:fs";
52
52
  import * as path$1 from "node:path";
53
53
  import { basename, dirname, isAbsolute, join, resolve } from "node:path";
@@ -5020,7 +5020,7 @@ var PythonEnvManager = class {
5020
5020
  async ensure(options) {
5021
5021
  const probe = await this.probe();
5022
5022
  if (!probe.available || !probe.path) throw userError("system.python-required", void 0, "Python 3.10+ is required but not found on this system");
5023
- if (!fs$1.existsSync(path$1.join(this.venvPath, "bin", "python"))) await execFileAsync$7(probe.path, [
5023
+ if (!fs.existsSync(path$1.join(this.venvPath, "bin", "python"))) await execFileAsync$7(probe.path, [
5024
5024
  "-m",
5025
5025
  "venv",
5026
5026
  this.venvPath
@@ -5043,7 +5043,7 @@ var PythonEnvManager = class {
5043
5043
  }
5044
5044
  spawn(script, args) {
5045
5045
  const venvPython = path$1.join(this.venvPath, "bin", "python");
5046
- if (!fs$1.existsSync(venvPython)) throw new Error("Python venv not initialized. Call ensure() first.");
5046
+ if (!fs.existsSync(venvPython)) throw new Error("Python venv not initialized. Call ensure() first.");
5047
5047
  return spawn(venvPython, [script, ...args]);
5048
5048
  }
5049
5049
  };
@@ -5395,20 +5395,20 @@ var StorageManager = class {
5395
5395
  const basePath = this.locationManager.getBackend(mappedName).basePath;
5396
5396
  location.files = {
5397
5397
  async readFile(p) {
5398
- return fs$1.promises.readFile(path$1.join(basePath, p));
5398
+ return fs.promises.readFile(path$1.join(basePath, p));
5399
5399
  },
5400
5400
  async writeFile(p, data) {
5401
5401
  const full = path$1.join(basePath, p);
5402
- await fs$1.promises.mkdir(path$1.dirname(full), { recursive: true });
5403
- await fs$1.promises.writeFile(full, data);
5402
+ await fs.promises.mkdir(path$1.dirname(full), { recursive: true });
5403
+ await fs.promises.writeFile(full, data);
5404
5404
  },
5405
5405
  async deleteFile(p) {
5406
- await fs$1.promises.rm(path$1.join(basePath, p), { force: true });
5406
+ await fs.promises.rm(path$1.join(basePath, p), { force: true });
5407
5407
  },
5408
5408
  async listFiles(prefix) {
5409
5409
  const dir = prefix ? path$1.join(basePath, prefix) : basePath;
5410
5410
  try {
5411
- return (await fs$1.promises.readdir(dir)).map((f) => prefix ? `${prefix}/${f}` : f);
5411
+ return (await fs.promises.readdir(dir)).map((f) => prefix ? `${prefix}/${f}` : f);
5412
5412
  } catch {
5413
5413
  return [];
5414
5414
  }
@@ -5418,7 +5418,7 @@ var StorageManager = class {
5418
5418
  },
5419
5419
  async exists(p) {
5420
5420
  try {
5421
- await fs$1.promises.access(path$1.join(basePath, p));
5421
+ await fs.promises.access(path$1.join(basePath, p));
5422
5422
  return true;
5423
5423
  } catch {
5424
5424
  return false;
@@ -5576,13 +5576,6 @@ var AgentMdnsAdvertiser = class {
5576
5576
  //#endregion
5577
5577
  //#region src/builtins/sqlite-storage/integration-record-kinds.ts
5578
5578
  var import_read_all_rows = require_read_all_rows();
5579
- /**
5580
- * Record kinds owned by integration-registry (phase 4).
5581
- *
5582
- * An integration's configuration is the addon's own instance record. This owner
5583
- * keeps only the registry row (id, addon, name, enabled, info).
5584
- */
5585
- var INTEGRATIONS_LEGACY = "integrations";
5586
5579
  var _integrationRegistryRecordKinds = defineRecordKinds({ integrations: {
5587
5580
  schema: z.object({
5588
5581
  addonId: z.string(),
@@ -5627,62 +5620,6 @@ var integrationCounter = 0;
5627
5620
  function nextIntegrationId() {
5628
5621
  return `int_${String(++integrationCounter).padStart(4, "0")}`;
5629
5622
  }
5630
- var INTEGRATIONS_COLUMNS = [
5631
- {
5632
- name: "id",
5633
- type: "TEXT",
5634
- primaryKey: true
5635
- },
5636
- {
5637
- name: "addon_id",
5638
- type: "TEXT",
5639
- notNull: true
5640
- },
5641
- {
5642
- name: "name",
5643
- type: "TEXT",
5644
- notNull: true
5645
- },
5646
- {
5647
- name: "enabled",
5648
- type: "INTEGER",
5649
- notNull: true,
5650
- defaultValue: 1
5651
- },
5652
- {
5653
- name: "info",
5654
- type: "JSON",
5655
- notNull: true,
5656
- defaultValue: "{}"
5657
- },
5658
- {
5659
- name: "origin_stable_id",
5660
- type: "TEXT"
5661
- },
5662
- {
5663
- name: "created_at",
5664
- type: "INTEGER",
5665
- notNull: true
5666
- },
5667
- {
5668
- name: "updated_at",
5669
- type: "INTEGER",
5670
- notNull: true
5671
- }
5672
- ];
5673
- var INTEGRATIONS_INDEXES = [{
5674
- name: "idx_integrations_addon",
5675
- columns: ["addon_id"]
5676
- }];
5677
- /**
5678
- * @durable class=config owner=integration-registry
5679
- * write="`createIntegration` — an operator adds a provider, or an addon declares
5680
- * a FIXED one (`info.fixed`); `updateIntegration` rewrites name/enabled/info"
5681
- * retention="`deleteIntegration` only, and a fixed integration refuses to be
5682
- * deleted. Nothing ages out. The `int_NNNN` counter resumes from the highest
5683
- * surviving row at boot, so wiping the table restarts numbering."
5684
- */
5685
- var INTEGRATIONS = INTEGRATIONS_LEGACY;
5686
5623
  /**
5687
5624
  * The persisted INTEGRATIONS — one row per provider instance an operator (or a
5688
5625
  * declaring addon) added. The instance's configuration lives on the addon's own
@@ -5711,47 +5648,22 @@ function mapIntegrationBody(id, body) {
5711
5648
  };
5712
5649
  }
5713
5650
  var IntegrationRegistry = class IntegrationRegistry {
5714
- store;
5715
5651
  recordStores;
5716
- constructor(backend, recordStores) {
5717
- this.store = backend;
5652
+ constructor(recordStores) {
5718
5653
  this.recordStores = recordStores;
5719
5654
  }
5720
5655
  static recordStoresOf(records) {
5721
5656
  return { integrations: records.kind(integrationRegistryRecordKinds.integrations) };
5722
5657
  }
5723
5658
  async initialize() {
5724
- if (this.recordStores === void 0) await this.store.declareCollection({
5725
- collection: INTEGRATIONS,
5726
- columns: INTEGRATIONS_COLUMNS,
5727
- indexes: INTEGRATIONS_INDEXES
5728
- });
5729
5659
  await this.resumeCounter();
5730
5660
  }
5731
5661
  async resumeCounter() {
5732
- const kind = this.recordStores?.integrations;
5733
- if (kind !== void 0) {
5734
- const rows = await (0, import_read_all_rows.readAllRows)(kind, { order: "id" });
5735
- rows.sort((a, b) => b.id.localeCompare(a.id));
5736
- const top = rows[0];
5737
- if (top !== void 0) {
5738
- const num = parseInt(top.id.replace("int_", ""), 10);
5739
- if (!isNaN(num)) integrationCounter = num;
5740
- }
5741
- return;
5742
- }
5743
- const ints = await this.store.query({
5744
- collection: INTEGRATIONS,
5745
- filter: {
5746
- orderBy: {
5747
- field: "id",
5748
- direction: "desc"
5749
- },
5750
- limit: 1
5751
- }
5752
- });
5753
- if (ints[0]) {
5754
- const num = parseInt(ints[0].id.replace("int_", ""), 10);
5662
+ const rows = await (0, import_read_all_rows.readAllRows)(this.recordStores.integrations, { order: "id" });
5663
+ rows.sort((a, b) => b.id.localeCompare(a.id));
5664
+ const top = rows[0];
5665
+ if (top !== void 0) {
5666
+ const num = parseInt(top.id.replace("int_", ""), 10);
5755
5667
  if (!isNaN(num)) integrationCounter = num;
5756
5668
  }
5757
5669
  }
@@ -5773,115 +5685,45 @@ var IntegrationRegistry = class IntegrationRegistry {
5773
5685
  createdAt: now,
5774
5686
  updatedAt: now
5775
5687
  };
5776
- const kind = this.recordStores?.integrations;
5777
- if (kind !== void 0) await kind.put({
5688
+ await this.recordStores.integrations.put({
5778
5689
  id,
5779
5690
  data: body
5780
5691
  });
5781
- else await this.store.insert({
5782
- collection: INTEGRATIONS,
5783
- record: {
5784
- id,
5785
- data: {
5786
- addon_id: input.addonId,
5787
- name: input.name,
5788
- enabled: enabled ? 1 : 0,
5789
- info,
5790
- origin_stable_id: input.originStableId ?? null,
5791
- created_at: now,
5792
- updated_at: now
5793
- }
5794
- }
5795
- });
5796
- return {
5797
- id,
5798
- addonId: input.addonId,
5799
- name: input.name,
5800
- enabled,
5801
- info,
5802
- ...input.originStableId !== void 0 ? { originStableId: input.originStableId } : {},
5803
- createdAt: now,
5804
- updatedAt: now
5805
- };
5692
+ return mapIntegrationBody(id, body);
5806
5693
  }
5807
5694
  async getIntegration(id) {
5808
- const kind = this.recordStores?.integrations;
5809
- if (kind !== void 0) {
5810
- const row = await kind.get(id);
5811
- return row === null ? null : mapIntegrationBody(row.id, row.data);
5812
- }
5813
- const rows = await this.store.query({
5814
- collection: INTEGRATIONS,
5815
- filter: {
5816
- where: { id },
5817
- limit: 1
5818
- }
5819
- });
5820
- return rows[0] ? this.mapIntegration(rows[0].data) : null;
5695
+ const row = await this.recordStores.integrations.get(id);
5696
+ return row === null ? null : mapIntegrationBody(row.id, row.data);
5821
5697
  }
5822
5698
  async getIntegrationByAddonId(rawAddonId) {
5823
5699
  const addonId = bareAddonId(rawAddonId);
5824
- const kind = this.recordStores?.integrations;
5825
- if (kind !== void 0) {
5826
- const row = (await kind.query({
5827
- where: { addonId },
5828
- limit: 1
5829
- })).records[0];
5830
- return row === void 0 ? null : mapIntegrationBody(row.id, row.data);
5831
- }
5832
- const rows = await this.store.query({
5833
- collection: INTEGRATIONS,
5834
- filter: {
5835
- where: { addon_id: addonId },
5836
- limit: 1
5837
- }
5838
- });
5839
- return rows[0] ? this.mapIntegration(rows[0].data) : null;
5700
+ const row = (await this.recordStores.integrations.query({
5701
+ where: { addonId },
5702
+ limit: 1
5703
+ })).records[0];
5704
+ return row === void 0 ? null : mapIntegrationBody(row.id, row.data);
5840
5705
  }
5841
5706
  async listIntegrations() {
5842
- const kind = this.recordStores?.integrations;
5843
- if (kind !== void 0) {
5844
- const rows = await (0, import_read_all_rows.readAllRows)(kind);
5845
- rows.sort((a, b) => a.data.createdAt - b.data.createdAt);
5846
- return rows.map((r) => mapIntegrationBody(r.id, r.data));
5847
- }
5848
- return (await this.store.query({
5849
- collection: INTEGRATIONS,
5850
- filter: { orderBy: {
5851
- field: "created_at",
5852
- direction: "asc"
5853
- } }
5854
- })).map((r) => this.mapIntegration(r.data));
5707
+ const rows = await (0, import_read_all_rows.readAllRows)(this.recordStores.integrations);
5708
+ rows.sort((a, b) => a.data.createdAt - b.data.createdAt);
5709
+ return rows.map((r) => mapIntegrationBody(r.id, r.data));
5855
5710
  }
5856
5711
  async updateIntegration(id, updates) {
5857
5712
  const now = Math.floor(Date.now() / 1e3);
5858
- const kind = this.recordStores?.integrations;
5859
- if (kind !== void 0) {
5860
- const existing = await kind.get(id);
5861
- if (existing === null) return null;
5862
- const next = {
5863
- ...existing.data,
5864
- updatedAt: now,
5865
- ...updates.name !== void 0 ? { name: updates.name } : {},
5866
- ...updates.enabled !== void 0 ? { enabled: updates.enabled } : {},
5867
- ...updates.info !== void 0 ? { info: updates.info } : {}
5868
- };
5869
- await kind.put({
5870
- id,
5871
- data: next
5872
- });
5873
- return mapIntegrationBody(id, next);
5874
- }
5875
- const updateRow = { updated_at: now };
5876
- if (updates.name !== void 0) updateRow["name"] = updates.name;
5877
- if (updates.enabled !== void 0) updateRow["enabled"] = updates.enabled ? 1 : 0;
5878
- if (updates.info !== void 0) updateRow["info"] = updates.info;
5879
- await this.store.updateWhere({
5880
- collection: INTEGRATIONS,
5881
- filter: { where: { id } },
5882
- data: updateRow
5713
+ const existing = await this.recordStores.integrations.get(id);
5714
+ if (existing === null) return null;
5715
+ const next = {
5716
+ ...existing.data,
5717
+ updatedAt: now,
5718
+ ...updates.name !== void 0 ? { name: updates.name } : {},
5719
+ ...updates.enabled !== void 0 ? { enabled: updates.enabled } : {},
5720
+ ...updates.info !== void 0 ? { info: updates.info } : {}
5721
+ };
5722
+ await this.recordStores.integrations.put({
5723
+ id,
5724
+ data: next
5883
5725
  });
5884
- return this.getIntegration(id);
5726
+ return mapIntegrationBody(id, next);
5885
5727
  }
5886
5728
  /**
5887
5729
  * A FIXED integration exists because an addon declares it, not because an
@@ -5896,29 +5738,9 @@ var IntegrationRegistry = class IntegrationRegistry {
5896
5738
  async deleteIntegration(id) {
5897
5739
  const integration = await this.getIntegration(id);
5898
5740
  if (integration !== null && IntegrationRegistry.isFixed(integration)) throw new Error(`integration "${id}" is fixed — it belongs to the addon that declared it and cannot be deleted`);
5899
- const integrationsKind = this.recordStores?.integrations;
5900
- if (integrationsKind !== void 0) {
5901
- await integrationsKind.delete(id);
5902
- return true;
5903
- }
5904
- await this.store.deleteWhere({
5905
- collection: INTEGRATIONS,
5906
- filter: { where: { id } }
5907
- });
5741
+ await this.recordStores.integrations.delete(id);
5908
5742
  return true;
5909
5743
  }
5910
- mapIntegration(row) {
5911
- return {
5912
- id: String(row["id"]),
5913
- addonId: String(row["addon_id"]),
5914
- name: String(row["name"]),
5915
- enabled: row["enabled"] === 1,
5916
- info: readInfo(row["info"]),
5917
- ...typeof row["origin_stable_id"] === "string" ? { originStableId: row["origin_stable_id"] } : {},
5918
- createdAt: Number(row["created_at"]),
5919
- updatedAt: Number(row["updated_at"])
5920
- };
5921
- }
5922
5744
  };
5923
5745
  //#endregion
5924
5746
  //#region src/builtins/sqlite-storage/integration-rows-ports.ts
@@ -6046,7 +5868,7 @@ var TRADITIONAL_NATIVE_PACKAGES = ["better-sqlite3"];
6046
5868
  function hasDotNode(dir, maxDepth) {
6047
5869
  let entries;
6048
5870
  try {
6049
- entries = fs$1.readdirSync(dir, { withFileTypes: true });
5871
+ entries = fs.readdirSync(dir, { withFileTypes: true });
6050
5872
  } catch {
6051
5873
  return false;
6052
5874
  }
@@ -6057,7 +5879,7 @@ function hasDotNode(dir, maxDepth) {
6057
5879
  }
6058
5880
  /** Locate the bundled `prebuild-install` bin.js inside the staged closure. */
6059
5881
  function resolvePrebuildInstallBin(closureDir, moduleDir) {
6060
- 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;
5882
+ 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;
6061
5883
  }
6062
5884
  /**
6063
5885
  * Default fetcher: run the closure's own `prebuild-install` under the CURRENT
@@ -6110,7 +5932,7 @@ async function ensureNativePrebuilds(closureDir, options) {
6110
5932
  const fetched = [];
6111
5933
  for (const pkg of packages) {
6112
5934
  const moduleDir = path$1.join(nm, pkg);
6113
- if (!fs$1.existsSync(moduleDir)) continue;
5935
+ if (!fs.existsSync(moduleDir)) continue;
6114
5936
  if (hasDotNode(moduleDir, 4)) continue;
6115
5937
  options.logger.warn("staged closure native prebuild missing — fetching for running ABI", { meta: {
6116
5938
  pkg,
@@ -6173,12 +5995,12 @@ async function ensureNativePrebuilds(closureDir, options) {
6173
5995
  function replantFromBundled(srcModuleDir, dstModuleDir, hasNative) {
6174
5996
  if (!hasNative(srcModuleDir)) return false;
6175
5997
  try {
6176
- fs$1.rmSync(dstModuleDir, {
5998
+ fs.rmSync(dstModuleDir, {
6177
5999
  recursive: true,
6178
6000
  force: true
6179
6001
  });
6180
- fs$1.mkdirSync(path$1.dirname(dstModuleDir), { recursive: true });
6181
- fs$1.cpSync(srcModuleDir, dstModuleDir, {
6002
+ fs.mkdirSync(path$1.dirname(dstModuleDir), { recursive: true });
6003
+ fs.cpSync(srcModuleDir, dstModuleDir, {
6182
6004
  recursive: true,
6183
6005
  dereference: true
6184
6006
  });
@@ -6207,7 +6029,7 @@ async function ensureAddonNativePrebuilds(addonDir, options) {
6207
6029
  const missing = [];
6208
6030
  for (const pkg of packages) {
6209
6031
  const moduleDir = path$1.join(nm, pkg);
6210
- if (!fs$1.existsSync(moduleDir)) continue;
6032
+ if (!fs.existsSync(moduleDir)) continue;
6211
6033
  if (hasNative(moduleDir)) {
6212
6034
  results.push({
6213
6035
  pkg,
@@ -6306,7 +6128,7 @@ async function defaultDownloadTarball(url, destTgz) {
6306
6128
  const res = await fetch(url);
6307
6129
  if (!res.ok || !res.body) throw new Error(`HTTP ${res.status} downloading ${url}`);
6308
6130
  const bytes = Buffer.from(await res.arrayBuffer());
6309
- await fs$1.promises.writeFile(destTgz, bytes);
6131
+ await fs.promises.writeFile(destTgz, bytes);
6310
6132
  }
6311
6133
  async function defaultExtractTarball(tgzPath, destDir) {
6312
6134
  await execFileAsync$5("tar", [
@@ -6392,7 +6214,7 @@ async function resolveUncached(options) {
6392
6214
  argsPrefix: []
6393
6215
  };
6394
6216
  const cliPath = bootstrappedCliPath(options.cacheDir);
6395
- if (fs$1.existsSync(cliPath)) {
6217
+ if (fs.existsSync(cliPath)) {
6396
6218
  options.logger.info("system npm unavailable — using bootstrapped npm", { meta: { cliPath } });
6397
6219
  return {
6398
6220
  command: process.execPath,
@@ -6404,12 +6226,12 @@ async function resolveUncached(options) {
6404
6226
  const registry = (options.registry ?? DEFAULT_REGISTRY$1).replace(/\/+$/, "");
6405
6227
  const tarballUrl = tarballUrlOf(await (options.fetchJson ?? defaultFetchJson)(`${registry}/npm/latest`));
6406
6228
  if (!tarballUrl) throw new Error(`registry metadata for 'npm' carries no dist.tarball (${registry})`);
6407
- await fs$1.promises.mkdir(options.cacheDir, { recursive: true });
6229
+ await fs.promises.mkdir(options.cacheDir, { recursive: true });
6408
6230
  const tgzPath = path$1.join(options.cacheDir, "npm-bootstrap.tgz");
6409
6231
  await (options.downloadTarball ?? defaultDownloadTarball)(tarballUrl, tgzPath);
6410
6232
  await (options.extractTarball ?? defaultExtractTarball)(tgzPath, options.cacheDir);
6411
- await fs$1.promises.rm(tgzPath, { force: true });
6412
- if (!fs$1.existsSync(cliPath)) throw new Error(`extracted npm tarball is missing ${cliPath}`);
6233
+ await fs.promises.rm(tgzPath, { force: true });
6234
+ if (!fs.existsSync(cliPath)) throw new Error(`extracted npm tarball is missing ${cliPath}`);
6413
6235
  options.logger.info("npm bootstrapped", { meta: { cliPath } });
6414
6236
  return {
6415
6237
  command: process.execPath,
@@ -6475,7 +6297,7 @@ function readOwningPackageVersion(entryPath) {
6475
6297
  let dir = path$1.dirname(entryPath);
6476
6298
  for (let hop = 0; hop < PACKAGE_JSON_LOOKUP_DEPTH; hop++) {
6477
6299
  try {
6478
- const version = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8")))?.["version"];
6300
+ const version = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8")))?.["version"];
6479
6301
  if (typeof version === "string" && version.length > 0) return version;
6480
6302
  } catch {}
6481
6303
  const parent = path$1.dirname(dir);
@@ -6519,14 +6341,14 @@ function readOwningPackageVersion(entryPath) {
6519
6341
  function addonModuleCacheKey(entryPath) {
6520
6342
  let stat;
6521
6343
  try {
6522
- stat = fs$1.statSync(entryPath);
6344
+ stat = fs.statSync(entryPath);
6523
6345
  } catch {
6524
6346
  return null;
6525
6347
  }
6526
6348
  const version = readOwningPackageVersion(entryPath) ?? `m${stat.mtimeMs}`;
6527
6349
  let content;
6528
6350
  try {
6529
- content = createHash("sha1").update(fs$1.readFileSync(entryPath)).digest("hex").slice(0, 16);
6351
+ content = createHash("sha1").update(fs.readFileSync(entryPath)).digest("hex").slice(0, 16);
6530
6352
  } catch {
6531
6353
  content = `m${stat.mtimeMs}s${stat.size}`;
6532
6354
  }
@@ -6630,14 +6452,14 @@ var AddonLoader = class {
6630
6452
  * BUILTINS from the active closure, not the (now-inert) addons-dir copy, so
6631
6453
  * the addons-dir `@camstack/server/system` must NOT be double-loaded here. */
6632
6454
  async loadFromDirectory(addonsDir, skipPackages = []) {
6633
- if (!fs$1.existsSync(addonsDir)) return;
6455
+ if (!fs.existsSync(addonsDir)) return;
6634
6456
  const skip = new Set(skipPackages);
6635
- const entries = fs$1.readdirSync(addonsDir, { withFileTypes: true });
6457
+ const entries = fs.readdirSync(addonsDir, { withFileTypes: true });
6636
6458
  for (const entry of entries) {
6637
6459
  if (!isDirectoryEntry(entry, addonsDir)) continue;
6638
6460
  if (entry.name.startsWith("@")) {
6639
6461
  const scopeDir = path$1.join(addonsDir, entry.name);
6640
- const scopeEntries = fs$1.readdirSync(scopeDir, { withFileTypes: true });
6462
+ const scopeEntries = fs.readdirSync(scopeDir, { withFileTypes: true });
6641
6463
  for (const scopeEntry of scopeEntries) {
6642
6464
  if (!isDirectoryEntry(scopeEntry, scopeDir)) continue;
6643
6465
  if (skip.has(`${entry.name}/${scopeEntry.name}`)) continue;
@@ -6651,7 +6473,7 @@ var AddonLoader = class {
6651
6473
  }
6652
6474
  async tryLoadAddon(addonDir) {
6653
6475
  const pkgJsonPath = path$1.join(addonDir, "package.json");
6654
- if (!fs$1.existsSync(pkgJsonPath)) return;
6476
+ if (!fs.existsSync(pkgJsonPath)) return;
6655
6477
  try {
6656
6478
  await this.loadFromAddonDir(addonDir);
6657
6479
  } catch (err) {
@@ -6669,7 +6491,7 @@ var AddonLoader = class {
6669
6491
  /** Load addon from a specific directory (package.json + dist/) */
6670
6492
  async loadFromAddonDir(addonDir) {
6671
6493
  const pkgJsonPath = path$1.join(addonDir, "package.json");
6672
- const pkgJson = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8"))) ?? {};
6494
+ const pkgJson = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8"))) ?? {};
6673
6495
  const packageNameRaw = pkgJson["name"];
6674
6496
  const packageName = typeof packageNameRaw === "string" ? packageNameRaw : "";
6675
6497
  const packageVersionRaw = pkgJson["version"];
@@ -6717,7 +6539,7 @@ var AddonLoader = class {
6717
6539
  }
6718
6540
  const entryFile = declaration.entry.replace(/^\.\//, "").replace(/^src\//, "dist/").replace(/\.ts$/, ".js");
6719
6541
  let entryPath = path$1.resolve(addonDir, entryFile);
6720
- if (!fs$1.existsSync(entryPath)) {
6542
+ if (!fs.existsSync(entryPath)) {
6721
6543
  const base = entryPath.replace(/\.(js|cjs|mjs)$/, "");
6722
6544
  entryPath = [
6723
6545
  `${base}.cjs`,
@@ -6726,9 +6548,9 @@ var AddonLoader = class {
6726
6548
  path$1.resolve(addonDir, "dist", "index.cjs"),
6727
6549
  path$1.resolve(addonDir, "dist", "index.mjs"),
6728
6550
  path$1.resolve(addonDir, declaration.entry)
6729
- ].find((p) => fs$1.existsSync(p)) ?? entryPath;
6551
+ ].find((p) => fs.existsSync(p)) ?? entryPath;
6730
6552
  }
6731
- if (!fs$1.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
6553
+ if (!fs.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
6732
6554
  const modUnknown = await importAddonModuleFresh(entryPath);
6733
6555
  const mod = isRecord$4(modUnknown) ? modUnknown : {};
6734
6556
  const AddonClass = resolveAddonClass(mod);
@@ -6840,7 +6662,7 @@ function isDirectoryEntry(entry, parentDir) {
6840
6662
  if (entry.name.startsWith(".")) return false;
6841
6663
  if (entry.isDirectory()) return true;
6842
6664
  if (entry.isSymbolicLink()) try {
6843
- return fs$1.statSync(path$1.join(parentDir, entry.name)).isDirectory();
6665
+ return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
6844
6666
  } catch {
6845
6667
  return false;
6846
6668
  }
@@ -6934,7 +6756,7 @@ var execFileAsync$4 = promisify(execFile);
6934
6756
  * Single source of truth — replaces scattered mkdirSync calls.
6935
6757
  */
6936
6758
  function ensureDir(dirPath) {
6937
- fs$1.mkdirSync(dirPath, { recursive: true });
6759
+ fs.mkdirSync(dirPath, { recursive: true });
6938
6760
  }
6939
6761
  /**
6940
6762
  * Copy a directory recursively — ASYNC so it never blocks the event loop.
@@ -6947,7 +6769,7 @@ function ensureDir(dirPath) {
6947
6769
  * `fs.promises.cp` keeps the I/O off the event loop. (Node ≥18 stable.)
6948
6770
  */
6949
6771
  async function copyDirRecursive(src, dest) {
6950
- await fs$1.promises.cp(src, dest, {
6772
+ await fs.promises.cp(src, dest, {
6951
6773
  recursive: true,
6952
6774
  force: true
6953
6775
  });
@@ -7052,13 +6874,13 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
7052
6874
  if (typeof fileEntry !== "string") continue;
7053
6875
  if (fileEntry === "dist" || fileEntry.includes("*")) continue;
7054
6876
  const srcPath = path$1.join(sourceDir, fileEntry);
7055
- if (!fs$1.existsSync(srcPath)) continue;
6877
+ if (!fs.existsSync(srcPath)) continue;
7056
6878
  const destPath = path$1.join(destDir, fileEntry);
7057
- const stat = await fs$1.promises.stat(srcPath);
6879
+ const stat = await fs.promises.stat(srcPath);
7058
6880
  if (stat.isDirectory()) await copyDirRecursive(srcPath, destPath);
7059
6881
  else if (stat.isFile()) {
7060
6882
  ensureDir(path$1.dirname(destPath));
7061
- await fs$1.promises.copyFile(srcPath, destPath);
6883
+ await fs.promises.copyFile(srcPath, destPath);
7062
6884
  }
7063
6885
  }
7064
6886
  }
@@ -7069,10 +6891,10 @@ async function copyExtraFileDirs(pkgJson, sourceDir, destDir) {
7069
6891
  function isSourceNewer(packageDir) {
7070
6892
  const srcDir = path$1.join(packageDir, "src");
7071
6893
  const distDir = path$1.join(packageDir, "dist");
7072
- if (!fs$1.existsSync(srcDir) || !fs$1.existsSync(distDir)) return true;
6894
+ if (!fs.existsSync(srcDir) || !fs.existsSync(distDir)) return true;
7073
6895
  try {
7074
- const distMtime = fs$1.statSync(distDir).mtimeMs;
7075
- const entries = fs$1.readdirSync(srcDir, {
6896
+ const distMtime = fs.statSync(distDir).mtimeMs;
6897
+ const entries = fs.readdirSync(srcDir, {
7076
6898
  withFileTypes: true,
7077
6899
  recursive: true
7078
6900
  });
@@ -7080,7 +6902,7 @@ function isSourceNewer(packageDir) {
7080
6902
  if (!entry.isFile()) continue;
7081
6903
  const parentDir = entry.parentPath ?? String(Reflect.get(entry, "path") ?? "");
7082
6904
  const filePath = path$1.join(parentDir, entry.name);
7083
- if (fs$1.statSync(filePath).mtimeMs > distMtime) return true;
6905
+ if (fs.statSync(filePath).mtimeMs > distMtime) return true;
7084
6906
  }
7085
6907
  return false;
7086
6908
  } catch {
@@ -7097,7 +6919,7 @@ function isSourceNewer(packageDir) {
7097
6919
  * `copyDirRecursive` for the wedge this prevents.
7098
6920
  */
7099
6921
  async function installPackageFromNpm(packageName, targetDir) {
7100
- const tmpDir = await fs$1.promises.mkdtemp(path$1.join(os$1.tmpdir(), "camstack-install-"));
6922
+ const tmpDir = await fs.promises.mkdtemp(path$1.join(os$1.tmpdir(), "camstack-install-"));
7101
6923
  try {
7102
6924
  const { stdout } = await execFileAsync$4("npm", [
7103
6925
  "pack",
@@ -7120,21 +6942,21 @@ async function installPackageFromNpm(packageName, targetDir) {
7120
6942
  extractDir
7121
6943
  ], { timeout: 3e4 });
7122
6944
  const packageSubDir = path$1.join(extractDir, "package");
7123
- const srcPkgJsonDir = fs$1.existsSync(path$1.join(packageSubDir, "package.json")) ? packageSubDir : extractDir;
7124
- await fs$1.promises.rm(targetDir, {
6945
+ const srcPkgJsonDir = fs.existsSync(path$1.join(packageSubDir, "package.json")) ? packageSubDir : extractDir;
6946
+ await fs.promises.rm(targetDir, {
7125
6947
  recursive: true,
7126
6948
  force: true
7127
6949
  });
7128
6950
  ensureDir(targetDir);
7129
- await fs$1.promises.copyFile(path$1.join(srcPkgJsonDir, "package.json"), path$1.join(targetDir, "package.json"));
6951
+ await fs.promises.copyFile(path$1.join(srcPkgJsonDir, "package.json"), path$1.join(targetDir, "package.json"));
7130
6952
  const distSrc = path$1.join(srcPkgJsonDir, "dist");
7131
- if (fs$1.existsSync(distSrc)) await copyDirRecursive(distSrc, path$1.join(targetDir, "dist"));
6953
+ if (fs.existsSync(distSrc)) await copyDirRecursive(distSrc, path$1.join(targetDir, "dist"));
7132
6954
  try {
7133
- const npmPkg = asJsonObject$1(parseJsonUnknown(await fs$1.promises.readFile(path$1.join(srcPkgJsonDir, "package.json"), "utf-8")));
6955
+ const npmPkg = asJsonObject$1(parseJsonUnknown(await fs.promises.readFile(path$1.join(srcPkgJsonDir, "package.json"), "utf-8")));
7134
6956
  if (npmPkg) await copyExtraFileDirs(npmPkg, srcPkgJsonDir, targetDir);
7135
6957
  } catch {}
7136
6958
  } finally {
7137
- await fs$1.promises.rm(tmpDir, {
6959
+ await fs.promises.rm(tmpDir, {
7138
6960
  recursive: true,
7139
6961
  force: true
7140
6962
  });
@@ -7159,7 +6981,7 @@ function packageDirName$1(declaredName) {
7159
6981
  }
7160
6982
  function isDirLike$1(p) {
7161
6983
  try {
7162
- return fs$1.statSync(p).isDirectory();
6984
+ return fs.statSync(p).isDirectory();
7163
6985
  } catch {
7164
6986
  return false;
7165
6987
  }
@@ -7177,12 +6999,12 @@ var AddonManifest = class {
7177
6999
  */
7178
7000
  read() {
7179
7001
  if (this.cache != null) return this.cache;
7180
- if (!fs$1.existsSync(this.manifestPath)) {
7002
+ if (!fs.existsSync(this.manifestPath)) {
7181
7003
  this.cache = this.empty();
7182
7004
  return this.cache;
7183
7005
  }
7184
7006
  try {
7185
- const raw = fs$1.readFileSync(this.manifestPath, "utf-8");
7007
+ const raw = fs.readFileSync(this.manifestPath, "utf-8");
7186
7008
  const parsed = JSON.parse(raw);
7187
7009
  if (parsed.version !== MANIFEST_VERSION) {
7188
7010
  process.stderr.write(`[AddonManifest] schema mismatch (file=${parsed.version} vs runtime=${MANIFEST_VERSION}); starting empty\n`);
@@ -7203,13 +7025,13 @@ var AddonManifest = class {
7203
7025
  * a half-written file.
7204
7026
  */
7205
7027
  write(manifest) {
7206
- fs$1.mkdirSync(path$1.dirname(this.manifestPath), { recursive: true });
7028
+ fs.mkdirSync(path$1.dirname(this.manifestPath), { recursive: true });
7207
7029
  const tmp = `${this.manifestPath}.tmp.${process.pid}.${Date.now()}`;
7208
- fs$1.writeFileSync(tmp, JSON.stringify(manifest, null, 2), {
7030
+ fs.writeFileSync(tmp, JSON.stringify(manifest, null, 2), {
7209
7031
  encoding: "utf-8",
7210
7032
  mode: 384
7211
7033
  });
7212
- fs$1.renameSync(tmp, this.manifestPath);
7034
+ fs.renameSync(tmp, this.manifestPath);
7213
7035
  this.cache = manifest;
7214
7036
  }
7215
7037
  /** Lookup a single addon's manifest entry, or `null` if not tracked. */
@@ -7284,22 +7106,22 @@ var AddonManifest = class {
7284
7106
  * exactly what moved. Returns the total number of changes.
7285
7107
  */
7286
7108
  reconcileFromDisk(addonsDir, onChange) {
7287
- if (!fs$1.existsSync(addonsDir)) return 0;
7109
+ if (!fs.existsSync(addonsDir)) return 0;
7288
7110
  const m = this.read();
7289
7111
  let changes = 0;
7290
7112
  const now = (/* @__PURE__ */ new Date()).toISOString();
7291
7113
  /** Package name → version, for every ADDON package actually installed. */
7292
7114
  const onDisk = /* @__PURE__ */ new Map();
7293
- for (const scope of fs$1.readdirSync(addonsDir, { withFileTypes: true })) {
7115
+ for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
7294
7116
  if (!scope.name.startsWith("@") || !isDirLike$1(path$1.join(addonsDir, scope.name))) continue;
7295
7117
  const scopeDir = path$1.join(addonsDir, scope.name);
7296
- for (const pkg of fs$1.readdirSync(scopeDir, { withFileTypes: true })) {
7118
+ for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
7297
7119
  if (!isDirLike$1(path$1.join(scopeDir, pkg.name))) continue;
7298
7120
  const pkgJsonPath = path$1.join(scopeDir, pkg.name, "package.json");
7299
- if (!fs$1.existsSync(pkgJsonPath)) continue;
7121
+ if (!fs.existsSync(pkgJsonPath)) continue;
7300
7122
  let pkgJson;
7301
7123
  try {
7302
- const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
7124
+ const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
7303
7125
  if (typeof parsed !== "object" || parsed == null) continue;
7304
7126
  pkgJson = parsed;
7305
7127
  } catch {
@@ -7370,28 +7192,28 @@ var AddonManifest = class {
7370
7192
  migrateFromInstallSourceMarkers(addonsDir) {
7371
7193
  const m = this.read();
7372
7194
  if (Object.keys(m.addons).length > 0) return 0;
7373
- if (!fs$1.existsSync(addonsDir)) return 0;
7195
+ if (!fs.existsSync(addonsDir)) return 0;
7374
7196
  let migrated = 0;
7375
7197
  const now = (/* @__PURE__ */ new Date()).toISOString();
7376
- for (const scope of fs$1.readdirSync(addonsDir, { withFileTypes: true })) {
7198
+ for (const scope of fs.readdirSync(addonsDir, { withFileTypes: true })) {
7377
7199
  if (!scope.isDirectory() || !scope.name.startsWith("@")) continue;
7378
7200
  const scopeDir = path$1.join(addonsDir, scope.name);
7379
- for (const pkg of fs$1.readdirSync(scopeDir, { withFileTypes: true })) {
7201
+ for (const pkg of fs.readdirSync(scopeDir, { withFileTypes: true })) {
7380
7202
  if (!pkg.isDirectory()) continue;
7381
7203
  const pkgDir = path$1.join(scopeDir, pkg.name);
7382
7204
  const markerPath = path$1.join(pkgDir, ".install-source");
7383
7205
  const pkgJsonPath = path$1.join(pkgDir, "package.json");
7384
- if (!fs$1.existsSync(pkgJsonPath)) continue;
7206
+ if (!fs.existsSync(pkgJsonPath)) continue;
7385
7207
  let pkgJson;
7386
7208
  try {
7387
- const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
7209
+ const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
7388
7210
  if (typeof parsed !== "object" || parsed == null) continue;
7389
7211
  pkgJson = parsed;
7390
7212
  } catch {
7391
7213
  continue;
7392
7214
  }
7393
7215
  if (!pkgJson.name || !pkgJson.version) continue;
7394
- const source = fs$1.existsSync(markerPath) ? fs$1.readFileSync(markerPath, "utf-8").trim() : "bundled";
7216
+ const source = fs.existsSync(markerPath) ? fs.readFileSync(markerPath, "utf-8").trim() : "bundled";
7395
7217
  m.addons[pkgJson.name] = {
7396
7218
  name: pkgJson.name,
7397
7219
  version: pkgJson.version,
@@ -7595,7 +7417,7 @@ function planClosureDedupe(input) {
7595
7417
  function readTreeManifest(pkgJsonPath) {
7596
7418
  let raw;
7597
7419
  try {
7598
- raw = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8")));
7420
+ raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
7599
7421
  } catch {
7600
7422
  return null;
7601
7423
  }
@@ -7620,7 +7442,7 @@ function readTreeManifest(pkgJsonPath) {
7620
7442
  function listTopLevelEntries(nodeModulesDir) {
7621
7443
  let entries;
7622
7444
  try {
7623
- entries = fs$1.readdirSync(nodeModulesDir, { withFileTypes: true });
7445
+ entries = fs.readdirSync(nodeModulesDir, { withFileTypes: true });
7624
7446
  } catch {
7625
7447
  return [];
7626
7448
  }
@@ -7630,7 +7452,7 @@ function listTopLevelEntries(nodeModulesDir) {
7630
7452
  if (entry.name.startsWith("@")) {
7631
7453
  let inner;
7632
7454
  try {
7633
- inner = fs$1.readdirSync(path$1.join(nodeModulesDir, entry.name), { withFileTypes: true });
7455
+ inner = fs.readdirSync(path$1.join(nodeModulesDir, entry.name), { withFileTypes: true });
7634
7456
  } catch {
7635
7457
  continue;
7636
7458
  }
@@ -7663,14 +7485,14 @@ function collectAddonTreeState(addonDir) {
7663
7485
  const entryDir = path$1.join(nodeModulesDir, name);
7664
7486
  let isLink = false;
7665
7487
  try {
7666
- isLink = fs$1.lstatSync(entryDir).isSymbolicLink();
7488
+ isLink = fs.lstatSync(entryDir).isSymbolicLink();
7667
7489
  } catch {
7668
7490
  continue;
7669
7491
  }
7670
7492
  if (isLink) {
7671
7493
  let target = "";
7672
7494
  try {
7673
- target = fs$1.readlinkSync(entryDir);
7495
+ target = fs.readlinkSync(entryDir);
7674
7496
  } catch {}
7675
7497
  existingLinks.push({
7676
7498
  name,
@@ -7684,7 +7506,7 @@ function collectAddonTreeState(addonDir) {
7684
7506
  version: manifest.version
7685
7507
  });
7686
7508
  for (const [depName, range] of manifest.ranges) {
7687
- if (fs$1.existsSync(path$1.join(entryDir, "node_modules", depName))) continue;
7509
+ if (fs.existsSync(path$1.join(entryDir, "node_modules", depName))) continue;
7688
7510
  addRange(depName, range);
7689
7511
  }
7690
7512
  }
@@ -7714,7 +7536,7 @@ function resolveClosureNodeModulesDir(explicitDir) {
7714
7536
  const frameworkDir = explicitDir ?? process.env["CAMSTACK_FRAMEWORK_DIR"];
7715
7537
  if (frameworkDir === void 0 || frameworkDir.length === 0) return null;
7716
7538
  const nodeModulesDir = explicitDir ?? path$1.join(frameworkDir, "node_modules");
7717
- return fs$1.existsSync(nodeModulesDir) ? nodeModulesDir : null;
7539
+ return fs.existsSync(nodeModulesDir) ? nodeModulesDir : null;
7718
7540
  }
7719
7541
  function symlinkType() {
7720
7542
  return process.platform === "win32" ? "junction" : "dir";
@@ -7733,10 +7555,10 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
7733
7555
  const nodeModulesDir = path$1.join(addonDir, "node_modules");
7734
7556
  const probePath = path$1.join(nodeModulesDir, ".closure-link-probe");
7735
7557
  try {
7736
- fs$1.mkdirSync(nodeModulesDir, { recursive: true });
7737
- fs$1.rmSync(probePath, { force: true });
7738
- fs$1.symlinkSync(closureNodeModulesDir, probePath, symlinkType());
7739
- fs$1.rmSync(probePath, { force: true });
7558
+ fs.mkdirSync(nodeModulesDir, { recursive: true });
7559
+ fs.rmSync(probePath, { force: true });
7560
+ fs.symlinkSync(closureNodeModulesDir, probePath, symlinkType());
7561
+ fs.rmSync(probePath, { force: true });
7740
7562
  } catch (err) {
7741
7563
  logger.warn("closure dedupe skipped — symlinks unavailable on this volume", { meta: {
7742
7564
  addonDir,
@@ -7758,12 +7580,12 @@ function executeClosureDedupe(addonDir, closureNodeModulesDir, plan, logger) {
7758
7580
  }
7759
7581
  const entryDir = path$1.join(nodeModulesDir, link.name);
7760
7582
  try {
7761
- fs$1.rmSync(entryDir, {
7583
+ fs.rmSync(entryDir, {
7762
7584
  recursive: true,
7763
7585
  force: true
7764
7586
  });
7765
- fs$1.mkdirSync(path$1.dirname(entryDir), { recursive: true });
7766
- fs$1.symlinkSync(target, entryDir, symlinkType());
7587
+ fs.mkdirSync(path$1.dirname(entryDir), { recursive: true });
7588
+ fs.symlinkSync(target, entryDir, symlinkType());
7767
7589
  linked.push(link.name);
7768
7590
  } catch (err) {
7769
7591
  logger.warn("closure dedupe — link failed; entry removed copy may need reinstall", { meta: {
@@ -7839,7 +7661,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
7839
7661
  count: Object.keys(native).length
7840
7662
  } });
7841
7663
  try {
7842
- fs$1.writeFileSync(markerFile, markerHash);
7664
+ fs.writeFileSync(markerFile, markerHash);
7843
7665
  } catch (err) {
7844
7666
  logger.warn("Failed to write native deps marker", { meta: {
7845
7667
  markerFile,
@@ -7877,7 +7699,7 @@ async function installManifestNativeDeps(addonDir, pkgRaw, logger, registry, npm
7877
7699
  }
7878
7700
  await rebuildNativeDeps(addonDir, pending.map(([name]) => name), logger, npmCacheDir ?? defaultNpmCacheDir(), registry);
7879
7701
  try {
7880
- fs$1.writeFileSync(markerFile, markerHash);
7702
+ fs.writeFileSync(markerFile, markerHash);
7881
7703
  } catch (err) {
7882
7704
  logger.warn("Failed to write native deps marker", { meta: {
7883
7705
  markerFile,
@@ -7899,12 +7721,12 @@ function copyPrebuiltNativeDep(name, addonDir, logger) {
7899
7721
  if (source === target) continue;
7900
7722
  if (!hasBuiltBinary(source)) continue;
7901
7723
  try {
7902
- fs$1.rmSync(target, {
7724
+ fs.rmSync(target, {
7903
7725
  recursive: true,
7904
7726
  force: true
7905
7727
  });
7906
- fs$1.mkdirSync(path$1.dirname(target), { recursive: true });
7907
- fs$1.cpSync(source, target, {
7728
+ fs.mkdirSync(path$1.dirname(target), { recursive: true });
7729
+ fs.cpSync(source, target, {
7908
7730
  recursive: true,
7909
7731
  dereference: true
7910
7732
  });
@@ -7940,7 +7762,7 @@ var BUNDLED_NATIVE_SIBLING_SCOPES = {
7940
7762
  function hasAnyDotNode(dir, maxDepth) {
7941
7763
  let entries;
7942
7764
  try {
7943
- entries = fs$1.readdirSync(dir, { withFileTypes: true });
7765
+ entries = fs.readdirSync(dir, { withFileTypes: true });
7944
7766
  } catch {
7945
7767
  return false;
7946
7768
  }
@@ -7954,12 +7776,12 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
7954
7776
  if (!hasAnyDotNode(src, 5)) return;
7955
7777
  if (hasAnyDotNode(dst, 5)) return;
7956
7778
  try {
7957
- fs$1.rmSync(dst, {
7779
+ fs.rmSync(dst, {
7958
7780
  recursive: true,
7959
7781
  force: true
7960
7782
  });
7961
- fs$1.mkdirSync(path$1.dirname(dst), { recursive: true });
7962
- fs$1.cpSync(src, dst, {
7783
+ fs.mkdirSync(path$1.dirname(dst), { recursive: true });
7784
+ fs.cpSync(src, dst, {
7963
7785
  recursive: true,
7964
7786
  dereference: true
7965
7787
  });
@@ -7994,7 +7816,7 @@ function copyPrebuiltModuleDir(src, dst, label, logger) {
7994
7816
  */
7995
7817
  function copyBundledNativeModules(sourceDir, targetDir, logger) {
7996
7818
  const srcNm = path$1.join(sourceDir, "node_modules");
7997
- if (!fs$1.existsSync(srcNm)) return;
7819
+ if (!fs.existsSync(srcNm)) return;
7998
7820
  const dstNm = path$1.join(targetDir, "node_modules");
7999
7821
  for (const [name, scopes] of Object.entries(BUNDLED_NATIVE_SIBLING_SCOPES)) {
8000
7822
  copyPrebuiltModuleDir(path$1.join(srcNm, name), path$1.join(dstNm, name), name, logger);
@@ -8002,7 +7824,7 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
8002
7824
  const scopeSrc = path$1.join(srcNm, scope);
8003
7825
  let siblings;
8004
7826
  try {
8005
- siblings = fs$1.readdirSync(scopeSrc);
7827
+ siblings = fs.readdirSync(scopeSrc);
8006
7828
  } catch {
8007
7829
  continue;
8008
7830
  }
@@ -8012,12 +7834,12 @@ function copyBundledNativeModules(sourceDir, targetDir, logger) {
8012
7834
  }
8013
7835
  /** A package dir is "built" when it carries a compiled `.node` or a prebuilds tree. */
8014
7836
  function hasBuiltBinary(pkgDir) {
8015
- if (!fs$1.existsSync(path$1.join(pkgDir, "package.json"))) return false;
7837
+ if (!fs.existsSync(path$1.join(pkgDir, "package.json"))) return false;
8016
7838
  const releaseDir = path$1.join(pkgDir, "build", "Release");
8017
7839
  try {
8018
- if (fs$1.existsSync(releaseDir) && fs$1.readdirSync(releaseDir).some((f) => f.endsWith(".node"))) return true;
7840
+ if (fs.existsSync(releaseDir) && fs.readdirSync(releaseDir).some((f) => f.endsWith(".node"))) return true;
8019
7841
  } catch {}
8020
- return fs$1.existsSync(path$1.join(pkgDir, "prebuilds"));
7842
+ return fs.existsSync(path$1.join(pkgDir, "prebuilds"));
8021
7843
  }
8022
7844
  /** Candidate hoisted locations for `<name>`: NODE_PATH entries + ancestors of `addonDir`. */
8023
7845
  function candidateHoistedDirs(name, addonDir) {
@@ -8055,7 +7877,7 @@ function hashDeclaration(deps) {
8055
7877
  }
8056
7878
  function markerMatches(markerFile, expected) {
8057
7879
  try {
8058
- return fs$1.readFileSync(markerFile, "utf-8").trim() === expected;
7880
+ return fs.readFileSync(markerFile, "utf-8").trim() === expected;
8059
7881
  } catch {
8060
7882
  return false;
8061
7883
  }
@@ -8266,7 +8088,7 @@ function parseInstallSource(value) {
8266
8088
  function readPackageJson(pkgJsonPath) {
8267
8089
  let raw;
8268
8090
  try {
8269
- raw = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(pkgJsonPath, "utf-8")));
8091
+ raw = asJsonObject$1(parseJsonUnknown(fs.readFileSync(pkgJsonPath, "utf-8")));
8270
8092
  } catch {
8271
8093
  return null;
8272
8094
  }
@@ -8310,7 +8132,7 @@ var REGISTRY_LATEST_TIMEOUT_MS = 15e3;
8310
8132
  var FALLBACK_VERSION_PROBES = 25;
8311
8133
  function readInstalledPackageVersion(addonDir) {
8312
8134
  try {
8313
- const raw = JSON.parse(fs$1.readFileSync(path$1.join(addonDir, "package.json"), "utf-8"));
8135
+ const raw = JSON.parse(fs.readFileSync(path$1.join(addonDir, "package.json"), "utf-8"));
8314
8136
  if (raw === null || typeof raw !== "object") return null;
8315
8137
  const version = Reflect.get(raw, "version");
8316
8138
  return typeof version === "string" && version.length > 0 ? version : null;
@@ -8458,7 +8280,7 @@ var AddonInstaller = class AddonInstaller {
8458
8280
  } catch {
8459
8281
  return Object.freeze([]);
8460
8282
  }
8461
- const raw = fs$1.readFileSync(pkgPath, "utf-8");
8283
+ const raw = fs.readFileSync(pkgPath, "utf-8");
8462
8284
  const parsed = JSON.parse(raw);
8463
8285
  const deps = Object.keys(parsed.dependencies ?? {});
8464
8286
  const agentOnly = new Set(parsed.camstack?.agentOnlyBootstrapAddons ?? []);
@@ -8503,7 +8325,7 @@ var AddonInstaller = class AddonInstaller {
8503
8325
  } catch {
8504
8326
  return Object.freeze([]);
8505
8327
  }
8506
- const raw = fs$1.readFileSync(pkgPath, "utf-8");
8328
+ const raw = fs.readFileSync(pkgPath, "utf-8");
8507
8329
  const addons = JSON.parse(raw).camstack?.agentBootstrapAddons ?? [];
8508
8330
  return Object.freeze(["@camstack/server", ...addons]);
8509
8331
  }
@@ -8533,7 +8355,7 @@ var AddonInstaller = class AddonInstaller {
8533
8355
  this.logger.info(`Install source: ${isLocal ? `bundle (${this.bundledAddonsDir})` : "npm"}, ${pkgList.length} package(s)`);
8534
8356
  for (const packageName of pkgList) {
8535
8357
  const addonDir = path$1.join(this.addonsDir, packageName);
8536
- if (fs$1.existsSync(path$1.join(addonDir, "package.json"))) {
8358
+ if (fs.existsSync(path$1.join(addonDir, "package.json"))) {
8537
8359
  if (isLocal || shouldSkipClosureProvidedSeed(packageName, this.isResolvableFromClosure(packageName))) {
8538
8360
  this.logger.debug(`${packageName} — already installed, skipping`);
8539
8361
  continue;
@@ -8784,7 +8606,7 @@ var AddonInstaller = class AddonInstaller {
8784
8606
  const installedPackages = this.listInstalled();
8785
8607
  for (const pkg of installedPackages) {
8786
8608
  try {
8787
- if (fs$1.lstatSync(pkg.dir).isSymbolicLink()) continue;
8609
+ if (fs.lstatSync(pkg.dir).isSymbolicLink()) continue;
8788
8610
  } catch {
8789
8611
  continue;
8790
8612
  }
@@ -8824,7 +8646,7 @@ var AddonInstaller = class AddonInstaller {
8824
8646
  if (closureNodeModules !== null) for (const link of state.existingLinks) {
8825
8647
  if (!isClosureLinkTarget(link.target, closureNodeModules)) continue;
8826
8648
  const linkDir = path$1.join(nodeModulesDir, link.name);
8827
- const targetManifest = fs$1.existsSync(path$1.join(linkDir, "package.json"));
8649
+ const targetManifest = fs.existsSync(path$1.join(linkDir, "package.json"));
8828
8650
  const ranges = state.requirements.get(link.name) ?? [];
8829
8651
  let holds = targetManifest;
8830
8652
  if (holds && ranges.length > 0) {
@@ -8833,14 +8655,14 @@ var AddonInstaller = class AddonInstaller {
8833
8655
  }
8834
8656
  if (!holds) {
8835
8657
  this.logger.warn(`${packageName} — closure link for ${link.name} no longer holds; reinstalling this addon's deps`, { meta: { target: link.target } });
8836
- fs$1.rmSync(linkDir, { force: true });
8658
+ fs.rmSync(linkDir, { force: true });
8837
8659
  needsInstall = true;
8838
8660
  }
8839
8661
  }
8840
8662
  const linked = [];
8841
8663
  for (const [depName, range] of declaredEntries) {
8842
8664
  if (typeof range !== "string") continue;
8843
- if (fs$1.existsSync(path$1.join(nodeModulesDir, depName, "package.json"))) continue;
8665
+ if (fs.existsSync(path$1.join(nodeModulesDir, depName, "package.json"))) continue;
8844
8666
  const closureVersion = closureNodeModules === null ? void 0 : readClosureVersions(closureNodeModules, [depName]).get(depName);
8845
8667
  if (closureNodeModules !== null && closureVersion !== void 0 && closureSatisfiesRange(range, closureVersion)) {
8846
8668
  if (executeClosureDedupe(addonDir, closureNodeModules, {
@@ -8873,7 +8695,7 @@ var AddonInstaller = class AddonInstaller {
8873
8695
  const closureNodeModules = resolveClosureNodeModulesDir(this.closureNodeModulesDir);
8874
8696
  if (closureNodeModules !== null) {
8875
8697
  const state = collectAddonTreeState(addonDir);
8876
- for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs$1.rmSync(path$1.join(addonDir, "node_modules", link.name), { force: true });
8698
+ for (const link of state.existingLinks) if (isClosureLinkTarget(link.target, closureNodeModules)) fs.rmSync(path$1.join(addonDir, "node_modules", link.name), { force: true });
8877
8699
  }
8878
8700
  this.logger.info(`${packageName} — reinstalling runtime dependencies`, { meta: { addonDir } });
8879
8701
  await runNpm([
@@ -8918,7 +8740,7 @@ var AddonInstaller = class AddonInstaller {
8918
8740
  async realignFromClosure(packageName, closureDir) {
8919
8741
  const targetDir = path$1.join(this.addonsDir, packageName);
8920
8742
  const result = await this.installLocal(packageName, closureDir);
8921
- await fs$1.promises.writeFile(path$1.join(targetDir, ".install-source"), "closure");
8743
+ await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "closure");
8922
8744
  this.manifest.upsert(result.name, {
8923
8745
  version: result.version,
8924
8746
  source: "closure"
@@ -8934,17 +8756,17 @@ var AddonInstaller = class AddonInstaller {
8934
8756
  async installCopy(packageName, sourceDir, pkgData, targetDir) {
8935
8757
  await this.ensureBuilt(packageName, sourceDir, pkgData);
8936
8758
  const distDir = path$1.join(sourceDir, "dist");
8937
- if (!fs$1.existsSync(distDir)) throw new Error(`${packageName} has no dist/ after build`);
8938
- await fs$1.promises.rm(targetDir, {
8759
+ if (!fs.existsSync(distDir)) throw new Error(`${packageName} has no dist/ after build`);
8760
+ await fs.promises.rm(targetDir, {
8939
8761
  recursive: true,
8940
8762
  force: true
8941
8763
  });
8942
8764
  ensureDir(targetDir);
8943
- await fs$1.promises.writeFile(path$1.join(targetDir, "package.json"), JSON.stringify(stripBundledDeps(pkgData), null, 2));
8765
+ await fs.promises.writeFile(path$1.join(targetDir, "package.json"), JSON.stringify(stripBundledDeps(pkgData), null, 2));
8944
8766
  await copyDirRecursive(distDir, path$1.join(targetDir, "dist"));
8945
8767
  await copyExtraFileDirs(pkgData, sourceDir, targetDir);
8946
8768
  copyBundledNativeModules(sourceDir, targetDir, this.logger);
8947
- await fs$1.promises.writeFile(path$1.join(targetDir, ".install-source"), "local");
8769
+ await fs.promises.writeFile(path$1.join(targetDir, ".install-source"), "local");
8948
8770
  const localPkgVersion = asString$1(pkgData.version, "0.0.0");
8949
8771
  this.manifest.upsert(packageName, {
8950
8772
  version: localPkgVersion,
@@ -8985,7 +8807,7 @@ var AddonInstaller = class AddonInstaller {
8985
8807
  * unusual auth, offline mode, etc).
8986
8808
  */
8987
8809
  async installFromNpm(packageName, version) {
8988
- const tmpDir = fs$1.mkdtempSync(path$1.join(os$1.tmpdir(), "camstack-addon-npm-"));
8810
+ const tmpDir = fs.mkdtempSync(path$1.join(os$1.tmpdir(), "camstack-addon-npm-"));
8989
8811
  const packageSpec = version ? `${packageName}@${version}` : packageName;
8990
8812
  this.logger.info(`${packageName} — installing from npm`);
8991
8813
  try {
@@ -8999,19 +8821,19 @@ var AddonInstaller = class AddonInstaller {
8999
8821
  ];
9000
8822
  if (this.registry) args.push("--registry", this.registry);
9001
8823
  const { stdout } = await runNpm(args, this.npmRunOptions(tmpDir, 12e4));
9002
- const tgzFiles = fs$1.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
8824
+ const tgzFiles = fs.readdirSync(tmpDir).filter((f) => f.endsWith(".tgz"));
9003
8825
  if (tgzFiles.length === 0) throw new Error(`npm pack produced no tgz. stdout: ${stdout.trim()}`);
9004
8826
  return path$1.join(tmpDir, tgzFiles[0]);
9005
8827
  });
9006
8828
  const result = await this.installFromTgz(tgzPath);
9007
- fs$1.writeFileSync(path$1.join(this.addonsDir, result.name, ".install-source"), "npm");
8829
+ fs.writeFileSync(path$1.join(this.addonsDir, result.name, ".install-source"), "npm");
9008
8830
  this.manifest.upsert(result.name, {
9009
8831
  version: result.version,
9010
8832
  source: "npm"
9011
8833
  });
9012
8834
  return result;
9013
8835
  } finally {
9014
- fs$1.rmSync(tmpDir, {
8836
+ fs.rmSync(tmpDir, {
9015
8837
  recursive: true,
9016
8838
  force: true
9017
8839
  });
@@ -9049,7 +8871,7 @@ var AddonInstaller = class AddonInstaller {
9049
8871
  if (!tarRes.ok) throw new Error(`tarball GET ${tarballUrl} → ${tarRes.status}`);
9050
8872
  const tgzPath = path$1.join(tmpDir, `${packageName.replace(/[/@]/g, "-").replace(/^-+/, "")}-${resolvedVersion}.tgz`);
9051
8873
  const buf = Buffer.from(await tarRes.arrayBuffer());
9052
- fs$1.writeFileSync(tgzPath, buf);
8874
+ fs.writeFileSync(tgzPath, buf);
9053
8875
  return tgzPath;
9054
8876
  }
9055
8877
  /**
@@ -9070,7 +8892,7 @@ var AddonInstaller = class AddonInstaller {
9070
8892
  * on the next deploy.
9071
8893
  */
9072
8894
  async evictInstallDir(targetDir) {
9073
- if (!fs$1.existsSync(targetDir)) return;
8895
+ if (!fs.existsSync(targetDir)) return;
9074
8896
  const graveyard = path$1.join(this.addonsDir, ".evicting");
9075
8897
  ensureDir(graveyard);
9076
8898
  await this.sweepGraveyard(graveyard);
@@ -9078,10 +8900,10 @@ var AddonInstaller = class AddonInstaller {
9078
8900
  const flatName = path$1.relative(this.addonsDir, targetDir).replace(/[/\\]/g, "-");
9079
8901
  const asideDir = path$1.join(graveyard, `${flatName}-${ts}`);
9080
8902
  try {
9081
- fs$1.renameSync(targetDir, asideDir);
8903
+ fs.renameSync(targetDir, asideDir);
9082
8904
  } catch (renameErr) {
9083
8905
  if (renameErr.code === "EXDEV") {
9084
- await fs$1.promises.rm(targetDir, {
8906
+ await fs.promises.rm(targetDir, {
9085
8907
  recursive: true,
9086
8908
  force: true
9087
8909
  });
@@ -9089,7 +8911,7 @@ var AddonInstaller = class AddonInstaller {
9089
8911
  }
9090
8912
  throw renameErr;
9091
8913
  }
9092
- await fs$1.promises.rm(asideDir, {
8914
+ await fs.promises.rm(asideDir, {
9093
8915
  recursive: true,
9094
8916
  force: true
9095
8917
  }).catch((cleanupErr) => {
@@ -9110,14 +8932,14 @@ var AddonInstaller = class AddonInstaller {
9110
8932
  async sweepStagingResidue(stagingRoot) {
9111
8933
  let names;
9112
8934
  try {
9113
- names = fs$1.readdirSync(stagingRoot);
8935
+ names = fs.readdirSync(stagingRoot);
9114
8936
  } catch {
9115
8937
  return;
9116
8938
  }
9117
8939
  const now = Date.now();
9118
8940
  const ages = [];
9119
8941
  for (const name of names) try {
9120
- const stat = fs$1.statSync(path$1.join(stagingRoot, name));
8942
+ const stat = fs.statSync(path$1.join(stagingRoot, name));
9121
8943
  ages.push({
9122
8944
  name,
9123
8945
  ageMs: now - stat.mtimeMs
@@ -9128,7 +8950,7 @@ var AddonInstaller = class AddonInstaller {
9128
8950
  stagingRoot,
9129
8951
  entries: sweepable
9130
8952
  } });
9131
- await Promise.all(sweepable.map((name) => fs$1.promises.rm(path$1.join(stagingRoot, name), {
8953
+ await Promise.all(sweepable.map((name) => fs.promises.rm(path$1.join(stagingRoot, name), {
9132
8954
  recursive: true,
9133
8955
  force: true
9134
8956
  }).catch(() => void 0)));
@@ -9137,11 +8959,11 @@ var AddonInstaller = class AddonInstaller {
9137
8959
  async sweepGraveyard(graveyard) {
9138
8960
  let entries;
9139
8961
  try {
9140
- entries = fs$1.readdirSync(graveyard);
8962
+ entries = fs.readdirSync(graveyard);
9141
8963
  } catch {
9142
8964
  return;
9143
8965
  }
9144
- await Promise.all(entries.map((name) => fs$1.promises.rm(path$1.join(graveyard, name), {
8966
+ await Promise.all(entries.map((name) => fs.promises.rm(path$1.join(graveyard, name), {
9145
8967
  recursive: true,
9146
8968
  force: true
9147
8969
  }).catch(() => void 0)));
@@ -9192,7 +9014,7 @@ var AddonInstaller = class AddonInstaller {
9192
9014
  return;
9193
9015
  }
9194
9016
  const strippedManifest = stripBundledDeps(pkgView.raw);
9195
- await fs$1.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
9017
+ await fs.promises.writeFile(pkgJsonPath, JSON.stringify(strippedManifest, null, 2));
9196
9018
  const deps = asJsonObject$1(strippedManifest["dependencies"]);
9197
9019
  const depNames = deps ? Object.keys(deps) : [];
9198
9020
  if (depNames.length === 0) return;
@@ -9324,9 +9146,9 @@ var AddonInstaller = class AddonInstaller {
9324
9146
  "-C",
9325
9147
  stagingDir
9326
9148
  ], { timeout: 12e4 });
9327
- const pkgDir = fs$1.existsSync(path$1.join(stagingDir, "package", "package.json")) ? path$1.join(stagingDir, "package") : stagingDir;
9149
+ const pkgDir = fs.existsSync(path$1.join(stagingDir, "package", "package.json")) ? path$1.join(stagingDir, "package") : stagingDir;
9328
9150
  const pkgJsonPath = path$1.join(pkgDir, "package.json");
9329
- if (!fs$1.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
9151
+ if (!fs.existsSync(pkgJsonPath)) throw new Error("No package.json found in tgz archive");
9330
9152
  const pkgView = readPackageJson(pkgJsonPath);
9331
9153
  if (!pkgView) throw new Error(`Invalid package.json at ${pkgJsonPath}`);
9332
9154
  if (!pkgView.camstackAddons) throw new Error(`Package ${pkgView.name} has no camstack.addons manifest`);
@@ -9336,7 +9158,7 @@ var AddonInstaller = class AddonInstaller {
9336
9158
  this.dedupeTreeAgainstClosure(pkgDir, pkgView.name);
9337
9159
  await this.evictInstallDir(targetDir);
9338
9160
  ensureDir(path$1.dirname(targetDir));
9339
- await fs$1.promises.rename(pkgDir, targetDir);
9161
+ await fs.promises.rename(pkgDir, targetDir);
9340
9162
  this.manifest.upsert(pkgView.name, {
9341
9163
  version: pkgView.version,
9342
9164
  source: "bundled"
@@ -9347,7 +9169,7 @@ var AddonInstaller = class AddonInstaller {
9347
9169
  };
9348
9170
  } finally {
9349
9171
  this.inFlightStaging.delete(stagingName);
9350
- await fs$1.promises.rm(stagingDir, {
9172
+ await fs.promises.rm(stagingDir, {
9351
9173
  recursive: true,
9352
9174
  force: true
9353
9175
  }).catch(() => void 0);
@@ -9377,24 +9199,24 @@ var AddonInstaller = class AddonInstaller {
9377
9199
  const current = this.manifest.get(packageName);
9378
9200
  if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
9379
9201
  const addonDir = path$1.join(this.addonsDir, packageName);
9380
- if (!fs$1.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
9202
+ if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
9381
9203
  const ts = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
9382
9204
  const backupRoot = path$1.join(this.addonsDir, ".backups", packageName);
9383
9205
  ensureDir(backupRoot);
9384
9206
  const backupDir = path$1.join(backupRoot, ts);
9385
9207
  this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
9386
- fs$1.renameSync(addonDir, backupDir);
9208
+ fs.renameSync(addonDir, backupDir);
9387
9209
  let result;
9388
9210
  try {
9389
9211
  result = await this.installFromNpm(packageName, version);
9390
9212
  } catch (installErr) {
9391
9213
  this.logger.error(`${packageName} — install failed, restoring backup`, { meta: { error: errMsg$1(installErr) } });
9392
9214
  try {
9393
- if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
9215
+ if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
9394
9216
  recursive: true,
9395
9217
  force: true
9396
9218
  });
9397
- fs$1.renameSync(backupDir, addonDir);
9219
+ fs.renameSync(backupDir, addonDir);
9398
9220
  this.manifest.upsert(packageName, {
9399
9221
  version: current.version,
9400
9222
  source: current.source,
@@ -9455,7 +9277,7 @@ var AddonInstaller = class AddonInstaller {
9455
9277
  const current = this.manifest.get(packageName);
9456
9278
  if (current == null) throw new Error(`Cannot update ${packageName}: not currently tracked in manifest`);
9457
9279
  const addonDir = path$1.join(this.addonsDir, packageName);
9458
- if (!fs$1.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
9280
+ if (!fs.existsSync(addonDir)) throw new Error(`Cannot update ${packageName}: install dir ${addonDir} missing`);
9459
9281
  await this.installRuntimeDependencies(stagedPath, packageName);
9460
9282
  await this.installNativeDependencies(stagedPath, packageName);
9461
9283
  this.dedupeTreeAgainstClosure(stagedPath, packageName);
@@ -9464,14 +9286,14 @@ var AddonInstaller = class AddonInstaller {
9464
9286
  ensureDir(backupRoot);
9465
9287
  const backupDir = path$1.join(backupRoot, ts);
9466
9288
  this.logger.info(`${packageName} — backing up v${current.version} → ${backupDir}`);
9467
- fs$1.renameSync(addonDir, backupDir);
9289
+ fs.renameSync(addonDir, backupDir);
9468
9290
  try {
9469
9291
  try {
9470
- fs$1.renameSync(stagedPath, addonDir);
9292
+ fs.renameSync(stagedPath, addonDir);
9471
9293
  } catch (renameErr) {
9472
9294
  if (renameErr.code === "EXDEV") {
9473
- fs$1.cpSync(stagedPath, addonDir, { recursive: true });
9474
- fs$1.rmSync(stagedPath, {
9295
+ fs.cpSync(stagedPath, addonDir, { recursive: true });
9296
+ fs.rmSync(stagedPath, {
9475
9297
  recursive: true,
9476
9298
  force: true
9477
9299
  });
@@ -9480,11 +9302,11 @@ var AddonInstaller = class AddonInstaller {
9480
9302
  } catch (swapErr) {
9481
9303
  this.logger.error(`${packageName} — staged swap failed, restoring backup`, { meta: { error: errMsg$1(swapErr) } });
9482
9304
  try {
9483
- if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
9305
+ if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
9484
9306
  recursive: true,
9485
9307
  force: true
9486
9308
  });
9487
- fs$1.renameSync(backupDir, addonDir);
9309
+ fs.renameSync(backupDir, addonDir);
9488
9310
  this.manifest.upsert(packageName, {
9489
9311
  version: current.version,
9490
9312
  source: current.source,
@@ -9523,20 +9345,20 @@ var AddonInstaller = class AddonInstaller {
9523
9345
  this.logger.warn(`${packageName} — no backup to rollback to`);
9524
9346
  return null;
9525
9347
  }
9526
- if (!fs$1.existsSync(entry.lastBackupDir)) {
9348
+ if (!fs.existsSync(entry.lastBackupDir)) {
9527
9349
  this.logger.warn(`${packageName} — backup dir vanished: ${entry.lastBackupDir}`);
9528
9350
  return null;
9529
9351
  }
9530
9352
  const addonDir = path$1.join(this.addonsDir, packageName);
9531
- if (fs$1.existsSync(addonDir)) fs$1.rmSync(addonDir, {
9353
+ if (fs.existsSync(addonDir)) fs.rmSync(addonDir, {
9532
9354
  recursive: true,
9533
9355
  force: true
9534
9356
  });
9535
- fs$1.renameSync(entry.lastBackupDir, addonDir);
9357
+ fs.renameSync(entry.lastBackupDir, addonDir);
9536
9358
  const pkgJsonPath = path$1.join(addonDir, "package.json");
9537
9359
  let restoredVersion = entry.version;
9538
- if (fs$1.existsSync(pkgJsonPath)) try {
9539
- const parsed = JSON.parse(fs$1.readFileSync(pkgJsonPath, "utf-8"));
9360
+ if (fs.existsSync(pkgJsonPath)) try {
9361
+ const parsed = JSON.parse(fs.readFileSync(pkgJsonPath, "utf-8"));
9540
9362
  if (typeof parsed === "object" && parsed != null) {
9541
9363
  const v = parsed.version;
9542
9364
  if (typeof v === "string" && v.length > 0) restoredVersion = v;
@@ -9584,7 +9406,7 @@ var AddonInstaller = class AddonInstaller {
9584
9406
  return false;
9585
9407
  }
9586
9408
  try {
9587
- await fs$1.promises.rm(target, {
9409
+ await fs.promises.rm(target, {
9588
9410
  recursive: true,
9589
9411
  force: true
9590
9412
  });
@@ -9602,7 +9424,7 @@ var AddonInstaller = class AddonInstaller {
9602
9424
  listBackupsFor(packageName) {
9603
9425
  const dir = path$1.join(this.backupsRoot, packageName);
9604
9426
  try {
9605
- return fs$1.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => path$1.join(dir, e.name)).sort();
9427
+ return fs.readdirSync(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => path$1.join(dir, e.name)).sort();
9606
9428
  } catch {
9607
9429
  return [];
9608
9430
  }
@@ -9634,7 +9456,7 @@ var AddonInstaller = class AddonInstaller {
9634
9456
  for (const dir of [pkgDir, path$1.dirname(pkgDir)]) {
9635
9457
  if (!this.isInsideBackups(dir)) continue;
9636
9458
  try {
9637
- await fs$1.promises.rmdir(dir);
9459
+ await fs.promises.rmdir(dir);
9638
9460
  } catch {
9639
9461
  return;
9640
9462
  }
@@ -9716,7 +9538,7 @@ var AddonInstaller = class AddonInstaller {
9716
9538
  */
9717
9539
  resolveBackupToKeep(packageName, backups) {
9718
9540
  const liveDir = path$1.join(this.addonsDir, packageName);
9719
- if (!fs$1.existsSync(liveDir)) {
9541
+ if (!fs.existsSync(liveDir)) {
9720
9542
  const newest = backups[backups.length - 1] ?? null;
9721
9543
  if (newest != null) this.logger.warn(`${packageName} — live install dir missing; retaining its newest backup as the only surviving copy`, { meta: {
9722
9544
  liveDir,
@@ -9733,7 +9555,7 @@ var AddonInstaller = class AddonInstaller {
9733
9555
  listBackedUpPackages() {
9734
9556
  let entries;
9735
9557
  try {
9736
- entries = fs$1.readdirSync(this.backupsRoot, { withFileTypes: true });
9558
+ entries = fs.readdirSync(this.backupsRoot, { withFileTypes: true });
9737
9559
  } catch {
9738
9560
  return [];
9739
9561
  }
@@ -9745,14 +9567,14 @@ var AddonInstaller = class AddonInstaller {
9745
9567
  continue;
9746
9568
  }
9747
9569
  const scopeDir = path$1.join(this.backupsRoot, entry.name);
9748
- for (const inner of fs$1.readdirSync(scopeDir, { withFileTypes: true })) if (inner.isDirectory()) names.push(`${entry.name}/${inner.name}`);
9570
+ for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (inner.isDirectory()) names.push(`${entry.name}/${inner.name}`);
9749
9571
  }
9750
9572
  return names;
9751
9573
  }
9752
9574
  async uninstall(packageName) {
9753
9575
  const addonDir = path$1.join(this.addonsDir, packageName);
9754
- if (fs$1.existsSync(addonDir)) {
9755
- fs$1.rmSync(addonDir, {
9576
+ if (fs.existsSync(addonDir)) {
9577
+ fs.rmSync(addonDir, {
9756
9578
  recursive: true,
9757
9579
  force: true
9758
9580
  });
@@ -9760,8 +9582,8 @@ var AddonInstaller = class AddonInstaller {
9760
9582
  return;
9761
9583
  }
9762
9584
  const legacyDir = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""));
9763
- if (fs$1.existsSync(legacyDir)) {
9764
- fs$1.rmSync(legacyDir, {
9585
+ if (fs.existsSync(legacyDir)) {
9586
+ fs.rmSync(legacyDir, {
9765
9587
  recursive: true,
9766
9588
  force: true
9767
9589
  });
@@ -9769,22 +9591,22 @@ var AddonInstaller = class AddonInstaller {
9769
9591
  }
9770
9592
  }
9771
9593
  listInstalled() {
9772
- if (!fs$1.existsSync(this.addonsDir)) return [];
9594
+ if (!fs.existsSync(this.addonsDir)) return [];
9773
9595
  const packageDirs = [];
9774
- for (const entry of fs$1.readdirSync(this.addonsDir, { withFileTypes: true })) {
9596
+ for (const entry of fs.readdirSync(this.addonsDir, { withFileTypes: true })) {
9775
9597
  if (!isDirEntry(entry, this.addonsDir)) continue;
9776
9598
  if (entry.name.startsWith("@")) {
9777
9599
  const scopeDir = path$1.join(this.addonsDir, entry.name);
9778
- for (const inner of fs$1.readdirSync(scopeDir, { withFileTypes: true })) if (isDirEntry(inner, scopeDir)) packageDirs.push(path$1.join(scopeDir, inner.name));
9600
+ for (const inner of fs.readdirSync(scopeDir, { withFileTypes: true })) if (isDirEntry(inner, scopeDir)) packageDirs.push(path$1.join(scopeDir, inner.name));
9779
9601
  } else packageDirs.push(path$1.join(this.addonsDir, entry.name));
9780
9602
  }
9781
9603
  return packageDirs.map((dir) => {
9782
9604
  const pkgPath = path$1.join(dir, "package.json");
9783
- if (!fs$1.existsSync(pkgPath)) return null;
9605
+ if (!fs.existsSync(pkgPath)) return null;
9784
9606
  const pkg = readPackageJson(pkgPath);
9785
9607
  if (!pkg || !pkg.camstackAddons) return null;
9786
9608
  const sourceFile = path$1.join(dir, ".install-source");
9787
- const installSource = fs$1.existsSync(sourceFile) ? parseInstallSource(fs$1.readFileSync(sourceFile, "utf-8").trim()) : void 0;
9609
+ const installSource = fs.existsSync(sourceFile) ? parseInstallSource(fs.readFileSync(sourceFile, "utf-8").trim()) : void 0;
9788
9610
  return {
9789
9611
  name: pkg.name,
9790
9612
  version: pkg.version,
@@ -9794,13 +9616,13 @@ var AddonInstaller = class AddonInstaller {
9794
9616
  }).filter((item) => item !== null);
9795
9617
  }
9796
9618
  isInstalled(packageName) {
9797
- if (fs$1.existsSync(path$1.join(this.addonsDir, packageName, "package.json"))) return true;
9798
- return fs$1.existsSync(path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json"));
9619
+ if (fs.existsSync(path$1.join(this.addonsDir, packageName, "package.json"))) return true;
9620
+ return fs.existsSync(path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json"));
9799
9621
  }
9800
9622
  getInstalledPackage(packageName) {
9801
9623
  let pkgPath = path$1.join(this.addonsDir, packageName, "package.json");
9802
- if (!fs$1.existsSync(pkgPath)) pkgPath = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json");
9803
- if (!fs$1.existsSync(pkgPath)) return null;
9624
+ if (!fs.existsSync(pkgPath)) pkgPath = path$1.join(this.addonsDir, packageName.replace(/^@[^/]+\//, ""), "package.json");
9625
+ if (!fs.existsSync(pkgPath)) return null;
9804
9626
  const pkg = readPackageJson(pkgPath);
9805
9627
  if (!pkg) return null;
9806
9628
  return {
@@ -9819,7 +9641,7 @@ var AddonInstaller = class AddonInstaller {
9819
9641
  ]) {
9820
9642
  const candidate = path$1.join(this.bundledAddonsDir, dirName);
9821
9643
  try {
9822
- const pkg = asJsonObject$1(parseJsonUnknown(fs$1.readFileSync(path$1.join(candidate, "package.json"), "utf-8")));
9644
+ const pkg = asJsonObject$1(parseJsonUnknown(fs.readFileSync(path$1.join(candidate, "package.json"), "utf-8")));
9823
9645
  if (pkg && asString$1(pkg["name"]) === packageName) return candidate;
9824
9646
  } catch {}
9825
9647
  }
@@ -9828,7 +9650,7 @@ var AddonInstaller = class AddonInstaller {
9828
9650
  /** Ensure a package is built (dist/ exists and page bundles present) */
9829
9651
  async ensureBuilt(packageName, sourceDir, pkgData) {
9830
9652
  const distDir = path$1.join(sourceDir, "dist");
9831
- if (!(!fs$1.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
9653
+ if (!(!fs.existsSync(distDir) || this.isDistIncomplete(pkgData, sourceDir))) return;
9832
9654
  this.logger.info(`${packageName} — building (dist/ missing or incomplete)`);
9833
9655
  try {
9834
9656
  await runNpm(["run", "build"], this.npmRunOptions(sourceDir, 18e4));
@@ -9843,7 +9665,7 @@ var AddonInstaller = class AddonInstaller {
9843
9665
  if (!camstack?.addons) return false;
9844
9666
  for (const addon of camstack.addons) {
9845
9667
  if (!addon.pages) continue;
9846
- for (const page of addon.pages) if (page.bundle && !fs$1.existsSync(path$1.join(sourceDir, "dist", page.bundle))) return true;
9668
+ for (const page of addon.pages) if (page.bundle && !fs.existsSync(path$1.join(sourceDir, "dist", page.bundle))) return true;
9847
9669
  }
9848
9670
  return false;
9849
9671
  }
@@ -9852,7 +9674,7 @@ var AddonInstaller = class AddonInstaller {
9852
9674
  function isDirEntry(entry, parentDir) {
9853
9675
  if (entry.isDirectory()) return true;
9854
9676
  if (entry.isSymbolicLink()) try {
9855
- return fs$1.statSync(path$1.join(parentDir, entry.name)).isDirectory();
9677
+ return fs.statSync(path$1.join(parentDir, entry.name)).isDirectory();
9856
9678
  } catch {
9857
9679
  return false;
9858
9680
  }
@@ -9951,7 +9773,7 @@ function selectAddonResidue(candidates) {
9951
9773
  }
9952
9774
  function readDeclaredName(dir) {
9953
9775
  try {
9954
- const parsed = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
9776
+ const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
9955
9777
  if (typeof parsed !== "object" || parsed === null) return null;
9956
9778
  const name = parsed.name;
9957
9779
  return typeof name === "string" ? name : null;
@@ -9961,7 +9783,7 @@ function readDeclaredName(dir) {
9961
9783
  }
9962
9784
  function readDeclaredVersion(dir) {
9963
9785
  try {
9964
- const parsed = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
9786
+ const parsed = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
9965
9787
  if (typeof parsed !== "object" || parsed === null) return null;
9966
9788
  const version = parsed.version;
9967
9789
  return typeof version === "string" ? version : null;
@@ -9971,7 +9793,7 @@ function readDeclaredVersion(dir) {
9971
9793
  }
9972
9794
  function isDirLike(p) {
9973
9795
  try {
9974
- return fs$1.statSync(p).isDirectory();
9796
+ return fs.statSync(p).isDirectory();
9975
9797
  } catch {
9976
9798
  return false;
9977
9799
  }
@@ -9981,7 +9803,7 @@ function freeQuarantineTarget(store, scope, dirName) {
9981
9803
  const base = scope === null ? dirName : `${scope.replace("@", "")}__${dirName}`;
9982
9804
  let candidate = path$1.join(store, base);
9983
9805
  let n = 1;
9984
- while (fs$1.existsSync(candidate)) {
9806
+ while (fs.existsSync(candidate)) {
9985
9807
  candidate = path$1.join(store, `${base}-${n}`);
9986
9808
  n += 1;
9987
9809
  }
@@ -9998,7 +9820,7 @@ function freeQuarantineTarget(store, scope, dirName) {
9998
9820
  function quarantineAddonResidue(addonsDir, log) {
9999
9821
  const quarantined = [];
10000
9822
  const failed = [];
10001
- if (!fs$1.existsSync(addonsDir)) return {
9823
+ if (!fs.existsSync(addonsDir)) return {
10002
9824
  quarantined,
10003
9825
  failed
10004
9826
  };
@@ -10006,7 +9828,7 @@ function quarantineAddonResidue(addonsDir, log) {
10006
9828
  const scan = (parent, scope) => {
10007
9829
  let names;
10008
9830
  try {
10009
- names = fs$1.readdirSync(parent);
9831
+ names = fs.readdirSync(parent);
10010
9832
  } catch {
10011
9833
  return;
10012
9834
  }
@@ -10025,8 +9847,8 @@ function quarantineAddonResidue(addonsDir, log) {
10025
9847
  const version = readDeclaredVersion(full);
10026
9848
  const to = freeQuarantineTarget(store, scope, dirName);
10027
9849
  try {
10028
- fs$1.mkdirSync(store, { recursive: true });
10029
- fs$1.renameSync(full, to);
9850
+ fs.mkdirSync(store, { recursive: true });
9851
+ fs.renameSync(full, to);
10030
9852
  } catch (err) {
10031
9853
  const error = err instanceof Error ? err.message : String(err);
10032
9854
  failed.push({
@@ -10084,11 +9906,11 @@ function getRestartMarkerPath(dataDir) {
10084
9906
  * intact or no marker at all (never a half-written file).
10085
9907
  */
10086
9908
  function writePendingRestart(dataDir, marker) {
10087
- fs$1.mkdirSync(dataDir, { recursive: true });
9909
+ fs.mkdirSync(dataDir, { recursive: true });
10088
9910
  const markerPath = getRestartMarkerPath(dataDir);
10089
9911
  const tmpPath = `${markerPath}.tmp`;
10090
- fs$1.writeFileSync(tmpPath, JSON.stringify(marker, null, 2), "utf-8");
10091
- fs$1.renameSync(tmpPath, markerPath);
9912
+ fs.writeFileSync(tmpPath, JSON.stringify(marker, null, 2), "utf-8");
9913
+ fs.renameSync(tmpPath, markerPath);
10092
9914
  }
10093
9915
  /**
10094
9916
  * Read + consume the marker. Returns the parsed payload on success and
@@ -10113,10 +9935,10 @@ function writePendingRestart(dataDir, marker) {
10113
9935
  */
10114
9936
  function readPendingRestart(dataDir) {
10115
9937
  const markerPath = getRestartMarkerPath(dataDir);
10116
- if (!fs$1.existsSync(markerPath)) return null;
9938
+ if (!fs.existsSync(markerPath)) return null;
10117
9939
  let raw;
10118
9940
  try {
10119
- raw = fs$1.readFileSync(markerPath, "utf-8");
9941
+ raw = fs.readFileSync(markerPath, "utf-8");
10120
9942
  } catch (err) {
10121
9943
  console.error("[restart-coordinator] Marker unreadable — leaving in place:", err);
10122
9944
  return null;
@@ -10155,7 +9977,7 @@ function readPendingRestart(dataDir) {
10155
9977
  /** Remove the marker if present. No-op if missing. */
10156
9978
  function clearPendingRestart(dataDir) {
10157
9979
  const markerPath = getRestartMarkerPath(dataDir);
10158
- fs$1.rmSync(markerPath, { force: true });
9980
+ fs.rmSync(markerPath, { force: true });
10159
9981
  }
10160
9982
  function isRestartKind(value) {
10161
9983
  return value === "framework-update" || value === "manual" || value === "system";
@@ -10167,7 +9989,7 @@ function scheduleSelfRestart(options = {}) {
10167
9989
  const touchTarget = process.env["CAMSTACK_RESTART_TOUCH_FILE"];
10168
9990
  if (touchTarget !== void 0 && touchTarget.length > 0) try {
10169
9991
  const now = /* @__PURE__ */ new Date();
10170
- fs$1.utimesSync(touchTarget, now, now);
9992
+ fs.utimesSync(touchTarget, now, now);
10171
9993
  return;
10172
9994
  } catch (err) {
10173
9995
  console.error("[restart-coordinator] dev touch-reload failed; falling through to process exit:", err);
@@ -14537,11 +14359,11 @@ function applyEnvOverrides(raw) {
14537
14359
  return result;
14538
14360
  }
14539
14361
  function loadYaml(configPath) {
14540
- if (!fs$1.existsSync(configPath)) {
14362
+ if (!fs.existsSync(configPath)) {
14541
14363
  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`);
14542
14364
  return {};
14543
14365
  }
14544
- const parsed = load(fs$1.readFileSync(configPath, "utf-8")) ?? {};
14366
+ const parsed = load(fs.readFileSync(configPath, "utf-8")) ?? {};
14545
14367
  console.log(`[ConfigManager] Loaded config from: ${configPath}`);
14546
14368
  return parsed;
14547
14369
  }
@@ -22895,7 +22717,7 @@ async function probeVaapiInit(renderNode) {
22895
22717
  */
22896
22718
  function safeExistsSync(path) {
22897
22719
  try {
22898
- return fs$1.existsSync(path);
22720
+ return fs.existsSync(path);
22899
22721
  } catch {
22900
22722
  return false;
22901
22723
  }
@@ -22914,11 +22736,11 @@ function probeLinuxGpus() {
22914
22736
  if (safeExistsSync("/dev/nvidia0") || safeExistsSync("/proc/driver/nvidia/version")) signals.hasNvidiaGpu = true;
22915
22737
  try {
22916
22738
  const drmDir = "/sys/class/drm";
22917
- if (fs$1.existsSync(drmDir)) for (const entry of fs$1.readdirSync(drmDir)) {
22739
+ if (fs.existsSync(drmDir)) for (const entry of fs.readdirSync(drmDir)) {
22918
22740
  if (!entry.startsWith("card")) continue;
22919
22741
  const vendorPath = `${drmDir}/${entry}/device/vendor`;
22920
22742
  if (!safeExistsSync(vendorPath)) continue;
22921
- const vendor = fs$1.readFileSync(vendorPath, "utf8").trim().toLowerCase();
22743
+ const vendor = fs.readFileSync(vendorPath, "utf8").trim().toLowerCase();
22922
22744
  if (vendor === "0x10de") signals.hasNvidiaGpu = true;
22923
22745
  else if (vendor === "0x1002") signals.hasAmdGpu = true;
22924
22746
  else if (vendor === "0x8086") signals.hasIntelGpu = true;
@@ -23136,21 +22958,21 @@ function sleep$1(ms) {
23136
22958
  * crashed holder) is stolen.
23137
22959
  */
23138
22960
  async function withFileLock(lockPath, fn) {
23139
- fs$1.mkdirSync(join(lockPath, ".."), { recursive: true });
22961
+ fs.mkdirSync(join(lockPath, ".."), { recursive: true });
23140
22962
  for (;;) try {
23141
- const fd = fs$1.openSync(lockPath, "wx");
23142
- fs$1.closeSync(fd);
22963
+ const fd = fs.openSync(lockPath, "wx");
22964
+ fs.closeSync(fd);
23143
22965
  break;
23144
22966
  } catch {
23145
22967
  try {
23146
- if (Date.now() - fs$1.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs$1.rmSync(lockPath, { force: true });
22968
+ if (Date.now() - fs.statSync(lockPath).mtimeMs > LOCK_STALE_MS) fs.rmSync(lockPath, { force: true });
23147
22969
  else await sleep$1(LOCK_POLL_MS);
23148
22970
  } catch {}
23149
22971
  }
23150
22972
  try {
23151
22973
  return await fn();
23152
22974
  } finally {
23153
- fs$1.rmSync(lockPath, { force: true });
22975
+ fs.rmSync(lockPath, { force: true });
23154
22976
  }
23155
22977
  }
23156
22978
  /** Coalesce in-process + serialize cross-process for one binary id. */
@@ -23208,7 +23030,7 @@ var AddonDepsManager = class {
23208
23030
  * failed or tampered download throws, and provisioning reports it.
23209
23031
  */
23210
23032
  async stageNativeDepsDeclaredBy(requirementsFile) {
23211
- if (!declaresEdgetpuDelegate(fs$1.readFileSync(requirementsFile, "utf8"))) return;
23033
+ if (!declaresEdgetpuDelegate(fs.readFileSync(requirementsFile, "utf8"))) return;
23212
23034
  await singleFlight(this.depsDir, "edgetpu-delegate", () => ensureEdgetpuDelegate(this.nodeRoot, this.logger));
23213
23035
  }
23214
23036
  getDepsDir() {
@@ -24239,7 +24061,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
24239
24061
  const addonId = declaration.id;
24240
24062
  const nodeDataDir = process.env["CAMSTACK_DATA"] ?? dataDir;
24241
24063
  const addonDataDir = path$1.resolve(nodeDataDir, "addons-data", addonId);
24242
- fs$1.mkdirSync(addonDataDir, { recursive: true });
24064
+ fs.mkdirSync(addonDataDir, { recursive: true });
24243
24065
  if (runtime.mode === "broker") ensureBindingSubscription(runtime.broker);
24244
24066
  const regs = getRegistries(nodeId);
24245
24067
  const workerResolver = {
@@ -25732,6 +25554,7 @@ var AddonHealthMonitor = class {
25732
25554
  logger;
25733
25555
  retryFn;
25734
25556
  now;
25557
+ isHeldBack;
25735
25558
  timer = null;
25736
25559
  graceEmittedFor = false;
25737
25560
  constructor(opts) {
@@ -25739,6 +25562,7 @@ var AddonHealthMonitor = class {
25739
25562
  this.logger = opts.logger;
25740
25563
  this.retryFn = opts.retryFn;
25741
25564
  this.now = opts.now ?? (() => Date.now());
25565
+ this.isHeldBack = opts.isHeldBack ?? (() => false);
25742
25566
  this.tickIntervalMs = opts.tickIntervalMs ?? 3e4;
25743
25567
  this.gracePeriodMs = opts.gracePeriodMs ?? 3e5;
25744
25568
  this.retryIntervalsMs = opts.retryIntervalsMs ?? HEALTH_MONITOR_RETRY_INTERVALS_MS;
@@ -25766,7 +25590,8 @@ var AddonHealthMonitor = class {
25766
25590
  lastError: null,
25767
25591
  nextRetryAt: null,
25768
25592
  alertEmitted: false,
25769
- retrying: false
25593
+ retrying: false,
25594
+ heldBack: false
25770
25595
  });
25771
25596
  if (wasAlerting) this.emit(EventCategory$1.AddonLoadRecovered, {
25772
25597
  packageName,
@@ -25781,6 +25606,11 @@ var AddonHealthMonitor = class {
25781
25606
  */
25782
25607
  recordFailure(packageName, err, addonId) {
25783
25608
  const existing = this.state.get(packageName);
25609
+ const id = addonId ?? existing?.addonId;
25610
+ if (id !== void 0 && this.isHeldBack(id)) {
25611
+ this.recordHeldBack(packageName, errMsg$1(err), id);
25612
+ return;
25613
+ }
25784
25614
  const t = this.now();
25785
25615
  const retryCount = (existing?.retryCount ?? 0) + 1;
25786
25616
  const intervalIdx = Math.min(retryCount - 1, this.retryIntervalsMs.length - 1);
@@ -25799,7 +25629,8 @@ var AddonHealthMonitor = class {
25799
25629
  lastError: errPayload,
25800
25630
  nextRetryAt,
25801
25631
  alertEmitted: existing?.alertEmitted ?? false,
25802
- retrying: false
25632
+ retrying: false,
25633
+ heldBack: false
25803
25634
  };
25804
25635
  this.state.set(packageName, next);
25805
25636
  this.logger.warn("Addon load/init failure recorded", { meta: {
@@ -25828,6 +25659,39 @@ var AddonHealthMonitor = class {
25828
25659
  }
25829
25660
  }
25830
25661
  /**
25662
+ * The spawn gate holds this addon back (its package is not yet at the version the
25663
+ * server requires). Not a failure: the same retry backoff is armed, so the addon
25664
+ * is reloaded once its package is current, but no failure is logged as a warning
25665
+ * and no `AddonLoadFailed` / `AddonRetryScheduled` event is emitted. A retry that
25666
+ * finds the gate open records success the normal way.
25667
+ */
25668
+ recordHeldBack(packageName, reason, addonId) {
25669
+ const existing = this.state.get(packageName);
25670
+ const t = this.now();
25671
+ const retryCount = (existing?.retryCount ?? 0) + 1;
25672
+ const nextRetryAt = t + this.retryIntervalsMs[Math.min(retryCount - 1, this.retryIntervalsMs.length - 1)];
25673
+ this.state.set(packageName, {
25674
+ packageName,
25675
+ addonId: addonId ?? existing?.addonId,
25676
+ phase: "failed",
25677
+ retryCount,
25678
+ firstFailureAt: existing?.firstFailureAt ?? t,
25679
+ lastAttemptAt: t,
25680
+ lastError: { message: reason },
25681
+ nextRetryAt,
25682
+ alertEmitted: false,
25683
+ retrying: false,
25684
+ heldBack: true
25685
+ });
25686
+ this.logger.info("Addon held back by the stale gate, retry armed", { meta: {
25687
+ packageName,
25688
+ addonId: addonId ?? existing?.addonId,
25689
+ retryCount,
25690
+ nextRetryAt,
25691
+ reason
25692
+ } });
25693
+ }
25694
+ /**
25831
25695
  * Force an immediate retry attempt for a package, resetting the
25832
25696
  * counter back to 0 (next failure goes to the 60s interval again).
25833
25697
  * Used by the user-facing `addons.retryLoad` tRPC procedure and by
@@ -25904,7 +25768,7 @@ var AddonHealthMonitor = class {
25904
25768
  const t = this.now();
25905
25769
  if (!this.inGracePeriod() && !this.graceEmittedFor) {
25906
25770
  this.graceEmittedFor = true;
25907
- for (const s of this.state.values()) if (s.phase === "failed" && !s.alertEmitted && s.lastError) {
25771
+ for (const s of this.state.values()) if (s.phase === "failed" && !s.heldBack && !s.alertEmitted && s.lastError) {
25908
25772
  s.alertEmitted = true;
25909
25773
  this.emit(EventCategory$1.AddonLoadFailed, {
25910
25774
  packageName: s.packageName,
@@ -26057,7 +25921,7 @@ var FailedRunnerRetryLedger = class {
26057
25921
  function readRunnerPackageVersions(addonDirs) {
26058
25922
  const out = {};
26059
25923
  for (const dir of addonDirs) try {
26060
- const raw = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
25924
+ const raw = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
26061
25925
  const version = typeof raw === "object" && raw !== null ? Reflect.get(raw, "version") : null;
26062
25926
  out[dir] = typeof version === "string" && version.length > 0 ? version : null;
26063
25927
  } catch {
@@ -26118,7 +25982,7 @@ function readAddonHeapDeclaration(spec) {
26118
25982
  if (cached !== void 0) return cached;
26119
25983
  let declaration = EMPTY_HEAP_DECLARATION;
26120
25984
  for (const manifestPath of [path$1.join(spec.addonDir, "package.json"), path$1.join(path$1.dirname(spec.addonDir), "package.json")]) try {
26121
- const raw = fs$1.readFileSync(manifestPath, "utf8");
25985
+ const raw = fs.readFileSync(manifestPath, "utf8");
26122
25986
  const parsed = JSON.parse(raw);
26123
25987
  const profile = extractHeapProfile(parsed, spec.addonId);
26124
25988
  const maxOldSpaceMb = extractMaxOldSpaceMb(parsed, spec.addonId);
@@ -27351,17 +27215,17 @@ var JobJournal = class {
27351
27215
  return path$1.join(this.jobsDir, `${id}.json`);
27352
27216
  }
27353
27217
  writeAtomic(filePath, data) {
27354
- fs$1.mkdirSync(path$1.dirname(filePath), { recursive: true });
27218
+ fs.mkdirSync(path$1.dirname(filePath), { recursive: true });
27355
27219
  const tmp = `${filePath}.tmp.${process.pid}.${Date.now()}`;
27356
- fs$1.writeFileSync(tmp, JSON.stringify(data, null, 2), {
27220
+ fs.writeFileSync(tmp, JSON.stringify(data, null, 2), {
27357
27221
  encoding: "utf-8",
27358
27222
  mode: 384
27359
27223
  });
27360
- fs$1.renameSync(tmp, filePath);
27224
+ fs.renameSync(tmp, filePath);
27361
27225
  }
27362
27226
  readIndex() {
27363
27227
  try {
27364
- const raw = JSON.parse(fs$1.readFileSync(this.indexPath, "utf-8"));
27228
+ const raw = JSON.parse(fs.readFileSync(this.indexPath, "utf-8"));
27365
27229
  if (raw && Array.isArray(raw.jobIds)) return {
27366
27230
  version: 1,
27367
27231
  jobIds: raw.jobIds
@@ -27386,7 +27250,7 @@ var JobJournal = class {
27386
27250
  }
27387
27251
  getJob(id) {
27388
27252
  try {
27389
- const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs$1.readFileSync(this.jobPath(id), "utf-8")));
27253
+ const parsed = lifecycleJobSchema.safeParse(JSON.parse(fs.readFileSync(this.jobPath(id), "utf-8")));
27390
27254
  return parsed.success ? parsed.data : null;
27391
27255
  } catch {
27392
27256
  return null;
@@ -27451,14 +27315,14 @@ var StagingArea = class {
27451
27315
  }
27452
27316
  async fetchAndStage(input) {
27453
27317
  const destDir = path$1.join(this.stagingDir, input.jobId, safeSegment(input.name));
27454
- fs$1.rmSync(destDir, {
27318
+ fs.rmSync(destDir, {
27455
27319
  recursive: true,
27456
27320
  force: true
27457
27321
  });
27458
27322
  const tgz = await this.deps.fetchTarball(input.name, input.version, input.signal);
27459
27323
  if (input.signal.aborted) throw new Error("staging aborted after fetch");
27460
27324
  await this.deps.extract(tgz, destDir);
27461
- const raw = JSON.parse(fs$1.readFileSync(path$1.join(destDir, "package.json"), "utf-8"));
27325
+ const raw = JSON.parse(fs.readFileSync(path$1.join(destDir, "package.json"), "utf-8"));
27462
27326
  if (typeof raw.version !== "string" || raw.version.length === 0) throw new Error(`staging validation failed: ${input.name} staged a package.json with no version`);
27463
27327
  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}`);
27464
27328
  return {
@@ -27467,7 +27331,7 @@ var StagingArea = class {
27467
27331
  };
27468
27332
  }
27469
27333
  cleanup(jobId) {
27470
- fs$1.rmSync(path$1.join(this.stagingDir, jobId), {
27334
+ fs.rmSync(path$1.join(this.stagingDir, jobId), {
27471
27335
  recursive: true,
27472
27336
  force: true
27473
27337
  });
@@ -27482,13 +27346,13 @@ var StagingArea = class {
27482
27346
  sweepOrphans() {
27483
27347
  let entries;
27484
27348
  try {
27485
- entries = fs$1.readdirSync(this.stagingDir);
27349
+ entries = fs.readdirSync(this.stagingDir);
27486
27350
  } catch {
27487
27351
  return 0;
27488
27352
  }
27489
27353
  let removed = 0;
27490
27354
  for (const name of entries) try {
27491
- fs$1.rmSync(path$1.join(this.stagingDir, name), {
27355
+ fs.rmSync(path$1.join(this.stagingDir, name), {
27492
27356
  recursive: true,
27493
27357
  force: true
27494
27358
  });
@@ -27666,7 +27530,7 @@ var LifecycleJobEngine = class {
27666
27530
  * on failure → `failed`.
27667
27531
  */
27668
27532
  async reconcileJob(job) {
27669
- const exists = this.deps.stagedPathExists ?? ((p) => fs$1.existsSync(p));
27533
+ const exists = this.deps.stagedPathExists ?? ((p) => fs.existsSync(p));
27670
27534
  for (const task of job.tasks) {
27671
27535
  if (task.target === "framework") {
27672
27536
  if (!this.isTerminal(task.phase)) this.skipFrameworkTask(job, task);
@@ -28307,7 +28171,7 @@ var CatalogRegistry = class {
28307
28171
  const file = path$1.join(packageDir, "i18n", `${lang}.json`);
28308
28172
  let text;
28309
28173
  try {
28310
- text = fs$1.readFileSync(file, "utf8");
28174
+ text = fs.readFileSync(file, "utf8");
28311
28175
  } catch {
28312
28176
  continue;
28313
28177
  }
@@ -28363,4 +28227,4 @@ function resetCatalogRegistryForTests() {
28363
28227
  }
28364
28228
  //#endregion
28365
28229
  var readAllRows = import_read_all_rows.readAllRows;
28366
- 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, 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, RegistryReadError, 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, clearHeldInstall, 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, createMigrationApi, createMigrationApiOverContext, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createRequiresRegistry, 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, listHeldInstalls, 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, recordHeldInstall, 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 };
28230
+ 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, 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, RegistryReadError, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, 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, clearHeldInstall, 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, createMigrationApi, createMigrationApiOverContext, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createRequiresRegistry, 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, listHeldInstalls, 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, recordHeldInstall, 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 };