@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 @@
1
+ {"version":3,"file":"platform-key-management.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/platform-key-management.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,mBAAmB,EACnB,4BAA4B,EAC5B,qBAAqB,EACrB,wBAAwB,EACxB,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,+BAA+B,EAC/B,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,4IAA4I;AAC5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,GAAG,aAAa,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC,UAAU,KAAK,SAAS,IAAI,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;IAC1F,CAAC,CAAC,CAAC;AACL,CAAC;AAED,sHAAsH;AACtH,MAAM,UAAU,+BAA+B,CAAC,MAA6B,EAAE,eAAwB;IACrG,MAAM,MAAM,GAAG,CAAC,MAAM,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAC5E,OAAO,GAAG,eAAe,CAAC,CAAC,CAAC,gBAAgB,eAAe,KAAK,CAAC,CAAC,CAAC,EAAE,4CAA4C,MAAM,CAAC,UAAU,IAAI;UAClI,0DAA0D,yCAAyC,sBAAsB;UACzH,6DAA6D,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,eAAe,KAAK;UACzH,2HAA2H;UAC3H,wFAAwF,CAAC;AAC/F,CAAC;AAED,uHAAuH;AACvH,MAAM,UAAU,yBAAyB,CAAC,qBAAmE;IAC3G,OAAO,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,oBAAoB,CAAC,IAAI,CAAC;AAC5E,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport {\n PlatformAdminEnvKey,\n PlatformDocumentationSiteEnvKey,\n PlatformEmailEnvKey,\n PlatformInfrastructureEnvKey,\n PlatformIngressEnvKey,\n PlatformKubernetesEnvKey,\n PlatformLoggingEnvKey,\n PlatformObservabilityEnvKey,\n PlatformOwnershipDnsEnvKey,\n PlatformProcessEnvKey,\n PlatformProviderSelectionEnvKey,\n PlatformSecurityEnvKey,\n PlatformServiceUrlEnvKey,\n} from '../../bootstrap/platform-runtime-env.contracts';\nimport { BackingServiceSource } from './backing-services.schemas';\n\n/** @wildo_source:part:start platform.config.platform-key-management facet:layer:platform facet:family:infra facet:audience:app-developer */\n/**\n * # Where the platform keeps the keys it holds for applications (#2933)\n *\n * apps-manager is the custodian of every platform-held key (approval seals, signature requests, and the wrapping keys\n * of an application's sealed secrets, #2894). Without this block it\n * seals them under its own key-encryption root (the LOCAL provider). With it, apps-manager also serves the\n * `vault-transit` and `vault-kv` key providers, and an application's key binding may name one of them.\n *\n * This is a PLATFORM-tier declaration, like `platformStorage`: one apps-manager holds one Vault, whatever application\n * an environment file belongs to. It is deliberately not a `backingServices` kind. A backing service is something an\n * application runtime dials, with credentials minted per application; no application runtime ever reaches this Vault,\n * and nothing is minted per application in it.\n *\n * - `{ vault: { source: 'self' } }` — the CLI renders a single-node OpenBao (the MPL-licensed Vault fork, API\n * compatible for everything used) beside apps-manager, in docker compose and in Kubernetes. It unseals itself from a\n * framework-managed key and configures itself on its first start: the Transit and KV mounts, the two least-privilege\n * policies, and the two tokens apps-manager speaks with. Good for development and for a small self-hosted platform;\n * its protection is SOFTWARE, as every Vault's is. Its self-initialization runs only on EMPTY storage, so an OpenBao\n * first started before a policy changed keeps the older policy: one started before #2894 cannot wrap data keys\n * (`transit/encrypt` and `transit/decrypt` answer 403) until the signer policy is written again (`bao policy write`\n * with `vaultSignerPolicy`) or its storage is recreated.\n * - `{ vault: { source: 'managed', address, … } }` — the operator's own Vault or OpenBao. The operator configures the\n * mounts and policies (`vaultSignerPolicy` / `vaultOperatorPolicy` in the key-management contracts) and puts the two\n * tokens in `secrets.json` under `platformKeyVaultManaged`.\n *\n * Absent, apps-manager serves no Vault provider, and a binding that names one is refused PROVIDER_UNAVAILABLE.\n *\n * ## Cloud KMS (#2896)\n *\n * `awsKms`, `googleCloudKms` and `azureKeyVault` make apps-manager serve the `aws-kms`, `google-cloud-kms` and\n * `azure-key-vault` providers: the key is generated inside the vendor's HSM, never leaves it, and the vendor signs. They\n * are always the operator's own account, so they carry no `source`. apps-manager authenticates with its WORKLOAD\n * identity (an IAM role for its service account, GKE workload identity, an Azure managed identity): nothing here is a\n * secret, and `secrets.json` holds nothing for them.\n *\n * Each provider acts as two identities, as Vault does with two tokens. The SIGNER may only read keys, sign, and wrap and\n * unwrap data keys under a wrapping key (#2894); the OPERATOR creates, disables and destroys keys and may never sign, wrap\n * or unwrap. Every wrap is authenticated encryption under a key only the vendor holds. Neither vendor's broad built-in role keeps to that, so\n * grant, per vendor:\n * - AWS: apps-manager's identity may only `sts:AssumeRole` the two roles. Every key apps-manager creates carries the tag\n * `wildo:key-ref`, and the policies are scoped by it:\n * - Signer, on `arn:aws:kms:<region>:<account>:key/*`: `kms:Sign`, `kms:Encrypt` and `kms:Decrypt` only where\n * `aws:ResourceTag/wildo:key-ref` is present (`\"Null\": { … \"false\" }`), so it cannot sign with, or decrypt under,\n * another key in the account; `kms:GetPublicKey` and `kms:DescribeKey` unconditioned (both read-only).\n * - Operator: `kms:CreateKey` and `kms:TagResource` on `\"Resource\": \"*\"` (CreateKey names no key yet), only where\n * `aws:RequestTag/wildo:key-ref` is present and `aws:TagKeys` is exactly `[\"wildo:key-ref\"]`; on `key/*`,\n * `kms:DisableKey` and `kms:ScheduleKeyDeletion` only where `aws:ResourceTag/wildo:key-ref` is present, and\n * `kms:DescribeKey`; never `kms:Sign`, `kms:Encrypt`, `kms:Decrypt` nor `kms:UntagResource`.\n * - The tag is what admits a key to the signer, so whoever may tag may admit: the operator's `kms:TagResource` lets it\n * put `wildo:key-ref` on ANY key in the account, which the signer could then sign with. AWS warns of exactly this\n * (\"Be cautious about giving principals the `kms:TagResource` … permissions\"). Keep the operator role to apps-manager\n * alone, and consider a permissions boundary or SCP denying `kms:TagResource` on keys outside the custodian's.\n * - KMS applies a tag to authorization up to five minutes after it is set, so a NEW version may be refused `kms:Sign`\n * for those minutes: the first ACTIVE version of every new keyring (made at its first signature request), and one\n * made by an emergency rotation. The signature fails as a provider fault and the caller retries it; so does the first\n * wrap under a new wrapping key, which the application's data-key ring asks for again on its own retry.\n * - Google: apps-manager's identity holds `roles/iam.serviceAccountTokenCreator` on the two service accounts only.\n * Signer: `roles/cloudkms.signer`, `roles/cloudkms.cryptoKeyEncrypterDecrypter`, `roles/cloudkms.publicKeyViewer` and\n * `roles/cloudkms.viewer` on the key ring (sign, wrap and unwrap data keys, read the public key, read a version's state). Operator: `roles/cloudkms.admin` on the key ring, which contains no\n * cryptographic operation.\n * - Azure Key Vault (a vault in the Azure RBAC permission model): two user-assigned managed identities on apps-manager,\n * each with a CUSTOM role on the vault. The built-in roles do not fit: \"Key Vault Crypto User\" can update and back up a\n * key, and \"Key Vault Crypto Officer\" holds `vaults/keys/*`, signing included.\n * - Signer: `Microsoft.KeyVault/vaults/keys/read`, `…/keys/versions/read`, `…/keys/sign/action`,\n * `…/keys/encrypt/action`, `…/keys/decrypt/action` (a data key is wrapped with A256GCM under an `oct-HSM` key, which\n * a Premium vault offers in preview; a Standard vault cannot hold one and serves signing only).\n * - Operator: `…/keys/read`, `…/keys/versions/read`, `…/keys/create/action`, `…/keys/update/action` (disable),\n * `…/keys/delete`, `…/keys/purge/action`.\n * The vault's recovery level decides whether a destroyed key is purged at once or kept until retention ends.\n * - Azure Managed HSM (`*.managedhsm.azure.net`): the same two identities, with custom roles in the HSM's LOCAL RBAC\n * (the built-in \"Managed HSM Crypto User\" can sign and back up, and cannot purge). Signer:\n * `Microsoft.KeyVault/managedHsm/keys/read/action`, `…/keys/sign/action`, `…/keys/encrypt/action`, `…/keys/decrypt/action`.\n * Operator: `…/keys/read/action`,\n * `…/keys/create`, `…/keys/write/action`, `…/keys/delete`, `…/keys/deletedKeys/read/action`,\n * `…/keys/deletedKeys/delete` (purge).\n *\n * spec-cite: AWS KMS developer guide, \"Use tags to control access to KMS keys\" (`aws:ResourceTag`, the five-minute\n * delay, limiting `kms:TagResource` with `aws:RequestTag` / `aws:TagKeys`),\n * https://docs.aws.amazon.com/kms/latest/developerguide/tag-authorization.html; AWS KMS permissions reference\n * (`CreateKey`'s resource is `*`), https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html; Azure built-in roles, Security (Key\n * Vault Crypto Officer DataActions `Microsoft.KeyVault/vaults/keys/*`) and Azure permissions, Microsoft.KeyVault (the\n * `vaults/keys/*` data actions), https://learn.microsoft.com/en-us/azure/role-based-access-control/built-in-roles/security;\n * Managed HSM local RBAC built-in roles (the data-action table),\n * https://learn.microsoft.com/en-us/azure/key-vault/managed-hsm/built-in-roles.\n *\n * When a provider registers at startup, apps-manager logs the vendor's quota and per-request cost. It also holds its own\n * signing under 80% of the vendor's per-second quota, per process.\n *\n * ## Corroboration\n *\n * Every ten minutes, apps-manager compares, per key version and closed hour, the signatures its signing log records with\n * the ones the vendor's own audit log records, and writes one audit row per provider and hour:\n * - UNACCOUNTED (CRITICAL) the moment the vendor shows more signatures than apps-manager can account for: a key was used\n * outside the custodian, or a signature went unrecorded;\n * - otherwise, once the hour is six hours old (vendor logs arrive late): UNCORROBORATED (the vendor recorded fewer, or its\n * log could not be read) or CORROBORATED.\n * It reads as the OPERATOR identity, which therefore also needs:\n * - AWS: `cloudtrail:LookupEvents` (KMS `Sign` is a CloudTrail management event; nothing to enable).\n * - Google: `roles/logging.privateLogViewer` on the project, and Cloud KMS Data Access audit logs ENABLED (they are off by\n * default, and until they are on, every hour is uncorroborated).\n * - Azure: Log Analytics Reader on the workspace named by `logAnalyticsWorkspaceId`, which the vault's diagnostic setting\n * sends `AuditEvent` to.\n */\nexport const PlatformKeyVaultSelfHostedSchema = z.strictObject({\n source: z.literal(BackingServiceSource.SELF),\n});\n\n/** The operator's own Vault or OpenBao. Mounts and prefix default to the provider defaults (`transit`, `secret`, `wildo-`). */\nexport const PlatformKeyVaultManagedSchema = z.strictObject({\n source: z.literal(BackingServiceSource.MANAGED),\n /** The Vault API address apps-manager dials, e.g. `https://vault.internal:8200`. */\n address: z.url(),\n /** Vault Enterprise namespace (`team/keys/`); absent on open-source Vault and OpenBao's root namespace. */\n namespace: z.string().min(1).optional(),\n transitMount: z.string().min(1).optional(),\n kvMount: z.string().min(1).optional(),\n keyNamePrefix: z.string().min(1).optional(),\n});\n\nexport const PlatformKeyVaultConfigSchema = z.discriminatedUnion('source', [PlatformKeyVaultSelfHostedSchema, PlatformKeyVaultManagedSchema]);\nexport type PlatformKeyVaultConfig = z.infer<typeof PlatformKeyVaultConfigSchema>;\n\n/** The protection level apps-manager creates Google Cloud KMS keys at. */\nexport enum PlatformGoogleKmsKeyProtection {\n /** In Cloud HSM (FIPS 140-2 Level 3): the key's attestation is HARDWARE. */\n HSM = 'HSM',\n /** In Cloud KMS software: the key's attestation is SOFTWARE, and a HARDWARE floor refuses it. */\n SOFTWARE = 'SOFTWARE',\n}\n\n/** AWS KMS in the operator's account. */\nexport const PlatformKeyAwsKmsConfigSchema = z.strictObject({\n region: z.string().regex(/^[a-z]{2}(-[a-z]+)+-\\d$/),\n /** The role apps-manager assumes to read keys and sign. */\n signerRoleArn: z.string().regex(/^arn:aws[a-z-]*:iam::\\d{12}:role\\/.+$/),\n /** The role apps-manager assumes to create, disable and schedule the deletion of keys. */\n operatorRoleArn: z.string().regex(/^arn:aws[a-z-]*:iam::\\d{12}:role\\/.+$/),\n /** A KMS endpoint other than the region's public one (a VPC interface endpoint). */\n endpoint: z.url().optional(),\n});\n\n/** Google Cloud KMS in the operator's project. */\nexport const PlatformKeyGoogleCloudKmsConfigSchema = z.strictObject({\n /** `projects/<project>/locations/<location>/keyRings/<ring>`; created by the operator, since a key ring cannot be deleted. */\n keyRing: z.string().regex(/^projects\\/[^/]+\\/locations\\/[^/]+\\/keyRings\\/[^/]+$/),\n signerServiceAccount: z.email(),\n operatorServiceAccount: z.email(),\n protectionLevel: z.enum(PlatformGoogleKmsKeyProtection).default(PlatformGoogleKmsKeyProtection.HSM),\n});\n\n/** Azure Key Vault (Premium) or Managed HSM in the operator's subscription. */\nexport const PlatformKeyAzureKeyVaultConfigSchema = z.strictObject({\n /** `https://<vault>.vault.azure.net` or `https://<hsm>.managedhsm.azure.net`. */\n vaultUrl: z.url(),\n /** The client id of the signer's user-assigned managed identity. */\n signerClientId: z.uuid(),\n /** The client id of the operator's user-assigned managed identity. */\n operatorClientId: z.uuid(),\n /** HSM-protected keys (`EC-HSM`, a Premium vault or Managed HSM); `false` makes software `EC` keys. */\n hsm: z.boolean().default(true),\n /**\n * The Log Analytics workspace (its GUID) the vault's diagnostic setting sends `AuditEvent` to, in the `AzureDiagnostics`\n * destination mode. apps-manager reads it hourly to corroborate its signatures; absent, no Azure hour is compared.\n */\n logAnalyticsWorkspaceId: z.uuid().optional(),\n});\n\n/** The SoftHSM2 module the platform image carries: the one PKCS#11 module a containerised apps-manager has without a mount. */\nexport const PLATFORM_IMAGE_BUNDLED_PKCS11_MODULE_PATH = '/usr/lib/softhsm/libsofthsm2.so';\n\n/** An absolute path with no `.` or `..` segment, so \"is this path inside that mount\" is a plain prefix question. */\nconst AbsoluteNormalPathSchema = z\n .string()\n .regex(/^\\//, 'an absolute path')\n .refine((path) => !/(^|\\/)\\.{1,2}(\\/|$)/.test(path), 'a path with no `.` or `..` segment');\n\n/** Where the platform image keeps apps-manager itself: a mount here (or over `/`) would hide the service it serves. */\nconst PLATFORM_IMAGE_APPLICATION_ROOT = '/app';\n\n/**\n * One file or directory of the HSM vendor's PKCS#11 client, mounted READ-ONLY into apps-manager's container (#3019): the\n * module, its configuration, the client certificates. `hostPath` is on the docker host (compose) or on every node that\n * may run apps-manager (Kubernetes, a `hostPath` volume); `containerPath` is where apps-manager sees it.\n */\nexport const PlatformKeyPkcs11ClientFileSchema = z.strictObject({\n hostPath: AbsoluteNormalPathSchema,\n containerPath: AbsoluteNormalPathSchema.refine(\n (path) => path !== '/' && path.replace(/\\/+$/, '') !== PLATFORM_IMAGE_APPLICATION_ROOT && !path.startsWith(`${PLATFORM_IMAGE_APPLICATION_ROOT}/`),\n `a path outside \\`/\\` and \\`${PLATFORM_IMAGE_APPLICATION_ROOT}\\` (the platform image keeps apps-manager there)`,\n ),\n});\nexport type PlatformKeyPkcs11ClientFile = z.infer<typeof PlatformKeyPkcs11ClientFileSchema>;\n\n/**\n * A dedicated HSM reached over PKCS#11 (#2934): Thales Luna, Entrust nShield, AWS CloudHSM, Azure Cloud HSM, an\n * on-premises appliance, or SoftHSM2. apps-manager loads the vendor's PKCS#11 module, logs in to one token with a user PIN\n * (operator-typed in `secrets.json` under `platformKeyPkcs11: { pin }`, never here) and serves the `pkcs11` provider.\n *\n * Protection is read from the token, not declared: a key counts as HARDWARE only when the slot reports a hardware slot\n * AND the token's model is listed in `hardwareTokenModels`, which is your statement that this model is the hardware you\n * run. SoftHSM2 is always SOFTWARE. The binding (`pkcs11js`) is compiled by `pnpm setup:pkcs11`; an apps-manager that\n * cannot load it says so at boot and refuses every signature on this provider.\n *\n * ## A real HSM in a containerised platform (#3019)\n *\n * The platform image carries only SoftHSM2. A real HSM's client comes from the host, and every vendor documents the same\n * containerised shape: mount the client library and its configuration READ-ONLY, and point the client at its\n * configuration with the vendor's own variable. So:\n * - `clientFiles` lists what to mount, each `{ hostPath, containerPath }`. compose renders a read-only bind mount and refuses\n * to start the service when the host path is missing; Kubernetes renders a read-only `hostPath` volume, which it mounts\n * unchecked, so the files must exist on every node that may run apps-manager (a missing one shows as a token that cannot\n * be opened, logged at boot). Both apps-manager services get them (INIT and serving).\n * - `environment` carries the vendor's variables (`ChrystokiConfigurationPath` for a Thales Luna client, …). It is\n * rendered in plain text beside the service, so it may hold paths and settings, never a credential; it may not name a\n * variable Wildo sets itself. The token PIN stays in `secrets.json`.\n * - In a container, `modulePath` must be the bundled SoftHSM2 or lie under a `containerPath`. Declaring `clientFiles` says\n * apps-manager runs in a container, so that is refused here; without `clientFiles` it is refused when compose or\n * Kubernetes renders apps-manager, because a framework developer's NATIVE apps-manager loads a host path legitimately\n * (Homebrew's SoftHSM2, `/opt/homebrew/lib/softhsm/libsofthsm2.so`).\n * - Both are for the CONTAINER lanes. A framework developer's native apps-manager runs on the host, where the client is\n * installed and configured as the vendor documents, and receives neither.\n *\n * Example, a Thales Luna client installed under `/usr/safenet/lunaclient` on the host:\n * `{ modulePath: '/usr/safenet/lunaclient/lib/libCryptoki2_64.so', tokenLabel: 'wildo', hardwareTokenModels: ['Luna K7'],\n * clientFiles: [{ hostPath: '/usr/safenet/lunaclient', containerPath: '/usr/safenet/lunaclient' },\n * { hostPath: '/etc/Chrystoki.conf', containerPath: '/etc/Chrystoki.conf' }],\n * environment: { ChrystokiConfigurationPath: '/etc' } }`.\n */\nexport const PlatformKeyPkcs11ConfigSchema = z\n .strictObject({\n /**\n * The vendor's PKCS#11 module, as an absolute path in apps-manager's filesystem: in the platform image, the bundled\n * `/usr/lib/softhsm/libsofthsm2.so` or a path under a `clientFiles[].containerPath`.\n */\n modulePath: z.string().regex(/^\\//, 'an absolute path'),\n /** The token's label, as the module reports it. */\n tokenLabel: z.string().min(1).max(32),\n /** Token models (`CK_TOKEN_INFO.model`) you state are hardware. Empty: every key reports SOFTWARE. */\n hardwareTokenModels: z.array(z.string().min(1)).default([]),\n /** The vendor client's files, mounted read-only into apps-manager's container (#3019). */\n clientFiles: z.array(PlatformKeyPkcs11ClientFileSchema).optional(),\n /** The vendor client's own environment variables (no credential, and no variable Wildo sets). */\n environment: z.record(z.string().regex(/^[A-Za-z_][A-Za-z0-9_]*$/, 'an environment variable name'), z.string()).optional(),\n })\n .superRefine((pkcs11, context) => {\n const containerPaths = (pkcs11.clientFiles ?? []).map((file) => file.containerPath.replace(/\\/+$/, ''));\n containerPaths.forEach((containerPath, index) => {\n if (containerPaths.indexOf(containerPath) !== index) {\n context.addIssue({ code: 'custom', path: ['clientFiles', index, 'containerPath'], message: `\"${containerPath}\" is mounted twice` });\n }\n });\n for (const name of Object.keys(pkcs11.environment ?? {})) {\n if (WILDO_OWNED_PLATFORM_ENV_KEYS.has(name)) {\n context.addIssue({ code: 'custom', path: ['environment', name], message: `\"${name}\" is a variable Wildo sets on apps-manager itself` });\n }\n }\n if (containerPaths.length > 0 && !pkcs11ModuleIsReachableInPlatformContainer(pkcs11)) {\n context.addIssue({ code: 'custom', path: ['modulePath'], message: describeUnreachablePkcs11Module(pkcs11) });\n }\n });\nexport type PlatformKeyPkcs11Config = z.infer<typeof PlatformKeyPkcs11ConfigSchema>;\n\nexport const WildoPlatformKeyManagementConfigSchema = z.strictObject({\n vault: PlatformKeyVaultConfigSchema.optional(),\n awsKms: PlatformKeyAwsKmsConfigSchema.optional(),\n googleCloudKms: PlatformKeyGoogleCloudKmsConfigSchema.optional(),\n azureKeyVault: PlatformKeyAzureKeyVaultConfigSchema.optional(),\n pkcs11: PlatformKeyPkcs11ConfigSchema.optional(),\n});\nexport type WildoPlatformKeyManagementConfig = z.infer<typeof WildoPlatformKeyManagementConfigSchema>;\n\n/** @wildo_source:part:end platform.config.platform-key-management */\n\n/** What deciding a module's reachability needs: the module, and where the client files are mounted. */\nexport interface Pkcs11ModuleMountView {\n readonly modulePath: string;\n readonly clientFiles?: readonly { readonly containerPath: string }[];\n}\n\n/**\n * Every environment variable Wildo itself sets on a platform process. A vendor `environment` entry may name none of them:\n * it would overwrite the platform's own value (a PIN, a connection string, the service's mode), and the vendor block is\n * rendered in plain text beside the service, never into a Secret.\n */\nconst WILDO_OWNED_PLATFORM_ENV_KEYS: ReadonlySet<string> = new Set<string>([\n ...[\n PlatformProcessEnvKey, PlatformServiceUrlEnvKey, PlatformInfrastructureEnvKey, PlatformSecurityEnvKey, PlatformAdminEnvKey,\n PlatformKubernetesEnvKey, PlatformIngressEnvKey, PlatformLoggingEnvKey, PlatformObservabilityEnvKey, PlatformProviderSelectionEnvKey,\n PlatformEmailEnvKey, PlatformOwnershipDnsEnvKey, PlatformDocumentationSiteEnvKey,\n ].flatMap((vocabulary) => Object.values(vocabulary) as string[]),\n // Set literally by the deployment templates rather than through the env contract.\n 'PLATFORM_SERVICE', 'NODE_OPTIONS', 'NODE_ENV',\n]);\n\n/**\n * Whether apps-manager, running in the PLATFORM IMAGE, can load `modulePath`: it is the bundled SoftHSM2, or it lies at or\n * under one of the declared `clientFiles[].containerPath`. Nothing else exists in that container.\n */\nexport function pkcs11ModuleIsReachableInPlatformContainer(pkcs11: Pkcs11ModuleMountView): boolean {\n if (pkcs11.modulePath === PLATFORM_IMAGE_BUNDLED_PKCS11_MODULE_PATH) return true;\n return (pkcs11.clientFiles ?? []).some(({ containerPath }) => {\n const mountRoot = containerPath.replace(/\\/+$/, '');\n return pkcs11.modulePath === mountRoot || pkcs11.modulePath.startsWith(`${mountRoot}/`);\n });\n}\n\n/** The refusal both container lanes (compose, Kubernetes) raise for an unreachable module, naming the declaration. */\nexport function describeUnreachablePkcs11Module(pkcs11: Pkcs11ModuleMountView, environmentName?: string): string {\n const mounts = (pkcs11.clientFiles ?? []).map((file) => file.containerPath);\n return `${environmentName ? `Environment \"${environmentName}\": ` : ''}platformKeyManagement.pkcs11.modulePath \"${pkcs11.modulePath}\" `\n + `is not the SoftHSM2 module the platform image carries (${PLATFORM_IMAGE_BUNDLED_PKCS11_MODULE_PATH}) and lies under no `\n + `platformKeyManagement.pkcs11.clientFiles[].containerPath (${mounts.length > 0 ? mounts.join(', ') : 'none declared'}). `\n + 'apps-manager runs in the platform image, where nothing else exists: declare the vendor\\'s module (and its configuration) '\n + 'in clientFiles as { hostPath, containerPath } and point modulePath inside one of them.';\n}\n\n/** Whether the platform runs its own Vault (OpenBao) in this environment: the one predicate both lanes render from. */\nexport function selfHostsPlatformKeyVault(platformKeyManagement: WildoPlatformKeyManagementConfig | undefined): boolean {\n return platformKeyManagement?.vault?.source === BackingServiceSource.SELF;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"platform-services.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/platform-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,qBAUX;AAVD,WAAY,qBAAqB;IAC/B,wDAA+B,CAAA;IAC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,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iCAAiC,CAAC,WAA+B;IAC/E,IAAI,WAAW,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAChD,OAAQ,6BAAmF,CAAC,WAAW,CAAC,CAAC;AAC3G,CAAC;AAYD,MAAM,kCAAkC,GAAuC,IAAI,CAAC;AACpF,KAAK,kCAAkC,CAAC;AAExC,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;AACf,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B","sourcesContent":["import { PlatformApplicationType } from '@wildo-ai/platform-core-shared';\n\n/**\n * Platform microservices. All use the same Docker image (wildo-platform)\n * differentiated at runtime via PLATFORM_SERVICE env var.\n *\n * For app developers: deployed as Docker containers.\n * For framework developers: run natively from source (hot-reload).\n */\nexport enum PlatformWildoServices {\n PLATFORM_INIT = 'platform-init',\n APPS_MANAGER = 'platform-apps-manager',\n CRONTABS_BATCHES_MANAGER = 'platform-crontabs-batches-manager',\n /**\n * Module-registry server (`platform-module-registry`, KD-7).\n * Hosts the central `wildo registry *` HTTP surface; pinned port\n * `PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY` (5154).\n */\n MODULE_REGISTRY = 'platform-module-registry',\n}\n\n/**\n * Bootstrap platform services — long-running platform microservices that boot\n * from the same env contract via `PlatformEnvVarsBuilder.buildBootstrapEnv`.\n *\n * Excludes:\n * - `PLATFORM_INIT` — one-shot initialization job, not a long-running service.\n * - `APPS_MANAGER` — has its own dedicated full-env builder\n * (`PlatformEnvVarsBuilder.buildAppsManagerFullEnv`) with extra wiring\n * (Atlas creds, GitHub provisioning keys, etc.).\n *\n * Single source of truth for everything that iterates \"all bootstrap services\":\n * K8s Secret/ConfigMap emit (`k8s-secrets-generator.service.ts`), Compose\n * runtime catalog, and tests asserting cross-service env contracts.\n *\n * The `satisfies` clause below forces this list to cover every member of\n * `PlatformWildoServices` other than the two explicitly excluded ones —\n * adding a new enum member without listing it here is a compile error.\n * Without that coupling, the previous `Exclude<…>`-based local type alias\n * silently widened to include any future enum member, which masked the\n * \"service in enum but not yet handled by the bootstrap path\" drift class.\n */\ntype BootstrapPlatformServiceCandidate = Exclude<\n PlatformWildoServices,\n PlatformWildoServices.PLATFORM_INIT | PlatformWildoServices.APPS_MANAGER\n>;\n\nexport const BOOTSTRAP_PLATFORM_SERVICES = [\n PlatformWildoServices.CRONTABS_BATCHES_MANAGER,\n PlatformWildoServices.MODULE_REGISTRY,\n] as const satisfies readonly BootstrapPlatformServiceCandidate[];\n\nexport type BootstrapPlatformService = (typeof BOOTSTRAP_PLATFORM_SERVICES)[number];\n\n/**\n * The platform-application TYPES the platform provisions credentials for — the same three the\n * apps-manager provisioner iterates. Named here so the runtime-slug ledger below can be REQUIRED per\n * member: a fourth provisioned service that is not mapped fails to compile before it provisions a\n * grant nobody can use.\n */\nexport type ProvisionedPlatformApplicationType =\n | PlatformApplicationType.PLATFORM_APPS_MANAGER\n | PlatformApplicationType.PLATFORM_CRONTABS_BATCHES_MANAGER\n | PlatformApplicationType.PLATFORM_MODULE_REGISTRY;\n\n/**\n * ONE service, TWO spellings — and this is the join between them.\n *\n * `PlatformApplicationType` (`platform_crontabs_batches_manager`, underscores) is the platform-\n * application RECORD type: the row in `platformApplications`, the Redis ACL USERNAME, the RabbitMQ\n * user. `PlatformWildoServices` (`platform-crontabs-batches-manager`, hyphens) is the RUNTIME SLUG:\n * the Docker/K8s service name and, since 2026-09-09, the `appSlug` each service process boots with.\n *\n * Why the join matters: every Redis key a platform process writes is rooted at its runtime slug —\n * the engine's `RedisService` roots at `${appSlug}:`, the platform's `PlatformRedisService` at the\n * same slug through this ledger — and the ACL grant minted for the service must therefore be\n * `~<runtime slug>:*`. Two writers rooted at the USERNAME instead (the provisioner's grant, then the\n * platform Redis service's prefix) each produced `NOPERM` on the service's first key, one after the\n * other, once the other side was corrected. Both sides now read this one table.\n */\nexport const PLATFORM_SERVICE_RUNTIME_SLUG: Record<ProvisionedPlatformApplicationType, PlatformWildoServices> = {\n [PlatformApplicationType.PLATFORM_APPS_MANAGER]: PlatformWildoServices.APPS_MANAGER,\n [PlatformApplicationType.PLATFORM_CRONTABS_BATCHES_MANAGER]: PlatformWildoServices.CRONTABS_BATCHES_MANAGER,\n [PlatformApplicationType.PLATFORM_MODULE_REGISTRY]: PlatformWildoServices.MODULE_REGISTRY,\n};\n\n/**\n * The platform-side JWT KEY NAME of a provisioned platform service — the property name under which\n * that service's signing keypair is stored in its platform secrets (`jwt.privateKey[<name>]`,\n * `jwt.publicKey[<name>]`) and under which its public key is PUBLISHED into the platform config's\n * `jwtPublicKeys`.\n *\n * ## Two concepts that share spellings, and must not be merged\n *\n * 1. **This vocabulary — every provisioned platform service's key name.** TOTAL by nature: every\n * service apps-manager provisions gets a keypair, so every one has a name. The platform-side\n * vocabularies (`PlatformJwtPrivateKeys` / `PlatformJwtPublicKeys` in `platform-shared-lib`) are\n * DERIVED from it, and every map from a service to its key name is keyed by\n * {@link ProvisionedPlatformApplicationType} and required per member.\n * 2. **`JwtPublicKeys` in `@wildo-ai/saas-models` — the platform services whose tokens APPLICATIONS\n * verify.** A deliberate SUBSET: module-registry signs nothing to an application, so it is not\n * there, and adding it would invent an issuer/audience verification nothing performs.\n * `platform-shared-lib` asserts at the type level that that subset stays inside this vocabulary.\n *\n * ## Why this is the ONE source\n *\n * Before #514 the same population was enumerated by hand in four places — two of them\n * `Partial<Record<…>>` maps that omitted module-registry. A `Partial` map is exactly the hand-copied\n * population that broke every fresh install when module-registry was added (see\n * `.claude/rules/invariant-call-site-enumeration.md` #21): it compiles with the member missing and\n * falls back to a key the service's secrets never hold.\n *\n * The string VALUES are persisted keys (platform secrets documents, published `jwtPublicKeys`) and\n * must never change spelling.\n */\nexport enum PlatformServiceJwtKeyName {\n PLATFORM_APPS_MANAGER = 'PLATFORM_APPS_MANAGER',\n PLATFORM_CRONTABS_BATCHES_MANAGER = 'PLATFORM_CRONTABS_BATCHES_MANAGER',\n PLATFORM_MODULE_REGISTRY = 'PLATFORM_MODULE_REGISTRY',\n}\n\n/**\n * Provisioned platform service → its platform-side JWT key name. Required for every member of\n * {@link ProvisionedPlatformApplicationType}, so a fourth provisioned service fails to compile here\n * until it is given a name.\n */\nexport const PLATFORM_SERVICE_JWT_KEY_NAME = {\n [PlatformApplicationType.PLATFORM_APPS_MANAGER]: PlatformServiceJwtKeyName.PLATFORM_APPS_MANAGER,\n [PlatformApplicationType.PLATFORM_CRONTABS_BATCHES_MANAGER]: PlatformServiceJwtKeyName.PLATFORM_CRONTABS_BATCHES_MANAGER,\n [PlatformApplicationType.PLATFORM_MODULE_REGISTRY]: PlatformServiceJwtKeyName.PLATFORM_MODULE_REGISTRY,\n} as const satisfies Record<ProvisionedPlatformApplicationType, PlatformServiceJwtKeyName>;\n\n/**\n * Compile-time assertion: every {@link PlatformServiceJwtKeyName} member is the key name of SOME\n * provisioned service. A name nothing maps to would be a vocabulary member no keypair is ever stored\n * under.\n */\ntype _AssertEveryJwtKeyNameIsMapped =\n Exclude<PlatformServiceJwtKeyName, (typeof PLATFORM_SERVICE_JWT_KEY_NAME)[ProvisionedPlatformApplicationType]> extends never\n ? true\n : never;\nconst _assertEveryJwtKeyNameIsMapped: _AssertEveryJwtKeyNameIsMapped = true;\nvoid _assertEveryJwtKeyNameIsMapped;\n\n/**\n * The platform-side JWT key name for a platform-application type name, or `undefined` when the name\n * is not a provisioned platform service. Callers holding a runtime string (a service's own\n * `serviceName`, an inbound service id) go through here rather than casting into the map.\n */\nexport function resolvePlatformServiceJwtKeyName(serviceName: string | undefined): PlatformServiceJwtKeyName | undefined {\n if (serviceName === undefined) return undefined;\n return (PLATFORM_SERVICE_JWT_KEY_NAME as Record<string, PlatformServiceJwtKeyName | undefined>)[serviceName];\n}\n\n/**\n * The runtime slug for a platform-application type name, or `undefined` when the name is not a\n * provisioned platform service — a caller then reports or refuses rather than rooting a key\n * namespace, or a grant, on a guess.\n */\nexport function resolvePlatformServiceRuntimeSlug(serviceName: string | undefined): PlatformWildoServices | undefined {\n if (serviceName === undefined) return undefined;\n return (PLATFORM_SERVICE_RUNTIME_SLUG as Record<string, PlatformWildoServices | undefined>)[serviceName];\n}\n\n/**\n * Compile-time assertion: every non-excluded `PlatformWildoServices` member\n * MUST appear in `BOOTSTRAP_PLATFORM_SERVICES`. Adding a new member to the\n * enum without listing it above triggers a `Type 'X' is not assignable to\n * type 'never'` error pointing here, so the exhaustiveness check the\n * `addServiceExtras` switch used to provide for `Exclude<…>`-derived types\n * is preserved.\n */\ntype _AssertExhaustiveBootstrapCoverage =\n Exclude<BootstrapPlatformServiceCandidate, BootstrapPlatformService> extends never ? true : never;\nconst _assertExhaustiveBootstrapCoverage: _AssertExhaustiveBootstrapCoverage = true;\nvoid _assertExhaustiveBootstrapCoverage;\n\nexport enum AppsManagerMode {\n NORMAL = 'normal',\n INIT = 'init',\n}\n\n"]}
1
+ {"version":3,"file":"platform-services.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/platform-services.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEzE;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,qBAUX;AAVD,WAAY,qBAAqB;IAC/B,wDAA+B,CAAA;IAC/B,+DAAsC,CAAA;IACtC,uFAA8D,CAAA;IAC9D;;;;OAIG;IACH,qEAA4C,CAAA;AAC9C,CAAC,EAVW,qBAAqB,KAArB,qBAAqB,QAUhC;AA4BD,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,qBAAqB,CAAC,wBAAwB;IAC9C,qBAAqB,CAAC,eAAe;CAC0B,CAAC;AAelE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAsE;IAC9G,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,EAAE,qBAAqB,CAAC,YAAY;IACnF,CAAC,uBAAuB,CAAC,iCAAiC,CAAC,EAAE,q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\n\n/**\n * Platform microservices. All use the same Docker image (wildo-platform)\n * differentiated at runtime via PLATFORM_SERVICE env var.\n *\n * For app developers: deployed as Docker containers.\n * For framework developers: run natively from source (hot-reload).\n */\nexport enum PlatformWildoServices {\n PLATFORM_INIT = 'platform-init',\n APPS_MANAGER = 'platform-apps-manager',\n CRONTABS_BATCHES_MANAGER = 'platform-crontabs-batches-manager',\n /**\n * Module-registry server (`platform-module-registry`, KD-7).\n * Hosts the central `wildo registry *` HTTP surface; pinned port\n * `PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY` (5154).\n */\n MODULE_REGISTRY = 'platform-module-registry',\n}\n\n/**\n * Bootstrap platform services — long-running platform microservices that boot\n * from the same env contract via `PlatformEnvVarsBuilder.buildBootstrapEnv`.\n *\n * Excludes:\n * - `PLATFORM_INIT` — one-shot initialization job, not a long-running service.\n * - `APPS_MANAGER` — has its own dedicated full-env builder\n * (`PlatformEnvVarsBuilder.buildAppsManagerFullEnv`) with extra wiring\n * (Atlas creds, GitHub provisioning keys, etc.).\n *\n * Single source of truth for everything that iterates \"all bootstrap services\":\n * K8s Secret/ConfigMap emit (`k8s-secrets-generator.service.ts`), Compose\n * runtime catalog, and tests asserting cross-service env contracts.\n *\n * The `satisfies` clause below forces this list to cover every member of\n * `PlatformWildoServices` other than the two explicitly excluded ones —\n * adding a new enum member without listing it here is a compile error.\n * Without that coupling, the previous `Exclude<…>`-based local type alias\n * silently widened to include any future enum member, which masked the\n * \"service in enum but not yet handled by the bootstrap path\" drift class.\n */\ntype BootstrapPlatformServiceCandidate = Exclude<\n PlatformWildoServices,\n PlatformWildoServices.PLATFORM_INIT | PlatformWildoServices.APPS_MANAGER\n>;\n\nexport const BOOTSTRAP_PLATFORM_SERVICES = [\n PlatformWildoServices.CRONTABS_BATCHES_MANAGER,\n PlatformWildoServices.MODULE_REGISTRY,\n] as const satisfies readonly BootstrapPlatformServiceCandidate[];\n\nexport type BootstrapPlatformService = (typeof BOOTSTRAP_PLATFORM_SERVICES)[number];\n\n/**\n * The platform-application TYPES the platform provisions credentials for — the same three the\n * apps-manager provisioner iterates. Named here so the runtime-slug ledger below can be REQUIRED per\n * member: a fourth provisioned service that is not mapped fails to compile before it provisions a\n * grant nobody can use.\n */\nexport type ProvisionedPlatformApplicationType =\n | PlatformApplicationType.PLATFORM_APPS_MANAGER\n | PlatformApplicationType.PLATFORM_CRONTABS_BATCHES_MANAGER\n | PlatformApplicationType.PLATFORM_MODULE_REGISTRY;\n\n/**\n * ONE service, TWO spellings — and this is the join between them.\n *\n * `PlatformApplicationType` (`platform_crontabs_batches_manager`, underscores) is the platform-\n * application RECORD type: the row in `platformApplications`, the Redis ACL USERNAME, the RabbitMQ\n * user. `PlatformWildoServices` (`platform-crontabs-batches-manager`, hyphens) is the RUNTIME SLUG:\n * the Docker/K8s service name and, since 2026-09-09, the `appSlug` each service process boots with.\n *\n * Why the join matters: every Redis key a platform process writes is rooted at its runtime slug —\n * the engine's `RedisService` roots at `${appSlug}:`, the platform's `PlatformRedisService` at the\n * same slug through this ledger — and the ACL grant minted for the service must therefore be\n * `~<runtime slug>:*`. Two writers rooted at the USERNAME instead (the provisioner's grant, then the\n * platform Redis service's prefix) each produced `NOPERM` on the service's first key, one after the\n * other, once the other side was corrected. Both sides now read this one table.\n */\nexport const PLATFORM_SERVICE_RUNTIME_SLUG: Record<ProvisionedPlatformApplicationType, PlatformWildoServices> = {\n [PlatformApplicationType.PLATFORM_APPS_MANAGER]: PlatformWildoServices.APPS_MANAGER,\n [PlatformApplicationType.PLATFORM_CRONTABS_BATCHES_MANAGER]: PlatformWildoServices.CRONTABS_BATCHES_MANAGER,\n [PlatformApplicationType.PLATFORM_MODULE_REGISTRY]: PlatformWildoServices.MODULE_REGISTRY,\n};\n\n/**\n * The platform-side JWT KEY NAME of a provisioned platform service — the property name under which\n * that service's signing keypair is stored in its platform secrets (`jwt.privateKey[<name>]`,\n * `jwt.publicKey[<name>]`) and under which its public key is PUBLISHED into the platform config's\n * `jwtPublicKeys`.\n *\n * ## Two concepts that share spellings, and must not be merged\n *\n * 1. **This vocabulary — every provisioned platform service's key name.** TOTAL by nature: every\n * service apps-manager provisions gets a keypair, so every one has a name. The platform-side\n * vocabularies (`PlatformJwtPrivateKeys` / `PlatformJwtPublicKeys` in `platform-shared-lib`) are\n * DERIVED from it, and every map from a service to its key name is keyed by\n * {@link ProvisionedPlatformApplicationType} and required per member.\n * 2. **`JwtPublicKeys` in `@wildo-ai/saas-models` — the platform services whose tokens APPLICATIONS\n * verify.** A deliberate SUBSET: module-registry signs nothing to an application, so it is not\n * there, and adding it would invent an issuer/audience verification nothing performs.\n * `platform-shared-lib` asserts at the type level that that subset stays inside this vocabulary.\n *\n * ## Why this is the ONE source\n *\n * Before #514 the same population was enumerated by hand in four places — two of them\n * `Partial<Record<…>>` maps that omitted module-registry. A `Partial` map is exactly the hand-copied\n * population that broke every fresh install when module-registry was added (see\n * `.claude/rules/invariant-call-site-enumeration.md` #21): it compiles with the member missing and\n * falls back to a key the service's secrets never hold.\n *\n * The string VALUES are persisted keys (platform secrets documents, published `jwtPublicKeys`) and\n * must never change spelling.\n */\nexport enum PlatformServiceJwtKeyName {\n PLATFORM_APPS_MANAGER = 'PLATFORM_APPS_MANAGER',\n PLATFORM_CRONTABS_BATCHES_MANAGER = 'PLATFORM_CRONTABS_BATCHES_MANAGER',\n PLATFORM_MODULE_REGISTRY = 'PLATFORM_MODULE_REGISTRY',\n}\n\n/**\n * Provisioned platform service → its platform-side JWT key name. Required for every member of\n * {@link ProvisionedPlatformApplicationType}, so a fourth provisioned service fails to compile here\n * until it is given a name.\n */\nexport const PLATFORM_SERVICE_JWT_KEY_NAME = {\n [PlatformApplicationType.PLATFORM_APPS_MANAGER]: PlatformServiceJwtKeyName.PLATFORM_APPS_MANAGER,\n [PlatformApplicationType.PLATFORM_CRONTABS_BATCHES_MANAGER]: PlatformServiceJwtKeyName.PLATFORM_CRONTABS_BATCHES_MANAGER,\n [PlatformApplicationType.PLATFORM_MODULE_REGISTRY]: PlatformServiceJwtKeyName.PLATFORM_MODULE_REGISTRY,\n} as const satisfies Record<ProvisionedPlatformApplicationType, PlatformServiceJwtKeyName>;\n\n/**\n * Compile-time assertion: every {@link PlatformServiceJwtKeyName} member is the key name of SOME\n * provisioned service. A name nothing maps to would be a vocabulary member no keypair is ever stored\n * under.\n */\ntype _AssertEveryJwtKeyNameIsMapped =\n Exclude<PlatformServiceJwtKeyName, (typeof PLATFORM_SERVICE_JWT_KEY_NAME)[ProvisionedPlatformApplicationType]> extends never\n ? true\n : never;\nconst _assertEveryJwtKeyNameIsMapped: _AssertEveryJwtKeyNameIsMapped = true;\nvoid _assertEveryJwtKeyNameIsMapped;\n\n/**\n * The platform-side JWT key name for a platform-application type name, or `undefined` when the name\n * is not a provisioned platform service. Callers holding a runtime string (a service's own\n * `serviceName`, an inbound service id) go through here rather than casting into the map.\n */\nexport function resolvePlatformServiceJwtKeyName(serviceName: string | undefined): PlatformServiceJwtKeyName | undefined {\n if (serviceName === undefined) return undefined;\n return (PLATFORM_SERVICE_JWT_KEY_NAME as Record<string, PlatformServiceJwtKeyName | undefined>)[serviceName];\n}\n\n/**\n * The runtime slug for a platform-application type name, or `undefined` when the name is not a\n * provisioned platform service — a caller then reports or refuses rather than rooting a key\n * namespace, or a grant, on a guess.\n */\nexport function resolvePlatformServiceRuntimeSlug(serviceName: string | undefined): PlatformWildoServices | undefined {\n if (serviceName === undefined) return undefined;\n return (PLATFORM_SERVICE_RUNTIME_SLUG as Record<string, PlatformWildoServices | undefined>)[serviceName];\n}\n\n/**\n * Compile-time assertion: every non-excluded `PlatformWildoServices` member\n * MUST appear in `BOOTSTRAP_PLATFORM_SERVICES`. Adding a new member to the\n * enum without listing it above triggers a `Type 'X' is not assignable to\n * type 'never'` error pointing here, so the exhaustiveness check the\n * `addServiceExtras` switch used to provide for `Exclude<…>`-derived types\n * is preserved.\n */\ntype _AssertExhaustiveBootstrapCoverage =\n Exclude<BootstrapPlatformServiceCandidate, BootstrapPlatformService> extends never ? true : never;\nconst _assertExhaustiveBootstrapCoverage: _AssertExhaustiveBootstrapCoverage = true;\nvoid _assertExhaustiveBootstrapCoverage;\n\nexport enum AppsManagerMode {\n NORMAL = 'normal',\n INIT = 'init',\n}\n\n"]}
@@ -26,8 +26,8 @@ import { z } from 'zod';
26
26
  * it can author one here. Absent, the constant applies there too.
27
27
  */
28
28
  export declare const WildoPlatformStorageConfigSchema: z.ZodObject<{
29
- /** The bucket apps-manager and module-registry store the platform's own objects in. */
30
- bucket: z.ZodString;
29
+ bucket: z.ZodOptional<z.ZodString>;
30
+ stsRoleArn: z.ZodOptional<z.ZodString>;
31
31
  }, z.core.$strict>;
32
32
  export type WildoPlatformStorageConfig = z.infer<typeof WildoPlatformStorageConfigSchema>;
33
33
  /** The platform tier's bucket: the authored remote override, else {@link STORAGE_DEFAULTS.BUCKET}. */
@@ -1 +1 @@
1
- {"version":3,"file":"platform-storage.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/platform-storage.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gCAAgC;IAC3C,uFAAuF;;kBAEvF,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,sGAAsG;AACtG,wBAAgB,kCAAkC,CAAC,eAAe,EAAE,0BAA0B,GAAG,SAAS,GAAG,MAAM,CAElH"}
1
+ {"version":3,"file":"platform-storage.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/platform-storage.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,gCAAgC;;;kBAiB3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,sGAAsG;AACtG,wBAAgB,kCAAkC,CAAC,eAAe,EAAE,0BAA0B,GAAG,SAAS,GAAG,MAAM,CAElH"}
@@ -27,8 +27,22 @@ import { STORAGE_DEFAULTS } from './infrastructure-defaults.schemas.js';
27
27
  * it can author one here. Absent, the constant applies there too.
28
28
  */
29
29
  export const WildoPlatformStorageConfigSchema = z.strictObject({
30
- /** The bucket apps-manager and module-registry store the platform's own objects in. */
31
- bucket: z.string().min(1),
30
+ /** The bucket apps-manager and module-registry store the platform's own objects in. Absent: the constant. */
31
+ bucket: z.string().min(1).optional(),
32
+ /**
33
+ * The role apps-manager's object-storage broker assumes, as an ARN (#2172). Rendered into apps-manager's
34
+ * environment as `STORAGE_STS_ROLE_ARN`, never into an application's or another platform service's.
35
+ *
36
+ * Required by a store whose STS `AssumeRole` names a role (AWS STS, SeaweedFS, Ceph RGW); the broker refuses to
37
+ * issue a credential against AWS without it, and never falls back to the root key. Leave it out for a
38
+ * MinIO-compatible store, which issues a session for the calling key and names no role. The role's trust policy
39
+ * must admit the storage root key's identity, and its permissions bound every session: the broker's inline session
40
+ * policy only narrows them.
41
+ *
42
+ * spec-cite: AWS STS API Reference, AssumeRole — `RoleArn` (Required: Yes; length 20–2048)
43
+ * (https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html).
44
+ */
45
+ stsRoleArn: z.string().min(20).max(2048).optional(),
32
46
  });
33
47
  /** The platform tier's bucket: the authored remote override, else {@link STORAGE_DEFAULTS.BUCKET}. */
34
48
  export function resolvePlatformObjectStorageBucket(platformStorage) {
@@ -1 +1 @@
1
- {"version":3,"file":"platform-storage.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/platform-storage.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7D,uFAAuF;IACvF,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC1B,CAAC,CAAC;AAGH,sGAAsG;AACtG,MAAM,UAAU,kCAAkC,CAAC,eAAuD;IACxG,OAAO,eAAe,EAAE,MAAM,IAAI,gBAAgB,CAAC,MAAM,CAAC;AAC5D,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { STORAGE_DEFAULTS } from './infrastructure-defaults.schemas';\n\n/**\n * The PLATFORM tier's own object-storage bucket, authored for a remote environment (#1112).\n *\n * ## Why the platform needs its own, separate from `backingServices.s3.bucket`\n *\n * `backingServices.s3.bucket` is an APPLICATION's bucket: its backend reads and writes there, and apps-manager\n * confines that application's storage credential to it (#1107). The platform services — apps-manager itself and\n * module-registry — store their own objects too, and both halves of that pair must address ONE bucket: the\n * platform-services STS door confines to the bucket apps-manager's env names, while module-registry addresses\n * objects in the bucket its own env names.\n *\n * Until #1112 the CLI rendered that platform bucket from the `config.json` of whichever application was being\n * registered or deployed, so it became the last-registered application's bucket, and platform objects written\n * earlier went out of reach. Measured on 2026-09-14: module-registry's uploads sat in `wonder-todos-local`, and\n * registering a second application rewrote every platform service's env to that application's bucket.\n *\n * ## Local: a constant. Remote: authored.\n *\n * A local platform is shared by every application checked out beside it, and no configuration on disk is shared\n * across them — every infra file, `config.json` and `secrets.json` belongs to one application. So a local\n * platform's bucket is the constant {@link STORAGE_DEFAULTS.BUCKET}, and authoring this block in a local\n * environment is refused at parse time (the same shape as `cdn`, which is remote-only for its own reason).\n *\n * A remote environment is deployed from one application's infra file and may need a globally unique S3 name, so\n * it can author one here. Absent, the constant applies there too.\n */\nexport const WildoPlatformStorageConfigSchema = z.strictObject({\n /** The bucket apps-manager and module-registry store the platform's own objects in. */\n bucket: z.string().min(1),\n});\nexport type WildoPlatformStorageConfig = z.infer<typeof WildoPlatformStorageConfigSchema>;\n\n/** The platform tier's bucket: the authored remote override, else {@link STORAGE_DEFAULTS.BUCKET}. */\nexport function resolvePlatformObjectStorageBucket(platformStorage: WildoPlatformStorageConfig | undefined): string {\n return platformStorage?.bucket ?? STORAGE_DEFAULTS.BUCKET;\n}\n"]}
1
+ {"version":3,"file":"platform-storage.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/platform-storage.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,YAAY,CAAC;IAC7D,6GAA6G;IAC7G,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACpC;;;;;;;;;;;;OAYG;IACH,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAC;AAGH,sGAAsG;AACtG,MAAM,UAAU,kCAAkC,CAAC,eAAuD;IACxG,OAAO,eAAe,EAAE,MAAM,IAAI,gBAAgB,CAAC,MAAM,CAAC;AAC5D,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport { STORAGE_DEFAULTS } from './infrastructure-defaults.schemas';\n\n/**\n * The PLATFORM tier's own object-storage bucket, authored for a remote environment (#1112).\n *\n * ## Why the platform needs its own, separate from `backingServices.s3.bucket`\n *\n * `backingServices.s3.bucket` is an APPLICATION's bucket: its backend reads and writes there, and apps-manager\n * confines that application's storage credential to it (#1107). The platform services — apps-manager itself and\n * module-registry — store their own objects too, and both halves of that pair must address ONE bucket: the\n * platform-services STS door confines to the bucket apps-manager's env names, while module-registry addresses\n * objects in the bucket its own env names.\n *\n * Until #1112 the CLI rendered that platform bucket from the `config.json` of whichever application was being\n * registered or deployed, so it became the last-registered application's bucket, and platform objects written\n * earlier went out of reach. Measured on 2026-09-14: module-registry's uploads sat in `wonder-todos-local`, and\n * registering a second application rewrote every platform service's env to that application's bucket.\n *\n * ## Local: a constant. Remote: authored.\n *\n * A local platform is shared by every application checked out beside it, and no configuration on disk is shared\n * across them — every infra file, `config.json` and `secrets.json` belongs to one application. So a local\n * platform's bucket is the constant {@link STORAGE_DEFAULTS.BUCKET}, and authoring this block in a local\n * environment is refused at parse time (the same shape as `cdn`, which is remote-only for its own reason).\n *\n * A remote environment is deployed from one application's infra file and may need a globally unique S3 name, so\n * it can author one here. Absent, the constant applies there too.\n */\nexport const WildoPlatformStorageConfigSchema = z.strictObject({\n /** The bucket apps-manager and module-registry store the platform's own objects in. Absent: the constant. */\n bucket: z.string().min(1).optional(),\n /**\n * The role apps-manager's object-storage broker assumes, as an ARN (#2172). Rendered into apps-manager's\n * environment as `STORAGE_STS_ROLE_ARN`, never into an application's or another platform service's.\n *\n * Required by a store whose STS `AssumeRole` names a role (AWS STS, SeaweedFS, Ceph RGW); the broker refuses to\n * issue a credential against AWS without it, and never falls back to the root key. Leave it out for a\n * MinIO-compatible store, which issues a session for the calling key and names no role. The role's trust policy\n * must admit the storage root key's identity, and its permissions bound every session: the broker's inline session\n * policy only narrows them.\n *\n * spec-cite: AWS STS API Reference, AssumeRole — `RoleArn` (Required: Yes; length 20–2048)\n * (https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html).\n */\n stsRoleArn: z.string().min(20).max(2048).optional(),\n});\nexport type WildoPlatformStorageConfig = z.infer<typeof WildoPlatformStorageConfigSchema>;\n\n/** The platform tier's bucket: the authored remote override, else {@link STORAGE_DEFAULTS.BUCKET}. */\nexport function resolvePlatformObjectStorageBucket(platformStorage: WildoPlatformStorageConfig | undefined): string {\n return platformStorage?.bucket ?? STORAGE_DEFAULTS.BUCKET;\n}\n"]}
@@ -28,11 +28,11 @@ export declare enum AppLibraryType {
28
28
  }
29
29
  /**
30
30
  * How the receiving frontend stores the JWT pair after a cross-frontend
31
- * handoff exchange (`cross-app-jwt-propagation.md` K-4).
31
+ * handoff exchange.
32
32
  *
33
33
  * - `'ephemeral'` (default) → `EphemeralSessionTokenStorage` (in-memory,
34
34
  * dies with the tab). Avoids token poisoning when the source frontend
35
- * already holds a persistent session, and matches the existing W7.3b
35
+ * already holds a persistent session, and matches the existing
36
36
  * `Auth_OneOffSession` guard that refuses non-`Ephemeral` storage.
37
37
  * Correct default for `TECH_DOC`, for secondary `SAAS_APP` surfaces
38
38
  * (e.g., an admin console reached by handoff from a primary app),
@@ -239,26 +239,25 @@ export declare const AppServiceDefinitionSchema: z.ZodObject<{
239
239
  enabled: z.ZodDefault<z.ZodBoolean>;
240
240
  reportOnly: z.ZodDefault<z.ZodBoolean>;
241
241
  mergeStrategy: z.ZodDefault<z.ZodEnum<typeof import("./csp.schemas").CspMergeStrategy>>;
242
- directives: z.ZodDefault<z.ZodObject<Record<"default-src" | "script-src" | "style-src" | "img-src" | "connect-src" | "font-src" | "frame-src" | "frame-ancestors" | "object-src" | "form-action" | "base-uri" | "manifest-src" | "media-src" | "worker-src", z.ZodOptional<z.ZodArray<z.ZodString>>>, z.core.$strict>>;
242
+ directives: z.ZodDefault<z.ZodObject<{
243
+ "default-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
244
+ "script-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
245
+ "style-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
246
+ "img-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
247
+ "connect-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
248
+ "font-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
249
+ "frame-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
250
+ "frame-ancestors": z.ZodOptional<z.ZodArray<z.ZodString>>;
251
+ "object-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
252
+ "form-action": z.ZodOptional<z.ZodArray<z.ZodString>>;
253
+ "base-uri": z.ZodOptional<z.ZodArray<z.ZodString>>;
254
+ "manifest-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
255
+ "media-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
256
+ "worker-src": z.ZodOptional<z.ZodArray<z.ZodString>>;
257
+ }, z.core.$strict>>;
243
258
  reportUri: z.ZodOptional<z.ZodString>;
259
+ reportTo: z.ZodOptional<z.ZodURL>;
244
260
  }, z.core.$strict>>;
245
- /**
246
- * Container isolation — the same contract minions and workers carry, applied to
247
- * the two container kinds that had none: the app backend and each frontend.
248
- *
249
- * `.optional()` here, unlike the minion/worker `.prefault({})`, because the
250
- * correct DEFAULT depends on the kind and the kind is not known until the row
251
- * is read: a backend runs Node as {@link APP_BACKEND_DEFAULT_RUNTIME_UID}, a
252
- * frontend runs nginx as {@link APP_FRONTEND_DEFAULT_RUNTIME_UID}. Emitting one
253
- * number for both would hand half the services a uid their image does not
254
- * define. Callers resolve it through {@link resolveAppServiceIsolation}, which
255
- * is where "authored nothing" becomes a hardened value — never at a renderer,
256
- * so the two renderers cannot disagree.
257
- *
258
- * The floor is absent for the same reason it is absent from the minion and
259
- * worker schemas: it is emitted unconditionally and must not be authorable
260
- * down. See {@link RuntimeIsolationSchema}.
261
- */
262
261
  isolation: z.ZodOptional<z.ZodObject<{
263
262
  runAsUser: z.ZodOptional<z.ZodNumber>;
264
263
  runAsGroup: z.ZodOptional<z.ZodNumber>;
@@ -302,13 +301,12 @@ export type DataAccess = z.infer<typeof DataAccessSchema>;
302
301
  * Minimal "I live at this path" reference for a per-folder app sub-config
303
302
  * (`wildo.minion.config.ts`, `wildo.worker.config.ts`, `wildo.specifications.config.ts`).
304
303
  *
305
- * Tightened to `z.strictObject` (M-3 in
306
- * `.cursor/plans/minions-and-workers-implementation.md`) so authoring an
304
+ * Tightened to `z.strictObject` so authoring an
307
305
  * unknown key — e.g. a typo `pat:` instead of `path:`, or a stray
308
306
  * `resourceAccess` on a `workers` entry where it has no meaning today —
309
307
  * fails fast at parse time rather than being silently dropped. The
310
308
  * minions bucket value schema in `define-saas-config.ts` extends this
311
- * shape (still strict) to add `resourceAccess` per KD-11.
309
+ * shape (still strict) to add `resourceAccess`.
312
310
  */
313
311
  export declare const AppRefSchema: z.ZodObject<{
314
312
  path: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"service-definitions.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/service-definitions.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,oBAAY,cAAc;IACxB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,sCAAuC,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAkB9C,eAAO,MAAM,sBAAsB;;;;;kBAKjC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,8BAA8B;;;;;kBAKzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;;;;;;;GAQ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,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;iBAI3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY;;kBAEvB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"service-definitions.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/service-definitions.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,oBAAY,cAAc;IACxB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,sCAAuC,CAAC;AACzE,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAkB9C,eAAO,MAAM,sBAAsB;;;;;kBAKjC,CAAC;AAEH;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,8BAA8B;;;;;kBAKzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACtF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAA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iBAG/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;iBAI3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY;;kBAEvB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -30,11 +30,11 @@ export var AppLibraryType;
30
30
  })(AppLibraryType || (AppLibraryType = {}));
31
31
  /**
32
32
  * How the receiving frontend stores the JWT pair after a cross-frontend
33
- * handoff exchange (`cross-app-jwt-propagation.md` K-4).
33
+ * handoff exchange.
34
34
  *
35
35
  * - `'ephemeral'` (default) → `EphemeralSessionTokenStorage` (in-memory,
36
36
  * dies with the tab). Avoids token poisoning when the source frontend
37
- * already holds a persistent session, and matches the existing W7.3b
37
+ * already holds a persistent session, and matches the existing
38
38
  * `Auth_OneOffSession` guard that refuses non-`Ephemeral` storage.
39
39
  * Correct default for `TECH_DOC`, for secondary `SAAS_APP` surfaces
40
40
  * (e.g., an admin console reached by handoff from a primary app),
@@ -332,13 +332,12 @@ export const DataAccessSchema = z.object({
332
332
  * Minimal "I live at this path" reference for a per-folder app sub-config
333
333
  * (`wildo.minion.config.ts`, `wildo.worker.config.ts`, `wildo.specifications.config.ts`).
334
334
  *
335
- * Tightened to `z.strictObject` (M-3 in
336
- * `.cursor/plans/minions-and-workers-implementation.md`) so authoring an
335
+ * Tightened to `z.strictObject` so authoring an
337
336
  * unknown key — e.g. a typo `pat:` instead of `path:`, or a stray
338
337
  * `resourceAccess` on a `workers` entry where it has no meaning today —
339
338
  * fails fast at parse time rather than being silently dropped. The
340
339
  * minions bucket value schema in `define-saas-config.ts` extends this
341
- * shape (still strict) to add `resourceAccess` per KD-11.
340
+ * shape (still strict) to add `resourceAccess`.
342
341
  */
343
342
  export const AppRefSchema = z.strictObject({
344
343
  path: z.string().min(1),
@@ -1 +1 @@
1
- {"version":3,"file":"service-definitions.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/service-definitions.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,MAAM,CAAN,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,yCAAuB,CAAA;IACvB,uCAAqB,CAAA;IACrB,qCAAmB,CAAA;AACrB,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,YAAY,EAAE,WAAW,CAAU,CAAC;AAGzE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,CAAC;AAE9C;;;;;;;;GAQG;AACH,MAAM,sBAAsB,GAAG;IAC7B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACtC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IACvC,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IACzD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAA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AAC,QAAQ,EAAE;CACnE,CAAC,CAAC;AAGH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,YAAY,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxB,CAAC,CAAC","sourcesContent":["import { z } from 'zod';\nimport { WildoCspConfigSchema } from './csp.schemas';\n\n/**\n * `AppFrontendType` lives in `@wildo-ai/saas-models/public-runtime` so the\n * backend's `FrontendServiceDefinitionSchema` (`@wildo-ai/saas-models`) and\n * client-bundle consumers (website discovery, scaffolding, CSP config,\n * companion services) can read the same enum without booting the heavy\n * decorator-bound schema graph. The atom is imported from the\n * `/public-runtime` subpath (NOT the package root barrel) so this file\n * stays free of `initZodDecorators()` side effects — `import { z } from 'zod'`\n * only, plus one decorator-free public-runtime import.\n *\n * The re-export below preserves every existing\n * `import { AppFrontendType } from '@wildo-ai/platform-config-lib'` call site\n * unchanged. Single source of truth (`@wildo-ai/saas-models`) with the\n * original public surface preserved.\n *\n * For the kind-by-kind taxonomy (`SAAS_APP` / `STATIC_WEBSITE` / `TECH_DOC`)\n * and the locked \"no native variants\" design decision, see the file-level\n * JSDoc in `engine/saas-models/src/config/app-frontend-type.shared.schemas.ts`\n * — that is the canonical home; do NOT duplicate the explanation here.\n */\nimport { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';\n\nexport { AppFrontendType };\n\nexport enum AppLibraryType {\n FULLSTACK = 'fullstack',\n FRONTEND = 'frontend',\n BACKEND = 'backend',\n}\n\n/**\n * How the receiving frontend stores the JWT pair after a cross-frontend\n * handoff exchange (`cross-app-jwt-propagation.md` K-4).\n *\n * - `'ephemeral'` (default) → `EphemeralSessionTokenStorage` (in-memory,\n * dies with the tab). Avoids token poisoning when the source frontend\n * already holds a persistent session, and matches the existing W7.3b\n * `Auth_OneOffSession` guard that refuses non-`Ephemeral` storage.\n * Correct default for `TECH_DOC`, for secondary `SAAS_APP` surfaces\n * (e.g., an admin console reached by handoff from a primary app),\n * and for `STATIC_WEBSITE` (which never stores tokens anyway).\n * - `'persistent'` → `PersistentSessionTokenStorage` (localStorage).\n * Opt-in for the primary `SAAS_APP` surface where the user expects\n * their session to survive a tab close. Each service authors this\n * explicitly; there is no auto-derivation from `frontendType`\n * because a project can have multiple `SAAS_APP` services where\n * only one is \"primary\".\n */\nexport const APP_SESSION_STORAGES = ['persistent', 'ephemeral'] as const;\nexport type AppSessionStorage = (typeof APP_SESSION_STORAGES)[number];\n\n/**\n * The writable mount every containerised app runtime gets, unconditionally.\n *\n * Shared by minions and workers rather than defined twice: it is paired with\n * `readOnlyRootFilesystem: true` in both renderers, and two copies of a path this\n * load-bearing WILL drift. For minions the pairing is acute — the file liveness\n * heartbeat is written here, so separating them restart-loops healthy pods — and\n * while workers probe over HTTP instead, a read-only rootfs with nowhere to write\n * a temp file is its own failure, arriving later and less legibly.\n */\nexport const RUNTIME_MANDATORY_WRITABLE_PATH = '/tmp';\n\n/**\n * Container isolation knobs an app runtime (minion or worker) may author.\n *\n * ## What is deliberately ABSENT\n *\n * The security floor — `runAsNonRoot`, `readOnlyRootFilesystem`,\n * `allowPrivilegeEscalation: false`, `capabilities: drop [ALL]`,\n * `seccompProfile`, `automountServiceAccountToken: false` — is emitted\n * unconditionally by the renderers and cannot be authored down. A config key\n * that turns off root-filesystem protection is a bypass wearing a settings hat;\n * lowering the floor must be a deliberate schema change under review.\n *\n * ## What IS authorable, and why each earns it\n *\n * - `runAsUser` / `runAsGroup` — image-dependent, and demonstrably so: Wonder\n * Todos' Node worker runs as uid 1000 (`USER node`) while its Rust worker uses\n * distroless `nonroot` at uid 65532. No single default is correct, and a wrong\n * uid with `runAsNonRoot: true` means the kubelet refuses to start the\n * container.\n * - `writablePaths` — ADDITIVE only, on top of the always-present\n * {@link RUNTIME_MANDATORY_WRITABLE_PATH}. It can grant writability, never\n * remove it, so it cannot weaken the read-only rootfs.\n * - `pidsLimit` — a fork-bomb ceiling; purely a bound.\n */\nexport const RUNTIME_DEFAULT_PIDS_LIMIT = 512;\n\n/**\n * The field CONSTRAINTS, defined once and shared by the two isolation schemas\n * below so a validation rule cannot hold on one and not the other.\n *\n * `runAsUser`/`runAsGroup` are `.positive()` because 0 is root — the identity\n * the whole floor exists to forbid — and a schema that accepts it would let a\n * config re-enable root while `runAsNonRoot: true` is still emitted, producing a\n * container the kubelet refuses for a reason the config never mentions.\n */\nconst runtimeIsolationFields = {\n runAsUser: z.number().int().positive(),\n runAsGroup: z.number().int().positive(),\n writablePaths: z.array(z.string().min(1).startsWith('/')),\n pidsLimit: z.number().int().positive(),\n};\n\nexport const RuntimeIsolationSchema = z.strictObject({\n runAsUser: runtimeIsolationFields.runAsUser.default(10001),\n runAsGroup: runtimeIsolationFields.runAsGroup.default(10001),\n writablePaths: runtimeIsolationFields.writablePaths.default([]),\n pidsLimit: runtimeIsolationFields.pidsLimit.default(RUNTIME_DEFAULT_PIDS_LIMIT),\n});\n\n/**\n * The AUTHORED form: every knob optional and — critically — carrying NO default.\n *\n * This is not the same thing as `RuntimeIsolationSchema.partial()`, and the\n * difference is a real defect rather than a style point. `.partial()` only makes\n * a field optional; the inner `.default(10001)` still FIRES, so an authored\n * `isolation: { runAsUser: 101 }` parses to a `runAsGroup` of 10001 and the\n * caller can no longer tell \"authored 10001\" from \"authored nothing\". For a\n * service row that difference decides which account the container runs as, and\n * the wrong answer is a pod that never starts.\n *\n * Caught by the pin `honours an authored image-dependent uid…` in\n * `service-definitions.schemas.test.ts`, which was written expecting the kind\n * default and got 10001.\n */\nexport const AuthoredRuntimeIsolationSchema = z.strictObject({\n runAsUser: runtimeIsolationFields.runAsUser.optional(),\n runAsGroup: runtimeIsolationFields.runAsGroup.optional(),\n writablePaths: runtimeIsolationFields.writablePaths.optional(),\n pidsLimit: runtimeIsolationFields.pidsLimit.optional(),\n});\nexport type AuthoredRuntimeIsolation = z.infer<typeof AuthoredRuntimeIsolationSchema>;\nexport type RuntimeIsolation = z.infer<typeof RuntimeIsolationSchema>;\n\n/**\n * Shared `superRefine` body for an authored isolation block.\n *\n * `RUNTIME_MANDATORY_WRITABLE_PATH` is mounted by the renderers, so authoring it\n * again emits two volumeMounts on one mountPath — which Kubernetes rejects at\n * admission, meaning the pod never starts and the error names a duplicate mount\n * rather than the config line that caused it. Caught here, where the message can\n * point at the authored value.\n */\nexport function refineRuntimeIsolation(\n isolation: RuntimeIsolation,\n ctx: z.RefinementCtx,\n path: readonly (string | number)[] = ['isolation'],\n): void {\n const mandatory = isolation.writablePaths.filter(\n (p) => p === RUNTIME_MANDATORY_WRITABLE_PATH || p === `${RUNTIME_MANDATORY_WRITABLE_PATH}/`,\n );\n if (mandatory.length > 0) {\n ctx.addIssue({\n code: 'custom',\n path: [...path, 'writablePaths'],\n message:\n `'${RUNTIME_MANDATORY_WRITABLE_PATH}' is always mounted — remove it from writablePaths, which is `\n + 'for ADDITIONAL scratch mounts only. Authoring it twice emits two volumeMounts on one '\n + 'mountPath and Kubernetes refuses the pod.',\n });\n }\n\n const seen = new Set<string>();\n for (const p of isolation.writablePaths) {\n if (seen.has(p)) {\n ctx.addIssue({\n code: 'custom',\n path: [...path, 'writablePaths'],\n message: `Duplicate writable path '${p}' — same duplicate-mountPath rejection as above.`,\n });\n }\n seen.add(p);\n }\n}\n\n/**\n * The uid/gid an application BACKEND container runs as when nothing is authored.\n *\n * 1001 is not arbitrary and not new: `templates/infra/docker-images/platform/\n * Dockerfile.platform-base` has created `wildo` at 1001 and ended on `USER wildo`\n * since the platform images were written. Reusing it makes the app backend match\n * the convention the framework already ships rather than inventing a third number\n * beside the minion/worker 10001.\n *\n * The paired obligation lives in `Dockerfile.backend-base`: an image whose files\n * are owned by root and whose `USER` is root will be REFUSED by the kubelet under\n * `runAsNonRoot: true`. Schema default and image must move together.\n */\nexport const APP_BACKEND_DEFAULT_RUNTIME_UID = 1001;\n\n/**\n * The uid/gid an application FRONTEND container runs as when nothing is authored.\n *\n * 101 is the `nginx` account in `nginx:1.27-alpine` (verified by running the\n * image, not assumed). Every Wildo frontend is a static bundle served by nginx —\n * the framework mandates that runtime — so defaulting to any other uid would make\n * \"authored nothing\" the broken case, which is exactly the case that must come\n * out working.\n */\nexport const APP_FRONTEND_DEFAULT_RUNTIME_UID = 101;\n\n/**\n * ## Why the frontend container port is NOT changed, measured rather than assumed\n *\n * The obvious reasoning — \"the floor drops ALL capabilities, so a non-root nginx\n * cannot bind :80 without `CAP_NET_BIND_SERVICE`\" — is FALSE in a container, and\n * an earlier revision of this file asserted it in JSDoc before anyone ran it.\n *\n * Docker and containerd both set `net.ipv4.ip_unprivileged_port_start=0` inside\n * the container's network namespace, so ports below 1024 are not privileged there\n * at all. Measured against `nginx:1.27-alpine`: `cat\n * /proc/sys/net/ipv4/ip_unprivileged_port_start` prints `0`, and nginx running as\n * uid 101 with a read-only rootfs and no capabilities serves HTTP 200 on :80.\n *\n * So the frontends keep `listen 80` and the Service keeps `targetPort: 80`. No\n * nginx config, Dockerfile `EXPOSE`, Service or Traefik router changes are part\n * of this floor. What nginx DOES need is\n * {@link APP_FRONTEND_MANDATORY_WRITABLE_PATHS} — see there.\n */\n\n/**\n * Writable mounts an nginx frontend needs BEYOND\n * {@link RUNTIME_MANDATORY_WRITABLE_PATH}, emitted unconditionally rather than\n * authored.\n *\n * They are not additive author choices — they are what the runtime the framework\n * MANDATES cannot start without, measured against `nginx:1.27-alpine`:\n *\n * - `/var/cache/nginx` — the parent of `client_temp`/`proxy_temp`/… . Present in\n * the image but owned by `root:root` 0755, so a non-root master cannot create\n * the temp directories inside it.\n * - `/run` — where the stock `nginx.conf` writes `nginx.pid` (`/var/run` is a\n * symlink to it). Root-owned, so the pid write fails and nginx exits.\n *\n * Mounting them as writable volumes is preferred over `chown`-ing in every\n * application's Dockerfile: it keeps the requirement in the framework's runtime\n * spec, where it is emitted once and cannot be forgotten per app.\n */\nexport const APP_FRONTEND_MANDATORY_WRITABLE_PATHS: readonly string[] = ['/var/cache/nginx', '/run'];\n\n/**\n * Resolve a service row's effective container isolation.\n *\n * THE reason this exists as a function rather than a schema default: the correct\n * default depends on the container KIND, and a Zod field default cannot see its\n * sibling `frontendType`. Two renderers consume this (k8s manifests and the\n * compose app lane) and they must not each apply their own fallback — that is how\n * a k8s pod and a compose container end up running as different users from one\n * config row.\n *\n * Frontend rows additionally receive {@link APP_FRONTEND_MANDATORY_WRITABLE_PATHS}\n * prepended, because nginx cannot start without them. They are prepended rather\n * than appended so an author reading the rendered manifest sees the framework's\n * mounts first, and deduplicated against the authored list so re-authoring one is\n * tolerated here (unlike `/tmp`, these are nginx implementation detail rather\n * than a documented contract, so a duplicate is a mistake worth absorbing instead\n * of a config error worth failing on).\n */\nexport function resolveAppServiceIsolation(\n service: Pick<AppServiceDefinition, 'frontendType'> & { isolation?: Partial<RuntimeIsolation> },\n): RuntimeIsolation {\n const isFrontend = service.frontendType !== undefined;\n const defaultUid = isFrontend ? APP_FRONTEND_DEFAULT_RUNTIME_UID : APP_BACKEND_DEFAULT_RUNTIME_UID;\n const authoredPaths = service.isolation?.writablePaths ?? [];\n const mandatory = isFrontend ? APP_FRONTEND_MANDATORY_WRITABLE_PATHS : [];\n\n return {\n runAsUser: service.isolation?.runAsUser ?? defaultUid,\n runAsGroup: service.isolation?.runAsGroup ?? defaultUid,\n writablePaths: [...mandatory, ...authoredPaths.filter((p) => !mandatory.includes(p))],\n pidsLimit: service.isolation?.pidsLimit ?? RUNTIME_DEFAULT_PIDS_LIMIT,\n };\n}\n\n/**\n * One service inside `wildo.saas.config.ts` `services` map.\n *\n * `sessionStorage` (default `'ephemeral'`) is the per-service explicit\n * opt-in to localStorage; the default matches the non-primary-surface\n * common case. See `APP_SESSION_STORAGES` JSDoc for the rationale.\n *\n * `csp?` lives here only for `frontendType: SAAS_APP`. Unlike\n * `STATIC_WEBSITE` / `TECH_DOC`, the main app currently has no\n * engine-owned per-service config file (`wildo.website.config.ts` /\n * `wildo.tech-doc.config.ts`) — the service row itself is therefore the\n * honest app-static authoring seam for SPA-specific posture such as CSP.\n * Non-app services MUST reject authored `csp` here to preserve the\n * semantic split between the generic service declaration and the\n * website/docs engine-owned config files.\n *\n * No host-binding or public-URL authoring on this schema. The public\n * hostname per service is authored per-environment in\n * `infra.serviceHosts` — that seam is in `define-infra-env-config.ts`\n * and is intentionally decoupled from `frontendType` and from the\n * service key so the app developer can map any service to any host\n * (e.g. `services.docs` published at `dev.example.com`).\n */\nexport const AppServiceDefinitionSchema = z.strictObject({\n path: z.string().min(1),\n serviceName: z.string().min(1),\n defaultPort: z.number().int().positive().optional(),\n frontendType: z.enum(AppFrontendType).optional(),\n sessionStorage: z.enum(APP_SESSION_STORAGES).default('ephemeral'),\n csp: WildoCspConfigSchema.optional(),\n /**\n * Container isolation — the same contract minions and workers carry, applied to\n * the two container kinds that had none: the app backend and each frontend.\n *\n * `.optional()` here, unlike the minion/worker `.prefault({})`, because the\n * correct DEFAULT depends on the kind and the kind is not known until the row\n * is read: a backend runs Node as {@link APP_BACKEND_DEFAULT_RUNTIME_UID}, a\n * frontend runs nginx as {@link APP_FRONTEND_DEFAULT_RUNTIME_UID}. Emitting one\n * number for both would hand half the services a uid their image does not\n * define. Callers resolve it through {@link resolveAppServiceIsolation}, which\n * is where \"authored nothing\" becomes a hardened value — never at a renderer,\n * so the two renderers cannot disagree.\n *\n * The floor is absent for the same reason it is absent from the minion and\n * worker schemas: it is emitted unconditionally and must not be authorable\n * down. See {@link RuntimeIsolationSchema}.\n */\n isolation: AuthoredRuntimeIsolationSchema.optional(),\n}).superRefine((service, ctx) => {\n if (service.isolation) {\n refineRuntimeIsolation(resolveAppServiceIsolation(service), ctx);\n }\n if (service.csp !== undefined && service.frontendType !== AppFrontendType.SAAS_APP) {\n ctx.addIssue({\n code: 'custom',\n path: ['csp'],\n message:\n 'services.<key>.csp is only supported for `frontendType: SAAS_APP`. '\n + 'STATIC_WEBSITE and TECH_DOC services must author CSP in their per-service '\n + '`wildo.website.config.ts` / `wildo.tech-doc.config.ts` files, and '\n + 'non-frontend services cannot ship a document CSP.',\n });\n }\n});\nexport type AppServiceDefinition = z.infer<typeof AppServiceDefinitionSchema>;\nexport type AppServiceDefinitionInput = z.input<typeof AppServiceDefinitionSchema>;\n\nexport const AppLibraryDefinitionSchema = z.object({\n path: z.string().min(1),\n type: z.enum(AppLibraryType),\n}).strict();\nexport type AppLibraryDefinition = z.infer<typeof AppLibraryDefinitionSchema>;\n\nexport const WorkerRuntimeSchema = z.object({\n type: z.string().min(1),\n language: z.string().min(1),\n});\nexport type WorkerRuntime = z.infer<typeof WorkerRuntimeSchema>;\n\nexport const ResourceLimitsSchema = z.object({\n cpu: z.string().min(1).optional(),\n memory: z.string().min(1).optional(),\n});\nexport type ResourceLimits = z.infer<typeof ResourceLimitsSchema>;\n\nexport const DataAccessSchema = z.object({\n database: z.enum(['read-only', 'read-write', 'none']).optional(),\n cache: z.boolean().optional(),\n queue: z.enum(['consumer', 'producer', 'both', 'none']).optional(),\n});\nexport type DataAccess = z.infer<typeof DataAccessSchema>;\n\n/**\n * Minimal \"I live at this path\" reference for a per-folder app sub-config\n * (`wildo.minion.config.ts`, `wildo.worker.config.ts`, `wildo.specifications.config.ts`).\n *\n * Tightened to `z.strictObject` (M-3 in\n * `.cursor/plans/minions-and-workers-implementation.md`) so authoring an\n * unknown key — e.g. a typo `pat:` instead of `path:`, or a stray\n * `resourceAccess` on a `workers` entry where it has no meaning today —\n * fails fast at parse time rather than being silently dropped. The\n * minions bucket value schema in `define-saas-config.ts` extends this\n * shape (still strict) to add `resourceAccess` per KD-11.\n */\nexport const AppRefSchema = z.strictObject({\n path: z.string().min(1),\n});\nexport type AppRef = z.infer<typeof AppRefSchema>;\n"]}
1
+ {"version":3,"file":"service-definitions.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/service-definitions.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CA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/saas-models/public-runtime` so the\n * backend's `FrontendServiceDefinitionSchema` (`@wildo-ai/saas-models`) and\n * client-bundle consumers (website discovery, scaffolding, CSP config,\n * companion services) can read the same enum without booting the heavy\n * decorator-bound schema graph. The atom is imported from the\n * `/public-runtime` subpath (NOT the package root barrel) so this file\n * stays free of `initZodDecorators()` side effects — `import { z } from 'zod'`\n * only, plus one decorator-free public-runtime import.\n *\n * The re-export below preserves every existing\n * `import { AppFrontendType } from '@wildo-ai/platform-config-lib'` call site\n * unchanged. Single source of truth (`@wildo-ai/saas-models`) with the\n * original public surface preserved.\n *\n * For the kind-by-kind taxonomy (`SAAS_APP` / `STATIC_WEBSITE` / `TECH_DOC`)\n * and the locked \"no native variants\" design decision, see the file-level\n * JSDoc in `engine/saas-models/src/config/app-frontend-type.shared.schemas.ts`\n * — that is the canonical home; do NOT duplicate the explanation here.\n */\nimport { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';\n\nexport { AppFrontendType };\n\nexport enum AppLibraryType {\n FULLSTACK = 'fullstack',\n FRONTEND = 'frontend',\n BACKEND = 'backend',\n}\n\n/**\n * How the receiving frontend stores the JWT pair after a cross-frontend\n * handoff exchange.\n *\n * - `'ephemeral'` (default) → `EphemeralSessionTokenStorage` (in-memory,\n * dies with the tab). Avoids token poisoning when the source frontend\n * already holds a persistent session, and matches the existing\n * `Auth_OneOffSession` guard that refuses non-`Ephemeral` storage.\n * Correct default for `TECH_DOC`, for secondary `SAAS_APP` surfaces\n * (e.g., an admin console reached by handoff from a primary app),\n * and for `STATIC_WEBSITE` (which never stores tokens anyway).\n * - `'persistent'` → `PersistentSessionTokenStorage` (localStorage).\n * Opt-in for the primary `SAAS_APP` surface where the user expects\n * their session to survive a tab close. Each service authors this\n * explicitly; there is no auto-derivation from `frontendType`\n * because a project can have multiple `SAAS_APP` services where\n * only one is \"primary\".\n */\nexport const APP_SESSION_STORAGES = ['persistent', 'ephemeral'] as const;\nexport type AppSessionStorage = (typeof APP_SESSION_STORAGES)[number];\n\n/**\n * The writable mount every containerised app runtime gets, unconditionally.\n *\n * Shared by minions and workers rather than defined twice: it is paired with\n * `readOnlyRootFilesystem: true` in both renderers, and two copies of a path this\n * load-bearing WILL drift. For minions the pairing is acute — the file liveness\n * heartbeat is written here, so separating them restart-loops healthy pods — and\n * while workers probe over HTTP instead, a read-only rootfs with nowhere to write\n * a temp file is its own failure, arriving later and less legibly.\n */\nexport const RUNTIME_MANDATORY_WRITABLE_PATH = '/tmp';\n\n/**\n * Container isolation knobs an app runtime (minion or worker) may author.\n *\n * ## What is deliberately ABSENT\n *\n * The security floor — `runAsNonRoot`, `readOnlyRootFilesystem`,\n * `allowPrivilegeEscalation: false`, `capabilities: drop [ALL]`,\n * `seccompProfile`, `automountServiceAccountToken: false` — is emitted\n * unconditionally by the renderers and cannot be authored down. A config key\n * that turns off root-filesystem protection is a bypass wearing a settings hat;\n * lowering the floor must be a deliberate schema change under review.\n *\n * ## What IS authorable, and why each earns it\n *\n * - `runAsUser` / `runAsGroup` — image-dependent, and demonstrably so: Wonder\n * Todos' Node worker runs as uid 1000 (`USER node`) while its Rust worker uses\n * distroless `nonroot` at uid 65532. No single default is correct, and a wrong\n * uid with `runAsNonRoot: true` means the kubelet refuses to start the\n * container.\n * - `writablePaths` — ADDITIVE only, on top of the always-present\n * {@link RUNTIME_MANDATORY_WRITABLE_PATH}. It can grant writability, never\n * remove it, so it cannot weaken the read-only rootfs.\n * - `pidsLimit` — a fork-bomb ceiling; purely a bound.\n */\nexport const RUNTIME_DEFAULT_PIDS_LIMIT = 512;\n\n/**\n * The field CONSTRAINTS, defined once and shared by the two isolation schemas\n * below so a validation rule cannot hold on one and not the other.\n *\n * `runAsUser`/`runAsGroup` are `.positive()` because 0 is root — the identity\n * the whole floor exists to forbid — and a schema that accepts it would let a\n * config re-enable root while `runAsNonRoot: true` is still emitted, producing a\n * container the kubelet refuses for a reason the config never mentions.\n */\nconst runtimeIsolationFields = {\n runAsUser: z.number().int().positive(),\n runAsGroup: z.number().int().positive(),\n writablePaths: z.array(z.string().min(1).startsWith('/')),\n pidsLimit: z.number().int().positive(),\n};\n\nexport const RuntimeIsolationSchema = z.strictObject({\n runAsUser: runtimeIsolationFields.runAsUser.default(10001),\n runAsGroup: runtimeIsolationFields.runAsGroup.default(10001),\n writablePaths: runtimeIsolationFields.writablePaths.default([]),\n pidsLimit: runtimeIsolationFields.pidsLimit.default(RUNTIME_DEFAULT_PIDS_LIMIT),\n});\n\n/**\n * The AUTHORED form: every knob optional and — critically — carrying NO default.\n *\n * This is not the same thing as `RuntimeIsolationSchema.partial()`, and the\n * difference is a real defect rather than a style point. `.partial()` only makes\n * a field optional; the inner `.default(10001)` still FIRES, so an authored\n * `isolation: { runAsUser: 101 }` parses to a `runAsGroup` of 10001 and the\n * caller can no longer tell \"authored 10001\" from \"authored nothing\". For a\n * service row that difference decides which account the container runs as, and\n * the wrong answer is a pod that never starts.\n *\n * Caught by the pin `honours an authored image-dependent uid…` in\n * `service-definitions.schemas.test.ts`, which was written expecting the kind\n * default and got 10001.\n */\nexport const AuthoredRuntimeIsolationSchema = z.strictObject({\n runAsUser: runtimeIsolationFields.runAsUser.optional(),\n runAsGroup: runtimeIsolationFields.runAsGroup.optional(),\n writablePaths: runtimeIsolationFields.writablePaths.optional(),\n pidsLimit: runtimeIsolationFields.pidsLimit.optional(),\n});\nexport type AuthoredRuntimeIsolation = z.infer<typeof AuthoredRuntimeIsolationSchema>;\nexport type RuntimeIsolation = z.infer<typeof RuntimeIsolationSchema>;\n\n/**\n * Shared `superRefine` body for an authored isolation block.\n *\n * `RUNTIME_MANDATORY_WRITABLE_PATH` is mounted by the renderers, so authoring it\n * again emits two volumeMounts on one mountPath — which Kubernetes rejects at\n * admission, meaning the pod never starts and the error names a duplicate mount\n * rather than the config line that caused it. Caught here, where the message can\n * point at the authored value.\n */\nexport function refineRuntimeIsolation(\n isolation: RuntimeIsolation,\n ctx: z.RefinementCtx,\n path: readonly (string | number)[] = ['isolation'],\n): void {\n const mandatory = isolation.writablePaths.filter(\n (p) => p === RUNTIME_MANDATORY_WRITABLE_PATH || p === `${RUNTIME_MANDATORY_WRITABLE_PATH}/`,\n );\n if (mandatory.length > 0) {\n ctx.addIssue({\n code: 'custom',\n path: [...path, 'writablePaths'],\n message:\n `'${RUNTIME_MANDATORY_WRITABLE_PATH}' is always mounted — remove it from writablePaths, which is `\n + 'for ADDITIONAL scratch mounts only. Authoring it twice emits two volumeMounts on one '\n + 'mountPath and Kubernetes refuses the pod.',\n });\n }\n\n const seen = new Set<string>();\n for (const p of isolation.writablePaths) {\n if (seen.has(p)) {\n ctx.addIssue({\n code: 'custom',\n path: [...path, 'writablePaths'],\n message: `Duplicate writable path '${p}' — same duplicate-mountPath rejection as above.`,\n });\n }\n seen.add(p);\n }\n}\n\n/**\n * The uid/gid an application BACKEND container runs as when nothing is authored.\n *\n * 1001 is not arbitrary and not new: `templates/infra/docker-images/platform/\n * Dockerfile.platform-base` has created `wildo` at 1001 and ended on `USER wildo`\n * since the platform images were written. Reusing it makes the app backend match\n * the convention the framework already ships rather than inventing a third number\n * beside the minion/worker 10001.\n *\n * The paired obligation lives in `Dockerfile.backend-base`: an image whose files\n * are owned by root and whose `USER` is root will be REFUSED by the kubelet under\n * `runAsNonRoot: true`. Schema default and image must move together.\n */\nexport const APP_BACKEND_DEFAULT_RUNTIME_UID = 1001;\n\n/**\n * The uid/gid an application FRONTEND container runs as when nothing is authored.\n *\n * 101 is the `nginx` account in `nginx:1.27-alpine` (verified by running the\n * image, not assumed). Every Wildo frontend is a static bundle served by nginx —\n * the framework mandates that runtime — so defaulting to any other uid would make\n * \"authored nothing\" the broken case, which is exactly the case that must come\n * out working.\n */\nexport const APP_FRONTEND_DEFAULT_RUNTIME_UID = 101;\n\n/**\n * ## Why the frontend container port is NOT changed, measured rather than assumed\n *\n * The obvious reasoning — \"the floor drops ALL capabilities, so a non-root nginx\n * cannot bind :80 without `CAP_NET_BIND_SERVICE`\" — is FALSE in a container, and\n * an earlier revision of this file asserted it in JSDoc before anyone ran it.\n *\n * Docker and containerd both set `net.ipv4.ip_unprivileged_port_start=0` inside\n * the container's network namespace, so ports below 1024 are not privileged there\n * at all. Measured against `nginx:1.27-alpine`: `cat\n * /proc/sys/net/ipv4/ip_unprivileged_port_start` prints `0`, and nginx running as\n * uid 101 with a read-only rootfs and no capabilities serves HTTP 200 on :80.\n *\n * So the frontends keep `listen 80` and the Service keeps `targetPort: 80`. No\n * nginx config, Dockerfile `EXPOSE`, Service or Traefik router changes are part\n * of this floor. What nginx DOES need is\n * {@link APP_FRONTEND_MANDATORY_WRITABLE_PATHS} — see there.\n */\n\n/**\n * Writable mounts an nginx frontend needs BEYOND\n * {@link RUNTIME_MANDATORY_WRITABLE_PATH}, emitted unconditionally rather than\n * authored.\n *\n * They are not additive author choices — they are what the runtime the framework\n * MANDATES cannot start without, measured against `nginx:1.27-alpine`:\n *\n * - `/var/cache/nginx` — the parent of `client_temp`/`proxy_temp`/… . Present in\n * the image but owned by `root:root` 0755, so a non-root master cannot create\n * the temp directories inside it.\n * - `/run` — where the stock `nginx.conf` writes `nginx.pid` (`/var/run` is a\n * symlink to it). Root-owned, so the pid write fails and nginx exits.\n *\n * Mounting them as writable volumes is preferred over `chown`-ing in every\n * application's Dockerfile: it keeps the requirement in the framework's runtime\n * spec, where it is emitted once and cannot be forgotten per app.\n */\nexport const APP_FRONTEND_MANDATORY_WRITABLE_PATHS: readonly string[] = ['/var/cache/nginx', '/run'];\n\n/**\n * Resolve a service row's effective container isolation.\n *\n * THE reason this exists as a function rather than a schema default: the correct\n * default depends on the container KIND, and a Zod field default cannot see its\n * sibling `frontendType`. Two renderers consume this (k8s manifests and the\n * compose app lane) and they must not each apply their own fallback — that is how\n * a k8s pod and a compose container end up running as different users from one\n * config row.\n *\n * Frontend rows additionally receive {@link APP_FRONTEND_MANDATORY_WRITABLE_PATHS}\n * prepended, because nginx cannot start without them. They are prepended rather\n * than appended so an author reading the rendered manifest sees the framework's\n * mounts first, and deduplicated against the authored list so re-authoring one is\n * tolerated here (unlike `/tmp`, these are nginx implementation detail rather\n * than a documented contract, so a duplicate is a mistake worth absorbing instead\n * of a config error worth failing on).\n */\nexport function resolveAppServiceIsolation(\n service: Pick<AppServiceDefinition, 'frontendType'> & { isolation?: Partial<RuntimeIsolation> },\n): RuntimeIsolation {\n const isFrontend = service.frontendType !== undefined;\n const defaultUid = isFrontend ? APP_FRONTEND_DEFAULT_RUNTIME_UID : APP_BACKEND_DEFAULT_RUNTIME_UID;\n const authoredPaths = service.isolation?.writablePaths ?? [];\n const mandatory = isFrontend ? APP_FRONTEND_MANDATORY_WRITABLE_PATHS : [];\n\n return {\n runAsUser: service.isolation?.runAsUser ?? defaultUid,\n runAsGroup: service.isolation?.runAsGroup ?? defaultUid,\n writablePaths: [...mandatory, ...authoredPaths.filter((p) => !mandatory.includes(p))],\n pidsLimit: service.isolation?.pidsLimit ?? RUNTIME_DEFAULT_PIDS_LIMIT,\n };\n}\n\n/**\n * One service inside `wildo.saas.config.ts` `services` map.\n *\n * `sessionStorage` (default `'ephemeral'`) is the per-service explicit\n * opt-in to localStorage; the default matches the non-primary-surface\n * common case. See `APP_SESSION_STORAGES` JSDoc for the rationale.\n *\n * `csp?` lives here only for `frontendType: SAAS_APP`. Unlike\n * `STATIC_WEBSITE` / `TECH_DOC`, the main app currently has no\n * engine-owned per-service config file (`wildo.website.config.ts` /\n * `wildo.tech-doc.config.ts`) — the service row itself is therefore the\n * honest app-static authoring seam for SPA-specific posture such as CSP.\n * Non-app services MUST reject authored `csp` here to preserve the\n * semantic split between the generic service declaration and the\n * website/docs engine-owned config files.\n *\n * No host-binding or public-URL authoring on this schema. The public\n * hostname per service is authored per-environment in\n * `infra.serviceHosts` — that seam is in `define-infra-env-config.ts`\n * and is intentionally decoupled from `frontendType` and from the\n * service key so the app developer can map any service to any host\n * (e.g. `services.docs` published at `dev.example.com`).\n */\nexport const AppServiceDefinitionSchema = z.strictObject({\n path: z.string().min(1),\n serviceName: z.string().min(1),\n defaultPort: z.number().int().positive().optional(),\n frontendType: z.enum(AppFrontendType).optional(),\n sessionStorage: z.enum(APP_SESSION_STORAGES).default('ephemeral'),\n csp: WildoCspConfigSchema.optional(),\n /**\n * Container isolation — the same contract minions and workers carry, applied to\n * the two container kinds that had none: the app backend and each frontend.\n *\n * `.optional()` here, unlike the minion/worker `.prefault({})`, because the\n * correct DEFAULT depends on the kind and the kind is not known until the row\n * is read: a backend runs Node as {@link APP_BACKEND_DEFAULT_RUNTIME_UID}, a\n * frontend runs nginx as {@link APP_FRONTEND_DEFAULT_RUNTIME_UID}. Emitting one\n * number for both would hand half the services a uid their image does not\n * define. Callers resolve it through {@link resolveAppServiceIsolation}, which\n * is where \"authored nothing\" becomes a hardened value — never at a renderer,\n * so the two renderers cannot disagree.\n *\n * The floor is absent for the same reason it is absent from the minion and\n * worker schemas: it is emitted unconditionally and must not be authorable\n * down. See {@link RuntimeIsolationSchema}.\n */\n isolation: AuthoredRuntimeIsolationSchema.optional(),\n}).superRefine((service, ctx) => {\n if (service.isolation) {\n refineRuntimeIsolation(resolveAppServiceIsolation(service), ctx);\n }\n if (service.csp !== undefined && service.frontendType !== AppFrontendType.SAAS_APP) {\n ctx.addIssue({\n code: 'custom',\n path: ['csp'],\n message:\n 'services.<key>.csp is only supported for `frontendType: SAAS_APP`. '\n + 'STATIC_WEBSITE and TECH_DOC services must author CSP in their per-service '\n + '`wildo.website.config.ts` / `wildo.tech-doc.config.ts` files, and '\n + 'non-frontend services cannot ship a document CSP.',\n });\n }\n});\nexport type AppServiceDefinition = z.infer<typeof AppServiceDefinitionSchema>;\nexport type AppServiceDefinitionInput = z.input<typeof AppServiceDefinitionSchema>;\n\nexport const AppLibraryDefinitionSchema = z.object({\n path: z.string().min(1),\n type: z.enum(AppLibraryType),\n}).strict();\nexport type AppLibraryDefinition = z.infer<typeof AppLibraryDefinitionSchema>;\n\nexport const WorkerRuntimeSchema = z.object({\n type: z.string().min(1),\n language: z.string().min(1),\n});\nexport type WorkerRuntime = z.infer<typeof WorkerRuntimeSchema>;\n\nexport const ResourceLimitsSchema = z.object({\n cpu: z.string().min(1).optional(),\n memory: z.string().min(1).optional(),\n});\nexport type ResourceLimits = z.infer<typeof ResourceLimitsSchema>;\n\nexport const DataAccessSchema = z.object({\n database: z.enum(['read-only', 'read-write', 'none']).optional(),\n cache: z.boolean().optional(),\n queue: z.enum(['consumer', 'producer', 'both', 'none']).optional(),\n});\nexport type DataAccess = z.infer<typeof DataAccessSchema>;\n\n/**\n * Minimal \"I live at this path\" reference for a per-folder app sub-config\n * (`wildo.minion.config.ts`, `wildo.worker.config.ts`, `wildo.specifications.config.ts`).\n *\n * Tightened to `z.strictObject` so authoring an\n * unknown key — e.g. a typo `pat:` instead of `path:`, or a stray\n * `resourceAccess` on a `workers` entry where it has no meaning today —\n * fails fast at parse time rather than being silently dropped. The\n * minions bucket value schema in `define-saas-config.ts` extends this\n * shape (still strict) to add `resourceAccess`.\n */\nexport const AppRefSchema = z.strictObject({\n path: z.string().min(1),\n});\nexport type AppRef = z.infer<typeof AppRefSchema>;\n"]}
@@ -48,33 +48,15 @@ import { z } from 'zod';
48
48
  * once and neither can be half-written: an entry is either an address or a declaration of absence.
49
49
  */
50
50
  export declare const WildoSystemOfRecordEnvSchema: z.ZodUnion<readonly [z.ZodObject<{
51
- /**
52
- * This environment has NO access to the instance. Reads on a bound resource refuse with a stable
53
- * code, a scheduled pipeline is not dispatched, and the backend still boots — an application
54
- * whose ERP is simply not present in staging must still run.
55
- */
56
51
  enabled: z.ZodLiteral<false>;
57
52
  }, z.core.$strict>, z.ZodObject<{
58
- /**
59
- * The vendor's non-secret address slots, keyed by the facet's slug (Odoo: `baseUrl`, `database`,
60
- * `login`). Whether the set is COMPLETE is the seam's question, not this schema's.
61
- */
62
53
  address: z.ZodRecord<z.ZodString, z.ZodString>;
63
54
  }, z.core.$strict>]>;
64
55
  export type WildoSystemOfRecordEnv = z.infer<typeof WildoSystemOfRecordEnvSchema>;
65
56
  /** Every instance's address in this environment, keyed by the instance name the saas config declares. */
66
57
  export declare const WildoSystemsOfRecordEnvConfigSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
67
- /**
68
- * This environment has NO access to the instance. Reads on a bound resource refuse with a stable
69
- * code, a scheduled pipeline is not dispatched, and the backend still boots — an application
70
- * whose ERP is simply not present in staging must still run.
71
- */
72
58
  enabled: z.ZodLiteral<false>;
73
59
  }, z.core.$strict>, z.ZodObject<{
74
- /**
75
- * The vendor's non-secret address slots, keyed by the facet's slug (Odoo: `baseUrl`, `database`,
76
- * `login`). Whether the set is COMPLETE is the seam's question, not this schema's.
77
- */
78
60
  address: z.ZodRecord<z.ZodString, z.ZodString>;
79
61
  }, z.core.$strict>]>>;
80
62
  export type WildoSystemsOfRecordEnvConfig = z.infer<typeof WildoSystemsOfRecordEnvConfigSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"systems-of-record-env.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/systems-of-record-env.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;IAErC;;;;OAIG;;;IAIH;;;OAGG;;oBAUL,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,yGAAyG;AACzG,eAAO,MAAM,mCAAmC;IAzB5C;;;;OAIG;;;IAIH;;;OAGG;;qBAcqG,CAAC;AAC7G,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
1
+ {"version":3,"file":"systems-of-record-env.schemas.d.ts","sourceRoot":"","sources":["../../../../src/project-config/shared/systems-of-record-env.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;;;;oBAuBvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,yGAAyG;AACzG,eAAO,MAAM,mCAAmC;;;;qBAA4D,CAAC;AAC7G,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"systems-of-record-env.schemas.js","sourceRoot":"","sources":["../../../../../src/project-config/shared/systems-of-record-env.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kCAAkC,EAAE,MAAM,uBAAuB,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC;IAClD,CAAC,CAAC,YAAY,CAAC;QACb;;;;WAIG;QACH,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;KAC1B,CAAC;IACF,CAAC,CAAC,YAAY,CAAC;QACb;;;WAGG;QACH,OAAO,EAAE,CAAC;aACP,MAAM,CACL,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kCAAkC,EAAE,mDAAmD,CAAC,EACzG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAClB;aACA,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YACpD,KAAK,EAAE,qGAAqG;SAC7G,CAAC;KACL,CAAC;CACH,CAAC,CAAC;AAGH,yGAAyG;AACzG,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,4BAA4B,CAAC,CAAC","sourcesContent":["/**\n * WHERE each declared system of record lives, per ENVIRONMENT (#1055 §2).\n *\n * The saas config says WHAT the application reads (`systemsOfRecord.<name>`: a vendor, a dialect);\n * this says WHERE that instance is in THIS environment, and `secrets.json` says with what. The same\n * split `applicationDatabase` already makes between selection and substrate, for the same reason: an\n * address is environment-specific and a declaration is not.\n *\n * ## Two authored shapes, and the second one is the point\n *\n * ```ts\n * systemsOfRecord: {\n * odoo: { address: { baseUrl: 'https://acme.odoo.com', database: 'acme', login: 'bot@acme.com' } },\n * }\n * ```\n *\n * ```ts\n * systemsOfRecord: {\n * odoo: { enabled: false }, // this environment has no access to the ERP\n * }\n * ```\n *\n * A developer laptop and a staging with no ERP are the ordinary case, not an edge (#1055 E3), and\n * they need a way to SAY so. Without one, \"no access here\" and \"somebody forgot to author the\n * address\" are the same observation — and they need opposite behaviours: the first boots and refuses\n * reads with a clear code, the second refuses at `wildo config sync` and again at boot. So silence is\n * never a declaration: an instance the saas config declares and this file omits entirely is refused.\n *\n * ## What this file deliberately does NOT know\n *\n * Which slots a vendor NEEDS. That is the facet's, and the facet is not in scope here — the saas\n * config and the infra env config parse independently. Completeness is therefore checked at the\n * SEAMS where both are visible: `wildo config sync` and the backend startup validator. What is\n * checked here is only the shape and the slot-slug charset, because a slug outside it could not\n * derive a parseable variable name.\n *\n * ## Addresses are not secrets\n *\n * A base URL is registration-scoped, and a database name and a login identify WHICH deployment and\n * WHICH user rather than proving anything. They belong in the authored infra file, where they are\n * diffable and reviewable. The credential lives in `secrets.json`, keyed by the same derived name.\n */\nimport { z } from 'zod';\nimport { SYSTEM_OF_RECORD_SLOT_SLUG_PATTERN } from '@wildo-ai/saas-models';\n\n/**\n * One instance's address in one environment.\n *\n * A union rather than one object with two optional halves, so the two states cannot be authored at\n * once and neither can be half-written: an entry is either an address or a declaration of absence.\n */\nexport const WildoSystemOfRecordEnvSchema = z.union([\n z.strictObject({\n /**\n * This environment has NO access to the instance. Reads on a bound resource refuse with a stable\n * code, a scheduled pipeline is not dispatched, and the backend still boots — an application\n * whose ERP is simply not present in staging must still run.\n */\n enabled: z.literal(false),\n }),\n z.strictObject({\n /**\n * The vendor's non-secret address slots, keyed by the facet's slug (Odoo: `baseUrl`, `database`,\n * `login`). Whether the set is COMPLETE is the seam's question, not this schema's.\n */\n address: z\n .record(\n z.string().regex(SYSTEM_OF_RECORD_SLOT_SLUG_PATTERN, 'A slot slug is lowerCamelCase with no separators.'),\n z.string().min(1),\n )\n .refine((address) => Object.keys(address).length > 0, {\n error: 'An address with no slots says nothing. Author the vendor\\'s slots, or declare `{ enabled: false }`.',\n }),\n }),\n]);\nexport type WildoSystemOfRecordEnv = z.infer<typeof WildoSystemOfRecordEnvSchema>;\n\n/** Every instance's address in this environment, keyed by the instance name the saas config declares. */\nexport const WildoSystemsOfRecordEnvConfigSchema = z.record(z.string().min(1), WildoSystemOfRecordEnvSchema);\nexport type WildoSystemsOfRecordEnvConfig = z.infer<typeof WildoSystemsOfRecordEnvConfigSchema>;\n"]}
1
+ {"version":3,"file":"systems-of-record-env.schemas.js","sourceRoot":"","sources":["../../../../src/project-config/shared/systems-of-record-env.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,kCAAkC,EAAE,MAAM,uBAAuB,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC;IAClD,CAAC,CAAC,YAAY,CAAC;QACb;;;;WAIG;QACH,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;KAC1B,CAAC;IACF,CAAC,CAAC,YAAY,CAAC;QACb;;;WAGG;QACH,OAAO,EAAE,CAAC;aACP,MAAM,CACL,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kCAAkC,EAAE,mDAAmD,CAAC,EACzG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAClB;aACA,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YACpD,KAAK,EAAE,qGAAqG;SAC7G,CAAC;KACL,CAAC;CACH,CAAC,CAAC;AAGH,yGAAyG;AACzG,MAAM,CAAC,MAAM,mCAAmC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,4BAA4B,CAAC,CAAC","sourcesContent":["/**\n * WHERE each declared system of record lives, per ENVIRONMENT (#1055 §2).\n *\n * The saas config says WHAT the application reads (`systemsOfRecord.<name>`: a vendor, a dialect);\n * this says WHERE that instance is in THIS environment, and `secrets.json` says with what. The same\n * split `applicationDatabase` already makes between selection and substrate, for the same reason: an\n * address is environment-specific and a declaration is not.\n *\n * ## Two authored shapes, and the second one is the point\n *\n * ```ts\n * systemsOfRecord: {\n * odoo: { address: { baseUrl: 'https://acme.odoo.com', database: 'acme', login: 'bot@acme.com' } },\n * }\n * ```\n *\n * ```ts\n * systemsOfRecord: {\n * odoo: { enabled: false }, // this environment has no access to the ERP\n * }\n * ```\n *\n * A developer laptop and a staging with no ERP are the ordinary case, not an edge (#1055 E3), and\n * they need a way to SAY so. Without one, \"no access here\" and \"somebody forgot to author the\n * address\" are the same observation — and they need opposite behaviours: the first boots and refuses\n * reads with a clear code, the second refuses at `wildo config sync` and again at boot. So silence is\n * never a declaration: an instance the saas config declares and this file omits entirely is refused.\n *\n * ## What this file deliberately does NOT know\n *\n * Which slots a vendor NEEDS. That is the facet's, and the facet is not in scope here — the saas\n * config and the infra env config parse independently. Completeness is therefore checked at the\n * SEAMS where both are visible: `wildo config sync` and the backend startup validator. What is\n * checked here is only the shape and the slot-slug charset, because a slug outside it could not\n * derive a parseable variable name.\n *\n * ## Addresses are not secrets\n *\n * A base URL is registration-scoped, and a database name and a login identify WHICH deployment and\n * WHICH user rather than proving anything. They belong in the authored infra file, where they are\n * diffable and reviewable. The credential lives in `secrets.json`, keyed by the same derived name.\n */\nimport { z } from 'zod';\nimport { SYSTEM_OF_RECORD_SLOT_SLUG_PATTERN } from '@wildo-ai/saas-models';\n\n/**\n * One instance's address in one environment.\n *\n * A union rather than one object with two optional halves, so the two states cannot be authored at\n * once and neither can be half-written: an entry is either an address or a declaration of absence.\n */\nexport const WildoSystemOfRecordEnvSchema = z.union([\n z.strictObject({\n /**\n * This environment has NO access to the instance. Reads on a bound resource refuse with a stable\n * code, a scheduled pipeline is not dispatched, and the backend still boots — an application\n * whose ERP is simply not present in staging must still run.\n */\n enabled: z.literal(false),\n }),\n z.strictObject({\n /**\n * The vendor's non-secret address slots, keyed by the facet's slug (Odoo: `baseUrl`, `database`,\n * `login`). Whether the set is COMPLETE is the seam's question, not this schema's.\n */\n address: z\n .record(\n z.string().regex(SYSTEM_OF_RECORD_SLOT_SLUG_PATTERN, 'A slot slug is lowerCamelCase with no separators.'),\n z.string().min(1),\n )\n .refine((address) => Object.keys(address).length > 0, {\n error: 'An address with no slots says nothing. Author the vendor\\'s slots, or declare `{ enabled: false }`.',\n }),\n }),\n]);\nexport type WildoSystemOfRecordEnv = z.infer<typeof WildoSystemOfRecordEnvSchema>;\n\n/** Every instance's address in this environment, keyed by the instance name the saas config declares. */\nexport const WildoSystemsOfRecordEnvConfigSchema = z.record(z.string().min(1), WildoSystemOfRecordEnvSchema);\nexport type WildoSystemsOfRecordEnvConfig = z.infer<typeof WildoSystemsOfRecordEnvConfigSchema>;\n"]}
@@ -18,9 +18,26 @@ export declare const STATIC_ASSET_IMPORT_PATTERN_SOURCE = "\\.(css|scss|less|sas
18
18
  * — two in the dev companion and two in the CLI — each with its own regex; the next asset type
19
19
  * added to one would have loaded in one tool and failed in another. One copy remains by necessity:
20
20
  * the dev companion's introspection subprocess registers a hooks MODULE by path
21
- * (`asset-noop-hooks.ts`), and loader hooks run on their own thread before anything else loads, so
22
- * that module must stay dependency-free. `static-asset-pattern-parity.test.ts` in the companion
23
- * holds its pattern equal to this one.
21
+ * (`asset-noop-hooks.ts`) through `--import`, before any package can be resolved, so that module
22
+ * must stay dependency-free. `static-asset-pattern-parity.test.ts` in the companion holds its
23
+ * pattern equal to this one.
24
+ *
25
+ * ## In-thread (`registerHooks`), never `module.register` — measured, #3208
26
+ *
27
+ * Until 2026-11-03 this registered the hooks with `module.register`, which runs them on a separate
28
+ * loader thread. Once ANY such hook exists, every module resolution and load in the process — not
29
+ * only a stylesheet's — becomes a synchronous round trip to that thread (`makeSyncRequest`). The
30
+ * dev companion calls this before every specifications evaluation and re-imports application
31
+ * packages for the life of the process, so that tax was paid continuously on its HTTP event loop.
32
+ * Profiled on app-creation-test-007 (15 resources, 96 landed build tasks): `makeSyncRequest` was
33
+ * 29 % of the main thread's time across warm re-evaluations and 42 % across the first one, and a
34
+ * child importing the companion's introspection handlers spent 14.2 s of user CPU with the
35
+ * off-thread hook against 8.7 s with the same hook in-thread.
36
+ *
37
+ * `registerHooks` runs the same two synchronous hooks on the calling thread, so a non-asset import
38
+ * pays one regex test and nothing else. Node 26 deprecates `module.register` (DEP0205) in favour of
39
+ * it. The hooks also apply to `require()`, which is the same answer for a CommonJS module that
40
+ * requires a stylesheet.
24
41
  */
25
42
  export declare function registerStaticAssetImportNoop(): void;
26
43
  //# sourceMappingURL=static-asset-import-noop.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"static-asset-import-noop.d.ts","sourceRoot":"","sources":["../../../../src/project-config/static-asset-import-noop.ts"],"names":[],"mappings":"AAEA,gGAAgG;AAChG,eAAO,MAAM,kCAAkC,wFAAwF,CAAC;AAIxI;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAqBpD"}
1
+ {"version":3,"file":"static-asset-import-noop.d.ts","sourceRoot":"","sources":["../../../src/project-config/static-asset-import-noop.ts"],"names":[],"mappings":"AAEA,gGAAgG;AAChG,eAAO,MAAM,kCAAkC,wFAAwF,CAAC;AAIxI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,6BAA6B,IAAI,IAAI,CAoBpD"}