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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/dist/esm/_unimplemented/soft-warn.d.ts +24 -49
  2. package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -1
  3. package/dist/esm/_unimplemented/soft-warn.js +24 -49
  4. package/dist/esm/_unimplemented/soft-warn.js.map +1 -1
  5. package/dist/esm/blueprint/anchored-region.d.ts +83 -0
  6. package/dist/esm/blueprint/anchored-region.d.ts.map +1 -0
  7. package/dist/esm/blueprint/anchored-region.js +263 -0
  8. package/dist/esm/blueprint/anchored-region.js.map +1 -0
  9. package/dist/esm/blueprint/blueprint.schemas.d.ts +600 -0
  10. package/dist/esm/blueprint/blueprint.schemas.d.ts.map +1 -0
  11. package/dist/esm/blueprint/blueprint.schemas.js +638 -0
  12. package/dist/esm/blueprint/blueprint.schemas.js.map +1 -0
  13. package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
  14. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -1
  15. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -1
  16. package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
  17. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +13 -1
  18. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  19. package/dist/esm/bootstrap/bootstrap.contracts.js +6 -0
  20. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  21. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +29 -4
  22. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  23. package/dist/esm/bootstrap/bootstrap.schemas.js +29 -4
  24. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  25. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +131 -2
  26. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  27. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +139 -2
  28. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  29. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +21 -0
  30. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -1
  31. package/dist/esm/bootstrap/platform-store-preconnect.js +25 -0
  32. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -1
  33. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts +80 -0
  34. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.d.ts.map +1 -0
  35. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js +81 -0
  36. package/dist/esm/bootstrap/postgresql-owed-grants.contracts.js.map +1 -0
  37. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +41 -9
  38. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  39. package/dist/esm/bootstrap/runtime-backing-service-access.js +77 -28
  40. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  41. package/dist/esm/bootstrap/runtime-network-policy.d.ts +117 -12
  42. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  43. package/dist/esm/bootstrap/runtime-network-policy.js +222 -23
  44. package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -1
  45. package/dist/esm/bootstrap/runtime-network-topology.d.ts +31 -4
  46. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  47. package/dist/esm/bootstrap/runtime-network-topology.js +43 -2
  48. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  49. package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -1
  50. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +40 -2
  51. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  52. package/dist/esm/bootstrap/runtime-principal.contracts.js +66 -3
  53. package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -1
  54. package/dist/esm/bootstrap/runtime-response-integrity.d.ts +249 -0
  55. package/dist/esm/bootstrap/runtime-response-integrity.d.ts.map +1 -0
  56. package/dist/esm/bootstrap/runtime-response-integrity.js +353 -0
  57. package/dist/esm/bootstrap/runtime-response-integrity.js.map +1 -0
  58. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts +32 -0
  59. package/dist/esm/bootstrap/runtime-secret-env.contracts.d.ts.map +1 -0
  60. package/dist/esm/bootstrap/runtime-secret-env.contracts.js +43 -0
  61. package/dist/esm/bootstrap/runtime-secret-env.contracts.js.map +1 -0
  62. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  63. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  64. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts +51 -0
  65. package/dist/esm/canonical-json/rfc8785-canonical-json.d.ts.map +1 -0
  66. package/dist/esm/canonical-json/rfc8785-canonical-json.js +231 -0
  67. package/dist/esm/canonical-json/rfc8785-canonical-json.js.map +1 -0
  68. package/dist/esm/config-authoring.entry.js.map +1 -1
  69. package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
  70. package/dist/esm/credentials/credential-generator.service.js.map +1 -1
  71. package/dist/esm/index.d.ts +20 -1
  72. package/dist/esm/index.d.ts.map +1 -1
  73. package/dist/esm/index.js +20 -1
  74. package/dist/esm/index.js.map +1 -1
  75. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts +119 -0
  76. package/dist/esm/key-management/application-legacy-envelope-key.contracts.d.ts.map +1 -0
  77. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js +109 -0
  78. package/dist/esm/key-management/application-legacy-envelope-key.contracts.js.map +1 -0
  79. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts +182 -0
  80. package/dist/esm/key-management/application-signing-key-rotation.contracts.d.ts.map +1 -0
  81. package/dist/esm/key-management/application-signing-key-rotation.contracts.js +145 -0
  82. package/dist/esm/key-management/application-signing-key-rotation.contracts.js.map +1 -0
  83. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts +156 -0
  84. package/dist/esm/key-management/approval-seal-manifested-copy.d.ts.map +1 -0
  85. package/dist/esm/key-management/approval-seal-manifested-copy.js +617 -0
  86. package/dist/esm/key-management/approval-seal-manifested-copy.js.map +1 -0
  87. package/dist/esm/key-management/approval-seal-verifier.d.ts +278 -0
  88. package/dist/esm/key-management/approval-seal-verifier.d.ts.map +1 -0
  89. package/dist/esm/key-management/approval-seal-verifier.js +355 -0
  90. package/dist/esm/key-management/approval-seal-verifier.js.map +1 -0
  91. package/dist/esm/key-management/approval-seal.contracts.d.ts +128 -0
  92. package/dist/esm/key-management/approval-seal.contracts.d.ts.map +1 -0
  93. package/dist/esm/key-management/approval-seal.contracts.js +135 -0
  94. package/dist/esm/key-management/approval-seal.contracts.js.map +1 -0
  95. package/dist/esm/key-management/data-key.contracts.d.ts +106 -0
  96. package/dist/esm/key-management/data-key.contracts.d.ts.map +1 -0
  97. package/dist/esm/key-management/data-key.contracts.js +54 -0
  98. package/dist/esm/key-management/data-key.contracts.js.map +1 -0
  99. package/dist/esm/key-management/es256-jws.d.ts +60 -0
  100. package/dist/esm/key-management/es256-jws.d.ts.map +1 -0
  101. package/dist/esm/key-management/es256-jws.js +135 -0
  102. package/dist/esm/key-management/es256-jws.js.map +1 -0
  103. package/dist/esm/key-management/key-provider.spi.d.ts +158 -0
  104. package/dist/esm/key-management/key-provider.spi.d.ts.map +1 -0
  105. package/dist/esm/key-management/key-provider.spi.js +38 -0
  106. package/dist/esm/key-management/key-provider.spi.js.map +1 -0
  107. package/dist/esm/key-management/keyring-rotation.contracts.d.ts +83 -0
  108. package/dist/esm/key-management/keyring-rotation.contracts.d.ts.map +1 -0
  109. package/dist/esm/key-management/keyring-rotation.contracts.js +101 -0
  110. package/dist/esm/key-management/keyring-rotation.contracts.js.map +1 -0
  111. package/dist/esm/key-management/keyring-status.contracts.d.ts +59 -0
  112. package/dist/esm/key-management/keyring-status.contracts.d.ts.map +1 -0
  113. package/dist/esm/key-management/keyring-status.contracts.js +45 -0
  114. package/dist/esm/key-management/keyring-status.contracts.js.map +1 -0
  115. package/dist/esm/key-management/pdf-incremental-update.d.ts +158 -0
  116. package/dist/esm/key-management/pdf-incremental-update.d.ts.map +1 -0
  117. package/dist/esm/key-management/pdf-incremental-update.js +730 -0
  118. package/dist/esm/key-management/pdf-incremental-update.js.map +1 -0
  119. package/dist/esm/key-management/pdf-truetype-font.d.ts +35 -0
  120. package/dist/esm/key-management/pdf-truetype-font.d.ts.map +1 -0
  121. package/dist/esm/key-management/pdf-truetype-font.js +152 -0
  122. package/dist/esm/key-management/pdf-truetype-font.js.map +1 -0
  123. package/dist/esm/key-management/qr-code.d.ts +38 -0
  124. package/dist/esm/key-management/qr-code.d.ts.map +1 -0
  125. package/dist/esm/key-management/qr-code.js +325 -0
  126. package/dist/esm/key-management/qr-code.js.map +1 -0
  127. package/dist/esm/key-management/signature-request.contracts.d.ts +91 -0
  128. package/dist/esm/key-management/signature-request.contracts.d.ts.map +1 -0
  129. package/dist/esm/key-management/signature-request.contracts.js +96 -0
  130. package/dist/esm/key-management/signature-request.contracts.js.map +1 -0
  131. package/dist/esm/key-management/signing-log-export.contracts.d.ts +215 -0
  132. package/dist/esm/key-management/signing-log-export.contracts.d.ts.map +1 -0
  133. package/dist/esm/key-management/signing-log-export.contracts.js +268 -0
  134. package/dist/esm/key-management/signing-log-export.contracts.js.map +1 -0
  135. package/dist/esm/key-management/vault-custody.contracts.d.ts +98 -0
  136. package/dist/esm/key-management/vault-custody.contracts.d.ts.map +1 -0
  137. package/dist/esm/key-management/vault-custody.contracts.js +154 -0
  138. package/dist/esm/key-management/vault-custody.contracts.js.map +1 -0
  139. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -1
  140. package/dist/esm/lockfile/build-parallelism.js.map +1 -1
  141. package/dist/esm/lockfile/canonical-json.d.ts +1 -1
  142. package/dist/esm/lockfile/canonical-json.d.ts.map +1 -1
  143. package/dist/esm/lockfile/canonical-json.js +1 -1
  144. package/dist/esm/lockfile/canonical-json.js.map +1 -1
  145. package/dist/esm/lockfile/file-lock-hold.d.ts.map +1 -1
  146. package/dist/esm/lockfile/file-lock-hold.js +2 -1
  147. package/dist/esm/lockfile/file-lock-hold.js.map +1 -1
  148. package/dist/esm/lockfile/lockfile-io.d.ts +13 -17
  149. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  150. package/dist/esm/lockfile/lockfile-io.js +29 -30
  151. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  152. package/dist/esm/lockfile/materialize-infra-section.d.ts +22 -20
  153. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  154. package/dist/esm/lockfile/materialize-infra-section.js +13 -14
  155. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  156. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +27 -249
  157. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  158. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +28 -3
  159. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  160. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts +146 -0
  161. package/dist/esm/pnpm-settings/application-pnpm-settings.d.ts.map +1 -0
  162. package/dist/esm/pnpm-settings/application-pnpm-settings.js +573 -0
  163. package/dist/esm/pnpm-settings/application-pnpm-settings.js.map +1 -0
  164. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -1
  165. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +22 -3
  166. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -1
  167. package/dist/esm/project-config/application-served-public-documents.loader.d.ts +26 -0
  168. package/dist/esm/project-config/application-served-public-documents.loader.d.ts.map +1 -0
  169. package/dist/esm/project-config/application-served-public-documents.loader.js +86 -0
  170. package/dist/esm/project-config/application-served-public-documents.loader.js.map +1 -0
  171. package/dist/esm/project-config/backend-compliance-section.reader.d.ts +35 -0
  172. package/dist/esm/project-config/backend-compliance-section.reader.d.ts.map +1 -0
  173. package/dist/esm/project-config/backend-compliance-section.reader.js +123 -0
  174. package/dist/esm/project-config/backend-compliance-section.reader.js.map +1 -0
  175. package/dist/esm/project-config/backend-compliance-section.worker.d.ts +20 -0
  176. package/dist/esm/project-config/backend-compliance-section.worker.d.ts.map +1 -0
  177. package/dist/esm/project-config/backend-compliance-section.worker.js +78 -0
  178. package/dist/esm/project-config/backend-compliance-section.worker.js.map +1 -0
  179. package/dist/esm/project-config/config-module-resolution.d.ts +32 -0
  180. package/dist/esm/project-config/config-module-resolution.d.ts.map +1 -0
  181. package/dist/esm/project-config/config-module-resolution.js +33 -0
  182. package/dist/esm/project-config/config-module-resolution.js.map +1 -0
  183. package/dist/esm/project-config/define-framework-config.js.map +1 -1
  184. package/dist/esm/project-config/define-infra-env-config.d.ts +344 -69
  185. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  186. package/dist/esm/project-config/define-infra-env-config.js +194 -143
  187. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  188. package/dist/esm/project-config/define-minion-config.d.ts +26 -36
  189. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  190. package/dist/esm/project-config/define-minion-config.js +64 -25
  191. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  192. package/dist/esm/project-config/define-saas-config.d.ts +82 -348
  193. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  194. package/dist/esm/project-config/define-saas-config.js +262 -103
  195. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  196. package/dist/esm/project-config/define-worker-config.d.ts +10 -20
  197. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  198. package/dist/esm/project-config/define-worker-config.js +10 -12
  199. package/dist/esm/project-config/define-worker-config.js.map +1 -1
  200. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -1
  201. package/dist/esm/project-config/hosted-infra-env-config.js +4 -1
  202. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -1
  203. package/dist/esm/project-config/index.d.ts +5 -0
  204. package/dist/esm/project-config/index.d.ts.map +1 -1
  205. package/dist/esm/project-config/index.js +5 -0
  206. package/dist/esm/project-config/index.js.map +1 -1
  207. package/dist/esm/project-config/loader-instances-zod.d.ts +19 -0
  208. package/dist/esm/project-config/loader-instances-zod.d.ts.map +1 -0
  209. package/dist/esm/project-config/loader-instances-zod.js +40 -0
  210. package/dist/esm/project-config/loader-instances-zod.js.map +1 -0
  211. package/dist/esm/project-config/loader.d.ts +131 -14
  212. package/dist/esm/project-config/loader.d.ts.map +1 -1
  213. package/dist/esm/project-config/loader.js +226 -12
  214. package/dist/esm/project-config/loader.js.map +1 -1
  215. package/dist/esm/project-config/minion-liveness.contracts.d.ts +131 -0
  216. package/dist/esm/project-config/minion-liveness.contracts.d.ts.map +1 -0
  217. package/dist/esm/project-config/minion-liveness.contracts.js +167 -0
  218. package/dist/esm/project-config/minion-liveness.contracts.js.map +1 -0
  219. package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -1
  220. package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -1
  221. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -1
  222. package/dist/esm/project-config/npm-version-range.js +39 -16
  223. package/dist/esm/project-config/npm-version-range.js.map +1 -1
  224. package/dist/esm/project-config/owning-package-tsconfig.d.ts +15 -0
  225. package/dist/esm/project-config/owning-package-tsconfig.d.ts.map +1 -0
  226. package/dist/esm/project-config/owning-package-tsconfig.js +29 -0
  227. package/dist/esm/project-config/owning-package-tsconfig.js.map +1 -0
  228. package/dist/esm/project-config/provider-catalog-types.js.map +1 -1
  229. package/dist/esm/project-config/provider-companion-discovery.d.ts +4 -4
  230. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  231. package/dist/esm/project-config/provider-companion-discovery.js +16 -10
  232. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  233. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +103 -49
  234. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  235. package/dist/esm/project-config/provider-runtime-artifacts.js +216 -16
  236. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  237. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +0 -2
  238. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  239. package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -1
  240. package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
  241. package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
  242. package/dist/esm/project-config/shared/auth.schemas.d.ts +0 -17
  243. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  244. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  245. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -1
  246. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +9 -10
  247. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  248. package/dist/esm/project-config/shared/backing-services.schemas.js +13 -15
  249. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  250. package/dist/esm/project-config/shared/cdn.schemas.d.ts +0 -51
  251. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  252. package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -1
  253. package/dist/esm/project-config/shared/csp-defaults.d.ts +36 -9
  254. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  255. package/dist/esm/project-config/shared/csp-defaults.js +54 -11
  256. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -1
  257. package/dist/esm/project-config/shared/csp-emit.d.ts +60 -13
  258. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  259. package/dist/esm/project-config/shared/csp-emit.js +77 -24
  260. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  261. package/dist/esm/project-config/shared/csp.schemas.d.ts +72 -85
  262. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  263. package/dist/esm/project-config/shared/csp.schemas.js +40 -13
  264. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  265. package/dist/esm/project-config/shared/data-services.schemas.d.ts +0 -8
  266. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  267. package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
  268. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  269. package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
  270. package/dist/esm/project-config/shared/environment.schemas.d.ts +101 -8
  271. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  272. package/dist/esm/project-config/shared/environment.schemas.js +128 -9
  273. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  274. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +10 -4
  275. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  276. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  277. package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -1
  278. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +2 -1
  279. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  280. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +4 -1
  281. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  282. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  283. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  284. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  285. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  286. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +24 -0
  287. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  288. package/dist/esm/project-config/shared/minion-resource-access.validation.js +25 -2
  289. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  290. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -1
  291. package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -1
  292. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts +276 -0
  293. package/dist/esm/project-config/shared/platform-key-management.schemas.d.ts.map +1 -0
  294. package/dist/esm/project-config/shared/platform-key-management.schemas.js +296 -0
  295. package/dist/esm/project-config/shared/platform-key-management.schemas.js.map +1 -0
  296. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  297. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +2 -2
  298. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -1
  299. package/dist/esm/project-config/shared/platform-storage.schemas.js +16 -2
  300. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -1
  301. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +21 -23
  302. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  303. package/dist/esm/project-config/shared/service-definitions.schemas.js +4 -5
  304. package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
  305. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +0 -18
  306. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -1
  307. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -1
  308. package/dist/esm/project-config/static-asset-import-noop.d.ts +20 -3
  309. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -1
  310. package/dist/esm/project-config/static-asset-import-noop.js +36 -20
  311. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -1
  312. package/dist/esm/registry/artifact-domain.schemas.d.ts +0 -5
  313. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  314. package/dist/esm/registry/artifact-domain.schemas.js.map +1 -1
  315. package/dist/esm/registry/digest.schemas.js.map +1 -1
  316. package/dist/esm/registry/index.d.ts +3 -3
  317. package/dist/esm/registry/index.d.ts.map +1 -1
  318. package/dist/esm/registry/index.js +3 -3
  319. package/dist/esm/registry/index.js.map +1 -1
  320. package/dist/esm/registry/local-checkout-source.d.ts +22 -2
  321. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -1
  322. package/dist/esm/registry/local-checkout-source.js +66 -3
  323. package/dist/esm/registry/local-checkout-source.js.map +1 -1
  324. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +11 -98
  325. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  326. package/dist/esm/registry/lockfile-modules-section.schemas.js +1 -2
  327. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  328. package/dist/esm/registry/module-artifact.schemas.d.ts +40 -17
  329. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  330. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  331. package/dist/esm/registry/module-manifest.schemas.d.ts +324 -74
  332. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  333. package/dist/esm/registry/module-manifest.schemas.js +377 -19
  334. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  335. package/dist/esm/registry/module-search.schemas.d.ts +2 -0
  336. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -1
  337. package/dist/esm/registry/module-search.schemas.js +14 -1
  338. package/dist/esm/registry/module-search.schemas.js.map +1 -1
  339. package/dist/esm/registry/registry-config.schemas.d.ts +0 -18
  340. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  341. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  342. package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -1
  343. package/dist/esm/registry/registry-defaults.constants.js.map +1 -1
  344. package/dist/esm/registry/registry-errors.d.ts +103 -5
  345. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  346. package/dist/esm/registry/registry-errors.js +213 -6
  347. package/dist/esm/registry/registry-errors.js.map +1 -1
  348. package/dist/esm/registry/registry-keys.schemas.js.map +1 -1
  349. package/dist/esm/registry/registry-section-schemas.constants.d.ts +5 -0
  350. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  351. package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -1
  352. package/dist/esm/registry/registry-url-resolution.d.ts +72 -0
  353. package/dist/esm/registry/registry-url-resolution.d.ts.map +1 -0
  354. package/dist/esm/registry/registry-url-resolution.js +157 -0
  355. package/dist/esm/registry/registry-url-resolution.js.map +1 -0
  356. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  357. package/dist/esm/release/framework-release.constants.js.map +1 -1
  358. package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
  359. package/dist/esm/schemas/framework-secrets.schemas.d.ts +48 -0
  360. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  361. package/dist/esm/schemas/framework-secrets.schemas.js +53 -0
  362. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  363. package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
  364. package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
  365. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +1 -1
  366. package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
  367. package/dist/esm/schemas/platform-config.schemas.d.ts +2 -2
  368. package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
  369. package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -1
  370. package/dist/esm/workspace-scope/index.js.map +1 -1
  371. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  372. package/dist/esm/workspace-scope/resolve-homes.js.map +1 -1
  373. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  374. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  375. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
  376. package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
  377. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  378. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  379. package/dist/tsconfig.build.tsbuildinfo +1 -1
  380. package/package.json +12 -12
  381. package/dist/esm/_unimplemented/index.d.ts +0 -3
  382. package/dist/esm/_unimplemented/index.d.ts.map +0 -1
  383. package/dist/esm/_unimplemented/index.js +0 -3
  384. package/dist/esm/_unimplemented/index.js.map +0 -1
  385. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +0 -137
  386. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +0 -1
  387. package/dist/esm/_unimplemented/unimplemented-field-warning.js +0 -153
  388. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +0 -1
  389. package/dist/esm/project-config/shared/cdn.example.d.ts +0 -14
  390. package/dist/esm/project-config/shared/cdn.example.d.ts.map +0 -1
  391. package/dist/esm/project-config/shared/cdn.example.js +0 -38
  392. package/dist/esm/project-config/shared/cdn.example.js.map +0 -1
  393. package/dist/esm/project-config/shared/schema-version.schemas.d.ts +0 -15
  394. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +0 -1
  395. package/dist/esm/project-config/shared/schema-version.schemas.js +0 -40
  396. package/dist/esm/project-config/shared/schema-version.schemas.js.map +0 -1
@@ -0,0 +1,638 @@
1
+ import { z } from 'zod';
2
+ import { DatabaseEngine } from '../project-config/shared/environment.schemas.js';
3
+ import { isModuleArtifactPathAllowed, ModuleIdSchema, RegistryDomainSlugSchema, ModuleManifestBoundariesSchema, ModuleManifestRegistrationSchema, MODULE_REGISTRATION_MODULE_ID_PATTERN, ModuleRegistrationScenario, SemverExactSchema, } from '../registry/module-manifest.schemas.js';
4
+ /**
5
+ * Application BLUEPRINTS (epic #2856) — the contracts.
6
+ *
7
+ * A blueprint is a LAYER UPON the base `wildo init` skeleton, never a replacement of it (decision D3): it may
8
+ * pre-configure the application-shape init flags, add new files, bring modules (their files plus the registration
9
+ * that makes the application know them), set the values of named declarations in base files, append barrel exports,
10
+ * add runtime dependencies, and contribute text inside anchor slots. It never overwrites a
11
+ * file of the base or of a lower layer, unless an upper layer names that file in `overrides`.
12
+ *
13
+ * Two halves, deliberately separate:
14
+ *
15
+ * - the **definition** ({@link BlueprintDefinitionSchema}) lives ONLY in the application that defines the blueprint,
16
+ * at `blueprints/<name>/blueprint.definition.ts`. It SELECTS what belongs to the blueprint and declares its
17
+ * parameters. It never carries a value the application already holds: the exporter reads every byte and every
18
+ * config value from the application, and proves the export reproduces it (`wildo blueprint pack`);
19
+ * - the **manifest** ({@link BlueprintManifestSchema}) is what an export writes beside the artifact's `files/` tree,
20
+ * and what `wildo init --blueprint` reads. It is a compiled output, never authored.
21
+ *
22
+ * The split is the `playbook.definition.ts` → `playbook.json` split, for the same reason: the authored form is
23
+ * TypeScript a person can comment, the compiled form is JSON a machine validates.
24
+ */
25
+ /** @wildo_source:part:start blueprint.definition-contract facet:layer:shared facet:audience:app-developer */
26
+ // ── Init flags ────────────────────────────────────────────────────────────────────────────────────────
27
+ /**
28
+ * Every flag `wildo init` accepts, as a closed vocabulary so each one is CLASSIFIED once
29
+ * ({@link INIT_FLAG_CLASSES}). A flag added to the command tomorrow must be added here and given a class, or the
30
+ * pinning test fails: a blueprint can then never start setting it by accident.
31
+ */
32
+ export var InitFlag;
33
+ (function (InitFlag) {
34
+ /** The application's name; the directory names it by default. */
35
+ InitFlag["NAME"] = "name";
36
+ /** The local infrastructure runtime (Docker Compose or a local Kubernetes). */
37
+ InitFlag["RUNTIME"] = "runtime";
38
+ /** The application's own database engine. Decides what the scaffold AUTHORS (`isPostgreSql` templates). */
39
+ InitFlag["DATABASE"] = "database";
40
+ /** Verify the developer's tools instead of scaffolding. */
41
+ InitFlag["CHECK"] = "check";
42
+ /** Write only `wildo.saas.config.ts`. */
43
+ InitFlag["CONFIG_ONLY"] = "config-only";
44
+ /** The base of the application's port block on this machine. */
45
+ InitFlag["PORT_BASE"] = "port-base";
46
+ /** The local platform administrator's email. */
47
+ InitFlag["ADMIN_EMAIL"] = "admin-email";
48
+ /** The local platform administrator's first name. */
49
+ InitFlag["ADMIN_FIRST_NAME"] = "admin-first-name";
50
+ /** The local platform administrator's last name. */
51
+ InitFlag["ADMIN_LAST_NAME"] = "admin-last-name";
52
+ /** The local platform administrator's initial password. */
53
+ InitFlag["ADMIN_PASSWORD"] = "admin-password";
54
+ /** Skip `pnpm install` and the initial builds. */
55
+ InitFlag["SKIP_INSTALL"] = "skip-install";
56
+ /** Where this environment's secrets live on this machine. */
57
+ InitFlag["SECRETS_PATH"] = "secrets-path";
58
+ /** How to treat the machine's shared platform credentials. */
59
+ InitFlag["LOCAL_DEFAULTS"] = "local-defaults";
60
+ /** Whether to seed the machine's provider API keys. */
61
+ InitFlag["PROVIDER_KEY_DEFAULTS"] = "provider-key-defaults";
62
+ /** The blueprint layers to apply on the base, in order (epic #2856). */
63
+ InitFlag["BLUEPRINT"] = "blueprint";
64
+ /** A blueprint parameter value, `name=value`. */
65
+ InitFlag["BLUEPRINT_PARAM"] = "blueprint-param";
66
+ /** The registry a `--blueprint <domain>/<scope>/<name>@<range>` entry is fetched from. */
67
+ InitFlag["BLUEPRINT_REGISTRY"] = "blueprint-registry";
68
+ /**
69
+ * The application line, when no blueprint is given (#1605): shorthand for `--blueprint wildo/<line>`, or `later`.
70
+ * A command mode, not application shape: a blueprint carries its line through `include.line`, never by setting a flag.
71
+ */
72
+ InitFlag["LINE"] = "line";
73
+ })(InitFlag || (InitFlag = {}));
74
+ /**
75
+ * What kind of decision an init flag carries — and therefore whether a blueprint may make it.
76
+ */
77
+ export var InitFlagClass;
78
+ (function (InitFlagClass) {
79
+ /**
80
+ * A decision about what the APPLICATION is, the same on every machine. The only class a blueprint may lock or
81
+ * default: a corporate blueprint that targets PostgreSQL states it once, for every application made from it.
82
+ */
83
+ InitFlagClass["APPLICATION_SHAPE"] = "application-shape";
84
+ /**
85
+ * A decision about THIS MACHINE — ports, local runtime, where secrets live, whether to install now. A blueprint
86
+ * never touches one: it is applied on machines it has never seen.
87
+ */
88
+ InitFlagClass["MACHINE"] = "machine";
89
+ /**
90
+ * WHO the application or its local administrator is. Never a blueprint's: an application made from a blueprint is
91
+ * a new application with its own name and its own operator.
92
+ */
93
+ InitFlagClass["IDENTITY"] = "identity";
94
+ /** How the command runs (check only, config only, which blueprints). Not a property of the application at all. */
95
+ InitFlagClass["COMMAND_MODE"] = "command-mode";
96
+ })(InitFlagClass || (InitFlagClass = {}));
97
+ /** The class of every init flag. Total over {@link InitFlag} by its type. */
98
+ export const INIT_FLAG_CLASSES = {
99
+ [InitFlag.NAME]: InitFlagClass.IDENTITY,
100
+ [InitFlag.RUNTIME]: InitFlagClass.MACHINE,
101
+ [InitFlag.DATABASE]: InitFlagClass.APPLICATION_SHAPE,
102
+ [InitFlag.CHECK]: InitFlagClass.COMMAND_MODE,
103
+ [InitFlag.CONFIG_ONLY]: InitFlagClass.COMMAND_MODE,
104
+ [InitFlag.PORT_BASE]: InitFlagClass.MACHINE,
105
+ [InitFlag.ADMIN_EMAIL]: InitFlagClass.IDENTITY,
106
+ [InitFlag.ADMIN_FIRST_NAME]: InitFlagClass.IDENTITY,
107
+ [InitFlag.ADMIN_LAST_NAME]: InitFlagClass.IDENTITY,
108
+ [InitFlag.ADMIN_PASSWORD]: InitFlagClass.IDENTITY,
109
+ [InitFlag.SKIP_INSTALL]: InitFlagClass.MACHINE,
110
+ [InitFlag.SECRETS_PATH]: InitFlagClass.MACHINE,
111
+ [InitFlag.LOCAL_DEFAULTS]: InitFlagClass.MACHINE,
112
+ [InitFlag.PROVIDER_KEY_DEFAULTS]: InitFlagClass.MACHINE,
113
+ [InitFlag.BLUEPRINT]: InitFlagClass.COMMAND_MODE,
114
+ [InitFlag.BLUEPRINT_PARAM]: InitFlagClass.COMMAND_MODE,
115
+ [InitFlag.BLUEPRINT_REGISTRY]: InitFlagClass.COMMAND_MODE,
116
+ [InitFlag.LINE]: InitFlagClass.COMMAND_MODE,
117
+ };
118
+ /** The values an APPLICATION_SHAPE flag accepts. Total over the shape flags, checked by the pinning test. */
119
+ export const APPLICATION_SHAPE_INIT_FLAG_VALUES = {
120
+ [InitFlag.DATABASE]: Object.values(DatabaseEngine),
121
+ };
122
+ /** Whether a blueprint may lock or default `flag`. */
123
+ export function isBlueprintSettableInitFlag(flag) {
124
+ return INIT_FLAG_CLASSES[flag] === InitFlagClass.APPLICATION_SHAPE;
125
+ }
126
+ /** How a blueprint pre-configures an application-shape init flag. */
127
+ export var BlueprintInitConstraintMode;
128
+ (function (BlueprintInitConstraintMode) {
129
+ /** The flag takes this value; `wildo init` refuses a flag that contradicts it. */
130
+ BlueprintInitConstraintMode["LOCK"] = "lock";
131
+ /** The flag takes this value unless the operator passes the flag. */
132
+ BlueprintInitConstraintMode["DEFAULT"] = "default";
133
+ })(BlueprintInitConstraintMode || (BlueprintInitConstraintMode = {}));
134
+ /** @wildo_source:part:end blueprint.definition-contract */
135
+ const BlueprintSettableInitFlagSchema = z.enum(InitFlag).refine(isBlueprintSettableInitFlag, {
136
+ error: 'a blueprint may set only an application-shape init flag (today: `database`)',
137
+ });
138
+ // ── Parameters ────────────────────────────────────────────────────────────────────────────────────────
139
+ /**
140
+ * Why this is not `CompositionScenarioVariableKind` (#2857 asked not to fork the scenario pieces): a blueprint
141
+ * parameter is chosen by the person creating an application, so it needs a CLOSED choice (`ENUM`, with members the
142
+ * apply refuses outside of), which a scenario variable has no use for; and a scenario variable can be DERIVED from
143
+ * another (#2810), which a blueprint parameter must never be, since its value is the operator's or a lower layer
144
+ * binding's. The three shared members keep the scenario's wire values, so a value moves between the two unchanged.
145
+ * The scenario vocabulary also lives in `application-creation-runtime`, which this contracts package cannot import.
146
+ */
147
+ /** @wildo_source:part:start blueprint.definition-contract facet:layer:shared facet:audience:app-developer */
148
+ /** The value kinds a blueprint parameter may declare. */
149
+ export var BlueprintParameterKind;
150
+ (function (BlueprintParameterKind) {
151
+ BlueprintParameterKind["STRING"] = "string";
152
+ BlueprintParameterKind["NUMBER"] = "number";
153
+ BlueprintParameterKind["BOOLEAN"] = "boolean";
154
+ /** One of `members`: a closed choice (an ERP vendor, a region), named so the choice is explained once. */
155
+ BlueprintParameterKind["ENUM"] = "enum";
156
+ })(BlueprintParameterKind || (BlueprintParameterKind = {}));
157
+ /** camelCase, so the name reads the same in `{{name}}` templates, `__name__` paths and `--blueprint-param`. */
158
+ const BLUEPRINT_PARAMETER_NAME_PATTERN = /^[a-z][a-zA-Z0-9]*$/;
159
+ /**
160
+ * Parameter names a blueprint cannot declare, because the applier supplies them from the new application's
161
+ * identity. A template reads `{{slug}}` or `{{displayName}}` and gets the application being created.
162
+ */
163
+ export const BLUEPRINT_IDENTITY_VARIABLES = ['slug', 'displayName'];
164
+ const BlueprintParameterFields = {
165
+ name: z.string().regex(BLUEPRINT_PARAMETER_NAME_PATTERN, 'parameter names are camelCase identifiers').refine((name) => !BLUEPRINT_IDENTITY_VARIABLES.includes(name), { error: `${BLUEPRINT_IDENTITY_VARIABLES.join(' and ')} are supplied from the new application's identity` }),
166
+ description: z.string().min(1),
167
+ kind: z.enum(BlueprintParameterKind),
168
+ required: z.boolean(),
169
+ /** Serialized default, parsed per `kind`. Only on an optional parameter. */
170
+ default: z.string().optional(),
171
+ /** RegExp source a STRING value must fully match. */
172
+ pattern: z.string().optional(),
173
+ /** ENUM only: the allowed values. */
174
+ members: z.array(z.string().min(1)).min(1).optional(),
175
+ };
176
+ /** @wildo_source:part:end blueprint.definition-contract */
177
+ /**
178
+ * Parse one serialized value per the parameter's declaration, or explain why it is not a value of it. Shared by the
179
+ * schema (a declared default) and the applier (a value passed on the command line), so both refuse the same values.
180
+ */
181
+ export function parseBlueprintParameterValue(parameter, raw) {
182
+ switch (parameter.kind) {
183
+ case BlueprintParameterKind.STRING: {
184
+ const value = String(raw);
185
+ if (parameter.pattern !== undefined && !new RegExp(`^(?:${parameter.pattern})$`).test(value)) {
186
+ return { reason: `'${parameter.name}' value '${value}' does not match /${parameter.pattern}/` };
187
+ }
188
+ return { value };
189
+ }
190
+ case BlueprintParameterKind.NUMBER: {
191
+ const value = typeof raw === 'number' ? raw : Number(raw);
192
+ return Number.isNaN(value) || String(raw).trim() === '' ? { reason: `'${parameter.name}' expects a number, got '${String(raw)}'` } : { value };
193
+ }
194
+ case BlueprintParameterKind.BOOLEAN: {
195
+ if (typeof raw === 'boolean')
196
+ return { value: raw };
197
+ if (raw === 'true' || raw === 'false')
198
+ return { value: raw === 'true' };
199
+ return { reason: `'${parameter.name}' expects true or false, got '${String(raw)}'` };
200
+ }
201
+ case BlueprintParameterKind.ENUM: {
202
+ const value = String(raw);
203
+ return (parameter.members ?? []).includes(value)
204
+ ? { value }
205
+ : { reason: `'${parameter.name}' must be one of ${(parameter.members ?? []).join(', ')}, got '${value}'` };
206
+ }
207
+ }
208
+ }
209
+ function refineParameter(parameter, context) {
210
+ if (parameter.kind === BlueprintParameterKind.ENUM && parameter.members === undefined) {
211
+ context.addIssue({ code: 'custom', path: ['members'], message: `'${parameter.name}' is an enum, so it declares its members` });
212
+ }
213
+ if (parameter.kind !== BlueprintParameterKind.ENUM && parameter.members !== undefined) {
214
+ context.addIssue({ code: 'custom', path: ['members'], message: `'${parameter.name}' is not an enum, so it declares no members` });
215
+ }
216
+ if (parameter.pattern !== undefined && parameter.kind !== BlueprintParameterKind.STRING) {
217
+ context.addIssue({ code: 'custom', path: ['pattern'], message: `'${parameter.name}' is not a string, so it declares no pattern` });
218
+ }
219
+ if (parameter.required && parameter.default !== undefined) {
220
+ context.addIssue({ code: 'custom', path: ['default'], message: `'${parameter.name}' is required, so a default would never be used` });
221
+ }
222
+ if (parameter.default !== undefined) {
223
+ const parsed = parseBlueprintParameterValue(parameter, parameter.default);
224
+ if ('reason' in parsed)
225
+ context.addIssue({ code: 'custom', path: ['default'], message: `the default is not a value of it: ${parsed.reason}` });
226
+ }
227
+ }
228
+ /** One declared blueprint parameter, as the published manifest carries it. */
229
+ export const BlueprintParameterSchema = z.strictObject(BlueprintParameterFields).superRefine(refineParameter);
230
+ /** @wildo_source:part:start blueprint.definition-contract facet:layer:shared facet:audience:app-developer */
231
+ /**
232
+ * One declared parameter, as the DEFINITION carries it: the declaration plus the defining application's own value.
233
+ *
234
+ * `appValue` is the reproduction WITNESS, not a value the blueprint ships: the export renders every template with it
235
+ * and requires the result to equal the defining application's bytes. A wrong `appValue` therefore fails the pack
236
+ * instead of producing a blueprint that silently renders something else. It is never written into the manifest.
237
+ */
238
+ export const BlueprintDefinitionParameterSchema = z
239
+ .strictObject({ ...BlueprintParameterFields, appValue: z.union([z.string(), z.number(), z.boolean()]) })
240
+ .superRefine((parameter, context) => {
241
+ refineParameter(parameter, context);
242
+ const parsed = parseBlueprintParameterValue(parameter, parameter.appValue);
243
+ if ('reason' in parsed)
244
+ context.addIssue({ code: 'custom', path: ['appValue'], message: `the application's value is not a value of it: ${parsed.reason}` });
245
+ });
246
+ /** @wildo_source:part:end blueprint.definition-contract */
247
+ function refineUniqueParameterNames(parameters, context, path) {
248
+ const seen = new Set();
249
+ parameters.forEach((parameter, index) => {
250
+ if (seen.has(parameter.name))
251
+ context.addIssue({ code: 'custom', path: [...path, index, 'name'], message: `parameter '${parameter.name}' is declared twice` });
252
+ seen.add(parameter.name);
253
+ });
254
+ }
255
+ /** @wildo_source:part:start blueprint.definition-contract facet:layer:shared facet:audience:app-developer */
256
+ // ── Layers and configuration ──────────────────────────────────────────────────────────────────────────
257
+ /** A lower blueprint this one is layered on, with the values it binds for that layer's parameters. */
258
+ export const BlueprintLayerReferenceSchema = z.strictObject({
259
+ id: ModuleIdSchema,
260
+ /** npm-style semver range the lower layer's version must satisfy. */
261
+ range: z.string().min(1),
262
+ /** Values this layer binds for the lower layer's parameters; the operator is not asked for them. */
263
+ parameters: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).optional(),
264
+ });
265
+ /**
266
+ * The base files whose named DECLARATIONS a blueprint may set — the blueprint customization API (decision D3).
267
+ *
268
+ * A blueprint never replaces a base file; it sets values the base declares. Each member is a file the `wildo init`
269
+ * skeleton authors as a set of named declarations with an application-owned VALUE (an empty registry, a default
270
+ * profile, a theme), so setting one is a replacement at a path the config walker resolves, never a text edit.
271
+ * Measured on Wonder Procurement (#2860): every change it made to a base TypeScript file was the value of one of
272
+ * these declarations. A closed set, because a declaration operation is only safe on a file whose shape the framework
273
+ * owns: adding a member is deciding that the base will keep that declaration stable.
274
+ */
275
+ export var BlueprintDeclarationFile;
276
+ (function (BlueprintDeclarationFile) {
277
+ /** `wildo.saas.config.ts`: modules, services, capabilities, organization types, providers, systems of record. */
278
+ BlueprintDeclarationFile["SAAS_CONFIG"] = "wildo.saas.config.ts";
279
+ /** The backend-authored configuration: authentication posture, user types, registration, email. */
280
+ BlueprintDeclarationFile["BACKEND_CONFIG"] = "backend-api/src/saas-config.backend.ts";
281
+ /** App-wide backend assembly: resource-server instances, organization-unit narrowing, own rows. */
282
+ BlueprintDeclarationFile["BACKEND_BOOTSTRAP"] = "backend-api/src/bootstrap-config.ts";
283
+ /** The application's own roles (`CUSTOM_ROLES_CONFIGURATION`). */
284
+ BlueprintDeclarationFile["ROLES"] = "shared-lib/src/engine/roles.ts";
285
+ /** Features, feature profiles and unavailability policy. */
286
+ BlueprintDeclarationFile["FEATURES"] = "shared-lib/src/engine/features.ts";
287
+ /** Milestone definitions. */
288
+ BlueprintDeclarationFile["MILESTONES"] = "shared-lib/src/engine/milestones.ts";
289
+ /** The product catalogue. */
290
+ BlueprintDeclarationFile["PRODUCT"] = "shared-lib/src/engine/product.ts";
291
+ /** The frontend module list, whose ORDER is the sidebar's (`applicationFrontendModules`). */
292
+ BlueprintDeclarationFile["FRONTEND_MODULES"] = "frontend/src/modules/index.ts";
293
+ /** The design system: theme, colours, surfaces. */
294
+ BlueprintDeclarationFile["FRONTEND_DESIGN_SYSTEM"] = "frontend/src/config/design-system.config.ts";
295
+ /** Navigation zones and transitions. */
296
+ BlueprintDeclarationFile["FRONTEND_NAVIGATION"] = "frontend/src/config/navigation.config.ts";
297
+ /** The application shell: menubar, sidebar, command menu. */
298
+ BlueprintDeclarationFile["FRONTEND_APP_SHELL"] = "frontend/src/config/app-shell.config.ts";
299
+ /** The settings rail. */
300
+ BlueprintDeclarationFile["FRONTEND_SETTINGS_HUB"] = "frontend/src/config/settings-hub.config.ts";
301
+ /** Application-level views. */
302
+ BlueprintDeclarationFile["FRONTEND_GLOBAL_VIEWS"] = "frontend/src/config/global-views.config.ts";
303
+ })(BlueprintDeclarationFile || (BlueprintDeclarationFile = {}));
304
+ /** A config path segment: an identifier, a quoted key's text, or a computed key's expression (`EngineCapability.BILLING`). */
305
+ const BlueprintDeclarationPathSchema = z.array(z.string().min(1));
306
+ /**
307
+ * Where a declaration operation lands: from the file's `export default` along `path`, or from the top-level variable
308
+ * `declaration` along `path` — the whole variable when `path` is empty.
309
+ */
310
+ const BlueprintDeclarationTargetFields = {
311
+ file: z.enum(BlueprintDeclarationFile),
312
+ /** A top-level variable of the file (`CUSTOM_ROLES_CONFIGURATION`). Absent: start at the file's `export default`. */
313
+ declaration: z.string().regex(/^[A-Za-z_$][\w$]*$/, 'a declaration is a top-level variable name').optional(),
314
+ /** Property segments below the start; empty only with `declaration`, to set the variable as a whole. */
315
+ path: BlueprintDeclarationPathSchema,
316
+ };
317
+ function refineDeclarationTarget(target, context) {
318
+ if (target.declaration === undefined && target.path.length === 0) {
319
+ context.addIssue({ code: 'custom', path: ['path'], message: 'a path is required unless a declaration is named (an empty path sets the declaration as a whole)' });
320
+ }
321
+ }
322
+ /** The label a declaration target is reported under: `<file> <declaration>.<path>`. */
323
+ export function describeBlueprintDeclarationTarget(target) {
324
+ return `${target.file} ${[target.declaration ?? 'export default', ...target.path].join('.')}`;
325
+ }
326
+ /** What a definition selects in a declaration file. */
327
+ export const BlueprintDefinitionDeclarationSelectionSchema = z
328
+ .strictObject({
329
+ ...BlueprintDeclarationTargetFields,
330
+ /**
331
+ * The value as a template over the parameters, when the value depends on one. Rendered with each parameter's
332
+ * `appValue`, it must equal the defining application's value text exactly, or the pack refuses.
333
+ */
334
+ valueTemplate: z.string().min(1).optional(),
335
+ })
336
+ .superRefine(refineDeclarationTarget);
337
+ /** One declaration a blueprint sets: the value at the target, creating the final property when absent. */
338
+ export const BlueprintDeclarationOperationSchema = z
339
+ .strictObject({
340
+ ...BlueprintDeclarationTargetFields,
341
+ /** The value's expression text, verbatim; may read `{{parameter}}`. */
342
+ valueText: z.string().min(1),
343
+ /** Import statements the value needs that the base file does not have (`import { X } from 'pkg';`). */
344
+ imports: z.array(z.string().min(1)).default([]),
345
+ })
346
+ .superRefine(refineDeclarationTarget);
347
+ /**
348
+ * The barrels a blueprint may append `export` lines to — the package entry files every module's `add-module`
349
+ * registration already appends to. A blueprint carrying a new file (`shared-lib/src/system-of-record/…`) that the
350
+ * package must export appends its line here.
351
+ */
352
+ export var BlueprintBarrelFile;
353
+ (function (BlueprintBarrelFile) {
354
+ BlueprintBarrelFile["SHARED_LIB"] = "shared-lib/src/index.ts";
355
+ BlueprintBarrelFile["SPECIFICATIONS"] = "specifications/src/index.ts";
356
+ })(BlueprintBarrelFile || (BlueprintBarrelFile = {}));
357
+ /** One `export … from '…';` line appended to a barrel. */
358
+ export const BlueprintBarrelExportSchema = z.strictObject({
359
+ file: z.enum(BlueprintBarrelFile),
360
+ line: z.string().regex(/^export\s.+\sfrom\s+['"][^'"]+['"];?$/, 'a barrel line is one `export … from \'…\';` statement'),
361
+ });
362
+ /**
363
+ * The workspace manifests a blueprint may add a runtime dependency to: the packages every `wildo init` base has.
364
+ * A carried minion's or worker's own `package.json` travels with its files instead.
365
+ */
366
+ export var BlueprintWorkspaceManifest;
367
+ (function (BlueprintWorkspaceManifest) {
368
+ BlueprintWorkspaceManifest["ROOT"] = "package.json";
369
+ BlueprintWorkspaceManifest["SHARED_LIB"] = "shared-lib/package.json";
370
+ BlueprintWorkspaceManifest["SPECIFICATIONS"] = "specifications/package.json";
371
+ BlueprintWorkspaceManifest["BACKEND_API"] = "backend-api/package.json";
372
+ BlueprintWorkspaceManifest["FRONTEND"] = "frontend/package.json";
373
+ })(BlueprintWorkspaceManifest || (BlueprintWorkspaceManifest = {}));
374
+ /** One runtime dependency a blueprint adds to a workspace manifest (`dependencies` only). */
375
+ export const BlueprintDependencySchema = z.strictObject({
376
+ manifest: z.enum(BlueprintWorkspaceManifest),
377
+ name: z.string().min(1),
378
+ specifier: z.string().min(1),
379
+ });
380
+ /**
381
+ * The base files that declare anchor SLOTS — the free-text extension points (`@wildo_anchor:slot`), for the few
382
+ * files that are not TypeScript declarations. Measured on Wonder Procurement (#2860), the one such need was the
383
+ * application's agent guide. Adding a member is deciding where free text may be extended; keep it small.
384
+ */
385
+ export var BlueprintSlotFile;
386
+ (function (BlueprintSlotFile) {
387
+ /** The application's `CLAUDE.md`, read by every coding-agent session in it. */
388
+ BlueprintSlotFile["APPLICATION_AGENT_GUIDE"] = "CLAUDE.md";
389
+ })(BlueprintSlotFile || (BlueprintSlotFile = {}));
390
+ /** One slot a blueprint contributes to, and what it writes there. */
391
+ export const BlueprintSlotContributionSchema = z.strictObject({
392
+ file: z.enum(BlueprintSlotFile),
393
+ slot: z.string().regex(/^[a-z][a-z0-9.-]*$/, 'a slot id is lowercase, dot- or dash-separated'),
394
+ /** The text this layer adds inside the slot, without its markers; may read `{{parameter}}`. */
395
+ body: z.string(),
396
+ });
397
+ /** A declaration target with no value: what `overrides.declarations` names. */
398
+ export const BlueprintDeclarationTargetSchema = z.strictObject(BlueprintDeclarationTargetFields).superRefine(refineDeclarationTarget);
399
+ /** Whether two declaration targets address the same value. */
400
+ export function isSameBlueprintDeclarationTarget(a, b) {
401
+ return describeBlueprintDeclarationTarget(a) === describeBlueprintDeclarationTarget(b);
402
+ }
403
+ /**
404
+ * Whether two declaration targets address overlapping values: the same file and start, and one path a prefix of the
405
+ * other (`engineCapabilities` and `engineCapabilities.EngineCapability.BILLING`). Setting either replaces part of what
406
+ * the other set, so stacked layers treat an overlap as a collision exactly like an identical target.
407
+ */
408
+ export function blueprintDeclarationTargetsOverlap(a, b) {
409
+ if (a.file !== b.file || a.declaration !== b.declaration)
410
+ return false;
411
+ const shorter = a.path.length <= b.path.length ? a.path : b.path;
412
+ const longer = shorter === a.path ? b.path : a.path;
413
+ return shorter.every((segment, index) => longer[index] === segment);
414
+ }
415
+ /**
416
+ * A registry module a blueprint REFERENCES (#2879): installed into the new application from the registry by
417
+ * `wildo init`, through the same pipeline as `wildo registry add`, rather than copied. Its files are never carried —
418
+ * the lockfile records them with their install hashes, and `wildo registry update` / `remove` act on them, which a copy
419
+ * would silently defeat.
420
+ *
421
+ * The range is the one the defining application asked for (its lockfile `requestedRange`), so the new application
422
+ * resolves the same way the defining one did; the version it gets is whatever that range resolves to on the day.
423
+ */
424
+ export const BlueprintModuleReferenceSchema = z.strictObject({
425
+ domain: RegistryDomainSlugSchema,
426
+ moduleId: ModuleIdSchema,
427
+ range: z.string().min(1),
428
+ });
429
+ /** What an upper layer deliberately replaces from a lower one. Never anything of the base (D3). */
430
+ export const BlueprintOverridesSchema = z.strictObject({
431
+ /** App-relative files a lower layer wrote that this layer writes again. */
432
+ files: z.array(z.string().min(1)).default([]),
433
+ /** Init flags a lower layer locked that this layer sets differently. */
434
+ init: z.array(BlueprintSettableInitFlagSchema).default([]),
435
+ /** Declarations a lower layer set that this layer sets again. */
436
+ declarations: z.array(BlueprintDeclarationTargetSchema).default([]),
437
+ });
438
+ /** A module, minion or worker DIRECTORY name — the same alphabet a registration's `moduleId` uses. */
439
+ const BlueprintModuleDirectorySchema = z.string().regex(MODULE_REGISTRATION_MODULE_ID_PATTERN, 'a module directory is kebab-case');
440
+ function refineUniqueStrings(values, context, path, label) {
441
+ const seen = new Set();
442
+ values.forEach((value, index) => {
443
+ if (seen.has(value))
444
+ context.addIssue({ code: 'custom', path: [...path, index], message: `${label} '${value}' is listed twice` });
445
+ seen.add(value);
446
+ });
447
+ }
448
+ // ── The definition ────────────────────────────────────────────────────────────────────────────────────
449
+ /** Where definitions live in the application that defines them; `<name>` is the folder. */
450
+ export const BLUEPRINT_DEFINITIONS_DIRECTORY = 'blueprints';
451
+ export const BLUEPRINT_DEFINITION_FILE_NAME = 'blueprint.definition.ts';
452
+ /** The exported constant a definition file declares. */
453
+ export const BLUEPRINT_DEFINITION_EXPORT_NAME = 'blueprintDefinition';
454
+ /** `.hbs` sources beside the definition, for exported files that read a parameter. */
455
+ export const BLUEPRINT_TEMPLATES_DIRECTORY = 'templates';
456
+ /**
457
+ * The authored blueprint definition (`blueprints/<name>/blueprint.definition.ts`, exporting
458
+ * {@link BLUEPRINT_DEFINITION_EXPORT_NAME}). It SELECTS; it never carries a value the application holds.
459
+ */
460
+ export const BlueprintDefinitionSchema = z
461
+ .strictObject({
462
+ id: ModuleIdSchema,
463
+ version: SemverExactSchema,
464
+ description: z.string().min(1),
465
+ extends: z.array(BlueprintLayerReferenceSchema).default([]),
466
+ /** Per application-shape init flag: lock or default it to the defining application's value. */
467
+ init: z.array(z.strictObject({ flag: BlueprintSettableInitFlagSchema, mode: z.enum(BlueprintInitConstraintMode) })).default([]),
468
+ parameters: z.array(BlueprintDefinitionParameterSchema).default([]),
469
+ include: z.strictObject({
470
+ /** App-relative globs of NEW files (specifications, assets, documentation, …). */
471
+ files: z.array(z.string().min(1)).default([]),
472
+ /** Domain module directories (`shared-lib/src/modules/<dir>` and its sibling layers). */
473
+ modules: z.array(BlueprintModuleDirectorySchema).default([]),
474
+ /** Minion package directories (`minions/<dir>`). */
475
+ minions: z.array(BlueprintModuleDirectorySchema).default([]),
476
+ /** Worker package directories (`workers/<dir>`). */
477
+ workers: z.array(BlueprintModuleDirectorySchema).default([]),
478
+ /**
479
+ * Modules this application installed from the module registry, by module id (`acme/billing`,
480
+ * `providers/asana`): carried as references and installed by `wildo init`, never copied (#2879).
481
+ */
482
+ registryModules: z.array(ModuleIdSchema).default([]),
483
+ declarations: z.array(BlueprintDefinitionDeclarationSelectionSchema).default([]),
484
+ /** Barrels whose `export` lines (beyond the base's and the modules' own) the blueprint carries. */
485
+ barrelExports: z.array(z.enum(BlueprintBarrelFile)).default([]),
486
+ /** Runtime dependencies, by package name, carried with the specifier each workspace manifest declares. */
487
+ dependencies: z.array(z.string().min(1)).default([]),
488
+ /** Anchor slots whose content the blueprint carries. */
489
+ slots: z.array(z.strictObject({ file: z.enum(BlueprintSlotFile), slot: z.string().min(1) })).default([]),
490
+ /**
491
+ * Carry the defining application's APPLICATION LINE (#2863): `wildo blueprint pack` reads it from the defining
492
+ * application's dossier (its answer to the line question) and refuses when none is declared; `wildo init` answers
493
+ * that question for the new application, so it is not asked again. Selected, never written: the value is the
494
+ * defining application's, like every other value a blueprint carries.
495
+ */
496
+ line: z.boolean().default(false),
497
+ }),
498
+ overrides: BlueprintOverridesSchema.default({ files: [], init: [], declarations: [] }),
499
+ })
500
+ .superRefine((definition, context) => {
501
+ refineUniqueParameterNames(definition.parameters, context, ['parameters']);
502
+ refineUniqueStrings(definition.init.map((entry) => entry.flag), context, ['init'], 'init flag');
503
+ refineUniqueStrings(definition.include.modules, context, ['include', 'modules'], 'module');
504
+ refineUniqueStrings(definition.include.minions, context, ['include', 'minions'], 'minion');
505
+ refineUniqueStrings(definition.include.workers, context, ['include', 'workers'], 'worker');
506
+ refineUniqueStrings(definition.include.registryModules, context, ['include', 'registryModules'], 'registry module');
507
+ refineUniqueStrings(definition.include.declarations.map((entry) => describeBlueprintDeclarationTarget(entry)), context, ['include', 'declarations'], 'declaration');
508
+ refineUniqueStrings(definition.include.barrelExports, context, ['include', 'barrelExports'], 'barrel');
509
+ refineUniqueStrings(definition.include.dependencies, context, ['include', 'dependencies'], 'dependency');
510
+ refineUniqueStrings(definition.include.slots.map((entry) => `${entry.file}#${entry.slot}`), context, ['include', 'slots'], 'slot');
511
+ if (definition.extends.length === 0 && (definition.overrides.files.length > 0 || definition.overrides.init.length > 0 || definition.overrides.declarations.length > 0)) {
512
+ context.addIssue({ code: 'custom', path: ['overrides'], message: 'a blueprint layered on no other has nothing to override; the base itself is never overridden' });
513
+ }
514
+ });
515
+ /** @wildo_source:part:end blueprint.definition-contract */
516
+ // ── The published manifest ────────────────────────────────────────────────────────────────────────────
517
+ /** The manifest at the root of a packed blueprint, beside {@link BLUEPRINT_FILES_DIRECTORY}. */
518
+ export const BLUEPRINT_MANIFEST_FILE_NAME = 'blueprint.json';
519
+ /** The packed files, laid out as they land in the application (`.hbs` rendered, `__param__` segments interpolated). */
520
+ export const BLUEPRINT_FILES_DIRECTORY = 'files';
521
+ /**
522
+ * An embedded module: its directories and the registration that makes the application know it. A domain module, a
523
+ * minion or a worker. Never a PROVIDER: a provider module is one vendor's package, distributed and versioned by the
524
+ * registry, and wired by each installing application from its own declarations — copying it into a blueprint would
525
+ * freeze one application's wiring into every application made from it.
526
+ */
527
+ export const BlueprintEmbeddedModuleSchema = z
528
+ .strictObject({
529
+ boundaries: ModuleManifestBoundariesSchema,
530
+ registration: ModuleManifestRegistrationSchema,
531
+ })
532
+ .superRefine((module, context) => {
533
+ if ((module.boundaries.providers ?? []).length > 0 || module.registration.scenario === ModuleRegistrationScenario.ADD_PROVIDER_PACKAGE) {
534
+ context.addIssue({ code: 'custom', path: ['registration'], message: 'a blueprint embeds no provider module; a provider comes from the registry' });
535
+ }
536
+ });
537
+ /**
538
+ * The packed blueprint manifest (`blueprint.json`). Compiled by `wildo blueprint pack`, read by
539
+ * `wildo init --blueprint`. Never authored.
540
+ */
541
+ export const BlueprintManifestSchema = z
542
+ .strictObject({
543
+ schemaVersion: z.literal(1),
544
+ id: ModuleIdSchema,
545
+ version: SemverExactSchema,
546
+ description: z.string().min(1),
547
+ /** The framework version the defining application ran when it was packed. */
548
+ frameworkVersion: z.string().min(1),
549
+ /**
550
+ * The DEFINING application's identity. Text files carrying these values have them replaced by the new
551
+ * application's own on apply — a module that imports `@<slug>/shared-lib` imports the new application's.
552
+ */
553
+ identity: z.strictObject({ slug: z.string().min(1), displayName: z.string().min(1) }),
554
+ extends: z.array(BlueprintLayerReferenceSchema).default([]),
555
+ init: z.array(z.strictObject({ flag: BlueprintSettableInitFlagSchema, mode: z.enum(BlueprintInitConstraintMode), value: z.string().min(1) })).default([]),
556
+ parameters: z.array(BlueprintParameterSchema).default([]),
557
+ modules: z.array(BlueprintEmbeddedModuleSchema).default([]),
558
+ /** Registry modules installed by `wildo init` before this layer's own content, in order (#2879). */
559
+ moduleReferences: z.array(BlueprintModuleReferenceSchema).default([]),
560
+ /**
561
+ * The application line this blueprint makes (#2863): `wildo init` records it as the new application's answer to
562
+ * the line question. A value of `ApplicationLine` from `@wildo-ai/saas-specifications/application-creation`, which
563
+ * this contracts package cannot import (it does not depend on saas-specifications, and must not: that package sits
564
+ * above it). It is a string here and checked against that vocabulary by the CLI, which depends on both, when it
565
+ * packs a blueprint and when it reads one. A stack of layers names at most one line.
566
+ */
567
+ line: z.string().min(1).optional(),
568
+ declarationOperations: z.array(BlueprintDeclarationOperationSchema).default([]),
569
+ barrelExports: z.array(BlueprintBarrelExportSchema).default([]),
570
+ dependencies: z.array(BlueprintDependencySchema).default([]),
571
+ slotContributions: z.array(BlueprintSlotContributionSchema).default([]),
572
+ overrides: BlueprintOverridesSchema.default({ files: [], init: [], declarations: [] }),
573
+ })
574
+ .superRefine((manifest, context) => {
575
+ refineUniqueParameterNames(manifest.parameters, context, ['parameters']);
576
+ refineUniqueStrings(manifest.moduleReferences.map((reference) => reference.moduleId), context, ['moduleReferences'], 'module reference');
577
+ manifest.init.forEach((entry, index) => {
578
+ const allowed = APPLICATION_SHAPE_INIT_FLAG_VALUES[entry.flag];
579
+ if (allowed !== undefined && !allowed.includes(entry.value)) {
580
+ context.addIssue({ code: 'custom', path: ['init', index, 'value'], message: `'${entry.value}' is not a value of --${entry.flag} (${allowed.join(', ')})` });
581
+ }
582
+ });
583
+ });
584
+ // ── Paths ─────────────────────────────────────────────────────────────────────────────────────────────
585
+ /** Path segments a blueprint never packs: build output and installed dependencies are not application source. */
586
+ const BLUEPRINT_FORBIDDEN_SEGMENTS = new Set(['dist', 'node_modules']);
587
+ /** File and directory names that hold secrets; never packed, at any depth. */
588
+ const BLUEPRINT_SECRET_SEGMENT_PATTERN = /^(secrets?(\..*)?|.*\.(pem|key|p12|pfx))$/i;
589
+ /**
590
+ * Whether `appRelativePath` (POSIX, relative to the application root) may be carried by a blueprint, in its
591
+ * `files/` tree or as a module file. Checked when a blueprint is packed AND when it is applied, so a hand-made
592
+ * artifact cannot plant what pack would never have written.
593
+ *
594
+ * On top of the module rule (no dot segment — `.git`, `.env`, `.wildo-saas`, traversal — and no `node_modules`):
595
+ * - nothing under `blueprints/`: a definition lives only in the application that defines it (decision D5);
596
+ * - no `dist/` build output;
597
+ * - no secret-shaped file or directory (`secrets.json`, `secrets/`, `*.pem`, `*.key`, …), at any depth.
598
+ *
599
+ * Names compare case-insensitively: on a case-insensitive filesystem (macOS, Windows) `Node_Modules/` and
600
+ * `Blueprints/` ARE those directories.
601
+ */
602
+ export function isBlueprintArtifactPathAllowed(appRelativePath) {
603
+ if (!isModuleArtifactPathAllowed(appRelativePath))
604
+ return false;
605
+ const segments = appRelativePath.split('/').map((segment) => segment.toLowerCase());
606
+ if (segments[0] === BLUEPRINT_DEFINITIONS_DIRECTORY)
607
+ return false;
608
+ if (segments.some((segment) => BLUEPRINT_FORBIDDEN_SEGMENTS.has(segment)))
609
+ return false;
610
+ return !segments.some((segment) => BLUEPRINT_SECRET_SEGMENT_PATTERN.test(segment));
611
+ }
612
+ // ── The lockfile record ───────────────────────────────────────────────────────────────────────────────
613
+ /** The `wildo-saas.lock.json` section `wildo init` records how the application was scaffolded in. */
614
+ export const SCAFFOLD_LOCK_SECTION_KEY = 'scaffold';
615
+ /**
616
+ * `sections.scaffold`: the application-shape init flags the application was created with, and the blueprint
617
+ * layers applied on its base, in order. Written by every `wildo init`, with or without a blueprint, because an export
618
+ * rebuilds the defining application's base from it.
619
+ *
620
+ * It records no file hashes and no digests on purpose: an init-time apply has nothing to upgrade or remove (D2), and
621
+ * git already holds what each layer wrote — one commit per layer.
622
+ */
623
+ export const ScaffoldLockSectionSchema = z.strictObject({
624
+ /** Only APPLICATION_SHAPE flags: a machine or identity value is not how the application was shaped. */
625
+ applicationShape: z.partialRecord(z.enum(InitFlag), z.string().min(1)).default({}).superRefine((shape, context) => {
626
+ for (const flag of Object.keys(shape)) {
627
+ if (INIT_FLAG_CLASSES[flag] !== InitFlagClass.APPLICATION_SHAPE) {
628
+ context.addIssue({ code: 'custom', path: [flag], message: `--${flag} is not an application-shape init flag` });
629
+ }
630
+ }
631
+ }),
632
+ blueprints: z.array(z.strictObject({
633
+ id: ModuleIdSchema,
634
+ version: SemverExactSchema,
635
+ parameters: z.record(z.string(), z.union([z.string(), z.number(), z.boolean()])).default({}),
636
+ })).default([]),
637
+ });
638
+ //# sourceMappingURL=blueprint.schemas.js.map