@xemahq/xema 0.9.0 → 0.10.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 (45) hide show
  1. package/README.md +6 -15
  2. package/dist/commands/dev.d.ts.map +1 -1
  3. package/dist/commands/dev.js +4 -10
  4. package/dist/commands/dev.js.map +1 -1
  5. package/dist/commands/doctor.d.ts.map +1 -1
  6. package/dist/commands/doctor.js +5 -25
  7. package/dist/commands/doctor.js.map +1 -1
  8. package/dist/commands/up.d.ts.map +1 -1
  9. package/dist/commands/up.js +0 -5
  10. package/dist/commands/up.js.map +1 -1
  11. package/dist/dev/env-defaults.d.ts +1 -1
  12. package/dist/dev/env-defaults.d.ts.map +1 -1
  13. package/dist/dev/env-defaults.js +13 -44
  14. package/dist/dev/env-defaults.js.map +1 -1
  15. package/dist/dev/infra-preflight.d.ts +1 -0
  16. package/dist/dev/infra-preflight.d.ts.map +1 -1
  17. package/dist/dev/infra-preflight.js +12 -2
  18. package/dist/dev/infra-preflight.js.map +1 -1
  19. package/dist/runtime/backing-registration.d.ts +10 -0
  20. package/dist/runtime/backing-registration.d.ts.map +1 -0
  21. package/dist/runtime/backing-registration.js +102 -0
  22. package/dist/runtime/backing-registration.js.map +1 -0
  23. package/dist/runtime/config/init-presets.d.ts +0 -1
  24. package/dist/runtime/config/init-presets.d.ts.map +1 -1
  25. package/dist/runtime/config/init-presets.js +0 -31
  26. package/dist/runtime/config/init-presets.js.map +1 -1
  27. package/dist/runtime/config/schema.d.ts +1 -2
  28. package/dist/runtime/config/schema.d.ts.map +1 -1
  29. package/dist/runtime/config/schema.js +0 -1
  30. package/dist/runtime/config/schema.js.map +1 -1
  31. package/dist/runtime/env-seeder.d.ts.map +1 -1
  32. package/dist/runtime/env-seeder.js +4 -16
  33. package/dist/runtime/env-seeder.js.map +1 -1
  34. package/dist/runtime/launch.d.ts.map +1 -1
  35. package/dist/runtime/launch.js +43 -13
  36. package/dist/runtime/launch.js.map +1 -1
  37. package/dist/runtime/runner/native-runner.d.ts +0 -3
  38. package/dist/runtime/runner/native-runner.d.ts.map +1 -1
  39. package/dist/runtime/runner/native-runner.js +0 -45
  40. package/dist/runtime/runner/native-runner.js.map +1 -1
  41. package/examples/01-local-native.yaml +20 -0
  42. package/examples/README.md +2 -2
  43. package/package.json +3 -3
  44. package/xema.config.example.yaml +1 -1
  45. package/examples/01-local-monolith.yaml +0 -18
@@ -0,0 +1,20 @@
1
+ # Local dev on the NATIVE substrate — the contributor inner loop.
2
+ # Every service runs as its own forked host process (distributed model);
3
+ # peers discover each other through the KernelState adapter over etcd.
4
+ # You run the backing infra yourself (e.g. `docker compose up`), then boot
5
+ # the roster from your built monorepo checkout.
6
+ # Run: cp examples/01-local-native.yaml xema.config.yaml && xema up
7
+ # Or simply: xema dev (no config file needed)
8
+ edition: oss
9
+ app:
10
+ substrate: native # host processes from the monorepo build
11
+ include: all
12
+ infra:
13
+ # Native substrate assumes you already run infra (e.g. docker compose up).
14
+ # etcd is REQUIRED — it backs cross-process service discovery.
15
+ # If you want the launcher to manage infra too, use the container substrate
16
+ # (see 02-local-container-full.yaml).
17
+ postgres: { mode: external, url: postgresql://postgres:postgres@127.0.0.1:5432 }
18
+ redis: { mode: external, url: redis://127.0.0.1:6379 }
19
+ etcd: { mode: external, url: http://127.0.0.1:2379 }
20
+ keycloak: { mode: external, url: http://127.0.0.1:8180, realm: xema }
@@ -3,13 +3,13 @@
3
3
  Copy one of these to `xema.config.yaml` (or `~/.xema/config.yaml`) and edit:
4
4
 
5
5
  ```bash
6
- cp examples/01-local-monolith.yaml xema.config.yaml
6
+ cp examples/01-local-native.yaml xema.config.yaml
7
7
  xema up
8
8
  ```
9
9
 
10
10
  | File | Use case |
11
11
  | --- | --- |
12
- | [`01-local-monolith.yaml`](./01-local-monolith.yaml) | Lowest-RAM local run — one process, SQLite, no etcd (native + monolith). |
12
+ | [`01-local-native.yaml`](./01-local-native.yaml) | Local dev on the native substrate — one forked process per service, etcd discovery (BYO infra). |
13
13
  | [`02-local-container-full.yaml`](./02-local-container-full.yaml) | Full local stack in containers (everything + frontend). |
14
14
  | [`03-byo-infra.yaml`](./03-byo-infra.yaml) | Bring-your-own Postgres / Keycloak / object store; launcher runs only the rest. |
15
15
  | [`04-subset-knowledge.yaml`](./04-subset-knowledge.yaml) | Run only a slice (tiers / services) to save resources. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xemahq/xema",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Xema OS global CLI (plan v4.3 §6 Phase J). Single binary day-0 onboarding: `npm i -g @xemahq/xema && xema dev` boots the whole stack; `xema biome scaffold` / `install` / `publish` / `lint` author and ship biomes; `xema run <capability>` invokes through the local capability-router. Multi-platform: works without pnpm or any monorepo clone.",
6
6
  "type": "commonjs",
@@ -23,8 +23,8 @@
23
23
  "@nestjs/platform-express": "11.1.13",
24
24
  "@xemahq/distribution-resolver": "^0.1.1",
25
25
  "@xemahq/kernel-contracts": "^0.22.0",
26
- "@xemahq/kernel-state-runtime": "^0.1.5",
27
- "@xemahq/service-registry-nest": "^0.1.9",
26
+ "@xemahq/kernel-state-runtime": "^0.2.0",
27
+ "@xemahq/service-registry-nest": "^0.2.0",
28
28
  "commander": "^12.1.0",
29
29
  "reflect-metadata": "0.2.2",
30
30
  "rxjs": "7.8.2",
@@ -27,7 +27,7 @@ infra:
27
27
  # ── application services ─────────────────────────────────────────────────────
28
28
  app:
29
29
  substrate: container # container | native | helm
30
- processModel: distributed # distributed (microservices) | monolith (native-only: 1 process, SQLite, no etcd)
30
+ processModel: distributed # distributed (microservices, etcd discovery) — the only supported model
31
31
  include: [ all ] # all | tier names (kernel/system/base/platform) | service names
32
32
  exclude: [] # service names to drop
33
33
  features: [] # curated capability bundles (union with include)
@@ -1,18 +0,0 @@
1
- # Lowest-RAM local run — the memory-optimized single-process mode.
2
- # All in-process-capable services share ONE Node process + ONE in-process
3
- # registry + a SQLite KernelState file; NO etcd. Prisma-bound services that
4
- # can't run in-process are fail-fast skip-logged (see plan §18).
5
- # Run: cp examples/01-local-monolith.yaml xema.config.yaml && xema up
6
- # Or simply: xema up --monolith (no config file needed)
7
- edition: oss
8
- app:
9
- substrate: native # monolith is native-only
10
- processModel: monolith # 1 process, SQLite, no etcd
11
- include: all
12
- infra:
13
- # Native substrate assumes you already run infra (e.g. docker compose up).
14
- # If you want the launcher to manage infra too, use the container substrate
15
- # (see 02-local-container-full.yaml).
16
- postgres: { mode: external, url: postgresql://postgres:postgres@127.0.0.1:5432 }
17
- redis: { mode: external, url: redis://127.0.0.1:6379 }
18
- keycloak: { mode: external, url: http://127.0.0.1:8180, realm: xema }