@wildo-ai/platform-config-lib 1.1.4 → 1.1.6

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 (230) hide show
  1. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  2. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  3. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +24 -1
  4. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  5. package/dist/esm/bootstrap/bootstrap.contracts.js +25 -0
  6. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  7. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +117 -1
  8. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  9. package/dist/esm/bootstrap/bootstrap.schemas.js +63 -4
  10. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  11. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +24 -1
  12. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  13. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +24 -0
  14. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  15. package/dist/esm/bootstrap/platform-store-preconnect.d.ts +37 -0
  16. package/dist/esm/bootstrap/platform-store-preconnect.d.ts.map +1 -0
  17. package/dist/esm/bootstrap/platform-store-preconnect.js +43 -0
  18. package/dist/esm/bootstrap/platform-store-preconnect.js.map +1 -0
  19. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -1
  20. package/dist/esm/bootstrap/runtime-backing-service-access.js +8 -4
  21. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -1
  22. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -1
  23. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -1
  25. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -1
  26. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -1
  27. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts +36 -3
  28. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  29. package/dist/esm/bootstrap/runtime-topology.contracts.js +36 -13
  30. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  31. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts +29 -0
  32. package/dist/esm/bootstrap/wildo-owner-organization.contracts.d.ts.map +1 -1
  33. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js +39 -0
  34. package/dist/esm/bootstrap/wildo-owner-organization.contracts.js.map +1 -1
  35. package/dist/esm/config-authoring.entry.d.ts.map +1 -1
  36. package/dist/esm/config-authoring.entry.js.map +1 -1
  37. package/dist/esm/index.d.ts +2 -0
  38. package/dist/esm/index.d.ts.map +1 -1
  39. package/dist/esm/index.js +2 -0
  40. package/dist/esm/index.js.map +1 -1
  41. package/dist/esm/lockfile/build-parallelism.d.ts +40 -0
  42. package/dist/esm/lockfile/build-parallelism.d.ts.map +1 -0
  43. package/dist/esm/lockfile/build-parallelism.js +64 -0
  44. package/dist/esm/lockfile/build-parallelism.js.map +1 -0
  45. package/dist/esm/lockfile/lockfile-io.d.ts +7 -1
  46. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -1
  47. package/dist/esm/lockfile/lockfile-io.js +17 -3
  48. package/dist/esm/lockfile/lockfile-io.js.map +1 -1
  49. package/dist/esm/lockfile/materialize-infra-section.d.ts +28 -7
  50. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -1
  51. package/dist/esm/lockfile/materialize-infra-section.js +24 -11
  52. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -1
  53. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +455 -6
  54. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -1
  55. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +27 -0
  56. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -1
  57. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts +13 -0
  58. package/dist/esm/project-config/application-public-pricing-catalog.loader.d.ts.map +1 -0
  59. package/dist/esm/project-config/application-public-pricing-catalog.loader.js +56 -0
  60. package/dist/esm/project-config/application-public-pricing-catalog.loader.js.map +1 -0
  61. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  62. package/dist/esm/project-config/define-infra-env-config.d.ts +886 -29
  63. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -1
  64. package/dist/esm/project-config/define-infra-env-config.js +395 -16
  65. package/dist/esm/project-config/define-infra-env-config.js.map +1 -1
  66. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  67. package/dist/esm/project-config/define-minion-config.js +1 -2
  68. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  69. package/dist/esm/project-config/define-saas-config.d.ts +142 -25
  70. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  71. package/dist/esm/project-config/define-saas-config.js +229 -26
  72. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  73. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  74. package/dist/esm/project-config/hosted-infra-env-config.d.ts +59 -0
  75. package/dist/esm/project-config/hosted-infra-env-config.d.ts.map +1 -0
  76. package/dist/esm/project-config/hosted-infra-env-config.js +187 -0
  77. package/dist/esm/project-config/hosted-infra-env-config.js.map +1 -0
  78. package/dist/esm/project-config/index.d.ts +6 -0
  79. package/dist/esm/project-config/index.d.ts.map +1 -1
  80. package/dist/esm/project-config/index.js +6 -0
  81. package/dist/esm/project-config/index.js.map +1 -1
  82. package/dist/esm/project-config/loader.d.ts +35 -0
  83. package/dist/esm/project-config/loader.d.ts.map +1 -1
  84. package/dist/esm/project-config/loader.js +148 -8
  85. package/dist/esm/project-config/loader.js.map +1 -1
  86. package/dist/esm/project-config/npm-version-range.d.ts +23 -0
  87. package/dist/esm/project-config/npm-version-range.d.ts.map +1 -0
  88. package/dist/esm/project-config/npm-version-range.js +175 -0
  89. package/dist/esm/project-config/npm-version-range.js.map +1 -0
  90. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -1
  91. package/dist/esm/project-config/provider-companion-discovery.d.ts +288 -30
  92. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -1
  93. package/dist/esm/project-config/provider-companion-discovery.js +795 -46
  94. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -1
  95. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +192 -20
  96. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -1
  97. package/dist/esm/project-config/provider-runtime-artifacts.js +381 -42
  98. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -1
  99. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -1
  100. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  101. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  102. package/dist/esm/project-config/shared/auth.schemas.d.ts +14 -35
  103. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -1
  104. package/dist/esm/project-config/shared/auth.schemas.js +14 -35
  105. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -1
  106. package/dist/esm/project-config/shared/backing-service-servability.d.ts +157 -0
  107. package/dist/esm/project-config/shared/backing-service-servability.d.ts.map +1 -0
  108. package/dist/esm/project-config/shared/backing-service-servability.js +256 -0
  109. package/dist/esm/project-config/shared/backing-service-servability.js.map +1 -0
  110. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +66 -66
  111. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  112. package/dist/esm/project-config/shared/backing-services.schemas.js +75 -67
  113. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  114. package/dist/esm/project-config/shared/cdn.example.d.ts.map +1 -1
  115. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -1
  116. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -1
  117. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -1
  118. package/dist/esm/project-config/shared/csp-emit.js +41 -2
  119. package/dist/esm/project-config/shared/csp-emit.js.map +1 -1
  120. package/dist/esm/project-config/shared/csp.schemas.d.ts +11 -12
  121. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -1
  122. package/dist/esm/project-config/shared/csp.schemas.js +11 -12
  123. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -1
  124. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  125. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  126. package/dist/esm/project-config/shared/environment.schemas.d.ts +152 -12
  127. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  128. package/dist/esm/project-config/shared/environment.schemas.js +186 -9
  129. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  130. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +185 -10
  131. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -1
  132. package/dist/esm/project-config/shared/infra-providers.schemas.js +40 -3
  133. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -1
  134. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -1
  135. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  136. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  137. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  138. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  139. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -1
  140. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -1
  141. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +77 -47
  142. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -1
  143. package/dist/esm/project-config/shared/minion-resource-access.validation.js +114 -52
  144. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -1
  145. package/dist/esm/project-config/shared/platform-services.schemas.d.ts +50 -0
  146. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  147. package/dist/esm/project-config/shared/platform-services.schemas.js +57 -0
  148. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  149. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts +35 -0
  150. package/dist/esm/project-config/shared/platform-storage.schemas.d.ts.map +1 -0
  151. package/dist/esm/project-config/shared/platform-storage.schemas.js +37 -0
  152. package/dist/esm/project-config/shared/platform-storage.schemas.js.map +1 -0
  153. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +1 -1
  154. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  155. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts +81 -0
  156. package/dist/esm/project-config/shared/systems-of-record-env.schemas.d.ts.map +1 -0
  157. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js +74 -0
  158. package/dist/esm/project-config/shared/systems-of-record-env.schemas.js.map +1 -0
  159. package/dist/esm/project-config/static-asset-import-noop.d.ts +26 -0
  160. package/dist/esm/project-config/static-asset-import-noop.d.ts.map +1 -0
  161. package/dist/esm/project-config/static-asset-import-noop.js +49 -0
  162. package/dist/esm/project-config/static-asset-import-noop.js.map +1 -0
  163. package/dist/esm/registry/artifact-domain.schemas.d.ts +1 -1
  164. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -1
  165. package/dist/esm/registry/companion-api.schemas.d.ts +0 -176
  166. package/dist/esm/registry/companion-api.schemas.d.ts.map +0 -1
  167. package/dist/esm/registry/companion-api.schemas.js.map +0 -1
  168. package/dist/esm/registry/digest.schemas.d.ts.map +1 -1
  169. package/dist/esm/registry/index.d.ts +3 -1
  170. package/dist/esm/registry/index.d.ts.map +1 -1
  171. package/dist/esm/registry/index.js +3 -1
  172. package/dist/esm/registry/index.js.map +1 -1
  173. package/dist/esm/registry/local-checkout-source.d.ts +31 -0
  174. package/dist/esm/registry/local-checkout-source.d.ts.map +1 -0
  175. package/dist/esm/registry/local-checkout-source.js +45 -0
  176. package/dist/esm/registry/local-checkout-source.js.map +1 -0
  177. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +174 -14
  178. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -1
  179. package/dist/esm/registry/lockfile-modules-section.schemas.js +120 -11
  180. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -1
  181. package/dist/esm/registry/module-artifact.schemas.d.ts +79 -0
  182. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -1
  183. package/dist/esm/registry/module-artifact.schemas.js +36 -0
  184. package/dist/esm/registry/module-artifact.schemas.js.map +1 -1
  185. package/dist/esm/registry/module-manifest.schemas.d.ts +403 -23
  186. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -1
  187. package/dist/esm/registry/module-manifest.schemas.js +502 -60
  188. package/dist/esm/registry/module-manifest.schemas.js.map +1 -1
  189. package/dist/esm/registry/module-search.schemas.d.ts +80 -0
  190. package/dist/esm/registry/module-search.schemas.d.ts.map +1 -0
  191. package/dist/esm/registry/module-search.schemas.js +112 -0
  192. package/dist/esm/registry/module-search.schemas.js.map +1 -0
  193. package/dist/esm/registry/registry-config.schemas.d.ts +16 -0
  194. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -1
  195. package/dist/esm/registry/registry-config.schemas.js +8 -0
  196. package/dist/esm/registry/registry-config.schemas.js.map +1 -1
  197. package/dist/esm/registry/registry-errors.d.ts +126 -2
  198. package/dist/esm/registry/registry-errors.d.ts.map +1 -1
  199. package/dist/esm/registry/registry-errors.js +183 -14
  200. package/dist/esm/registry/registry-errors.js.map +1 -1
  201. package/dist/esm/registry/registry-keys.schemas.d.ts +80 -0
  202. package/dist/esm/registry/registry-keys.schemas.d.ts.map +1 -0
  203. package/dist/esm/registry/registry-keys.schemas.js +68 -0
  204. package/dist/esm/registry/registry-keys.schemas.js.map +1 -0
  205. package/dist/esm/registry/registry-section-schemas.constants.d.ts +25 -3
  206. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -1
  207. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  208. package/dist/esm/release/framework-release.constants.js.map +1 -1
  209. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  210. package/dist/esm/schemas/framework-secrets.schemas.d.ts +12 -1
  211. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  212. package/dist/esm/schemas/framework-secrets.schemas.js +14 -1
  213. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  214. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  215. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  216. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  217. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -1
  218. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  219. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -1
  220. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts +17 -14
  221. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -1
  222. package/dist/esm/workspace-scope/workspace-homes.schemas.js +8 -7
  223. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -1
  224. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts +15 -6
  225. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  226. package/dist/esm/workspace-scope/workspace-scope.schemas.js +23 -9
  227. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  228. package/package.json +7 -7
  229. package/dist/esm/registry/companion-api.schemas.js +0 -165
  230. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -54,10 +54,14 @@ export function resolveRuntimeBackingServiceAccess(principal, declaration) {
54
54
  };
55
55
  case ApplicationRuntimePrincipalKind.MINION: {
56
56
  const capabilities = new Set(MINION_UNCONDITIONAL_CAPABILITIES);
57
- // ABSENT resourceAccess ⇒ no data capability at all. Same gate, same
58
- // reasoning and the same source as the credential minting: a minion that
59
- // never asked for application data must not hold a credential to it, and
60
- // must not have a route to it either.
57
+ // ABSENT resourceAccess ⇒ no data capability at all: a minion that never
58
+ // asked for application data must not have a route to it.
59
+ //
60
+ // ⚠️ This is NO LONGER the same gate as the credential minting. Since
61
+ // 5c8936f86 the PostgreSQL mint gives such a minion a role carrying the
62
+ // infrastructure floor (observed live 2026-09-26), so a credential is
63
+ // issued that this layer gives no route to use. One rule has to be chosen
64
+ // and derived for both layers — #1771.
61
65
  if (declaration?.resourceAccess) {
62
66
  for (const capability of MINION_DATA_CAPABILITIES)
63
67
  capabilities.add(capability);
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-backing-service-access.js","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-backing-service-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,+BAA+B,EAAoC,MAAM,+BAA+B,CAAC;AAsElH;;;;;;;;;GASG;AACH,MAAM,iCAAiC,GAA+B;IACpE,eAAe,CAAC,cAAc;IAC9B,eAAe,CAAC,aAAa;IAC7B,gFAAgF;IAChF,8EAA8E;IAC9E,iFAAiF;IACjF,gFAAgF;IAChF,eAAe,CAAC,iBAAiB;CAClC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,wBAAwB,GAA+B;IAC3D,eAAe,CAAC,iBAAiB;IACjC,eAAe,CAAC,mBAAmB;IACnC,eAAe,CAAC,cAAc;CAC/B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,kCAAkC,CAChD,SAAkD,EAClD,WAAkD;IAElD,MAAM,sBAAsB,GAAG,WAAW,EAAE,sBAAsB,KAAK,IAAI,CAAC;IAE5E,QAAQ,SAAS,EAAE,IAAI,EAAE,CAAC;QACxB,KAAK,+BAA+B,CAAC,mBAAmB;YACtD,2EAA2E;YAC3E,2EAA2E;YAC3E,wEAAwE;YACxE,mEAAmE;YACnE,sDAAsD;YACtD,OAAO;gBACL,YAAY,EAAE,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;gBACrD,sBAAsB;aACvB,CAAC;QAEJ,KAAK,+BAA+B,CAAC,MAAM,CAAC,CAAC,CAAC;YAC5C,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,iCAAiC,CAAC,CAAC;YAChE,qEAAqE;YACrE,yEAAyE;YACzE,yEAAyE;YACzE,sCAAsC;YACtC,IAAI,WAAW,EAAE,cAAc,EAAE,CAAC;gBAChC,KAAK,MAAM,UAAU,IAAI,wBAAwB;oBAAE,YAAY,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;YAClF,CAAC;YACD,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,CAAC;QAClD,CAAC;QAED,KAAK,+BAA+B,CAAC,MAAM;YACzC,yEAAyE;YACzE,4EAA4E;YAC5E,mEAAmE;YACnE,4EAA4E;YAC5E,2EAA2E;YAC3E,+DAA+D;YAC/D,OAAO,EAAE,YAAY,EAAE,IAAI,GAAG,EAAE,EAAE,sBAAsB,EAAE,CAAC;QAE7D;YACE,2EAA2E;YAC3E,wEAAwE;YACxE,sEAAsE;YACtE,mCAAmC;YACnC,OAAO,EAAE,YAAY,EAAE,IAAI,GAAG,EAAE,EAAE,sBAAsB,EAAE,KAAK,EAAE,CAAC;IACtE,CAAC;AACH,CAAC","sourcesContent":["import { InfraCapability } from '../project-config/shared/infra-providers.schemas';\nimport { ApplicationRuntimePrincipalKind, type ApplicationRuntimePrincipal } from './runtime-principal.contracts';\n\n/**\n * WHICH backing services a runtime may reach, derived from what it DECLARED.\n *\n * ## Why this exists as one function\n *\n * Three enforcement points must agree about a runtime's backing-service access:\n * the CREDENTIALS apps-manager mints for it, the network MEMBERSHIP its container\n * gets, and the connection TOPOLOGY written into its environment. Each is\n * independently sufficient to deny, which is the point — but only while they\n * describe the same set.\n *\n * They are also each capable of silently disagreeing. A runtime kept off a\n * service's network while still receiving that service's connect URL is the worst\n * of the three combinations: `isConfigured()` reports true, a health probe or a\n * first use runs, and an unroutable host fails as a timeout for a runtime that was\n * never supposed to have the service at all. The fix is not a compensating branch\n * in a health check — it is that the two derive from HERE, so a non-declaring\n * runtime is never configured in the first place and there is nothing to\n * distinguish.\n *\n * So this is deliberately NOT a helper each consumer may reimplement \"for its own\n * needs\". Consumers call it; none re-derives. That is the whole anti-bypass\n * strategy, and the enumeration of who must call it lives in\n * `.claude/plans/minion-nature-and-authority.md` (Step 5-egress).\n *\n * ## The vocabulary is `InfraCapability`, not a new enum\n *\n * That is already what an infra provider module declares it supplies, so a\n * capability named here and a provider that serves it cannot drift into two\n * spellings of one concept.\n */\nexport interface RuntimeBackingServiceAccess {\n /**\n * Capabilities this runtime may reach. Empty is a legitimate, meaningful answer\n * — see the WORKER case — and must never be read as \"unspecified, allow all\".\n */\n readonly capabilities: ReadonlySet<InfraCapability>;\n /**\n * Whether this runtime needs a route off the host at all.\n *\n * Authored, never inferred: a scraper minion legitimately reaches the public\n * internet, and the point of the flag is not to refuse that but to stop egress\n * being universal and unstated. Default false, so the safe answer is the one you\n * get by not thinking about it.\n */\n readonly requiresInternetEgress: boolean;\n}\n\n/**\n * What a minion declares about its access to the application's data.\n *\n * Structural rather than importing the app-declaration type, so this contract does\n * not acquire the whole configuration graph for two fields.\n */\nexport interface RuntimeAccessDeclaration {\n /**\n * The minion's authored `resourceAccess`, or `undefined` when it declared none.\n *\n * The distinction is load-bearing and mirrors `deriveMinionResourceGrants`:\n * ABSENT means application-data access was never requested (D11/R3), so no\n * database credential is minted AND no database network is joined. An empty but\n * PRESENT declaration is a different statement and is not this.\n */\n readonly resourceAccess?: { read?: readonly string[]; write?: readonly string[] } | undefined;\n /** Authored opt-in; see {@link RuntimeBackingServiceAccess.requiresInternetEgress}. */\n readonly requiresInternetEgress?: boolean | undefined;\n}\n\n/**\n * Capabilities every MINION reaches regardless of what it declared.\n *\n * A minion is tick-driven and single-flighted: it consumes its tick queue and its\n * own RPC reply queue (QUEUING_SYSTEM) and holds a per-principal Redis namespace\n * (CACHE_MANAGER) used for its single-flight lease. Both credentials are minted\n * unconditionally for every minion today, so withholding either network would\n * strand a credential the platform issued — the incoherence this module exists to\n * prevent, arriving from the other direction.\n */\nconst MINION_UNCONDITIONAL_CAPABILITIES: readonly InfraCapability[] = [\n InfraCapability.QUEUING_SYSTEM,\n InfraCapability.CACHE_MANAGER,\n // Telemetry is unconditional for the same reason the platform segment is: every\n // runtime emits it, it carries no application data, and withholding it breaks\n // observability with NO signal — the collector appears in no readiness check, so\n // the failure surfaces as \"spans stopped\" long after the change that caused it.\n InfraCapability.METRICS_TELEMETRY,\n];\n\n/**\n * Capabilities a minion reaches ONLY when it declared application-data access.\n *\n * Both database kinds are listed because an application is backed by one or the\n * other and this layer does not know which; the consumer intersects with the\n * capabilities the application actually provisions. Listing only the provisioned\n * one here would make this function depend on infrastructure configuration to\n * answer a question about a DECLARATION.\n */\nconst MINION_DATA_CAPABILITIES: readonly InfraCapability[] = [\n InfraCapability.DOCUMENT_DATABASE,\n InfraCapability.RELATIONAL_DATABASE,\n InfraCapability.OBJECT_STORAGE,\n];\n\n/**\n * Derive a runtime's backing-service access from its principal and declaration.\n *\n * Fails CLOSED on every axis: an unknown principal kind, an absent declaration and\n * an absent `resourceAccess` all narrow rather than widen.\n */\nexport function resolveRuntimeBackingServiceAccess(\n principal: ApplicationRuntimePrincipal | undefined,\n declaration?: RuntimeAccessDeclaration | undefined,\n): RuntimeBackingServiceAccess {\n const requiresInternetEgress = declaration?.requiresInternetEgress === true;\n\n switch (principal?.kind) {\n case ApplicationRuntimePrincipalKind.APPLICATION_BACKEND:\n // The general runtime: it serves every request the application exposes, so\n // its access is the application's own provisioned set rather than anything\n // narrowed here. Returning the full vocabulary and letting the consumer\n // intersect with what the app provisions keeps THIS function about\n // declarations and the consumer about infrastructure.\n return {\n capabilities: new Set(Object.values(InfraCapability)),\n requiresInternetEgress,\n };\n\n case ApplicationRuntimePrincipalKind.MINION: {\n const capabilities = new Set(MINION_UNCONDITIONAL_CAPABILITIES);\n // ABSENT resourceAccess ⇒ no data capability at all. Same gate, same\n // reasoning and the same source as the credential minting: a minion that\n // never asked for application data must not hold a credential to it, and\n // must not have a route to it either.\n if (declaration?.resourceAccess) {\n for (const capability of MINION_DATA_CAPABILITIES) capabilities.add(capability);\n }\n return { capabilities, requiresInternetEgress };\n }\n\n case ApplicationRuntimePrincipalKind.WORKER:\n // EMPTY, and this is a measured fact rather than a conservative guess: a\n // worker never boots the application lifecycle — it is standalone by design\n // with no backing-service access, which is why it has no member in\n // `ApplicationRuntimeProfile` at all. D22/KD-3 says the same thing from the\n // credential side. Segmentation turns that policy into a reachability fact\n // instead of a promise about what nobody remembered to inject.\n return { capabilities: new Set(), requiresInternetEgress };\n\n default:\n // An unrecognised or absent principal gets NOTHING. Every caller uses this\n // to decide how narrowly a runtime is confined, so a permissive default\n // would widen confinement silently — the one direction that cannot be\n // detected by anything downstream.\n return { capabilities: new Set(), requiresInternetEgress: false };\n }\n}\n"]}
1
+ {"version":3,"file":"runtime-backing-service-access.js","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-backing-service-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,EAAE,+BAA+B,EAAoC,MAAM,+BAA+B,CAAC;AAsElH;;;;;;;;;GASG;AACH,MAAM,iCAAiC,GAA+B;IACpE,eAAe,CAAC,cAAc;IAC9B,eAAe,CAAC,aAAa;IAC7B,gFAAgF;IAChF,8EAA8E;IAC9E,iFAAiF;IACjF,gFAAgF;IAChF,eAAe,CAAC,iBAAiB;CAClC,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,wBAAwB,GAA+B;IAC3D,eAAe,CA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sBAAsB,EAAE,KAAK,EAAE,CAAC;IACtE,CAAC;AACH,CAAC","sourcesContent":["import { InfraCapability } from '../project-config/shared/infra-providers.schemas';\nimport { ApplicationRuntimePrincipalKind, type ApplicationRuntimePrincipal } from './runtime-principal.contracts';\n\n/**\n * WHICH backing services a runtime may reach, derived from what it DECLARED.\n *\n * ## Why this exists as one function\n *\n * Three enforcement points must agree about a runtime's backing-service access:\n * the CREDENTIALS apps-manager mints for it, the network MEMBERSHIP its container\n * gets, and the connection TOPOLOGY written into its environment. Each is\n * independently sufficient to deny, which is the point — but only while they\n * describe the same set.\n *\n * They are also each capable of silently disagreeing. A runtime kept off a\n * service's network while still receiving that service's connect URL is the worst\n * of the three combinations: `isConfigured()` reports true, a health probe or a\n * first use runs, and an unroutable host fails as a timeout for a runtime that was\n * never supposed to have the service at all. The fix is not a compensating branch\n * in a health check — it is that the two derive from HERE, so a non-declaring\n * runtime is never configured in the first place and there is nothing to\n * distinguish.\n *\n * So this is deliberately NOT a helper each consumer may reimplement \"for its own\n * needs\". Consumers call it; none re-derives. That is the whole anti-bypass\n * strategy, and the enumeration of who must call it lives in\n * `.claude/plans/minion-nature-and-authority.md` (Step 5-egress).\n *\n * ## The vocabulary is `InfraCapability`, not a new enum\n *\n * That is already what an infra provider module declares it supplies, so a\n * capability named here and a provider that serves it cannot drift into two\n * spellings of one concept.\n */\nexport interface RuntimeBackingServiceAccess {\n /**\n * Capabilities this runtime may reach. Empty is a legitimate, meaningful answer\n * — see the WORKER case — and must never be read as \"unspecified, allow all\".\n */\n readonly capabilities: ReadonlySet<InfraCapability>;\n /**\n * Whether this runtime needs a route off the host at all.\n *\n * Authored, never inferred: a scraper minion legitimately reaches the public\n * internet, and the point of the flag is not to refuse that but to stop egress\n * being universal and unstated. Default false, so the safe answer is the one you\n * get by not thinking about it.\n */\n readonly requiresInternetEgress: boolean;\n}\n\n/**\n * What a minion declares about its access to the application's data.\n *\n * Structural rather than importing the app-declaration type, so this contract does\n * not acquire the whole configuration graph for two fields.\n */\nexport interface RuntimeAccessDeclaration {\n /**\n * The minion's authored `resourceAccess`, or `undefined` when it declared none.\n *\n * The distinction is load-bearing and mirrors `deriveMinionResourceGrants`:\n * ABSENT means application-data access was never requested (D11/R3), so no\n * database credential is minted AND no database network is joined. An empty but\n * PRESENT declaration is a different statement and is not this.\n */\n readonly resourceAccess?: { read?: readonly string[]; write?: readonly string[] } | undefined;\n /** Authored opt-in; see {@link RuntimeBackingServiceAccess.requiresInternetEgress}. */\n readonly requiresInternetEgress?: boolean | undefined;\n}\n\n/**\n * Capabilities every MINION reaches regardless of what it declared.\n *\n * A minion is tick-driven and single-flighted: it consumes its tick queue and its\n * own RPC reply queue (QUEUING_SYSTEM) and holds a per-principal Redis namespace\n * (CACHE_MANAGER) used for its single-flight lease. Both credentials are minted\n * unconditionally for every minion today, so withholding either network would\n * strand a credential the platform issued — the incoherence this module exists to\n * prevent, arriving from the other direction.\n */\nconst MINION_UNCONDITIONAL_CAPABILITIES: readonly InfraCapability[] = [\n InfraCapability.QUEUING_SYSTEM,\n InfraCapability.CACHE_MANAGER,\n // Telemetry is unconditional for the same reason the platform segment is: every\n // runtime emits it, it carries no application data, and withholding it breaks\n // observability with NO signal — the collector appears in no readiness check, so\n // the failure surfaces as \"spans stopped\" long after the change that caused it.\n InfraCapability.METRICS_TELEMETRY,\n];\n\n/**\n * Capabilities a minion reaches ONLY when it declared application-data access.\n *\n * Both database kinds are listed because an application is backed by one or the\n * other and this layer does not know which; the consumer intersects with the\n * capabilities the application actually provisions. Listing only the provisioned\n * one here would make this function depend on infrastructure configuration to\n * answer a question about a DECLARATION.\n */\nconst MINION_DATA_CAPABILITIES: readonly InfraCapability[] = [\n InfraCapability.DOCUMENT_DATABASE,\n InfraCapability.RELATIONAL_DATABASE,\n InfraCapability.OBJECT_STORAGE,\n];\n\n/**\n * Derive a runtime's backing-service access from its principal and declaration.\n *\n * Fails CLOSED on every axis: an unknown principal kind, an absent declaration and\n * an absent `resourceAccess` all narrow rather than widen.\n */\nexport function resolveRuntimeBackingServiceAccess(\n principal: ApplicationRuntimePrincipal | undefined,\n declaration?: RuntimeAccessDeclaration | undefined,\n): RuntimeBackingServiceAccess {\n const requiresInternetEgress = declaration?.requiresInternetEgress === true;\n\n switch (principal?.kind) {\n case ApplicationRuntimePrincipalKind.APPLICATION_BACKEND:\n // The general runtime: it serves every request the application exposes, so\n // its access is the application's own provisioned set rather than anything\n // narrowed here. Returning the full vocabulary and letting the consumer\n // intersect with what the app provisions keeps THIS function about\n // declarations and the consumer about infrastructure.\n return {\n capabilities: new Set(Object.values(InfraCapability)),\n requiresInternetEgress,\n };\n\n case ApplicationRuntimePrincipalKind.MINION: {\n const capabilities = new Set(MINION_UNCONDITIONAL_CAPABILITIES);\n // ABSENT resourceAccess ⇒ no data capability at all: a minion that never\n // asked for application data must not have a route to it.\n //\n // ⚠️ This is NO LONGER the same gate as the credential minting. Since\n // 5c8936f86 the PostgreSQL mint gives such a minion a role carrying the\n // infrastructure floor (observed live 2026-09-26), so a credential is\n // issued that this layer gives no route to use. One rule has to be chosen\n // and derived for both layers — #1771.\n if (declaration?.resourceAccess) {\n for (const capability of MINION_DATA_CAPABILITIES) capabilities.add(capability);\n }\n return { capabilities, requiresInternetEgress };\n }\n\n case ApplicationRuntimePrincipalKind.WORKER:\n // EMPTY, and this is a measured fact rather than a conservative guess: a\n // worker never boots the application lifecycle — it is standalone by design\n // with no backing-service access, which is why it has no member in\n // `ApplicationRuntimeProfile` at all. D22/KD-3 says the same thing from the\n // credential side. Segmentation turns that policy into a reachability fact\n // instead of a promise about what nobody remembered to inject.\n return { capabilities: new Set(), requiresInternetEgress };\n\n default:\n // An unrecognised or absent principal gets NOTHING. Every caller uses this\n // to decide how narrowly a runtime is confined, so a permissive default\n // would widen confinement silently — the one direction that cannot be\n // detected by anything downstream.\n return { capabilities: new Set(), requiresInternetEgress: false };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-network-policy.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/runtime-network-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAOjF;;;;;;;;;;;;;;;GAeG;AAEH,gEAAgE;AAChE,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,2BAA2B,GAAG,SAAS,EAClD,WAAW,CAAC,EAAE,wBAAwB,GAAG,SAAS,EAClD,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxB;AAED,iFAAiF;AACjF,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,UAAU,EAAE,sBAAsB,CAAC;IAC5C,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kCAAkC,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,4BAA4B,EAAE,CAoD9G"}
1
+ {"version":3,"file":"runtime-network-policy.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-network-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAOjF;;;;;;;;;;;;;;;GAeG;AAEH,g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C/B,WAAW,sBAAsB;IACjC,YAAY,uBAAuB;IACnC,cAAc,yBAAyB;IACvC,8FAA8F;IAC9F,UAAU,qBAAqB;IAC/B,0FAA0F;IAC1F,cAAc,yBAAyB;IACvC;;;;;OAKG;IACH,MAAM,iBAAiB;CACxB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,eAAe,EAAE,mBAAmB,GAAG,IAAI,CAwBtF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,2BAA2B,GAAG,SAAS,EAClD,WAAW,CAAC,EAAE,wBAAwB,GAAG,SAAS,EAClD,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1C,WAAW,CAAC,mBAAmB,CAAC,CAgClC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAEvE"}
1
+ {"version":3,"file":"runtime-network-topology.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-network-topology.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AACnF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,oBAAY,mBAAmB;IAC7B,sFAAsF;IACtF,IAAI,eAAe;IACnB;;;;OAIG;IACH,QAAQ,mBAAmB;IAC3B,UAAU,qBAAqB;IAC/B,aAAa,wBAAwB;IACrC,UAAU,qBAAqB;IAC/B,WAAW,sBAAsB;IACjC,YAAY,uBAAuB;IACnC,cAAc,yBAAyB;IACvC,8FAA8F;IAC9F,UAAU,qBAAqB;IAC/B,0FAA0F;IAC1F,cAAc,yBAAyB;IACvC;;;;;OAKG;IACH,MAAM,iBAAiB;CACxB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,eAAe,EAAE,mBAAmB,GAAG,IAAI,CAwBtF,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,2BAA2B,GAAG,SAAS,EAClD,WAAW,CAAC,EAAE,wBAAwB,GAAG,SAAS,EAClD,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1C,WAAW,CAAC,mBAAmB,CAAC,CAgClC;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAEvE"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-network-topology.js","sourceRoot":"","sources":["../../../src/bootstrap/runtime-network-topology.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,EACL,kCAAkC,GAEnC,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,mBA0BX;AA1BD,WAAY,mBAAmB;IAC7B,sFAAsF;IACtF,0CAAmB,CAAA;IACnB;;;;OAIG;IACH,kDAA2B,CAAA;IAC3B,sDAA+B,CAAA;IAC/B,4DAAqC,CAAA;IACrC,sDAA+B,CAAA;IAC/B,wDAAiC,CAAA;IACjC,0DAAmC,CAAA;IACnC,8DAAuC,CAAA;IACvC,8FAA8F;IAC9F,sDAA+B,CAAA;IAC/B,0FAA0F;IAC1F,8DAAuC,CAAA;IACvC;;;;;OAKG;IACH,8CAAuB,CAAA;AACzB,CAAC,EA1BW,mBAAmB,KAAnB,mBAAmB,QA0B9B;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAwD;IACzF,CAAC,eAAe,CAAC,iBAAiB,CAAC,EAAE,mBAAmB,CAAC,UAAU;IACnE,CA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;QAC7C,MAAM,OAAO,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;QACnD,IAAI,OAAO;YAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,4EAA4E;IAC5E,+EAA+E;IAC/E,2EAA2E;IAC3E,qEAAqE;IACrE,IAAI,OAAO,EAAE,UAAU;QAAE,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAEhE,+DAA+D;IAC/D,IAAI,MAAM,CAAC,sBAAsB;QAAE,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAE5E,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA4B;IAC5D,OAAO,OAAO,KAAK,mBAAmB,CAAC,IAAI,IAAI,OAAO,KAAK,mBAAmB,CAAC,MAAM,CAAC;AACxF,CAAC","sourcesContent":["import { InfraCapability } from '../project-config/shared/infra-providers.schemas';\nimport type { ApplicationRuntimePrincipal } from './runtime-principal.contracts';\nimport {\n resolveRuntimeBackingServiceAccess,\n type RuntimeAccessDeclaration,\n} from './runtime-backing-service-access';\n\n/**\n * The network segments a Wildo deployment is divided into (Step 5-egress).\n *\n * Docker Compose has no `NetworkPolicy` object, but it has the mechanism that\n * matters for the destination half: membership of user-defined bridge networks,\n * with per-network embedded DNS. A container not attached to a network can\n * neither resolve nor route to the services on it — deny-by-default at the\n * network level. Kubernetes expresses the same division as `NetworkPolicy`\n * egress rules. Both renderers derive from THIS enum so they cannot describe\n * different topologies.\n */\nexport enum WildoRuntimeNetwork {\n /** Reverse proxy + every container serving HTTP. Not internal: it faces the world. */\n EDGE = 'wildo-edge',\n /**\n * The control plane — apps-manager, module-registry, crontabs — plus every\n * runtime that must fetch its secrets and configuration. Internal: nothing here\n * needs a route off the host.\n */\n PLATFORM = 'wildo-platform',\n DATA_MONGO = 'wildo-data-mongo',\n DATA_POSTGRES = 'wildo-data-postgres',\n DATA_REDIS = 'wildo-data-redis',\n DATA_RABBIT = 'wildo-data-rabbit',\n DATA_OBJECTS = 'wildo-data-objects',\n DATA_ANTIVIRUS = 'wildo-data-antivirus',\n /** Tamper-evident audit-log storage (immudb) — a service of its own, not a database table. */\n DATA_AUDIT = 'wildo-data-audit',\n /** The OTel collector. Nearly every runtime emits to it; almost nothing reads from it. */\n DATA_TELEMETRY = 'wildo-data-telemetry',\n /**\n * The ONLY non-internal network below the edge. Attachment to any non-internal\n * network restores NAT, so \"can this runtime reach the internet?\" is decided\n * here and nowhere else — marking the data networks internal is necessary but\n * not sufficient.\n */\n EGRESS = 'wildo-egress',\n}\n\n/**\n * Which network serves each backing-service capability.\n *\n * A total `Record`, deliberately: adding a member to {@link InfraCapability}\n * becomes a COMPILE ERROR here rather than a capability that silently reaches no\n * network — or worse, one whose runtimes silently keep the flat-network\n * reachability this segmentation exists to remove. `null` means the capability\n * needs no network of its own, and every `null` states why.\n */\nexport const NETWORK_FOR_CAPABILITY: Record<InfraCapability, WildoRuntimeNetwork | null> = {\n [InfraCapability.DOCUMENT_DATABASE]: WildoRuntimeNetwork.DATA_MONGO,\n [InfraCapability.RELATIONAL_DATABASE]: WildoRuntimeNetwork.DATA_POSTGRES,\n [InfraCapability.CACHE_MANAGER]: WildoRuntimeNetwork.DATA_REDIS,\n [InfraCapability.QUEUING_SYSTEM]: WildoRuntimeNetwork.DATA_RABBIT,\n [InfraCapability.OBJECT_STORAGE]: WildoRuntimeNetwork.DATA_OBJECTS,\n [InfraCapability.ANTIVIRUS_SCANNING]: WildoRuntimeNetwork.DATA_ANTIVIRUS,\n // ⚠️ CORRECTED 2026-08-12. Both of the entries below were `null`, on reasoning\n // that measurement disproved while building the 5B service table:\n //\n // - AUDIT_LOG_STORAGE was \"served BY the document/relational database\". It is\n // not: `immudb` is a service of its own, with its own container, and a\n // runtime that writes audit records dials IT rather than a database table.\n // - METRICS_TELEMETRY was \"no application runtime dials them directly today\".\n // Also false — runtimes emit spans and metrics to the collector, and that\n // traffic is live in development. A `null` here would have cut tracing for\n // every runtime the moment segmentation was enforced, with NO readiness\n // check covering it: a first-use failure, silent until someone noticed spans\n // had stopped.\n [InfraCapability.AUDIT_LOG_STORAGE]: WildoRuntimeNetwork.DATA_AUDIT,\n [InfraCapability.METRICS_TELEMETRY]: WildoRuntimeNetwork.DATA_TELEMETRY,\n // Backup remains genuinely operator-side: no application runtime dials it, and\n // the backup tooling runs outside the application's network entirely.\n [InfraCapability.BACKUP_MANAGER]: null,\n};\n\n/**\n * The networks a runtime's container joins.\n *\n * Derived from the SAME declaration as its credentials and its environment\n * topology — see {@link resolveRuntimeBackingServiceAccess}. That is the whole\n * point: a runtime kept off a service's network must also not hold that service's\n * credential nor receive its connect URL, and the only way three enforcement\n * points stay in agreement is by not deriving the answer three times.\n *\n * `PLATFORM` is unconditional. Every runtime — including a worker, which holds no\n * backing-service credentials at all — must reach apps-manager to fetch its own\n * bootstrap material. Withholding it would strand every runtime at boot, and it\n * grants no application data.\n */\nexport function resolveRuntimeNetworkMembership(\n principal: ApplicationRuntimePrincipal | undefined,\n declaration?: RuntimeAccessDeclaration | undefined,\n options?: { readonly servesHttp?: boolean },\n): ReadonlySet<WildoRuntimeNetwork> {\n const access = resolveRuntimeBackingServiceAccess(principal, declaration);\n const networks = new Set<WildoRuntimeNetwork>();\n\n // PLATFORM is for runtimes that FETCH their own bootstrap material — every\n // runtime principal does, including a worker that holds no backing-service\n // credentials at all. A caller with NO principal is not a runtime principal:\n // today that is the static frontend, an nginx container that authenticates to\n // nothing and has no bootstrap material to fetch.\n //\n // This was previously unconditional, which put that frontend on the platform\n // segment. Harmless — the segment carries no application data and the container\n // could not authenticate anyway — but it is reachability nobody asked for, and\n // \"unconditional because every case so far needed it\" is exactly the default a\n // later reader assumes was measured.\n if (principal) networks.add(WildoRuntimeNetwork.PLATFORM);\n\n for (const capability of access.capabilities) {\n const network = NETWORK_FOR_CAPABILITY[capability];\n if (network) networks.add(network);\n }\n\n // Serving HTTP is a property of the DEPLOYMENT (does a proxy route to it?),\n // not of what the runtime declared, so it arrives separately rather than being\n // inferred from the principal kind — an application backend that serves no\n // public route should not be on the edge merely for being a backend.\n if (options?.servesHttp) networks.add(WildoRuntimeNetwork.EDGE);\n\n // Authored, never inferred. See `RuntimeBackingServiceAccess`.\n if (access.requiresInternetEgress) networks.add(WildoRuntimeNetwork.EGRESS);\n\n return networks;\n}\n\n/**\n * Networks that must be declared `internal: true`.\n *\n * Derived by EXCLUSION from the two that legitimately carry a route off the host,\n * so a network added to the enum is internal by default. The safe posture is the\n * one you get by not thinking about it.\n */\nexport function isInternalNetwork(network: WildoRuntimeNetwork): boolean {\n return network !== WildoRuntimeNetwork.EDGE && network !== WildoRuntimeNetwork.EGRESS;\n}\n"]}
1
+ {"version":3,"file":"runtime-network-topology.js","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-network-topology.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kDAAkD,CAAC;AAEnF,OAAO,EACL,kCAAkC,GAEnC,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,MAAM,CAAN,IAAY,mBA0BX;AA1BD,WAAY,mBAAmB;IAC7B,sFAAsF;IACtF,0CAAmB,CAAA;IACnB;;;;OAIG;IACH,kDAA2B,CAAA;IAC3B,sDAA+B,CAAA;IAC/B,4DAAqC,CAAA;IACrC,sDAA+B,CAAA;IAC/B,wDAAiC,CAAA;IACjC,0DAAmC,CAAA;IACnC,8DAAuC,CAAA;IACvC,8FAA8F;IAC9F,sDAA+B,CAAA;IAC/B,0FAA0F;IAC1F,8DAAuC,CAAA;IACvC;;;;;OAKG;IACH,8CAAuB,CAAA;AACzB,CAAC,EA1BW,mBAAmB,KAAnB,mBAAmB,QA0B9B;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAwD;IACzF,CAAC,eAAe,CAAC,iBAAiB,CAAC,E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AAI,MAAM,CAAC,YAAY,EAAE,CAAC;QAC7C,MAAM,OAAO,GAAG,sBAAsB,CAAC,UAAU,CAAC,CAAC;QACnD,IAAI,OAAO;YAAE,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED,4EAA4E;IAC5E,+EAA+E;IAC/E,2EAA2E;IAC3E,qEAAqE;IACrE,IAAI,OAAO,EAAE,UAAU;QAAE,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAEhE,+DAA+D;IAC/D,IAAI,MAAM,CAAC,sBAAsB;QAAE,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAE5E,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAA4B;IAC5D,OAAO,OAAO,KAAK,mBAAmB,CAAC,IAAI,IAAI,OAAO,KAAK,mBAAmB,CAAC,MAAM,CAAC;AACxF,CAAC","sourcesContent":["import { InfraCapability } from '../project-config/shared/infra-providers.schemas';\nimport type { ApplicationRuntimePrincipal } from './runtime-principal.contracts';\nimport {\n resolveRuntimeBackingServiceAccess,\n type RuntimeAccessDeclaration,\n} from './runtime-backing-service-access';\n\n/**\n * The network segments a Wildo deployment is divided into (Step 5-egress).\n *\n * Docker Compose has no `NetworkPolicy` object, but it has the mechanism that\n * matters for the destination half: membership of user-defined bridge networks,\n * with per-network embedded DNS. A container not attached to a network can\n * neither resolve nor route to the services on it — deny-by-default at the\n * network level. Kubernetes expresses the same division as `NetworkPolicy`\n * egress rules. Both renderers derive from THIS enum so they cannot describe\n * different topologies.\n */\nexport enum WildoRuntimeNetwork {\n /** Reverse proxy + every container serving HTTP. Not internal: it faces the world. */\n EDGE = 'wildo-edge',\n /**\n * The control plane — apps-manager, module-registry, crontabs — plus every\n * runtime that must fetch its secrets and configuration. Internal: nothing here\n * needs a route off the host.\n */\n PLATFORM = 'wildo-platform',\n DATA_MONGO = 'wildo-data-mongo',\n DATA_POSTGRES = 'wildo-data-postgres',\n DATA_REDIS = 'wildo-data-redis',\n DATA_RABBIT = 'wildo-data-rabbit',\n DATA_OBJECTS = 'wildo-data-objects',\n DATA_ANTIVIRUS = 'wildo-data-antivirus',\n /** Tamper-evident audit-log storage (immudb) — a service of its own, not a database table. */\n DATA_AUDIT = 'wildo-data-audit',\n /** The OTel collector. Nearly every runtime emits to it; almost nothing reads from it. */\n DATA_TELEMETRY = 'wildo-data-telemetry',\n /**\n * The ONLY non-internal network below the edge. Attachment to any non-internal\n * network restores NAT, so \"can this runtime reach the internet?\" is decided\n * here and nowhere else — marking the data networks internal is necessary but\n * not sufficient.\n */\n EGRESS = 'wildo-egress',\n}\n\n/**\n * Which network serves each backing-service capability.\n *\n * A total `Record`, deliberately: adding a member to {@link InfraCapability}\n * becomes a COMPILE ERROR here rather than a capability that silently reaches no\n * network — or worse, one whose runtimes silently keep the flat-network\n * reachability this segmentation exists to remove. `null` means the capability\n * needs no network of its own, and every `null` states why.\n */\nexport const NETWORK_FOR_CAPABILITY: Record<InfraCapability, WildoRuntimeNetwork | null> = {\n [InfraCapability.DOCUMENT_DATABASE]: WildoRuntimeNetwork.DATA_MONGO,\n [InfraCapability.RELATIONAL_DATABASE]: WildoRuntimeNetwork.DATA_POSTGRES,\n [InfraCapability.CACHE_MANAGER]: WildoRuntimeNetwork.DATA_REDIS,\n [InfraCapability.QUEUING_SYSTEM]: WildoRuntimeNetwork.DATA_RABBIT,\n [InfraCapability.OBJECT_STORAGE]: WildoRuntimeNetwork.DATA_OBJECTS,\n [InfraCapability.ANTIVIRUS_SCANNING]: WildoRuntimeNetwork.DATA_ANTIVIRUS,\n // ⚠️ CORRECTED 2026-08-12. Both of the entries below were `null`, on reasoning\n // that measurement disproved while building the 5B service table:\n //\n // - AUDIT_LOG_STORAGE was \"served BY the document/relational database\". It is\n // not: `immudb` is a service of its own, with its own container, and a\n // runtime that writes audit records dials IT rather than a database table.\n // - METRICS_TELEMETRY was \"no application runtime dials them directly today\".\n // Also false — runtimes emit spans and metrics to the collector, and that\n // traffic is live in development. A `null` here would have cut tracing for\n // every runtime the moment segmentation was enforced, with NO readiness\n // check covering it: a first-use failure, silent until someone noticed spans\n // had stopped.\n [InfraCapability.AUDIT_LOG_STORAGE]: WildoRuntimeNetwork.DATA_AUDIT,\n [InfraCapability.METRICS_TELEMETRY]: WildoRuntimeNetwork.DATA_TELEMETRY,\n // Backup remains genuinely operator-side: no application runtime dials it, and\n // the backup tooling runs outside the application's network entirely.\n [InfraCapability.BACKUP_MANAGER]: null,\n};\n\n/**\n * The networks a runtime's container joins.\n *\n * Derived from the SAME declaration as its credentials and its environment\n * topology — see {@link resolveRuntimeBackingServiceAccess}. That is the whole\n * point: a runtime kept off a service's network must also not hold that service's\n * credential nor receive its connect URL, and the only way three enforcement\n * points stay in agreement is by not deriving the answer three times.\n *\n * `PLATFORM` is unconditional. Every runtime — including a worker, which holds no\n * backing-service credentials at all — must reach apps-manager to fetch its own\n * bootstrap material. Withholding it would strand every runtime at boot, and it\n * grants no application data.\n */\nexport function resolveRuntimeNetworkMembership(\n principal: ApplicationRuntimePrincipal | undefined,\n declaration?: RuntimeAccessDeclaration | undefined,\n options?: { readonly servesHttp?: boolean },\n): ReadonlySet<WildoRuntimeNetwork> {\n const access = resolveRuntimeBackingServiceAccess(principal, declaration);\n const networks = new Set<WildoRuntimeNetwork>();\n\n // PLATFORM is for runtimes that FETCH their own bootstrap material — every\n // runtime principal does, including a worker that holds no backing-service\n // credentials at all. A caller with NO principal is not a runtime principal:\n // today that is the static frontend, an nginx container that authenticates to\n // nothing and has no bootstrap material to fetch.\n //\n // This was previously unconditional, which put that frontend on the platform\n // segment. Harmless — the segment carries no application data and the container\n // could not authenticate anyway — but it is reachability nobody asked for, and\n // \"unconditional because every case so far needed it\" is exactly the default a\n // later reader assumes was measured.\n if (principal) networks.add(WildoRuntimeNetwork.PLATFORM);\n\n for (const capability of access.capabilities) {\n const network = NETWORK_FOR_CAPABILITY[capability];\n if (network) networks.add(network);\n }\n\n // Serving HTTP is a property of the DEPLOYMENT (does a proxy route to it?),\n // not of what the runtime declared, so it arrives separately rather than being\n // inferred from the principal kind — an application backend that serves no\n // public route should not be on the edge merely for being a backend.\n if (options?.servesHttp) networks.add(WildoRuntimeNetwork.EDGE);\n\n // Authored, never inferred. See `RuntimeBackingServiceAccess`.\n if (access.requiresInternetEgress) networks.add(WildoRuntimeNetwork.EGRESS);\n\n return networks;\n}\n\n/**\n * Networks that must be declared `internal: true`.\n *\n * Derived by EXCLUSION from the two that legitimately carry a route off the host,\n * so a network added to the enum is internal by default. The safe posture is the\n * one you get by not thinking about it.\n */\nexport function isInternalNetwork(network: WildoRuntimeNetwork): boolean {\n return network !== WildoRuntimeNetwork.EDGE && network !== WildoRuntimeNetwork.EGRESS;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-platform-access.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/runtime-platform-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAGlH,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AAEvG;;;;;;;;;;;;;;;GAeG;AAGH,kEAAkE;AAClE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,yBAAyB,EAAE,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,2BAA2B,GAAG,SAAS,EAClD,WAAW,EAAE,+BAA+B,GAAG,SAAS,GACvD;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAQxC"}
1
+ {"version":3,"file":"runtime-platform-access.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-platform-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,KAAK,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAGlH,OAAO,EAAE,yBAAyB,EAAE,MAAM,4DAA4D,CAAC;AAEvG;;;;;;;;;;;;;;;GAeG;AAGH,kEAAkE;AAClE,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,yBAAyB,EAAE,CAAC;CACxD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,2BAA2B,GAAG,SAAS,EAClD,WAAW,EAAE,+BAA+B,GAAG,SAAS,GACvD;IAAE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAQxC"}
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-principal.contracts.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/runtime-principal.contracts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,oBAAY,+BAA+B;IACzC;;;;;OAKG;IACH,mBAAmB,wBAAwB;IAC3C,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE,qBAAqB,GACjC,+BAA+B,CAOjC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,+BAA+B,CAAC;IACtC,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,EAAE,2BAE3C,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,2BAA2B,GAAG,MAAM,CAIvF;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,2BAA2B,GAAG,IAAI,CAaxF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kCAAkC,CAAC,WAAW,EAAE;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC/C,GAAG,2BAA2B,EAAE,CAYhC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAErF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sCAAsC,CACpD,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,+BAA+B,GAAG,SAAS,CAW7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,+BAA+B,GAAG,SAAS,EAC1D,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,MAAM,GAAG,SAAS,CAQpB"}
1
+ {"version":3,"file":"runtime-principal.contracts.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-principal.contracts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,oBAAY,+BAA+B;IACzC;;;;;OAKG;IACH,mBAAmB,wBAAwB;IAC3C,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE,qBAAqB,GACjC,+BAA+B,CAOjC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,+BAA+B,CAAC;IACtC,8EAA8E;IAC9E,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B;AAED,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,EAAE,2BAE3C,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,2BAA2B,GAAG,MAAM,CAIvF;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,MAAM,GAAG,2BAA2B,GAAG,IAAI,CAaxF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kCAAkC,CAAC,WAAW,EAAE;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC/C,GAAG,2BAA2B,EAAE,CAYhC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAErF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sCAAsC,CACpD,cAAc,EAAE,MAAM,GAAG,SAAS,GACjC,+BAA+B,GAAG,SAAS,CAW7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,+BAA+B,GAAG,SAAS,EAC1D,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,MAAM,GAAG,SAAS,CAQpB"}
@@ -1,4 +1,5 @@
1
1
  import { type RuntimeEndpointUrls } from '@wildo-ai/platform-core-shared';
2
+ import type { AppServiceDefinition } from '../project-config/shared/service-definitions.schemas';
2
3
  export { buildApplicationRuntimeEndpoints, buildPlatformRuntimeEndpoints, parseRuntimeEndpointsRecord, PlatformApplicationType, PlatformRuntimeEndpointKey, serializeRuntimeEndpointsRecord, } from '@wildo-ai/platform-core-shared';
3
4
  export type { ApplicationRuntimeEndpointsInput, PlatformRuntimeEndpointsInput, RuntimeEndpointUrls, } from '@wildo-ai/platform-core-shared';
4
5
  export declare function buildLocalhostPlatformRuntimeEndpoints(host?: string): Record<string, RuntimeEndpointUrls>;
@@ -10,6 +11,37 @@ export interface LocalhostApplicationRuntimeEndpointsInput {
10
11
  host?: string | undefined;
11
12
  }
12
13
  export declare function buildLocalhostApplicationRuntimeEndpoints(input: LocalhostApplicationRuntimeEndpointsInput): Record<string, RuntimeEndpointUrls>;
14
+ /**
15
+ * Which backend is an application's MAIN backend API — the one its browser-facing
16
+ * surfaces call. The `backendApi` service key when declared, else the first backend
17
+ * row. One rule, used by the CLI's endpoint and ingress derivation and by the public
18
+ * website's local origins, so the three cannot name different backends.
19
+ */
20
+ export declare function selectPrimaryBackendService<TService extends {
21
+ readonly key: string;
22
+ }>(backendServices: readonly TService[]): TService | undefined;
23
+ /** The origins a locally-running application serves its app and its main API on. */
24
+ export interface LocalhostApplicationOrigins {
25
+ /** The `SAAS_APP` frontend, when one declares a port. */
26
+ readonly app?: string | undefined;
27
+ /** The main backend API ({@link selectPrimaryBackendService}), when it declares a port. */
28
+ readonly api?: string | undefined;
29
+ }
30
+ /**
31
+ * The local-development origins of an application's product and API, derived from
32
+ * the `defaultPort` each service already declares in `wildo.saas.config.ts` — the
33
+ * same ports, host and plain-http scheme {@link buildLocalhostApplicationRuntimeEndpoints}
34
+ * advertises, so a local surface that links into the product reaches the process
35
+ * `wildo local dev` actually started.
36
+ *
37
+ * It exists for the public website, which is a separate origin from the product:
38
+ * its CTAs and capture forms must reach `http://localhost:<appPort>` and
39
+ * `http://localhost:<backendPort>` under `astro dev`. Before this, the API origin
40
+ * was a port hardcoded into each site and the app origin had no local form at all,
41
+ * so every "Start free" in local development pointed at a production-shaped host
42
+ * that resolves to nothing.
43
+ */
44
+ export declare function resolveLocalhostApplicationOrigins(services: Readonly<Record<string, Pick<AppServiceDefinition, 'defaultPort' | 'frontendType'>>>, host?: string): LocalhostApplicationOrigins;
13
45
  export declare function buildK8sPlatformRuntimeEndpoints(input: {
14
46
  publicDomain: string;
15
47
  namespace: string;
@@ -62,8 +94,9 @@ export interface K8sApplicationIngressRoutesInput {
62
94
  * the routes match the `runtime.endPoints.publicUrl` that
63
95
  * {@link buildK8sApplicationRuntimeEndpoints} produces (both key public hosts on
64
96
  * `serviceKey`). Coherence is a property of feeding both the SAME `serviceKey`s,
65
- * not automatic — see the divergence guards in the domain plan. The internal-only
66
- * APIs (health/webhook/oauth/mcp) are deliberately NOT routed publicly.
97
+ * not automatic — see the divergence guards in the domain plan. Health, webhooks,
98
+ * the OAuth provider and MCP are routes on the backend's own port, so they reach
99
+ * the public host through the backend API route like any other path (#1783).
67
100
  */
68
101
  export declare function buildK8sApplicationIngressRoutes(input: K8sApplicationIngressRoutesInput): K8sIngressRoute[];
69
102
  /**
@@ -89,7 +122,7 @@ export interface RemoteApplicationRuntimeEndpointsCommon {
89
122
  technicalDocumentationServiceKey?: string | undefined;
90
123
  /** Backend API `config.services.<key>` (host resolution key). */
91
124
  mainBackendApiServiceKey?: string | undefined;
92
- /** Backend API container port (internal URL + the -1..-4 sibling API ports). */
125
+ /** Backend API container port — the one port the backend process binds (its internal URL). */
93
126
  mainBackendApiPort?: number | undefined;
94
127
  }
95
128
  export interface K8sApplicationRuntimeEndpointsInput extends RemoteApplicationRuntimeEndpointsCommon {
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-topology.contracts.d.ts","sourceRoot":"","sources":["../../../src/bootstrap/runtime-topology.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EACzB,MAAM,gCAAgC,CAAC;AASxC,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AAExC,YAAY,EACV,gCAAgC,EAChC,6BAA6B,EAC7B,mBAAmB,GACpB,MAAM,gCAAgC,CAAC;AAExC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H,MAAM,WAAW,uCAAuC;IACtD,qEAAqE;IACrE,YAAY,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACjD;;;;OAIG;IACH,SAAS,EAAE,aAAa,CAAC,yBAAyB,CAAC,CAAC;IACpD,sFAAsF;IACtF,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,gGAAgG;IAChG,gCAAgC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtD,iEAAiE;IACjE,wBAAwB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,8FAA8F;IAC9F,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACzC;AAED,MAAM,WAAW,mCAAoC,SAAQ,uCAAuC;IAClG,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,uCAAwC,SAAQ,uCAAuC;IACtG;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AA+DD;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,KAAK,EAAE,mCAAmC,GACzC,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAIrC;AAED;;;;;;;GAOG;AACH,wBAAgB,uCAAuC,CACrD,KAAK,EAAE,uCAAuC,GAC7C,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAErC"}
@@ -1,6 +1,7 @@
1
1
  import { buildApplicationRuntimeEndpoints, buildPlatformRuntimeEndpoints, } from '@wildo-ai/platform-core-shared';
2
2
  import { buildK8sInternalUrl, buildK8sPublicUrl, buildServicePublicHost, buildServicePublicUrl, } from '../project-config/shared/k8s-utils.js';
3
3
  import { PLATFORM_DEFAULT_PORTS } from '../project-config/shared/infrastructure-defaults.schemas.js';
4
+ import { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';
4
5
  export { buildApplicationRuntimeEndpoints, buildPlatformRuntimeEndpoints, parseRuntimeEndpointsRecord, PlatformApplicationType, PlatformRuntimeEndpointKey, serializeRuntimeEndpointsRecord, } from '@wildo-ai/platform-core-shared';
5
6
  export function buildLocalhostPlatformRuntimeEndpoints(host = 'localhost') {
6
7
  const buildUrl = (port) => ({
@@ -46,14 +47,40 @@ export function buildLocalhostApplicationRuntimeEndpoints(input) {
46
47
  ...(input.mainBackendApiPort
47
48
  ? {
48
49
  mainBackendApi: buildUrl(input.mainBackendApiPort),
49
- healthCheckApi: buildUrl(input.mainBackendApiPort - 1),
50
- mainWebhookApi: buildUrl(input.mainBackendApiPort - 2),
51
- oauth2ProviderApi: buildUrl(input.mainBackendApiPort - 3),
52
- mcpApi: buildUrl(input.mainBackendApiPort - 4),
53
50
  }
54
51
  : {}),
55
52
  });
56
53
  }
54
+ /**
55
+ * Which backend is an application's MAIN backend API — the one its browser-facing
56
+ * surfaces call. The `backendApi` service key when declared, else the first backend
57
+ * row. One rule, used by the CLI's endpoint and ingress derivation and by the public
58
+ * website's local origins, so the three cannot name different backends.
59
+ */
60
+ export function selectPrimaryBackendService(backendServices) {
61
+ return backendServices.find((backend) => backend.key === 'backendApi') ?? backendServices[0];
62
+ }
63
+ /**
64
+ * The local-development origins of an application's product and API, derived from
65
+ * the `defaultPort` each service already declares in `wildo.saas.config.ts` — the
66
+ * same ports, host and plain-http scheme {@link buildLocalhostApplicationRuntimeEndpoints}
67
+ * advertises, so a local surface that links into the product reaches the process
68
+ * `wildo local dev` actually started.
69
+ *
70
+ * It exists for the public website, which is a separate origin from the product:
71
+ * its CTAs and capture forms must reach `http://localhost:<appPort>` and
72
+ * `http://localhost:<backendPort>` under `astro dev`. Before this, the API origin
73
+ * was a port hardcoded into each site and the app origin had no local form at all,
74
+ * so every "Start free" in local development pointed at a production-shaped host
75
+ * that resolves to nothing.
76
+ */
77
+ export function resolveLocalhostApplicationOrigins(services, host = 'localhost') {
78
+ const rows = Object.entries(services).map(([key, service]) => ({ key, ...service }));
79
+ const primaryBackend = selectPrimaryBackendService(rows.filter((row) => row.frontendType === undefined));
80
+ const saasApp = rows.find((row) => row.frontendType === AppFrontendType.SAAS_APP);
81
+ const originOf = (port) => (port === undefined ? undefined : `http://${host}:${port}`);
82
+ return { app: originOf(saasApp?.defaultPort), api: originOf(primaryBackend?.defaultPort) };
83
+ }
57
84
  export function buildK8sPlatformRuntimeEndpoints(input) {
58
85
  return buildPlatformRuntimeEndpoints({
59
86
  appsManager: {
@@ -77,8 +104,9 @@ export function buildK8sPlatformRuntimeEndpoints(input) {
77
104
  * the routes match the `runtime.endPoints.publicUrl` that
78
105
  * {@link buildK8sApplicationRuntimeEndpoints} produces (both key public hosts on
79
106
  * `serviceKey`). Coherence is a property of feeding both the SAME `serviceKey`s,
80
- * not automatic — see the divergence guards in the domain plan. The internal-only
81
- * APIs (health/webhook/oauth/mcp) are deliberately NOT routed publicly.
107
+ * not automatic — see the divergence guards in the domain plan. Health, webhooks,
108
+ * the OAuth provider and MCP are routes on the backend's own port, so they reach
109
+ * the public host through the backend API route like any other path (#1783).
82
110
  */
83
111
  export function buildK8sApplicationIngressRoutes(input) {
84
112
  const host = (serviceKey) => buildServicePublicHost({ serviceKey, serviceHosts: input.serviceHosts, publicDomain: input.publicDomain });
@@ -121,8 +149,8 @@ export function buildK8sApplicationIngressRoutes(input) {
121
149
  * from {@link buildServicePublicUrl} (so ingress hosts, `runtime.endPoints.publicUrl`,
122
150
  * and CORS all agree — greenfield, no multi-tenant fan-out). INTERNAL URLs are
123
151
  * supplied by `internalUrlFor` (cluster-DNS for k8s, container DNS for compose).
124
- * The health/webhook/oauth/mcp APIs are internal only — their `publicUrl` is the
125
- * internal URL (never publicly routed).
152
+ * The backend declares ONE endpoint: health, webhooks, the OAuth provider and MCP
153
+ * are routes on its port, not sibling listeners (#1783).
126
154
  */
127
155
  function buildRemoteApplicationRuntimeEndpoints(input, internalUrlFor) {
128
156
  const { publicDomain, serviceHosts } = input;
@@ -162,11 +190,6 @@ function buildRemoteApplicationRuntimeEndpoints(input, internalUrlFor) {
162
190
  publicUrl: pub(mainBackendApiServiceKey),
163
191
  internalUrl: internal(mainBackendApiPort),
164
192
  },
165
- // Internal-only APIs — never publicly routed (publicUrl === internal).
166
- healthCheckApi: { publicUrl: internal(mainBackendApiPort - 1), internalUrl: internal(mainBackendApiPort - 1) },
167
- mainWebhookApi: { publicUrl: internal(mainBackendApiPort - 2), internalUrl: internal(mainBackendApiPort - 2) },
168
- oauth2ProviderApi: { publicUrl: internal(mainBackendApiPort - 3), internalUrl: internal(mainBackendApiPort - 3) },
169
- mcpApi: { publicUrl: internal(mainBackendApiPort - 4), internalUrl: internal(mainBackendApiPort - 4) },
170
193
  }
171
194
  : {}),
172
195
  });
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-topology.contracts.js","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-topology.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,6BAA6B,GAE9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAElG,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AAQxC,MAAM,UAAU,sCAAsC,CACpD,OAAe,WAAW;IAE1B,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAuB,EAAE,CAAC,CAAC;QACvD,SAAS,EAAE,UAAU,IAAI,IAAI,IAAI,EAAE;QACnC,WAAW,EAAE,UAAU,IAAI,IAAI,IAAI,EAAE;KACtC,CAAC,CAAC;IAEH,OAAO,6BAA6B,CAAC;QACnC,WAAW,EAAE,QAAQ,CAAC,sBAAs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BAAkB,GAAG,CAAC,CAAC,EAAE;gBACjH,MAAM,EAAE,EAAE,SAAS,EAAE,QAAQ,CAAC,kBAAkB,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,QAAQ,CAAC,kBAAkB,GAAG,CAAC,CAAC,EAAE;aACvG;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mCAAmC,CACjD,KAA0C;IAE1C,OAAO,sCAAsC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAC5D,mBAAmB,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CACjE,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uCAAuC,CACrD,KAA8C;IAE9C,OAAO,sCAAsC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,KAAK,CAAC,cAAc,IAAI,IAAI,EAAE,CAAC,CAAC;AAC3G,CAAC","sourcesContent":["import {\n buildApplicationRuntimeEndpoints,\n buildPlatformRuntimeEndpoints,\n type RuntimeEndpointUrls,\n} from '@wildo-ai/platform-core-shared';\nimport {\n buildK8sInternalUrl,\n buildK8sPublicUrl,\n buildServicePublicHost,\n buildServicePublicUrl,\n} from '../project-config/shared/k8s-utils';\nimport { PLATFORM_DEFAULT_PORTS } from '../project-config/shared/infrastructure-defaults.schemas';\n\nexport {\n buildApplicationRuntimeEndpoints,\n buildPlatformRuntimeEndpoints,\n parseRuntimeEndpointsRecord,\n PlatformApplicationType,\n PlatformRuntimeEndpointKey,\n serializeRuntimeEndpointsRecord,\n} from '@wildo-ai/platform-core-shared';\n\nexport type {\n ApplicationRuntimeEndpointsInput,\n PlatformRuntimeEndpointsInput,\n RuntimeEndpointUrls,\n} from '@wildo-ai/platform-core-shared';\n\nexport function buildLocalhostPlatformRuntimeEndpoints(\n host: string = 'localhost',\n): Record<string, RuntimeEndpointUrls> {\n const buildUrl = (port: number): RuntimeEndpointUrls => ({\n publicUrl: `http://${host}:${port}`,\n internalUrl: `http://${host}:${port}`,\n });\n\n return buildPlatformRuntimeEndpoints({\n appsManager: buildUrl(PLATFORM_DEFAULT_PORTS.APPS_MANAGER),\n crontabsBatchesManager: buildUrl(PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER),\n moduleRegistry: buildUrl(PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY),\n });\n}\n\nexport interface LocalhostApplicationRuntimeEndpointsInput {\n mainBackendApiPort?: number | undefined;\n frontendApplicationPorts?: Record<string, number> | undefined;\n websitePort?: number | undefined;\n technicalDocumentationPort?: number | undefined;\n host?: string | undefined;\n}\n\nexport function buildLocalhostApplicationRuntimeEndpoints(\n input: LocalhostApplicationRuntimeEndpointsInput,\n): Record<string, RuntimeEndpointUrls> {\n const host = input.host ?? 'localhost';\n /**\n * Local endpoints are plain http, publicly and internally, and there is no knob.\n *\n * A configurable local scheme existed until 2026-08-14 and was removed: it applied ONE scheme to\n * EVERY endpoint's own port, which is only correct when a single ingress fronts them all. Local\n * Docker Compose has none, so declaring https made `main_backend_api.publicUrl` name a port that\n * held no certificate, and every browser session died on its WebSocket readiness poll.\n *\n * Remote is unaffected and always was: `buildServicePublicUrl` hardcodes `https://` because TLS\n * terminates at Traefik/nginx in front of one origin, where a single scheme IS true for every\n * endpoint. That is the only place the question has a well-defined answer, and it never consulted\n * this input.\n */\n const buildUrl = (port: number): RuntimeEndpointUrls => ({\n publicUrl: `http://${host}:${port}`,\n internalUrl: `http://${host}:${port}`,\n });\n\n return buildApplicationRuntimeEndpoints({\n frontendApplications: input.frontendApplicationPorts\n ? Object.fromEntries(\n Object.entries(input.frontendApplicationPorts).map(([frontendServiceName, port]) => [\n frontendServiceName,\n buildUrl(port),\n ]),\n )\n : undefined,\n ...(input.websitePort ? { website: buildUrl(input.websitePort) } : {}),\n ...(input.technicalDocumentationPort\n ? { technicalDocumentation: buildUrl(input.technicalDocumentationPort) }\n : {}),\n ...(input.mainBackendApiPort\n ? {\n mainBackendApi: buildUrl(input.mainBackendApiPort),\n healthCheckApi: buildUrl(input.mainBackendApiPort - 1),\n mainWebhookApi: buildUrl(input.mainBackendApiPort - 2),\n oauth2ProviderApi: buildUrl(input.mainBackendApiPort - 3),\n mcpApi: buildUrl(input.mainBackendApiPort - 4),\n }\n : {}),\n });\n}\n\nexport function buildK8sPlatformRuntimeEndpoints(input: {\n publicDomain: string;\n namespace: string;\n}): Record<string, RuntimeEndpointUrls> {\n return buildPlatformRuntimeEndpoints({\n appsManager: {\n publicUrl: buildK8sPublicUrl('platform-apps-manager', input.publicDomain),\n internalUrl: buildK8sInternalUrl('platform-apps-manager', PLATFORM_DEFAULT_PORTS.APPS_MANAGER, input.namespace),\n },\n crontabsBatchesManager: {\n publicUrl: buildK8sPublicUrl('platform-crontabs-batches-manager', input.publicDomain),\n internalUrl: buildK8sInternalUrl('platform-crontabs-batches-manager', PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER, input.namespace),\n },\n moduleRegistry: {\n publicUrl: buildK8sPublicUrl('platform-module-registry', input.publicDomain),\n internalUrl: buildK8sInternalUrl('platform-module-registry', PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY, input.namespace),\n },\n });\n}\n\nexport interface K8sIngressRoute {\n /** Public hostname Traefik/ingress routes on (from the serviceHosts resolver). */\n host: string;\n /**\n * Per-service k8s Service NAME this host routes to. In the per-service deploy\n * model each service is its OWN Deployment+Service, so the route target is the\n * service's `serviceName` (e.g. `wonder-todos-backend-api`, `wonder-todos-app`)\n * — NOT one shared app Service. This is the value stamped into the ingress\n * rule's `backend.service.name`.\n */\n serviceName: string;\n /** Port on that per-service Service to route this host to. */\n port: number;\n}\n\n/**\n * One public frontend in the app's service topology. `serviceName` and\n * `serviceKey` are DECOUPLED on purpose:\n * - `serviceName` — the `runtime.endPoints` map key (the consumer contract:\n * `lookupFrontendPublicUrl` / X-Frontend-Service-Name key by serviceName).\n * - `serviceKey` — the `config.services.<key>`, which is the serviceHosts\n * authoring key. The public HOST resolves from THIS, never from serviceName.\n * Conflating them silently ignores authored `serviceHosts` (the serviceName\n * `wonder-todos-app` misses the authored `app` entry).\n */\nexport interface ApplicationPublicFrontend {\n serviceName: string;\n serviceKey: string;\n port: number;\n}\n\nexport interface K8sApplicationIngressRoutesInput {\n publicDomain: string;\n serviceHosts: Record<string, string> | undefined;\n /** Public frontends. Host resolves from `serviceKey` (config key); route target is the frontend's own `serviceName`. */\n frontends: ReadonlyArray<ApplicationPublicFrontend>;\n /** Backend API `config.services.<key>` (host resolution key). */\n mainBackendApiServiceKey?: string | undefined;\n /** Backend API per-service k8s Service name (the ingress route target). */\n mainBackendApiServiceName?: string | undefined;\n /** Backend API Service port. */\n mainBackendApiPort?: number | undefined;\n}\n\n/**\n * Ingress routes for the app's PUBLIC services (every frontend + the main\n * backend API), serviceHosts-driven. Every host resolves from the service's\n * `config.services.<key>` (`serviceKey`) — so GIVEN THE SAME frontends/keys,\n * the routes match the `runtime.endPoints.publicUrl` that\n * {@link buildK8sApplicationRuntimeEndpoints} produces (both key public hosts on\n * `serviceKey`). Coherence is a property of feeding both the SAME `serviceKey`s,\n * not automatic — see the divergence guards in the domain plan. The internal-only\n * APIs (health/webhook/oauth/mcp) are deliberately NOT routed publicly.\n */\nexport function buildK8sApplicationIngressRoutes(\n input: K8sApplicationIngressRoutesInput,\n): K8sIngressRoute[] {\n const host = (serviceKey: string): string =>\n buildServicePublicHost({ serviceKey, serviceHosts: input.serviceHosts, publicDomain: input.publicDomain });\n\n const entries: Array<{ serviceKey: string; serviceName: string; host: string; port: number }> =\n input.frontends.map((f) => ({\n serviceKey: f.serviceKey,\n serviceName: f.serviceName,\n host: host(f.serviceKey),\n port: f.port,\n }));\n if (\n input.mainBackendApiServiceKey !== undefined &&\n input.mainBackendApiServiceName !== undefined &&\n input.mainBackendApiPort !== undefined\n ) {\n entries.push({\n serviceKey: input.mainBackendApiServiceKey,\n serviceName: input.mainBackendApiServiceName,\n host: host(input.mainBackendApiServiceKey),\n port: input.mainBackendApiPort,\n });\n }\n\n // Fail-closed host-uniqueness guard: each public host routes entirely to ONE\n // service:port (no path-based sharing), so two distinct services resolving to\n // the same host — e.g. both authored to the apex (`''`), or an unauthored key\n // that collides with an authored subdomain — is an ambiguous, silently-broken\n // ingress. Reject it at build time with the colliding keys named, rather than\n // emitting a manifest whose routing is undefined.\n const claimedBy = new Map<string, string>();\n for (const entry of entries) {\n const existing = claimedBy.get(entry.host);\n if (existing !== undefined && existing !== entry.serviceKey) {\n throw new Error(\n `serviceHosts collision: services '${existing}' and '${entry.serviceKey}' both resolve to public host '${entry.host}'. ` +\n `Each service needs a distinct 'serviceHosts' subdomain (only one service may map to the apex '').`,\n );\n }\n claimedBy.set(entry.host, entry.serviceKey);\n }\n\n return entries.map(({ host: h, serviceName, port }) => ({ host: h, serviceName, port }));\n}\n\n/**\n * Fields shared by every REMOTE runtime-endpoints builder (k8s + compose). The\n * PUBLIC side (serviceHosts resolution) is runtime-agnostic; only the INTERNAL\n * URL form differs, injected via the `internalUrlFor` callback of the core\n * builder ({@link buildRemoteApplicationRuntimeEndpoints}).\n */\nexport interface RemoteApplicationRuntimeEndpointsCommon {\n /** Operator's public domain (`WildoInfraEnvConfig.publicDomain`). */\n publicDomain: string;\n /** Authored per-service subdomain map (`wildo.infra.<env>.config.ts`). */\n serviceHosts: Record<string, string> | undefined;\n /**\n * Public frontends. The `runtime.endPoints` map is keyed by each frontend's\n * `serviceName` (consumer contract); the public HOST resolves from its\n * `serviceKey` (config key / serviceHosts key). See {@link ApplicationPublicFrontend}.\n */\n frontends: ReadonlyArray<ApplicationPublicFrontend>;\n /** `serviceKey` of the STATIC_WEBSITE frontend (feeds the fixed website endpoint). */\n websiteServiceKey?: string | undefined;\n /** `serviceKey` of the TECH_DOC frontend (feeds the fixed technical-documentation endpoint). */\n technicalDocumentationServiceKey?: string | undefined;\n /** Backend API `config.services.<key>` (host resolution key). */\n mainBackendApiServiceKey?: string | undefined;\n /** Backend API container port (internal URL + the -1..-4 sibling API ports). */\n mainBackendApiPort?: number | undefined;\n}\n\nexport interface K8sApplicationRuntimeEndpointsInput extends RemoteApplicationRuntimeEndpointsCommon {\n /** K8s namespace for cluster-internal service DNS. */\n namespace: string;\n /**\n * K8s Service name for cluster-internal URLs. Single Service per app (all\n * frontends + APIs ride it on different ports), so this is the app's own\n * service name (= its slug).\n */\n appServiceName: string;\n}\n\nexport interface ComposeApplicationRuntimeEndpointsInput extends RemoteApplicationRuntimeEndpointsCommon {\n /**\n * Compose service (container) name for internal URLs. Single container per\n * app serving all frontends + APIs on their ports, reachable by other\n * containers on the shared network as `http://<appServiceName>:<port>`.\n */\n appServiceName: string;\n}\n\n/**\n * Core REMOTE application runtime-endpoints assembly, shared by the k8s and\n * compose builders so their public-URL semantics never drift. PUBLIC URLs come\n * from {@link buildServicePublicUrl} (so ingress hosts, `runtime.endPoints.publicUrl`,\n * and CORS all agree — greenfield, no multi-tenant fan-out). INTERNAL URLs are\n * supplied by `internalUrlFor` (cluster-DNS for k8s, container DNS for compose).\n * The health/webhook/oauth/mcp APIs are internal only — their `publicUrl` is the\n * internal URL (never publicly routed).\n */\nfunction buildRemoteApplicationRuntimeEndpoints(\n input: RemoteApplicationRuntimeEndpointsCommon,\n internalUrlFor: (port: number) => string,\n): Record<string, RuntimeEndpointUrls> {\n const { publicDomain, serviceHosts } = input;\n const pub = (serviceKey: string): string =>\n buildServicePublicUrl({ serviceKey, serviceHosts, publicDomain });\n const internal = internalUrlFor;\n\n // Map key = serviceName (consumer contract: lookupFrontendPublicUrl keys by\n // serviceName); public host = serviceKey (serviceHosts key). Decoupled.\n const frontendApplications = input.frontends.length > 0\n ? Object.fromEntries(\n input.frontends.map((f) => [\n f.serviceName,\n { publicUrl: pub(f.serviceKey), internalUrl: internal(f.port) },\n ]),\n )\n : undefined;\n\n const websiteFrontend = input.websiteServiceKey\n ? input.frontends.find((f) => f.serviceKey === input.websiteServiceKey)\n : undefined;\n const docsFrontend = input.technicalDocumentationServiceKey\n ? input.frontends.find((f) => f.serviceKey === input.technicalDocumentationServiceKey)\n : undefined;\n const { mainBackendApiServiceKey, mainBackendApiPort } = input;\n\n return buildApplicationRuntimeEndpoints({\n frontendApplications,\n ...(websiteFrontend\n ? { website: { publicUrl: pub(websiteFrontend.serviceKey), internalUrl: internal(websiteFrontend.port) } }\n : {}),\n ...(docsFrontend\n ? {\n technicalDocumentation: {\n publicUrl: pub(docsFrontend.serviceKey),\n internalUrl: internal(docsFrontend.port),\n },\n }\n : {}),\n ...(mainBackendApiServiceKey !== undefined && mainBackendApiPort !== undefined\n ? {\n mainBackendApi: {\n publicUrl: pub(mainBackendApiServiceKey),\n internalUrl: internal(mainBackendApiPort),\n },\n // Internal-only APIs — never publicly routed (publicUrl === internal).\n healthCheckApi: { publicUrl: internal(mainBackendApiPort - 1), internalUrl: internal(mainBackendApiPort - 1) },\n mainWebhookApi: { publicUrl: internal(mainBackendApiPort - 2), internalUrl: internal(mainBackendApiPort - 2) },\n oauth2ProviderApi: { publicUrl: internal(mainBackendApiPort - 3), internalUrl: internal(mainBackendApiPort - 3) },\n mcpApi: { publicUrl: internal(mainBackendApiPort - 4), internalUrl: internal(mainBackendApiPort - 4) },\n }\n : {}),\n });\n}\n\n/**\n * Build K8s application runtime endpoints — the self-hosted, single-app,\n * `serviceHosts`-driven counterpart to {@link buildLocalhostApplicationRuntimeEndpoints}.\n * INTERNAL URLs are the app's own cluster-DNS Service on each port.\n */\nexport function buildK8sApplicationRuntimeEndpoints(\n input: K8sApplicationRuntimeEndpointsInput,\n): Record<string, RuntimeEndpointUrls> {\n return buildRemoteApplicationRuntimeEndpoints(input, (port) =>\n buildK8sInternalUrl(input.appServiceName, port, input.namespace),\n );\n}\n\n/**\n * Build Docker-Compose application runtime endpoints — the compose counterpart\n * of {@link buildK8sApplicationRuntimeEndpoints}. PUBLIC URLs are IDENTICAL\n * (serviceHosts-driven, so the Traefik ingress routes and `runtime.endPoints`\n * agree — the CORS invariant holds for compose too). INTERNAL URLs are the app\n * container's own name on the shared compose network (`http://<appServiceName>:<port>`),\n * NOT localhost — the remote compose stack must not advertise localhost topology.\n */\nexport function buildComposeApplicationRuntimeEndpoints(\n input: ComposeApplicationRuntimeEndpointsInput,\n): Record<string, RuntimeEndpointUrls> {\n return buildRemoteApplicationRuntimeEndpoints(input, (port) => `http://${input.appServiceName}:${port}`);\n}\n"]}
1
+ {"version":3,"file":"runtime-topology.contracts.js","sourceRoot":"","sources":["../../../../src/bootstrap/runtime-topology.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,6BAA6B,GAE9B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,0DAA0D,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAGvE,OAAO,EACL,gCAAgC,EAChC,6BAA6B,EAC7B,2BAA2B,EAC3B,uBAAuB,EACvB,0BAA0B,EAC1B,+BAA+B,GAChC,MAAM,gCAAgC,CAAC;AAQxC,MAAM,UAAU,sCAAsC,CACpD,OAAe,WAAW;IAE1B,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAuB,EAAE,CAAC,CAAC;QACvD,SAAS,EAAE,UAAU,IAAI,IAAI,IAAI,EAAE;QACnC,WAAW,EAAE,UAAU,IAAI,IAAI,IAAI,EAAE;KACtC,CAAC,CAAC;IAEH,OAAO,6BAA6B,CAAC;QACnC,WAAW,EAAE,QAAQ,CAAC,sBAAsB,CAAC,YAAY,CAAC;QAC1D,sBAAsB,EAAE,QAAQ,CAAC,sBAAsB,CAAC,wBAAwB,CAAC;QACjF,cAAc,EAAE,QAAQ,CAAC,sBAAsB,CAAC,eAAe,CAAC;KACjE,CAAC,CAAC;AACL,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,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,wBAAwB,KAAK,SAAS,IAAI,kBAAkB,KAAK,SAAS;YAC5E,CAAC,CAAC;gBACE,cAAc,EAAE;oBACd,SAAS,EAAE,GAAG,CAAC,wBAAwB,CAAC;oBACxC,WAAW,EAAE,QAAQ,CAAC,kBAAkB,CAAC;iBAC1C;aACF;YACH,CAAC,CAAC,EAAE,CAAC;KACR,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,mCAAmC,CACjD,KAA0C;IAE1C,OAAO,sCAAsC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAC5D,mBAAmB,CAAC,KAAK,CAAC,cAAc,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,CACjE,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uCAAuC,CACrD,KAA8C;IAE9C,OAAO,sCAAsC,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,KAAK,CAAC,cAAc,IAAI,IAAI,EAAE,CAAC,CAAC;AAC3G,CAAC","sourcesContent":["import {\n buildApplicationRuntimeEndpoints,\n buildPlatformRuntimeEndpoints,\n type RuntimeEndpointUrls,\n} from '@wildo-ai/platform-core-shared';\nimport {\n buildK8sInternalUrl,\n buildK8sPublicUrl,\n buildServicePublicHost,\n buildServicePublicUrl,\n} from '../project-config/shared/k8s-utils';\nimport { PLATFORM_DEFAULT_PORTS } from '../project-config/shared/infrastructure-defaults.schemas';\nimport { AppFrontendType } from '@wildo-ai/saas-models/public-runtime';\nimport type { AppServiceDefinition } from '../project-config/shared/service-definitions.schemas';\n\nexport {\n buildApplicationRuntimeEndpoints,\n buildPlatformRuntimeEndpoints,\n parseRuntimeEndpointsRecord,\n PlatformApplicationType,\n PlatformRuntimeEndpointKey,\n serializeRuntimeEndpointsRecord,\n} from '@wildo-ai/platform-core-shared';\n\nexport type {\n ApplicationRuntimeEndpointsInput,\n PlatformRuntimeEndpointsInput,\n RuntimeEndpointUrls,\n} from '@wildo-ai/platform-core-shared';\n\nexport function buildLocalhostPlatformRuntimeEndpoints(\n host: string = 'localhost',\n): Record<string, RuntimeEndpointUrls> {\n const buildUrl = (port: number): RuntimeEndpointUrls => ({\n publicUrl: `http://${host}:${port}`,\n internalUrl: `http://${host}:${port}`,\n });\n\n return buildPlatformRuntimeEndpoints({\n appsManager: buildUrl(PLATFORM_DEFAULT_PORTS.APPS_MANAGER),\n crontabsBatchesManager: buildUrl(PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER),\n moduleRegistry: buildUrl(PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY),\n });\n}\n\nexport interface LocalhostApplicationRuntimeEndpointsInput {\n mainBackendApiPort?: number | undefined;\n frontendApplicationPorts?: Record<string, number> | undefined;\n websitePort?: number | undefined;\n technicalDocumentationPort?: number | undefined;\n host?: string | undefined;\n}\n\nexport function buildLocalhostApplicationRuntimeEndpoints(\n input: LocalhostApplicationRuntimeEndpointsInput,\n): Record<string, RuntimeEndpointUrls> {\n const host = input.host ?? 'localhost';\n /**\n * Local endpoints are plain http, publicly and internally, and there is no knob.\n *\n * A configurable local scheme existed until 2026-08-14 and was removed: it applied ONE scheme to\n * EVERY endpoint's own port, which is only correct when a single ingress fronts them all. Local\n * Docker Compose has none, so declaring https made `main_backend_api.publicUrl` name a port that\n * held no certificate, and every browser session died on its WebSocket readiness poll.\n *\n * Remote is unaffected and always was: `buildServicePublicUrl` hardcodes `https://` because TLS\n * terminates at Traefik/nginx in front of one origin, where a single scheme IS true for every\n * endpoint. That is the only place the question has a well-defined answer, and it never consulted\n * this input.\n */\n const buildUrl = (port: number): RuntimeEndpointUrls => ({\n publicUrl: `http://${host}:${port}`,\n internalUrl: `http://${host}:${port}`,\n });\n\n return buildApplicationRuntimeEndpoints({\n frontendApplications: input.frontendApplicationPorts\n ? Object.fromEntries(\n Object.entries(input.frontendApplicationPorts).map(([frontendServiceName, port]) => [\n frontendServiceName,\n buildUrl(port),\n ]),\n )\n : undefined,\n ...(input.websitePort ? { website: buildUrl(input.websitePort) } : {}),\n ...(input.technicalDocumentationPort\n ? { technicalDocumentation: buildUrl(input.technicalDocumentationPort) }\n : {}),\n ...(input.mainBackendApiPort\n ? {\n mainBackendApi: buildUrl(input.mainBackendApiPort),\n }\n : {}),\n });\n}\n\n/**\n * Which backend is an application's MAIN backend API — the one its browser-facing\n * surfaces call. The `backendApi` service key when declared, else the first backend\n * row. One rule, used by the CLI's endpoint and ingress derivation and by the public\n * website's local origins, so the three cannot name different backends.\n */\nexport function selectPrimaryBackendService<TService extends { readonly key: string }>(\n backendServices: readonly TService[],\n): TService | undefined {\n return backendServices.find((backend) => backend.key === 'backendApi') ?? backendServices[0];\n}\n\n/** The origins a locally-running application serves its app and its main API on. */\nexport interface LocalhostApplicationOrigins {\n /** The `SAAS_APP` frontend, when one declares a port. */\n readonly app?: string | undefined;\n /** The main backend API ({@link selectPrimaryBackendService}), when it declares a port. */\n readonly api?: string | undefined;\n}\n\n/**\n * The local-development origins of an application's product and API, derived from\n * the `defaultPort` each service already declares in `wildo.saas.config.ts` — the\n * same ports, host and plain-http scheme {@link buildLocalhostApplicationRuntimeEndpoints}\n * advertises, so a local surface that links into the product reaches the process\n * `wildo local dev` actually started.\n *\n * It exists for the public website, which is a separate origin from the product:\n * its CTAs and capture forms must reach `http://localhost:<appPort>` and\n * `http://localhost:<backendPort>` under `astro dev`. Before this, the API origin\n * was a port hardcoded into each site and the app origin had no local form at all,\n * so every \"Start free\" in local development pointed at a production-shaped host\n * that resolves to nothing.\n */\nexport function resolveLocalhostApplicationOrigins(\n services: Readonly<Record<string, Pick<AppServiceDefinition, 'defaultPort' | 'frontendType'>>>,\n host = 'localhost',\n): LocalhostApplicationOrigins {\n const rows = Object.entries(services).map(([key, service]) => ({ key, ...service }));\n const primaryBackend = selectPrimaryBackendService(rows.filter((row) => row.frontendType === undefined));\n const saasApp = rows.find((row) => row.frontendType === AppFrontendType.SAAS_APP);\n const originOf = (port: number | undefined): string | undefined => (port === undefined ? undefined : `http://${host}:${port}`);\n return { app: originOf(saasApp?.defaultPort), api: originOf(primaryBackend?.defaultPort) };\n}\n\nexport function buildK8sPlatformRuntimeEndpoints(input: {\n publicDomain: string;\n namespace: string;\n}): Record<string, RuntimeEndpointUrls> {\n return buildPlatformRuntimeEndpoints({\n appsManager: {\n publicUrl: buildK8sPublicUrl('platform-apps-manager', input.publicDomain),\n internalUrl: buildK8sInternalUrl('platform-apps-manager', PLATFORM_DEFAULT_PORTS.APPS_MANAGER, input.namespace),\n },\n crontabsBatchesManager: {\n publicUrl: buildK8sPublicUrl('platform-crontabs-batches-manager', input.publicDomain),\n internalUrl: buildK8sInternalUrl('platform-crontabs-batches-manager', PLATFORM_DEFAULT_PORTS.CRONTABS_BATCHES_MANAGER, input.namespace),\n },\n moduleRegistry: {\n publicUrl: buildK8sPublicUrl('platform-module-registry', input.publicDomain),\n internalUrl: buildK8sInternalUrl('platform-module-registry', PLATFORM_DEFAULT_PORTS.MODULE_REGISTRY, input.namespace),\n },\n });\n}\n\nexport interface K8sIngressRoute {\n /** Public hostname Traefik/ingress routes on (from the serviceHosts resolver). */\n host: string;\n /**\n * Per-service k8s Service NAME this host routes to. In the per-service deploy\n * model each service is its OWN Deployment+Service, so the route target is the\n * service's `serviceName` (e.g. `wonder-todos-backend-api`, `wonder-todos-app`)\n * — NOT one shared app Service. This is the value stamped into the ingress\n * rule's `backend.service.name`.\n */\n serviceName: string;\n /** Port on that per-service Service to route this host to. */\n port: number;\n}\n\n/**\n * One public frontend in the app's service topology. `serviceName` and\n * `serviceKey` are DECOUPLED on purpose:\n * - `serviceName` — the `runtime.endPoints` map key (the consumer contract:\n * `lookupFrontendPublicUrl` / X-Frontend-Service-Name key by serviceName).\n * - `serviceKey` — the `config.services.<key>`, which is the serviceHosts\n * authoring key. The public HOST resolves from THIS, never from serviceName.\n * Conflating them silently ignores authored `serviceHosts` (the serviceName\n * `wonder-todos-app` misses the authored `app` entry).\n */\nexport interface ApplicationPublicFrontend {\n serviceName: string;\n serviceKey: string;\n port: number;\n}\n\nexport interface K8sApplicationIngressRoutesInput {\n publicDomain: string;\n serviceHosts: Record<string, string> | undefined;\n /** Public frontends. Host resolves from `serviceKey` (config key); route target is the frontend's own `serviceName`. */\n frontends: ReadonlyArray<ApplicationPublicFrontend>;\n /** Backend API `config.services.<key>` (host resolution key). */\n mainBackendApiServiceKey?: string | undefined;\n /** Backend API per-service k8s Service name (the ingress route target). */\n mainBackendApiServiceName?: string | undefined;\n /** Backend API Service port. */\n mainBackendApiPort?: number | undefined;\n}\n\n/**\n * Ingress routes for the app's PUBLIC services (every frontend + the main\n * backend API), serviceHosts-driven. Every host resolves from the service's\n * `config.services.<key>` (`serviceKey`) — so GIVEN THE SAME frontends/keys,\n * the routes match the `runtime.endPoints.publicUrl` that\n * {@link buildK8sApplicationRuntimeEndpoints} produces (both key public hosts on\n * `serviceKey`). Coherence is a property of feeding both the SAME `serviceKey`s,\n * not automatic — see the divergence guards in the domain plan. Health, webhooks,\n * the OAuth provider and MCP are routes on the backend's own port, so they reach\n * the public host through the backend API route like any other path (#1783).\n */\nexport function buildK8sApplicationIngressRoutes(\n input: K8sApplicationIngressRoutesInput,\n): K8sIngressRoute[] {\n const host = (serviceKey: string): string =>\n buildServicePublicHost({ serviceKey, serviceHosts: input.serviceHosts, publicDomain: input.publicDomain });\n\n const entries: Array<{ serviceKey: string; serviceName: string; host: string; port: number }> =\n input.frontends.map((f) => ({\n serviceKey: f.serviceKey,\n serviceName: f.serviceName,\n host: host(f.serviceKey),\n port: f.port,\n }));\n if (\n input.mainBackendApiServiceKey !== undefined &&\n input.mainBackendApiServiceName !== undefined &&\n input.mainBackendApiPort !== undefined\n ) {\n entries.push({\n serviceKey: input.mainBackendApiServiceKey,\n serviceName: input.mainBackendApiServiceName,\n host: host(input.mainBackendApiServiceKey),\n port: input.mainBackendApiPort,\n });\n }\n\n // Fail-closed host-uniqueness guard: each public host routes entirely to ONE\n // service:port (no path-based sharing), so two distinct services resolving to\n // the same host — e.g. both authored to the apex (`''`), or an unauthored key\n // that collides with an authored subdomain — is an ambiguous, silently-broken\n // ingress. Reject it at build time with the colliding keys named, rather than\n // emitting a manifest whose routing is undefined.\n const claimedBy = new Map<string, string>();\n for (const entry of entries) {\n const existing = claimedBy.get(entry.host);\n if (existing !== undefined && existing !== entry.serviceKey) {\n throw new Error(\n `serviceHosts collision: services '${existing}' and '${entry.serviceKey}' both resolve to public host '${entry.host}'. ` +\n `Each service needs a distinct 'serviceHosts' subdomain (only one service may map to the apex '').`,\n );\n }\n claimedBy.set(entry.host, entry.serviceKey);\n }\n\n return entries.map(({ host: h, serviceName, port }) => ({ host: h, serviceName, port }));\n}\n\n/**\n * Fields shared by every REMOTE runtime-endpoints builder (k8s + compose). The\n * PUBLIC side (serviceHosts resolution) is runtime-agnostic; only the INTERNAL\n * URL form differs, injected via the `internalUrlFor` callback of the core\n * builder ({@link buildRemoteApplicationRuntimeEndpoints}).\n */\nexport interface RemoteApplicationRuntimeEndpointsCommon {\n /** Operator's public domain (`WildoInfraEnvConfig.publicDomain`). */\n publicDomain: string;\n /** Authored per-service subdomain map (`wildo.infra.<env>.config.ts`). */\n serviceHosts: Record<string, string> | undefined;\n /**\n * Public frontends. The `runtime.endPoints` map is keyed by each frontend's\n * `serviceName` (consumer contract); the public HOST resolves from its\n * `serviceKey` (config key / serviceHosts key). See {@link ApplicationPublicFrontend}.\n */\n frontends: ReadonlyArray<ApplicationPublicFrontend>;\n /** `serviceKey` of the STATIC_WEBSITE frontend (feeds the fixed website endpoint). */\n websiteServiceKey?: string | undefined;\n /** `serviceKey` of the TECH_DOC frontend (feeds the fixed technical-documentation endpoint). */\n technicalDocumentationServiceKey?: string | undefined;\n /** Backend API `config.services.<key>` (host resolution key). */\n mainBackendApiServiceKey?: string | undefined;\n /** Backend API container port — the one port the backend process binds (its internal URL). */\n mainBackendApiPort?: number | undefined;\n}\n\nexport interface K8sApplicationRuntimeEndpointsInput extends RemoteApplicationRuntimeEndpointsCommon {\n /** K8s namespace for cluster-internal service DNS. */\n namespace: string;\n /**\n * K8s Service name for cluster-internal URLs. Single Service per app (all\n * frontends + APIs ride it on different ports), so this is the app's own\n * service name (= its slug).\n */\n appServiceName: string;\n}\n\nexport interface ComposeApplicationRuntimeEndpointsInput extends RemoteApplicationRuntimeEndpointsCommon {\n /**\n * Compose service (container) name for internal URLs. Single container per\n * app serving all frontends + APIs on their ports, reachable by other\n * containers on the shared network as `http://<appServiceName>:<port>`.\n */\n appServiceName: string;\n}\n\n/**\n * Core REMOTE application runtime-endpoints assembly, shared by the k8s and\n * compose builders so their public-URL semantics never drift. PUBLIC URLs come\n * from {@link buildServicePublicUrl} (so ingress hosts, `runtime.endPoints.publicUrl`,\n * and CORS all agree — greenfield, no multi-tenant fan-out). INTERNAL URLs are\n * supplied by `internalUrlFor` (cluster-DNS for k8s, container DNS for compose).\n * The backend declares ONE endpoint: health, webhooks, the OAuth provider and MCP\n * are routes on its port, not sibling listeners (#1783).\n */\nfunction buildRemoteApplicationRuntimeEndpoints(\n input: RemoteApplicationRuntimeEndpointsCommon,\n internalUrlFor: (port: number) => string,\n): Record<string, RuntimeEndpointUrls> {\n const { publicDomain, serviceHosts } = input;\n const pub = (serviceKey: string): string =>\n buildServicePublicUrl({ serviceKey, serviceHosts, publicDomain });\n const internal = internalUrlFor;\n\n // Map key = serviceName (consumer contract: lookupFrontendPublicUrl keys by\n // serviceName); public host = serviceKey (serviceHosts key). Decoupled.\n const frontendApplications = input.frontends.length > 0\n ? Object.fromEntries(\n input.frontends.map((f) => [\n f.serviceName,\n { publicUrl: pub(f.serviceKey), internalUrl: internal(f.port) },\n ]),\n )\n : undefined;\n\n const websiteFrontend = input.websiteServiceKey\n ? input.frontends.find((f) => f.serviceKey === input.websiteServiceKey)\n : undefined;\n const docsFrontend = input.technicalDocumentationServiceKey\n ? input.frontends.find((f) => f.serviceKey === input.technicalDocumentationServiceKey)\n : undefined;\n const { mainBackendApiServiceKey, mainBackendApiPort } = input;\n\n return buildApplicationRuntimeEndpoints({\n frontendApplications,\n ...(websiteFrontend\n ? { website: { publicUrl: pub(websiteFrontend.serviceKey), internalUrl: internal(websiteFrontend.port) } }\n : {}),\n ...(docsFrontend\n ? {\n technicalDocumentation: {\n publicUrl: pub(docsFrontend.serviceKey),\n internalUrl: internal(docsFrontend.port),\n },\n }\n : {}),\n ...(mainBackendApiServiceKey !== undefined && mainBackendApiPort !== undefined\n ? {\n mainBackendApi: {\n publicUrl: pub(mainBackendApiServiceKey),\n internalUrl: internal(mainBackendApiPort),\n },\n }\n : {}),\n });\n}\n\n/**\n * Build K8s application runtime endpoints — the self-hosted, single-app,\n * `serviceHosts`-driven counterpart to {@link buildLocalhostApplicationRuntimeEndpoints}.\n * INTERNAL URLs are the app's own cluster-DNS Service on each port.\n */\nexport function buildK8sApplicationRuntimeEndpoints(\n input: K8sApplicationRuntimeEndpointsInput,\n): Record<string, RuntimeEndpointUrls> {\n return buildRemoteApplicationRuntimeEndpoints(input, (port) =>\n buildK8sInternalUrl(input.appServiceName, port, input.namespace),\n );\n}\n\n/**\n * Build Docker-Compose application runtime endpoints — the compose counterpart\n * of {@link buildK8sApplicationRuntimeEndpoints}. PUBLIC URLs are IDENTICAL\n * (serviceHosts-driven, so the Traefik ingress routes and `runtime.endPoints`\n * agree — the CORS invariant holds for compose too). INTERNAL URLs are the app\n * container's own name on the shared compose network (`http://<appServiceName>:<port>`),\n * NOT localhost — the remote compose stack must not advertise localhost topology.\n */\nexport function buildComposeApplicationRuntimeEndpoints(\n input: ComposeApplicationRuntimeEndpointsInput,\n): Record<string, RuntimeEndpointUrls> {\n return buildRemoteApplicationRuntimeEndpoints(input, (port) => `http://${input.appServiceName}:${port}`);\n}\n"]}
@@ -1,3 +1,4 @@
1
+ import { type OrganizationTypesConfig, type UserTypesConfig } from '@wildo-ai/saas-models';
1
2
  /**
2
3
  * The ONE identity of the organization that owns Wildo's own applications.
3
4
  *
@@ -47,6 +48,34 @@ export interface WildoOwnerOrganizationIdentity {
47
48
  readonly slug: string;
48
49
  /** Display name written on first seed. */
49
50
  readonly name: string;
51
+ /** The organization type written on first seed — a key of {@link WILDO_PLATFORM_ORGANIZATION_TYPES}. */
52
+ readonly type: typeof WILDO_PLATFORM_ORGANIZATION_TYPE;
50
53
  }
54
+ /**
55
+ * The user type the platform seeds its first administrator with, and the one its organization type grants.
56
+ *
57
+ * Declared because it was already HELD: the platform's INIT seed gave its first administrator `member` long before
58
+ * the platform declared any user type, and nothing checked the pair until organization types — whose granted user
59
+ * types must be declared — became mandatory (#1032). Registration is DISABLED: a platform user exists because the
60
+ * platform seeded them, never because someone signed up.
61
+ */
62
+ export declare const WILDO_PLATFORM_MEMBER_USER_TYPE = "member";
63
+ export declare const WILDO_PLATFORM_USER_TYPES: UserTypesConfig;
64
+ /**
65
+ * The ONE organization type the platform's own tenancy declares (#1032, decided 2026-09-14).
66
+ *
67
+ * Every organization carries a type that names a declared organization type, because a member of an
68
+ * organization whose type resolves to nothing cannot sign in. An application declares its types in
69
+ * `wildo.saas.config.ts`; the platform has no such file, so its declaration lives here, beside the
70
+ * identity of the organization it types. Before this, the platform seeded its organizations with no
71
+ * type at all, and `wildo_platform` held two of them.
72
+ *
73
+ * It grants {@link WILDO_PLATFORM_MEMBER_USER_TYPE}, the user type the platform's INIT seeds its first administrator
74
+ * with, so the platform's own first-organization derivation resolves to this type rather than refusing — and a
75
+ * configuration carrying this map must carry {@link WILDO_PLATFORM_USER_TYPES} beside it, or its granted user type
76
+ * is undeclared.
77
+ */
78
+ export declare const WILDO_PLATFORM_ORGANIZATION_TYPE = "platform-operator";
79
+ export declare const WILDO_PLATFORM_ORGANIZATION_TYPES: OrganizationTypesConfig;
51
80
  export declare const WILDO_OWNER_ORGANIZATION: WildoOwnerOrganizationIdentity;
52
81
  //# sourceMappingURL=wildo-owner-organization.contracts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wildo-owner-organization.contracts.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/wildo-owner-organization.contracts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,WAAW,8BAA8B;IAC7C,mFAAmF;IACnF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,wBAAwB,EAAE,8BAGtC,CAAC"}
1
+ {"version":3,"file":"wildo-owner-organization.contracts.d.ts","sourceRoot":"","sources":["../../../../src/bootstrap/wildo-owner-organization.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8D,KAAK,uBAAuB,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEvJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,WAAW,8BAA8B;IAC7C,mFAAmF;IACnF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,wGAAwG;IACxG,QAAQ,CAAC,IAAI,EAAE,OAAO,gCAAgC,CAAC;CACxD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B,WAAW,CAAC;AAExD,eAAO,MAAM,yBAAyB,EAAE,eAIvC,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AAEpE,eAAO,MAAM,iCAAiC,EAAE,uBAO/C,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,8BAItC,CAAC"}
@@ -1,5 +1,44 @@
1
+ import { CORE_ORG_ROLES, RegistrationMode, UserTypeDefinitionSchema } from '@wildo-ai/saas-models';
2
+ /**
3
+ * The user type the platform seeds its first administrator with, and the one its organization type grants.
4
+ *
5
+ * Declared because it was already HELD: the platform's INIT seed gave its first administrator `member` long before
6
+ * the platform declared any user type, and nothing checked the pair until organization types — whose granted user
7
+ * types must be declared — became mandatory (#1032). Registration is DISABLED: a platform user exists because the
8
+ * platform seeded them, never because someone signed up.
9
+ */
10
+ export const WILDO_PLATFORM_MEMBER_USER_TYPE = 'member';
11
+ export const WILDO_PLATFORM_USER_TYPES = {
12
+ [WILDO_PLATFORM_MEMBER_USER_TYPE]: UserTypeDefinitionSchema.parse({
13
+ auth: { registration: { mode: RegistrationMode.DISABLED } },
14
+ }),
15
+ };
16
+ /**
17
+ * The ONE organization type the platform's own tenancy declares (#1032, decided 2026-09-14).
18
+ *
19
+ * Every organization carries a type that names a declared organization type, because a member of an
20
+ * organization whose type resolves to nothing cannot sign in. An application declares its types in
21
+ * `wildo.saas.config.ts`; the platform has no such file, so its declaration lives here, beside the
22
+ * identity of the organization it types. Before this, the platform seeded its organizations with no
23
+ * type at all, and `wildo_platform` held two of them.
24
+ *
25
+ * It grants {@link WILDO_PLATFORM_MEMBER_USER_TYPE}, the user type the platform's INIT seeds its first administrator
26
+ * with, so the platform's own first-organization derivation resolves to this type rather than refusing — and a
27
+ * configuration carrying this map must carry {@link WILDO_PLATFORM_USER_TYPES} beside it, or its granted user type
28
+ * is undeclared.
29
+ */
30
+ export const WILDO_PLATFORM_ORGANIZATION_TYPE = 'platform-operator';
31
+ export const WILDO_PLATFORM_ORGANIZATION_TYPES = {
32
+ [WILDO_PLATFORM_ORGANIZATION_TYPE]: {
33
+ userTypes: [WILDO_PLATFORM_MEMBER_USER_TYPE],
34
+ availableOrgRoles: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_MEMBER],
35
+ defaultMemberRole: CORE_ORG_ROLES.ORG_MEMBER,
36
+ authOverrides: undefined,
37
+ },
38
+ };
1
39
  export const WILDO_OWNER_ORGANIZATION = {
2
40
  slug: 'wildo',
3
41
  name: 'Wildo',
42
+ type: WILDO_PLATFORM_ORGANIZATION_TYPE,
4
43
  };
5
44
  //# sourceMappingURL=wildo-owner-organization.contracts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"wildo-owner-organization.contracts.js","sourceRoot":"","sources":["../../../../src/bootstrap/wildo-owner-organization.contracts.ts"],"names":[],"mappings":"AAmDA,MAAM,CAAC,MAAM,wBAAwB,GAAmC;IACtE,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;CACd,CAAC","sourcesContent":["/**\n * The ONE identity of the organization that owns Wildo's own applications.\n *\n * ## Why this constant exists\n *\n * This identity used to be hardcoded FOUR times, in two files, as TWO DIFFERENT VALUES — and the\n * result was a platform carrying two organizations, neither of them a customer:\n *\n * | declared in | value |\n * |---|---|\n * | `init-mode-startup.apps-manager.service.ts` (twice) | `wildo-platform` / `Wildo Platform` |\n * | `maintenance/services/app-initialization.service.ts` (twice) | `wildo` / `Wildo` |\n *\n * The two paths provision different things, so ownership split along them. Measured on the dogfood\n * platform (2026-09-01): `wildo-ai-application` — the bootstrap row — was owned by `wildo-platform`,\n * while `wonder-crm`, `wonder-todos` and `secrets-proof` were owned by `wildo`. Worse, OPERATOR\n * REACH followed the same split: the admin seeded by INIT was `ORG_ADMIN` of BOTH organizations,\n * while an admin seeded later by the maintenance path was a member of `wildo` ONLY. Nothing declared\n * that they should differ; it was decided by which code path happened to run.\n *\n * The bootstrap organization is also `ACTIVE` and authority-conferring, so everything that\n * ENUMERATES tenants — an organization switcher, the owner-floor boot report, a cross-tenant audit,\n * a subject-erasure sweep — counted a bootstrap artifact as a real tenant.\n *\n * ## Why ONE organization rather than two declared ones\n *\n * The second organization was never a design. `seedBootstrapApplicationRecord` needs *an* owner for\n * the minimal APPLICATION row it seeds to break a chicken-and-egg (an APPLICATION-primary-scoped\n * execution context resolves its `applicationId` by READING that row). It needs an owner; it never\n * needed a DIFFERENT one. Wildo owning all Wildo applications — including its own — is the coherent\n * reading, and it is what the duplication suggests was intended before the two literals drifted.\n *\n * If a future decision genuinely wants the platform's own application in a separate tenant, that is\n * a SECOND named constant here plus an explicit statement of which consumers must tell them apart —\n * not a second literal at a call site.\n *\n * ## What this does NOT do\n *\n * It does not retrofit an existing platform. Both bootstrap seeding arms look a row up by business\n * key and insert ONLY when absent, and the registration path prefers an existing application's\n * recorded `ownerOrganizationId` over the seeded id — so an installation that already carries two\n * organizations keeps both, with its existing linkage untouched. Only a FRESH platform gets one.\n * Merging the two on an existing installation is a migration with its own decision.\n */\nexport interface WildoOwnerOrganizationIdentity {\n /** Business key. Both provisioning paths upsert the organization by THIS field. */\n readonly slug: string;\n /** Display name written on first seed. */\n readonly name: string;\n}\n\nexport const WILDO_OWNER_ORGANIZATION: WildoOwnerOrganizationIdentity = {\n slug: 'wildo',\n name: 'Wildo',\n};\n"]}
1
+ {"version":3,"file":"wildo-owner-organization.contracts.js","sourceRoot":"","sources":["../../../../src/bootstrap/wildo-owner-organization.contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,wBAAwB,EAAsD,MAAM,uBAAuB,CAAC;AAuDvJ;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,QAAQ,CAAC;AAExD,MAAM,CAAC,MAAM,yBAAyB,GAAoB;IACxD,CAAC,+BAA+B,CAAC,EAAE,wBAAwB,CAAC,KAAK,CAAC;QAChE,IAAI,EAAE,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,gBAAgB,CAAC,QAAQ,EAAE,EAAE;KAC5D,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;AAEpE,MAAM,CAAC,MAAM,iCAAiC,GAA4B;IACxE,CAAC,gCAAgC,CAAC,EAAE;QAClC,SAAS,EAAE,CAAC,+BAA+B,CAAC;QAC5C,iBAAiB,EAAE,CAAC,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,SAAS,EAAE,cAAc,CAAC,UAAU,CAAC;QAClG,iBAAiB,EAAE,cAAc,CAAC,UAAU;QAC5C,aAAa,EAAE,SAAS;KACzB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAmC;IACtE,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,OAAO;IACb,IAAI,EAAE,gCAAgC;CACvC,CAAC","sourcesContent":["import { CORE_ORG_ROLES, RegistrationMode, UserTypeDefinitionSchema, type OrganizationTypesConfig, type UserTypesConfig } from '@wildo-ai/saas-models';\n\n/**\n * The ONE identity of the organization that owns Wildo's own applications.\n *\n * ## Why this constant exists\n *\n * This identity used to be hardcoded FOUR times, in two files, as TWO DIFFERENT VALUES — and the\n * result was a platform carrying two organizations, neither of them a customer:\n *\n * | declared in | value |\n * |---|---|\n * | `init-mode-startup.apps-manager.service.ts` (twice) | `wildo-platform` / `Wildo Platform` |\n * | `maintenance/services/app-initialization.service.ts` (twice) | `wildo` / `Wildo` |\n *\n * The two paths provision different things, so ownership split along them. Measured on the dogfood\n * platform (2026-09-01): `wildo-ai-application` — the bootstrap row — was owned by `wildo-platform`,\n * while `wonder-crm`, `wonder-todos` and `secrets-proof` were owned by `wildo`. Worse, OPERATOR\n * REACH followed the same split: the admin seeded by INIT was `ORG_ADMIN` of BOTH organizations,\n * while an admin seeded later by the maintenance path was a member of `wildo` ONLY. Nothing declared\n * that they should differ; it was decided by which code path happened to run.\n *\n * The bootstrap organization is also `ACTIVE` and authority-conferring, so everything that\n * ENUMERATES tenants — an organization switcher, the owner-floor boot report, a cross-tenant audit,\n * a subject-erasure sweep — counted a bootstrap artifact as a real tenant.\n *\n * ## Why ONE organization rather than two declared ones\n *\n * The second organization was never a design. `seedBootstrapApplicationRecord` needs *an* owner for\n * the minimal APPLICATION row it seeds to break a chicken-and-egg (an APPLICATION-primary-scoped\n * execution context resolves its `applicationId` by READING that row). It needs an owner; it never\n * needed a DIFFERENT one. Wildo owning all Wildo applications — including its own — is the coherent\n * reading, and it is what the duplication suggests was intended before the two literals drifted.\n *\n * If a future decision genuinely wants the platform's own application in a separate tenant, that is\n * a SECOND named constant here plus an explicit statement of which consumers must tell them apart —\n * not a second literal at a call site.\n *\n * ## What this does NOT do\n *\n * It does not retrofit an existing platform. Both bootstrap seeding arms look a row up by business\n * key and insert ONLY when absent, and the registration path prefers an existing application's\n * recorded `ownerOrganizationId` over the seeded id — so an installation that already carries two\n * organizations keeps both, with its existing linkage untouched. Only a FRESH platform gets one.\n * Merging the two on an existing installation is a migration with its own decision.\n */\nexport interface WildoOwnerOrganizationIdentity {\n /** Business key. Both provisioning paths upsert the organization by THIS field. */\n readonly slug: string;\n /** Display name written on first seed. */\n readonly name: string;\n /** The organization type written on first seed — a key of {@link WILDO_PLATFORM_ORGANIZATION_TYPES}. */\n readonly type: typeof WILDO_PLATFORM_ORGANIZATION_TYPE;\n}\n\n/**\n * The user type the platform seeds its first administrator with, and the one its organization type grants.\n *\n * Declared because it was already HELD: the platform's INIT seed gave its first administrator `member` long before\n * the platform declared any user type, and nothing checked the pair until organization types — whose granted user\n * types must be declared — became mandatory (#1032). Registration is DISABLED: a platform user exists because the\n * platform seeded them, never because someone signed up.\n */\nexport const WILDO_PLATFORM_MEMBER_USER_TYPE = 'member';\n\nexport const WILDO_PLATFORM_USER_TYPES: UserTypesConfig = {\n [WILDO_PLATFORM_MEMBER_USER_TYPE]: UserTypeDefinitionSchema.parse({\n auth: { registration: { mode: RegistrationMode.DISABLED } },\n }),\n};\n\n/**\n * The ONE organization type the platform's own tenancy declares (#1032, decided 2026-09-14).\n *\n * Every organization carries a type that names a declared organization type, because a member of an\n * organization whose type resolves to nothing cannot sign in. An application declares its types in\n * `wildo.saas.config.ts`; the platform has no such file, so its declaration lives here, beside the\n * identity of the organization it types. Before this, the platform seeded its organizations with no\n * type at all, and `wildo_platform` held two of them.\n *\n * It grants {@link WILDO_PLATFORM_MEMBER_USER_TYPE}, the user type the platform's INIT seeds its first administrator\n * with, so the platform's own first-organization derivation resolves to this type rather than refusing — and a\n * configuration carrying this map must carry {@link WILDO_PLATFORM_USER_TYPES} beside it, or its granted user type\n * is undeclared.\n */\nexport const WILDO_PLATFORM_ORGANIZATION_TYPE = 'platform-operator';\n\nexport const WILDO_PLATFORM_ORGANIZATION_TYPES: OrganizationTypesConfig = {\n [WILDO_PLATFORM_ORGANIZATION_TYPE]: {\n userTypes: [WILDO_PLATFORM_MEMBER_USER_TYPE],\n availableOrgRoles: [CORE_ORG_ROLES.ORG_OWNER, CORE_ORG_ROLES.ORG_ADMIN, CORE_ORG_ROLES.ORG_MEMBER],\n defaultMemberRole: CORE_ORG_ROLES.ORG_MEMBER,\n authOverrides: undefined,\n },\n};\n\nexport const WILDO_OWNER_ORGANIZATION: WildoOwnerOrganizationIdentity = {\n slug: 'wildo',\n name: 'Wildo',\n type: WILDO_PLATFORM_ORGANIZATION_TYPE,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"config-authoring.entry.d.ts","sourceRoot":"","sources":["../../src/config-authoring.entry.ts"],"names":[],"mappings":"AAsCA,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"config-authoring.entry.d.ts","sourceRoot":"","sources":["../../../src/config-authoring.entry.ts"],"names":[],"mappings":"AAsCA,cAAc,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"config-authoring.entry.js","sourceRoot":"","sources":["../../src/config-authoring.entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,iBAAiB,EAAE,CAAC;AAEpB,cAAc,SAAS,CAAC","sourcesContent":["/**\n * What `@wildo-ai/platform-config-lib` resolves to while the CONFIG LOADER evaluates a configuration\n * file from source (`loader.ts` → `resolvePlatformConfigLibEntry`).\n *\n * It is the package root plus one side effect: the Zod decorators are initialized before any schema\n * module in the evaluated graph runs, because a config file's own schemas may be authored with them\n * and the loader owns no other moment to do it.\n *\n * ## It re-exports the WHOLE root, and that is the point\n *\n * Until 2026-09-09 this entry exported `./project-config` and `./workspace-scope` and nothing else,\n * and the narrowing was never a boundary — it was a trap that fired twice, the same way both times.\n * The loader substitutes this file for the package specifier in EVERY module of the evaluated\n * graph, and that graph is not only the authored config: `wildo.saas.config.ts` and the backend\n * config import `@wildo-ai/saas-backend-lib`, which the loader also aliases to source, and the\n * engine's own modules import `@wildo-ai/platform-config-lib` expecting the root. A symbol the\n * root exports but this entry did not was not refused — under jiti it arrived as `undefined`, at\n * the first module-eval use:\n *\n * - `MinionPlatformAccessScope`: an app config importing it beside `AppFrontendType`, same\n * package, same statement, got one and `undefined` for the other. The symptom was answered by\n * moving the enum out of `bootstrap/` into `project-config/` (`minion-platform-access.vocabulary.ts`).\n * - `AdminAppManagedMinionsSchema` / `AdminAppManagedWorkersSchema`: the engine's configuration\n * loader began composing its wire schema from these at module load (removing a hand copy that\n * had silently stripped fields twice). Under the loader it threw\n * \"Cannot read properties of undefined (reading 'optional')\" and `wildo local dev` shut the\n * whole stack down at \"Registering application once and materializing every runtime target\".\n *\n * Moving symbols around cures one name at a time and teaches nothing; an entry that carries the\n * root's value surface cannot have this defect. Nothing in the root is unsafe here — the loader\n * runs under Node, and the root's Node-only modules (lockfile IO, credential generation) are\n * exactly what a Node process may load. If a module ever becomes unsuitable for config evaluation,\n * exclude THAT module from the root, explicitly, with its reason — never narrow this file again.\n */\nimport { initZodDecorators } from '@wildo-ai/zod-decorators';\n\ninitZodDecorators();\n\nexport * from './index';\n"]}
1
+ {"version":3,"file":"config-authoring.entry.js","sourceRoot":"","sources":["../../../src/config-authoring.entry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,iBAAiB,EAAE,CAAC;AAEpB,cAAc,SAAS,CAAC","sourcesContent":["/**\n * What `@wildo-ai/platform-config-lib` resolves to while the CONFIG LOADER evaluates a configuration\n * file from source (`loader.ts` → `resolvePlatformConfigLibEntry`).\n *\n * It is the package root plus one side effect: the Zod decorators are initialized before any schema\n * module in the evaluated graph runs, because a config file's own schemas may be authored with them\n * and the loader owns no other moment to do it.\n *\n * ## It re-exports the WHOLE root, and that is the point\n *\n * Until 2026-09-09 this entry exported `./project-config` and `./workspace-scope` and nothing else,\n * and the narrowing was never a boundary — it was a trap that fired twice, the same way both times.\n * The loader substitutes this file for the package specifier in EVERY module of the evaluated\n * graph, and that graph is not only the authored config: `wildo.saas.config.ts` and the backend\n * config import `@wildo-ai/saas-backend-lib`, which the loader also aliases to source, and the\n * engine's own modules import `@wildo-ai/platform-config-lib` expecting the root. A symbol the\n * root exports but this entry did not was not refused — under jiti it arrived as `undefined`, at\n * the first module-eval use:\n *\n * - `MinionPlatformAccessScope`: an app config importing it beside `AppFrontendType`, same\n * package, same statement, got one and `undefined` for the other. The symptom was answered by\n * moving the enum out of `bootstrap/` into `project-config/` (`minion-platform-access.vocabulary.ts`).\n * - `AdminAppManagedMinionsSchema` / `AdminAppManagedWorkersSchema`: the engine's configuration\n * loader began composing its wire schema from these at module load (removing a hand copy that\n * had silently stripped fields twice). Under the loader it threw\n * \"Cannot read properties of undefined (reading 'optional')\" and `wildo local dev` shut the\n * whole stack down at \"Registering application once and materializing every runtime target\".\n *\n * Moving symbols around cures one name at a time and teaches nothing; an entry that carries the\n * root's value surface cannot have this defect. Nothing in the root is unsafe here — the loader\n * runs under Node, and the root's Node-only modules (lockfile IO, credential generation) are\n * exactly what a Node process may load. If a module ever becomes unsuitable for config evaluation,\n * exclude THAT module from the root, explicitly, with its reason — never narrow this file again.\n */\nimport { initZodDecorators } from '@wildo-ai/zod-decorators';\n\ninitZodDecorators();\n\nexport * from './index';\n"]}
@@ -17,6 +17,7 @@ export * from './bootstrap/platform-runtime-env.contracts';
17
17
  export * from './bootstrap/runtime-topology.contracts';
18
18
  export * from './bootstrap/runtime-principal.contracts';
19
19
  export * from './bootstrap/runtime-backing-service-access';
20
+ export * from './bootstrap/platform-store-preconnect';
20
21
  export * from './bootstrap/runtime-network-topology';
21
22
  export * from './bootstrap/runtime-network-policy';
22
23
  export * from './bootstrap/runtime-platform-access';
@@ -25,6 +26,7 @@ export * from './project-config/shared/minion-resource-access.validation';
25
26
  export * from './project-config/shared/object-storage-session-policy';
26
27
  export * from './lockfile/wildo-saas-lock.shared.schemas';
27
28
  export * from './lockfile/lockfile-io';
29
+ export * from './lockfile/build-parallelism';
28
30
  export * from './lockfile/materialize-infra-section';
29
31
  export * from './lockfile/canonical-json';
30
32
  export * from './registry';