@wildo-ai/platform-config-lib 1.0.1 → 1.1.0

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 (414) hide show
  1. package/LICENSE +34 -0
  2. package/dist/esm/.builder.pid +9 -0
  3. package/dist/esm/_unimplemented/index.d.ts +3 -0
  4. package/dist/esm/_unimplemented/index.d.ts.map +1 -0
  5. package/dist/esm/_unimplemented/index.js +3 -0
  6. package/dist/esm/_unimplemented/index.js.map +1 -0
  7. package/dist/esm/_unimplemented/soft-warn.d.ts +124 -0
  8. package/dist/esm/_unimplemented/soft-warn.d.ts.map +1 -0
  9. package/dist/esm/_unimplemented/soft-warn.js +170 -0
  10. package/dist/esm/_unimplemented/soft-warn.js.map +1 -0
  11. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts +137 -0
  12. package/dist/esm/_unimplemented/unimplemented-field-warning.d.ts.map +1 -0
  13. package/dist/esm/_unimplemented/unimplemented-field-warning.js +153 -0
  14. package/dist/esm/_unimplemented/unimplemented-field-warning.js.map +1 -0
  15. package/dist/esm/bootstrap/application-backend-env.contracts.d.ts.map +1 -1
  16. package/dist/esm/bootstrap/application-backend-env.contracts.js +1 -1
  17. package/dist/esm/bootstrap/application-backend-env.contracts.js.map +1 -1
  18. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts +13 -0
  19. package/dist/esm/bootstrap/application-creation-verification-env.contracts.d.ts.map +1 -0
  20. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js +14 -0
  21. package/dist/esm/bootstrap/application-creation-verification-env.contracts.js.map +1 -0
  22. package/dist/esm/bootstrap/bootstrap-planner.d.ts +1 -1
  23. package/dist/esm/bootstrap/bootstrap-planner.d.ts.map +1 -1
  24. package/dist/esm/bootstrap/bootstrap-planner.js +1 -1
  25. package/dist/esm/bootstrap/bootstrap-planner.js.map +1 -1
  26. package/dist/esm/bootstrap/bootstrap.contracts.d.ts +141 -37
  27. package/dist/esm/bootstrap/bootstrap.contracts.d.ts.map +1 -1
  28. package/dist/esm/bootstrap/bootstrap.contracts.js +104 -18
  29. package/dist/esm/bootstrap/bootstrap.contracts.js.map +1 -1
  30. package/dist/esm/bootstrap/bootstrap.schemas.d.ts +430 -421
  31. package/dist/esm/bootstrap/bootstrap.schemas.d.ts.map +1 -1
  32. package/dist/esm/bootstrap/bootstrap.schemas.js +383 -21
  33. package/dist/esm/bootstrap/bootstrap.schemas.js.map +1 -1
  34. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts +213 -8
  35. package/dist/esm/bootstrap/platform-runtime-env.contracts.d.ts.map +1 -1
  36. package/dist/esm/bootstrap/platform-runtime-env.contracts.js +230 -5
  37. package/dist/esm/bootstrap/platform-runtime-env.contracts.js.map +1 -1
  38. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts +79 -0
  39. package/dist/esm/bootstrap/runtime-backing-service-access.d.ts.map +1 -0
  40. package/dist/esm/bootstrap/runtime-backing-service-access.js +83 -0
  41. package/dist/esm/bootstrap/runtime-backing-service-access.js.map +1 -0
  42. package/dist/esm/bootstrap/runtime-network-policy.d.ts +63 -0
  43. package/dist/esm/bootstrap/runtime-network-policy.d.ts.map +1 -0
  44. package/dist/esm/bootstrap/runtime-network-policy.js +104 -0
  45. package/dist/esm/bootstrap/runtime-network-policy.js.map +1 -0
  46. package/dist/esm/bootstrap/runtime-network-topology.d.ts +78 -0
  47. package/dist/esm/bootstrap/runtime-network-topology.d.ts.map +1 -0
  48. package/dist/esm/bootstrap/runtime-network-topology.js +134 -0
  49. package/dist/esm/bootstrap/runtime-network-topology.js.map +1 -0
  50. package/dist/esm/bootstrap/runtime-platform-access.d.ts +67 -0
  51. package/dist/esm/bootstrap/runtime-platform-access.d.ts.map +1 -0
  52. package/dist/esm/bootstrap/runtime-platform-access.js +57 -0
  53. package/dist/esm/bootstrap/runtime-platform-access.js.map +1 -0
  54. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts +173 -0
  55. package/dist/esm/bootstrap/runtime-principal.contracts.d.ts.map +1 -0
  56. package/dist/esm/bootstrap/runtime-principal.contracts.js +218 -0
  57. package/dist/esm/bootstrap/runtime-principal.contracts.js.map +1 -0
  58. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts +112 -1
  59. package/dist/esm/bootstrap/runtime-topology.contracts.d.ts.map +1 -1
  60. package/dist/esm/bootstrap/runtime-topology.contracts.js +141 -8
  61. package/dist/esm/bootstrap/runtime-topology.contracts.js.map +1 -1
  62. package/dist/esm/config-authoring.entry.d.ts +3 -0
  63. package/dist/esm/config-authoring.entry.d.ts.map +1 -0
  64. package/dist/esm/config-authoring.entry.js +5 -0
  65. package/dist/esm/config-authoring.entry.js.map +1 -0
  66. package/dist/esm/credentials/credential-generator.service.d.ts.map +1 -1
  67. package/dist/esm/credentials/credential-generator.service.js +1 -1
  68. package/dist/esm/credentials/credential-generator.service.js.map +1 -1
  69. package/dist/esm/index.d.ts +30 -15
  70. package/dist/esm/index.d.ts.map +1 -1
  71. package/dist/esm/index.js +16 -1
  72. package/dist/esm/index.js.map +1 -1
  73. package/dist/esm/lockfile/canonical-json.d.ts +41 -0
  74. package/dist/esm/lockfile/canonical-json.d.ts.map +1 -0
  75. package/dist/esm/lockfile/canonical-json.js +56 -0
  76. package/dist/esm/lockfile/canonical-json.js.map +1 -0
  77. package/dist/esm/lockfile/lockfile-io.d.ts +231 -0
  78. package/dist/esm/lockfile/lockfile-io.d.ts.map +1 -0
  79. package/dist/esm/lockfile/lockfile-io.js +303 -0
  80. package/dist/esm/lockfile/lockfile-io.js.map +1 -0
  81. package/dist/esm/lockfile/materialize-infra-section.d.ts +99 -0
  82. package/dist/esm/lockfile/materialize-infra-section.d.ts.map +1 -0
  83. package/dist/esm/lockfile/materialize-infra-section.js +153 -0
  84. package/dist/esm/lockfile/materialize-infra-section.js.map +1 -0
  85. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts +522 -0
  86. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.d.ts.map +1 -0
  87. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js +116 -0
  88. package/dist/esm/lockfile/wildo-saas-lock.shared.schemas.js.map +1 -0
  89. package/dist/esm/project-config/define-framework-config.d.ts +36 -10
  90. package/dist/esm/project-config/define-framework-config.d.ts.map +1 -1
  91. package/dist/esm/project-config/define-framework-config.js +67 -3
  92. package/dist/esm/project-config/define-framework-config.js.map +1 -1
  93. package/dist/esm/project-config/define-infra-env-config.d.ts +570 -0
  94. package/dist/esm/project-config/define-infra-env-config.d.ts.map +1 -0
  95. package/dist/esm/project-config/define-infra-env-config.js +726 -0
  96. package/dist/esm/project-config/define-infra-env-config.js.map +1 -0
  97. package/dist/esm/project-config/define-minion-config.d.ts +221 -23
  98. package/dist/esm/project-config/define-minion-config.d.ts.map +1 -1
  99. package/dist/esm/project-config/define-minion-config.js +228 -11
  100. package/dist/esm/project-config/define-minion-config.js.map +1 -1
  101. package/dist/esm/project-config/define-saas-config.d.ts +427 -218
  102. package/dist/esm/project-config/define-saas-config.d.ts.map +1 -1
  103. package/dist/esm/project-config/define-saas-config.js +704 -75
  104. package/dist/esm/project-config/define-saas-config.js.map +1 -1
  105. package/dist/esm/project-config/define-worker-config.d.ts +106 -10
  106. package/dist/esm/project-config/define-worker-config.d.ts.map +1 -1
  107. package/dist/esm/project-config/define-worker-config.js +99 -9
  108. package/dist/esm/project-config/define-worker-config.js.map +1 -1
  109. package/dist/esm/project-config/index.d.ts +28 -21
  110. package/dist/esm/project-config/index.d.ts.map +1 -1
  111. package/dist/esm/project-config/index.js +14 -7
  112. package/dist/esm/project-config/index.js.map +1 -1
  113. package/dist/esm/project-config/loader.d.ts +120 -10
  114. package/dist/esm/project-config/loader.d.ts.map +1 -1
  115. package/dist/esm/project-config/loader.js +290 -38
  116. package/dist/esm/project-config/loader.js.map +1 -1
  117. package/dist/esm/project-config/minion-local-provider-registration.d.ts +69 -0
  118. package/dist/esm/project-config/minion-local-provider-registration.d.ts.map +1 -0
  119. package/dist/esm/project-config/minion-local-provider-registration.js +72 -0
  120. package/dist/esm/project-config/minion-local-provider-registration.js.map +1 -0
  121. package/dist/esm/project-config/provider-catalog-types.d.ts +12 -0
  122. package/dist/esm/project-config/provider-catalog-types.d.ts.map +1 -0
  123. package/dist/esm/project-config/provider-catalog-types.js +49 -0
  124. package/dist/esm/project-config/provider-catalog-types.js.map +1 -0
  125. package/dist/esm/project-config/provider-companion-discovery.d.ts +24 -0
  126. package/dist/esm/project-config/provider-companion-discovery.d.ts.map +1 -0
  127. package/dist/esm/project-config/provider-companion-discovery.js +244 -0
  128. package/dist/esm/project-config/provider-companion-discovery.js.map +1 -0
  129. package/dist/esm/project-config/provider-runtime-artifacts.d.ts +297 -0
  130. package/dist/esm/project-config/provider-runtime-artifacts.d.ts.map +1 -0
  131. package/dist/esm/project-config/provider-runtime-artifacts.js +860 -0
  132. package/dist/esm/project-config/provider-runtime-artifacts.js.map +1 -0
  133. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts +18 -0
  134. package/dist/esm/project-config/shared/application-creation-verification.schemas.d.ts.map +1 -0
  135. package/dist/esm/project-config/shared/application-creation-verification.schemas.js +25 -0
  136. package/dist/esm/project-config/shared/application-creation-verification.schemas.js.map +1 -0
  137. package/dist/esm/project-config/shared/application-modules.schemas.d.ts +10 -2
  138. package/dist/esm/project-config/shared/application-modules.schemas.d.ts.map +1 -1
  139. package/dist/esm/project-config/shared/application-modules.schemas.js +12 -1
  140. package/dist/esm/project-config/shared/application-modules.schemas.js.map +1 -1
  141. package/dist/esm/project-config/shared/application-modules.utils.d.ts +2 -1
  142. package/dist/esm/project-config/shared/application-modules.utils.d.ts.map +1 -1
  143. package/dist/esm/project-config/shared/application-modules.utils.js +6 -1
  144. package/dist/esm/project-config/shared/application-modules.utils.js.map +1 -1
  145. package/dist/esm/project-config/shared/auth.schemas.d.ts +102 -0
  146. package/dist/esm/project-config/shared/auth.schemas.d.ts.map +1 -0
  147. package/dist/esm/project-config/shared/auth.schemas.js +100 -0
  148. package/dist/esm/project-config/shared/auth.schemas.js.map +1 -0
  149. package/dist/esm/project-config/shared/backing-services.schemas.d.ts +316 -39
  150. package/dist/esm/project-config/shared/backing-services.schemas.d.ts.map +1 -1
  151. package/dist/esm/project-config/shared/backing-services.schemas.js +359 -24
  152. package/dist/esm/project-config/shared/backing-services.schemas.js.map +1 -1
  153. package/dist/esm/project-config/shared/cdn.example.d.ts +14 -0
  154. package/dist/esm/project-config/shared/cdn.example.d.ts.map +1 -0
  155. package/dist/esm/project-config/shared/cdn.example.js +38 -0
  156. package/dist/esm/project-config/shared/cdn.example.js.map +1 -0
  157. package/dist/esm/project-config/shared/cdn.schemas.d.ts +182 -0
  158. package/dist/esm/project-config/shared/cdn.schemas.d.ts.map +1 -0
  159. package/dist/esm/project-config/shared/cdn.schemas.js +151 -0
  160. package/dist/esm/project-config/shared/cdn.schemas.js.map +1 -0
  161. package/dist/esm/project-config/shared/csp-defaults.d.ts +92 -0
  162. package/dist/esm/project-config/shared/csp-defaults.d.ts.map +1 -0
  163. package/dist/esm/project-config/shared/csp-defaults.js +195 -0
  164. package/dist/esm/project-config/shared/csp-defaults.js.map +1 -0
  165. package/dist/esm/project-config/shared/csp-emit.d.ts +106 -0
  166. package/dist/esm/project-config/shared/csp-emit.d.ts.map +1 -0
  167. package/dist/esm/project-config/shared/csp-emit.js +305 -0
  168. package/dist/esm/project-config/shared/csp-emit.js.map +1 -0
  169. package/dist/esm/project-config/shared/csp.schemas.d.ts +266 -0
  170. package/dist/esm/project-config/shared/csp.schemas.d.ts.map +1 -0
  171. package/dist/esm/project-config/shared/csp.schemas.js +281 -0
  172. package/dist/esm/project-config/shared/csp.schemas.js.map +1 -0
  173. package/dist/esm/project-config/shared/data-services.schemas.d.ts +45 -9
  174. package/dist/esm/project-config/shared/data-services.schemas.d.ts.map +1 -1
  175. package/dist/esm/project-config/shared/data-services.schemas.js +45 -9
  176. package/dist/esm/project-config/shared/data-services.schemas.js.map +1 -1
  177. package/dist/esm/project-config/shared/env-example-defaults.d.ts +0 -1
  178. package/dist/esm/project-config/shared/env-example-defaults.d.ts.map +1 -1
  179. package/dist/esm/project-config/shared/env-example-defaults.js +1 -2
  180. package/dist/esm/project-config/shared/env-example-defaults.js.map +1 -1
  181. package/dist/esm/project-config/shared/environment.schemas.d.ts +134 -8
  182. package/dist/esm/project-config/shared/environment.schemas.d.ts.map +1 -1
  183. package/dist/esm/project-config/shared/environment.schemas.js +185 -2
  184. package/dist/esm/project-config/shared/environment.schemas.js.map +1 -1
  185. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts +779 -0
  186. package/dist/esm/project-config/shared/infra-providers.schemas.d.ts.map +1 -0
  187. package/dist/esm/project-config/shared/infra-providers.schemas.js +210 -0
  188. package/dist/esm/project-config/shared/infra-providers.schemas.js.map +1 -0
  189. package/dist/esm/project-config/shared/infra-service.schemas.d.ts +18 -0
  190. package/dist/esm/project-config/shared/infra-service.schemas.d.ts.map +1 -0
  191. package/dist/esm/project-config/shared/infra-service.schemas.js +16 -0
  192. package/dist/esm/project-config/shared/infra-service.schemas.js.map +1 -0
  193. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts +83 -1
  194. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.d.ts.map +1 -1
  195. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js +99 -2
  196. package/dist/esm/project-config/shared/infrastructure-defaults.schemas.js.map +1 -1
  197. package/dist/esm/project-config/shared/k8s-utils.d.ts +51 -7
  198. package/dist/esm/project-config/shared/k8s-utils.d.ts.map +1 -1
  199. package/dist/esm/project-config/shared/k8s-utils.js +59 -12
  200. package/dist/esm/project-config/shared/k8s-utils.js.map +1 -1
  201. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts +31 -0
  202. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.d.ts.map +1 -0
  203. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js +32 -0
  204. package/dist/esm/project-config/shared/minion-platform-access.vocabulary.js.map +1 -0
  205. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts +142 -0
  206. package/dist/esm/project-config/shared/minion-resource-access.validation.d.ts.map +1 -0
  207. package/dist/esm/project-config/shared/minion-resource-access.validation.js +159 -0
  208. package/dist/esm/project-config/shared/minion-resource-access.validation.js.map +1 -0
  209. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts +100 -0
  210. package/dist/esm/project-config/shared/object-storage-session-policy.d.ts.map +1 -0
  211. package/dist/esm/project-config/shared/object-storage-session-policy.js +130 -0
  212. package/dist/esm/project-config/shared/object-storage-session-policy.js.map +1 -0
  213. package/dist/esm/project-config/shared/platform-services.schemas.d.ts +9 -14
  214. package/dist/esm/project-config/shared/platform-services.schemas.d.ts.map +1 -1
  215. package/dist/esm/project-config/shared/platform-services.schemas.js +13 -9
  216. package/dist/esm/project-config/shared/platform-services.schemas.js.map +1 -1
  217. package/dist/esm/project-config/shared/schema-version.schemas.d.ts +15 -0
  218. package/dist/esm/project-config/shared/schema-version.schemas.d.ts.map +1 -0
  219. package/dist/esm/project-config/shared/schema-version.schemas.js +40 -0
  220. package/dist/esm/project-config/shared/schema-version.schemas.js.map +1 -0
  221. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts +283 -8
  222. package/dist/esm/project-config/shared/service-definitions.schemas.d.ts.map +1 -1
  223. package/dist/esm/project-config/shared/service-definitions.schemas.js +325 -8
  224. package/dist/esm/project-config/shared/service-definitions.schemas.js.map +1 -1
  225. package/dist/esm/registry/artifact-domain.schemas.d.ts +54 -0
  226. package/dist/esm/registry/artifact-domain.schemas.d.ts.map +1 -0
  227. package/dist/esm/registry/artifact-domain.schemas.js +40 -0
  228. package/dist/esm/registry/artifact-domain.schemas.js.map +1 -0
  229. package/dist/esm/registry/companion-api.schemas.d.ts +176 -0
  230. package/dist/esm/registry/companion-api.schemas.d.ts.map +1 -0
  231. package/dist/esm/registry/companion-api.schemas.js +165 -0
  232. package/dist/esm/registry/companion-api.schemas.js.map +1 -0
  233. package/dist/esm/registry/digest.schemas.d.ts +20 -0
  234. package/dist/esm/registry/digest.schemas.d.ts.map +1 -0
  235. package/dist/esm/registry/digest.schemas.js +21 -0
  236. package/dist/esm/registry/digest.schemas.js.map +1 -0
  237. package/dist/esm/registry/index.d.ts +33 -0
  238. package/dist/esm/registry/index.d.ts.map +1 -0
  239. package/dist/esm/registry/index.js +33 -0
  240. package/dist/esm/registry/index.js.map +1 -0
  241. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts +107 -0
  242. package/dist/esm/registry/lockfile-modules-section.schemas.d.ts.map +1 -0
  243. package/dist/esm/registry/lockfile-modules-section.schemas.js +67 -0
  244. package/dist/esm/registry/lockfile-modules-section.schemas.js.map +1 -0
  245. package/dist/esm/registry/module-artifact.schemas.d.ts +94 -0
  246. package/dist/esm/registry/module-artifact.schemas.d.ts.map +1 -0
  247. package/dist/esm/registry/module-artifact.schemas.js +69 -0
  248. package/dist/esm/registry/module-artifact.schemas.js.map +1 -0
  249. package/dist/esm/registry/module-manifest.schemas.d.ts +134 -0
  250. package/dist/esm/registry/module-manifest.schemas.d.ts.map +1 -0
  251. package/dist/esm/registry/module-manifest.schemas.js +155 -0
  252. package/dist/esm/registry/module-manifest.schemas.js.map +1 -0
  253. package/dist/esm/registry/registry-config.schemas.d.ts +31 -0
  254. package/dist/esm/registry/registry-config.schemas.d.ts.map +1 -0
  255. package/dist/esm/registry/registry-config.schemas.js +24 -0
  256. package/dist/esm/registry/registry-config.schemas.js.map +1 -0
  257. package/dist/esm/registry/registry-defaults.constants.d.ts +37 -0
  258. package/dist/esm/registry/registry-defaults.constants.d.ts.map +1 -0
  259. package/dist/esm/registry/registry-defaults.constants.js +37 -0
  260. package/dist/esm/registry/registry-defaults.constants.js.map +1 -0
  261. package/dist/esm/registry/registry-errors.d.ts +109 -0
  262. package/dist/esm/registry/registry-errors.d.ts.map +1 -0
  263. package/dist/esm/registry/registry-errors.js +185 -0
  264. package/dist/esm/registry/registry-errors.js.map +1 -0
  265. package/dist/esm/registry/registry-section-schemas.constants.d.ts +39 -0
  266. package/dist/esm/registry/registry-section-schemas.constants.d.ts.map +1 -0
  267. package/dist/esm/registry/registry-section-schemas.constants.js +22 -0
  268. package/dist/esm/registry/registry-section-schemas.constants.js.map +1 -0
  269. package/dist/esm/release/framework-release.constants.d.ts +26 -1
  270. package/dist/esm/release/framework-release.constants.d.ts.map +1 -1
  271. package/dist/esm/release/framework-release.constants.js +27 -2
  272. package/dist/esm/release/framework-release.constants.js.map +1 -1
  273. package/dist/esm/schemas/framework-info.schemas.d.ts +1 -1
  274. package/dist/esm/schemas/framework-info.schemas.d.ts.map +1 -1
  275. package/dist/esm/schemas/framework-info.schemas.js +1 -1
  276. package/dist/esm/schemas/framework-info.schemas.js.map +1 -1
  277. package/dist/esm/schemas/framework-secrets.schemas.d.ts +5 -5
  278. package/dist/esm/schemas/framework-secrets.schemas.d.ts.map +1 -1
  279. package/dist/esm/schemas/framework-secrets.schemas.js +1 -1
  280. package/dist/esm/schemas/framework-secrets.schemas.js.map +1 -1
  281. package/dist/esm/schemas/platform-application-config.schemas.d.ts +1 -1
  282. package/dist/esm/schemas/platform-application-config.schemas.d.ts.map +1 -1
  283. package/dist/esm/schemas/platform-application-config.schemas.js +11 -2
  284. package/dist/esm/schemas/platform-application-config.schemas.js.map +1 -1
  285. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts +7 -7
  286. package/dist/esm/schemas/platform-application-secrets.schemas.d.ts.map +1 -1
  287. package/dist/esm/schemas/platform-application-secrets.schemas.js +17 -2
  288. package/dist/esm/schemas/platform-application-secrets.schemas.js.map +1 -1
  289. package/dist/esm/schemas/platform-config.schemas.d.ts +12 -13
  290. package/dist/esm/schemas/platform-config.schemas.d.ts.map +1 -1
  291. package/dist/esm/schemas/platform-config.schemas.js +15 -3
  292. package/dist/esm/schemas/platform-config.schemas.js.map +1 -1
  293. package/dist/esm/workspace-scope/application-subject-manifest.d.ts +26 -0
  294. package/dist/esm/workspace-scope/application-subject-manifest.d.ts.map +1 -0
  295. package/dist/esm/workspace-scope/application-subject-manifest.js +43 -0
  296. package/dist/esm/workspace-scope/application-subject-manifest.js.map +1 -0
  297. package/dist/esm/workspace-scope/index.d.ts +5 -2
  298. package/dist/esm/workspace-scope/index.d.ts.map +1 -1
  299. package/dist/esm/workspace-scope/index.js +4 -1
  300. package/dist/esm/workspace-scope/index.js.map +1 -1
  301. package/dist/esm/workspace-scope/resolve-homes.d.ts +20 -0
  302. package/dist/esm/workspace-scope/resolve-homes.d.ts.map +1 -0
  303. package/dist/esm/workspace-scope/resolve-homes.js +62 -0
  304. package/dist/esm/workspace-scope/resolve-homes.js.map +1 -0
  305. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts +211 -0
  306. package/dist/esm/workspace-scope/workspace-homes.schemas.d.ts.map +1 -0
  307. package/dist/esm/workspace-scope/workspace-homes.schemas.js +113 -0
  308. package/dist/esm/workspace-scope/workspace-homes.schemas.js.map +1 -0
  309. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts +10 -5
  310. package/dist/esm/workspace-scope/workspace-scope-detector.d.ts.map +1 -1
  311. package/dist/esm/workspace-scope/workspace-scope-detector.js +22 -36
  312. package/dist/esm/workspace-scope/workspace-scope-detector.js.map +1 -1
  313. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts +147 -58
  314. package/dist/esm/workspace-scope/workspace-scope.schemas.d.ts.map +1 -1
  315. package/dist/esm/workspace-scope/workspace-scope.schemas.js +174 -78
  316. package/dist/esm/workspace-scope/workspace-scope.schemas.js.map +1 -1
  317. package/dist/tsconfig.build.tsbuildinfo +1 -1
  318. package/package.json +31 -17
  319. package/dist/esm/credentials/credentials-provisioner.service.d.ts +0 -190
  320. package/dist/esm/credentials/credentials-provisioner.service.d.ts.map +0 -1
  321. package/dist/esm/credentials/credentials-provisioner.service.js +0 -278
  322. package/dist/esm/credentials/credentials-provisioner.service.js.map +0 -1
  323. package/dist/esm/infra-managers/infra-manager.models.d.ts +0 -146
  324. package/dist/esm/infra-managers/infra-manager.models.d.ts.map +0 -1
  325. package/dist/esm/infra-managers/infra-manager.models.js +0 -2
  326. package/dist/esm/infra-managers/infra-manager.models.js.map +0 -1
  327. package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts +0 -64
  328. package/dist/esm/infra-managers/mongo-atlas-manager.service.d.ts.map +0 -1
  329. package/dist/esm/infra-managers/mongo-atlas-manager.service.js +0 -307
  330. package/dist/esm/infra-managers/mongo-atlas-manager.service.js.map +0 -1
  331. package/dist/esm/infra-managers/postgresql-manager.service.d.ts +0 -115
  332. package/dist/esm/infra-managers/postgresql-manager.service.d.ts.map +0 -1
  333. package/dist/esm/infra-managers/postgresql-manager.service.js +0 -403
  334. package/dist/esm/infra-managers/postgresql-manager.service.js.map +0 -1
  335. package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts +0 -64
  336. package/dist/esm/infra-managers/rabbitmq-manager.service.d.ts.map +0 -1
  337. package/dist/esm/infra-managers/rabbitmq-manager.service.js +0 -288
  338. package/dist/esm/infra-managers/rabbitmq-manager.service.js.map +0 -1
  339. package/dist/esm/infra-managers/redis-manager.service.d.ts +0 -78
  340. package/dist/esm/infra-managers/redis-manager.service.d.ts.map +0 -1
  341. package/dist/esm/infra-managers/redis-manager.service.js +0 -326
  342. package/dist/esm/infra-managers/redis-manager.service.js.map +0 -1
  343. package/dist/esm/project-config/define-infra-config.d.ts +0 -128
  344. package/dist/esm/project-config/define-infra-config.d.ts.map +0 -1
  345. package/dist/esm/project-config/define-infra-config.js +0 -87
  346. package/dist/esm/project-config/define-infra-config.js.map +0 -1
  347. package/dist/esm/project-config/define-platform-config.d.ts +0 -65
  348. package/dist/esm/project-config/define-platform-config.d.ts.map +0 -1
  349. package/dist/esm/project-config/define-platform-config.js +0 -22
  350. package/dist/esm/project-config/define-platform-config.js.map +0 -1
  351. package/dist/esm/project-config/define-platform-env-config.d.ts +0 -41
  352. package/dist/esm/project-config/define-platform-env-config.d.ts.map +0 -1
  353. package/dist/esm/project-config/define-platform-env-config.js +0 -45
  354. package/dist/esm/project-config/define-platform-env-config.js.map +0 -1
  355. package/dist/esm/project-config/define-project-config.d.ts +0 -38
  356. package/dist/esm/project-config/define-project-config.d.ts.map +0 -1
  357. package/dist/esm/project-config/define-project-config.js +0 -57
  358. package/dist/esm/project-config/define-project-config.js.map +0 -1
  359. package/dist/esm/project-config/define-sharing-policy.d.ts +0 -35
  360. package/dist/esm/project-config/define-sharing-policy.d.ts.map +0 -1
  361. package/dist/esm/project-config/define-sharing-policy.js +0 -30
  362. package/dist/esm/project-config/define-sharing-policy.js.map +0 -1
  363. package/dist/esm/project-config/sharing-policy-validation.d.ts +0 -40
  364. package/dist/esm/project-config/sharing-policy-validation.d.ts.map +0 -1
  365. package/dist/esm/project-config/sharing-policy-validation.js +0 -143
  366. package/dist/esm/project-config/sharing-policy-validation.js.map +0 -1
  367. package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts +0 -23
  368. package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.d.ts.map +0 -1
  369. package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js +0 -13
  370. package/dist/esm/runtime-bridge/platform-runtime-bridge.contracts.js.map +0 -1
  371. package/src/bootstrap/application-backend-env.contracts.ts +0 -17
  372. package/src/bootstrap/bootstrap-planner.ts +0 -46
  373. package/src/bootstrap/bootstrap.contracts.ts +0 -251
  374. package/src/bootstrap/bootstrap.schemas.ts +0 -164
  375. package/src/bootstrap/platform-runtime-env.contracts.ts +0 -99
  376. package/src/bootstrap/runtime-topology.contracts.ts +0 -102
  377. package/src/credentials/credential-generator.service.ts +0 -39
  378. package/src/index.ts +0 -16
  379. package/src/project-config/__tests__/application-modules.utils.test.ts +0 -53
  380. package/src/project-config/__tests__/define-framework-config.test.ts +0 -43
  381. package/src/project-config/__tests__/define-saas-config.test.ts +0 -210
  382. package/src/project-config/__tests__/loader.test.ts +0 -100
  383. package/src/project-config/define-framework-config.ts +0 -44
  384. package/src/project-config/define-infra-config.ts +0 -168
  385. package/src/project-config/define-minion-config.ts +0 -27
  386. package/src/project-config/define-platform-config.ts +0 -28
  387. package/src/project-config/define-platform-env-config.ts +0 -59
  388. package/src/project-config/define-project-config.ts +0 -63
  389. package/src/project-config/define-saas-config.ts +0 -171
  390. package/src/project-config/define-sharing-policy.ts +0 -36
  391. package/src/project-config/define-worker-config.ts +0 -27
  392. package/src/project-config/index.ts +0 -23
  393. package/src/project-config/loader.ts +0 -220
  394. package/src/project-config/shared/application-modules.schemas.ts +0 -12
  395. package/src/project-config/shared/application-modules.utils.ts +0 -65
  396. package/src/project-config/shared/backing-services.schemas.ts +0 -59
  397. package/src/project-config/shared/data-services.schemas.ts +0 -58
  398. package/src/project-config/shared/env-example-defaults.ts +0 -50
  399. package/src/project-config/shared/environment.schemas.ts +0 -136
  400. package/src/project-config/shared/infrastructure-defaults.schemas.ts +0 -47
  401. package/src/project-config/shared/k8s-utils.ts +0 -56
  402. package/src/project-config/shared/platform-services.schemas.ts +0 -33
  403. package/src/project-config/shared/service-definitions.schemas.ts +0 -38
  404. package/src/project-config/sharing-policy-validation.ts +0 -159
  405. package/src/release/framework-release.constants.ts +0 -2
  406. package/src/schemas/__tests__/platform-config.schemas.test.ts +0 -90
  407. package/src/schemas/framework-info.schemas.ts +0 -13
  408. package/src/schemas/framework-secrets.schemas.ts +0 -19
  409. package/src/schemas/platform-application-config.schemas.ts +0 -25
  410. package/src/schemas/platform-application-secrets.schemas.ts +0 -78
  411. package/src/schemas/platform-config.schemas.ts +0 -45
  412. package/src/workspace-scope/index.ts +0 -2
  413. package/src/workspace-scope/workspace-scope-detector.ts +0 -98
  414. package/src/workspace-scope/workspace-scope.schemas.ts +0 -224
@@ -6,35 +6,32 @@
6
6
  * Wildo project structure.
7
7
  *
8
8
  * Scope hierarchy (most specific wins, each implies parent scopes):
9
- * UNINITIALIZED → GLOBAL → FRAMEWORK → PROJECT → SAAS_APP
9
+ * UNINITIALIZED → GLOBAL → FRAMEWORK → SAAS_APP
10
10
  *
11
- * Detection is based on committed config files as scope anchors,
12
- * NOT on generated dot-directories (.wildo-project, .wildo-saas).
11
+ * Detection is based on authored declaration anchors and the framework
12
+ * workspace marker file, not on generated runtime state such as
13
+ * `.wildo-saas/` or ownership directories such as `.wildo-framework/`.
13
14
  */
14
15
  /**
15
16
  * Hierarchical workspace scope.
16
17
  *
17
18
  * Numeric values are ordered so that higher = more specific.
18
- * This enables `>=` comparisons for "at least this scope" checks
19
- * (e.g., `scope >= WorkspaceScope.PROJECT` means PROJECT or SAAS_APP).
19
+ * This enables `>=` comparisons for "at least this scope" checks.
20
20
  */
21
21
  export declare enum WorkspaceScope {
22
- /** No global preferences file found and CWD is outside any project or framework */
22
+ /** No machine preferences file found and CWD is outside any app or framework */
23
23
  UNINITIALIZED = 0,
24
- /** Global preferences file exists but CWD is outside any project or framework */
24
+ /** Machine preferences file exists but CWD is outside any app or framework */
25
25
  GLOBAL = 1,
26
- /** CWD is inside the Wildo framework repository (.wildo-framework/ found) */
26
+ /** CWD is inside the Wildo framework workspace (`wildo-framework.info.json` found) */
27
27
  FRAMEWORK = 2,
28
- /** CWD is inside a project (wildo.project.config.ts found) but not in a specific app */
29
- PROJECT = 3,
30
- /** CWD is inside a SaaS application directory (wildo.saas.config.ts found) */
31
- SAAS_APP = 4
28
+ /** CWD is inside a SaaS application directory (`wildo.saas.config.ts` found) */
29
+ SAAS_APP = 3
32
30
  }
33
31
  /**
34
32
  * Result of workspace scope detection.
35
33
  *
36
- * All resolved paths are populated regardless of the final scope — a command
37
- * in SAAS_APP scope can still access `projectRoot` and `frameworkRoot`.
34
+ * All resolved paths are populated regardless of the final scope.
38
35
  */
39
36
  export interface WorkspaceScopeResult {
40
37
  /** Most specific scope detected from CWD */
@@ -43,46 +40,136 @@ export interface WorkspaceScopeResult {
43
40
  saasConfigPath: string | null;
44
41
  /** Directory containing `wildo.saas.config.ts` */
45
42
  saasRoot: string | null;
46
- /** Absolute path to `wildo.project.config.ts`, if found */
47
- projectConfigPath: string | null;
48
- /** Directory containing `wildo.project.config.ts` */
49
- projectRoot: string | null;
50
- /** Directory containing `.wildo-framework/`, if found */
43
+ /**
44
+ * Framework workspace root: the directory containing the
45
+ * `wildo-framework.info.json` marker file. The `.wildo-framework/` home
46
+ * directory lives as a sibling inside the same workspace root and stores
47
+ * framework-owned runtime artifacts (dist, secrets, publish), but it is
48
+ * the marker file — not the directory — that authoritatively identifies a
49
+ * framework workspace. Walking up only on the home directory would accept
50
+ * any repo that happens to contain a folder called `.wildo-framework/`.
51
+ */
51
52
  frameworkRoot: string | null;
52
- /** Absolute path to the global preferences file, if it exists */
53
- globalPreferencesPath: string | null;
53
+ /** Absolute path to the machine preferences file, if it exists */
54
+ machinePreferencesPath: string | null;
54
55
  }
55
56
  /**
56
- * Canonical config file and directory names used for scope detection.
57
- * Single source of truth — CLI and other tools should reference these
58
- * instead of hardcoding file names.
57
+ * Authored declaration files and machine/app preference files.
58
+ */
59
+ export declare const AUTHORED_CONFIG_FILE_NAMES: {
60
+ readonly SAAS: "wildo.saas.config.ts";
61
+ readonly FRAMEWORK: "wildo.framework.config.ts";
62
+ readonly PREFERENCES: "preferences.json";
63
+ readonly APP_LOCAL_PREFERENCES: "wildo.preferences.local.json";
64
+ };
65
+ /**
66
+ * Marker file committed at the root of a Wildo framework workspace.
67
+ *
68
+ * Authoritative signal that answers "is this directory a Wildo framework
69
+ * workspace?". The detector and the `platform-config-lib` jiti loader both
70
+ * walk up the directory tree for this file — any other marker (such as the
71
+ * `.wildo-framework/` home directory or a generic `pnpm-workspace.yaml`) is
72
+ * intentionally NOT accepted because:
73
+ *
74
+ * - `.wildo-framework/` is an owned-output directory that could in principle
75
+ * be created by any tool; directory presence alone is a weaker signal than
76
+ * a committed marker file.
77
+ * - `pnpm-workspace.yaml` matches any pnpm monorepo, so a framework package
78
+ * installed into a foreign monorepo would silently mis-root its aliases.
79
+ *
80
+ * Shell scripts that need the same contract (e.g. platform back-office
81
+ * `dev-supervised.sh` wrappers) hardcode this string because they cannot
82
+ * import TypeScript; keep those literal occurrences in sync with this constant.
83
+ */
84
+ export declare const FRAMEWORK_WORKSPACE_MARKER_FILE = "wildo-framework.info.json";
85
+ /**
86
+ * Dot-home directory names. These homes store framework-owned runtime
87
+ * artifacts (dist/, secrets, publish outputs), app-owned runtime state
88
+ * (.wildo-saas/), and machine-local preferences.
89
+ *
90
+ * Note: `.wildo-framework/` is the framework workspace's owned home
91
+ * directory. It is NOT the framework workspace marker — that role belongs
92
+ * to `FRAMEWORK_WORKSPACE_MARKER_FILE` (`wildo-framework.info.json`).
93
+ */
94
+ export declare const WORKSPACE_HOME_NAMES: {
95
+ readonly FRAMEWORK_HOME: ".wildo-framework";
96
+ readonly APP_RUNTIME_HOME: ".wildo-saas";
97
+ };
98
+ export declare const MACHINE_HOME_NAMES: {
99
+ readonly MACHINE_HOME: ".wildo";
100
+ };
101
+ /**
102
+ * Known runtime-owned directories inside the app runtime home.
103
+ */
104
+ export declare const APP_RUNTIME_SUBDIR_NAMES: {
105
+ readonly CONTINUITY: "continuity";
106
+ readonly DIST: "dist";
107
+ readonly APPLICATION_SPECIFICATIONS: "application-specifications";
108
+ readonly PROJECTIONS: "projections";
109
+ readonly CONFIG_LOADER: "config-loader";
110
+ readonly STATE: "state";
111
+ readonly TEMPORARY: "tmp";
112
+ readonly INTEGRATION_TESTS: "integration-tests";
113
+ readonly LOGS: "logs";
114
+ readonly LOCAL_DATA: "local_data";
115
+ readonly INFRASTRUCTURE: "infrastructure";
116
+ readonly ENVIRONMENTS: "environments";
117
+ /**
118
+ * Env-scoped deployment-artifact staging area
119
+ * (`.wildo-saas/deploy/<env>/{k8s,compose}/`).
120
+ *
121
+ * Distinct from {@link APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE}, which holds
122
+ * the LOCAL runtime render a developer machine's stack actually loads. This
123
+ * zone holds the render a DEPLOYMENT consumes — K8s `Secret`/`ConfigMap`
124
+ * manifests and per-service compose `.env` files, produced by
125
+ * `wildo config sync --domain config` and applied by the generated deploy
126
+ * workflows.
127
+ *
128
+ * Every file under it is secret-bearing by construction, so the generator
129
+ * writes an ignore-everything `.gitignore` into the zone root on each render
130
+ * rather than relying on an application's hand-authored root `.gitignore`
131
+ * (which the framework does not generate).
132
+ */
133
+ readonly DEPLOY: "deploy";
134
+ readonly FRAMEWORK_SCRIPTS: "dev-framework-scripts";
135
+ readonly RUNTIME_SIGNALS: "runtime-signals";
136
+ readonly COMPANION: "wildo-dev-companion";
137
+ };
138
+ /**
139
+ * Portable application-continuity inputs maintained in the tracked
140
+ * `.wildo-saas/continuity/` home.
141
+ *
142
+ * These are repository truth, unlike the generated `dist/`, mutable `state/`
143
+ * and disposable `tmp/` zones that share the `.wildo-saas` ownership root.
144
+ */
145
+ export declare const APP_CONTINUITY_FILE_NAMES: {
146
+ readonly APPLICATION_SUBJECT_MANIFEST: "application-subject.json";
147
+ readonly BOOTSTRAP_PROFILE: "bootstrap-profile.json";
148
+ };
149
+ /**
150
+ * Narrow aggregate retained for the handful of CLI commands that still
151
+ * hand-build `<appRoot>/wildo.saas.config.ts` joins instead of reading
152
+ * `resolvedHomes.app.declarationConfigPath`. The `FRAMEWORK_DIR`,
153
+ * `SAAS_DIR`, `GLOBAL_DIR`, and `PREFERENCES_FILE` members that used to
154
+ * live here were deleted in the Phase 6 closeout: framework home lookups
155
+ * now go through `FRAMEWORK_WORKSPACE_MARKER_FILE` + `resolveFrameworkLayout`,
156
+ * app runtime home lookups through `resolveAppLayout`, and machine
157
+ * preferences through `resolveMachinePreferencesPath`.
59
158
  */
60
159
  export declare const WORKSPACE_CONFIG_NAMES: {
61
- readonly PROJECT: "wildo.project.config.ts";
62
160
  readonly SAAS: "wildo.saas.config.ts";
63
- readonly PLATFORM: "wildo.platform.config.ts";
64
- readonly FRAMEWORK_DIR: ".wildo-framework";
65
- readonly PROJECT_DIR: ".wildo-project";
66
- readonly SAAS_DIR: ".wildo-saas";
67
- readonly GLOBAL_DIR: ".wildo";
68
- readonly PREFERENCES_FILE: "preferences.json";
69
- /** Directory under the project root containing platform configs and per-env overrides */
70
- readonly PLATFORM_DIR: "wildo-platform";
71
- /** File name prefix for per-env sharing policy files (e.g., `wildo.sharing-policy.local.ts`) */
72
- readonly SHARING_POLICY_PREFIX: "wildo.sharing-policy.";
73
161
  };
74
162
  /**
75
163
  * Runtime-owned zones for generated config-evaluation artifacts.
76
164
  *
77
- * These are semantic owners, not source locations. For example, a platform
78
- * config stored in a sibling `platformPath` still belongs to the project zone
79
- * and must emit artifacts under `.wildo-project/dist/...`, not beside the
80
- * authored config file itself.
165
+ * These are semantic owners, not source locations. For example, a compatibility
166
+ * config evaluated outside the app tree can still belong to the scoped
167
+ * workspace zone
168
+ * and must emit artifacts under the scoped runtime home (`.wildo-saas/dist/...`),
169
+ * not beside the authored config file itself.
81
170
  */
82
171
  export declare enum ConfigArtifactsZone {
83
172
  FRAMEWORK = "framework",
84
- PLATFORM = "platform",
85
- PROJECT = "project",
86
173
  SAAS = "saas",
87
174
  TEMP = "temp"
88
175
  }
@@ -90,8 +177,25 @@ export interface ConfigArtifactsLocationOptions {
90
177
  zone: ConfigArtifactsZone;
91
178
  ownerRoot: string;
92
179
  }
93
- export declare function resolveGlobalWildoHomePath(userHome?: string): string;
94
- export declare function resolveGlobalPreferencesPath(userHome?: string): string;
180
+ /**
181
+ * Absolute path to the machine Wildo home directory (`~/.wildo`) for the
182
+ * given user home. Per-user, per-machine state lives here — NOT shared
183
+ * across machines ("global" would be misleading).
184
+ */
185
+ export declare function resolveMachineWildoHomePath(userHome?: string): string;
186
+ /**
187
+ * Absolute path to the machine preferences file (`~/.wildo/preferences.json`)
188
+ * for the given user home. Stores per-user, per-machine preferences such as
189
+ * `frameworkPath` and `isFrameworkDeveloper`.
190
+ */
191
+ export declare function resolveMachinePreferencesPath(userHome?: string): string;
192
+ /**
193
+ * Clear the memoized scope lookups used by the string overload of
194
+ * {@link resolveConfigArtifactsBaseDir}. Intended for long-running hosts and
195
+ * tests that simulate workspace moves; standard short-lived CLI / companion
196
+ * processes never need to call this.
197
+ */
198
+ export declare function clearConfigArtifactsScopeCache(): void;
95
199
  export declare function resolveConfigArtifactsBaseDir(options: ConfigArtifactsLocationOptions): string;
96
200
  export declare function resolveConfigArtifactsBaseDir(filePath: string): string;
97
201
  /**
@@ -100,19 +204,4 @@ export declare function resolveConfigArtifactsBaseDir(filePath: string): string;
100
204
  * anchors it under the matching runtime zone.
101
205
  */
102
206
  export declare function resolveConfigArtifactsBaseDirForZone(options: ConfigArtifactsLocationOptions): string;
103
- export declare function resolveProjectPlatformRoot(projectRoot: string, platformPath?: string): string;
104
- export declare function resolveProjectPlatformFilePath(projectRoot: string, platformPath?: string, ...segments: string[]): string;
105
- /**
106
- * Resolve the directory holding project-scoped platform files for one environment.
107
- * The environment named `local` lives in `<platformPath>/local/`, while all other
108
- * environment ids live in `<platformPath>/remotes/{envName}/`.
109
- */
110
- export declare function resolveProjectPlatformEnvironmentDir(projectRoot: string, envName: string, platformPath?: string): string;
111
- /**
112
- * Resolve the sharing policy file path for a given environment.
113
- * Handles the directory convention used by `resolveProjectPlatformEnvironmentDir()`:
114
- * the environment named `local` lives in `<platformPath>/local/`, while all other
115
- * environment ids live in `<platformPath>/remotes/{envName}/`.
116
- */
117
- export declare function resolveSharingPolicyPath(projectRoot: string, envName: string, platformPath?: string): string;
118
207
  //# sourceMappingURL=workspace-scope.schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-scope.schemas.d.ts","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;GAYG;AAEH;;;;;;GAMG;AACH,oBAAY,cAAc;IACxB,mFAAmF;IACnF,aAAa,IAAI;IACjB,iFAAiF;IACjF,MAAM,IAAI;IACV,6EAA6E;IAC7E,SAAS,IAAI;IACb,wFAAwF;IACxF,OAAO,IAAI;IACX,8EAA8E;IAC9E,QAAQ,IAAI;CACb;AAED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C5C,WAAW,EAAE,MAAM,EACnB,YAAY,GAAE,MAA4C,EAC1D,GAAG,QAAQ,EAAE,MAAM,EAAE,GACpB,MAAM,CAER;AAED;;;;GAIG;AACH,wBAAgB,oCAAoC,CAClD,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,GAAE,MAA4C,GACzD,MAAM,CAMR;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,EACf,YAAY,GAAE,MAA4C,GACzD,MAAM,CAGR"}
1
+ {"version":3,"file":"workspace-scope.schemas.d.ts","sourceRoot":"","sources":["../../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AAEH;;;;;GAKG;AACH,oBAAY,cAAc;IACxB,gFAAgF;IAChF,aAAa,IAAI;IACjB,8EAA8E;IAC9E,MAAM,IAAI;IACV,sFAAsF;IACtF,SAAS,IAAI;IACb,gFAAgF;IAChF,QAAQ,IAAI;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,KAAK,EAAE,cAAc,CAAC;IAEtB,wDAAwD;IACxD,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,kDAAkD;IAClD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB;;;;;;;;OAQG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAE7B,kEAAkE;IAClE,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;CACvC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;CAK7B,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,+BAA+B,8BAA8B,CAAC;AAE3E;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;CAGvB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;CAErB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;IAanC;;;;;;;;;;;;;;;OAeG;;;;;CAKK,CAAC;AAEX;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB;;;CAG5B,CAAC;AAEX;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB;;CAEzB,CAAC;AAEX;;;;;;;;GAQG;AACH,oBAAY,mBAAmB;IAC7B,SAAS,cAAc;IACvB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,mBAAmB,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,GAAE,MAAkB,GAAG,MAAM,CAEhF;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,QAAQ,GAAE,MAAkB,GAAG,MAAM,CAElF;AAwCD;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,IAAI,CAErD;AAED,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM,CAAC;AAC/F,wBAAgB,6BAA6B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;AA+BxE;;;;GAIG;AACH,wBAAgB,oCAAoC,CAAC,OAAO,EAAE,8BAA8B,GAAG,MAAM,CAqBpG"}
@@ -9,94 +9,221 @@ import { resolveWorkspaceScope } from './workspace-scope-detector.js';
9
9
  * Wildo project structure.
10
10
  *
11
11
  * Scope hierarchy (most specific wins, each implies parent scopes):
12
- * UNINITIALIZED → GLOBAL → FRAMEWORK → PROJECT → SAAS_APP
12
+ * UNINITIALIZED → GLOBAL → FRAMEWORK → SAAS_APP
13
13
  *
14
- * Detection is based on committed config files as scope anchors,
15
- * NOT on generated dot-directories (.wildo-project, .wildo-saas).
14
+ * Detection is based on authored declaration anchors and the framework
15
+ * workspace marker file, not on generated runtime state such as
16
+ * `.wildo-saas/` or ownership directories such as `.wildo-framework/`.
16
17
  */
17
18
  /**
18
19
  * Hierarchical workspace scope.
19
20
  *
20
21
  * Numeric values are ordered so that higher = more specific.
21
- * This enables `>=` comparisons for "at least this scope" checks
22
- * (e.g., `scope >= WorkspaceScope.PROJECT` means PROJECT or SAAS_APP).
22
+ * This enables `>=` comparisons for "at least this scope" checks.
23
23
  */
24
24
  export var WorkspaceScope;
25
25
  (function (WorkspaceScope) {
26
- /** No global preferences file found and CWD is outside any project or framework */
26
+ /** No machine preferences file found and CWD is outside any app or framework */
27
27
  WorkspaceScope[WorkspaceScope["UNINITIALIZED"] = 0] = "UNINITIALIZED";
28
- /** Global preferences file exists but CWD is outside any project or framework */
28
+ /** Machine preferences file exists but CWD is outside any app or framework */
29
29
  WorkspaceScope[WorkspaceScope["GLOBAL"] = 1] = "GLOBAL";
30
- /** CWD is inside the Wildo framework repository (.wildo-framework/ found) */
30
+ /** CWD is inside the Wildo framework workspace (`wildo-framework.info.json` found) */
31
31
  WorkspaceScope[WorkspaceScope["FRAMEWORK"] = 2] = "FRAMEWORK";
32
- /** CWD is inside a project (wildo.project.config.ts found) but not in a specific app */
33
- WorkspaceScope[WorkspaceScope["PROJECT"] = 3] = "PROJECT";
34
- /** CWD is inside a SaaS application directory (wildo.saas.config.ts found) */
35
- WorkspaceScope[WorkspaceScope["SAAS_APP"] = 4] = "SAAS_APP";
32
+ /** CWD is inside a SaaS application directory (`wildo.saas.config.ts` found) */
33
+ WorkspaceScope[WorkspaceScope["SAAS_APP"] = 3] = "SAAS_APP";
36
34
  })(WorkspaceScope || (WorkspaceScope = {}));
37
35
  /**
38
- * Canonical config file and directory names used for scope detection.
39
- * Single source of truth — CLI and other tools should reference these
40
- * instead of hardcoding file names.
36
+ * Authored declaration files and machine/app preference files.
41
37
  */
42
- export const WORKSPACE_CONFIG_NAMES = {
43
- PROJECT: 'wildo.project.config.ts',
38
+ export const AUTHORED_CONFIG_FILE_NAMES = {
44
39
  SAAS: 'wildo.saas.config.ts',
45
- PLATFORM: 'wildo.platform.config.ts',
46
- FRAMEWORK_DIR: '.wildo-framework',
47
- PROJECT_DIR: '.wildo-project',
48
- SAAS_DIR: '.wildo-saas',
49
- GLOBAL_DIR: '.wildo',
50
- PREFERENCES_FILE: 'preferences.json',
51
- /** Directory under the project root containing platform configs and per-env overrides */
52
- PLATFORM_DIR: 'wildo-platform',
53
- /** File name prefix for per-env sharing policy files (e.g., `wildo.sharing-policy.local.ts`) */
54
- SHARING_POLICY_PREFIX: 'wildo.sharing-policy.',
40
+ FRAMEWORK: 'wildo.framework.config.ts',
41
+ PREFERENCES: 'preferences.json',
42
+ APP_LOCAL_PREFERENCES: 'wildo.preferences.local.json',
43
+ };
44
+ /**
45
+ * Marker file committed at the root of a Wildo framework workspace.
46
+ *
47
+ * Authoritative signal that answers "is this directory a Wildo framework
48
+ * workspace?". The detector and the `platform-config-lib` jiti loader both
49
+ * walk up the directory tree for this file — any other marker (such as the
50
+ * `.wildo-framework/` home directory or a generic `pnpm-workspace.yaml`) is
51
+ * intentionally NOT accepted because:
52
+ *
53
+ * - `.wildo-framework/` is an owned-output directory that could in principle
54
+ * be created by any tool; directory presence alone is a weaker signal than
55
+ * a committed marker file.
56
+ * - `pnpm-workspace.yaml` matches any pnpm monorepo, so a framework package
57
+ * installed into a foreign monorepo would silently mis-root its aliases.
58
+ *
59
+ * Shell scripts that need the same contract (e.g. platform back-office
60
+ * `dev-supervised.sh` wrappers) hardcode this string because they cannot
61
+ * import TypeScript; keep those literal occurrences in sync with this constant.
62
+ */
63
+ export const FRAMEWORK_WORKSPACE_MARKER_FILE = 'wildo-framework.info.json';
64
+ /**
65
+ * Dot-home directory names. These homes store framework-owned runtime
66
+ * artifacts (dist/, secrets, publish outputs), app-owned runtime state
67
+ * (.wildo-saas/), and machine-local preferences.
68
+ *
69
+ * Note: `.wildo-framework/` is the framework workspace's owned home
70
+ * directory. It is NOT the framework workspace marker — that role belongs
71
+ * to `FRAMEWORK_WORKSPACE_MARKER_FILE` (`wildo-framework.info.json`).
72
+ */
73
+ export const WORKSPACE_HOME_NAMES = {
74
+ FRAMEWORK_HOME: '.wildo-framework',
75
+ APP_RUNTIME_HOME: '.wildo-saas',
76
+ };
77
+ export const MACHINE_HOME_NAMES = {
78
+ MACHINE_HOME: '.wildo',
79
+ };
80
+ /**
81
+ * Known runtime-owned directories inside the app runtime home.
82
+ */
83
+ export const APP_RUNTIME_SUBDIR_NAMES = {
84
+ CONTINUITY: 'continuity',
85
+ DIST: 'dist',
86
+ APPLICATION_SPECIFICATIONS: 'application-specifications',
87
+ PROJECTIONS: 'projections',
88
+ CONFIG_LOADER: 'config-loader',
89
+ STATE: 'state',
90
+ TEMPORARY: 'tmp',
91
+ INTEGRATION_TESTS: 'integration-tests',
92
+ LOGS: 'logs',
93
+ LOCAL_DATA: 'local_data',
94
+ INFRASTRUCTURE: 'infrastructure',
95
+ ENVIRONMENTS: 'environments',
96
+ /**
97
+ * Env-scoped deployment-artifact staging area
98
+ * (`.wildo-saas/deploy/<env>/{k8s,compose}/`).
99
+ *
100
+ * Distinct from {@link APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE}, which holds
101
+ * the LOCAL runtime render a developer machine's stack actually loads. This
102
+ * zone holds the render a DEPLOYMENT consumes — K8s `Secret`/`ConfigMap`
103
+ * manifests and per-service compose `.env` files, produced by
104
+ * `wildo config sync --domain config` and applied by the generated deploy
105
+ * workflows.
106
+ *
107
+ * Every file under it is secret-bearing by construction, so the generator
108
+ * writes an ignore-everything `.gitignore` into the zone root on each render
109
+ * rather than relying on an application's hand-authored root `.gitignore`
110
+ * (which the framework does not generate).
111
+ */
112
+ DEPLOY: 'deploy',
113
+ FRAMEWORK_SCRIPTS: 'dev-framework-scripts',
114
+ RUNTIME_SIGNALS: 'runtime-signals',
115
+ COMPANION: 'wildo-dev-companion',
116
+ };
117
+ /**
118
+ * Portable application-continuity inputs maintained in the tracked
119
+ * `.wildo-saas/continuity/` home.
120
+ *
121
+ * These are repository truth, unlike the generated `dist/`, mutable `state/`
122
+ * and disposable `tmp/` zones that share the `.wildo-saas` ownership root.
123
+ */
124
+ export const APP_CONTINUITY_FILE_NAMES = {
125
+ APPLICATION_SUBJECT_MANIFEST: 'application-subject.json',
126
+ BOOTSTRAP_PROFILE: 'bootstrap-profile.json',
127
+ };
128
+ /**
129
+ * Narrow aggregate retained for the handful of CLI commands that still
130
+ * hand-build `<appRoot>/wildo.saas.config.ts` joins instead of reading
131
+ * `resolvedHomes.app.declarationConfigPath`. The `FRAMEWORK_DIR`,
132
+ * `SAAS_DIR`, `GLOBAL_DIR`, and `PREFERENCES_FILE` members that used to
133
+ * live here were deleted in the Phase 6 closeout: framework home lookups
134
+ * now go through `FRAMEWORK_WORKSPACE_MARKER_FILE` + `resolveFrameworkLayout`,
135
+ * app runtime home lookups through `resolveAppLayout`, and machine
136
+ * preferences through `resolveMachinePreferencesPath`.
137
+ */
138
+ export const WORKSPACE_CONFIG_NAMES = {
139
+ SAAS: AUTHORED_CONFIG_FILE_NAMES.SAAS,
55
140
  };
56
141
  /**
57
142
  * Runtime-owned zones for generated config-evaluation artifacts.
58
143
  *
59
- * These are semantic owners, not source locations. For example, a platform
60
- * config stored in a sibling `platformPath` still belongs to the project zone
61
- * and must emit artifacts under `.wildo-project/dist/...`, not beside the
62
- * authored config file itself.
144
+ * These are semantic owners, not source locations. For example, a compatibility
145
+ * config evaluated outside the app tree can still belong to the scoped
146
+ * workspace zone
147
+ * and must emit artifacts under the scoped runtime home (`.wildo-saas/dist/...`),
148
+ * not beside the authored config file itself.
63
149
  */
64
150
  export var ConfigArtifactsZone;
65
151
  (function (ConfigArtifactsZone) {
66
152
  ConfigArtifactsZone["FRAMEWORK"] = "framework";
67
- ConfigArtifactsZone["PLATFORM"] = "platform";
68
- ConfigArtifactsZone["PROJECT"] = "project";
69
153
  ConfigArtifactsZone["SAAS"] = "saas";
70
154
  ConfigArtifactsZone["TEMP"] = "temp";
71
155
  })(ConfigArtifactsZone || (ConfigArtifactsZone = {}));
72
- export function resolveGlobalWildoHomePath(userHome = homedir()) {
73
- return join(userHome, WORKSPACE_CONFIG_NAMES.GLOBAL_DIR);
156
+ /**
157
+ * Absolute path to the machine Wildo home directory (`~/.wildo`) for the
158
+ * given user home. Per-user, per-machine state lives here — NOT shared
159
+ * across machines ("global" would be misleading).
160
+ */
161
+ export function resolveMachineWildoHomePath(userHome = homedir()) {
162
+ return join(userHome, MACHINE_HOME_NAMES.MACHINE_HOME);
74
163
  }
75
- export function resolveGlobalPreferencesPath(userHome = homedir()) {
76
- return join(resolveGlobalWildoHomePath(userHome), WORKSPACE_CONFIG_NAMES.PREFERENCES_FILE);
164
+ /**
165
+ * Absolute path to the machine preferences file (`~/.wildo/preferences.json`)
166
+ * for the given user home. Stores per-user, per-machine preferences such as
167
+ * `frameworkPath` and `isFrameworkDeveloper`.
168
+ */
169
+ export function resolveMachinePreferencesPath(userHome = homedir()) {
170
+ return join(resolveMachineWildoHomePath(userHome), AUTHORED_CONFIG_FILE_NAMES.PREFERENCES);
77
171
  }
78
172
  function isPathInside(root, target) {
79
173
  const rel = relative(resolve(root), resolve(target));
80
174
  return rel === '' || (!rel.startsWith('..') && rel !== '..');
81
175
  }
176
+ /**
177
+ * Cache for the string-overload of `resolveConfigArtifactsBaseDir`.
178
+ *
179
+ * The overload needs to know which zone owns an arbitrary config file path.
180
+ * That information only depends on the containing directory, so we memoize by
181
+ * resolved directory to avoid running the full workspace-scope walk on every
182
+ * `loadConfig` call without an explicit artifact location.
183
+ *
184
+ * Cache lifetime contract:
185
+ *
186
+ * This map is process-scoped and never evicted automatically — workspace
187
+ * layout is treated as static for the duration of a single CLI / companion
188
+ * process, and cache keys are absolute directory paths, so the working set
189
+ * stays bounded by the number of distinct config-file parents touched per
190
+ * invocation (typically a handful). Long-running hosts (dev watchers, test
191
+ * runners, embedded editor integrations) that may observe workspace moves or
192
+ * need to re-detect scope must call
193
+ * {@link clearConfigArtifactsScopeCache} to force the next resolution to
194
+ * re-walk from disk.
195
+ */
196
+ const resolvedArtifactScopeCacheByDirectory = new Map();
197
+ function resolveArtifactScopeForDirectory(directoryPath) {
198
+ const cached = resolvedArtifactScopeCacheByDirectory.get(directoryPath);
199
+ if (cached) {
200
+ return cached;
201
+ }
202
+ const scope = resolveWorkspaceScope(directoryPath);
203
+ resolvedArtifactScopeCacheByDirectory.set(directoryPath, scope);
204
+ return scope;
205
+ }
206
+ /**
207
+ * Clear the memoized scope lookups used by the string overload of
208
+ * {@link resolveConfigArtifactsBaseDir}. Intended for long-running hosts and
209
+ * tests that simulate workspace moves; standard short-lived CLI / companion
210
+ * processes never need to call this.
211
+ */
212
+ export function clearConfigArtifactsScopeCache() {
213
+ resolvedArtifactScopeCacheByDirectory.clear();
214
+ }
82
215
  export function resolveConfigArtifactsBaseDir(input) {
83
216
  if (typeof input !== 'string') {
84
217
  return resolveConfigArtifactsBaseDirForZone(input);
85
218
  }
86
219
  const absolutePath = resolve(input);
87
- const scope = resolveWorkspaceScope(dirname(absolutePath));
220
+ const scope = resolveArtifactScopeForDirectory(dirname(absolutePath));
88
221
  if (scope.saasRoot && isPathInside(scope.saasRoot, absolutePath)) {
89
222
  return resolveConfigArtifactsBaseDirForZone({
90
223
  zone: ConfigArtifactsZone.SAAS,
91
224
  ownerRoot: scope.saasRoot,
92
225
  });
93
226
  }
94
- if (scope.projectRoot && isPathInside(scope.projectRoot, absolutePath)) {
95
- return resolveConfigArtifactsBaseDirForZone({
96
- zone: ConfigArtifactsZone.PROJECT,
97
- ownerRoot: scope.projectRoot,
98
- });
99
- }
100
227
  if (scope.frameworkRoot && isPathInside(scope.frameworkRoot, absolutePath)) {
101
228
  return resolveConfigArtifactsBaseDirForZone({
102
229
  zone: ConfigArtifactsZone.FRAMEWORK,
@@ -116,42 +243,11 @@ export function resolveConfigArtifactsBaseDir(input) {
116
243
  export function resolveConfigArtifactsBaseDirForZone(options) {
117
244
  switch (options.zone) {
118
245
  case ConfigArtifactsZone.FRAMEWORK:
119
- return join(options.ownerRoot, WORKSPACE_CONFIG_NAMES.FRAMEWORK_DIR, 'dist', 'config-loader', 'framework');
120
- case ConfigArtifactsZone.PLATFORM:
121
- return join(options.ownerRoot, WORKSPACE_CONFIG_NAMES.PROJECT_DIR, 'dist', 'config-loader', 'platform');
122
- case ConfigArtifactsZone.PROJECT:
123
- return join(options.ownerRoot, WORKSPACE_CONFIG_NAMES.PROJECT_DIR, 'dist', 'config-loader', 'project');
246
+ return join(options.ownerRoot, WORKSPACE_HOME_NAMES.FRAMEWORK_HOME, APP_RUNTIME_SUBDIR_NAMES.DIST, APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER, 'framework');
124
247
  case ConfigArtifactsZone.SAAS:
125
- return join(options.ownerRoot, WORKSPACE_CONFIG_NAMES.SAAS_DIR, 'dist', 'config-loader', 'saas');
248
+ return join(options.ownerRoot, WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME, APP_RUNTIME_SUBDIR_NAMES.DIST, APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER, 'saas');
126
249
  case ConfigArtifactsZone.TEMP:
127
250
  return join(tmpdir(), 'wildo-jiti-cache');
128
251
  }
129
252
  }
130
- export function resolveProjectPlatformRoot(projectRoot, platformPath = WORKSPACE_CONFIG_NAMES.PLATFORM_DIR) {
131
- return join(projectRoot, platformPath);
132
- }
133
- export function resolveProjectPlatformFilePath(projectRoot, platformPath = WORKSPACE_CONFIG_NAMES.PLATFORM_DIR, ...segments) {
134
- return join(resolveProjectPlatformRoot(projectRoot, platformPath), ...segments);
135
- }
136
- /**
137
- * Resolve the directory holding project-scoped platform files for one environment.
138
- * The environment named `local` lives in `<platformPath>/local/`, while all other
139
- * environment ids live in `<platformPath>/remotes/{envName}/`.
140
- */
141
- export function resolveProjectPlatformEnvironmentDir(projectRoot, envName, platformPath = WORKSPACE_CONFIG_NAMES.PLATFORM_DIR) {
142
- if (envName === 'local') {
143
- return resolveProjectPlatformFilePath(projectRoot, platformPath, 'local');
144
- }
145
- return resolveProjectPlatformFilePath(projectRoot, platformPath, 'remotes', envName);
146
- }
147
- /**
148
- * Resolve the sharing policy file path for a given environment.
149
- * Handles the directory convention used by `resolveProjectPlatformEnvironmentDir()`:
150
- * the environment named `local` lives in `<platformPath>/local/`, while all other
151
- * environment ids live in `<platformPath>/remotes/{envName}/`.
152
- */
153
- export function resolveSharingPolicyPath(projectRoot, envName, platformPath = WORKSPACE_CONFIG_NAMES.PLATFORM_DIR) {
154
- const fileName = `${WORKSPACE_CONFIG_NAMES.SHARING_POLICY_PREFIX}${envName}.ts`;
155
- return join(resolveProjectPlatformEnvironmentDir(projectRoot, envName, platformPath), fileName);
156
- }
157
- //# sourceMappingURL=workspace-scope.schemas.js.map
253
+ //# sourceMappingURL=workspace-scope.schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-scope.schemas.js","sourceRoot":"","sources":["../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;;GAYG;AAEH;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,cAWX;AAXD,WAAY,cAAc;IACxB,mFAAmF;IACnF,qEAAiB,CAAA;IACjB,iFAAiF;IACjF,uDAAU,CAAA;IACV,6EAA6E;IAC7E,6DAAa,CAAA;IACb,wFAAwF;IACxF,yDAAW,CAAA;IACX,8EAA8E;IAC9E,2DAAY,CAAA;AACd,CAAC,EAXW,cAAc,KAAd,cAAc,QAWzB;AA6BD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,OAAO,EAAE,yBAAyB;IAClC,IAAI,EAAE,sBAAsB;IAC5B,QAAQ,EAAE,0BAA0B;IACpC,aAAa,EAAE,kBAAkB;IACjC,WAA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AAG,OAAO,KAAK,CAAC;IAChF,OAAO,IAAI,CAAC,oCAAoC,CAAC,WAAW,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,QAAQ,CAAC,CAAC;AAClG,CAAC"}
1
+ {"version":3,"file":"workspace-scope.schemas.js","sourceRoot":"","sources":["../../../../src/workspace-scope/workspace-scope.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;;;;;;;GAaG;AAEH;;;;;GAKG;AACH,MAAM,CAAN,IAAY,cASX;AATD,WAAY,cAAc;IACxB,gFAAgF;IAChF,qEAAiB,CAAA;IACjB,8EAA8E;IAC9E,uDAAU,CAAA;IACV,sFAAsF;IACtF,6DAAa,CAAA;IACb,gFAAgF;IAChF,2DAAY,CAAA;AACd,CAAC,EATW,cAAc,KAAd,cAAc,QASzB;AA+BD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,IAAI,EAAE,sBAAsB;IAC5B,SAAS,EAAE,2BAA2B;IACtC,WAAW,EAAE,kBAAkB;IAC/B,qBAAqB,EAAE,8BAA8B;CAC7C,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,2BAA2B,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,cAAc,EAAE,kBAAkB;IAClC,gBAAgB,EAAE,aAAa;CACvB,CAAC;AAEX,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,YAAY,EAAE,QAAQ;CACd,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,UAAU,EAAE,YAAY;IACx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AAa,IAAI,YAAY,CAAC,KAAK,CAAC,aAAa,EAAE,YAAY,CAAC,EAAE,CAAC;QAC3E,OAAO,oCAAoC,CAAC;YAC1C,IAAI,EAAE,mBAAmB,CAAC,SAAS;YACnC,SAAS,EAAE,KAAK,CAAC,aAAa;SAC/B,CAAC,CAAC;IACL,CAAC;IAED,OAAO,oCAAoC,CAAC;QAC1C,IAAI,EAAE,mBAAmB,CAAC,IAAI;QAC9B,SAAS,EAAE,YAAY;KACxB,CAAC,CAAC;AACL,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oCAAoC,CAAC,OAAuC;IAC1F,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,mBAAmB,CAAC,SAAS;YAChC,OAAO,IAAI,CACT,OAAO,CAAC,SAAS,EACjB,oBAAoB,CAAC,cAAc,EACnC,wBAAwB,CAAC,IAAI,EAC7B,wBAAwB,CAAC,aAAa,EACtC,WAAW,CACZ,CAAC;QACJ,KAAK,mBAAmB,CAAC,IAAI;YAC3B,OAAO,IAAI,CACT,OAAO,CAAC,SAAS,EACjB,oBAAoB,CAAC,gBAAgB,EACrC,wBAAwB,CAAC,IAAI,EAC7B,wBAAwB,CAAC,aAAa,EACtC,MAAM,CACP,CAAC;QACJ,KAAK,mBAAmB,CAAC,IAAI;YAC3B,OAAO,IAAI,CAAC,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC","sourcesContent":["import { homedir, tmpdir } from 'os';\nimport { dirname, join, relative, resolve } from 'path';\nimport { resolveWorkspaceScope } from './workspace-scope-detector';\n\n/**\n * Workspace scope detection types.\n *\n * Provides a hierarchical scope model for determining where a tool\n * (CLI, companion, IDE extension) is being invoked from within the\n * Wildo project structure.\n *\n * Scope hierarchy (most specific wins, each implies parent scopes):\n * UNINITIALIZED → GLOBAL → FRAMEWORK → SAAS_APP\n *\n * Detection is based on authored declaration anchors and the framework\n * workspace marker file, not on generated runtime state such as\n * `.wildo-saas/` or ownership directories such as `.wildo-framework/`.\n */\n\n/**\n * Hierarchical workspace scope.\n *\n * Numeric values are ordered so that higher = more specific.\n * This enables `>=` comparisons for \"at least this scope\" checks.\n */\nexport enum WorkspaceScope {\n /** No machine preferences file found and CWD is outside any app or framework */\n UNINITIALIZED = 0,\n /** Machine preferences file exists but CWD is outside any app or framework */\n GLOBAL = 1,\n /** CWD is inside the Wildo framework workspace (`wildo-framework.info.json` found) */\n FRAMEWORK = 2,\n /** CWD is inside a SaaS application directory (`wildo.saas.config.ts` found) */\n SAAS_APP = 3,\n}\n\n/**\n * Result of workspace scope detection.\n *\n * All resolved paths are populated regardless of the final scope.\n */\nexport interface WorkspaceScopeResult {\n /** Most specific scope detected from CWD */\n scope: WorkspaceScope;\n\n /** Absolute path to `wildo.saas.config.ts`, if found */\n saasConfigPath: string | null;\n /** Directory containing `wildo.saas.config.ts` */\n saasRoot: string | null;\n\n /**\n * Framework workspace root: the directory containing the\n * `wildo-framework.info.json` marker file. The `.wildo-framework/` home\n * directory lives as a sibling inside the same workspace root and stores\n * framework-owned runtime artifacts (dist, secrets, publish), but it is\n * the marker file — not the directory — that authoritatively identifies a\n * framework workspace. Walking up only on the home directory would accept\n * any repo that happens to contain a folder called `.wildo-framework/`.\n */\n frameworkRoot: string | null;\n\n /** Absolute path to the machine preferences file, if it exists */\n machinePreferencesPath: string | null;\n}\n\n/**\n * Authored declaration files and machine/app preference files.\n */\nexport const AUTHORED_CONFIG_FILE_NAMES = {\n SAAS: 'wildo.saas.config.ts',\n FRAMEWORK: 'wildo.framework.config.ts',\n PREFERENCES: 'preferences.json',\n APP_LOCAL_PREFERENCES: 'wildo.preferences.local.json',\n} as const;\n\n/**\n * Marker file committed at the root of a Wildo framework workspace.\n *\n * Authoritative signal that answers \"is this directory a Wildo framework\n * workspace?\". The detector and the `platform-config-lib` jiti loader both\n * walk up the directory tree for this file — any other marker (such as the\n * `.wildo-framework/` home directory or a generic `pnpm-workspace.yaml`) is\n * intentionally NOT accepted because:\n *\n * - `.wildo-framework/` is an owned-output directory that could in principle\n * be created by any tool; directory presence alone is a weaker signal than\n * a committed marker file.\n * - `pnpm-workspace.yaml` matches any pnpm monorepo, so a framework package\n * installed into a foreign monorepo would silently mis-root its aliases.\n *\n * Shell scripts that need the same contract (e.g. platform back-office\n * `dev-supervised.sh` wrappers) hardcode this string because they cannot\n * import TypeScript; keep those literal occurrences in sync with this constant.\n */\nexport const FRAMEWORK_WORKSPACE_MARKER_FILE = 'wildo-framework.info.json';\n\n/**\n * Dot-home directory names. These homes store framework-owned runtime\n * artifacts (dist/, secrets, publish outputs), app-owned runtime state\n * (.wildo-saas/), and machine-local preferences.\n *\n * Note: `.wildo-framework/` is the framework workspace's owned home\n * directory. It is NOT the framework workspace marker — that role belongs\n * to `FRAMEWORK_WORKSPACE_MARKER_FILE` (`wildo-framework.info.json`).\n */\nexport const WORKSPACE_HOME_NAMES = {\n FRAMEWORK_HOME: '.wildo-framework',\n APP_RUNTIME_HOME: '.wildo-saas',\n} as const;\n\nexport const MACHINE_HOME_NAMES = {\n MACHINE_HOME: '.wildo',\n} as const;\n\n/**\n * Known runtime-owned directories inside the app runtime home.\n */\nexport const APP_RUNTIME_SUBDIR_NAMES = {\n CONTINUITY: 'continuity',\n DIST: 'dist',\n APPLICATION_SPECIFICATIONS: 'application-specifications',\n PROJECTIONS: 'projections',\n CONFIG_LOADER: 'config-loader',\n STATE: 'state',\n TEMPORARY: 'tmp',\n INTEGRATION_TESTS: 'integration-tests',\n LOGS: 'logs',\n LOCAL_DATA: 'local_data',\n INFRASTRUCTURE: 'infrastructure',\n ENVIRONMENTS: 'environments',\n /**\n * Env-scoped deployment-artifact staging area\n * (`.wildo-saas/deploy/<env>/{k8s,compose}/`).\n *\n * Distinct from {@link APP_RUNTIME_SUBDIR_NAMES.INFRASTRUCTURE}, which holds\n * the LOCAL runtime render a developer machine's stack actually loads. This\n * zone holds the render a DEPLOYMENT consumes — K8s `Secret`/`ConfigMap`\n * manifests and per-service compose `.env` files, produced by\n * `wildo config sync --domain config` and applied by the generated deploy\n * workflows.\n *\n * Every file under it is secret-bearing by construction, so the generator\n * writes an ignore-everything `.gitignore` into the zone root on each render\n * rather than relying on an application's hand-authored root `.gitignore`\n * (which the framework does not generate).\n */\n DEPLOY: 'deploy',\n FRAMEWORK_SCRIPTS: 'dev-framework-scripts',\n RUNTIME_SIGNALS: 'runtime-signals',\n COMPANION: 'wildo-dev-companion',\n} as const;\n\n/**\n * Portable application-continuity inputs maintained in the tracked\n * `.wildo-saas/continuity/` home.\n *\n * These are repository truth, unlike the generated `dist/`, mutable `state/`\n * and disposable `tmp/` zones that share the `.wildo-saas` ownership root.\n */\nexport const APP_CONTINUITY_FILE_NAMES = {\n APPLICATION_SUBJECT_MANIFEST: 'application-subject.json',\n BOOTSTRAP_PROFILE: 'bootstrap-profile.json',\n} as const;\n\n/**\n * Narrow aggregate retained for the handful of CLI commands that still\n * hand-build `<appRoot>/wildo.saas.config.ts` joins instead of reading\n * `resolvedHomes.app.declarationConfigPath`. The `FRAMEWORK_DIR`,\n * `SAAS_DIR`, `GLOBAL_DIR`, and `PREFERENCES_FILE` members that used to\n * live here were deleted in the Phase 6 closeout: framework home lookups\n * now go through `FRAMEWORK_WORKSPACE_MARKER_FILE` + `resolveFrameworkLayout`,\n * app runtime home lookups through `resolveAppLayout`, and machine\n * preferences through `resolveMachinePreferencesPath`.\n */\nexport const WORKSPACE_CONFIG_NAMES = {\n SAAS: AUTHORED_CONFIG_FILE_NAMES.SAAS,\n} as const;\n\n/**\n * Runtime-owned zones for generated config-evaluation artifacts.\n *\n * These are semantic owners, not source locations. For example, a compatibility\n * config evaluated outside the app tree can still belong to the scoped\n * workspace zone\n * and must emit artifacts under the scoped runtime home (`.wildo-saas/dist/...`),\n * not beside the authored config file itself.\n */\nexport enum ConfigArtifactsZone {\n FRAMEWORK = 'framework',\n SAAS = 'saas',\n TEMP = 'temp',\n}\n\nexport interface ConfigArtifactsLocationOptions {\n zone: ConfigArtifactsZone;\n ownerRoot: string;\n}\n\n/**\n * Absolute path to the machine Wildo home directory (`~/.wildo`) for the\n * given user home. Per-user, per-machine state lives here — NOT shared\n * across machines (\"global\" would be misleading).\n */\nexport function resolveMachineWildoHomePath(userHome: string = homedir()): string {\n return join(userHome, MACHINE_HOME_NAMES.MACHINE_HOME);\n}\n\n/**\n * Absolute path to the machine preferences file (`~/.wildo/preferences.json`)\n * for the given user home. Stores per-user, per-machine preferences such as\n * `frameworkPath` and `isFrameworkDeveloper`.\n */\nexport function resolveMachinePreferencesPath(userHome: string = homedir()): string {\n return join(resolveMachineWildoHomePath(userHome), AUTHORED_CONFIG_FILE_NAMES.PREFERENCES);\n}\n\nfunction isPathInside(root: string, target: string): boolean {\n const rel = relative(resolve(root), resolve(target));\n return rel === '' || (!rel.startsWith('..') && rel !== '..');\n}\n\n/**\n * Cache for the string-overload of `resolveConfigArtifactsBaseDir`.\n *\n * The overload needs to know which zone owns an arbitrary config file path.\n * That information only depends on the containing directory, so we memoize by\n * resolved directory to avoid running the full workspace-scope walk on every\n * `loadConfig` call without an explicit artifact location.\n *\n * Cache lifetime contract:\n *\n * This map is process-scoped and never evicted automatically — workspace\n * layout is treated as static for the duration of a single CLI / companion\n * process, and cache keys are absolute directory paths, so the working set\n * stays bounded by the number of distinct config-file parents touched per\n * invocation (typically a handful). Long-running hosts (dev watchers, test\n * runners, embedded editor integrations) that may observe workspace moves or\n * need to re-detect scope must call\n * {@link clearConfigArtifactsScopeCache} to force the next resolution to\n * re-walk from disk.\n */\nconst resolvedArtifactScopeCacheByDirectory = new Map<string, WorkspaceScopeResult>();\n\nfunction resolveArtifactScopeForDirectory(directoryPath: string): WorkspaceScopeResult {\n const cached = resolvedArtifactScopeCacheByDirectory.get(directoryPath);\n if (cached) {\n return cached;\n }\n\n const scope = resolveWorkspaceScope(directoryPath);\n resolvedArtifactScopeCacheByDirectory.set(directoryPath, scope);\n return scope;\n}\n\n/**\n * Clear the memoized scope lookups used by the string overload of\n * {@link resolveConfigArtifactsBaseDir}. Intended for long-running hosts and\n * tests that simulate workspace moves; standard short-lived CLI / companion\n * processes never need to call this.\n */\nexport function clearConfigArtifactsScopeCache(): void {\n resolvedArtifactScopeCacheByDirectory.clear();\n}\n\nexport function resolveConfigArtifactsBaseDir(options: ConfigArtifactsLocationOptions): string;\nexport function resolveConfigArtifactsBaseDir(filePath: string): string;\nexport function resolveConfigArtifactsBaseDir(\n input: string | ConfigArtifactsLocationOptions,\n): string {\n if (typeof input !== 'string') {\n return resolveConfigArtifactsBaseDirForZone(input);\n }\n\n const absolutePath = resolve(input);\n const scope = resolveArtifactScopeForDirectory(dirname(absolutePath));\n\n if (scope.saasRoot && isPathInside(scope.saasRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.SAAS,\n ownerRoot: scope.saasRoot,\n });\n }\n\n if (scope.frameworkRoot && isPathInside(scope.frameworkRoot, absolutePath)) {\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.FRAMEWORK,\n ownerRoot: scope.frameworkRoot,\n });\n }\n\n return resolveConfigArtifactsBaseDirForZone({\n zone: ConfigArtifactsZone.TEMP,\n ownerRoot: absolutePath,\n });\n}\n\n/**\n * Resolve the canonical runtime-owned base directory for config-loader\n * artifacts. This keeps Jiti/SWC output out of authored declaration trees and\n * anchors it under the matching runtime zone.\n */\nexport function resolveConfigArtifactsBaseDirForZone(options: ConfigArtifactsLocationOptions): string {\n switch (options.zone) {\n case ConfigArtifactsZone.FRAMEWORK:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.FRAMEWORK_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'framework',\n );\n case ConfigArtifactsZone.SAAS:\n return join(\n options.ownerRoot,\n WORKSPACE_HOME_NAMES.APP_RUNTIME_HOME,\n APP_RUNTIME_SUBDIR_NAMES.DIST,\n APP_RUNTIME_SUBDIR_NAMES.CONFIG_LOADER,\n 'saas',\n );\n case ConfigArtifactsZone.TEMP:\n return join(tmpdir(), 'wildo-jiti-cache');\n }\n}\n"]}