@wildo-ai/platform-config-lib 1.1.10 → 1.1.12

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 (396) hide show
  1. package/dist/esm/_unimplemented/soft-warn.d.ts +24 -49
  2. package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -1
  3. package/dist/esm/_unimplemented/soft-warn.js +24 -49
  4. package/dist/esm/_unimplemented/soft-warn.js.map +1 -1
  5. package/dist/esm/blueprint/anchored-region.d.ts +83 -0
  6. package/dist/esm/blueprint/anchored-region.d.ts.map +1 -0
  7. package/dist/esm/blueprint/anchored-region.js +263 -0
  8. package/dist/esm/blueprint/anchored-region.js.map +1 -0
  9. package/dist/esm/blueprint/blueprint.schemas.d.ts +600 -0
  10. package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -0
  11. package/dist/esm/blueprint/blueprint.schemas.js +638 -0
  12. package/dist/esm/blueprint/blueprint.schemas.js.map +1 -0
  13. package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
  14. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -1
  15. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -1
  16. package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
  17. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +13 -1
  18. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  19. package/dist/esm/bootstrap/bootstrap.contracts.js +6 -0
  20. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  21. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +29 -4
  22. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  23. package/dist/esm/bootstrap/bootstrap.schemas.js +29 -4
  24. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  25. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +131 -2
  26. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  27. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +139 -2
  28. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  29. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +21 -0
  30. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
  31. package/dist/esm/bootstrap/platform-store-preconnect.js +25 -0
  32. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -1
  33. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts +80 -0
  34. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts.map +1 -0
  35. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js +81 -0
  36. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js.map +1 -0
  37. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +41 -9
  38. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  39. package/dist/esm/bootstrap/runtime-backing-service-access.js +77 -28
  40. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  41. package/dist/esm/bootstrap/runtime-network-policy.d.ts +117 -12
  42. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  43. package/dist/esm/bootstrap/runtime-network-policy.js +222 -23
  44. package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -1
  45. package/dist/esm/bootstrap/runtime-network-topology.d.ts +31 -4
  46. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  47. package/dist/esm/bootstrap/runtime-network-topology.js +43 -2
  48. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  49. package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -1
  50. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +40 -2
  51. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  52. package/dist/esm/bootstrap/runtime-principal.contracts.js +66 -3
  53. package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -1
  54. package/dist/esm/bootstrap/runtime-response-integrity.d.ts +249 -0
  55. package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -0
  56. package/dist/esm/bootstrap/runtime-response-integrity.js +353 -0
  57. package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -0
  58. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts +32 -0
  59. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -0
  60. package/dist/esm/bootstrap/runtime-secret-env.contracts.js +43 -0
  61. package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -0
  62. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  63. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  64. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts +51 -0
  65. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -0
  66. package/dist/esm/canonical-json/rfc8785-canonical-json.js +231 -0
  67. package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -0
  68. package/dist/esm/config-authoring.entry.js.map +1 -1
  69. package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
  70. package/dist/esm/credentials/credential-generator.service.js.map +1 -1
  71. package/dist/esm/index.d.ts +20 -1
  72. package/dist/esm/index.d.ts.map +1 -1
  73. package/dist/esm/index.js +20 -1
  74. package/dist/esm/index.js.map +1 -1
  75. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts +119 -0
  76. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts.map +1 -0
  77. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js +109 -0
  78. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js.map +1 -0
  79. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts +182 -0
  80. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts.map +1 -0
  81. package/dist/esm/key-management/application-signing-key-rotation.contracts.js +145 -0
  82. package/dist/esm/key-management/application-signing-key-rotation.contracts.js.map +1 -0
  83. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts +156 -0
  84. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts.map +1 -0
  85. package/dist/esm/key-management/approval-seal-manifested-copy.js +617 -0
  86. package/dist/esm/key-management/approval-seal-manifested-copy.js.map +1 -0
  87. package/dist/esm/key-management/approval-seal-verifier.d.ts +278 -0
  88. package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -0
  89. package/dist/esm/key-management/approval-seal-verifier.js +355 -0
  90. package/dist/esm/key-management/approval-seal-verifier.js.map +1 -0
  91. package/dist/esm/key-management/approval-seal.contracts.d.ts +128 -0
  92. package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -0
  93. package/dist/esm/key-management/approval-seal.contracts.js +135 -0
  94. package/dist/esm/key-management/approval-seal.contracts.js.map +1 -0
  95. package/dist/esm/key-management/data-key.contracts.d.ts +106 -0
  96. package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -0
  97. package/dist/esm/key-management/data-key.contracts.js +54 -0
  98. package/dist/esm/key-management/data-key.contracts.js.map +1 -0
  99. package/dist/esm/key-management/es256-jws.d.ts +60 -0
  100. package/dist/esm/key-management/es256-jws.d.ts.map +1 -0
  101. package/dist/esm/key-management/es256-jws.js +135 -0
  102. package/dist/esm/key-management/es256-jws.js.map +1 -0
  103. package/dist/esm/key-management/key-provider.spi.d.ts +158 -0
  104. package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -0
  105. package/dist/esm/key-management/key-provider.spi.js +38 -0
  106. package/dist/esm/key-management/key-provider.spi.js.map +1 -0
  107. package/dist/esm/key-management/keyring-rotation.contracts.d.ts +83 -0
  108. package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -0
  109. package/dist/esm/key-management/keyring-rotation.contracts.js +101 -0
  110. package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -0
  111. package/dist/esm/key-management/keyring-status.contracts.d.ts +59 -0
  112. package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -0
  113. package/dist/esm/key-management/keyring-status.contracts.js +45 -0
  114. package/dist/esm/key-management/keyring-status.contracts.js.map +1 -0
  115. package/dist/esm/key-management/pdf-incremental-update.d.ts +158 -0
  116. package/dist/esm/key-management/pdf-incremental-update.d.ts.map +1 -0
  117. package/dist/esm/key-management/pdf-incremental-update.js +730 -0
  118. package/dist/esm/key-management/pdf-incremental-update.js.map +1 -0
  119. package/dist/esm/key-management/pdf-truetype-font.d.ts +35 -0
  120. package/dist/esm/key-management/pdf-truetype-font.d.ts.map +1 -0
  121. package/dist/esm/key-management/pdf-truetype-font.js +152 -0
  122. package/dist/esm/key-management/pdf-truetype-font.js.map +1 -0
  123. package/dist/esm/key-management/qr-code.d.ts +38 -0
  124. package/dist/esm/key-management/qr-code.d.ts.map +1 -0
  125. package/dist/esm/key-management/qr-code.js +325 -0
  126. package/dist/esm/key-management/qr-code.js.map +1 -0
  127. package/dist/esm/key-management/signature-request.contracts.d.ts +91 -0
  128. package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -0
  129. package/dist/esm/key-management/signature-request.contracts.js +96 -0
  130. package/dist/esm/key-management/signature-request.contracts.js.map +1 -0
  131. package/dist/esm/key-management/signing-log-export.contracts.d.ts +215 -0
  132. package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -0
  133. package/dist/esm/key-management/signing-log-export.contracts.js +268 -0
  134. package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -0
  135. package/dist/esm/key-management/vault-custody.contracts.d.ts +98 -0
  136. package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -0
  137. package/dist/esm/key-management/vault-custody.contracts.js +154 -0
  138. package/dist/esm/key-management/vault-custody.contracts.js.map +1 -0
  139. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -1
  140. package/dist/esm/lockfile/build-parallelism.js.map +1 -1
  141. package/dist/esm/lockfile/canonical-json.d.ts +1 -1
  142. package/dist/esm/lockfile/canonical-json.d.ts.map +1 -1
  143. package/dist/esm/lockfile/canonical-json.js +1 -1
  144. package/dist/esm/lockfile/canonical-json.js.map +1 -1
  145. package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
  146. package/dist/esm/lockfile/file-lock-hold.js +2 -1
  147. package/dist/esm/lockfile/file-lock-hold.js.map +1 -1
  148. package/dist/esm/lockfile/lockfile-io.d.ts +13 -17
  149. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  150. package/dist/esm/lockfile/lockfile-io.js +29 -30
  151. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  152. package/dist/esm/lockfile/materialize-infra-section.d.ts +22 -20
  153. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  154. package/dist/esm/lockfile/materialize-infra-section.js +13 -14
  155. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  156. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +27 -249
  157. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  158. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +28 -3
  159. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  160. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts +146 -0
  161. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts.map +1 -0
  162. package/dist/esm/pnpm-settings/application-pnpm-settings.js +573 -0
  163. package/dist/esm/pnpm-settings/application-pnpm-settings.js.map +1 -0
  164. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
  165. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +22 -3
  166. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
  167. package/dist/esm/project-config/application-served-public-documents.loader.d.ts +26 -0
  168. package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -0
  169. package/dist/esm/project-config/application-served-public-documents.loader.js +86 -0
  170. package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -0
  171. package/dist/esm/project-config/backend-compliance-section.reader.d.ts +35 -0
  172. package/dist/esm/project-config/backend-compliance-section.reader.d.ts.map +1 -0
  173. package/dist/esm/project-config/backend-compliance-section.reader.js +123 -0
  174. package/dist/esm/project-config/backend-compliance-section.reader.js.map +1 -0
  175. package/dist/esm/project-config/backend-compliance-section.worker.d.ts +20 -0
  176. package/dist/esm/project-config/backend-compliance-section.worker.d.ts.map +1 -0
  177. package/dist/esm/project-config/backend-compliance-section.worker.js +78 -0
  178. package/dist/esm/project-config/backend-compliance-section.worker.js.map +1 -0
  179. package/dist/esm/project-config/config-module-resolution.d.ts +32 -0
  180. package/dist/esm/project-config/config-module-resolution.d.ts.map +1 -0
  181. package/dist/esm/project-config/config-module-resolution.js +33 -0
  182. package/dist/esm/project-config/config-module-resolution.js.map +1 -0
  183. package/dist/esm/project-config/define-framework-config.js.map +1 -1
  184. package/dist/esm/project-config/define-infra-env-config.d.ts +344 -69
  185. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  186. package/dist/esm/project-config/define-infra-env-config.js +194 -143
  187. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  188. package/dist/esm/project-config/define-minion-config.d.ts +26 -36
  189. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  190. package/dist/esm/project-config/define-minion-config.js +64 -25
  191. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  192. package/dist/esm/project-config/define-saas-config.d.ts +82 -348
  193. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  194. package/dist/esm/project-config/define-saas-config.js +262 -103
  195. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  196. package/dist/esm/project-config/define-worker-config.d.ts +10 -20
  197. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  198. package/dist/esm/project-config/define-worker-config.js +10 -12
  199. package/dist/esm/project-config/define-worker-config.js.map +1 -1
  200. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
  201. package/dist/esm/project-config/hosted-infra-env-config.js +4 -1
  202. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
  203. package/dist/esm/project-config/index.d.ts +5 -0
  204. package/dist/esm/project-config/index.d.ts.map +1 -1
  205. package/dist/esm/project-config/index.js +5 -0
  206. package/dist/esm/project-config/index.js.map +1 -1
  207. package/dist/esm/project-config/loader-instances-zod.d.ts +19 -0
  208. package/dist/esm/project-config/loader-instances-zod.d.ts.map +1 -0
  209. package/dist/esm/project-config/loader-instances-zod.js +40 -0
  210. package/dist/esm/project-config/loader-instances-zod.js.map +1 -0
  211. package/dist/esm/project-config/loader.d.ts +131 -14
  212. package/dist/esm/project-config/loader.d.ts.map +1 -1
  213. package/dist/esm/project-config/loader.js +226 -12
  214. package/dist/esm/project-config/loader.js.map +1 -1
  215. package/dist/esm/project-config/minion-liveness.contracts.d.ts +131 -0
  216. package/dist/esm/project-config/minion-liveness.contracts.d.ts.map +1 -0
  217. package/dist/esm/project-config/minion-liveness.contracts.js +167 -0
  218. package/dist/esm/project-config/minion-liveness.contracts.js.map +1 -0
  219. package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -1
  220. package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -1
  221. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
  222. package/dist/esm/project-config/npm-version-range.js +39 -16
  223. package/dist/esm/project-config/npm-version-range.js.map +1 -1
  224. package/dist/esm/project-config/owning-package-tsconfig.d.ts +15 -0
  225. package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -0
  226. package/dist/esm/project-config/owning-package-tsconfig.js +29 -0
  227. package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -0
  228. package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
  229. package/dist/esm/project-config/provider-companion-discovery.d.ts +4 -4
  230. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  231. package/dist/esm/project-config/provider-companion-discovery.js +16 -10
  232. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  233. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +103 -49
  234. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  235. package/dist/esm/project-config/provider-runtime-artifacts.js +216 -16
  236. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  237. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +0 -2
  238. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  239. package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -1
  240. package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
  241. package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
  242. package/dist/esm/project-config/shared/auth.schemas.d.ts +0 -17
  243. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  244. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  245. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -1
  246. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +9 -10
  247. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  248. package/dist/esm/project-config/shared/backing-services.schemas.js +13 -15
  249. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  250. package/dist/esm/project-config/shared/cdn.schemas.d.ts +0 -51
  251. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  252. package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -1
  253. package/dist/esm/project-config/shared/csp-defaults.d.ts +36 -9
  254. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  255. package/dist/esm/project-config/shared/csp-defaults.js +54 -11
  256. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
  257. package/dist/esm/project-config/shared/csp-emit.d.ts +60 -13
  258. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  259. package/dist/esm/project-config/shared/csp-emit.js +77 -24
  260. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  261. package/dist/esm/project-config/shared/csp.schemas.d.ts +72 -85
  262. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  263. package/dist/esm/project-config/shared/csp.schemas.js +40 -13
  264. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  265. package/dist/esm/project-config/shared/data-services.schemas.d.ts +0 -8
  266. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  267. package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
  268. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  269. package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
  270. package/dist/esm/project-config/shared/environment.schemas.d.ts +101 -8
  271. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  272. package/dist/esm/project-config/shared/environment.schemas.js +128 -9
  273. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  274. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +10 -4
  275. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  276. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  277. package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -1
  278. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +2 -1
  279. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  280. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +4 -1
  281. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  282. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  283. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  284. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  285. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  286. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +24 -0
  287. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  288. package/dist/esm/project-config/shared/minion-resource-access.validation.js +25 -2
  289. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  290. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -1
  291. package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -1
  292. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +276 -0
  293. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -0
  294. package/dist/esm/project-config/shared/platform-key-management.schemas.js +296 -0
  295. package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -0
  296. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  297. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +2 -2
  298. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
  299. package/dist/esm/project-config/shared/platform-storage.schemas.js +16 -2
  300. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -1
  301. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +21 -23
  302. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  303. package/dist/esm/project-config/shared/service-definitions.schemas.js +4 -5
  304. package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
  305. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +0 -18
  306. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
  307. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -1
  308. package/dist/esm/project-config/static-asset-import-noop.d.ts +20 -3
  309. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -1
  310. package/dist/esm/project-config/static-asset-import-noop.js +36 -20
  311. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -1
  312. package/dist/esm/registry/artifact-domain.schemas.d.ts +0 -5
  313. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  314. package/dist/esm/registry/artifact-domain.schemas.js.map +1 -1
  315. package/dist/esm/registry/digest.schemas.js.map +1 -1
  316. package/dist/esm/registry/index.d.ts +3 -3
  317. package/dist/esm/registry/index.d.ts.map +1 -1
  318. package/dist/esm/registry/index.js +3 -3
  319. package/dist/esm/registry/index.js.map +1 -1
  320. package/dist/esm/registry/local-checkout-source.d.ts +22 -2
  321. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
  322. package/dist/esm/registry/local-checkout-source.js +66 -3
  323. package/dist/esm/registry/local-checkout-source.js.map +1 -1
  324. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +11 -98
  325. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  326. package/dist/esm/registry/lockfile-modules-section.schemas.js +1 -2
  327. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  328. package/dist/esm/registry/module-artifact.schemas.d.ts +40 -17
  329. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  330. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  331. package/dist/esm/registry/module-manifest.schemas.d.ts +324 -74
  332. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  333. package/dist/esm/registry/module-manifest.schemas.js +377 -19
  334. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  335. package/dist/esm/registry/module-search.schemas.d.ts +2 -0
  336. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
  337. package/dist/esm/registry/module-search.schemas.js +14 -1
  338. package/dist/esm/registry/module-search.schemas.js.map +1 -1
  339. package/dist/esm/registry/registry-config.schemas.d.ts +0 -18
  340. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  341. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  342. package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -1
  343. package/dist/esm/registry/registry-defaults.constants.js.map +1 -1
  344. package/dist/esm/registry/registry-errors.d.ts +103 -5
  345. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  346. package/dist/esm/registry/registry-errors.js +213 -6
  347. package/dist/esm/registry/registry-errors.js.map +1 -1
  348. package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
  349. package/dist/esm/registry/registry-section-schemas.constants.d.ts +5 -0
  350. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  351. package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -1
  352. package/dist/esm/registry/registry-url-resolution.d.ts +72 -0
  353. package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -0
  354. package/dist/esm/registry/registry-url-resolution.js +157 -0
  355. package/dist/esm/registry/registry-url-resolution.js.map +1 -0
  356. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  357. package/dist/esm/release/framework-release.constants.js.map +1 -1
  358. package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
  359. package/dist/esm/schemas/framework-secrets.schemas.d.ts +48 -0
  360. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  361. package/dist/esm/schemas/framework-secrets.schemas.js +53 -0
  362. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  363. package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
  364. package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
  365. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +1 -1
  366. package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
  367. package/dist/esm/schemas/platform-config.schemas.d.ts +2 -2
  368. package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
  369. package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -1
  370. package/dist/esm/workspace-scope/index.js.map +1 -1
  371. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  372. package/dist/esm/workspace-scope/resolve-homes.js.map +1 -1
  373. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  374. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  375. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
  376. package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
  377. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  378. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  379. package/dist/tsconfig.build.tsbuildinfo +1 -1
  380. package/package.json +12 -12
  381. package/dist/esm/_unimplemented/index.d.ts +0 -3
  382. package/dist/esm/_unimplemented/index.d.ts.map +0 -1
  383. package/dist/esm/_unimplemented/index.js +0 -3
  384. package/dist/esm/_unimplemented/index.js.map +0 -1
  385. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +0 -137
  386. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +0 -1
  387. package/dist/esm/_unimplemented/unimplemented-field-warning.js +0 -153
  388. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +0 -1
  389. package/dist/esm/project-config/shared/cdn.example.d.ts +0 -14
  390. package/dist/esm/project-config/shared/cdn.example.d.ts.map +0 -1
  391. package/dist/esm/project-config/shared/cdn.example.js +0 -38
  392. package/dist/esm/project-config/shared/cdn.example.js.map +0 -1
  393. package/dist/esm/project-config/shared/schema-version.schemas.d.ts +0 -15
  394. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +0 -1
  395. package/dist/esm/project-config/shared/schema-version.schemas.js +0 -40
  396. package/dist/esm/project-config/shared/schema-version.schemas.js.map +0 -1
@@ -0,0 +1,167 @@
1
+ import { MinionLivenessSchema } from './define-minion-config.js';
2
+ /**
3
+ * # Minion liveness: the ONE source both the probe and the heartbeat are derived from
4
+ *
5
+ * A minion has no inbound HTTP surface, so its Kubernetes liveness probe cannot be an `httpGet` the way a
6
+ * backend's `/health` or a worker's `/healthz` is. For `liveness.kind: 'file'` (the default) the contract is a
7
+ * HEARTBEAT FILE: the minion runtime writes it while its work loop is alive, and an `exec` probe reads it.
8
+ *
9
+ * Until #1859 the two halves had no common source and the producer did not exist at all: the schema promised
10
+ * the actor loop "touches" the file, the k8s renderer built a `find <file> -mmin -1.5` probe from two
11
+ * hard-coded fallbacks, and nothing in `@wildo-ai/saas-minions-lib` ever wrote the file. Every minion deployed
12
+ * from the generated manifests therefore failed its probe and was restarted by the kubelet forever. Everything
13
+ * the probe and the writer must agree on now lives here:
14
+ *
15
+ * | what | consumed by |
16
+ * |---|---|
17
+ * | the probe command ({@link buildMinionLivenessProbeCommand}) | the k8s `livenessProbe` / `startupProbe`, the compose `healthcheck` |
18
+ * | the probe cadence ({@link deriveMinionLivenessProbeTiming}) | the same three probe declarations |
19
+ * | the heartbeat env ({@link buildMinionLivenessHeartbeatEnv}) | the k8s `env:` block and the compose `environment:` block |
20
+ * | the heartbeat format ({@link encodeMinionLivenessHeartbeat}) | the writer in `@wildo-ai/saas-minions-lib` |
21
+ *
22
+ * ## Why a file the probe READS, rather than a file whose mtime it checks
23
+ *
24
+ * The heartbeat file holds the writer's own clock in whole epoch seconds, and the probe compares it with
25
+ * `date +%s`. The previous probe asked `find <file> -mmin -1.5`. A fractional `-mmin` is a GNU findutils
26
+ * feature; whether the BusyBox `find` in the `node:*-alpine` minion images accepts it was never executed
27
+ * (believed not to), and a probe whose meaning depends on which `find` the image ships cannot be tested off the
28
+ * image. `cat`, `date +%s`, `case` and POSIX `$(( ))` arithmetic are POSIX shell and utilities, which is also
29
+ * what lets the framework EXECUTE the rendered command in its own tests (macOS `/bin/sh`; the BusyBox `ash` run
30
+ * is a stack-check item on #2035).
31
+ *
32
+ * ## Why not an `httpGet` or a `tcpSocket` probe
33
+ *
34
+ * Rejected: a minion would have to open a listening port it otherwise has no reason for, and a network
35
+ * listener answers as long as the event loop runs, whether or not the minion can still receive work. The
36
+ * heartbeat is written only while the tick consumer is subscribed AND the broker connection is up (see
37
+ * `MinionLivenessHeartbeat` in the minion runtime), which is the thing liveness has to mean here. The
38
+ * `exec` kind stays available for a minion that owns a richer check.
39
+ *
40
+ * ## How the cadence relates to the heartbeat, and why a long tick is safe
41
+ *
42
+ * - `periodSeconds` IS `heartbeat.intervalSec`: probing more often than the file can change only multiplies
43
+ * `exec` cost; probing less often only delays detection.
44
+ * - the probe fails once the heartbeat is `staleAfterSec` old (the schema enforces
45
+ * `staleAfterSec > heartbeat.intervalSec`, so one late write never fails it);
46
+ * - the kubelet restarts after `failureThreshold` consecutive failures, so a stopped loop is restarted
47
+ * `staleAfterSec + (failureThreshold - 1) × periodSeconds` after its last heartbeat, plus at most one
48
+ * period of phase ({@link MinionLivenessProbeTiming.restartAfterLastHeartbeatSec}). With the defaults:
49
+ * 90 + 2 × 30 = 150 s.
50
+ * - a tick handler runs DETACHED from the broker receipt (`ScheduledExecutionRunner.launch`) and the heartbeat
51
+ * is a timer, so a tick that runs for hours keeps the heartbeat fresh as long as it awaits I/O. Only a
52
+ * handler that blocks the event loop for longer than that window is restarted, which is what a liveness
53
+ * probe is for.
54
+ * - boot (the full backend initialization, the apps-manager fetch, the broker subscription) is covered by a
55
+ * `startupProbe` with the same command and a {@link MINION_LIVENESS_STARTUP_BUDGET_SEC} budget, the
56
+ * Kubernetes mechanism for a slow start. A fixed `initialDelaySeconds` would either kill a slow boot or
57
+ * delay detection of every hang for the whole life of the pod.
58
+ */
59
+ /**
60
+ * The environment variables that tell the minion runtime to write its heartbeat, and where and how often.
61
+ *
62
+ * Stamped by the CONTAINER renderers only (the k8s Deployment `env:` and the compose service `environment:`),
63
+ * both from {@link buildMinionLivenessHeartbeatEnv}. A minion run as a host process in local development gets
64
+ * neither and writes nothing, which is right: there is no probe to answer, and several host minions sharing
65
+ * one `/tmp` path would only overwrite each other.
66
+ */
67
+ export const MINION_LIVENESS_HEARTBEAT_ENV_KEYS = {
68
+ FILE_PATH: 'WILDO_MINION_HEARTBEAT_FILE',
69
+ INTERVAL_SEC: 'WILDO_MINION_HEARTBEAT_INTERVAL_SEC',
70
+ };
71
+ /** Seconds the probe command may take. `cat` and `date` finish in milliseconds; this only bounds a wedged exec. */
72
+ export const MINION_LIVENESS_PROBE_TIMEOUT_SEC = 5;
73
+ /**
74
+ * Consecutive failed probes before a restart. The Kubernetes default, kept so that one slow `exec` under
75
+ * memory pressure does not restart a healthy minion; the stale window itself lives in `staleAfterSec`.
76
+ */
77
+ export const MINION_LIVENESS_PROBE_FAILURE_THRESHOLD = 3;
78
+ /**
79
+ * How long a minion may take from container start to its first heartbeat before the `startupProbe` gives up.
80
+ * A minion boots the whole backend runtime and fetches its configuration from apps-manager before it
81
+ * subscribes, so this is minutes rather than the 60 s `initialDelaySeconds` it replaces.
82
+ */
83
+ export const MINION_LIVENESS_STARTUP_BUDGET_SEC = 300;
84
+ /**
85
+ * The parsed liveness contract, or the schema's own defaults when a caller has none. Never a second set of
86
+ * literals: a renderer reached with a partially-populated target gets exactly what an authored-nothing
87
+ * `wildo.minion.config.ts` would have produced.
88
+ */
89
+ export function resolveMinionLiveness(liveness) {
90
+ return liveness ?? MinionLivenessSchema.parse({});
91
+ }
92
+ /** POSIX single-quoting, so an authored path with spaces, `$`, `'`, `:` or `#` reaches `cat` as one argument. */
93
+ function quoteForPosixShell(value) {
94
+ return `'${value.replace(/'/g, `'\\''`)}'`;
95
+ }
96
+ /**
97
+ * The probe command: an argv for an `exec` probe, `exit 0` = alive.
98
+ *
99
+ * For `kind: 'file'` it succeeds only when the heartbeat file exists, holds a whole number of epoch seconds,
100
+ * and that number is less than `staleAfterSec` old. A missing file, an empty or half-written one, or any
101
+ * non-numeric content fails; the non-numeric check is load-bearing, because shell arithmetic reads an
102
+ * identifier as a variable that defaults to 0 instead of failing. For `kind: 'exec'` it is the authored
103
+ * command verbatim.
104
+ */
105
+ export function buildMinionLivenessProbeCommand(input) {
106
+ const liveness = resolveMinionLiveness(input);
107
+ if (liveness.kind === 'exec') {
108
+ // The schema refuses `kind: 'exec'` without a non-empty `execCommand`.
109
+ return [...(liveness.execCommand ?? [])];
110
+ }
111
+ const file = quoteForPosixShell(liveness.filePath);
112
+ return [
113
+ '/bin/sh',
114
+ '-c',
115
+ `t=$(cat ${file} 2>/dev/null) || exit 1; case "$t" in ''|*[!0-9]*) exit 1;; esac; `
116
+ + `[ $(( $(date +%s) - t )) -lt ${liveness.staleAfterSec} ]`,
117
+ ];
118
+ }
119
+ /** The cadence of the liveness probe, the startup probe and the compose healthcheck. See the module header. */
120
+ export function deriveMinionLivenessProbeTiming(input) {
121
+ const liveness = resolveMinionLiveness(input);
122
+ const periodSeconds = liveness.heartbeat.intervalSec;
123
+ return {
124
+ periodSeconds,
125
+ // Kubernetes allows a timeout above the period, but a probe still running when the next is due is noise.
126
+ timeoutSeconds: Math.min(MINION_LIVENESS_PROBE_TIMEOUT_SEC, periodSeconds),
127
+ failureThreshold: MINION_LIVENESS_PROBE_FAILURE_THRESHOLD,
128
+ startupFailureThreshold: Math.max(1, Math.ceil(MINION_LIVENESS_STARTUP_BUDGET_SEC / periodSeconds)),
129
+ restartAfterLastHeartbeatSec: liveness.staleAfterSec + (MINION_LIVENESS_PROBE_FAILURE_THRESHOLD - 1) * periodSeconds,
130
+ };
131
+ }
132
+ /**
133
+ * The container environment that turns the heartbeat on. Empty for `kind: 'exec'`: that probe is the
134
+ * author's own, and a heartbeat nothing reads is a write for nobody.
135
+ */
136
+ export function buildMinionLivenessHeartbeatEnv(input) {
137
+ const liveness = resolveMinionLiveness(input);
138
+ if (liveness.kind !== 'file')
139
+ return {};
140
+ return {
141
+ [MINION_LIVENESS_HEARTBEAT_ENV_KEYS.FILE_PATH]: liveness.filePath,
142
+ [MINION_LIVENESS_HEARTBEAT_ENV_KEYS.INTERVAL_SEC]: String(liveness.heartbeat.intervalSec),
143
+ };
144
+ }
145
+ /**
146
+ * Read the heartbeat settings back in the minion process. `undefined` when the file variable is absent (a
147
+ * host process, or an `exec`-kind minion). Throws on a present-but-malformed value: the probe would fail on it
148
+ * anyway, and a boot error naming the variable is far closer to the cause than a kubelet restart loop.
149
+ */
150
+ export function readMinionLivenessHeartbeatEnv(env) {
151
+ const filePath = env[MINION_LIVENESS_HEARTBEAT_ENV_KEYS.FILE_PATH];
152
+ if (filePath === undefined || filePath === '')
153
+ return undefined;
154
+ const rawInterval = env[MINION_LIVENESS_HEARTBEAT_ENV_KEYS.INTERVAL_SEC];
155
+ const intervalSec = rawInterval !== undefined && /^[1-9][0-9]*$/.test(rawInterval) ? Number(rawInterval) : NaN;
156
+ if (!Number.isSafeInteger(intervalSec)) {
157
+ throw new Error(`${MINION_LIVENESS_HEARTBEAT_ENV_KEYS.INTERVAL_SEC} must be a positive whole number of seconds when `
158
+ + `${MINION_LIVENESS_HEARTBEAT_ENV_KEYS.FILE_PATH} is set (got ${rawInterval === undefined ? 'nothing' : JSON.stringify(rawInterval)}). `
159
+ + 'Both are rendered from `wildo.minion.config.ts > liveness`; re-render the deployment.');
160
+ }
161
+ return { filePath, intervalSec };
162
+ }
163
+ /** The heartbeat file's content: the writer's clock in whole epoch seconds, the unit `date +%s` prints. */
164
+ export function encodeMinionLivenessHeartbeat(nowMs) {
165
+ return `${Math.floor(nowMs / 1000)}\n`;
166
+ }
167
+ //# sourceMappingURL=minion-liveness.contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"minion-liveness.contracts.js","sourceRoot":"","sources":["../../../src/project-config/minion-liveness.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAuB,MAAM,wBAAwB,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,SAAS,EAAE,6BAA6B;IACxC,YAAY,EAAE,qCAAqC;CAC3C,CAAC;AAEX,mHAAmH;AACnH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,CAAC;AAEnD;;;GAGG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,CAAC;AAEzD;;;;GAIG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,GAAG,CAAC;AAoBtD;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAAyB;IAC7D,OAAO,QAAQ,IAAI,oBAAoB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACpD,CAAC;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,CAAC","sourcesContent":["import { MinionLivenessSchema, type MinionLiveness } from './define-minion-config';\n\n/**\n * # Minion liveness: the ONE source both the probe and the heartbeat are derived from\n *\n * A minion has no inbound HTTP surface, so its Kubernetes liveness probe cannot be an `httpGet` the way a\n * backend's `/health` or a worker's `/healthz` is. For `liveness.kind: 'file'` (the default) the contract is a\n * HEARTBEAT FILE: the minion runtime writes it while its work loop is alive, and an `exec` probe reads it.\n *\n * Until #1859 the two halves had no common source and the producer did not exist at all: the schema promised\n * the actor loop \"touches\" the file, the k8s renderer built a `find <file> -mmin -1.5` probe from two\n * hard-coded fallbacks, and nothing in `@wildo-ai/saas-minions-lib` ever wrote the file. Every minion deployed\n * from the generated manifests therefore failed its probe and was restarted by the kubelet forever. Everything\n * the probe and the writer must agree on now lives here:\n *\n * | what | consumed by |\n * |---|---|\n * | the probe command ({@link buildMinionLivenessProbeCommand}) | the k8s `livenessProbe` / `startupProbe`, the compose `healthcheck` |\n * | the probe cadence ({@link deriveMinionLivenessProbeTiming}) | the same three probe declarations |\n * | the heartbeat env ({@link buildMinionLivenessHeartbeatEnv}) | the k8s `env:` block and the compose `environment:` block |\n * | the heartbeat format ({@link encodeMinionLivenessHeartbeat}) | the writer in `@wildo-ai/saas-minions-lib` |\n *\n * ## Why a file the probe READS, rather than a file whose mtime it checks\n *\n * The heartbeat file holds the writer's own clock in whole epoch seconds, and the probe compares it with\n * `date +%s`. The previous probe asked `find <file> -mmin -1.5`. A fractional `-mmin` is a GNU findutils\n * feature; whether the BusyBox `find` in the `node:*-alpine` minion images accepts it was never executed\n * (believed not to), and a probe whose meaning depends on which `find` the image ships cannot be tested off the\n * image. `cat`, `date +%s`, `case` and POSIX `$(( ))` arithmetic are POSIX shell and utilities, which is also\n * what lets the framework EXECUTE the rendered command in its own tests (macOS `/bin/sh`; the BusyBox `ash` run\n * is a stack-check item on #2035).\n *\n * ## Why not an `httpGet` or a `tcpSocket` probe\n *\n * Rejected: a minion would have to open a listening port it otherwise has no reason for, and a network\n * listener answers as long as the event loop runs, whether or not the minion can still receive work. The\n * heartbeat is written only while the tick consumer is subscribed AND the broker connection is up (see\n * `MinionLivenessHeartbeat` in the minion runtime), which is the thing liveness has to mean here. The\n * `exec` kind stays available for a minion that owns a richer check.\n *\n * ## How the cadence relates to the heartbeat, and why a long tick is safe\n *\n * - `periodSeconds` IS `heartbeat.intervalSec`: probing more often than the file can change only multiplies\n * `exec` cost; probing less often only delays detection.\n * - the probe fails once the heartbeat is `staleAfterSec` old (the schema enforces\n * `staleAfterSec > heartbeat.intervalSec`, so one late write never fails it);\n * - the kubelet restarts after `failureThreshold` consecutive failures, so a stopped loop is restarted\n * `staleAfterSec + (failureThreshold - 1) × periodSeconds` after its last heartbeat, plus at most one\n * period of phase ({@link MinionLivenessProbeTiming.restartAfterLastHeartbeatSec}). With the defaults:\n * 90 + 2 × 30 = 150 s.\n * - a tick handler runs DETACHED from the broker receipt (`ScheduledExecutionRunner.launch`) and the heartbeat\n * is a timer, so a tick that runs for hours keeps the heartbeat fresh as long as it awaits I/O. Only a\n * handler that blocks the event loop for longer than that window is restarted, which is what a liveness\n * probe is for.\n * - boot (the full backend initialization, the apps-manager fetch, the broker subscription) is covered by a\n * `startupProbe` with the same command and a {@link MINION_LIVENESS_STARTUP_BUDGET_SEC} budget, the\n * Kubernetes mechanism for a slow start. A fixed `initialDelaySeconds` would either kill a slow boot or\n * delay detection of every hang for the whole life of the pod.\n */\n\n/**\n * The environment variables that tell the minion runtime to write its heartbeat, and where and how often.\n *\n * Stamped by the CONTAINER renderers only (the k8s Deployment `env:` and the compose service `environment:`),\n * both from {@link buildMinionLivenessHeartbeatEnv}. A minion run as a host process in local development gets\n * neither and writes nothing, which is right: there is no probe to answer, and several host minions sharing\n * one `/tmp` path would only overwrite each other.\n */\nexport const MINION_LIVENESS_HEARTBEAT_ENV_KEYS = {\n FILE_PATH: 'WILDO_MINION_HEARTBEAT_FILE',\n INTERVAL_SEC: 'WILDO_MINION_HEARTBEAT_INTERVAL_SEC',\n} as const;\n\n/** Seconds the probe command may take. `cat` and `date` finish in milliseconds; this only bounds a wedged exec. */\nexport const MINION_LIVENESS_PROBE_TIMEOUT_SEC = 5;\n\n/**\n * Consecutive failed probes before a restart. The Kubernetes default, kept so that one slow `exec` under\n * memory pressure does not restart a healthy minion; the stale window itself lives in `staleAfterSec`.\n */\nexport const MINION_LIVENESS_PROBE_FAILURE_THRESHOLD = 3;\n\n/**\n * How long a minion may take from container start to its first heartbeat before the `startupProbe` gives up.\n * A minion boots the whole backend runtime and fetches its configuration from apps-manager before it\n * subscribes, so this is minutes rather than the 60 s `initialDelaySeconds` it replaces.\n */\nexport const MINION_LIVENESS_STARTUP_BUDGET_SEC = 300;\n\n/** The probe cadence every lane declares, derived from one parsed {@link MinionLiveness}. */\nexport interface MinionLivenessProbeTiming {\n /** = `heartbeat.intervalSec`. */\n periodSeconds: number;\n timeoutSeconds: number;\n failureThreshold: number;\n /** `startupProbe.failureThreshold`: enough periods to cover {@link MINION_LIVENESS_STARTUP_BUDGET_SEC}. */\n startupFailureThreshold: number;\n /** Upper bound, before phase, on the time from the last heartbeat to a restart. Documentation and tests. */\n restartAfterLastHeartbeatSec: number;\n}\n\n/** The heartbeat the runtime is asked to write, as read back from its environment. */\nexport interface MinionLivenessHeartbeatSettings {\n filePath: string;\n intervalSec: number;\n}\n\n/**\n * The parsed liveness contract, or the schema's own defaults when a caller has none. Never a second set of\n * literals: a renderer reached with a partially-populated target gets exactly what an authored-nothing\n * `wildo.minion.config.ts` would have produced.\n */\nexport function resolveMinionLiveness(liveness?: MinionLiveness): MinionLiveness {\n return liveness ?? MinionLivenessSchema.parse({});\n}\n\n/** POSIX single-quoting, so an authored path with spaces, `$`, `'`, `:` or `#` reaches `cat` as one argument. */\nfunction quoteForPosixShell(value: string): string {\n return `'${value.replace(/'/g, `'\\\\''`)}'`;\n}\n\n/**\n * The probe command: an argv for an `exec` probe, `exit 0` = alive.\n *\n * For `kind: 'file'` it succeeds only when the heartbeat file exists, holds a whole number of epoch seconds,\n * and that number is less than `staleAfterSec` old. A missing file, an empty or half-written one, or any\n * non-numeric content fails; the non-numeric check is load-bearing, because shell arithmetic reads an\n * identifier as a variable that defaults to 0 instead of failing. For `kind: 'exec'` it is the authored\n * command verbatim.\n */\nexport function buildMinionLivenessProbeCommand(input?: MinionLiveness): string[] {\n const liveness = resolveMinionLiveness(input);\n if (liveness.kind === 'exec') {\n // The schema refuses `kind: 'exec'` without a non-empty `execCommand`.\n return [...(liveness.execCommand ?? [])];\n }\n const file = quoteForPosixShell(liveness.filePath);\n return [\n '/bin/sh',\n '-c',\n `t=$(cat ${file} 2>/dev/null) || exit 1; case \"$t\" in ''|*[!0-9]*) exit 1;; esac; `\n + `[ $(( $(date +%s) - t )) -lt ${liveness.staleAfterSec} ]`,\n ];\n}\n\n/** The cadence of the liveness probe, the startup probe and the compose healthcheck. See the module header. */\nexport function deriveMinionLivenessProbeTiming(input?: MinionLiveness): MinionLivenessProbeTiming {\n const liveness = resolveMinionLiveness(input);\n const periodSeconds = liveness.heartbeat.intervalSec;\n return {\n periodSeconds,\n // Kubernetes allows a timeout above the period, but a probe still running when the next is due is noise.\n timeoutSeconds: Math.min(MINION_LIVENESS_PROBE_TIMEOUT_SEC, periodSeconds),\n failureThreshold: MINION_LIVENESS_PROBE_FAILURE_THRESHOLD,\n startupFailureThreshold: Math.max(1, Math.ceil(MINION_LIVENESS_STARTUP_BUDGET_SEC / periodSeconds)),\n restartAfterLastHeartbeatSec: liveness.staleAfterSec + (MINION_LIVENESS_PROBE_FAILURE_THRESHOLD - 1) * periodSeconds,\n };\n}\n\n/**\n * The container environment that turns the heartbeat on. Empty for `kind: 'exec'`: that probe is the\n * author's own, and a heartbeat nothing reads is a write for nobody.\n */\nexport function buildMinionLivenessHeartbeatEnv(input?: MinionLiveness): Record<string, string> {\n const liveness = resolveMinionLiveness(input);\n if (liveness.kind !== 'file') return {};\n return {\n [MINION_LIVENESS_HEARTBEAT_ENV_KEYS.FILE_PATH]: liveness.filePath,\n [MINION_LIVENESS_HEARTBEAT_ENV_KEYS.INTERVAL_SEC]: String(liveness.heartbeat.intervalSec),\n };\n}\n\n/**\n * Read the heartbeat settings back in the minion process. `undefined` when the file variable is absent (a\n * host process, or an `exec`-kind minion). Throws on a present-but-malformed value: the probe would fail on it\n * anyway, and a boot error naming the variable is far closer to the cause than a kubelet restart loop.\n */\nexport function readMinionLivenessHeartbeatEnv(\n env: Readonly<Record<string, string | undefined>>,\n): MinionLivenessHeartbeatSettings | undefined {\n const filePath = env[MINION_LIVENESS_HEARTBEAT_ENV_KEYS.FILE_PATH];\n if (filePath === undefined || filePath === '') return undefined;\n const rawInterval = env[MINION_LIVENESS_HEARTBEAT_ENV_KEYS.INTERVAL_SEC];\n const intervalSec = rawInterval !== undefined && /^[1-9][0-9]*$/.test(rawInterval) ? Number(rawInterval) : NaN;\n if (!Number.isSafeInteger(intervalSec)) {\n throw new Error(\n `${MINION_LIVENESS_HEARTBEAT_ENV_KEYS.INTERVAL_SEC} must be a positive whole number of seconds when `\n + `${MINION_LIVENESS_HEARTBEAT_ENV_KEYS.FILE_PATH} is set (got ${rawInterval === undefined ? 'nothing' : JSON.stringify(rawInterval)}). `\n + 'Both are rendered from `wildo.minion.config.ts > liveness`; re-render the deployment.',\n );\n }\n return { filePath, intervalSec };\n}\n\n/** The heartbeat file's content: the writer's clock in whole epoch seconds, the unit `date +%s` prints. */\nexport function encodeMinionLivenessHeartbeat(nowMs: number): string {\n return `${Math.floor(nowMs / 1000)}\\n`;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"minion-local-provider-registration.d.ts","sourceRoot":"","sources":["../../../../src/project-config/minion-local-provider-registration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,gFAAgF;AAChF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,GAAG,SAAS,CAAC;CACjF;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC;CACpE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,kBAAkB,GAAG,SAAS,EACrC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,GAAG,SAAS,EAC1E,UAAU,EAAE,MAAM,GACjB,aAAa,CAsBf"}
1
+ {"version":3,"file":"minion-local-provider-registration.d.ts","sourceRoot":"","sources":["../../../src/project-config/minion-local-provider-registration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,gFAAgF;AAChF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,GAAG,SAAS,CAAC;CACjF;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,CAAC;CACpE;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,kBAAkB,GAAG,SAAS,EACrC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC,GAAG,SAAS,EAC1E,UAAU,EAAE,MAAM,GACjB,aAAa,CAsBf"}
@@ -1 +1 @@
1
- {"version":3,"file":"minion-local-provider-registration.js","sourceRoot":"","sources":["../../../../src/project-config/minion-local-provider-registration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAqBH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,KAAqC,EACrC,cAA0E,EAC1E,UAAkB;IAElB,MAAM,QAAQ,GAAG,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACxC,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChE,yEAAyE;QACzE,4EAA4E;QAC5E,iEAAiE;QACjE,OAAO,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAC/E,CAAC;IAED,MAAM,MAAM,GAAyC,EAAE,GAAG,QAAQ,EAAE,CAAC;IACrE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;QAC1D,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC;YACxD,MAAM,IAAI,KAAK,CACb,WAAW,UAAU,+BAA+B,GAAG,+BAA+B;kBACpF,mFAAmF;kBACnF,sFAAsF;kBACtF,kEAAkE,CACrE,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["/**\n * R7 — a minion declaring a provider its application's catalog does not carry.\n *\n * ## This is a REGISTRATION, not a second catalog\n *\n * A minion-local `providers` block once existed and was deliberately removed:\n * authoring moved to `defineSaaSProviders({ scopes })`, with per-minion\n * visibility materialized from `providers.scopes.minions.<name>`. That decision\n * bought ONE source of truth, and the fail-closed secret filtering (R6) is built\n * on it.\n *\n * R7 is satisfied without reversing it. A minion may AUTHOR a fragment beside its\n * own code — the real need, since a provider the application uses nowhere else\n * should not have to be hand-declared in the application's catalog — and that\n * fragment is REGISTERED INTO the catalog at config load. Everything downstream\n * reads the catalog and cannot tell a registered fragment from an\n * application-authored entry.\n *\n * **The consequence that matters:** because a registered fragment IS a catalog\n * entry, its SECRETS arrive through the same single mechanism as every other\n * provider's. Authoring locally creates no second secret channel.\n *\n * ## The catalog is SCOPE-STRUCTURED, which decides this function's shape\n *\n * An earlier revision took a flat `Record<ref, entry>` and merged fragments into\n * it. There is no such object: providers are declared INSIDE scopes\n * (`providers.scopes.minions.<name>.providers`). Registering into the minion's\n * OWN scope is both the correct merge and a strictly better design —\n * **visibility follows authorship for free**, with no separate bookkeeping of who\n * contributed what and no second projection rule.\n *\n * ⚠️ NOT WIRED. The config-load call site is the remaining work.\n */\n\n/** One authored provider entry — its shape belongs to the catalog, not here. */\nexport type ProviderCatalogEntry = Readonly<Record<string, unknown>>;\n\n/**\n * One audience's declared providers, keyed by provider ref.\n *\n * `providers` is OPTIONAL on the way IN and guaranteed on the way OUT: the\n * authored config legitimately omits it (a scope that declares nothing), and a\n * contract that demanded it would push the `?? {}` onto every call site — which\n * is where it would eventually be written as `?? undefined` by someone in a hurry.\n */\nexport interface ProviderScopeInput {\n readonly providers?: Readonly<Record<string, ProviderCatalogEntry>> | undefined;\n}\n\nexport interface ProviderScope {\n readonly providers: Readonly<Record<string, ProviderCatalogEntry>>;\n}\n\n/**\n * Merge a minion's locally-authored providers into ITS OWN scope.\n *\n * ## Within-scope collisions REFUSE; cross-scope reuse is NOT a collision\n *\n * If the application already declares a ref in THIS minion's scope, this throws\n * rather than picking a winner. Both precedence rules are defensible, which is\n * the sign neither may be chosen silently: whichever wins, the provider a\n * reviewer reads is not the provider that runs.\n *\n * Two DIFFERENT minions authoring the same ref in their own scopes is explicitly\n * ALLOWED. An earlier revision refused it, reasoning from a flat catalog where\n * one ref meant one entry. In a scope-structured catalog the scopes are already\n * independent — an application may name the same ref in two scopes today — so\n * refusing it would have imposed a global-uniqueness rule the surrounding model\n * does not have, on the one audience least able to coordinate: minions authored\n * in separate packages by separate people.\n */\nexport function registerMinionLocalProviders(\n scope: ProviderScopeInput | undefined,\n localProviders: Readonly<Record<string, ProviderCatalogEntry>> | undefined,\n minionName: string,\n): ProviderScope {\n const declared = scope?.providers ?? {};\n if (!localProviders || Object.keys(localProviders).length === 0) {\n // Preserved verbatim, including an absent scope becoming an empty one: a\n // minion that authored nothing must not acquire a scope it never had, and a\n // minion that HAS a scope must not lose it by declaring nothing.\n return scope?.providers ? { providers: scope.providers } : { providers: {} };\n }\n\n const merged: Record<string, ProviderCatalogEntry> = { ...declared };\n for (const [ref, entry] of Object.entries(localProviders)) {\n if (Object.prototype.hasOwnProperty.call(declared, ref)) {\n throw new Error(\n `Minion '${minionName}' authors a local provider '${ref}' that its application scope `\n + `already declares. Refusing to choose between them: whichever won, the provider a `\n + `reviewer reads in the catalog would not be the provider that runs. Rename the local `\n + `fragment, or remove it and use the one the application declares.`,\n );\n }\n merged[ref] = entry;\n }\n return { providers: merged };\n}\n"]}
1
+ {"version":3,"file":"minion-local-provider-registration.js","sourceRoot":"","sources":["../../../src/project-config/minion-local-provider-registration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAqBH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,4BAA4B,CAC1C,KAAqC,EACrC,cAA0E,EAC1E,UAAkB;IAElB,MAAM,QAAQ,GAAG,KAAK,EAAE,SAAS,IAAI,EAAE,CAAC;IACxC,IAAI,CAAC,cAAc,IAAI,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChE,yEAAyE;QACzE,4EAA4E;QAC5E,iEAAiE;QACjE,OAAO,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;IAC/E,CAAC;IAED,MAAM,MAAM,GAAyC,EAAE,GAAG,QAAQ,EAAE,CAAC;IACrE,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;QAC1D,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE,CAAC;YACxD,MAAM,IAAI,KAAK,CACb,WAAW,UAAU,+BAA+B,GAAG,+BAA+B;kBACpF,mFAAmF;kBACnF,sFAAsF;kBACtF,kEAAkE,CACrE,CAAC;QACJ,CAAC;QACD,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACtB,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AAC/B,CAAC","sourcesContent":["/**\n * R7 — a minion declaring a provider its application's catalog does not carry.\n *\n * ## This is a REGISTRATION, not a second catalog\n *\n * A minion-local `providers` block once existed and was deliberately removed:\n * authoring moved to `defineSaaSProviders({ scopes })`, with per-minion\n * visibility materialized from `providers.scopes.minions.<name>`. That decision\n * bought ONE source of truth, and the fail-closed secret filtering (R6) is built\n * on it.\n *\n * R7 is satisfied without reversing it. A minion may AUTHOR a fragment beside its\n * own code — the real need, since a provider the application uses nowhere else\n * should not have to be hand-declared in the application's catalog — and that\n * fragment is REGISTERED INTO the catalog at config load. Everything downstream\n * reads the catalog and cannot tell a registered fragment from an\n * application-authored entry.\n *\n * **The consequence that matters:** because a registered fragment IS a catalog\n * entry, its SECRETS arrive through the same single mechanism as every other\n * provider's. Authoring locally creates no second secret channel.\n *\n * ## The catalog is SCOPE-STRUCTURED, which decides this function's shape\n *\n * An earlier revision took a flat `Record<ref, entry>` and merged fragments into\n * it. There is no such object: providers are declared INSIDE scopes\n * (`providers.scopes.minions.<name>.providers`). Registering into the minion's\n * OWN scope is both the correct merge and a strictly better design —\n * **visibility follows authorship for free**, with no separate bookkeeping of who\n * contributed what and no second projection rule.\n *\n * ⚠️ NOT WIRED. The config-load call site is the remaining work.\n */\n\n/** One authored provider entry — its shape belongs to the catalog, not here. */\nexport type ProviderCatalogEntry = Readonly<Record<string, unknown>>;\n\n/**\n * One audience's declared providers, keyed by provider ref.\n *\n * `providers` is OPTIONAL on the way IN and guaranteed on the way OUT: the\n * authored config legitimately omits it (a scope that declares nothing), and a\n * contract that demanded it would push the `?? {}` onto every call site — which\n * is where it would eventually be written as `?? undefined` by someone in a hurry.\n */\nexport interface ProviderScopeInput {\n readonly providers?: Readonly<Record<string, ProviderCatalogEntry>> | undefined;\n}\n\nexport interface ProviderScope {\n readonly providers: Readonly<Record<string, ProviderCatalogEntry>>;\n}\n\n/**\n * Merge a minion's locally-authored providers into ITS OWN scope.\n *\n * ## Within-scope collisions REFUSE; cross-scope reuse is NOT a collision\n *\n * If the application already declares a ref in THIS minion's scope, this throws\n * rather than picking a winner. Both precedence rules are defensible, which is\n * the sign neither may be chosen silently: whichever wins, the provider a\n * reviewer reads is not the provider that runs.\n *\n * Two DIFFERENT minions authoring the same ref in their own scopes is explicitly\n * ALLOWED. An earlier revision refused it, reasoning from a flat catalog where\n * one ref meant one entry. In a scope-structured catalog the scopes are already\n * independent — an application may name the same ref in two scopes today — so\n * refusing it would have imposed a global-uniqueness rule the surrounding model\n * does not have, on the one audience least able to coordinate: minions authored\n * in separate packages by separate people.\n */\nexport function registerMinionLocalProviders(\n scope: ProviderScopeInput | undefined,\n localProviders: Readonly<Record<string, ProviderCatalogEntry>> | undefined,\n minionName: string,\n): ProviderScope {\n const declared = scope?.providers ?? {};\n if (!localProviders || Object.keys(localProviders).length === 0) {\n // Preserved verbatim, including an absent scope becoming an empty one: a\n // minion that authored nothing must not acquire a scope it never had, and a\n // minion that HAS a scope must not lose it by declaring nothing.\n return scope?.providers ? { providers: scope.providers } : { providers: {} };\n }\n\n const merged: Record<string, ProviderCatalogEntry> = { ...declared };\n for (const [ref, entry] of Object.entries(localProviders)) {\n if (Object.prototype.hasOwnProperty.call(declared, ref)) {\n throw new Error(\n `Minion '${minionName}' authors a local provider '${ref}' that its application scope `\n + `already declares. Refusing to choose between them: whichever won, the provider a `\n + `reviewer reads in the catalog would not be the provider that runs. Rename the local `\n + `fragment, or remove it and use the one the application declares.`,\n );\n }\n merged[ref] = entry;\n }\n return { providers: merged };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"npm-version-range.d.ts","sourceRoot":"","sources":["../../../../src/project-config/npm-version-range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAyIH;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAkBrG"}
1
+ {"version":3,"file":"npm-version-range.d.ts","sourceRoot":"","sources":["../../../src/project-config/npm-version-range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAiKH;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAkBrG"}
@@ -57,6 +57,24 @@ function compare(left, right) {
57
57
  }
58
58
  return 0;
59
59
  }
60
+ /**
61
+ * The primitive comparator operators every range desugars to. Caret, tilde, X-range and hyphen ranges are SUGAR:
62
+ * {@link comparatorsOf} expands each into these, so {@link holds} only ever decides one of five comparisons. The
63
+ * values are npm's own spellings, which is what lets a written `<=1.2.3` be read straight into a member.
64
+ */
65
+ var NpmComparatorOperator;
66
+ (function (NpmComparatorOperator) {
67
+ NpmComparatorOperator["LESS_THAN"] = "<";
68
+ NpmComparatorOperator["LESS_THAN_OR_EQUAL"] = "<=";
69
+ NpmComparatorOperator["GREATER_THAN"] = ">";
70
+ NpmComparatorOperator["GREATER_THAN_OR_EQUAL"] = ">=";
71
+ /** Exact match — also what a bare full version (`1.2.3`, no operator) means. */
72
+ NpmComparatorOperator["EQUAL"] = "=";
73
+ })(NpmComparatorOperator || (NpmComparatorOperator = {}));
74
+ /** The member a written primitive operator names, or `undefined` for sugar (`^`, `~`) and anything else. */
75
+ function primitiveOperatorOf(text) {
76
+ return Object.values(NpmComparatorOperator).includes(text) ? text : undefined;
77
+ }
60
78
  const isWildcard = (part) => part === undefined || part === 'x' || part === 'X' || part === '*';
61
79
  /** A partial `major.minor.patch` with its wildcards, or `undefined` when the text is not one. */
62
80
  function parsePartial(text) {
@@ -80,44 +98,49 @@ function comparatorsOf(token) {
80
98
  return undefined;
81
99
  const { major, minor, patch, prerelease } = partial;
82
100
  if (major === undefined)
83
- return operator === '<' || operator === '>' ? [{ operator: '<', version: version(0, 0, 0, ['0']) }] : [];
101
+ return operator === NpmComparatorOperator.LESS_THAN || operator === NpmComparatorOperator.GREATER_THAN
102
+ ? [{ operator: NpmComparatorOperator.LESS_THAN, version: version(0, 0, 0, ['0']) }]
103
+ : [];
84
104
  if (operator === '^') {
85
105
  const lower = version(major, minor ?? 0, patch ?? 0, prerelease);
86
106
  const upper = major > 0 || minor === undefined ? version(major + 1, 0, 0, ['0'])
87
107
  : minor > 0 || patch === undefined ? version(0, minor + 1, 0, ['0'])
88
108
  : version(0, 0, patch + 1, ['0']);
89
- return [{ operator: '>=', version: lower }, { operator: '<', version: upper }];
109
+ return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: lower }, { operator: NpmComparatorOperator.LESS_THAN, version: upper }];
90
110
  }
91
111
  if (operator === '~' || operator === '~>') {
92
112
  const lower = version(major, minor ?? 0, patch ?? 0, prerelease);
93
113
  const upper = minor === undefined ? version(major + 1, 0, 0, ['0']) : version(major, minor + 1, 0, ['0']);
94
- return [{ operator: '>=', version: lower }, { operator: '<', version: upper }];
114
+ return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: lower }, { operator: NpmComparatorOperator.LESS_THAN, version: upper }];
95
115
  }
96
116
  // An X-range: the wildcard positions widen the comparator to the whole span they cover.
97
117
  if (minor === undefined || patch === undefined) {
98
118
  const lower = version(major, minor ?? 0, 0);
99
119
  const upper = minor === undefined ? version(major + 1, 0, 0, ['0']) : version(major, minor + 1, 0, ['0']);
100
- switch (operator) {
101
- case '':
102
- case '=': return [{ operator: '>=', version: lower }, { operator: '<', version: upper }];
103
- case '>=': return [{ operator: '>=', version: lower }];
104
- case '<': return [{ operator: '<', version: lower }];
120
+ // A bare X-range (no operator) means the whole span, exactly as `=` does.
121
+ switch (operator === '' ? NpmComparatorOperator.EQUAL : primitiveOperatorOf(operator)) {
122
+ case NpmComparatorOperator.EQUAL:
123
+ return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: lower }, { operator: NpmComparatorOperator.LESS_THAN, version: upper }];
124
+ case NpmComparatorOperator.GREATER_THAN_OR_EQUAL: return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: lower }];
125
+ case NpmComparatorOperator.LESS_THAN: return [{ operator: NpmComparatorOperator.LESS_THAN, version: lower }];
105
126
  // No `-0` here, unlike the upper bounds: node-semver reads `>1.2` as `>=1.3.0`, which admits no 1.3.0 prerelease.
106
- case '>': return [{ operator: '>=', version: version(upper.major, upper.minor, upper.patch) }];
107
- case '<=': return [{ operator: '<', version: upper }];
127
+ case NpmComparatorOperator.GREATER_THAN:
128
+ return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: version(upper.major, upper.minor, upper.patch) }];
129
+ case NpmComparatorOperator.LESS_THAN_OR_EQUAL: return [{ operator: NpmComparatorOperator.LESS_THAN, version: upper }];
108
130
  default: return undefined;
109
131
  }
110
132
  }
111
- return [{ operator: (operator === '' ? '=' : operator), version: version(major, minor, patch, prerelease) }];
133
+ const primitive = operator === '' ? NpmComparatorOperator.EQUAL : primitiveOperatorOf(operator);
134
+ return primitive === undefined ? undefined : [{ operator: primitive, version: version(major, minor, patch, prerelease) }];
112
135
  }
113
136
  function holds(installed, comparator) {
114
137
  const order = compare(installed, comparator.version);
115
138
  switch (comparator.operator) {
116
- case '<': return order < 0;
117
- case '<=': return order <= 0;
118
- case '>': return order > 0;
119
- case '>=': return order >= 0;
120
- case '=': return order === 0;
139
+ case NpmComparatorOperator.LESS_THAN: return order < 0;
140
+ case NpmComparatorOperator.LESS_THAN_OR_EQUAL: return order <= 0;
141
+ case NpmComparatorOperator.GREATER_THAN: return order > 0;
142
+ case NpmComparatorOperator.GREATER_THAN_OR_EQUAL: return order >= 0;
143
+ case NpmComparatorOperator.EQUAL: return order === 0;
121
144
  }
122
145
  }
123
146
  /** One `||` alternative: its comparators, or `undefined` when a token is unreadable. */
@@ -1 +1 @@
1
- {"version":3,"file":"npm-version-range.js","sourceRoot":"","sources":["../../../../src/project-config/npm-version-range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH,sGAAsG;AACtG,MAAM,MAAM,GAAG,eAAe,CAAC;AAC/B,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,+CAA+C,CAAC,CAAC;AACxH,kFAAkF;AAClF,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,2HAA2H,CAAC,CAAC;AAEhK,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACrC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,C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AU,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACnJ,SAAS;QACX,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * Whether an installed version satisfies an npm version range (#1731) — the one question `wildo config sync` asks of\n * an augmentation's peer range on the package that ships its base provider.\n *\n * Written here rather than taken from the `semver` package because this library has no dependency on it and the\n * question is small; what is implemented is the range grammar npm documents, and anything outside it is UNREAD —\n * `undefined` — never guessed, so the caller refuses a range it cannot read instead of admitting it.\n *\n * spec-cite: https://docs.npmjs.com/cli/v10/using-npm/semver — \"Ranges\": a range set is comparator sets joined by\n * `||`; a comparator set is space-separated comparators, all of which must hold; operators `<`, `<=`, `>`, `>=`, `=`;\n * X-ranges (`*`, `x`, `1.x`, `1.2`), tilde and caret ranges, and hyphen ranges; a prerelease version satisfies a set\n * only when a comparator in it names a prerelease of the same major.minor.patch. Fetched 2026-09-29 (the grammar is\n * the node-semver README's, which that page reproduces).\n */\n\ninterface Version {\n readonly major: number;\n readonly minor: number;\n readonly patch: number;\n readonly prerelease: readonly string[];\n}\n\n/** A numeric identifier: no leading zero (`01` is not a version number, as node-semver also says). */\nconst NUMBER = '(0|[1-9]\\\\d*)';\nconst VERSION_PATTERN = new RegExp(`^v?${NUMBER}\\\\.${NUMBER}\\\\.${NUMBER}(?:-([0-9A-Za-z.-]+))?(?:\\\\+[0-9A-Za-z.-]+)?$`);\n/** A partial version as a range may write it: `1`, `1.2`, `1.x`, `1.2.*`, `*`. */\nconst PARTIAL_PATTERN = new RegExp(`^v?(0|[1-9]\\\\d*|[xX*])(?:\\\\.(0|[1-9]\\\\d*|[xX*]))?(?:\\\\.(0|[1-9]\\\\d*|[xX*]))?(?:-([0-9A-Za-z.-]+))?(?:\\\\+[0-9A-Za-z.-]+)?$`);\n\nfunction parseVersion(text: string): Version | undefined {\n const match = VERSION_PATTERN.exec(text.trim());\n if (match === null) return undefined;\n return { major: Number(match[1]), minor: Number(match[2]), patch: Number(match[3]), prerelease: match[4] === undefined ? [] : match[4].split('.') };\n}\n\nfunction compareIdentifiers(left: string, right: string): number {\n const leftNumeric = /^\\d+$/.test(left);\n const rightNumeric = /^\\d+$/.test(right);\n if (leftNumeric && rightNumeric) return Number(left) - Number(right);\n if (leftNumeric) return -1;\n if (rightNumeric) return 1;\n return left < right ? -1 : left > right ? 1 : 0;\n}\n\nfunction compare(left: Version, right: Version): number {\n if (left.major !== right.major) return left.major - right.major;\n if (left.minor !== right.minor) return left.minor - right.minor;\n if (left.patch !== right.patch) return left.patch - right.patch;\n // A version with a prerelease sorts BEFORE the same version without one.\n if (left.prerelease.length === 0 || right.prerelease.length === 0) return right.prerelease.length - left.prerelease.length;\n for (let index = 0; index < Math.max(left.prerelease.length, right.prerelease.length); index += 1) {\n const l = left.prerelease[index];\n const r = right.prerelease[index];\n if (l === undefined) return -1;\n if (r === undefined) return 1;\n const order = compareIdentifiers(l, r);\n if (order !== 0) return order;\n }\n return 0;\n}\n\ntype Operator = '<' | '<=' | '>' | '>=' | '=';\ninterface Comparator { readonly operator: Operator; readonly version: Version }\n\nconst isWildcard = (part: string | undefined): boolean => part === undefined || part === 'x' || part === 'X' || part === '*';\n\n/** A partial `major.minor.patch` with its wildcards, or `undefined` when the text is not one. */\nfunction parsePartial(text: string): { major?: number; minor?: number; patch?: number; prerelease: readonly string[] } | undefined {\n const match = PARTIAL_PATTERN.exec(text);\n if (match === null) return undefined;\n const major = isWildcard(match[1]) ? undefined : Number(match[1]);\n const minor = major === undefined || isWildcard(match[2]) ? undefined : Number(match[2]);\n const patch = minor === undefined || isWildcard(match[3]) ? undefined : Number(match[3]);\n return { major, minor, patch, prerelease: patch === undefined || match[4] === undefined ? [] : match[4].split('.') };\n}\n\nconst version = (major: number, minor: number, patch: number, prerelease: readonly string[] = []): Version => ({ major, minor, patch, prerelease });\n\n/** The comparators one range token stands for, or `undefined` when the token is not in the grammar. */\nfunction comparatorsOf(token: string): Comparator[] | undefined {\n const operatorMatch = /^(<=|>=|<|>|=|\\^|~>?)?\\s*(.*)$/.exec(token);\n if (operatorMatch === null) return undefined;\n const operator = operatorMatch[1] ?? '';\n const partial = parsePartial(operatorMatch[2]!);\n if (partial === undefined) return undefined;\n const { major, minor, patch, prerelease } = partial;\n\n if (major === undefined) return operator === '<' || operator === '>' ? [{ operator: '<', version: version(0, 0, 0, ['0']) }] : [];\n if (operator === '^') {\n const lower = version(major, minor ?? 0, patch ?? 0, prerelease);\n const upper = major > 0 || minor === undefined ? version(major + 1, 0, 0, ['0'])\n : minor > 0 || patch === undefined ? version(0, minor + 1, 0, ['0'])\n : version(0, 0, patch + 1, ['0']);\n return [{ operator: '>=', version: lower }, { operator: '<', version: upper }];\n }\n if (operator === '~' || operator === '~>') {\n const lower = version(major, minor ?? 0, patch ?? 0, prerelease);\n const upper = minor === undefined ? version(major + 1, 0, 0, ['0']) : version(major, minor + 1, 0, ['0']);\n return [{ operator: '>=', version: lower }, { operator: '<', version: upper }];\n }\n // An X-range: the wildcard positions widen the comparator to the whole span they cover.\n if (minor === undefined || patch === undefined) {\n const lower = version(major, minor ?? 0, 0);\n const upper = minor === undefined ? version(major + 1, 0, 0, ['0']) : version(major, minor + 1, 0, ['0']);\n switch (operator) {\n case '': case '=': return [{ operator: '>=', version: lower }, { operator: '<', version: upper }];\n case '>=': return [{ operator: '>=', version: lower }];\n case '<': return [{ operator: '<', version: lower }];\n // No `-0` here, unlike the upper bounds: node-semver reads `>1.2` as `>=1.3.0`, which admits no 1.3.0 prerelease.\n case '>': return [{ operator: '>=', version: version(upper.major, upper.minor, upper.patch) }];\n case '<=': return [{ operator: '<', version: upper }];\n default: return undefined;\n }\n }\n return [{ operator: (operator === '' ? '=' : operator) as Operator, version: version(major, minor, patch, prerelease) }];\n}\n\nfunction holds(installed: Version, comparator: Comparator): boolean {\n const order = compare(installed, comparator.version);\n switch (comparator.operator) {\n case '<': return order < 0;\n case '<=': return order <= 0;\n case '>': return order > 0;\n case '>=': return order >= 0;\n case '=': return order === 0;\n }\n}\n\n/** One `||` alternative: its comparators, or `undefined` when a token is unreadable. */\nfunction comparatorSetOf(text: string): Comparator[] | undefined {\n const hyphen = /^\\s*(\\S+)\\s+-\\s+(\\S+)\\s*$/.exec(text);\n if (hyphen !== null) {\n const from = comparatorsOf(`>=${hyphen[1]}`);\n const to = parsePartial(hyphen[2]!);\n if (from === undefined || to === undefined) return undefined;\n const upper = to.major === undefined ? [] : to.minor === undefined ? comparatorsOf(`<${to.major + 1}.0.0-0`)\n : to.patch === undefined ? comparatorsOf(`<${to.major}.${to.minor + 1}.0-0`) : comparatorsOf(`<=${hyphen[2]}`);\n return upper === undefined ? undefined : [...from, ...upper];\n }\n // An operator may be written apart from its version (`>= 1.2.3`); join them before splitting on whitespace. Only an\n // operator that starts a token and is followed by a version is joined, so `> = 1.2.3` stays two tokens and is unread.\n const tokens = text.trim().replace(/(^|\\s)(<=|>=|<|>|=|\\^|~>?)\\s+(?=[vV0-9xX*])/g, '$1$2').split(/\\s+/).filter((token) => token.length > 0);\n const comparators: Comparator[] = [];\n for (const token of tokens) {\n const expanded = comparatorsOf(token);\n if (expanded === undefined) return undefined;\n comparators.push(...expanded);\n }\n return comparators;\n}\n\n/**\n * Whether `installedVersion` satisfies `range`: `true`, `false`, or `undefined` when either cannot be read — the range\n * is unread when ANY of its `||` alternatives is.\n *\n * A prerelease version satisfies an alternative only when one of its comparators names a prerelease of the same\n * `major.minor.patch` — npm's rule, so `^1.2.0` does not admit `1.3.0-beta.1`.\n */\nexport function satisfiesNpmVersionRange(installedVersion: string, range: string): boolean | undefined {\n const installed = parseVersion(installedVersion);\n if (installed === undefined) return undefined;\n const alternatives = range.trim() === '' ? [''] : range.split('||');\n // Every alternative is parsed first: a range with ANY unreadable alternative is unread as a whole, whichever side\n // of the `||` it sits on — a satisfied alternative beside one we cannot read is not evidence the author meant it.\n const parsed = alternatives.map((alternative) => comparatorSetOf(alternative));\n if (parsed.some((comparators) => comparators === undefined)) return undefined;\n\n for (const comparators of parsed as Comparator[][]) {\n if (!comparators.every((comparator) => holds(installed, comparator))) continue;\n if (installed.prerelease.length > 0 && !comparators.some((comparator) => comparator.version.prerelease.length > 0\n && comparator.version.major === installed.major && comparator.version.minor === installed.minor && comparator.version.patch === installed.patch)) {\n continue;\n }\n return true;\n }\n return false;\n}\n"]}
1
+ {"version":3,"file":"npm-version-range.js","sourceRoot":"","sources":["../../../src/project-config/npm-version-range.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH,sGAAsG;AACtG,MAAM,MAAM,GAAG,eAAe,CAAC;AAC/B,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,MAAM,MAAM,MAAM,MAAM,MAAM,MAAM,+CAA+C,CAAC,CAAC;AACxH,kFAAkF;AAClF,MAAM,eAAe,GAAG,IAAI,MAAM,CAAC,2HAA2H,CAAC,CAAC;AAEhK,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACrC,OAAO,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;AACtJ,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAY,EAAE,KAAa;IACrD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACvC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AC/E,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,KAAK,SAAS,CAAC;QAAE,OAAO,SAAS,CAAC;IAE9E,KAAK,MAAM,WAAW,IAAI,MAAwB,EAAE,CAAC;QACnD,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YAAE,SAAS;QAC/E,IAAI,SAAS,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;eAC5G,UAAU,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,IAAI,UAAU,CAAC,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;YACnJ,SAAS;QACX,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["/**\n * Whether an installed version satisfies an npm version range (#1731) — the one question `wildo config sync` asks of\n * an augmentation's peer range on the package that ships its base provider.\n *\n * Written here rather than taken from the `semver` package because this library has no dependency on it and the\n * question is small; what is implemented is the range grammar npm documents, and anything outside it is UNREAD —\n * `undefined` — never guessed, so the caller refuses a range it cannot read instead of admitting it.\n *\n * spec-cite: https://docs.npmjs.com/cli/v10/using-npm/semver — \"Ranges\": a range set is comparator sets joined by\n * `||`; a comparator set is space-separated comparators, all of which must hold; operators `<`, `<=`, `>`, `>=`, `=`;\n * X-ranges (`*`, `x`, `1.x`, `1.2`), tilde and caret ranges, and hyphen ranges; a prerelease version satisfies a set\n * only when a comparator in it names a prerelease of the same major.minor.patch. Fetched 2026-09-29 (the grammar is\n * the node-semver README's, which that page reproduces).\n */\n\ninterface Version {\n readonly major: number;\n readonly minor: number;\n readonly patch: number;\n readonly prerelease: readonly string[];\n}\n\n/** A numeric identifier: no leading zero (`01` is not a version number, as node-semver also says). */\nconst NUMBER = '(0|[1-9]\\\\d*)';\nconst VERSION_PATTERN = new RegExp(`^v?${NUMBER}\\\\.${NUMBER}\\\\.${NUMBER}(?:-([0-9A-Za-z.-]+))?(?:\\\\+[0-9A-Za-z.-]+)?$`);\n/** A partial version as a range may write it: `1`, `1.2`, `1.x`, `1.2.*`, `*`. */\nconst PARTIAL_PATTERN = new RegExp(`^v?(0|[1-9]\\\\d*|[xX*])(?:\\\\.(0|[1-9]\\\\d*|[xX*]))?(?:\\\\.(0|[1-9]\\\\d*|[xX*]))?(?:-([0-9A-Za-z.-]+))?(?:\\\\+[0-9A-Za-z.-]+)?$`);\n\nfunction parseVersion(text: string): Version | undefined {\n const match = VERSION_PATTERN.exec(text.trim());\n if (match === null) return undefined;\n return { major: Number(match[1]), minor: Number(match[2]), patch: Number(match[3]), prerelease: match[4] === undefined ? [] : match[4].split('.') };\n}\n\nfunction compareIdentifiers(left: string, right: string): number {\n const leftNumeric = /^\\d+$/.test(left);\n const rightNumeric = /^\\d+$/.test(right);\n if (leftNumeric && rightNumeric) return Number(left) - Number(right);\n if (leftNumeric) return -1;\n if (rightNumeric) return 1;\n return left < right ? -1 : left > right ? 1 : 0;\n}\n\nfunction compare(left: Version, right: Version): number {\n if (left.major !== right.major) return left.major - right.major;\n if (left.minor !== right.minor) return left.minor - right.minor;\n if (left.patch !== right.patch) return left.patch - right.patch;\n // A version with a prerelease sorts BEFORE the same version without one.\n if (left.prerelease.length === 0 || right.prerelease.length === 0) return right.prerelease.length - left.prerelease.length;\n for (let index = 0; index < Math.max(left.prerelease.length, right.prerelease.length); index += 1) {\n const l = left.prerelease[index];\n const r = right.prerelease[index];\n if (l === undefined) return -1;\n if (r === undefined) return 1;\n const order = compareIdentifiers(l, r);\n if (order !== 0) return order;\n }\n return 0;\n}\n\n/**\n * The primitive comparator operators every range desugars to. Caret, tilde, X-range and hyphen ranges are SUGAR:\n * {@link comparatorsOf} expands each into these, so {@link holds} only ever decides one of five comparisons. The\n * values are npm's own spellings, which is what lets a written `<=1.2.3` be read straight into a member.\n */\nenum NpmComparatorOperator {\n LESS_THAN = '<',\n LESS_THAN_OR_EQUAL = '<=',\n GREATER_THAN = '>',\n GREATER_THAN_OR_EQUAL = '>=',\n /** Exact match — also what a bare full version (`1.2.3`, no operator) means. */\n EQUAL = '=',\n}\n\n/** The member a written primitive operator names, or `undefined` for sugar (`^`, `~`) and anything else. */\nfunction primitiveOperatorOf(text: string): NpmComparatorOperator | undefined {\n return (Object.values(NpmComparatorOperator) as string[]).includes(text) ? (text as NpmComparatorOperator) : undefined;\n}\n\ninterface Comparator { readonly operator: NpmComparatorOperator; readonly version: Version }\n\nconst isWildcard = (part: string | undefined): boolean => part === undefined || part === 'x' || part === 'X' || part === '*';\n\n/** A partial `major.minor.patch` with its wildcards, or `undefined` when the text is not one. */\nfunction parsePartial(text: string): { major?: number; minor?: number; patch?: number; prerelease: readonly string[] } | undefined {\n const match = PARTIAL_PATTERN.exec(text);\n if (match === null) return undefined;\n const major = isWildcard(match[1]) ? undefined : Number(match[1]);\n const minor = major === undefined || isWildcard(match[2]) ? undefined : Number(match[2]);\n const patch = minor === undefined || isWildcard(match[3]) ? undefined : Number(match[3]);\n return { major, minor, patch, prerelease: patch === undefined || match[4] === undefined ? [] : match[4].split('.') };\n}\n\nconst version = (major: number, minor: number, patch: number, prerelease: readonly string[] = []): Version => ({ major, minor, patch, prerelease });\n\n/** The comparators one range token stands for, or `undefined` when the token is not in the grammar. */\nfunction comparatorsOf(token: string): Comparator[] | undefined {\n const operatorMatch = /^(<=|>=|<|>|=|\\^|~>?)?\\s*(.*)$/.exec(token);\n if (operatorMatch === null) return undefined;\n const operator = operatorMatch[1] ?? '';\n const partial = parsePartial(operatorMatch[2]!);\n if (partial === undefined) return undefined;\n const { major, minor, patch, prerelease } = partial;\n\n if (major === undefined) return operator === NpmComparatorOperator.LESS_THAN || operator === NpmComparatorOperator.GREATER_THAN\n ? [{ operator: NpmComparatorOperator.LESS_THAN, version: version(0, 0, 0, ['0']) }]\n : [];\n if (operator === '^') {\n const lower = version(major, minor ?? 0, patch ?? 0, prerelease);\n const upper = major > 0 || minor === undefined ? version(major + 1, 0, 0, ['0'])\n : minor > 0 || patch === undefined ? version(0, minor + 1, 0, ['0'])\n : version(0, 0, patch + 1, ['0']);\n return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: lower }, { operator: NpmComparatorOperator.LESS_THAN, version: upper }];\n }\n if (operator === '~' || operator === '~>') {\n const lower = version(major, minor ?? 0, patch ?? 0, prerelease);\n const upper = minor === undefined ? version(major + 1, 0, 0, ['0']) : version(major, minor + 1, 0, ['0']);\n return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: lower }, { operator: NpmComparatorOperator.LESS_THAN, version: upper }];\n }\n // An X-range: the wildcard positions widen the comparator to the whole span they cover.\n if (minor === undefined || patch === undefined) {\n const lower = version(major, minor ?? 0, 0);\n const upper = minor === undefined ? version(major + 1, 0, 0, ['0']) : version(major, minor + 1, 0, ['0']);\n // A bare X-range (no operator) means the whole span, exactly as `=` does.\n switch (operator === '' ? NpmComparatorOperator.EQUAL : primitiveOperatorOf(operator)) {\n case NpmComparatorOperator.EQUAL:\n return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: lower }, { operator: NpmComparatorOperator.LESS_THAN, version: upper }];\n case NpmComparatorOperator.GREATER_THAN_OR_EQUAL: return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: lower }];\n case NpmComparatorOperator.LESS_THAN: return [{ operator: NpmComparatorOperator.LESS_THAN, version: lower }];\n // No `-0` here, unlike the upper bounds: node-semver reads `>1.2` as `>=1.3.0`, which admits no 1.3.0 prerelease.\n case NpmComparatorOperator.GREATER_THAN:\n return [{ operator: NpmComparatorOperator.GREATER_THAN_OR_EQUAL, version: version(upper.major, upper.minor, upper.patch) }];\n case NpmComparatorOperator.LESS_THAN_OR_EQUAL: return [{ operator: NpmComparatorOperator.LESS_THAN, version: upper }];\n default: return undefined;\n }\n }\n const primitive = operator === '' ? NpmComparatorOperator.EQUAL : primitiveOperatorOf(operator);\n return primitive === undefined ? undefined : [{ operator: primitive, version: version(major, minor, patch, prerelease) }];\n}\n\nfunction holds(installed: Version, comparator: Comparator): boolean {\n const order = compare(installed, comparator.version);\n switch (comparator.operator) {\n case NpmComparatorOperator.LESS_THAN: return order < 0;\n case NpmComparatorOperator.LESS_THAN_OR_EQUAL: return order <= 0;\n case NpmComparatorOperator.GREATER_THAN: return order > 0;\n case NpmComparatorOperator.GREATER_THAN_OR_EQUAL: return order >= 0;\n case NpmComparatorOperator.EQUAL: return order === 0;\n }\n}\n\n/** One `||` alternative: its comparators, or `undefined` when a token is unreadable. */\nfunction comparatorSetOf(text: string): Comparator[] | undefined {\n const hyphen = /^\\s*(\\S+)\\s+-\\s+(\\S+)\\s*$/.exec(text);\n if (hyphen !== null) {\n const from = comparatorsOf(`>=${hyphen[1]}`);\n const to = parsePartial(hyphen[2]!);\n if (from === undefined || to === undefined) return undefined;\n const upper = to.major === undefined ? [] : to.minor === undefined ? comparatorsOf(`<${to.major + 1}.0.0-0`)\n : to.patch === undefined ? comparatorsOf(`<${to.major}.${to.minor + 1}.0-0`) : comparatorsOf(`<=${hyphen[2]}`);\n return upper === undefined ? undefined : [...from, ...upper];\n }\n // An operator may be written apart from its version (`>= 1.2.3`); join them before splitting on whitespace. Only an\n // operator that starts a token and is followed by a version is joined, so `> = 1.2.3` stays two tokens and is unread.\n const tokens = text.trim().replace(/(^|\\s)(<=|>=|<|>|=|\\^|~>?)\\s+(?=[vV0-9xX*])/g, '$1$2').split(/\\s+/).filter((token) => token.length > 0);\n const comparators: Comparator[] = [];\n for (const token of tokens) {\n const expanded = comparatorsOf(token);\n if (expanded === undefined) return undefined;\n comparators.push(...expanded);\n }\n return comparators;\n}\n\n/**\n * Whether `installedVersion` satisfies `range`: `true`, `false`, or `undefined` when either cannot be read — the range\n * is unread when ANY of its `||` alternatives is.\n *\n * A prerelease version satisfies an alternative only when one of its comparators names a prerelease of the same\n * `major.minor.patch` — npm's rule, so `^1.2.0` does not admit `1.3.0-beta.1`.\n */\nexport function satisfiesNpmVersionRange(installedVersion: string, range: string): boolean | undefined {\n const installed = parseVersion(installedVersion);\n if (installed === undefined) return undefined;\n const alternatives = range.trim() === '' ? [''] : range.split('||');\n // Every alternative is parsed first: a range with ANY unreadable alternative is unread as a whole, whichever side\n // of the `||` it sits on — a satisfied alternative beside one we cannot read is not evidence the author meant it.\n const parsed = alternatives.map((alternative) => comparatorSetOf(alternative));\n if (parsed.some((comparators) => comparators === undefined)) return undefined;\n\n for (const comparators of parsed as Comparator[][]) {\n if (!comparators.every((comparator) => holds(installed, comparator))) continue;\n if (installed.prerelease.length > 0 && !comparators.some((comparator) => comparator.version.prerelease.length > 0\n && comparator.version.major === installed.major && comparator.version.minor === installed.minor && comparator.version.patch === installed.patch)) {\n continue;\n }\n return true;\n }\n return false;\n}\n"]}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * The `tsconfig.json` of the package a source file belongs to: found by walking up from the file to the first
3
+ * directory holding a `package.json`. `undefined` when that package has no `tsconfig.json` — never a parent's, which
4
+ * describes a different package.
5
+ *
6
+ * A tool that evaluates an application's own TypeScript in-process must compile it with the options of the package it
7
+ * lives in. Left alone, a loader reads the `tsconfig.json` of the current directory, which for a CLI command or the dev
8
+ * companion is the application root, not the website. The difference that bites is JSX: a website compiles with the
9
+ * automatic runtime (`jsx: react-jsx`), and without it the classic `React.createElement` is emitted, so any JSX
10
+ * evaluated at import time (an icon map, a table of drawings) fails with "React is not defined". Two loaders resolve
11
+ * the tsconfig here: the CLI's website verbs (`wildo website audit`), which hand it to tsx, and the companion's
12
+ * structured-data audit, which reads its `paths` and JSX import source for jiti (#3208).
13
+ */
14
+ export declare function resolveOwningPackageTsconfigPath(filePath: string): string | undefined;
15
+ //# sourceMappingURL=owning-package-tsconfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owning-package-tsconfig.d.ts","sourceRoot":"","sources":["../../../src/project-config/owning-package-tsconfig.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,wBAAgB,gCAAgC,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWrF"}
@@ -0,0 +1,29 @@
1
+ import { existsSync } from 'node:fs';
2
+ import { dirname, join } from 'node:path';
3
+ /**
4
+ * The `tsconfig.json` of the package a source file belongs to: found by walking up from the file to the first
5
+ * directory holding a `package.json`. `undefined` when that package has no `tsconfig.json` — never a parent's, which
6
+ * describes a different package.
7
+ *
8
+ * A tool that evaluates an application's own TypeScript in-process must compile it with the options of the package it
9
+ * lives in. Left alone, a loader reads the `tsconfig.json` of the current directory, which for a CLI command or the dev
10
+ * companion is the application root, not the website. The difference that bites is JSX: a website compiles with the
11
+ * automatic runtime (`jsx: react-jsx`), and without it the classic `React.createElement` is emitted, so any JSX
12
+ * evaluated at import time (an icon map, a table of drawings) fails with "React is not defined". Two loaders resolve
13
+ * the tsconfig here: the CLI's website verbs (`wildo website audit`), which hand it to tsx, and the companion's
14
+ * structured-data audit, which reads its `paths` and JSX import source for jiti (#3208).
15
+ */
16
+ export function resolveOwningPackageTsconfigPath(filePath) {
17
+ let directory = dirname(filePath);
18
+ for (;;) {
19
+ if (existsSync(join(directory, 'package.json'))) {
20
+ const tsconfig = join(directory, 'tsconfig.json');
21
+ return existsSync(tsconfig) ? tsconfig : undefined;
22
+ }
23
+ const parent = dirname(directory);
24
+ if (parent === directory)
25
+ return undefined;
26
+ directory = parent;
27
+ }
28
+ }
29
+ //# sourceMappingURL=owning-package-tsconfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owning-package-tsconfig.js","sourceRoot":"","sources":["../../../src/project-config/owning-package-tsconfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gCAAgC,CAAC,QAAgB;IAC/D,IAAI,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,SAAS,CAAC;QACR,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;YAChD,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;YAClD,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;QACrD,CAAC;QACD,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;QAClC,IAAI,MAAM,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QAC3C,SAAS,GAAG,MAAM,CAAC;IACrB,CAAC;AACH,CAAC","sourcesContent":["import { existsSync } from 'node:fs';\nimport { dirname, join } from 'node:path';\n\n/**\n * The `tsconfig.json` of the package a source file belongs to: found by walking up from the file to the first\n * directory holding a `package.json`. `undefined` when that package has no `tsconfig.json` — never a parent's, which\n * describes a different package.\n *\n * A tool that evaluates an application's own TypeScript in-process must compile it with the options of the package it\n * lives in. Left alone, a loader reads the `tsconfig.json` of the current directory, which for a CLI command or the dev\n * companion is the application root, not the website. The difference that bites is JSX: a website compiles with the\n * automatic runtime (`jsx: react-jsx`), and without it the classic `React.createElement` is emitted, so any JSX\n * evaluated at import time (an icon map, a table of drawings) fails with \"React is not defined\". Two loaders resolve\n * the tsconfig here: the CLI's website verbs (`wildo website audit`), which hand it to tsx, and the companion's\n * structured-data audit, which reads its `paths` and JSX import source for jiti (#3208).\n */\nexport function resolveOwningPackageTsconfigPath(filePath: string): string | undefined {\n let directory = dirname(filePath);\n for (;;) {\n if (existsSync(join(directory, 'package.json'))) {\n const tsconfig = join(directory, 'tsconfig.json');\n return existsSync(tsconfig) ? tsconfig : undefined;\n }\n const parent = dirname(directory);\n if (parent === directory) return undefined;\n directory = parent;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"provider-catalog-types.js","sourceRoot":"","sources":["../../../../src/project-config/provider-catalog-types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,4CAA4C,GACvD,wEAAwE,CAAC;AAE3E,MAAM,CAAC,MAAM,oCAAoC,GAC/C,iDAAiD,CAAC;AAUpD,MAAM,UAAU,8BAA8B,CAC5C,aAAwD;IAExD,MAAM,OAAO,GAA8B,EAAE,CAAC;IAE9C,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI;YAC5C,kBAAkB,EAAE,EAAE;YACtB,oBAAoB,EAAE,EAAE;YACxB,SAAS,EAAE,EAAE;SACd,CAAC;QAEF,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,GAAG;YAC1B,kBAAkB,EAAE,kBAAkB,CAAC;gBACrC,GAAG,QAAQ,CAAC,kBAAkB;gBAC9B,GAAG,YAAY,CAAC,kBAAkB;aACnC,CAAC;YACF,oBAAoB,EAAE,kBAAkB,CAAC;gBACvC,GAAG,QAAQ,CAAC,oBAAoB;gBAChC,GAAG,YAAY,CAAC,oBAAoB;aACrC,CAAC;YACF,SAAS,EAAE,kBAAkB,CAAC;gBAC5B,GAAG,QAAQ,CAAC,SAAS;gBACrB,GAAG,YAAY,CAAC,SAAS;aAC1B,CAAC;SACH,CAAC;IACJ,CAAC;IAED,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAC7E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,oCAAoC,CAClD,OAAkC;IAElC,OAAO;QACL,KAAK;QACL,MAAM,4CAA4C,EAAE;QACpD,IAAI;QACJ,8EAA8E;QAC9E,sEAAsE;QACtE,0EAA0E;QAC1E,4DAA4D;QAC5D,KAAK;QACL,EAAE;QACF,oDAAoD,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,YAAY;QAChG,EAAE;QACF,wFAAwF;QACxF,gFAAgF;QAChF,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAgB;IAC1C,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["import type { DiscoveredProviderCompanionContribution } from './provider-companion-discovery';\n\nexport const PROVIDER_CATALOG_TYPES_AUTOGENERATED_WARNING =\n 'AUTO-GENERATED FILE. DO NOT EDIT. Regenerate with `wildo config sync`.';\n\nexport const PROVIDER_CATALOG_TYPES_RELATIVE_PATH =\n '.wildo-saas/generated/provider-catalog.types.ts';\n\nexport interface DiscoveredProviderCatalogEntry {\n engineCapabilities: string[];\n providerCapabilities: string[];\n protocols: string[];\n}\n\nexport type DiscoveredProviderCatalog = Record<string, DiscoveredProviderCatalogEntry>;\n\nexport function buildDiscoveredProviderCatalog(\n contributions: DiscoveredProviderCompanionContribution[],\n): DiscoveredProviderCatalog {\n const catalog: DiscoveredProviderCatalog = {};\n\n for (const contribution of contributions) {\n const existing = catalog[contribution.ref] ?? {\n engineCapabilities: [],\n providerCapabilities: [],\n protocols: [],\n };\n\n catalog[contribution.ref] = {\n engineCapabilities: deduplicateAndSort([\n ...existing.engineCapabilities,\n ...contribution.engineCapabilities,\n ]),\n providerCapabilities: deduplicateAndSort([\n ...existing.providerCapabilities,\n ...contribution.providerCapabilities,\n ]),\n protocols: deduplicateAndSort([\n ...existing.protocols,\n ...contribution.protocols,\n ]),\n };\n }\n\n return Object.fromEntries(\n Object.entries(catalog).sort(([left], [right]) => left.localeCompare(right)),\n );\n}\n\nexport function renderDiscoveredProviderCatalogTypes(\n catalog: DiscoveredProviderCatalog,\n): string {\n return [\n '/**',\n ` * ${PROVIDER_CATALOG_TYPES_AUTOGENERATED_WARNING}`,\n ' *',\n ' * Authoring-time provider catalog inferred from companion-export discovery.',\n ' * Import the exported type in `wildo.saas.config.ts` and pass it to',\n ' * `defineSaaSProviders<...>()` for provider ref / capability / protocol',\n ' * autocomplete without importing runtime implementations.',\n ' */',\n '',\n `export const WILDO_DISCOVERED_PROVIDER_CATALOG = ${JSON.stringify(catalog, null, 2)} as const;`,\n '',\n 'export type WildoDiscoveredProviderCatalog = typeof WILDO_DISCOVERED_PROVIDER_CATALOG;',\n 'export type WildoDiscoveredProviderRef = keyof WildoDiscoveredProviderCatalog;',\n '',\n ].join('\\n');\n}\n\nfunction deduplicateAndSort(values: string[]): string[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n"]}
1
+ {"version":3,"file":"provider-catalog-types.js","sourceRoot":"","sources":["../../../src/project-config/provider-catalog-types.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,4CAA4C,GACvD,wEAAwE,CAAC;AAE3E,MAAM,CAAC,MAAM,oCAAoC,GAC/C,iDAAiD,CAAC;AAUpD,MAAM,UAAU,8BAA8B,CAC5C,aAAwD;IAExD,MAAM,OAAO,GAA8B,EAAE,CAAC;IAE9C,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QACzC,MAAM,QAAQ,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI;YAC5C,kBAAkB,EAAE,EAAE;YACtB,oBA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AAK,CAAC,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["import type { DiscoveredProviderCompanionContribution } from './provider-companion-discovery';\n\nexport const PROVIDER_CATALOG_TYPES_AUTOGENERATED_WARNING =\n 'AUTO-GENERATED FILE. DO NOT EDIT. Regenerate with `wildo config sync`.';\n\nexport const PROVIDER_CATALOG_TYPES_RELATIVE_PATH =\n '.wildo-saas/generated/provider-catalog.types.ts';\n\nexport interface DiscoveredProviderCatalogEntry {\n engineCapabilities: string[];\n providerCapabilities: string[];\n protocols: string[];\n}\n\nexport type DiscoveredProviderCatalog = Record<string, DiscoveredProviderCatalogEntry>;\n\nexport function buildDiscoveredProviderCatalog(\n contributions: DiscoveredProviderCompanionContribution[],\n): DiscoveredProviderCatalog {\n const catalog: DiscoveredProviderCatalog = {};\n\n for (const contribution of contributions) {\n const existing = catalog[contribution.ref] ?? {\n engineCapabilities: [],\n providerCapabilities: [],\n protocols: [],\n };\n\n catalog[contribution.ref] = {\n engineCapabilities: deduplicateAndSort([\n ...existing.engineCapabilities,\n ...contribution.engineCapabilities,\n ]),\n providerCapabilities: deduplicateAndSort([\n ...existing.providerCapabilities,\n ...contribution.providerCapabilities,\n ]),\n protocols: deduplicateAndSort([\n ...existing.protocols,\n ...contribution.protocols,\n ]),\n };\n }\n\n return Object.fromEntries(\n Object.entries(catalog).sort(([left], [right]) => left.localeCompare(right)),\n );\n}\n\nexport function renderDiscoveredProviderCatalogTypes(\n catalog: DiscoveredProviderCatalog,\n): string {\n return [\n '/**',\n ` * ${PROVIDER_CATALOG_TYPES_AUTOGENERATED_WARNING}`,\n ' *',\n ' * Authoring-time provider catalog inferred from companion-export discovery.',\n ' * Import the exported type in `wildo.saas.config.ts` and pass it to',\n ' * `defineSaaSProviders<...>()` for provider ref / capability / protocol',\n ' * autocomplete without importing runtime implementations.',\n ' */',\n '',\n `export const WILDO_DISCOVERED_PROVIDER_CATALOG = ${JSON.stringify(catalog, null, 2)} as const;`,\n '',\n 'export type WildoDiscoveredProviderCatalog = typeof WILDO_DISCOVERED_PROVIDER_CATALOG;',\n 'export type WildoDiscoveredProviderRef = keyof WildoDiscoveredProviderCatalog;',\n '',\n ].join('\\n');\n}\n\nfunction deduplicateAndSort(values: string[]): string[] {\n return [...new Set(values)].sort((left, right) => left.localeCompare(right));\n}\n"]}
@@ -356,10 +356,10 @@ export declare function readPackageVersion(packageRoot: string): string | undefi
356
356
  * The case that motivated it (#2014) was a leftover install of the since-archived catalogue, whose `asana` subpath
357
357
  * sorted first; the same holds for any framework `@wildo-ai/provider-<ref>` package installed beside the copy.
358
358
  *
359
- * Scoped to one runtime on purpose: the same ref legitimately has one path per FACET — `posthog` is
360
- * `@wildo-ai/external-connectors-public/app` for the SaaS frontend and `@wildo-ai/external-connectors-private/backend`
361
- * for the backend. Measured 2026-09-29 over Wonder Todos and Wonder CRM: six refs have several paths, and no ref has
362
- * two for the same runtime.
359
+ * Scoped to one runtime on purpose: the same ref legitimately has one path per FACET — an installed `posthog` is
360
+ * `@<app>/provider-posthog-frontend/app` for the SaaS frontend and `@<app>/provider-posthog/backend` for the backend
361
+ * (#2579). Measured 2026-09-29 over Wonder Todos and Wonder CRM: six refs have several paths, and no ref has two for
362
+ * the same runtime.
363
363
  *
364
364
  * Shared by discovery validation (`wildo config sync`, `wildo lock check`) and the artifact builder, so the two
365
365
  * cannot disagree about what counts as a second claimant.
@@ -1 +1 @@
1
- {"version":3,"file":"provider-companion-discovery.d.ts","sourceRoot":"","sources":["../../../src/project-config/provider-companion-discovery.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAGS,MAAM,uBAAuB,CAAC;AAGvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D;;;;;;;;GAQG;AACH,oBAAY,6BAA6B;IACvC,sGAAsG;IACtG,OAAO,YAAY;IACnB,mDAAmD;IACnD,OAAO,YAAY;IACnB,kDAAkD;I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,SAAS,CAgBpB"}
1
+ {"version":3,"file":"provider-companion-discovery.d.ts","sourceRoot":"","sources":["../../../src/project-config/provider-companion-discovery.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK,gCAAgC,EACrC,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAGS,MAAM,uBAAuB,CAAC;AAGvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAG5D;;;;;;;;GAQG;AACH,oBAAY,6BAA6B;IACvC,sGAAsG;IACtG,OAAO,YAAY;IACnB,mDAAmD;IACnD,OAAO,YAAY;IACnB,kDAAkD;IAClD,MAAM,WAAW;IACjB,uDAAuD;IACvD,MAAM,WAAW;IACjB;;;;OAIG;IACH,gBAAgB,oBAAoB;CACrC;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,iCAAiC,wBAAwB,CAAC;AAEvE;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,iCAAiC,0CAA0C,CAAC;AAEzF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mCAAmC,gCAAgC,CAAC;AAEjF;;;;;GAKG;AACH,oBAAY,4BAA4B;IACtC,uGAAuG;IACvG,QAAQ,aAAa;IACrB,+GAA+G;IAC/G,gBAAgB,qBAAqB;IACrC,uGAAuG;IACvG,aAAa,kBAAkB;IAC/B,kFAAkF;IAClF,UAAU,eAAe;IACzB,gHAAgH;IAChH,mBAAmB,wBAAwB;IAC3C;;;;OAIG;IACH,cAAc,mBAAmB;IACjC,8GAA8G;IAC9G,aAAa,kBAAkB;CAChC;AAED,yDAAyD;AACzD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,4BAA4B,CAAC;IAC9C,wEAAwE;IACxE,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,kFAAkF;IAClF,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC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