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

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 (231) hide show
  1. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +1 -1
  2. package/dist/esm/_unimplemented/unimplemented-field-warning.js +1 -1
  3. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +1 -1
  4. package/dist/esm/blueprint/anchored-region.d.ts +83 -0
  5. package/dist/esm/blueprint/anchored-region.d.ts.map +1 -0
  6. package/dist/esm/blueprint/anchored-region.js +263 -0
  7. package/dist/esm/blueprint/anchored-region.js.map +1 -0
  8. package/dist/esm/blueprint/blueprint.schemas.d.ts +689 -0
  9. package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -0
  10. package/dist/esm/blueprint/blueprint.schemas.js +638 -0
  11. package/dist/esm/blueprint/blueprint.schemas.js.map +1 -0
  12. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  13. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  14. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +13 -1
  15. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  16. package/dist/esm/bootstrap/bootstrap.contracts.js +6 -0
  17. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  18. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +21 -3
  19. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  20. package/dist/esm/bootstrap/bootstrap.schemas.js +14 -3
  21. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  22. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +121 -0
  23. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +129 -0
  25. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  26. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
  27. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  28. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  29. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  30. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -1
  31. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  32. package/dist/esm/bootstrap/runtime-response-integrity.d.ts +249 -0
  33. package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -0
  34. package/dist/esm/bootstrap/runtime-response-integrity.js +353 -0
  35. package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -0
  36. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts +32 -0
  37. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -0
  38. package/dist/esm/bootstrap/runtime-secret-env.contracts.js +43 -0
  39. package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -0
  40. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  41. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts.map +1 -1
  42. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts +51 -0
  43. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -0
  44. package/dist/esm/canonical-json/rfc8785-canonical-json.js +231 -0
  45. package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -0
  46. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  47. package/dist/esm/index.d.ts +15 -0
  48. package/dist/esm/index.d.ts.map +1 -1
  49. package/dist/esm/index.js +15 -0
  50. package/dist/esm/index.js.map +1 -1
  51. package/dist/esm/key-management/approval-seal-verifier.d.ts +216 -0
  52. package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -0
  53. package/dist/esm/key-management/approval-seal-verifier.js +233 -0
  54. package/dist/esm/key-management/approval-seal-verifier.js.map +1 -0
  55. package/dist/esm/key-management/approval-seal.contracts.d.ts +131 -0
  56. package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -0
  57. package/dist/esm/key-management/approval-seal.contracts.js +115 -0
  58. package/dist/esm/key-management/approval-seal.contracts.js.map +1 -0
  59. package/dist/esm/key-management/data-key.contracts.d.ts +108 -0
  60. package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -0
  61. package/dist/esm/key-management/data-key.contracts.js +54 -0
  62. package/dist/esm/key-management/data-key.contracts.js.map +1 -0
  63. package/dist/esm/key-management/es256-jws.d.ts +60 -0
  64. package/dist/esm/key-management/es256-jws.d.ts.map +1 -0
  65. package/dist/esm/key-management/es256-jws.js +135 -0
  66. package/dist/esm/key-management/es256-jws.js.map +1 -0
  67. package/dist/esm/key-management/key-provider.spi.d.ts +151 -0
  68. package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -0
  69. package/dist/esm/key-management/key-provider.spi.js +38 -0
  70. package/dist/esm/key-management/key-provider.spi.js.map +1 -0
  71. package/dist/esm/key-management/keyring-rotation.contracts.d.ts +93 -0
  72. package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -0
  73. package/dist/esm/key-management/keyring-rotation.contracts.js +101 -0
  74. package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -0
  75. package/dist/esm/key-management/keyring-status.contracts.d.ts +66 -0
  76. package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -0
  77. package/dist/esm/key-management/keyring-status.contracts.js +45 -0
  78. package/dist/esm/key-management/keyring-status.contracts.js.map +1 -0
  79. package/dist/esm/key-management/signature-request.contracts.d.ts +95 -0
  80. package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -0
  81. package/dist/esm/key-management/signature-request.contracts.js +96 -0
  82. package/dist/esm/key-management/signature-request.contracts.js.map +1 -0
  83. package/dist/esm/key-management/signing-log-export.contracts.d.ts +216 -0
  84. package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -0
  85. package/dist/esm/key-management/signing-log-export.contracts.js +268 -0
  86. package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -0
  87. package/dist/esm/key-management/vault-custody.contracts.d.ts +55 -0
  88. package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -0
  89. package/dist/esm/key-management/vault-custody.contracts.js +88 -0
  90. package/dist/esm/key-management/vault-custody.contracts.js.map +1 -0
  91. package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
  92. package/dist/esm/lockfile/lockfile-io.d.ts +7 -9
  93. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  94. package/dist/esm/lockfile/lockfile-io.js +23 -22
  95. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  96. package/dist/esm/lockfile/materialize-infra-section.d.ts +17 -14
  97. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  98. package/dist/esm/lockfile/materialize-infra-section.js +9 -9
  99. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  100. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +26 -2
  101. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  102. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +27 -2
  103. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  104. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
  105. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +9 -2
  106. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
  107. package/dist/esm/project-config/application-served-public-documents.loader.d.ts +26 -0
  108. package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -0
  109. package/dist/esm/project-config/application-served-public-documents.loader.js +78 -0
  110. package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -0
  111. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  112. package/dist/esm/project-config/define-infra-env-config.d.ts +236 -15
  113. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  114. package/dist/esm/project-config/define-infra-env-config.js +104 -91
  115. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  116. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  117. package/dist/esm/project-config/define-saas-config.d.ts +133 -3
  118. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  119. package/dist/esm/project-config/define-saas-config.js +170 -19
  120. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  121. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  122. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
  123. package/dist/esm/project-config/hosted-infra-env-config.js +3 -0
  124. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
  125. package/dist/esm/project-config/index.d.ts +3 -0
  126. package/dist/esm/project-config/index.d.ts.map +1 -1
  127. package/dist/esm/project-config/index.js +3 -0
  128. package/dist/esm/project-config/index.js.map +1 -1
  129. package/dist/esm/project-config/loader.d.ts.map +1 -1
  130. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
  131. package/dist/esm/project-config/npm-version-range.js +39 -16
  132. package/dist/esm/project-config/npm-version-range.js.map +1 -1
  133. package/dist/esm/project-config/owning-package-tsconfig.d.ts +15 -0
  134. package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -0
  135. package/dist/esm/project-config/owning-package-tsconfig.js +29 -0
  136. package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -0
  137. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -1
  138. package/dist/esm/project-config/provider-companion-discovery.d.ts +4 -4
  139. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  140. package/dist/esm/project-config/provider-companion-discovery.js +13 -9
  141. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  142. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +32 -3
  143. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  144. package/dist/esm/project-config/provider-runtime-artifacts.js +67 -13
  145. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  146. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  147. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  148. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  149. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  150. package/dist/esm/project-config/shared/backing-service-servability.d.ts.map +1 -1
  151. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  152. package/dist/esm/project-config/shared/cdn.example.d.ts.map +1 -1
  153. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  154. package/dist/esm/project-config/shared/csp-defaults.d.ts +4 -5
  155. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  156. package/dist/esm/project-config/shared/csp-defaults.js +4 -5
  157. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
  158. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  159. package/dist/esm/project-config/shared/csp.schemas.d.ts +1 -2
  160. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  161. package/dist/esm/project-config/shared/csp.schemas.js +1 -2
  162. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  163. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  164. package/dist/esm/project-config/shared/environment.schemas.d.ts +6 -0
  165. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  166. package/dist/esm/project-config/shared/environment.schemas.js +8 -1
  167. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  168. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  169. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -1
  170. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +1 -0
  171. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  172. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +3 -0
  173. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  174. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +4 -0
  175. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  176. package/dist/esm/project-config/shared/minion-resource-access.validation.js +6 -2
  177. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  178. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +250 -0
  179. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -0
  180. package/dist/esm/project-config/shared/platform-key-management.schemas.js +194 -0
  181. package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -0
  182. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  183. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
  184. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +1 -1
  185. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  186. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
  187. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  188. package/dist/esm/registry/digest.schemas.d.ts.map +1 -1
  189. package/dist/esm/registry/index.d.ts +1 -0
  190. package/dist/esm/registry/index.d.ts.map +1 -1
  191. package/dist/esm/registry/index.js +1 -0
  192. package/dist/esm/registry/index.js.map +1 -1
  193. package/dist/esm/registry/local-checkout-source.d.ts +22 -2
  194. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
  195. package/dist/esm/registry/local-checkout-source.js +66 -3
  196. package/dist/esm/registry/local-checkout-source.js.map +1 -1
  197. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +10 -0
  198. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  199. package/dist/esm/registry/module-artifact.schemas.d.ts +23 -0
  200. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  201. package/dist/esm/registry/module-manifest.schemas.d.ts +336 -18
  202. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  203. package/dist/esm/registry/module-manifest.schemas.js +245 -19
  204. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  205. package/dist/esm/registry/module-search.schemas.d.ts +2 -0
  206. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
  207. package/dist/esm/registry/module-search.schemas.js +14 -1
  208. package/dist/esm/registry/module-search.schemas.js.map +1 -1
  209. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  210. package/dist/esm/registry/registry-errors.d.ts +22 -2
  211. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  212. package/dist/esm/registry/registry-errors.js +28 -2
  213. package/dist/esm/registry/registry-errors.js.map +1 -1
  214. package/dist/esm/registry/registry-keys.schemas.d.ts.map +1 -1
  215. package/dist/esm/registry/registry-section-schemas.constants.d.ts +5 -0
  216. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  217. package/dist/esm/registry/registry-url-resolution.d.ts +72 -0
  218. package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -0
  219. package/dist/esm/registry/registry-url-resolution.js +157 -0
  220. package/dist/esm/registry/registry-url-resolution.js.map +1 -0
  221. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  222. package/dist/esm/schemas/framework-secrets.schemas.d.ts +55 -0
  223. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  224. package/dist/esm/schemas/framework-secrets.schemas.js +53 -0
  225. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  226. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  227. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  228. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  229. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -1
  230. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  231. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"registry-errors.js","sourceRoot":"","sources":["../../../../src/registry/registry-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAN,IAAY,iBA0CX;AA1CD,WAAY,iBAAiB;IAC3B,wEAAwE;IACxE,+FAA0E,CAAA;IAC1E,4CAA4C;IAC5C,yEAAoD,CAAA;IACpD,uDAAuD;IACvD,2EAAsD,CAAA;IACtD,uCAAuC;IACvC,qEAAgD,CAAA;IAChD,uEAAuE;IACvE,qFAAgE,CAAA;IAChE,4DAA4D;IAC5D,6EAAwD,CAAA;IACxD,uEAAuE;IACvE,+EAA0D,CAAA;IAC1D,yDAAyD;IACzD,mEAA8C,CAAA;IAC9C;;;;OAIG;IACH,+EAA0D,CAAA;IAC1D;;;OAGG;IACH,iEAA4C,CAAA;IAC5C,4GAA4G;IAC5G,+EAA0D,CAAA;IAC1D,kEAAkE;IAClE,qEAAgD,CAAA;IAChD,8FAA8F;IAC9F,+EAA0D,CAAA;IAC1D,8GAA8G;IAC9G,iFAA4D,CAAA;IAC5D,+EAA+E;IAC/E,2EAAsD,CAAA;IACtD,kEAAkE;IAClE,2EAAsD,CAAA;IACtD,+EAA+E;IAC/E,uEAAkD,CAAA;AACpD,CAAC,EA1CW,iBAAiB,KAAjB,iBAAiB,QA0C5B;AAED,MAAM,OAAO,aAAc,SAAQ,KAAK;IAC7B,IAAI,CAAoB;IAEjC,YAAY,IAAuB,EAAE,OAAe;QAClD,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,qEAAqE;QACrE,oEAAoE;QACpE,8DAA8D;QAC9D,kEAAkE;QAClE,+DAA+D;QAC/D,QAAQ;QACR,IAAI,CAAC,IAAI,GAAG,eAAe,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AAED,MAAM,OAAO,sCAAuC,SAAQ,aAAa;IAErD;IACA;IACA;IACA;IAJlB,YACkB,QAAgB,EAChB,OAA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A4B,SAAS,SAAS,WAAW,GAAG,CAAC;QACzF,KAAK,oBAAoB,CAAC,gBAAgB;YACxC,OAAO,aAAa,MAAM,0BAA0B,SAAS,SAAS,WAAW,GAAG,CAAC;QACvF,KAAK,oBAAoB,CAAC,YAAY;YACpC,OAAO,aAAa,MAAM,qDAAqD,SAAS,SAAS,WAAW,GAAG,CAAC;IACpH,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,2BAA4B,SAAQ,aAAa;IAE1C;IACA;IACA;IACA;IAJlB,YACkB,WAAmB,EACnB,MAAc,EACd,KAA2B,EAC3B,SAAiB;QAEjC,KAAK,CACH,iBAAiB,CAAC,eAAe,EACjC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,CACvD,CAAC;QARc,gBAAW,GAAX,WAAW,CAAQ;QACnB,WAAM,GAAN,MAAM,CAAQ;QACd,UAAK,GAAL,KAAK,CAAsB;QAC3B,cAAS,GAAT,SAAS,CAAQ;QAMjC,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC5C,CAAC;CACF;AAED,sFAAsF;AACtF,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,GAAG,YAAY,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY,IAAI,GAAG,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;AAC5F,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,KAAK,YAAY,aAAa,CAAC;AACxC,CAAC","sourcesContent":["/**\n * Registry-typed error classes.\n *\n * Phase 1 ships the typed-error vocabulary that Phase 2+ services\n * raise. Each error carries a stable `code` so CLI callers can\n * map errors to UX-specific copy without parsing messages.\n *\n * Errors are intentionally minimal — they encode discriminators,\n * not full diagnostic envelopes. UX layers attach their own\n * context (operator instructions, links, retry hints) when they\n * surface these errors.\n */\n\nexport enum RegistryErrorCode {\n /** Downloaded bytes do not hash to the digest the registry resolved. */\n ARTIFACT_INTEGRITY_MISMATCH = 'WILDO_REGISTRY_ARTIFACT_INTEGRITY_MISMATCH',\n /** No module with that id in the domain. */\n MODULE_NOT_FOUND = 'WILDO_REGISTRY_MODULE_NOT_FOUND',\n /** No release satisfies the requested range or tag. */\n VERSION_NOT_FOUND = 'WILDO_REGISTRY_VERSION_NOT_FOUND',\n /** The requested release is yanked. */\n VERSION_YANKED = 'WILDO_REGISTRY_VERSION_YANKED',\n /** A module requires dependencies the application does not provide. */\n DEPENDENCY_UNSATISFIED = 'WILDO_REGISTRY_DEPENDENCY_UNSATISFIED',\n /** A module would write outside its declared boundaries. */\n BOUNDARY_VIOLATION = 'WILDO_REGISTRY_BOUNDARY_VIOLATION',\n /** An installed file carries local edits an update would overwrite. */\n CONFLICT_LOCAL_EDIT = 'WILDO_REGISTRY_CONFLICT_LOCAL_EDIT',\n /** The request needs a registry key and carried none. */\n AUTH_REQUIRED = 'WILDO_REGISTRY_AUTH_REQUIRED',\n /**\n * The request carried a key and the registry refused it: revoked, expired, mistyped, or belonging to a\n * suspended organization. Distinct from `AUTH_REQUIRED` because the remedy differs: that one is \"log\n * in\", this one is \"the key you logged in with no longer works\".\n */\n CREDENTIAL_REJECTED = 'WILDO_REGISTRY_CREDENTIAL_REJECTED',\n /**\n * The registry refused the request for volume: most often the per-source failed-credential guard every\n * Wildo backend applies (#1759), after repeated rejected keys. Retrying immediately extends it.\n */\n RATE_LIMITED = 'WILDO_REGISTRY_RATE_LIMITED',\n /** A yank of a yanked release, or an unyank of a live one (#1758): the release is already in that state. */\n YANK_STATE_CONFLICT = 'WILDO_REGISTRY_YANK_STATE_CONFLICT',\n /** The key is valid but not allowed to perform this operation. */\n AUTH_FORBIDDEN = 'WILDO_REGISTRY_AUTH_FORBIDDEN',\n /** The modules lockfile is inconsistent in a way `wildo registry repair-lockfile` can fix. */\n LOCKFILE_REPAIRABLE = 'WILDO_REGISTRY_LOCKFILE_REPAIRABLE',\n /** The source change succeeded but provider materialization afterwards failed (install, update or remove). */\n PROVIDER_SYNC_FAILED = 'WILDO_REGISTRY_PROVIDER_SYNC_FAILED',\n /** The registry answered with an HTTP status the client has no meaning for. */\n UNEXPECTED_STATUS = 'WILDO_REGISTRY_UNEXPECTED_STATUS',\n /** A 2xx response carried a payload the contract cannot parse. */\n MALFORMED_PAYLOAD = 'WILDO_REGISTRY_MALFORMED_PAYLOAD',\n /** The exchange ran out of time; `RegistryTimeoutPhase` says where (#1763). */\n REQUEST_TIMEOUT = 'WILDO_REGISTRY_REQUEST_TIMEOUT',\n}\n\nexport class RegistryError extends Error {\n readonly code: RegistryErrorCode;\n\n constructor(code: RegistryErrorCode, message: string) {\n super(message);\n // L13 (third-pass review): set `name = 'RegistryError'` defensively.\n // Subclasses still overwrite it in their constructors, but a future\n // subclass that forgets to set `name` would leave the default\n // `'Error'` in stack traces — misleading. With this base default,\n // even an undeclared subclass surfaces as a `RegistryError` in\n // logs.\n this.name = 'RegistryError';\n this.code = code;\n }\n}\n\nexport class RegistryArtifactIntegrityMismatchError extends RegistryError {\n constructor(\n public readonly moduleId: string,\n public readonly version: string,\n public readonly expected: string,\n public readonly actual: string,\n ) {\n super(\n RegistryErrorCode.ARTIFACT_INTEGRITY_MISMATCH,\n `Artifact integrity mismatch for ${moduleId}@${version}: expected ${expected}, got ${actual}.`,\n );\n this.name = 'RegistryArtifactIntegrityMismatchError';\n }\n}\n\nexport class RegistryModuleNotFoundError extends RegistryError {\n constructor(public readonly moduleId: string) {\n super(\n RegistryErrorCode.MODULE_NOT_FOUND,\n `Module not found: ${moduleId}.`,\n );\n this.name = 'RegistryModuleNotFoundError';\n }\n}\n\nexport class RegistryVersionNotFoundError extends RegistryError {\n constructor(public readonly moduleId: string, public readonly versionRange: string) {\n super(\n RegistryErrorCode.VERSION_NOT_FOUND,\n `No version of ${moduleId} satisfies \"${versionRange}\".`,\n );\n this.name = 'RegistryVersionNotFoundError';\n }\n}\n\nexport class RegistryVersionYankedError extends RegistryError {\n constructor(public readonly moduleId: string, public readonly version: string, reason?: string) {\n super(\n RegistryErrorCode.VERSION_YANKED,\n `Version ${moduleId}@${version} is yanked${reason ? `: ${reason}` : ''}.`,\n );\n this.name = 'RegistryVersionYankedError';\n }\n}\n\nexport class RegistryDependencyUnsatisfiedError extends RegistryError {\n constructor(public readonly moduleId: string, public readonly missing: readonly string[]) {\n super(\n RegistryErrorCode.DEPENDENCY_UNSATISFIED,\n `Module ${moduleId} requires unmet dependencies: ${missing.join(', ')}.`,\n );\n this.name = 'RegistryDependencyUnsatisfiedError';\n }\n}\n\nexport class RegistryBoundaryViolationError extends RegistryError {\n constructor(public readonly moduleId: string, public readonly offendingPath: string) {\n super(\n RegistryErrorCode.BOUNDARY_VIOLATION,\n `Module ${moduleId} attempts to write outside its declared boundaries: ${offendingPath}.`,\n );\n this.name = 'RegistryBoundaryViolationError';\n }\n}\n\nexport class RegistryConflictLocalEditError extends RegistryError {\n constructor(public readonly filePath: string) {\n super(\n RegistryErrorCode.CONFLICT_LOCAL_EDIT,\n `Local edit detected at ${filePath}; refusing to overwrite without --force.`,\n );\n this.name = 'RegistryConflictLocalEditError';\n }\n}\n\nexport class RegistryAuthRequiredError extends RegistryError {\n constructor(public readonly registryUrl: string) {\n super(\n RegistryErrorCode.AUTH_REQUIRED,\n `Authentication required for ${registryUrl}. Run \\`wildo registry login --registry ${registryUrl}\\`.`,\n );\n this.name = 'RegistryAuthRequiredError';\n }\n}\n\nexport class RegistryCredentialRejectedError extends RegistryError {\n constructor(public readonly registryUrl: string) {\n super(\n RegistryErrorCode.CREDENTIAL_REJECTED,\n `The registry at ${registryUrl} rejected the stored key (revoked, expired or not recognised). ` +\n `Run \\`wildo registry login --registry ${registryUrl}\\` with a current key.`,\n );\n this.name = 'RegistryCredentialRejectedError';\n }\n}\n\nexport class RegistryRateLimitedError extends RegistryError {\n constructor(\n public readonly registryUrl: string,\n public readonly action: string,\n /** From `Retry-After`, when the registry sent one in seconds. */\n public readonly retryAfterSeconds: number | undefined,\n ) {\n super(\n RegistryErrorCode.RATE_LIMITED,\n `Registry \"${action}\" was rate-limited at ${registryUrl}` +\n (retryAfterSeconds !== undefined ? `; retry in ${retryAfterSeconds}s.` : '; wait before retrying.') +\n ' Repeated rejected keys from one source trigger this; check the key before retrying.',\n );\n this.name = 'RegistryRateLimitedError';\n }\n}\n\n/** The two release-state verbs (#1758); the value is also the route segment. */\nexport enum RegistryYankVerb {\n YANK = 'yank',\n UNYANK = 'unyank',\n}\n\n/**\n * The registry refused a yank or unyank because the release is already in the requested state (409).\n * Typed so a caller can report it as the no-op it is rather than a failure of the registry.\n */\nexport class RegistryYankStateConflictError extends RegistryError {\n constructor(\n public readonly moduleId: string,\n public readonly version: string,\n public readonly verb: RegistryYankVerb,\n ) {\n super(\n RegistryErrorCode.YANK_STATE_CONFLICT,\n verb === RegistryYankVerb.YANK ? `${moduleId}@${version} is already yanked.` : `${moduleId}@${version} is not yanked.`,\n );\n this.name = 'RegistryYankStateConflictError';\n }\n}\n\n/**\n * Stable, client-branchable codes the registry server puts on a refusal, carried on the wire as\n * `error.details.code` (the engine's documented channel for a switch-on-code refusal: `code` is the one\n * context key its client sanitizer admits for that purpose). Server and client both import this enum, so\n * the value has one source.\n */\nexport enum RegistryRefusalCode {\n /**\n * A yank of a yanked release, or an unyank of a live one: the release is ALREADY in the requested\n * state, so the request is a no-op a caller may report as done.\n */\n RELEASE_STATE = 'registry_release_state',\n}\n\n/**\n * Whether a 409 body from a yank/unyank route is the release-state refusal rather than any other conflict\n * (#1758 re-review R3).\n *\n * Both routes answer 409 for two different things: the release is already in the requested state, or the\n * registry gave up re-deciding after repeated lost optimistic checks (`version_conflict`). Only the first\n * is a no-op; reading every 409 as one told an operator yanking a compromised release that it was already\n * yanked. It keys on the registry's OWN code rather than the engine's generic `conflict` reference, which\n * about twenty other refusals share, so a future conflict on these routes cannot be mistaken for it.\n */\nexport function isRegistryReleaseStateConflictBody(body: unknown): boolean {\n const error = (body as { error?: { details?: { code?: unknown } } } | null | undefined)?.error;\n return error?.details?.code === RegistryRefusalCode.RELEASE_STATE;\n}\n\nexport class RegistryAuthForbiddenError extends RegistryError {\n constructor(public readonly action: string) {\n super(\n RegistryErrorCode.AUTH_FORBIDDEN,\n `Action \"${action}\" is not permitted by the current credentials.`,\n );\n this.name = 'RegistryAuthForbiddenError';\n }\n}\n\nexport class RegistryLockfileRepairableError extends RegistryError {\n constructor(message: string, public readonly hints: readonly string[] = []) {\n super(RegistryErrorCode.LOCKFILE_REPAIRABLE, message);\n this.name = 'RegistryLockfileRepairableError';\n }\n}\n\n/**\n * Raised when post-install / post-update / post-remove provider\n * materialization fails after the source mutation succeeded. The\n * companion-export discovery and `runtimeImport` reachability\n * failure modes are both surfaced via this error so module-registry\n * callers report them as first-class repairable integration errors\n * (`module-registry-analysis.md` / Provider Migration WIP Seams §1).\n */\nexport class RegistryProviderSyncFailedError extends RegistryError {\n constructor(\n message: string,\n public readonly failureKind: 'companion-discovery' | 'runtime-import-reachability' | 'invalid-scope' | 'timeout' | 'unknown',\n public readonly stderrTail?: string,\n ) {\n super(RegistryErrorCode.PROVIDER_SYNC_FAILED, message);\n this.name = 'RegistryProviderSyncFailedError';\n }\n}\n\n/**\n * Raised by `RegistryServerClient` when the server returns a non-2xx\n * status that doesn't map to a more specific typed error (404 →\n * `RegistryModuleNotFoundError`/`RegistryVersionNotFoundError`, 401 →\n * `RegistryAuthRequiredError`, 403 → `RegistryAuthForbiddenError`).\n * Carries the status code + URL so callers can discriminate \"registry\n * down / 5xx\" from authoritative client errors without re-parsing\n * `Error.message` strings.\n */\nexport class RegistryUnexpectedStatusError extends RegistryError {\n constructor(\n public readonly registryUrl: string,\n public readonly status: number,\n public readonly statusText: string,\n public readonly action: string,\n ) {\n super(\n RegistryErrorCode.UNEXPECTED_STATUS,\n `Registry \"${action}\" failed with HTTP ${status} ${statusText} at ${registryUrl}.`,\n );\n this.name = 'RegistryUnexpectedStatusError';\n }\n}\n\n/**\n * Raised by `RegistryServerClient` when\n * a 2xx response carries a payload the canonical Zod schema can't parse.\n * Without this, malformed payloads previously surfaced as bare `Error`\n * (`'Registry resolve returned a malformed payload at ...'`), which\n * broke the `isRegistryError(err)` typed-handler contract every other\n * client surface honored.\n */\nexport class RegistryMalformedPayloadError extends RegistryError {\n constructor(\n public readonly registryUrl: string,\n public readonly action: string,\n public readonly detail: string,\n ) {\n super(\n RegistryErrorCode.MALFORMED_PAYLOAD,\n `Registry \"${action}\" returned a malformed payload at ${registryUrl}: ${detail}`,\n );\n this.name = 'RegistryMalformedPayloadError';\n }\n}\n\n/**\n * Where a registry exchange ran out of time (#1763). The two call for different remedies: no response\n * at all points at the registry or the network path; a transfer that STALLED part-way is a slow link,\n * and is measured as silence between chunks rather than as the size of the artifact.\n */\nexport enum RegistryTimeoutPhase {\n /** No response (status + headers) arrived within the request budget. */\n AWAITING_RESPONSE = 'awaiting_response',\n /** The response started, then no bytes arrived for the idle budget. */\n TRANSFER_STALLED = 'transfer_stalled',\n /**\n * The response (status + headers) arrived, but a small metadata body did not finish within the same\n * request budget. Not `TRANSFER_STALLED`: a metadata body has no idle budget, only the request's.\n */\n READING_BODY = 'reading_body',\n}\n\nfunction describeTimeout(phase: RegistryTimeoutPhase, action: string, registryUrl: string, timeoutMs: number): string {\n switch (phase) {\n case RegistryTimeoutPhase.AWAITING_RESPONSE:\n return `Registry \"${action}\" got no response within ${timeoutMs}ms at ${registryUrl}.`;\n case RegistryTimeoutPhase.TRANSFER_STALLED:\n return `Registry \"${action}\" stalled: no data for ${timeoutMs}ms at ${registryUrl}.`;\n case RegistryTimeoutPhase.READING_BODY:\n return `Registry \"${action}\" answered but its response did not finish within ${timeoutMs}ms at ${registryUrl}.`;\n }\n}\n\n/**\n * A registry request that timed out, in the typed vocabulary, so `isRegistryError(err)` handlers see it.\n * Before #1763 a timeout escaped as a bare `Error` (before the response) or a raw `AbortError` (during\n * the body), and a JSON body cut short was reported as a MALFORMED payload.\n */\nexport class RegistryRequestTimeoutError extends RegistryError {\n constructor(\n public readonly registryUrl: string,\n public readonly action: string,\n public readonly phase: RegistryTimeoutPhase,\n public readonly timeoutMs: number,\n ) {\n super(\n RegistryErrorCode.REQUEST_TIMEOUT,\n describeTimeout(phase, action, registryUrl, timeoutMs),\n );\n this.name = 'RegistryRequestTimeoutError';\n }\n}\n\n/** True for the error a fetch (or a body read) raises when its abort signal fires. */\nexport function isAbortLikeError(err: unknown): boolean {\n return err instanceof Error && (err.name === 'AbortError' || err.name === 'TimeoutError');\n}\n\nexport function isRegistryError(value: unknown): value is RegistryError {\n return value instanceof RegistryError;\n}\n"]}
1
+ {"version":3,"file":"registry-errors.js","sourceRoot":"","sources":["../../../../src/registry/registry-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAN,IAAY,iBA4CX;AA5CD,WAAY,iBAAiB;IAC3B,wEAAwE;IACxE,+FAA0E,CAAA;IAC1E,4CAA4C;IAC5C,yEAAoD,CAAA;IACpD,uDAAuD;IACvD,2EAAsD,CAAA;IACtD,uCAAuC;IACvC,qEAAgD,CAAA;IAChD,uEAAuE;IACvE,qFAAgE,CAAA;IAChE,4DAA4D;IAC5D,6EAAwD,CAAA;IACxD,uEAAuE;IACvE,+EAA0D,CAAA;IAC1D,yDAAyD;IACzD,mEAA8C,CAAA;IAC9C;;;;OAIG;IACH,+EAA0D,CAAA;IAC1D;;;OAGG;IACH,iEAA4C,CAAA;IAC5C,4GAA4G;IAC5G,+EAA0D,CAAA;IAC1D,kEAAkE;IAClE,qEAAgD,CAAA;IAChD,8FAA8F;IAC9F,+EAA0D,CAAA;IAC1D,8GAA8G;IAC9G,iFAA4D,CAAA;IAC5D,+EAA+E;IAC/E,2EAAsD,CAAA;IACtD,kEAAkE;IAClE,2EAAsD,CAAA;IACtD,+EAA+E;IAC/E,uEAAkD,CAAA;IAClD,2GAA2G;IAC3G,iEAA4C,CAAA;AAC9C,CAAC,EA5CW,iBAAiB,KAAjB,iBAAiB,QA4C5B;AAED,MAAM,OA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QAEjC,KAAK,CACH,iBAAiB,CAAC,eAAe,EACjC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,CACvD,CAAC;QARc,gBAAW,GAAX,WAAW,CAAQ;QACnB,WAAM,GAAN,MAAM,CAAQ;QACd,UAAK,GAAL,KAAK,CAAsB;QAC3B,cAAS,GAAT,SAAS,CAAQ;QAMjC,IAAI,CAAC,IAAI,GAAG,6BAA6B,CAAC;IAC5C,CAAC;CACF;AAED,sFAAsF;AACtF,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,GAAG,YAAY,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY,IAAI,GAAG,CAAC,IAAI,KAAK,cAAc,CAAC,CAAC;AAC5F,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,KAAc;IAC5C,OAAO,KAAK,YAAY,aAAa,CAAC;AACxC,CAAC","sourcesContent":["/**\n * Registry-typed error classes.\n *\n * Phase 1 ships the typed-error vocabulary that Phase 2+ services\n * raise. Each error carries a stable `code` so CLI callers can\n * map errors to UX-specific copy without parsing messages.\n *\n * Errors are intentionally minimal — they encode discriminators,\n * not full diagnostic envelopes. UX layers attach their own\n * context (operator instructions, links, retry hints) when they\n * surface these errors.\n */\n\nexport enum RegistryErrorCode {\n /** Downloaded bytes do not hash to the digest the registry resolved. */\n ARTIFACT_INTEGRITY_MISMATCH = 'WILDO_REGISTRY_ARTIFACT_INTEGRITY_MISMATCH',\n /** No module with that id in the domain. */\n MODULE_NOT_FOUND = 'WILDO_REGISTRY_MODULE_NOT_FOUND',\n /** No release satisfies the requested range or tag. */\n VERSION_NOT_FOUND = 'WILDO_REGISTRY_VERSION_NOT_FOUND',\n /** The requested release is yanked. */\n VERSION_YANKED = 'WILDO_REGISTRY_VERSION_YANKED',\n /** A module requires dependencies the application does not provide. */\n DEPENDENCY_UNSATISFIED = 'WILDO_REGISTRY_DEPENDENCY_UNSATISFIED',\n /** A module would write outside its declared boundaries. */\n BOUNDARY_VIOLATION = 'WILDO_REGISTRY_BOUNDARY_VIOLATION',\n /** An installed file carries local edits an update would overwrite. */\n CONFLICT_LOCAL_EDIT = 'WILDO_REGISTRY_CONFLICT_LOCAL_EDIT',\n /** The request needs a registry key and carried none. */\n AUTH_REQUIRED = 'WILDO_REGISTRY_AUTH_REQUIRED',\n /**\n * The request carried a key and the registry refused it: revoked, expired, mistyped, or belonging to a\n * suspended organization. Distinct from `AUTH_REQUIRED` because the remedy differs: that one is \"log\n * in\", this one is \"the key you logged in with no longer works\".\n */\n CREDENTIAL_REJECTED = 'WILDO_REGISTRY_CREDENTIAL_REJECTED',\n /**\n * The registry refused the request for volume: most often the per-source failed-credential guard every\n * Wildo backend applies (#1759), after repeated rejected keys. Retrying immediately extends it.\n */\n RATE_LIMITED = 'WILDO_REGISTRY_RATE_LIMITED',\n /** A yank of a yanked release, or an unyank of a live one (#1758): the release is already in that state. */\n YANK_STATE_CONFLICT = 'WILDO_REGISTRY_YANK_STATE_CONFLICT',\n /** The key is valid but not allowed to perform this operation. */\n AUTH_FORBIDDEN = 'WILDO_REGISTRY_AUTH_FORBIDDEN',\n /** The modules lockfile is inconsistent in a way `wildo registry repair-lockfile` can fix. */\n LOCKFILE_REPAIRABLE = 'WILDO_REGISTRY_LOCKFILE_REPAIRABLE',\n /** The source change succeeded but provider materialization afterwards failed (install, update or remove). */\n PROVIDER_SYNC_FAILED = 'WILDO_REGISTRY_PROVIDER_SYNC_FAILED',\n /** The registry answered with an HTTP status the client has no meaning for. */\n UNEXPECTED_STATUS = 'WILDO_REGISTRY_UNEXPECTED_STATUS',\n /** A 2xx response carried a payload the contract cannot parse. */\n MALFORMED_PAYLOAD = 'WILDO_REGISTRY_MALFORMED_PAYLOAD',\n /** The exchange ran out of time; `RegistryTimeoutPhase` says where (#1763). */\n REQUEST_TIMEOUT = 'WILDO_REGISTRY_REQUEST_TIMEOUT',\n /** A domain with that slug already exists on the registry (#2024); whose it is takes a second question. */\n DOMAIN_TAKEN = 'WILDO_REGISTRY_DOMAIN_TAKEN',\n}\n\nexport class RegistryError extends Error {\n readonly code: RegistryErrorCode;\n\n constructor(code: RegistryErrorCode, message: string) {\n super(message);\n // L13 (third-pass review): set `name = 'RegistryError'` defensively.\n // Subclasses still overwrite it in their constructors, but a future\n // subclass that forgets to set `name` would leave the default\n // `'Error'` in stack traces — misleading. With this base default,\n // even an undeclared subclass surfaces as a `RegistryError` in\n // logs.\n this.name = 'RegistryError';\n this.code = code;\n }\n}\n\nexport class RegistryArtifactIntegrityMismatchError extends RegistryError {\n constructor(\n public readonly moduleId: string,\n public readonly version: string,\n public readonly expected: string,\n public readonly actual: string,\n ) {\n super(\n RegistryErrorCode.ARTIFACT_INTEGRITY_MISMATCH,\n `Artifact integrity mismatch for ${moduleId}@${version}: expected ${expected}, got ${actual}.`,\n );\n this.name = 'RegistryArtifactIntegrityMismatchError';\n }\n}\n\nexport class RegistryModuleNotFoundError extends RegistryError {\n constructor(public readonly moduleId: string) {\n super(\n RegistryErrorCode.MODULE_NOT_FOUND,\n `Module not found: ${moduleId}.`,\n );\n this.name = 'RegistryModuleNotFoundError';\n }\n}\n\nexport class RegistryVersionNotFoundError extends RegistryError {\n constructor(public readonly moduleId: string, public readonly versionRange: string) {\n super(\n RegistryErrorCode.VERSION_NOT_FOUND,\n `No version of ${moduleId} satisfies \"${versionRange}\".`,\n );\n this.name = 'RegistryVersionNotFoundError';\n }\n}\n\nexport class RegistryVersionYankedError extends RegistryError {\n constructor(public readonly moduleId: string, public readonly version: string, reason?: string) {\n super(\n RegistryErrorCode.VERSION_YANKED,\n `Version ${moduleId}@${version} is yanked${reason ? `: ${reason}` : ''}.`,\n );\n this.name = 'RegistryVersionYankedError';\n }\n}\n\nexport class RegistryDependencyUnsatisfiedError extends RegistryError {\n constructor(public readonly moduleId: string, public readonly missing: readonly string[]) {\n super(\n RegistryErrorCode.DEPENDENCY_UNSATISFIED,\n `Module ${moduleId} requires unmet dependencies: ${missing.join(', ')}.`,\n );\n this.name = 'RegistryDependencyUnsatisfiedError';\n }\n}\n\nexport class RegistryBoundaryViolationError extends RegistryError {\n constructor(public readonly moduleId: string, public readonly offendingPath: string) {\n super(\n RegistryErrorCode.BOUNDARY_VIOLATION,\n `Module ${moduleId} attempts to write outside its declared boundaries: ${offendingPath}.`,\n );\n this.name = 'RegistryBoundaryViolationError';\n }\n}\n\nexport class RegistryConflictLocalEditError extends RegistryError {\n constructor(public readonly filePath: string) {\n super(\n RegistryErrorCode.CONFLICT_LOCAL_EDIT,\n `Local edit detected at ${filePath}; refusing to overwrite without --force.`,\n );\n this.name = 'RegistryConflictLocalEditError';\n }\n}\n\nexport class RegistryAuthRequiredError extends RegistryError {\n constructor(public readonly registryUrl: string) {\n super(\n RegistryErrorCode.AUTH_REQUIRED,\n `Authentication required for ${registryUrl}. Run \\`wildo registry login --registry ${registryUrl}\\`.`,\n );\n this.name = 'RegistryAuthRequiredError';\n }\n}\n\nexport class RegistryCredentialRejectedError extends RegistryError {\n constructor(public readonly registryUrl: string) {\n super(\n RegistryErrorCode.CREDENTIAL_REJECTED,\n `The registry at ${registryUrl} rejected the stored key (revoked, expired or not recognised). ` +\n `Run \\`wildo registry login --registry ${registryUrl}\\` with a current key.`,\n );\n this.name = 'RegistryCredentialRejectedError';\n }\n}\n\nexport class RegistryRateLimitedError extends RegistryError {\n constructor(\n public readonly registryUrl: string,\n public readonly action: string,\n /** From `Retry-After`, when the registry sent one in seconds. */\n public readonly retryAfterSeconds: number | undefined,\n ) {\n super(\n RegistryErrorCode.RATE_LIMITED,\n `Registry \"${action}\" was rate-limited at ${registryUrl}` +\n (retryAfterSeconds !== undefined ? `; retry in ${retryAfterSeconds}s.` : '; wait before retrying.') +\n ' Repeated rejected keys from one source trigger this; check the key before retrying.',\n );\n this.name = 'RegistryRateLimitedError';\n }\n}\n\n/** The two release-state verbs (#1758); the value is also the route segment. */\nexport enum RegistryYankVerb {\n YANK = 'yank',\n UNYANK = 'unyank',\n}\n\n/**\n * The registry refused a yank or unyank because the release is already in the requested state (409).\n * Typed so a caller can report it as the no-op it is rather than a failure of the registry.\n */\nexport class RegistryYankStateConflictError extends RegistryError {\n constructor(\n public readonly moduleId: string,\n public readonly version: string,\n public readonly verb: RegistryYankVerb,\n ) {\n super(\n RegistryErrorCode.YANK_STATE_CONFLICT,\n verb === RegistryYankVerb.YANK ? `${moduleId}@${version} is already yanked.` : `${moduleId}@${version} is not yanked.`,\n );\n this.name = 'RegistryYankStateConflictError';\n }\n}\n\n/**\n * Stable, client-branchable codes the registry server puts on a refusal, carried on the wire as\n * `error.details.code` (the engine's documented channel for a switch-on-code refusal: `code` is the one\n * context key its client sanitizer admits for that purpose). Server and client both import this enum, so\n * the value has one source.\n */\nexport enum RegistryRefusalCode {\n /**\n * A yank of a yanked release, or an unyank of a live one: the release is ALREADY in the requested\n * state, so the request is a no-op a caller may report as done.\n */\n RELEASE_STATE = 'registry_release_state',\n /**\n * A publish of a version that already exists (#2024). Versions are immutable, so the remedy is a new version.\n * Distinct from the engine's generic `version_conflict`, which a publish can also answer when it gives up after\n * lost optimistic checks: there the version was NOT stored and a retry may succeed.\n */\n VERSION_IMMUTABLE = 'registry_version_immutable',\n /** A domain create whose slug is already registered (#2024), by the caller's organization or another. */\n DOMAIN_TAKEN = 'registry_domain_taken',\n}\n\n/** Whether a refusal body carries the registry's own `code` (on `error.details.code`). */\nexport function hasRegistryRefusalCode(body: unknown, code: RegistryRefusalCode): boolean {\n const error = (body as { error?: { details?: { code?: unknown } } } | null | undefined)?.error;\n return error?.details?.code === code;\n}\n\n/**\n * Whether a 409 body from a yank/unyank route is the release-state refusal rather than any other conflict\n * (#1758 re-review R3).\n *\n * Both routes answer 409 for two different things: the release is already in the requested state, or the\n * registry gave up re-deciding after repeated lost optimistic checks (`version_conflict`). Only the first\n * is a no-op; reading every 409 as one told an operator yanking a compromised release that it was already\n * yanked. It keys on the registry's OWN code rather than the engine's generic `conflict` reference, which\n * about twenty other refusals share, so a future conflict on these routes cannot be mistaken for it.\n */\nexport function isRegistryReleaseStateConflictBody(body: unknown): boolean {\n return hasRegistryRefusalCode(body, RegistryRefusalCode.RELEASE_STATE);\n}\n\n/**\n * A domain create refused because the slug is registered (#2024). Domains are first come, first served, so the\n * caller asks its own domain list to tell \"already ours\" from \"someone else's\".\n */\nexport class RegistryDomainTakenError extends RegistryError {\n constructor(public readonly domain: string) {\n super(RegistryErrorCode.DOMAIN_TAKEN, `The registry domain \"${domain}\" already exists.`);\n this.name = 'RegistryDomainTakenError';\n }\n}\n\nexport class RegistryAuthForbiddenError extends RegistryError {\n constructor(public readonly action: string) {\n super(\n RegistryErrorCode.AUTH_FORBIDDEN,\n `Action \"${action}\" is not permitted by the current credentials.`,\n );\n this.name = 'RegistryAuthForbiddenError';\n }\n}\n\nexport class RegistryLockfileRepairableError extends RegistryError {\n constructor(message: string, public readonly hints: readonly string[] = []) {\n super(RegistryErrorCode.LOCKFILE_REPAIRABLE, message);\n this.name = 'RegistryLockfileRepairableError';\n }\n}\n\n/**\n * Raised when post-install / post-update / post-remove provider\n * materialization fails after the source mutation succeeded. The\n * companion-export discovery and `runtimeImport` reachability\n * failure modes are both surfaced via this error so module-registry\n * callers report them as first-class repairable integration errors\n * (`module-registry-analysis.md` / Provider Migration WIP Seams §1).\n */\nexport class RegistryProviderSyncFailedError extends RegistryError {\n constructor(\n message: string,\n public readonly failureKind: 'companion-discovery' | 'runtime-import-reachability' | 'invalid-scope' | 'timeout' | 'unknown',\n public readonly stderrTail?: string,\n ) {\n super(RegistryErrorCode.PROVIDER_SYNC_FAILED, message);\n this.name = 'RegistryProviderSyncFailedError';\n }\n}\n\n/**\n * Raised by `RegistryServerClient` when the server returns a non-2xx\n * status that doesn't map to a more specific typed error (404 →\n * `RegistryModuleNotFoundError`/`RegistryVersionNotFoundError`, 401 →\n * `RegistryAuthRequiredError`, 403 → `RegistryAuthForbiddenError`).\n * Carries the status code + URL so callers can discriminate \"registry\n * down / 5xx\" from authoritative client errors without re-parsing\n * `Error.message` strings.\n */\nexport class RegistryUnexpectedStatusError extends RegistryError {\n constructor(\n public readonly registryUrl: string,\n public readonly status: number,\n public readonly statusText: string,\n public readonly action: string,\n ) {\n super(\n RegistryErrorCode.UNEXPECTED_STATUS,\n `Registry \"${action}\" failed with HTTP ${status} ${statusText} at ${registryUrl}.`,\n );\n this.name = 'RegistryUnexpectedStatusError';\n }\n}\n\n/**\n * Raised by `RegistryServerClient` when\n * a 2xx response carries a payload the canonical Zod schema can't parse.\n * Without this, malformed payloads previously surfaced as bare `Error`\n * (`'Registry resolve returned a malformed payload at ...'`), which\n * broke the `isRegistryError(err)` typed-handler contract every other\n * client surface honored.\n */\nexport class RegistryMalformedPayloadError extends RegistryError {\n constructor(\n public readonly registryUrl: string,\n public readonly action: string,\n public readonly detail: string,\n ) {\n super(\n RegistryErrorCode.MALFORMED_PAYLOAD,\n `Registry \"${action}\" returned a malformed payload at ${registryUrl}: ${detail}`,\n );\n this.name = 'RegistryMalformedPayloadError';\n }\n}\n\n/**\n * Where a registry exchange ran out of time (#1763). The two call for different remedies: no response\n * at all points at the registry or the network path; a transfer that STALLED part-way is a slow link,\n * and is measured as silence between chunks rather than as the size of the artifact.\n */\nexport enum RegistryTimeoutPhase {\n /** No response (status + headers) arrived within the request budget. */\n AWAITING_RESPONSE = 'awaiting_response',\n /** The response started, then no bytes arrived for the idle budget. */\n TRANSFER_STALLED = 'transfer_stalled',\n /**\n * The response (status + headers) arrived, but a small metadata body did not finish within the same\n * request budget. Not `TRANSFER_STALLED`: a metadata body has no idle budget, only the request's.\n */\n READING_BODY = 'reading_body',\n}\n\nfunction describeTimeout(phase: RegistryTimeoutPhase, action: string, registryUrl: string, timeoutMs: number): string {\n switch (phase) {\n case RegistryTimeoutPhase.AWAITING_RESPONSE:\n return `Registry \"${action}\" got no response within ${timeoutMs}ms at ${registryUrl}.`;\n case RegistryTimeoutPhase.TRANSFER_STALLED:\n return `Registry \"${action}\" stalled: no data for ${timeoutMs}ms at ${registryUrl}.`;\n case RegistryTimeoutPhase.READING_BODY:\n return `Registry \"${action}\" answered but its response did not finish within ${timeoutMs}ms at ${registryUrl}.`;\n }\n}\n\n/**\n * A registry request that timed out, in the typed vocabulary, so `isRegistryError(err)` handlers see it.\n * Before #1763 a timeout escaped as a bare `Error` (before the response) or a raw `AbortError` (during\n * the body), and a JSON body cut short was reported as a MALFORMED payload.\n */\nexport class RegistryRequestTimeoutError extends RegistryError {\n constructor(\n public readonly registryUrl: string,\n public readonly action: string,\n public readonly phase: RegistryTimeoutPhase,\n public readonly timeoutMs: number,\n ) {\n super(\n RegistryErrorCode.REQUEST_TIMEOUT,\n describeTimeout(phase, action, registryUrl, timeoutMs),\n );\n this.name = 'RegistryRequestTimeoutError';\n }\n}\n\n/** True for the error a fetch (or a body read) raises when its abort signal fires. */\nexport function isAbortLikeError(err: unknown): boolean {\n return err instanceof Error && (err.name === 'AbortError' || err.name === 'TimeoutError');\n}\n\nexport function isRegistryError(value: unknown): value is RegistryError {\n return value instanceof RegistryError;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"registry-keys.schemas.d.ts","sourceRoot":"","sources":["../../../src/registry/registry-keys.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAErE,uHAAuH;AACvH,oBAAY,eAAe;IACzB,qGAAqG;IACrG,IAAI,SAAS;IACb,uFAAuF;IACvF,OAAO,YAAY;CACpB;AAED,kFAAkF;AAClF,eAAO,MAAM,gCAAgC,KAAK,CAAC;AACnD,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,uFAAuF;AACvF,eAAO,MAAM,qBAAqB,aAEhC,CAAC;AAEH,4FAA4F;AAC5F,eAAO,MAAM,iCAAiC,4BAA+B,CAAC;AAE9E,eAAO,MAAM,4BAA4B;;;;;kBAK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CAAC;AAE9E,eAAO,MAAM,4BAA4B;;;;;kBAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,6BAA6B;;;;;;;;iBASxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,wBAAwB;;;;;;;iBAOnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E,eAAO,MAAM,6BAA6B;;;;;;;;;;iBAA6F,CAAC;AACxI,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,0BAA0B;;kBAA0E,CAAC;AAElH,eAAO,MAAM,8BAA8B;;kBAA0E,CAAC;AAEtH,iDAAiD;AACjD,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAC/D,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAEnE"}
@@ -52,6 +52,11 @@ export declare const DEFAULT_REGISTRY_SECTION_SCHEMAS: {
52
52
  serviceKey: import("zod").ZodString;
53
53
  path: import("zod").ZodString;
54
54
  }, import("zod/v4/core").$strict>>;
55
+ augments: import("zod").ZodOptional<import("zod").ZodString>;
56
+ vendorPins: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodString>>;
57
+ heldVendorPins: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
58
+ onlyBuiltDependencies: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
59
+ heldOnlyBuiltDependencies: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
55
60
  }, import("zod/v4/core").$strict>>;
56
61
  }, import("zod/v4/core").$strict>>;
57
62
  }, import("zod/v4/core").$strict>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"registry-section-schemas.constants.d.ts","sourceRoot":"","sources":["../../../src/registry/registry-section-schemas.constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEnC,CAAC;AAEX,MAAM,MAAM,6BAA6B,GAAG,OAAO,gCAAgC,CAAC"}
1
+ {"version":3,"file":"registry-section-schemas.constants.d.ts","sourceRoot":"","sources":["../../../../src/registry/registry-section-schemas.constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEnC,CAAC;AAEX,MAAM,MAAM,6BAA6B,GAAG,OAAO,gCAAgC,CAAC"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Which registry a command talks to, and whether it may (#1764).
3
+ *
4
+ * Translates a `--registry <id-or-url>` flag (or the absence thereof)
5
+ * to a concrete registry HTTP origin. Three sources are consulted in
6
+ * order:
7
+ *
8
+ * 1. Explicit `--registry` flag — accepts a stable registry id
9
+ * (matched against `wildo.saas.config.ts > moduleRegistries[].id`)
10
+ * OR a literal URL OR one of the well-known aliases (`local`,
11
+ * `public`).
12
+ * 2. `moduleRegistries` from `wildo.saas.config.ts` — when present,
13
+ * the entry whose `id === DEFAULT_REGISTRY_ID` (or the only
14
+ * entry, if there's exactly one) is the implicit default. Callers
15
+ * pass the array in; this module reads no file.
16
+ * 3. Default-URL policy — framework-developer mode (env
17
+ * `WILDO_FRAMEWORK_DEVELOPER=1`) → `DEFAULT_LOCAL_REGISTRY_URL`,
18
+ * otherwise `DEFAULT_PUBLIC_REGISTRY_URL`.
19
+ *
20
+ * Stateless: it doesn't read the credentials store or talk to the network. It lives here, beside the
21
+ * defaults it resolves to, because two runtimes ask the question — the CLI's registry commands and the dev
22
+ * companion, which lists the registry's providers for an application-creation brief (#2025) — and they must
23
+ * not disagree about which registry that is.
24
+ */
25
+ import type { RegistryConfig } from './registry-config.schemas';
26
+ export interface ResolveRegistryUrlInput {
27
+ /** The `--registry` flag value, if any. Accepts id, alias, or URL. */
28
+ flag?: string;
29
+ /** `moduleRegistries` entries from the loaded `wildo.saas.config.ts`. */
30
+ moduleRegistries?: RegistryConfig;
31
+ /** Force framework-developer mode (otherwise read from env). */
32
+ forceFrameworkDeveloperMode?: boolean;
33
+ }
34
+ /** Where a resolved registry URL came from. Printed in diagnostics, so an operator can see which rule chose it. */
35
+ export declare enum ResolvedRegistrySource {
36
+ /** `--registry` named a literal URL. */
37
+ FLAG_URL = "flag-url",
38
+ /** `--registry` named an alias, `local` or `public`. */
39
+ FLAG_ALIAS = "flag-alias",
40
+ /** `--registry` named the id of a `moduleRegistries` entry. */
41
+ FLAG_ID = "flag-id",
42
+ /** No flag: the config's default entry (`id === DEFAULT_REGISTRY_ID`, or its only entry). */
43
+ CONFIG_DEFAULT = "config-default",
44
+ /** No flag and no default entry: the local registry in framework-developer mode, else the public one. */
45
+ ENV_POLICY = "env-policy"
46
+ }
47
+ export interface ResolvedRegistry {
48
+ url: string;
49
+ /** Source the URL came from — useful for diagnostic messages. */
50
+ source: ResolvedRegistrySource;
51
+ /** Registry id from the config, when the URL was resolved via id lookup. */
52
+ id?: string;
53
+ }
54
+ /**
55
+ * Refuse to talk to a registry over a transport that exposes the key and the module source (#1764).
56
+ *
57
+ * `https:` always passes. `http:` passes only to a loopback host — the local development registry on
58
+ * `localhost:5154` — or to a registry whose `moduleRegistries` entry names `allowInsecureHttp: true`.
59
+ * Anything else is refused BEFORE a key is sent or a byte fetched. The artifact digest is no defence on
60
+ * plain HTTP: the server that serves the bytes also reports the digest.
61
+ *
62
+ * Decided by this repository's fail-closed principle: refusal is the default, and the door past it is
63
+ * named per registry in config rather than a flag any command could pass.
64
+ */
65
+ export declare function assertRegistryTransportIsSafe(url: string, moduleRegistries?: RegistryConfig): void;
66
+ /**
67
+ * Resolve a registry URL from the supplied input. Throws when the
68
+ * `--registry` flag references an id that doesn't appear in the
69
+ * loaded `moduleRegistries` (the most common configuration error).
70
+ */
71
+ export declare function resolveRegistryUrl(input: ResolveRegistryUrlInput): ResolvedRegistry;
72
+ //# sourceMappingURL=registry-url-resolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-url-resolution.d.ts","sourceRoot":"","sources":["../../../../src/registry/registry-url-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yEAAyE;IACzE,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,gEAAgE;IAChE,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,mHAAmH;AACnH,oBAAY,sBAAsB;IAChC,wCAAwC;IACxC,QAAQ,aAAa;IACrB,wDAAwD;IACxD,UAAU,eAAe;IACzB,+DAA+D;IAC/D,OAAO,YAAY;IACnB,6FAA6F;IAC7F,cAAc,mBAAmB;IACjC,yGAAyG;IACzG,UAAU,eAAe;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,iEAAiE;IACjE,MAAM,EAAE,sBAAsB,CAAC;IAC/B,4EAA4E;IAC5E,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AA8BD;;;;;;;;;;GAUG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,EAAE,gBAAgB,GAAE,cAAmB,GAAG,IAAI,CAoBtG;AAUD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,GAAG,gBAAgB,CAKnF"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Which registry a command talks to, and whether it may (#1764).
3
+ *
4
+ * Translates a `--registry <id-or-url>` flag (or the absence thereof)
5
+ * to a concrete registry HTTP origin. Three sources are consulted in
6
+ * order:
7
+ *
8
+ * 1. Explicit `--registry` flag — accepts a stable registry id
9
+ * (matched against `wildo.saas.config.ts > moduleRegistries[].id`)
10
+ * OR a literal URL OR one of the well-known aliases (`local`,
11
+ * `public`).
12
+ * 2. `moduleRegistries` from `wildo.saas.config.ts` — when present,
13
+ * the entry whose `id === DEFAULT_REGISTRY_ID` (or the only
14
+ * entry, if there's exactly one) is the implicit default. Callers
15
+ * pass the array in; this module reads no file.
16
+ * 3. Default-URL policy — framework-developer mode (env
17
+ * `WILDO_FRAMEWORK_DEVELOPER=1`) → `DEFAULT_LOCAL_REGISTRY_URL`,
18
+ * otherwise `DEFAULT_PUBLIC_REGISTRY_URL`.
19
+ *
20
+ * Stateless: it doesn't read the credentials store or talk to the network. It lives here, beside the
21
+ * defaults it resolves to, because two runtimes ask the question — the CLI's registry commands and the dev
22
+ * companion, which lists the registry's providers for an application-creation brief (#2025) — and they must
23
+ * not disagree about which registry that is.
24
+ */
25
+ import { DEFAULT_LOCAL_REGISTRY_URL, DEFAULT_PUBLIC_REGISTRY_URL, DEFAULT_REGISTRY_ID } from './registry-defaults.constants.js';
26
+ /** Where a resolved registry URL came from. Printed in diagnostics, so an operator can see which rule chose it. */
27
+ export var ResolvedRegistrySource;
28
+ (function (ResolvedRegistrySource) {
29
+ /** `--registry` named a literal URL. */
30
+ ResolvedRegistrySource["FLAG_URL"] = "flag-url";
31
+ /** `--registry` named an alias, `local` or `public`. */
32
+ ResolvedRegistrySource["FLAG_ALIAS"] = "flag-alias";
33
+ /** `--registry` named the id of a `moduleRegistries` entry. */
34
+ ResolvedRegistrySource["FLAG_ID"] = "flag-id";
35
+ /** No flag: the config's default entry (`id === DEFAULT_REGISTRY_ID`, or its only entry). */
36
+ ResolvedRegistrySource["CONFIG_DEFAULT"] = "config-default";
37
+ /** No flag and no default entry: the local registry in framework-developer mode, else the public one. */
38
+ ResolvedRegistrySource["ENV_POLICY"] = "env-policy";
39
+ })(ResolvedRegistrySource || (ResolvedRegistrySource = {}));
40
+ function isFrameworkDeveloperMode(forceFrameworkDeveloperMode) {
41
+ if (forceFrameworkDeveloperMode !== undefined)
42
+ return forceFrameworkDeveloperMode;
43
+ return process.env.WILDO_FRAMEWORK_DEVELOPER === '1' || process.env.WILDO_FRAMEWORK_DEVELOPER === 'true';
44
+ }
45
+ function resolveAlias(value) {
46
+ if (value === 'local')
47
+ return DEFAULT_LOCAL_REGISTRY_URL;
48
+ if (value === 'public')
49
+ return DEFAULT_PUBLIC_REGISTRY_URL;
50
+ return undefined;
51
+ }
52
+ function looksLikeUrl(value) {
53
+ return /^https?:\/\//i.test(value);
54
+ }
55
+ /**
56
+ * A host this machine answers for. The literal loopback addresses are loopback by construction. Bare
57
+ * `localhost` is NOT — Node resolves it through `getaddrinfo` and the hosts file like any name — but every
58
+ * mainstream OS maps it to loopback in its default configuration, and it is the local registry's own
59
+ * default address. A `*.localhost` subdomain is NOT guaranteed the same: some resolvers map it to loopback
60
+ * (systemd's `nss-myhostname` where configured), others pass it to DNS, where it can leave the machine.
61
+ * So it is refused (#1764 review, reasoning corrected in the re-review R12).
62
+ */
63
+ function isLoopbackHost(hostname) {
64
+ const host = hostname.replace(/^\[|\]$/g, '').toLowerCase();
65
+ return host === 'localhost' || host === '::1' || /^127(\.\d{1,3}){3}$/.test(host);
66
+ }
67
+ /**
68
+ * Refuse to talk to a registry over a transport that exposes the key and the module source (#1764).
69
+ *
70
+ * `https:` always passes. `http:` passes only to a loopback host — the local development registry on
71
+ * `localhost:5154` — or to a registry whose `moduleRegistries` entry names `allowInsecureHttp: true`.
72
+ * Anything else is refused BEFORE a key is sent or a byte fetched. The artifact digest is no defence on
73
+ * plain HTTP: the server that serves the bytes also reports the digest.
74
+ *
75
+ * Decided by this repository's fail-closed principle: refusal is the default, and the door past it is
76
+ * named per registry in config rather than a flag any command could pass.
77
+ */
78
+ export function assertRegistryTransportIsSafe(url, moduleRegistries = []) {
79
+ let parsed;
80
+ try {
81
+ parsed = new URL(url);
82
+ }
83
+ catch {
84
+ throw new Error(`Registry URL "${url}" is not a valid URL.`);
85
+ }
86
+ if (parsed.protocol === 'https:')
87
+ return;
88
+ if (parsed.protocol !== 'http:') {
89
+ throw new Error(`Registry URL "${url}" uses ${parsed.protocol}; only https (or http to a loopback host) is supported.`);
90
+ }
91
+ if (isLoopbackHost(parsed.hostname))
92
+ return;
93
+ const origin = parsed.origin;
94
+ const optedOut = moduleRegistries.some((entry) => entry.allowInsecureHttp === true && safeOrigin(entry.url) === origin);
95
+ if (optedOut)
96
+ return;
97
+ throw new Error(`Refusing plain http to the remote registry ${origin}: the registry key and module source would travel in cleartext. `
98
+ + 'Use its https URL. If this registry genuinely has none, declare it in `wildo.saas.config.ts > moduleRegistries` '
99
+ + 'with `allowInsecureHttp: true`.');
100
+ }
101
+ function safeOrigin(value) {
102
+ try {
103
+ return new URL(value).origin;
104
+ }
105
+ catch {
106
+ return undefined;
107
+ }
108
+ }
109
+ /**
110
+ * Resolve a registry URL from the supplied input. Throws when the
111
+ * `--registry` flag references an id that doesn't appear in the
112
+ * loaded `moduleRegistries` (the most common configuration error).
113
+ */
114
+ export function resolveRegistryUrl(input) {
115
+ const resolved = resolveRegistryUrlUnchecked(input);
116
+ // Every source — flag URL, alias, config entry, env policy — passes the same transport gate (#1764).
117
+ assertRegistryTransportIsSafe(resolved.url, input.moduleRegistries ?? []);
118
+ return resolved;
119
+ }
120
+ function resolveRegistryUrlUnchecked(input) {
121
+ const { flag, moduleRegistries = [] } = input;
122
+ if (flag) {
123
+ const alias = resolveAlias(flag);
124
+ if (alias) {
125
+ return { url: alias, source: ResolvedRegistrySource.FLAG_ALIAS };
126
+ }
127
+ if (looksLikeUrl(flag)) {
128
+ return { url: flag, source: ResolvedRegistrySource.FLAG_URL };
129
+ }
130
+ const entry = moduleRegistries.find((r) => r.id === flag);
131
+ if (!entry) {
132
+ const known = moduleRegistries.map((r) => `"${r.id}"`).join(', ');
133
+ throw new Error(`Unknown registry id "${flag}". ` +
134
+ (known.length > 0
135
+ ? `Configured registry ids: ${known}. `
136
+ : 'No registries configured in `wildo.saas.config.ts > moduleRegistries`. ') +
137
+ 'Pass an explicit URL or one of the aliases `local` / `public`.');
138
+ }
139
+ return { url: entry.url, source: ResolvedRegistrySource.FLAG_ID, id: entry.id };
140
+ }
141
+ // No flag — prefer the config's default-id entry, fall back to the
142
+ // single entry if there's exactly one, otherwise apply env-policy.
143
+ if (moduleRegistries.length > 0) {
144
+ const defaultEntry = moduleRegistries.find((r) => r.id === DEFAULT_REGISTRY_ID) ??
145
+ (moduleRegistries.length === 1 ? moduleRegistries[0] : undefined);
146
+ if (defaultEntry) {
147
+ return { url: defaultEntry.url, source: ResolvedRegistrySource.CONFIG_DEFAULT, id: defaultEntry.id };
148
+ }
149
+ }
150
+ return {
151
+ url: isFrameworkDeveloperMode(input.forceFrameworkDeveloperMode)
152
+ ? DEFAULT_LOCAL_REGISTRY_URL
153
+ : DEFAULT_PUBLIC_REGISTRY_URL,
154
+ source: ResolvedRegistrySource.ENV_POLICY,
155
+ };
156
+ }
157
+ //# sourceMappingURL=registry-url-resolution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry-url-resolution.js","sourceRoot":"","sources":["../../../../src/registry/registry-url-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAY7H,mHAAmH;AACnH,MAAM,CAAN,IAAY,sBAWX;AAXD,WAAY,sBAAsB;IAChC,wCAAwC;IACxC,+CAAqB,CAAA;IACrB,wDAAwD;IACxD,mDAAyB,CAAA;IACzB,+DAA+D;IAC/D,6CAAmB,CAAA;IACnB,6FAA6F;IAC7F,2DAAiC,C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AAC;YACjB,OAAO,EAAE,GAAG,EAAE,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,sBAAsB,CAAC,cAAc,EAAE,EAAE,EAAE,YAAY,CAAC,EAAE,EAAE,CAAC;QACvG,CAAC;IACH,CAAC;IAED,OAAO;QACL,GAAG,EAAE,wBAAwB,CAAC,KAAK,CAAC,2BAA2B,CAAC;YAC9D,CAAC,CAAC,0BAA0B;YAC5B,CAAC,CAAC,2BAA2B;QAC/B,MAAM,EAAE,sBAAsB,CAAC,UAAU;KAC1C,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Which registry a command talks to, and whether it may (#1764).\n *\n * Translates a `--registry <id-or-url>` flag (or the absence thereof)\n * to a concrete registry HTTP origin. Three sources are consulted in\n * order:\n *\n * 1. Explicit `--registry` flag — accepts a stable registry id\n * (matched against `wildo.saas.config.ts > moduleRegistries[].id`)\n * OR a literal URL OR one of the well-known aliases (`local`,\n * `public`).\n * 2. `moduleRegistries` from `wildo.saas.config.ts` — when present,\n * the entry whose `id === DEFAULT_REGISTRY_ID` (or the only\n * entry, if there's exactly one) is the implicit default. Callers\n * pass the array in; this module reads no file.\n * 3. Default-URL policy — framework-developer mode (env\n * `WILDO_FRAMEWORK_DEVELOPER=1`) → `DEFAULT_LOCAL_REGISTRY_URL`,\n * otherwise `DEFAULT_PUBLIC_REGISTRY_URL`.\n *\n * Stateless: it doesn't read the credentials store or talk to the network. It lives here, beside the\n * defaults it resolves to, because two runtimes ask the question — the CLI's registry commands and the dev\n * companion, which lists the registry's providers for an application-creation brief (#2025) — and they must\n * not disagree about which registry that is.\n */\n\nimport { DEFAULT_LOCAL_REGISTRY_URL, DEFAULT_PUBLIC_REGISTRY_URL, DEFAULT_REGISTRY_ID } from './registry-defaults.constants';\nimport type { RegistryConfig } from './registry-config.schemas';\n\nexport interface ResolveRegistryUrlInput {\n /** The `--registry` flag value, if any. Accepts id, alias, or URL. */\n flag?: string;\n /** `moduleRegistries` entries from the loaded `wildo.saas.config.ts`. */\n moduleRegistries?: RegistryConfig;\n /** Force framework-developer mode (otherwise read from env). */\n forceFrameworkDeveloperMode?: boolean;\n}\n\n/** Where a resolved registry URL came from. Printed in diagnostics, so an operator can see which rule chose it. */\nexport enum ResolvedRegistrySource {\n /** `--registry` named a literal URL. */\n FLAG_URL = 'flag-url',\n /** `--registry` named an alias, `local` or `public`. */\n FLAG_ALIAS = 'flag-alias',\n /** `--registry` named the id of a `moduleRegistries` entry. */\n FLAG_ID = 'flag-id',\n /** No flag: the config's default entry (`id === DEFAULT_REGISTRY_ID`, or its only entry). */\n CONFIG_DEFAULT = 'config-default',\n /** No flag and no default entry: the local registry in framework-developer mode, else the public one. */\n ENV_POLICY = 'env-policy',\n}\n\nexport interface ResolvedRegistry {\n url: string;\n /** Source the URL came from — useful for diagnostic messages. */\n source: ResolvedRegistrySource;\n /** Registry id from the config, when the URL was resolved via id lookup. */\n id?: string;\n}\n\nfunction isFrameworkDeveloperMode(forceFrameworkDeveloperMode?: boolean): boolean {\n if (forceFrameworkDeveloperMode !== undefined) return forceFrameworkDeveloperMode;\n return process.env.WILDO_FRAMEWORK_DEVELOPER === '1' || process.env.WILDO_FRAMEWORK_DEVELOPER === 'true';\n}\n\nfunction resolveAlias(value: string): string | undefined {\n if (value === 'local') return DEFAULT_LOCAL_REGISTRY_URL;\n if (value === 'public') return DEFAULT_PUBLIC_REGISTRY_URL;\n return undefined;\n}\n\nfunction looksLikeUrl(value: string): boolean {\n return /^https?:\\/\\//i.test(value);\n}\n\n/**\n * A host this machine answers for. The literal loopback addresses are loopback by construction. Bare\n * `localhost` is NOT — Node resolves it through `getaddrinfo` and the hosts file like any name — but every\n * mainstream OS maps it to loopback in its default configuration, and it is the local registry's own\n * default address. A `*.localhost` subdomain is NOT guaranteed the same: some resolvers map it to loopback\n * (systemd's `nss-myhostname` where configured), others pass it to DNS, where it can leave the machine.\n * So it is refused (#1764 review, reasoning corrected in the re-review R12).\n */\nfunction isLoopbackHost(hostname: string): boolean {\n const host = hostname.replace(/^\\[|\\]$/g, '').toLowerCase();\n return host === 'localhost' || host === '::1' || /^127(\\.\\d{1,3}){3}$/.test(host);\n}\n\n/**\n * Refuse to talk to a registry over a transport that exposes the key and the module source (#1764).\n *\n * `https:` always passes. `http:` passes only to a loopback host — the local development registry on\n * `localhost:5154` — or to a registry whose `moduleRegistries` entry names `allowInsecureHttp: true`.\n * Anything else is refused BEFORE a key is sent or a byte fetched. The artifact digest is no defence on\n * plain HTTP: the server that serves the bytes also reports the digest.\n *\n * Decided by this repository's fail-closed principle: refusal is the default, and the door past it is\n * named per registry in config rather than a flag any command could pass.\n */\nexport function assertRegistryTransportIsSafe(url: string, moduleRegistries: RegistryConfig = []): void {\n let parsed: URL;\n try {\n parsed = new URL(url);\n } catch {\n throw new Error(`Registry URL \"${url}\" is not a valid URL.`);\n }\n if (parsed.protocol === 'https:') return;\n if (parsed.protocol !== 'http:') {\n throw new Error(`Registry URL \"${url}\" uses ${parsed.protocol}; only https (or http to a loopback host) is supported.`);\n }\n if (isLoopbackHost(parsed.hostname)) return;\n const origin = parsed.origin;\n const optedOut = moduleRegistries.some((entry) => entry.allowInsecureHttp === true && safeOrigin(entry.url) === origin);\n if (optedOut) return;\n throw new Error(\n `Refusing plain http to the remote registry ${origin}: the registry key and module source would travel in cleartext. `\n + 'Use its https URL. If this registry genuinely has none, declare it in `wildo.saas.config.ts > moduleRegistries` '\n + 'with `allowInsecureHttp: true`.',\n );\n}\n\nfunction safeOrigin(value: string): string | undefined {\n try {\n return new URL(value).origin;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Resolve a registry URL from the supplied input. Throws when the\n * `--registry` flag references an id that doesn't appear in the\n * loaded `moduleRegistries` (the most common configuration error).\n */\nexport function resolveRegistryUrl(input: ResolveRegistryUrlInput): ResolvedRegistry {\n const resolved = resolveRegistryUrlUnchecked(input);\n // Every source — flag URL, alias, config entry, env policy — passes the same transport gate (#1764).\n assertRegistryTransportIsSafe(resolved.url, input.moduleRegistries ?? []);\n return resolved;\n}\n\nfunction resolveRegistryUrlUnchecked(input: ResolveRegistryUrlInput): ResolvedRegistry {\n const { flag, moduleRegistries = [] } = input;\n\n if (flag) {\n const alias = resolveAlias(flag);\n if (alias) {\n return { url: alias, source: ResolvedRegistrySource.FLAG_ALIAS };\n }\n if (looksLikeUrl(flag)) {\n return { url: flag, source: ResolvedRegistrySource.FLAG_URL };\n }\n const entry = moduleRegistries.find((r) => r.id === flag);\n if (!entry) {\n const known = moduleRegistries.map((r) => `\"${r.id}\"`).join(', ');\n throw new Error(\n `Unknown registry id \"${flag}\". ` +\n (known.length > 0\n ? `Configured registry ids: ${known}. `\n : 'No registries configured in `wildo.saas.config.ts > moduleRegistries`. ') +\n 'Pass an explicit URL or one of the aliases `local` / `public`.',\n );\n }\n return { url: entry.url, source: ResolvedRegistrySource.FLAG_ID, id: entry.id };\n }\n\n // No flag — prefer the config's default-id entry, fall back to the\n // single entry if there's exactly one, otherwise apply env-policy.\n if (moduleRegistries.length > 0) {\n const defaultEntry =\n moduleRegistries.find((r) => r.id === DEFAULT_REGISTRY_ID) ??\n (moduleRegistries.length === 1 ? moduleRegistries[0] : undefined);\n if (defaultEntry) {\n return { url: defaultEntry.url, source: ResolvedRegistrySource.CONFIG_DEFAULT, id: defaultEntry.id };\n }\n }\n\n return {\n url: isFrameworkDeveloperMode(input.forceFrameworkDeveloperMode)\n ? DEFAULT_LOCAL_REGISTRY_URL\n : DEFAULT_PUBLIC_REGISTRY_URL,\n source: ResolvedRegistrySource.ENV_POLICY,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"framework-info.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/framework-info.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"framework-info.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/framework-info.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
@@ -8,6 +8,61 @@ export declare const WildoFrameworkPublishDockerSecretsSchema: z.ZodObject<{
8
8
  publishToken: z.ZodString;
9
9
  }, z.core.$strip>;
10
10
  export type WildoFrameworkPublishDockerSecrets = z.infer<typeof WildoFrameworkPublishDockerSecretsSchema>;
11
+ /**
12
+ * How to reach the machine that serves the PUBLIC module registry (#2135), under `moduleRegistryHost` in the framework
13
+ * secrets file. `wildo fwk registry-host` deploys to it over SSH.
14
+ *
15
+ * In the SECRETS file, not the tracked framework config (Paul, 2026-10-01): the address is the origin behind the
16
+ * registry's CDN, and a tracked copy would hand it to anyone who reads the repository. The public name is not here
17
+ * either: it is `DEFAULT_PUBLIC_REGISTRY_URL`, the address every CLI already resolves `--registry public` to.
18
+ *
19
+ * Deliberately NOT a member of {@link WildoFrameworkSecretsSchema}: that schema parses the whole file for every release
20
+ * command, and one malformed section must not stop an unrelated one (the `providers.slack` lesson below). The
21
+ * registry-host command reads its section on its own and refuses with a message naming it.
22
+ */
23
+ export declare const WildoFrameworkModuleRegistryHostSchema: z.ZodObject<{
24
+ /** The machine's IP address or DNS name. */
25
+ address: z.ZodString;
26
+ sshPort: z.ZodDefault<z.ZodNumber>;
27
+ sshUser: z.ZodDefault<z.ZodString>;
28
+ /**
29
+ * The private key that opens the machine (`~` is expanded). When set, ssh offers ONLY this key, so a deploy does not
30
+ * depend on what the agent happens to hold, and does not trip the host's brute-force protection by offering every
31
+ * other key first. Absent: the operator's own ssh configuration and agent decide.
32
+ */
33
+ sshIdentityFile: z.ZodOptional<z.ZodString>;
34
+ }, z.core.$strict>;
35
+ export type WildoFrameworkModuleRegistryHost = z.infer<typeof WildoFrameworkModuleRegistryHostSchema>;
36
+ /** The key of the section above in the framework secrets file. */
37
+ export declare const FRAMEWORK_SECRETS_MODULE_REGISTRY_HOST_KEY = "moduleRegistryHost";
38
+ /**
39
+ * Where the registry host's nightly backups go (#2135): a restic repository in a Scaleway Object Storage bucket, in a
40
+ * different region from the host so one datacenter cannot take both. `resticPassword` encrypts every snapshot; losing
41
+ * it makes them all unreadable, so it belongs in a password manager as well as here. Under `registryHostBackup`, and
42
+ * read on its own like {@link WildoFrameworkModuleRegistryHostSchema}.
43
+ */
44
+ export declare const WildoFrameworkRegistryHostBackupSchema: z.ZodObject<{
45
+ scalewayRegion: z.ZodString;
46
+ bucket: z.ZodString;
47
+ /** The S3 endpoint of that region, e.g. `https://s3.nl-ams.scw.cloud`. */
48
+ endpoint: z.ZodURL;
49
+ accessKey: z.ZodString;
50
+ secretKey: z.ZodString;
51
+ resticPassword: z.ZodString;
52
+ }, z.core.$strict>;
53
+ export type WildoFrameworkRegistryHostBackup = z.infer<typeof WildoFrameworkRegistryHostBackupSchema>;
54
+ export declare const FRAMEWORK_SECRETS_REGISTRY_HOST_BACKUP_KEY = "registryHostBackup";
55
+ /**
56
+ * Better Stack Uptime, which watches the registry host: an uptime monitor on its health endpoint and a heartbeat its
57
+ * backup job reports to. A TEAM Uptime API token: a Telemetry "source token" cannot create monitors. Under
58
+ * `betterStack`, read on its own.
59
+ */
60
+ export declare const WildoFrameworkBetterStackSchema: z.ZodObject<{
61
+ apiUrl: z.ZodURL;
62
+ uptimeApiToken: z.ZodString;
63
+ }, z.core.$strip>;
64
+ export type WildoFrameworkBetterStack = z.infer<typeof WildoFrameworkBetterStackSchema>;
65
+ export declare const FRAMEWORK_SECRETS_BETTER_STACK_KEY = "betterStack";
11
66
  /**
12
67
  * One provider's credentials in the framework secrets file: a single secret (an API key), or a named
13
68
  * set of them when the provider issues several — Slack issues a bot token, an app token, OAuth
@@ -1 +1 @@
1
- {"version":3,"file":"framework-secrets.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/framework-secrets.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qCAAqC;;iBAEhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,eAAO,MAAM,wCAAwC;;;iBAGnD,CAAC;AACH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAE1G;;;;;;;;GAQG;AACH,eAAO,MAAM,kCAAkC,2EAG7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,2BAA2B;;;;;;;;;iBAItC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
1
+ {"version":3,"file":"framework-secrets.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/framework-secrets.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qCAAqC;;iBAEhD,CAAC;AACH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,eAAO,MAAM,wCAAwC;;;iBAGnD,CAAC;AACH,MAAM,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,CAAC;AAE1G;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sCAAsC;IACjD,4CAA4C;;;;IAI5C;;;;OAIG;;kBAEH,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AACtG,kEAAkE;AAClE,eAAO,MAAM,0CAA0C,uBAAuB,CAAC;AAE/E;;;;;GAKG;AACH,eAAO,MAAM,sCAAsC;;;IAGjD,0EAA0E;;;;;kBAK1E,CAAC;AACH,MAAM,MAAM,gCAAgC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAC;AACtG,eAAO,MAAM,0CAA0C,uBAAuB,CAAC;AAE/E;;;;GAIG;AACH,eAAO,MAAM,+BAA+B;;;iBAI1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,eAAO,MAAM,kCAAkC,gBAAgB,CAAC;AAEhE;;;;;;;;GAQG;AACH,eAAO,MAAM,kCAAkC,2EAG7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,2BAA2B;;;;;;;;;iBAItC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
@@ -6,6 +6,59 @@ export const WildoFrameworkPublishDockerSecretsSchema = z.object({
6
6
  publishUsername: z.string().min(1).optional(),
7
7
  publishToken: z.string().min(1),
8
8
  });
9
+ /**
10
+ * How to reach the machine that serves the PUBLIC module registry (#2135), under `moduleRegistryHost` in the framework
11
+ * secrets file. `wildo fwk registry-host` deploys to it over SSH.
12
+ *
13
+ * In the SECRETS file, not the tracked framework config (Paul, 2026-10-01): the address is the origin behind the
14
+ * registry's CDN, and a tracked copy would hand it to anyone who reads the repository. The public name is not here
15
+ * either: it is `DEFAULT_PUBLIC_REGISTRY_URL`, the address every CLI already resolves `--registry public` to.
16
+ *
17
+ * Deliberately NOT a member of {@link WildoFrameworkSecretsSchema}: that schema parses the whole file for every release
18
+ * command, and one malformed section must not stop an unrelated one (the `providers.slack` lesson below). The
19
+ * registry-host command reads its section on its own and refuses with a message naming it.
20
+ */
21
+ export const WildoFrameworkModuleRegistryHostSchema = z.strictObject({
22
+ /** The machine's IP address or DNS name. */
23
+ address: z.string().min(1),
24
+ sshPort: z.number().int().min(1).max(65_535).default(22),
25
+ sshUser: z.string().min(1).default('root'),
26
+ /**
27
+ * The private key that opens the machine (`~` is expanded). When set, ssh offers ONLY this key, so a deploy does not
28
+ * depend on what the agent happens to hold, and does not trip the host's brute-force protection by offering every
29
+ * other key first. Absent: the operator's own ssh configuration and agent decide.
30
+ */
31
+ sshIdentityFile: z.string().min(1).optional(),
32
+ });
33
+ /** The key of the section above in the framework secrets file. */
34
+ export const FRAMEWORK_SECRETS_MODULE_REGISTRY_HOST_KEY = 'moduleRegistryHost';
35
+ /**
36
+ * Where the registry host's nightly backups go (#2135): a restic repository in a Scaleway Object Storage bucket, in a
37
+ * different region from the host so one datacenter cannot take both. `resticPassword` encrypts every snapshot; losing
38
+ * it makes them all unreadable, so it belongs in a password manager as well as here. Under `registryHostBackup`, and
39
+ * read on its own like {@link WildoFrameworkModuleRegistryHostSchema}.
40
+ */
41
+ export const WildoFrameworkRegistryHostBackupSchema = z.strictObject({
42
+ scalewayRegion: z.string().min(1),
43
+ bucket: z.string().min(1),
44
+ /** The S3 endpoint of that region, e.g. `https://s3.nl-ams.scw.cloud`. */
45
+ endpoint: z.url(),
46
+ accessKey: z.string().min(1),
47
+ secretKey: z.string().min(1),
48
+ resticPassword: z.string().min(32),
49
+ });
50
+ export const FRAMEWORK_SECRETS_REGISTRY_HOST_BACKUP_KEY = 'registryHostBackup';
51
+ /**
52
+ * Better Stack Uptime, which watches the registry host: an uptime monitor on its health endpoint and a heartbeat its
53
+ * backup job reports to. A TEAM Uptime API token: a Telemetry "source token" cannot create monitors. Under
54
+ * `betterStack`, read on its own.
55
+ */
56
+ export const WildoFrameworkBetterStackSchema = z.object({
57
+ /** The Uptime API base, e.g. `https://uptime.betterstack.com/api/v2`. */
58
+ apiUrl: z.url(),
59
+ uptimeApiToken: z.string().min(1).refine((token) => !/\s/.test(token), { error: 'contains whitespace (an inline comment pasted with it?)' }),
60
+ });
61
+ export const FRAMEWORK_SECRETS_BETTER_STACK_KEY = 'betterStack';
9
62
  /**
10
63
  * One provider's credentials in the framework secrets file: a single secret (an API key), or a named
11
64
  * set of them when the provider issues several — Slack issues a bot token, an app token, OAuth
@@ -1 +1 @@
1
- {"version":3,"file":"framework-secrets.schemas.js","sourceRoot":"","sources":["../../../../src/schemas/framework-secrets.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5D,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAChC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/D,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC7C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAChC,CAAC,CAAC;AAGH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,CAAC,KAAK,CAAC;IACxD,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;CACjC,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,kCAAkC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IAC1F,MAAM,EAAE,wCAAwC,CAAC,QAAQ,EAAE;IAC3D,GAAG,EAAE,qCAAqC,CAAC,QAAQ,EAAE;CACtD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nexport const WildoFrameworkPublishNpmSecretsSchema = z.object({\n publishToken: z.string().min(1),\n});\nexport type WildoFrameworkPublishNpmSecrets = z.infer<typeof WildoFrameworkPublishNpmSecretsSchema>;\n\nexport const WildoFrameworkPublishDockerSecretsSchema = z.object({\n publishUsername: z.string().min(1).optional(),\n publishToken: z.string().min(1),\n});\nexport type WildoFrameworkPublishDockerSecrets = z.infer<typeof WildoFrameworkPublishDockerSecretsSchema>;\n\n/**\n * One provider's credentials in the framework secrets file: a single secret (an API key), or a named\n * set of them when the provider issues several — Slack issues a bot token, an app token, OAuth\n * access/refresh tokens and identifiers that belong together.\n *\n * Until 2026-09-24 only the single-string form was accepted. A Slack credential set stored under\n * `providers.slack` then made the WHOLE file unparseable, and `wildo fwk publish npm` — which reads\n * nothing but `npm.publishToken` — refused every release with a Zod error about Slack.\n */\nexport const WildoFrameworkProviderSecretSchema = z.union([\n z.string().min(1),\n z.record(z.string(), z.string()),\n]);\nexport type WildoFrameworkProviderSecret = z.infer<typeof WildoFrameworkProviderSecretSchema>;\n\nexport const WildoFrameworkSecretsSchema = z.object({\n providers: z.record(z.string(), WildoFrameworkProviderSecretSchema).optional().default({}),\n docker: WildoFrameworkPublishDockerSecretsSchema.optional(),\n npm: WildoFrameworkPublishNpmSecretsSchema.optional(),\n});\nexport type WildoFrameworkSecrets = z.infer<typeof WildoFrameworkSecretsSchema>;\n"]}
1
+ {"version":3,"file":"framework-secrets.schemas.js","sourceRoot":"","sources":["../../../../src/schemas/framework-secrets.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5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AC,QAAQ,EAAE;CACtD,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\n\nexport const WildoFrameworkPublishNpmSecretsSchema = z.object({\n publishToken: z.string().min(1),\n});\nexport type WildoFrameworkPublishNpmSecrets = z.infer<typeof WildoFrameworkPublishNpmSecretsSchema>;\n\nexport const WildoFrameworkPublishDockerSecretsSchema = z.object({\n publishUsername: z.string().min(1).optional(),\n publishToken: z.string().min(1),\n});\nexport type WildoFrameworkPublishDockerSecrets = z.infer<typeof WildoFrameworkPublishDockerSecretsSchema>;\n\n/**\n * How to reach the machine that serves the PUBLIC module registry (#2135), under `moduleRegistryHost` in the framework\n * secrets file. `wildo fwk registry-host` deploys to it over SSH.\n *\n * In the SECRETS file, not the tracked framework config (Paul, 2026-10-01): the address is the origin behind the\n * registry's CDN, and a tracked copy would hand it to anyone who reads the repository. The public name is not here\n * either: it is `DEFAULT_PUBLIC_REGISTRY_URL`, the address every CLI already resolves `--registry public` to.\n *\n * Deliberately NOT a member of {@link WildoFrameworkSecretsSchema}: that schema parses the whole file for every release\n * command, and one malformed section must not stop an unrelated one (the `providers.slack` lesson below). The\n * registry-host command reads its section on its own and refuses with a message naming it.\n */\nexport const WildoFrameworkModuleRegistryHostSchema = z.strictObject({\n /** The machine's IP address or DNS name. */\n address: z.string().min(1),\n sshPort: z.number().int().min(1).max(65_535).default(22),\n sshUser: z.string().min(1).default('root'),\n /**\n * The private key that opens the machine (`~` is expanded). When set, ssh offers ONLY this key, so a deploy does not\n * depend on what the agent happens to hold, and does not trip the host's brute-force protection by offering every\n * other key first. Absent: the operator's own ssh configuration and agent decide.\n */\n sshIdentityFile: z.string().min(1).optional(),\n});\nexport type WildoFrameworkModuleRegistryHost = z.infer<typeof WildoFrameworkModuleRegistryHostSchema>;\n/** The key of the section above in the framework secrets file. */\nexport const FRAMEWORK_SECRETS_MODULE_REGISTRY_HOST_KEY = 'moduleRegistryHost';\n\n/**\n * Where the registry host's nightly backups go (#2135): a restic repository in a Scaleway Object Storage bucket, in a\n * different region from the host so one datacenter cannot take both. `resticPassword` encrypts every snapshot; losing\n * it makes them all unreadable, so it belongs in a password manager as well as here. Under `registryHostBackup`, and\n * read on its own like {@link WildoFrameworkModuleRegistryHostSchema}.\n */\nexport const WildoFrameworkRegistryHostBackupSchema = z.strictObject({\n scalewayRegion: z.string().min(1),\n bucket: z.string().min(1),\n /** The S3 endpoint of that region, e.g. `https://s3.nl-ams.scw.cloud`. */\n endpoint: z.url(),\n accessKey: z.string().min(1),\n secretKey: z.string().min(1),\n resticPassword: z.string().min(32),\n});\nexport type WildoFrameworkRegistryHostBackup = z.infer<typeof WildoFrameworkRegistryHostBackupSchema>;\nexport const FRAMEWORK_SECRETS_REGISTRY_HOST_BACKUP_KEY = 'registryHostBackup';\n\n/**\n * Better Stack Uptime, which watches the registry host: an uptime monitor on its health endpoint and a heartbeat its\n * backup job reports to. A TEAM Uptime API token: a Telemetry \"source token\" cannot create monitors. Under\n * `betterStack`, read on its own.\n */\nexport const WildoFrameworkBetterStackSchema = z.object({\n /** The Uptime API base, e.g. `https://uptime.betterstack.com/api/v2`. */\n apiUrl: z.url(),\n uptimeApiToken: z.string().min(1).refine((token) => !/\\s/.test(token), { error: 'contains whitespace (an inline comment pasted with it?)' }),\n});\nexport type WildoFrameworkBetterStack = z.infer<typeof WildoFrameworkBetterStackSchema>;\nexport const FRAMEWORK_SECRETS_BETTER_STACK_KEY = 'betterStack';\n\n/**\n * One provider's credentials in the framework secrets file: a single secret (an API key), or a named\n * set of them when the provider issues several — Slack issues a bot token, an app token, OAuth\n * access/refresh tokens and identifiers that belong together.\n *\n * Until 2026-09-24 only the single-string form was accepted. A Slack credential set stored under\n * `providers.slack` then made the WHOLE file unparseable, and `wildo fwk publish npm` — which reads\n * nothing but `npm.publishToken` — refused every release with a Zod error about Slack.\n */\nexport const WildoFrameworkProviderSecretSchema = z.union([\n z.string().min(1),\n z.record(z.string(), z.string()),\n]);\nexport type WildoFrameworkProviderSecret = z.infer<typeof WildoFrameworkProviderSecretSchema>;\n\nexport const WildoFrameworkSecretsSchema = z.object({\n providers: z.record(z.string(), WildoFrameworkProviderSecretSchema).optional().default({}),\n docker: WildoFrameworkPublishDockerSecretsSchema.optional(),\n npm: WildoFrameworkPublishNpmSecretsSchema.optional(),\n});\nexport type WildoFrameworkSecrets = z.infer<typeof WildoFrameworkSecretsSchema>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"platform-application-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/platform-application-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kCAAkC;;;;iBAe7C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
1
+ {"version":3,"file":"platform-application-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/platform-application-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kCAAkC;;;;iBAe7C,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"platform-application-secrets.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/platform-application-secrets.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuE9C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
1
+ {"version":3,"file":"platform-application-secrets.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/platform-application-secrets.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuE9C,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"platform-config.schemas.d.ts","sourceRoot":"","sources":["../../../src/schemas/platform-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oCAAoC;;iBAE/C,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAE3F;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;iBAKnC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBpC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACzE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE3E,MAAM,MAAM,6BAA6B,GAAG;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
1
+ {"version":3,"file":"platform-config.schemas.d.ts","sourceRoot":"","sources":["../../../../src/schemas/platform-config.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,oCAAoC;;iBAE/C,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oCAAoC,CAAC,CAAC;AAE3F;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;iBAKnC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqBpC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AACzE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE3E,MAAM,MAAM,6BAA6B,GAAG;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"application-subject-manifest.d.ts","sourceRoot":"","sources":["../../../src/workspace-scope/application-subject-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,KAAK,4BAA4B,EAClC,MAAM,uBAAuB,CAAC;AAK/B,4EAA4E;AAC5E,eAAO,MAAM,sCAAsC,4BACK,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC,EAC/C,OAAO,kCAAuE,CAAC;AAEjF;;;GAGG;AACH,wBAAgB,qCAAqC,CACnD,eAAe,EAAE,MAAM,GACtB,MAAM,CAKR;AAED;;;;;;;GAOG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,MAAM,GACb,4BAA4B,CAQ9B"}
1
+ {"version":3,"file":"application-subject-manifest.d.ts","sourceRoot":"","sources":["../../../../src/workspace-scope/application-subject-manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,KAAK,4BAA4B,EAClC,MAAM,uBAAuB,CAAC;AAK/B,4EAA4E;AAC5E,eAAO,MAAM,sCAAsC,4BACK,CAAC;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,oCAAoC,EAC/C,OAAO,kCAAuE,CAAC;AAEjF;;;GAGG;AACH,wBAAgB,qCAAqC,CACnD,eAAe,EAAE,MAAM,GACtB,MAAM,CAKR;AAED;;;;;;;GAOG;AACH,wBAAgB,mCAAmC,CACjD,MAAM,EAAE,MAAM,GACb,4BAA4B,CAQ9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workspace-scope/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/workspace-scope/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC"}