@xemahq/xema 0.13.0 → 0.14.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 (331) hide show
  1. package/README.md +68 -20
  2. package/dist/assets/boot-graph.json +57 -15
  3. package/dist/assets/core/distribution.lock.json +667 -297
  4. package/dist/assets/core/images.lock.json +136 -136
  5. package/dist/assets/oss/distribution.lock.json +1497 -461
  6. package/dist/assets/oss/images.lock.json +423 -188
  7. package/dist/cli.d.ts.map +1 -1
  8. package/dist/cli.js +36 -1
  9. package/dist/cli.js.map +1 -1
  10. package/dist/commands/apply.d.ts.map +1 -1
  11. package/dist/commands/apply.js +1 -1
  12. package/dist/commands/apply.js.map +1 -1
  13. package/dist/commands/biome-dev.d.ts +3 -0
  14. package/dist/commands/biome-dev.d.ts.map +1 -0
  15. package/dist/commands/biome-dev.js +176 -0
  16. package/dist/commands/biome-dev.js.map +1 -0
  17. package/dist/commands/biome-validate.d.ts +10 -0
  18. package/dist/commands/biome-validate.d.ts.map +1 -0
  19. package/dist/commands/biome-validate.js +49 -0
  20. package/dist/commands/biome-validate.js.map +1 -0
  21. package/dist/commands/biome.d.ts.map +1 -1
  22. package/dist/commands/biome.js +359 -25
  23. package/dist/commands/biome.js.map +1 -1
  24. package/dist/commands/canopy.d.ts +3 -0
  25. package/dist/commands/canopy.d.ts.map +1 -0
  26. package/dist/commands/canopy.js +214 -0
  27. package/dist/commands/canopy.js.map +1 -0
  28. package/dist/commands/config.d.ts +3 -0
  29. package/dist/commands/config.d.ts.map +1 -0
  30. package/dist/commands/config.js +78 -0
  31. package/dist/commands/config.js.map +1 -0
  32. package/dist/commands/dev.d.ts.map +1 -1
  33. package/dist/commands/dev.js +71 -21
  34. package/dist/commands/dev.js.map +1 -1
  35. package/dist/commands/dist.js +1 -1
  36. package/dist/commands/dist.js.map +1 -1
  37. package/dist/commands/down.d.ts.map +1 -1
  38. package/dist/commands/down.js +40 -6
  39. package/dist/commands/down.js.map +1 -1
  40. package/dist/commands/import.d.ts.map +1 -1
  41. package/dist/commands/import.js +1 -1
  42. package/dist/commands/import.js.map +1 -1
  43. package/dist/commands/installation.d.ts +3 -0
  44. package/dist/commands/installation.d.ts.map +1 -0
  45. package/dist/commands/installation.js +101 -0
  46. package/dist/commands/installation.js.map +1 -0
  47. package/dist/commands/logs.d.ts.map +1 -1
  48. package/dist/commands/logs.js +6 -14
  49. package/dist/commands/logs.js.map +1 -1
  50. package/dist/commands/objects.d.ts.map +1 -1
  51. package/dist/commands/objects.js +85 -6
  52. package/dist/commands/objects.js.map +1 -1
  53. package/dist/commands/plan.d.ts.map +1 -1
  54. package/dist/commands/plan.js +1 -1
  55. package/dist/commands/plan.js.map +1 -1
  56. package/dist/commands/run.d.ts.map +1 -1
  57. package/dist/commands/run.js +61 -9
  58. package/dist/commands/run.js.map +1 -1
  59. package/dist/commands/serve.d.ts.map +1 -1
  60. package/dist/commands/serve.js +33 -13
  61. package/dist/commands/serve.js.map +1 -1
  62. package/dist/commands/shell.d.ts.map +1 -1
  63. package/dist/commands/shell.js +190 -6
  64. package/dist/commands/shell.js.map +1 -1
  65. package/dist/commands/source.d.ts +3 -0
  66. package/dist/commands/source.d.ts.map +1 -0
  67. package/dist/commands/source.js +120 -0
  68. package/dist/commands/source.js.map +1 -0
  69. package/dist/commands/status.d.ts.map +1 -1
  70. package/dist/commands/status.js +29 -3
  71. package/dist/commands/status.js.map +1 -1
  72. package/dist/commands/up.d.ts.map +1 -1
  73. package/dist/commands/up.js +55 -5
  74. package/dist/commands/up.js.map +1 -1
  75. package/dist/dev/env-defaults.d.ts.map +1 -1
  76. package/dist/dev/env-defaults.js +9 -6
  77. package/dist/dev/env-defaults.js.map +1 -1
  78. package/dist/dev/forked-worker.d.ts +15 -0
  79. package/dist/dev/forked-worker.d.ts.map +1 -1
  80. package/dist/dev/forked-worker.js +72 -14
  81. package/dist/dev/forked-worker.js.map +1 -1
  82. package/dist/dev/opa-policies.d.ts +3 -0
  83. package/dist/dev/opa-policies.d.ts.map +1 -0
  84. package/dist/dev/opa-policies.js +64 -0
  85. package/dist/dev/opa-policies.js.map +1 -0
  86. package/dist/lib/cli-errors.d.ts +7 -0
  87. package/dist/lib/cli-errors.d.ts.map +1 -0
  88. package/dist/lib/cli-errors.js +30 -0
  89. package/dist/lib/cli-errors.js.map +1 -0
  90. package/dist/lib/control-plane.d.ts.map +1 -1
  91. package/dist/lib/control-plane.js +5 -2
  92. package/dist/lib/control-plane.js.map +1 -1
  93. package/dist/lib/exit-codes.d.ts +3 -4
  94. package/dist/lib/exit-codes.d.ts.map +1 -1
  95. package/dist/lib/exit-codes.js +3 -4
  96. package/dist/lib/exit-codes.js.map +1 -1
  97. package/dist/lib/http-error.d.ts +2 -0
  98. package/dist/lib/http-error.d.ts.map +1 -0
  99. package/dist/lib/http-error.js +51 -0
  100. package/dist/lib/http-error.js.map +1 -0
  101. package/dist/lib/roster-profile.d.ts +10 -0
  102. package/dist/lib/roster-profile.d.ts.map +1 -0
  103. package/dist/lib/roster-profile.js +44 -0
  104. package/dist/lib/roster-profile.js.map +1 -0
  105. package/dist/runtime/biome-dev.d.ts +28 -0
  106. package/dist/runtime/biome-dev.d.ts.map +1 -0
  107. package/dist/runtime/biome-dev.js +131 -0
  108. package/dist/runtime/biome-dev.js.map +1 -0
  109. package/dist/runtime/biome-local-install.d.ts +29 -0
  110. package/dist/runtime/biome-local-install.d.ts.map +1 -0
  111. package/dist/runtime/biome-local-install.js +243 -0
  112. package/dist/runtime/biome-local-install.js.map +1 -0
  113. package/dist/runtime/biome-publish.d.ts +34 -0
  114. package/dist/runtime/biome-publish.d.ts.map +1 -0
  115. package/dist/runtime/biome-publish.js +214 -0
  116. package/dist/runtime/biome-publish.js.map +1 -0
  117. package/dist/runtime/biome-scaffold.d.ts +35 -0
  118. package/dist/runtime/biome-scaffold.d.ts.map +1 -0
  119. package/dist/runtime/biome-scaffold.js +153 -0
  120. package/dist/runtime/biome-scaffold.js.map +1 -0
  121. package/dist/runtime/biome-validate.d.ts +28 -0
  122. package/dist/runtime/biome-validate.d.ts.map +1 -0
  123. package/dist/runtime/biome-validate.js +450 -0
  124. package/dist/runtime/biome-validate.js.map +1 -0
  125. package/dist/runtime/boot-graph-loader.d.ts +1 -0
  126. package/dist/runtime/boot-graph-loader.d.ts.map +1 -1
  127. package/dist/runtime/boot-graph-loader.js +99 -7
  128. package/dist/runtime/boot-graph-loader.js.map +1 -1
  129. package/dist/runtime/canopy-refs.d.ts +8 -0
  130. package/dist/runtime/canopy-refs.d.ts.map +1 -0
  131. package/dist/runtime/canopy-refs.js +51 -0
  132. package/dist/runtime/canopy-refs.js.map +1 -0
  133. package/dist/runtime/canopy-replies.d.ts +14 -0
  134. package/dist/runtime/canopy-replies.d.ts.map +1 -0
  135. package/dist/runtime/canopy-replies.js +39 -0
  136. package/dist/runtime/canopy-replies.js.map +1 -0
  137. package/dist/runtime/capability-invoke.d.ts +35 -0
  138. package/dist/runtime/capability-invoke.d.ts.map +1 -0
  139. package/dist/runtime/capability-invoke.js +119 -0
  140. package/dist/runtime/capability-invoke.js.map +1 -0
  141. package/dist/runtime/config/dev-mode.d.ts +8 -0
  142. package/dist/runtime/config/dev-mode.d.ts.map +1 -0
  143. package/dist/runtime/config/dev-mode.js +84 -0
  144. package/dist/runtime/config/dev-mode.js.map +1 -0
  145. package/dist/runtime/config/init-presets.d.ts +1 -1
  146. package/dist/runtime/config/init-presets.d.ts.map +1 -1
  147. package/dist/runtime/config/init-presets.js +63 -11
  148. package/dist/runtime/config/init-presets.js.map +1 -1
  149. package/dist/runtime/config/loader.d.ts +1 -0
  150. package/dist/runtime/config/loader.d.ts.map +1 -1
  151. package/dist/runtime/config/loader.js +41 -5
  152. package/dist/runtime/config/loader.js.map +1 -1
  153. package/dist/runtime/config/schema.d.ts +27 -12
  154. package/dist/runtime/config/schema.d.ts.map +1 -1
  155. package/dist/runtime/config/schema.js +113 -8
  156. package/dist/runtime/config/schema.js.map +1 -1
  157. package/dist/runtime/config/sources-config.d.ts +14 -0
  158. package/dist/runtime/config/sources-config.d.ts.map +1 -0
  159. package/dist/runtime/config/sources-config.js +79 -0
  160. package/dist/runtime/config/sources-config.js.map +1 -0
  161. package/dist/runtime/distribution/compose.d.ts.map +1 -1
  162. package/dist/runtime/distribution/compose.js +3 -1
  163. package/dist/runtime/distribution/compose.js.map +1 -1
  164. package/dist/runtime/env-seeder.d.ts +5 -0
  165. package/dist/runtime/env-seeder.d.ts.map +1 -1
  166. package/dist/runtime/env-seeder.js +118 -16
  167. package/dist/runtime/env-seeder.js.map +1 -1
  168. package/dist/runtime/foreground.d.ts +4 -0
  169. package/dist/runtime/foreground.d.ts.map +1 -1
  170. package/dist/runtime/foreground.js +11 -0
  171. package/dist/runtime/foreground.js.map +1 -1
  172. package/dist/runtime/infra/infra-catalog.d.ts +1 -0
  173. package/dist/runtime/infra/infra-catalog.d.ts.map +1 -1
  174. package/dist/runtime/infra/infra-catalog.js +2 -1
  175. package/dist/runtime/infra/infra-catalog.js.map +1 -1
  176. package/dist/runtime/infra/infra-runner.d.ts +5 -0
  177. package/dist/runtime/infra/infra-runner.d.ts.map +1 -1
  178. package/dist/runtime/infra/infra-runner.js +82 -13
  179. package/dist/runtime/infra/infra-runner.js.map +1 -1
  180. package/dist/runtime/installation/compiler.d.ts +37 -0
  181. package/dist/runtime/installation/compiler.d.ts.map +1 -0
  182. package/dist/runtime/installation/compiler.js +190 -0
  183. package/dist/runtime/installation/compiler.js.map +1 -0
  184. package/dist/runtime/installation/contract.d.ts +125 -0
  185. package/dist/runtime/installation/contract.d.ts.map +1 -0
  186. package/dist/runtime/installation/contract.js +182 -0
  187. package/dist/runtime/installation/contract.js.map +1 -0
  188. package/dist/runtime/installation/diagnostics.d.ts +16 -0
  189. package/dist/runtime/installation/diagnostics.d.ts.map +1 -0
  190. package/dist/runtime/installation/diagnostics.js +21 -0
  191. package/dist/runtime/installation/diagnostics.js.map +1 -0
  192. package/dist/runtime/installation/diff.d.ts +17 -0
  193. package/dist/runtime/installation/diff.d.ts.map +1 -0
  194. package/dist/runtime/installation/diff.js +99 -0
  195. package/dist/runtime/installation/diff.js.map +1 -0
  196. package/dist/runtime/installation/format.d.ts +3 -0
  197. package/dist/runtime/installation/format.d.ts.map +1 -0
  198. package/dist/runtime/installation/format.js +22 -0
  199. package/dist/runtime/installation/format.js.map +1 -0
  200. package/dist/runtime/installation/from-current-config.d.ts +8 -0
  201. package/dist/runtime/installation/from-current-config.d.ts.map +1 -0
  202. package/dist/runtime/installation/from-current-config.js +75 -0
  203. package/dist/runtime/installation/from-current-config.js.map +1 -0
  204. package/dist/runtime/installation/index.d.ts +13 -0
  205. package/dist/runtime/installation/index.d.ts.map +1 -0
  206. package/dist/runtime/installation/index.js +29 -0
  207. package/dist/runtime/installation/index.js.map +1 -0
  208. package/dist/runtime/installation/lifecycle.d.ts +23 -0
  209. package/dist/runtime/installation/lifecycle.d.ts.map +1 -0
  210. package/dist/runtime/installation/lifecycle.js +70 -0
  211. package/dist/runtime/installation/lifecycle.js.map +1 -0
  212. package/dist/runtime/installation/serialization.d.ts +3 -0
  213. package/dist/runtime/installation/serialization.d.ts.map +1 -0
  214. package/dist/runtime/installation/serialization.js +39 -0
  215. package/dist/runtime/installation/serialization.js.map +1 -0
  216. package/dist/runtime/installation/state-store.d.ts +20 -0
  217. package/dist/runtime/installation/state-store.d.ts.map +1 -0
  218. package/dist/runtime/installation/state-store.js +257 -0
  219. package/dist/runtime/installation/state-store.js.map +1 -0
  220. package/dist/runtime/installation/status.d.ts +30 -0
  221. package/dist/runtime/installation/status.d.ts.map +1 -0
  222. package/dist/runtime/installation/status.js +138 -0
  223. package/dist/runtime/installation/status.js.map +1 -0
  224. package/dist/runtime/installation/support-bundle.d.ts +30 -0
  225. package/dist/runtime/installation/support-bundle.d.ts.map +1 -0
  226. package/dist/runtime/installation/support-bundle.js +130 -0
  227. package/dist/runtime/installation/support-bundle.js.map +1 -0
  228. package/dist/runtime/installation/validation.d.ts +8 -0
  229. package/dist/runtime/installation/validation.d.ts.map +1 -0
  230. package/dist/runtime/installation/validation.js +39 -0
  231. package/dist/runtime/installation/validation.js.map +1 -0
  232. package/dist/runtime/installation/validators/common.d.ts +4 -0
  233. package/dist/runtime/installation/validators/common.d.ts.map +1 -0
  234. package/dist/runtime/installation/validators/common.js +29 -0
  235. package/dist/runtime/installation/validators/common.js.map +1 -0
  236. package/dist/runtime/installation/validators/infrastructure.d.ts +4 -0
  237. package/dist/runtime/installation/validators/infrastructure.d.ts.map +1 -0
  238. package/dist/runtime/installation/validators/infrastructure.js +78 -0
  239. package/dist/runtime/installation/validators/infrastructure.js.map +1 -0
  240. package/dist/runtime/installation/validators/operational.d.ts +4 -0
  241. package/dist/runtime/installation/validators/operational.d.ts.map +1 -0
  242. package/dist/runtime/installation/validators/operational.js +126 -0
  243. package/dist/runtime/installation/validators/operational.js.map +1 -0
  244. package/dist/runtime/installation/validators/profile.d.ts +4 -0
  245. package/dist/runtime/installation/validators/profile.d.ts.map +1 -0
  246. package/dist/runtime/installation/validators/profile.js +78 -0
  247. package/dist/runtime/installation/validators/profile.js.map +1 -0
  248. package/dist/runtime/installation/validators/secrets.d.ts +4 -0
  249. package/dist/runtime/installation/validators/secrets.d.ts.map +1 -0
  250. package/dist/runtime/installation/validators/secrets.js +68 -0
  251. package/dist/runtime/installation/validators/secrets.js.map +1 -0
  252. package/dist/runtime/launch-plan-format.d.ts +3 -0
  253. package/dist/runtime/launch-plan-format.d.ts.map +1 -0
  254. package/dist/runtime/launch-plan-format.js +57 -0
  255. package/dist/runtime/launch-plan-format.js.map +1 -0
  256. package/dist/runtime/launch.d.ts +25 -3
  257. package/dist/runtime/launch.d.ts.map +1 -1
  258. package/dist/runtime/launch.js +264 -24
  259. package/dist/runtime/launch.js.map +1 -1
  260. package/dist/runtime/object-registry-client.d.ts +31 -0
  261. package/dist/runtime/object-registry-client.d.ts.map +1 -0
  262. package/dist/runtime/object-registry-client.js +54 -0
  263. package/dist/runtime/object-registry-client.js.map +1 -0
  264. package/dist/runtime/paths.d.ts +1 -0
  265. package/dist/runtime/paths.d.ts.map +1 -1
  266. package/dist/runtime/paths.js +2 -0
  267. package/dist/runtime/paths.js.map +1 -1
  268. package/dist/runtime/roster.d.ts +10 -4
  269. package/dist/runtime/roster.d.ts.map +1 -1
  270. package/dist/runtime/roster.js +73 -7
  271. package/dist/runtime/roster.js.map +1 -1
  272. package/dist/runtime/run-manifest.d.ts +23 -0
  273. package/dist/runtime/run-manifest.d.ts.map +1 -0
  274. package/dist/runtime/run-manifest.js +273 -0
  275. package/dist/runtime/run-manifest.js.map +1 -0
  276. package/dist/runtime/runner/container-runner.d.ts +6 -0
  277. package/dist/runtime/runner/container-runner.d.ts.map +1 -1
  278. package/dist/runtime/runner/container-runner.js +25 -6
  279. package/dist/runtime/runner/container-runner.js.map +1 -1
  280. package/dist/runtime/runner/docker-cli.d.ts +6 -1
  281. package/dist/runtime/runner/docker-cli.d.ts.map +1 -1
  282. package/dist/runtime/runner/docker-cli.js +47 -6
  283. package/dist/runtime/runner/docker-cli.js.map +1 -1
  284. package/dist/runtime/runner/native-runner.d.ts.map +1 -1
  285. package/dist/runtime/runner/native-runner.js +21 -14
  286. package/dist/runtime/runner/native-runner.js.map +1 -1
  287. package/dist/runtime/secrets/managed-local-store.d.ts +26 -0
  288. package/dist/runtime/secrets/managed-local-store.d.ts.map +1 -0
  289. package/dist/runtime/secrets/managed-local-store.js +202 -0
  290. package/dist/runtime/secrets/managed-local-store.js.map +1 -0
  291. package/dist/runtime/secrets/resolver.d.ts +23 -0
  292. package/dist/runtime/secrets/resolver.d.ts.map +1 -0
  293. package/dist/runtime/secrets/resolver.js +265 -0
  294. package/dist/runtime/secrets/resolver.js.map +1 -0
  295. package/dist/runtime/secrets/url-security.d.ts +3 -0
  296. package/dist/runtime/secrets/url-security.d.ts.map +1 -0
  297. package/dist/runtime/secrets/url-security.js +13 -0
  298. package/dist/runtime/secrets/url-security.js.map +1 -0
  299. package/dist/runtime/sources/credentials.d.ts.map +1 -1
  300. package/dist/runtime/sources/credentials.js +2 -1
  301. package/dist/runtime/sources/credentials.js.map +1 -1
  302. package/dist/runtime/sources/kinds/git.d.ts +6 -3
  303. package/dist/runtime/sources/kinds/git.d.ts.map +1 -1
  304. package/dist/runtime/sources/kinds/git.js +99 -22
  305. package/dist/runtime/sources/kinds/git.js.map +1 -1
  306. package/dist/runtime/sources/resolve-context.d.ts +7 -0
  307. package/dist/runtime/sources/resolve-context.d.ts.map +1 -0
  308. package/dist/runtime/sources/resolve-context.js +3 -0
  309. package/dist/runtime/sources/resolve-context.js.map +1 -0
  310. package/dist/runtime/sources/resolver.d.ts +2 -2
  311. package/dist/runtime/sources/resolver.d.ts.map +1 -1
  312. package/dist/runtime/sources/resolver.js +11 -5
  313. package/dist/runtime/sources/resolver.js.map +1 -1
  314. package/dist/runtime/store-client.d.ts +59 -0
  315. package/dist/runtime/store-client.d.ts.map +1 -0
  316. package/dist/runtime/store-client.js +71 -0
  317. package/dist/runtime/store-client.js.map +1 -0
  318. package/dist/runtime/supervisor.d.ts +6 -0
  319. package/dist/runtime/supervisor.d.ts.map +1 -1
  320. package/dist/runtime/supervisor.js +37 -5
  321. package/dist/runtime/supervisor.js.map +1 -1
  322. package/dist/runtime/waves.d.ts +1 -1
  323. package/dist/runtime/waves.d.ts.map +1 -1
  324. package/dist/runtime/waves.js +86 -19
  325. package/dist/runtime/waves.js.map +1 -1
  326. package/examples/01-local-native.yaml +4 -1
  327. package/examples/03-byo-infra.yaml +17 -7
  328. package/examples/05-appliance-helm.yaml +1 -1
  329. package/examples/06-biome-sources.yaml +4 -1
  330. package/package.json +6 -5
  331. package/xema.config.example.yaml +22 -18
package/README.md CHANGED
@@ -86,6 +86,23 @@ xema status # show launcher-owned workloads + health
86
86
  xema logs <service> -f # stream a service's logs
87
87
  ```
88
88
 
89
+ The launcher and automation use the same compiled desired state. The
90
+ installation command group exposes that lifecycle directly:
91
+
92
+ ```bash
93
+ xema installation plan # deterministic redacted change plan
94
+ xema installation apply --detach # reconcile through the same launcher as `xema up`
95
+ xema installation status # desired vs applied vs observed drift
96
+ xema installation support-bundle # redacted JSON + SHA-256 integrity manifest
97
+ ```
98
+
99
+ Destructive transitions are refused unless explicitly reviewed and authorized
100
+ with `--allow-destructive`; rejected identity/schema transitions and currently
101
+ unsupported profiles remain fail-fast. Last-applied state is atomically stored
102
+ under `~/.xema/installations/<installation-id>/`, while secret values are
103
+ resolved before source or deployment side effects and are never persisted in
104
+ plans or support bundles.
105
+
89
106
  ### Topology — `xema.config.yaml`
90
107
 
91
108
  The launcher reads an optional `xema.config.yaml` (or `~/.xema/config.yaml`)
@@ -96,17 +113,24 @@ provide the URL), or `disabled`:
96
113
  ```yaml
97
114
  edition: oss
98
115
  infra:
99
- postgres: { mode: managed }
100
- redis: { mode: managed }
101
- etcd: { mode: managed }
102
- keycloak: { mode: external, url: https://sso.corp/realms/xema, realm: xema }
116
+ postgres:
117
+ {
118
+ mode: external,
119
+ url: postgresql://xema@db.corp:5432,
120
+ secretRef: postgres-password,
121
+ }
122
+ redis: { mode: managed }
123
+ etcd: { mode: managed }
124
+ keycloak: { mode: external, url: https://sso.corp/realms/xema, realm: xema }
103
125
  objectStore: { mode: external, url: https://s3.corp }
104
- search: { mode: managed }
105
- temporal: { mode: managed }
126
+ search: { mode: managed }
127
+ temporal: { mode: managed }
128
+ secrets:
129
+ postgres-password: { from: env, env: XEMA_POSTGRES_PASSWORD }
106
130
  app:
107
- substrate: container # container | native
108
- include: [ all ] # all | <tier> | [service ...]
109
- features: [] # curated capability bundles
131
+ substrate: container # container | native
132
+ include: [all] # all | default | minimal | <tier> | [service ...]
133
+ features: [] # curated capability bundles
110
134
  web: { enabled: true }
111
135
  ```
112
136
 
@@ -114,14 +138,38 @@ app:
114
138
  (`imageRef:contentHash`) and runs them on a shared network, after bringing up
115
139
  and bootstrapping managed infra — works without a monorepo checkout.
116
140
  - **`native`**: runs services as host processes against a built monorepo (the
117
- contributor inner loop). Equivalent: `xema serve --profile single-instance`.
141
+ contributor inner loop). Equivalent: `xema serve --substrate single-instance`.
118
142
  - **`helm`**: deploys to Kubernetes via `helm upgrade --install` (the appliance /
119
- cluster target). Equivalent: `xema serve --profile appliance`.
143
+ cluster target). Equivalent: `xema serve --substrate appliance`.
120
144
 
121
145
  `xema up` fails fast on a missing required secret, an unreachable `external`
122
146
  dependency, or a disabled-but-mandatory infra component — never a silent
123
147
  degradation.
124
148
 
149
+ Managed local PostgreSQL and object-store credentials are generated uniquely
150
+ per installation and retained under
151
+ `~/.xema/installations/<installation-id>/managed-local-credentials.json` with
152
+ directory mode `0700` and file mode `0600`. Repeated and concurrent launches
153
+ reuse the same credentials; values are not written to config or command
154
+ arguments. `xema down` preserves them with the data volumes, while
155
+ `xema down --purge` removes both. A named volume created by an older CLI with
156
+ fixed development credentials fails fast and requires that explicit purge
157
+ before its first launch with credential custody.
158
+
159
+ External PostgreSQL credentials are never defaulted or persisted in the
160
+ endpoint URL. Put the username in the URL and source the password through
161
+ `secretRef`. A referenced secret must be declared under
162
+ `secrets` and resolve from `env`, `file`, or an interactive masked `prompt`
163
+ before Xema creates any deployment resources.
164
+
165
+ Secret names that are valid environment-variable names are intentionally
166
+ injected into every native/container service in the launch. Use a non-environment
167
+ name such as `postgres-password` for launcher-only `secretRef` values. File
168
+ sources must be regular, non-symlink files with no group/other permissions
169
+ (`0600` or stricter); relative paths resolve from the directory containing
170
+ `xema.config.yaml`. The Helm substrate does not accept launcher-resolved
171
+ secrets: configure Kubernetes Secrets through each service chart instead.
172
+
125
173
  ### Realtime dev
126
174
 
127
175
  Xema always runs the `distributed` model: every service is its own process and
@@ -143,8 +191,8 @@ lone service still boots a correct graph:
143
191
 
144
192
  ```bash
145
193
  xema dev agent-session-api memory-api # native: just these two (+ prerequisites)
146
- xema up --only app-runtime-api # container: one service (+ prerequisites)
147
- xema serve --profile cluster --only audit-log-api
194
+ xema up --only app-platform-api # container: one service (+ prerequisites)
195
+ xema serve --substrate cluster --only audit-log-api
148
196
  ```
149
197
 
150
198
  ### Biome sources — pull biomes from many origins
@@ -155,22 +203,22 @@ each with its own auth — declared in a `sources:` block:
155
203
 
156
204
  ```yaml
157
205
  sources:
158
- - name: workspace # local working tree (monorepo): always wins
206
+ - name: workspace # local working tree (monorepo): always wins
159
207
  kind: workspace
160
- - name: cultivars # a pinned edition lock
208
+ - name: cultivars # a pinned edition lock
161
209
  kind: distribution
162
210
  edition: cultivars
163
- - name: acme # a client's OWN biome git repo (private)
211
+ - name: acme # a client's OWN biome git repo (private)
164
212
  kind: git
165
213
  url: https://github.com/acme/xema-biomes.git
166
214
  ref: v2.1.0
167
- authTokenEnv: GIT_TOKEN_ACME # env-var NAME, never the secret
215
+ authTokenEnv: GIT_TOKEN_ACME # env-var NAME, never the secret
168
216
  ```
169
217
 
170
218
  Precedence: **`workspace` > other sources (declared order) > base distribution**.
171
219
  In a monorepo checkout the workspace source always wins, so `xema dev` runs your
172
220
  local edits with **no publish** and **no token** required. Tokens for private
173
- sources are referenced by env-var *name* (the `biome-fetcher` convention) and
221
+ sources are referenced by env-var _name_ (the `biome-fetcher` convention) and
174
222
  resolved from the environment or a git-ignored `~/.xema/credentials.env` — never
175
223
  inlined in config. `npm`/`oci` sources are install-time (the `xema biome install`
176
224
  path); `workspace`/`distribution`/`git` boot directly from `xema up`/`dev`.
@@ -189,8 +237,8 @@ Sources discover biomes by walking for `xema-biome.json` — a repo may hold ONE
189
237
  biome at its root or MANY nested; both are valid layouts of the **same
190
238
  standard**. A biome is a directory with a manifest at its root; its services
191
239
  live at the manifest-declared `ships.apis[].path` (convention `./api/<name>`).
192
- What a biome *does* (services, skills, capabilities, agents) is wholly open —
193
- only the bundle *shape* is standardized, so every author builds the same way and
240
+ What a biome _does_ (services, skills, capabilities, agents) is wholly open —
241
+ only the bundle _shape_ is standardized, so every author builds the same way and
194
242
  any source resolves the same way.
195
243
 
196
244
  ## Compose a distribution — `xema dist build`
@@ -1,12 +1,12 @@
1
1
  {
2
- "$comment": "Declarative source of truth for system-authority STARTUP dependencies (Gate A, plan .claude/plans/federated-crunching-thompson.md Phase 1.5). Consumed by tooling/boundaries/check-boot-graph.mjs. Human-prose rationale + degraded behavior lives in docs/architecture/system-boot-graph.md keep the two in lockstep. INVARIANT: no service may HARD-REQUIRE a higher- or same-boot-tier service at startup; the hard-require graph must be acyclic. 'startupRequires' lists ONLY hard boot-blocking deps (the service refuses to come up / crash-loops until each is reachable). Lazy/at-request-time deps are NOT listed here they are captured as 'degraded' prose in the doc. Boot tiers (lower boots first): infra(-1) < kernel(0) < system(1) < base(2) < platform(3) < third-party(4). 'infra' = submodules + external generic plane (identity-api, event-hub, secrets, llm-gateway, keycloak, postgres, valkey, kernel-state/etcd) which always boot before the Xema service mesh and can never participate in a service-mesh cycle.",
2
+ "$comment": "Declarative source of truth for system-authority STARTUP dependencies (Gate A, plan .claude/plans/federated-crunching-thompson.md Phase 1.5). Consumed by tooling/boundaries/check-boot-graph.mjs. Human-prose rationale + degraded behavior lives in docs/architecture/system-boot-graph.md \u2014 keep the two in lockstep. INVARIANT: no service may HARD-REQUIRE a higher- or same-boot-tier service at startup; the hard-require graph must be acyclic. 'startupRequires' lists ONLY hard boot-blocking deps (the service refuses to come up / crash-loops until each is reachable). Lazy/at-request-time deps are NOT listed here \u2014 they are captured as 'degraded' prose in the doc. Boot tiers (lower boots first): infra(-1) < kernel(0) < system(1) < base(2) < platform(3) < edge(4). 'infra' = submodules + external generic plane (identity-api, event-hub, secrets, llm-gateway, keycloak, postgres, valkey, kernel-state/etcd) which always boot before the Xema service mesh and can never participate in a service-mesh cycle.",
3
3
  "tiers": {
4
4
  "infra": -1,
5
5
  "kernel": 0,
6
6
  "system": 1,
7
7
  "base": 2,
8
8
  "platform": 3,
9
- "third-party": 4
9
+ "edge": 4
10
10
  },
11
11
  "infraServices": [
12
12
  "identity-api",
@@ -18,27 +18,49 @@
18
18
  "services": {
19
19
  "authorization-api": {
20
20
  "tier": "system",
21
- "startupRequires": ["identity-api"]
21
+ "startupRequires": [
22
+ "identity-api",
23
+ "org-database-pool-api"
24
+ ]
25
+ },
26
+ "canopy-api": {
27
+ "tier": "base",
28
+ "startupRequires": [
29
+ "identity-api",
30
+ "org-database-pool-api"
31
+ ]
22
32
  },
23
33
  "object-registry-api": {
24
34
  "tier": "system",
25
- "startupRequires": ["identity-api"]
35
+ "startupRequires": [
36
+ "identity-api"
37
+ ]
26
38
  },
27
39
  "capability-registry-api": {
28
40
  "tier": "system",
29
- "startupRequires": ["identity-api"]
41
+ "startupRequires": [
42
+ "identity-api",
43
+ "org-database-pool-api"
44
+ ]
30
45
  },
31
46
  "user-hub-api": {
32
- "tier": "system",
33
- "startupRequires": ["identity-api"]
47
+ "tier": "base",
48
+ "startupRequires": [
49
+ "identity-api",
50
+ "org-database-pool-api"
51
+ ]
34
52
  },
35
53
  "public-gateway-api": {
36
54
  "tier": "system",
37
- "startupRequires": ["identity-api"]
55
+ "startupRequires": [
56
+ "identity-api"
57
+ ]
38
58
  },
39
59
  "xema-shell-api": {
40
60
  "tier": "system",
41
- "startupRequires": ["identity-api"]
61
+ "startupRequires": [
62
+ "identity-api"
63
+ ]
42
64
  },
43
65
  "xema-capability-router": {
44
66
  "tier": "system",
@@ -46,27 +68,47 @@
46
68
  },
47
69
  "biome-host-api": {
48
70
  "tier": "system",
49
- "startupRequires": ["identity-api"]
71
+ "startupRequires": [
72
+ "identity-api",
73
+ "org-database-pool-api"
74
+ ]
50
75
  },
51
76
  "workload-runtime-api": {
52
77
  "tier": "system",
53
- "startupRequires": ["identity-api"]
78
+ "startupRequires": [
79
+ "identity-api",
80
+ "org-database-pool-api"
81
+ ]
54
82
  },
55
83
  "xema-biome-runner": {
56
- "tier": "system",
57
- "startupRequires": ["identity-api"]
84
+ "tier": "base",
85
+ "startupRequires": [
86
+ "identity-api"
87
+ ]
58
88
  },
59
89
  "project-registry-api": {
60
90
  "tier": "base",
61
- "startupRequires": ["identity-api"]
91
+ "startupRequires": [
92
+ "identity-api",
93
+ "org-database-pool-api"
94
+ ]
62
95
  },
63
96
  "space-registry-api": {
64
97
  "tier": "system",
65
- "startupRequires": ["identity-api"]
98
+ "startupRequires": [
99
+ "identity-api",
100
+ "org-database-pool-api"
101
+ ]
66
102
  },
67
103
  "xema-kernel-server": {
68
104
  "tier": "kernel",
69
105
  "startupRequires": []
106
+ },
107
+ "org-database-pool-api": {
108
+ "tier": "kernel",
109
+ "startupRequires": [
110
+ "identity-api"
111
+ ]
70
112
  }
71
113
  }
72
114
  }