@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
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Wire schemas for the companion's `/api/companion/registry/*`
3
+ * routes.
4
+ *
5
+ * Phase 2 lands the request/response contracts as Zod schemas so
6
+ * both sides (CLI client + companion controller) share the same
7
+ * shape. The CLI calls these via `RegistryCompanionClient`; the
8
+ * companion implements the routes via `RegistryController`.
9
+ *
10
+ * KD-6 (companion owns SaaS-app source mutations) maps to these
11
+ * routes:
12
+ * - `POST /api/companion/registry/install` — copy module source
13
+ * into app, mutate `wildo.saas.config.ts > moduleRegistries`,
14
+ * mutate `modules-registry.{shared,frontend,backend}.ts`,
15
+ * update `sections.modules`, run provider sync.
16
+ * - `POST /api/companion/registry/update` — update an installed
17
+ * module to a new version (delta apply + lockfile refresh).
18
+ * - `POST /api/companion/registry/remove` — remove an installed
19
+ * module (delete files, drop sentinel-managed entries, drop
20
+ * `sections.modules.installed[<id>]`).
21
+ * - `POST /api/companion/registry/publish` — stage + zip + upload
22
+ * a local module to its registry (delegates to
23
+ * `ModulePackagerService` + `RegistryServerClient`).
24
+ *
25
+ * Every route returns a `RegistryRouteResultSchema` envelope so
26
+ * the CLI client can handle success / failure / repairable
27
+ * post-mutation provider-sync errors uniformly.
28
+ */
29
+ import { z } from 'zod';
30
+ /**
31
+ * Reason flag forwarded to the provider-sync runner so its
32
+ * diagnostic copy mirrors the calling verb.
33
+ */
34
+ export declare const RegistryMutationReasonSchema: z.ZodEnum<{
35
+ install: "install";
36
+ update: "update";
37
+ adopt: "adopt";
38
+ remove: "remove";
39
+ }>;
40
+ export type RegistryMutationReason = z.infer<typeof RegistryMutationReasonSchema>;
41
+ export declare const RegistryInstallRequestSchema: z.ZodObject<{
42
+ /** Module id (`<domain>/<name>`). */
43
+ moduleId: z.ZodString;
44
+ /**
45
+ * Resolved exact version. The CLI resolves the range upstream.
46
+ * Must be exact semver — accepting a range here (e.g. `^1.2.3`)
47
+ * would let the lockfile carry a non-resolvable version.
48
+ */
49
+ version: z.ZodString;
50
+ /** Range the user originally typed (preserved on the lockfile entry). */
51
+ requestedRange: z.ZodOptional<z.ZodString>;
52
+ /** Registry id from `wildo.saas.config.ts > moduleRegistries[].id`. */
53
+ registryId: z.ZodString;
54
+ /** Resolved registry URL at install time. */
55
+ registryUrl: z.ZodURL;
56
+ /** Domain segment under the registry. */
57
+ domain: z.ZodString;
58
+ /** Artifact integrity digest (`sha256:<64-hex>`). */
59
+ artifactDigest: z.ZodString;
60
+ }, z.core.$strict>;
61
+ export type RegistryInstallRequest = z.infer<typeof RegistryInstallRequestSchema>;
62
+ export declare const RegistryUpdateRequestSchema: z.ZodObject<{
63
+ moduleId: z.ZodString;
64
+ /** Target exact version. CLI resolves the range upstream. */
65
+ toVersion: z.ZodString;
66
+ toArtifactDigest: z.ZodString;
67
+ registryId: z.ZodString;
68
+ }, z.core.$strict>;
69
+ export type RegistryUpdateRequest = z.infer<typeof RegistryUpdateRequestSchema>;
70
+ export declare const RegistryRemoveRequestSchema: z.ZodObject<{
71
+ moduleId: z.ZodString;
72
+ }, z.core.$strict>;
73
+ export type RegistryRemoveRequest = z.infer<typeof RegistryRemoveRequestSchema>;
74
+ /**
75
+ * `GET /v1/auth/whoami` response — what the registry server hands
76
+ * back when a CLI calls `wildo registry login`/`whoami --verify`.
77
+ * The CLI Zod-parses every required field so a misconfigured registry
78
+ * that omits `organizationId` cannot persist a credential with `org=?`.
79
+ *
80
+ * `roles` is optional because not every registry deployment models
81
+ * roles today; when supplied it lands on the per-machine credential
82
+ * blob for staleness UX.
83
+ *
84
+ * 4th-pass review M5: the schema is `.object({...})` (NOT `.strictObject`)
85
+ * so the registry server can add new optional response fields
86
+ * (`tokenIssuedAt`, `lastUsedAt`, etc.) WITHOUT every existing CLI
87
+ * version refusing to authenticate. The CLI still fails-closed on
88
+ * missing required fields; only unknown additional fields are
89
+ * silently dropped on the client side. Forward-compat is the priority
90
+ * here since CLI versions cannot be flushed in lockstep with server
91
+ * deployments.
92
+ */
93
+ export declare const RegistryWhoamiResponseSchema: z.ZodObject<{
94
+ organizationId: z.ZodString;
95
+ apiKeyId: z.ZodString;
96
+ apiKeyName: z.ZodOptional<z.ZodString>;
97
+ roles: z.ZodOptional<z.ZodArray<z.ZodString>>;
98
+ }, z.core.$strip>;
99
+ export type RegistryWhoamiResponse = z.infer<typeof RegistryWhoamiResponseSchema>;
100
+ export declare const RegistryPublishRequestSchema: z.ZodObject<{
101
+ /** Module id from the staged manifest. */
102
+ moduleId: z.ZodString;
103
+ /** Exact version from the staged manifest — semver-validated. */
104
+ version: z.ZodString;
105
+ /** Registry id to publish to. */
106
+ registryId: z.ZodString;
107
+ /** Domain to publish under. */
108
+ domain: z.ZodString;
109
+ /** Pre-computed staging digest (matches `Sha256DigestSchema`). */
110
+ artifactDigest: z.ZodString;
111
+ }, z.core.$strict>;
112
+ export type RegistryPublishRequest = z.infer<typeof RegistryPublishRequestSchema>;
113
+ /**
114
+ * Provider-sync outcome inside a mutation route's response. Mirrors
115
+ * `runProviderSync` return shape (without the always-on path
116
+ * constants — the CLI knows them via `platform-config-lib`).
117
+ */
118
+ export declare const RegistryProviderSyncOutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
119
+ status: z.ZodLiteral<"ok">;
120
+ mode: z.ZodEnum<{
121
+ "shell-out": "shell-out";
122
+ "dry-run": "dry-run";
123
+ }>;
124
+ durationMs: z.ZodNumber;
125
+ }, z.core.$strict>, z.ZodObject<{
126
+ status: z.ZodLiteral<"failed">;
127
+ failureKind: z.ZodEnum<{
128
+ unknown: "unknown";
129
+ "companion-discovery": "companion-discovery";
130
+ "runtime-import-reachability": "runtime-import-reachability";
131
+ "invalid-scope": "invalid-scope";
132
+ timeout: "timeout";
133
+ }>;
134
+ message: z.ZodString;
135
+ stderrTail: z.ZodOptional<z.ZodString>;
136
+ }, z.core.$strict>], "status">;
137
+ export type RegistryProviderSyncOutcome = z.infer<typeof RegistryProviderSyncOutcomeSchema>;
138
+ export declare const RegistryRouteResultSchema: z.ZodObject<{
139
+ ok: z.ZodBoolean;
140
+ /** Files written into app source (relative to saas root). */
141
+ filesTouched: z.ZodDefault<z.ZodArray<z.ZodString>>;
142
+ /** Provider-sync outcome (omitted when not applicable, e.g. publish). */
143
+ providerSync: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
144
+ status: z.ZodLiteral<"ok">;
145
+ mode: z.ZodEnum<{
146
+ "shell-out": "shell-out";
147
+ "dry-run": "dry-run";
148
+ }>;
149
+ durationMs: z.ZodNumber;
150
+ }, z.core.$strict>, z.ZodObject<{
151
+ status: z.ZodLiteral<"failed">;
152
+ failureKind: z.ZodEnum<{
153
+ unknown: "unknown";
154
+ "companion-discovery": "companion-discovery";
155
+ "runtime-import-reachability": "runtime-import-reachability";
156
+ "invalid-scope": "invalid-scope";
157
+ timeout: "timeout";
158
+ }>;
159
+ message: z.ZodString;
160
+ stderrTail: z.ZodOptional<z.ZodString>;
161
+ }, z.core.$strict>], "status">>;
162
+ /** Free-form diagnostic copy. */
163
+ message: z.ZodOptional<z.ZodString>;
164
+ }, z.core.$strict>;
165
+ export type RegistryRouteResult = z.infer<typeof RegistryRouteResultSchema>;
166
+ /**
167
+ * Companion route paths — single source of truth shared by the
168
+ * CLI client and the companion controller.
169
+ */
170
+ export declare const REGISTRY_COMPANION_ROUTES: {
171
+ readonly install: "/api/companion/registry/install";
172
+ readonly update: "/api/companion/registry/update";
173
+ readonly remove: "/api/companion/registry/remove";
174
+ readonly publish: "/api/companion/registry/publish";
175
+ };
176
+ //# sourceMappingURL=companion-api.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-api.schemas.d.ts","sourceRoot":"","sources":["../../../../src/registry/companion-api.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;GAGG;AACH,eAAO,MAAM,4BAA4B;;;;;EAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAIlF,eAAO,MAAM,4BAA4B;IACvC,qCAAqC;;IAErC;;;;OAIG;;IAEH,yEAAyE;;IAEzE,uEAAuE;;IAEvE,6CAA6C;;IAE7C,yCAAyC;;IAEzC,qDAAqD;;kBAErD,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAIlF,eAAO,MAAM,2BAA2B;;IAEtC,6DAA6D;;;;kBAI7D,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAIhF,eAAO,MAAM,2BAA2B;;kBAEtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAIhF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,4BAA4B;;;;;iBAKvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,4BAA4B;IACvC,0CAA0C;;IAE1C,iEAAiE;;IAEjE,iCAAiC;;IAEjC,+BAA+B;;IAE/B,kEAAkE;;kBAElE,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAIlF;;;;GAIG;AACH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;8BA2B5C,CAAC;AACH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAE5F,eAAO,MAAM,yBAAyB;;IAEpC,6DAA6D;;IAE7D,yEAAyE;;;;;;;;;;;;;;;;;;;;IAEzE,iCAAiC;;kBAEjC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,yBAAyB;;;;;CAK5B,CAAC"}
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Wire schemas for the companion's `/api/companion/registry/*`
3
+ * routes.
4
+ *
5
+ * Phase 2 lands the request/response contracts as Zod schemas so
6
+ * both sides (CLI client + companion controller) share the same
7
+ * shape. The CLI calls these via `RegistryCompanionClient`; the
8
+ * companion implements the routes via `RegistryController`.
9
+ *
10
+ * KD-6 (companion owns SaaS-app source mutations) maps to these
11
+ * routes:
12
+ * - `POST /api/companion/registry/install` — copy module source
13
+ * into app, mutate `wildo.saas.config.ts > moduleRegistries`,
14
+ * mutate `modules-registry.{shared,frontend,backend}.ts`,
15
+ * update `sections.modules`, run provider sync.
16
+ * - `POST /api/companion/registry/update` — update an installed
17
+ * module to a new version (delta apply + lockfile refresh).
18
+ * - `POST /api/companion/registry/remove` — remove an installed
19
+ * module (delete files, drop sentinel-managed entries, drop
20
+ * `sections.modules.installed[<id>]`).
21
+ * - `POST /api/companion/registry/publish` — stage + zip + upload
22
+ * a local module to its registry (delegates to
23
+ * `ModulePackagerService` + `RegistryServerClient`).
24
+ *
25
+ * Every route returns a `RegistryRouteResultSchema` envelope so
26
+ * the CLI client can handle success / failure / repairable
27
+ * post-mutation provider-sync errors uniformly.
28
+ */
29
+ import { z } from 'zod';
30
+ import { SemverExactSchema } from './module-manifest.schemas.js';
31
+ /**
32
+ * Reason flag forwarded to the provider-sync runner so its
33
+ * diagnostic copy mirrors the calling verb.
34
+ */
35
+ export const RegistryMutationReasonSchema = z.enum([
36
+ 'install',
37
+ 'update',
38
+ 'remove',
39
+ 'adopt',
40
+ ]);
41
+ // ---------- Install -------------------------------------------------------
42
+ export const RegistryInstallRequestSchema = z.strictObject({
43
+ /** Module id (`<domain>/<name>`). */
44
+ moduleId: z.string().min(1),
45
+ /**
46
+ * Resolved exact version. The CLI resolves the range upstream.
47
+ * Must be exact semver — accepting a range here (e.g. `^1.2.3`)
48
+ * would let the lockfile carry a non-resolvable version.
49
+ */
50
+ version: SemverExactSchema,
51
+ /** Range the user originally typed (preserved on the lockfile entry). */
52
+ requestedRange: z.string().min(1).optional(),
53
+ /** Registry id from `wildo.saas.config.ts > moduleRegistries[].id`. */
54
+ registryId: z.string().min(1),
55
+ /** Resolved registry URL at install time. */
56
+ registryUrl: z.url(),
57
+ /** Domain segment under the registry. */
58
+ domain: z.string().min(1),
59
+ /** Artifact integrity digest (`sha256:<64-hex>`). */
60
+ artifactDigest: z.string().min(1),
61
+ });
62
+ // ---------- Update --------------------------------------------------------
63
+ export const RegistryUpdateRequestSchema = z.strictObject({
64
+ moduleId: z.string().min(1),
65
+ /** Target exact version. CLI resolves the range upstream. */
66
+ toVersion: SemverExactSchema,
67
+ toArtifactDigest: z.string().min(1),
68
+ registryId: z.string().min(1),
69
+ });
70
+ // ---------- Remove --------------------------------------------------------
71
+ export const RegistryRemoveRequestSchema = z.strictObject({
72
+ moduleId: z.string().min(1),
73
+ });
74
+ // ---------- Publish -------------------------------------------------------
75
+ /**
76
+ * `GET /v1/auth/whoami` response — what the registry server hands
77
+ * back when a CLI calls `wildo registry login`/`whoami --verify`.
78
+ * The CLI Zod-parses every required field so a misconfigured registry
79
+ * that omits `organizationId` cannot persist a credential with `org=?`.
80
+ *
81
+ * `roles` is optional because not every registry deployment models
82
+ * roles today; when supplied it lands on the per-machine credential
83
+ * blob for staleness UX.
84
+ *
85
+ * 4th-pass review M5: the schema is `.object({...})` (NOT `.strictObject`)
86
+ * so the registry server can add new optional response fields
87
+ * (`tokenIssuedAt`, `lastUsedAt`, etc.) WITHOUT every existing CLI
88
+ * version refusing to authenticate. The CLI still fails-closed on
89
+ * missing required fields; only unknown additional fields are
90
+ * silently dropped on the client side. Forward-compat is the priority
91
+ * here since CLI versions cannot be flushed in lockstep with server
92
+ * deployments.
93
+ */
94
+ export const RegistryWhoamiResponseSchema = z.object({
95
+ organizationId: z.string().min(1),
96
+ apiKeyId: z.string().min(1),
97
+ apiKeyName: z.string().min(1).optional(),
98
+ roles: z.array(z.string().min(1)).optional(),
99
+ });
100
+ export const RegistryPublishRequestSchema = z.strictObject({
101
+ /** Module id from the staged manifest. */
102
+ moduleId: z.string().min(1),
103
+ /** Exact version from the staged manifest — semver-validated. */
104
+ version: SemverExactSchema,
105
+ /** Registry id to publish to. */
106
+ registryId: z.string().min(1),
107
+ /** Domain to publish under. */
108
+ domain: z.string().min(1),
109
+ /** Pre-computed staging digest (matches `Sha256DigestSchema`). */
110
+ artifactDigest: z.string().min(1),
111
+ });
112
+ // ---------- Common result envelope ----------------------------------------
113
+ /**
114
+ * Provider-sync outcome inside a mutation route's response. Mirrors
115
+ * `runProviderSync` return shape (without the always-on path
116
+ * constants — the CLI knows them via `platform-config-lib`).
117
+ */
118
+ export const RegistryProviderSyncOutcomeSchema = z.discriminatedUnion('status', [
119
+ z.strictObject({
120
+ status: z.literal('ok'),
121
+ mode: z.enum(['shell-out', 'dry-run']),
122
+ durationMs: z.number().int().nonnegative(),
123
+ }),
124
+ z.strictObject({
125
+ status: z.literal('failed'),
126
+ // 4th-pass review H4: keep this enum in lock-step with
127
+ // `RegistryProviderSyncFailedError.failureKind` in
128
+ // `registry-errors.ts`. The two are wire-and-error twins — when
129
+ // the companion serializes a typed error into this envelope, the
130
+ // strict-object enum here MUST cover every value the error class
131
+ // can carry. `'timeout'` was added in the third-pass H5 fix on the
132
+ // error-class side without being mirrored here, so a real timeout
133
+ // failed strict validation client-side and surfaced as a generic
134
+ // malformed-payload error.
135
+ failureKind: z.enum([
136
+ 'companion-discovery',
137
+ 'runtime-import-reachability',
138
+ 'invalid-scope',
139
+ 'timeout',
140
+ 'unknown',
141
+ ]),
142
+ message: z.string(),
143
+ stderrTail: z.string().optional(),
144
+ }),
145
+ ]);
146
+ export const RegistryRouteResultSchema = z.strictObject({
147
+ ok: z.boolean(),
148
+ /** Files written into app source (relative to saas root). */
149
+ filesTouched: z.array(z.string()).default([]),
150
+ /** Provider-sync outcome (omitted when not applicable, e.g. publish). */
151
+ providerSync: RegistryProviderSyncOutcomeSchema.optional(),
152
+ /** Free-form diagnostic copy. */
153
+ message: z.string().optional(),
154
+ });
155
+ /**
156
+ * Companion route paths — single source of truth shared by the
157
+ * CLI client and the companion controller.
158
+ */
159
+ export const REGISTRY_COMPANION_ROUTES = {
160
+ install: '/api/companion/registry/install',
161
+ update: '/api/companion/registry/update',
162
+ remove: '/api/companion/registry/remove',
163
+ publish: '/api/companion/registry/publish',
164
+ };
165
+ //# sourceMappingURL=companion-api.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companion-api.schemas.js","sourceRoot":"","sources":["../../../../src/registry/companion-api.schemas.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Wire schemas for the companion's `/api/companion/registry/*`\n * routes.\n *\n * Phase 2 lands the request/response contracts as Zod schemas so\n * both sides (CLI client + companion controller) share the same\n * shape. The CLI calls these via `RegistryCompanionClient`; the\n * companion implements the routes via `RegistryController`.\n *\n * KD-6 (companion owns SaaS-app source mutations) maps to these\n * routes:\n * - `POST /api/companion/registry/install` — copy module source\n * into app, mutate `wildo.saas.config.ts > moduleRegistries`,\n * mutate `modules-registry.{shared,frontend,backend}.ts`,\n * update `sections.modules`, run provider sync.\n * - `POST /api/companion/registry/update` — update an installed\n * module to a new version (delta apply + lockfile refresh).\n * - `POST /api/companion/registry/remove` — remove an installed\n * module (delete files, drop sentinel-managed entries, drop\n * `sections.modules.installed[<id>]`).\n * - `POST /api/companion/registry/publish` — stage + zip + upload\n * a local module to its registry (delegates to\n * `ModulePackagerService` + `RegistryServerClient`).\n *\n * Every route returns a `RegistryRouteResultSchema` envelope so\n * the CLI client can handle success / failure / repairable\n * post-mutation provider-sync errors uniformly.\n */\n\nimport { z } from 'zod';\nimport { SemverExactSchema } from './module-manifest.schemas';\n\n/**\n * Reason flag forwarded to the provider-sync runner so its\n * diagnostic copy mirrors the calling verb.\n */\nexport const RegistryMutationReasonSchema = z.enum([\n 'install',\n 'update',\n 'remove',\n 'adopt',\n]);\nexport type RegistryMutationReason = z.infer<typeof RegistryMutationReasonSchema>;\n\n// ---------- Install -------------------------------------------------------\n\nexport const RegistryInstallRequestSchema = z.strictObject({\n /** Module id (`<domain>/<name>`). */\n moduleId: z.string().min(1),\n /**\n * Resolved exact version. The CLI resolves the range upstream.\n * Must be exact semver — accepting a range here (e.g. `^1.2.3`)\n * would let the lockfile carry a non-resolvable version.\n */\n version: SemverExactSchema,\n /** Range the user originally typed (preserved on the lockfile entry). */\n requestedRange: z.string().min(1).optional(),\n /** Registry id from `wildo.saas.config.ts > moduleRegistries[].id`. */\n registryId: z.string().min(1),\n /** Resolved registry URL at install time. */\n registryUrl: z.url(),\n /** Domain segment under the registry. */\n domain: z.string().min(1),\n /** Artifact integrity digest (`sha256:<64-hex>`). */\n artifactDigest: z.string().min(1),\n});\nexport type RegistryInstallRequest = z.infer<typeof RegistryInstallRequestSchema>;\n\n// ---------- Update --------------------------------------------------------\n\nexport const RegistryUpdateRequestSchema = z.strictObject({\n moduleId: z.string().min(1),\n /** Target exact version. CLI resolves the range upstream. */\n toVersion: SemverExactSchema,\n toArtifactDigest: z.string().min(1),\n registryId: z.string().min(1),\n});\nexport type RegistryUpdateRequest = z.infer<typeof RegistryUpdateRequestSchema>;\n\n// ---------- Remove --------------------------------------------------------\n\nexport const RegistryRemoveRequestSchema = z.strictObject({\n moduleId: z.string().min(1),\n});\nexport type RegistryRemoveRequest = z.infer<typeof RegistryRemoveRequestSchema>;\n\n// ---------- Publish -------------------------------------------------------\n\n/**\n * `GET /v1/auth/whoami` response — what the registry server hands\n * back when a CLI calls `wildo registry login`/`whoami --verify`.\n * The CLI Zod-parses every required field so a misconfigured registry\n * that omits `organizationId` cannot persist a credential with `org=?`.\n *\n * `roles` is optional because not every registry deployment models\n * roles today; when supplied it lands on the per-machine credential\n * blob for staleness UX.\n *\n * 4th-pass review M5: the schema is `.object({...})` (NOT `.strictObject`)\n * so the registry server can add new optional response fields\n * (`tokenIssuedAt`, `lastUsedAt`, etc.) WITHOUT every existing CLI\n * version refusing to authenticate. The CLI still fails-closed on\n * missing required fields; only unknown additional fields are\n * silently dropped on the client side. Forward-compat is the priority\n * here since CLI versions cannot be flushed in lockstep with server\n * deployments.\n */\nexport const RegistryWhoamiResponseSchema = z.object({\n organizationId: z.string().min(1),\n apiKeyId: z.string().min(1),\n apiKeyName: z.string().min(1).optional(),\n roles: z.array(z.string().min(1)).optional(),\n});\nexport type RegistryWhoamiResponse = z.infer<typeof RegistryWhoamiResponseSchema>;\n\nexport const RegistryPublishRequestSchema = z.strictObject({\n /** Module id from the staged manifest. */\n moduleId: z.string().min(1),\n /** Exact version from the staged manifest — semver-validated. */\n version: SemverExactSchema,\n /** Registry id to publish to. */\n registryId: z.string().min(1),\n /** Domain to publish under. */\n domain: z.string().min(1),\n /** Pre-computed staging digest (matches `Sha256DigestSchema`). */\n artifactDigest: z.string().min(1),\n});\nexport type RegistryPublishRequest = z.infer<typeof RegistryPublishRequestSchema>;\n\n// ---------- Common result envelope ----------------------------------------\n\n/**\n * Provider-sync outcome inside a mutation route's response. Mirrors\n * `runProviderSync` return shape (without the always-on path\n * constants — the CLI knows them via `platform-config-lib`).\n */\nexport const RegistryProviderSyncOutcomeSchema = z.discriminatedUnion('status', [\n z.strictObject({\n status: z.literal('ok'),\n mode: z.enum(['shell-out', 'dry-run']),\n durationMs: z.number().int().nonnegative(),\n }),\n z.strictObject({\n status: z.literal('failed'),\n // 4th-pass review H4: keep this enum in lock-step with\n // `RegistryProviderSyncFailedError.failureKind` in\n // `registry-errors.ts`. The two are wire-and-error twins — when\n // the companion serializes a typed error into this envelope, the\n // strict-object enum here MUST cover every value the error class\n // can carry. `'timeout'` was added in the third-pass H5 fix on the\n // error-class side without being mirrored here, so a real timeout\n // failed strict validation client-side and surfaced as a generic\n // malformed-payload error.\n failureKind: z.enum([\n 'companion-discovery',\n 'runtime-import-reachability',\n 'invalid-scope',\n 'timeout',\n 'unknown',\n ]),\n message: z.string(),\n stderrTail: z.string().optional(),\n }),\n]);\nexport type RegistryProviderSyncOutcome = z.infer<typeof RegistryProviderSyncOutcomeSchema>;\n\nexport const RegistryRouteResultSchema = z.strictObject({\n ok: z.boolean(),\n /** Files written into app source (relative to saas root). */\n filesTouched: z.array(z.string()).default([]),\n /** Provider-sync outcome (omitted when not applicable, e.g. publish). */\n providerSync: RegistryProviderSyncOutcomeSchema.optional(),\n /** Free-form diagnostic copy. */\n message: z.string().optional(),\n});\nexport type RegistryRouteResult = z.infer<typeof RegistryRouteResultSchema>;\n\n/**\n * Companion route paths — single source of truth shared by the\n * CLI client and the companion controller.\n */\nexport const REGISTRY_COMPANION_ROUTES = {\n install: '/api/companion/registry/install',\n update: '/api/companion/registry/update',\n remove: '/api/companion/registry/remove',\n publish: '/api/companion/registry/publish',\n} as const;\n"]}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Cryptographic-digest field schemas — single source of truth for
3
+ * artifact integrity references across the module-registry surface.
4
+ *
5
+ * Both the durable lockfile entry (`RegistryModulesLockEntry.
6
+ * artifactDigest`) and the registry-server published-version row
7
+ * (`ModuleVersionRecord.integrity`) carry the same artifact's
8
+ * digest. They MUST agree on format — drift between the two means
9
+ * Phase 5 install verification fails non-deterministically. Hoisted
10
+ * here so any addition (e.g. sha512) lands in one place.
11
+ */
12
+ import { z } from 'zod';
13
+ /**
14
+ * `sha256:<64-hex>` content digest. The hex must be lowercase
15
+ * (npm + most registries normalize to lowercase; uppercase makes
16
+ * direct string comparison brittle).
17
+ */
18
+ export declare const Sha256DigestSchema: z.ZodString;
19
+ export type Sha256Digest = z.infer<typeof Sha256DigestSchema>;
20
+ //# sourceMappingURL=digest.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digest.schemas.d.ts","sourceRoot":"","sources":["../../../../src/registry/digest.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,aAE0C,CAAC;AAC1E,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Cryptographic-digest field schemas — single source of truth for
3
+ * artifact integrity references across the module-registry surface.
4
+ *
5
+ * Both the durable lockfile entry (`RegistryModulesLockEntry.
6
+ * artifactDigest`) and the registry-server published-version row
7
+ * (`ModuleVersionRecord.integrity`) carry the same artifact's
8
+ * digest. They MUST agree on format — drift between the two means
9
+ * Phase 5 install verification fails non-deterministically. Hoisted
10
+ * here so any addition (e.g. sha512) lands in one place.
11
+ */
12
+ import { z } from 'zod';
13
+ /**
14
+ * `sha256:<64-hex>` content digest. The hex must be lowercase
15
+ * (npm + most registries normalize to lowercase; uppercase makes
16
+ * direct string comparison brittle).
17
+ */
18
+ export const Sha256DigestSchema = z
19
+ .string()
20
+ .regex(/^sha256:[0-9a-f]{64}$/, 'expected `sha256:<64-hex-lowercase>`');
21
+ //# sourceMappingURL=digest.schemas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"digest.schemas.js","sourceRoot":"","sources":["../../../../src/registry/digest.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC;KAChC,MAAM,EAAE;KACR,KAAK,CAAC,uBAAuB,EAAE,sCAAsC,CAAC,CAAC","sourcesContent":["/**\n * Cryptographic-digest field schemas — single source of truth for\n * artifact integrity references across the module-registry surface.\n *\n * Both the durable lockfile entry (`RegistryModulesLockEntry.\n * artifactDigest`) and the registry-server published-version row\n * (`ModuleVersionRecord.integrity`) carry the same artifact's\n * digest. They MUST agree on format — drift between the two means\n * Phase 5 install verification fails non-deterministically. Hoisted\n * here so any addition (e.g. sha512) lands in one place.\n */\n\nimport { z } from 'zod';\n\n/**\n * `sha256:<64-hex>` content digest. The hex must be lowercase\n * (npm + most registries normalize to lowercase; uppercase makes\n * direct string comparison brittle).\n */\nexport const Sha256DigestSchema = z\n .string()\n .regex(/^sha256:[0-9a-f]{64}$/, 'expected `sha256:<64-hex-lowercase>`');\nexport type Sha256Digest = z.infer<typeof Sha256DigestSchema>;\n"]}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Module-registry subpackage barrel
3
+ * (per `.claude/plans/module-registry-analysis.md`).
4
+ *
5
+ * Surface:
6
+ * - `RegistryModulesLockSectionSchema` — `sections.modules` payload.
7
+ * - `DEFAULT_REGISTRY_SECTION_SCHEMAS` — CLI default lockfile-section map.
8
+ * - `DEFAULT_LOCAL_REGISTRY_URL` / `DEFAULT_PUBLIC_REGISTRY_URL` /
9
+ * `DEFAULT_LOCAL_REGISTRY_PORT` / `DEFAULT_REGISTRY_ID`.
10
+ * - `ModuleManifestSchema` — `wildo.module.json` contract
11
+ * (engine compat, boundaries, dependsOn buckets per KD-12 + KD-13).
12
+ * - `ModuleVersionRecordSchema` — registry-server published-version row.
13
+ * - `Sha256DigestSchema` — single-source digest field used by
14
+ * both lockfile entries and registry-server records.
15
+ * - `RegistryConfigSchema` — `wildo.saas.config.ts > moduleRegistries`.
16
+ * - `RegistryArtifactVisibility` / `RegistryApiKeyScope` /
17
+ * `RegistryDomainAccessPolicy` — access-control vocabulary.
18
+ * - `RegistryError` family — typed-error vocabulary with
19
+ * stable `code` strings.
20
+ *
21
+ * Phase 2+ adds artifact-staging + companion-mutation contracts.
22
+ */
23
+ export * from './digest.schemas';
24
+ export * from './lockfile-modules-section.schemas';
25
+ export * from './module-manifest.schemas';
26
+ export * from './module-artifact.schemas';
27
+ export * from './artifact-domain.schemas';
28
+ export * from './companion-api.schemas';
29
+ export * from './registry-config.schemas';
30
+ export * from './registry-defaults.constants';
31
+ export * from './registry-errors';
32
+ export * from './registry-section-schemas.constants';
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/registry/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sCAAsC,CAAC"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Module-registry subpackage barrel
3
+ * (per `.claude/plans/module-registry-analysis.md`).
4
+ *
5
+ * Surface:
6
+ * - `RegistryModulesLockSectionSchema` — `sections.modules` payload.
7
+ * - `DEFAULT_REGISTRY_SECTION_SCHEMAS` — CLI default lockfile-section map.
8
+ * - `DEFAULT_LOCAL_REGISTRY_URL` / `DEFAULT_PUBLIC_REGISTRY_URL` /
9
+ * `DEFAULT_LOCAL_REGISTRY_PORT` / `DEFAULT_REGISTRY_ID`.
10
+ * - `ModuleManifestSchema` — `wildo.module.json` contract
11
+ * (engine compat, boundaries, dependsOn buckets per KD-12 + KD-13).
12
+ * - `ModuleVersionRecordSchema` — registry-server published-version row.
13
+ * - `Sha256DigestSchema` — single-source digest field used by
14
+ * both lockfile entries and registry-server records.
15
+ * - `RegistryConfigSchema` — `wildo.saas.config.ts > moduleRegistries`.
16
+ * - `RegistryArtifactVisibility` / `RegistryApiKeyScope` /
17
+ * `RegistryDomainAccessPolicy` — access-control vocabulary.
18
+ * - `RegistryError` family — typed-error vocabulary with
19
+ * stable `code` strings.
20
+ *
21
+ * Phase 2+ adds artifact-staging + companion-mutation contracts.
22
+ */
23
+ export * from './digest.schemas.js';
24
+ export * from './lockfile-modules-section.schemas.js';
25
+ export * from './module-manifest.schemas.js';
26
+ export * from './module-artifact.schemas.js';
27
+ export * from './artifact-domain.schemas.js';
28
+ export * from './companion-api.schemas.js';
29
+ export * from './registry-config.schemas.js';
30
+ export * from './registry-defaults.constants.js';
31
+ export * from './registry-errors.js';
32
+ export * from './registry-section-schemas.constants.js';
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/registry/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,cAAc,kBAAkB,CAAC;AACjC,cAAc,oCAAoC,CAAC;AACnD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sCAAsC,CAAC","sourcesContent":["/**\n * Module-registry subpackage barrel\n * (per `.claude/plans/module-registry-analysis.md`).\n *\n * Surface:\n * - `RegistryModulesLockSectionSchema` — `sections.modules` payload.\n * - `DEFAULT_REGISTRY_SECTION_SCHEMAS` — CLI default lockfile-section map.\n * - `DEFAULT_LOCAL_REGISTRY_URL` / `DEFAULT_PUBLIC_REGISTRY_URL` /\n * `DEFAULT_LOCAL_REGISTRY_PORT` / `DEFAULT_REGISTRY_ID`.\n * - `ModuleManifestSchema` — `wildo.module.json` contract\n * (engine compat, boundaries, dependsOn buckets per KD-12 + KD-13).\n * - `ModuleVersionRecordSchema` — registry-server published-version row.\n * - `Sha256DigestSchema` — single-source digest field used by\n * both lockfile entries and registry-server records.\n * - `RegistryConfigSchema` — `wildo.saas.config.ts > moduleRegistries`.\n * - `RegistryArtifactVisibility` / `RegistryApiKeyScope` /\n * `RegistryDomainAccessPolicy` — access-control vocabulary.\n * - `RegistryError` family — typed-error vocabulary with\n * stable `code` strings.\n *\n * Phase 2+ adds artifact-staging + companion-mutation contracts.\n */\n\nexport * from './digest.schemas';\nexport * from './lockfile-modules-section.schemas';\nexport * from './module-manifest.schemas';\nexport * from './module-artifact.schemas';\nexport * from './artifact-domain.schemas';\nexport * from './companion-api.schemas';\nexport * from './registry-config.schemas';\nexport * from './registry-defaults.constants';\nexport * from './registry-errors';\nexport * from './registry-section-schemas.constants';\n"]}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * `sections.modules` lockfile section — installed-code state for the
3
+ * Wildo module registry.
4
+ *
5
+ * Owns the durable record of which modules a SaaS app has installed,
6
+ * which exact version + artifact digest is on disk, and which files
7
+ * the registry copied in. Sibling lockfile sections (`providers`,
8
+ * `i18n`) live next to this one under the canonical
9
+ * `wildo-saas.lock.json` envelope and are NEVER touched by code that
10
+ * mutates `sections.modules`.
11
+ *
12
+ * The shape mirrors `module-registry-analysis.md` KD-4 / "Lockfile
13
+ * Shape". Fields are intentionally minimal at Phase 0.5 — additional
14
+ * fields must be justified by install/update behavior rather than
15
+ * added preemptively.
16
+ */
17
+ import { z } from 'zod';
18
+ /**
19
+ * Source label recorded with each lockfile entry. Distinguishes
20
+ * registry-installed code from `adopt`-promoted local code; lets the
21
+ * `update`/`remove` flows decide whether overwriting is a safe
22
+ * round-trip or a destructive operation.
23
+ */
24
+ export declare const RegistryModulesInstallSourceSchema: z.ZodEnum<{
25
+ install: "install";
26
+ update: "update";
27
+ adopt: "adopt";
28
+ }>;
29
+ export type RegistryModulesInstallSource = z.infer<typeof RegistryModulesInstallSourceSchema>;
30
+ /**
31
+ * One installed-module record. Keyed by module id in
32
+ * `RegistryModulesLockSectionSchema.installed`.
33
+ */
34
+ export declare const RegistryModulesLockEntrySchema: z.ZodObject<{
35
+ /** Module id, mirrors the manifest's `id` (e.g. `acme/billing`). */
36
+ moduleId: z.ZodString;
37
+ /** Registry id from `wildo.saas.config.ts > moduleRegistries[].id`. */
38
+ registryId: z.ZodString;
39
+ /** Resolved registry URL at install time. Stored for audit + repair. */
40
+ registryUrl: z.ZodString;
41
+ /** Domain segment under the registry (e.g. `acme`). */
42
+ domain: z.ZodString;
43
+ /** Concrete resolved semver — never a range. */
44
+ version: z.ZodString;
45
+ /** Original CLI input (e.g. `^1.2.0`), kept for diff visibility. */
46
+ requestedRange: z.ZodOptional<z.ZodString>;
47
+ /**
48
+ * Artifact integrity digest, format `sha256:<64-hex-lowercase>`.
49
+ * Must match `ModuleVersionRecord.integrity` for the same artifact
50
+ * — both fields share `Sha256DigestSchema` so a Phase 5 install
51
+ * compares like-for-like (M-2.5).
52
+ */
53
+ artifactDigest: z.ZodString;
54
+ /** ISO datetime of install for audit-log purposes. */
55
+ installedAt: z.ZodISODateTime;
56
+ /** File paths copied into app source, relative to saas-root. */
57
+ files: z.ZodDefault<z.ZodArray<z.ZodString>>;
58
+ /** Provenance flag — install vs update vs adopt. */
59
+ source: z.ZodOptional<z.ZodEnum<{
60
+ install: "install";
61
+ update: "update";
62
+ adopt: "adopt";
63
+ }>>;
64
+ }, z.core.$strict>;
65
+ export type RegistryModulesLockEntry = z.infer<typeof RegistryModulesLockEntrySchema>;
66
+ /**
67
+ * `sections.modules` payload. `installed` is keyed by module id.
68
+ *
69
+ * Wrapper kept as a `z.strictObject` so reviewers can find every
70
+ * place that adds a new top-level field; future extensions stay
71
+ * explicit.
72
+ */
73
+ export declare const RegistryModulesLockSectionSchema: z.ZodObject<{
74
+ installed: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
75
+ /** Module id, mirrors the manifest's `id` (e.g. `acme/billing`). */
76
+ moduleId: z.ZodString;
77
+ /** Registry id from `wildo.saas.config.ts > moduleRegistries[].id`. */
78
+ registryId: z.ZodString;
79
+ /** Resolved registry URL at install time. Stored for audit + repair. */
80
+ registryUrl: z.ZodString;
81
+ /** Domain segment under the registry (e.g. `acme`). */
82
+ domain: z.ZodString;
83
+ /** Concrete resolved semver — never a range. */
84
+ version: z.ZodString;
85
+ /** Original CLI input (e.g. `^1.2.0`), kept for diff visibility. */
86
+ requestedRange: z.ZodOptional<z.ZodString>;
87
+ /**
88
+ * Artifact integrity digest, format `sha256:<64-hex-lowercase>`.
89
+ * Must match `ModuleVersionRecord.integrity` for the same artifact
90
+ * — both fields share `Sha256DigestSchema` so a Phase 5 install
91
+ * compares like-for-like (M-2.5).
92
+ */
93
+ artifactDigest: z.ZodString;
94
+ /** ISO datetime of install for audit-log purposes. */
95
+ installedAt: z.ZodISODateTime;
96
+ /** File paths copied into app source, relative to saas-root. */
97
+ files: z.ZodDefault<z.ZodArray<z.ZodString>>;
98
+ /** Provenance flag — install vs update vs adopt. */
99
+ source: z.ZodOptional<z.ZodEnum<{
100
+ install: "install";
101
+ update: "update";
102
+ adopt: "adopt";
103
+ }>>;
104
+ }, z.core.$strict>>>;
105
+ }, z.core.$strict>;
106
+ export type RegistryModulesLockSection = z.infer<typeof RegistryModulesLockSectionSchema>;
107
+ //# sourceMappingURL=lockfile-modules-section.schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lockfile-modules-section.schemas.d.ts","sourceRoot":"","sources":["../../../../src/registry/lockfile-modules-section.schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;GAKG;AACH,eAAO,MAAM,kCAAkC;;;;EAAyC,CAAC;AACzF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F;;;GAGG;AACH,eAAO,MAAM,8BAA8B;IACzC,oEAAoE;;IAEpE,uEAAuE;;IAEvE,wEAAwE;;IAExE,uDAAuD;;IAEvD,gDAAgD;;IAEhD,oEAAoE;;IAEpE;;;;;OAKG;;IAEH,sDAAsD;;IAEtD,gEAAgE;;IAEhE,oDAAoD;;;;;;kBAEpD,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEtF;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC;;QAnC3C,oEAAoE;;QAEpE,uEAAuE;;QAEvE,wEAAwE;;QAExE,uDAAuD;;QAEvD,gDAAgD;;QAEhD,oEAAoE;;QAEpE;;;;;WAKG;;QAEH,sDAAsD;;QAEtD,gEAAgE;;QAEhE,oDAAoD;;;;;;;kBAcpD,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}