@xemahq/xema 0.1.5 → 0.2.1
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.
- package/README.md +85 -15
- package/dist/assets/boot-graph.json +72 -0
- package/dist/assets/core/distribution.lock.json +1244 -0
- package/dist/assets/core/images.lock.json +428 -0
- package/dist/assets/oss/distribution.lock.json +1978 -0
- package/dist/assets/oss/images.lock.json +594 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +9 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +82 -14
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/down.d.ts +3 -0
- package/dist/commands/down.d.ts.map +1 -0
- package/dist/commands/down.js +54 -0
- package/dist/commands/down.js.map +1 -0
- package/dist/commands/logs.d.ts +3 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +61 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/serve.d.ts.map +1 -1
- package/dist/commands/serve.js +38 -8
- package/dist/commands/serve.js.map +1 -1
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +41 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/up.d.ts +3 -0
- package/dist/commands/up.d.ts.map +1 -0
- package/dist/commands/up.js +50 -0
- package/dist/commands/up.js.map +1 -0
- package/dist/dev/infra-preflight.js +1 -1
- package/dist/dev/infra-preflight.js.map +1 -1
- package/dist/lib/command-registry.d.ts +1 -1
- package/dist/lib/command-registry.d.ts.map +1 -1
- package/dist/lib/command-registry.js +4 -0
- package/dist/lib/command-registry.js.map +1 -1
- package/dist/runtime/boot-graph-loader.d.ts +17 -0
- package/dist/runtime/boot-graph-loader.d.ts.map +1 -0
- package/dist/runtime/boot-graph-loader.js +40 -0
- package/dist/runtime/boot-graph-loader.js.map +1 -0
- package/dist/runtime/config/loader.d.ts +11 -0
- package/dist/runtime/config/loader.d.ts.map +1 -0
- package/dist/runtime/config/loader.js +38 -0
- package/dist/runtime/config/loader.js.map +1 -0
- package/dist/runtime/config/schema.d.ts +208 -0
- package/dist/runtime/config/schema.d.ts.map +1 -0
- package/dist/runtime/config/schema.js +132 -0
- package/dist/runtime/config/schema.js.map +1 -0
- package/dist/runtime/env-seeder.d.ts +17 -0
- package/dist/runtime/env-seeder.d.ts.map +1 -0
- package/dist/runtime/env-seeder.js +89 -0
- package/dist/runtime/env-seeder.js.map +1 -0
- package/dist/runtime/foreground.d.ts +8 -0
- package/dist/runtime/foreground.d.ts.map +1 -0
- package/dist/runtime/foreground.js +71 -0
- package/dist/runtime/foreground.js.map +1 -0
- package/dist/runtime/infra/infra-catalog.d.ts +19 -0
- package/dist/runtime/infra/infra-catalog.d.ts.map +1 -0
- package/dist/runtime/infra/infra-catalog.js +128 -0
- package/dist/runtime/infra/infra-catalog.js.map +1 -0
- package/dist/runtime/infra/infra-plan.d.ts +16 -0
- package/dist/runtime/infra/infra-plan.d.ts.map +1 -0
- package/dist/runtime/infra/infra-plan.js +44 -0
- package/dist/runtime/infra/infra-plan.js.map +1 -0
- package/dist/runtime/infra/infra-runner.d.ts +26 -0
- package/dist/runtime/infra/infra-runner.d.ts.map +1 -0
- package/dist/runtime/infra/infra-runner.js +135 -0
- package/dist/runtime/infra/infra-runner.js.map +1 -0
- package/dist/runtime/launch.d.ts +24 -0
- package/dist/runtime/launch.d.ts.map +1 -0
- package/dist/runtime/launch.js +124 -0
- package/dist/runtime/launch.js.map +1 -0
- package/dist/runtime/lock-loader.d.ts +26 -0
- package/dist/runtime/lock-loader.d.ts.map +1 -0
- package/dist/runtime/lock-loader.js +61 -0
- package/dist/runtime/lock-loader.js.map +1 -0
- package/dist/runtime/paths.d.ts +14 -0
- package/dist/runtime/paths.d.ts.map +1 -0
- package/dist/runtime/paths.js +109 -0
- package/dist/runtime/paths.js.map +1 -0
- package/dist/runtime/platform-services.d.ts +2 -0
- package/dist/runtime/platform-services.d.ts.map +1 -0
- package/dist/runtime/platform-services.js +8 -0
- package/dist/runtime/platform-services.js.map +1 -0
- package/dist/runtime/port-map.d.ts +3 -0
- package/dist/runtime/port-map.d.ts.map +1 -0
- package/dist/runtime/port-map.js +25 -0
- package/dist/runtime/port-map.js.map +1 -0
- package/dist/runtime/roster.d.ts +32 -0
- package/dist/runtime/roster.d.ts.map +1 -0
- package/dist/runtime/roster.js +106 -0
- package/dist/runtime/roster.js.map +1 -0
- package/dist/runtime/runner/container-runner.d.ts +14 -0
- package/dist/runtime/runner/container-runner.d.ts.map +1 -0
- package/dist/runtime/runner/container-runner.js +61 -0
- package/dist/runtime/runner/container-runner.js.map +1 -0
- package/dist/runtime/runner/docker-cli.d.ts +11 -0
- package/dist/runtime/runner/docker-cli.d.ts.map +1 -0
- package/dist/runtime/runner/docker-cli.js +53 -0
- package/dist/runtime/runner/docker-cli.js.map +1 -0
- package/dist/runtime/runner/health-probe.d.ts +2 -0
- package/dist/runtime/runner/health-probe.d.ts.map +1 -0
- package/dist/runtime/runner/health-probe.js +38 -0
- package/dist/runtime/runner/health-probe.js.map +1 -0
- package/dist/runtime/runner/helm-runner.d.ts +19 -0
- package/dist/runtime/runner/helm-runner.d.ts.map +1 -0
- package/dist/runtime/runner/helm-runner.js +70 -0
- package/dist/runtime/runner/helm-runner.js.map +1 -0
- package/dist/runtime/runner/native-runner.d.ts +14 -0
- package/dist/runtime/runner/native-runner.d.ts.map +1 -0
- package/dist/runtime/runner/native-runner.js +92 -0
- package/dist/runtime/runner/native-runner.js.map +1 -0
- package/dist/runtime/runner/service-runner.d.ts +23 -0
- package/dist/runtime/runner/service-runner.d.ts.map +1 -0
- package/dist/runtime/runner/service-runner.js +10 -0
- package/dist/runtime/runner/service-runner.js.map +1 -0
- package/dist/runtime/supervisor.d.ts +46 -0
- package/dist/runtime/supervisor.d.ts.map +1 -0
- package/dist/runtime/supervisor.js +77 -0
- package/dist/runtime/supervisor.js.map +1 -0
- package/dist/runtime/unit-type.d.ts +9 -0
- package/dist/runtime/unit-type.d.ts.map +1 -0
- package/dist/runtime/unit-type.js +19 -0
- package/dist/runtime/unit-type.js.map +1 -0
- package/dist/runtime/waves.d.ts +15 -0
- package/dist/runtime/waves.d.ts.map +1 -0
- package/dist/runtime/waves.js +77 -0
- package/dist/runtime/waves.js.map +1 -0
- package/package.json +7 -8
- package/xema.config.example.yaml +46 -0
package/README.md
CHANGED
|
@@ -28,16 +28,17 @@
|
|
|
28
28
|
|
|
29
29
|
## Overview
|
|
30
30
|
|
|
31
|
-
The single global binary for Xema. Install it once to
|
|
32
|
-
author and ship biomes, and invoke capabilities
|
|
33
|
-
|
|
34
|
-
`doctor` check for diagnosing your environment. It works as a standalone tool —
|
|
35
|
-
no monorepo checkout required.
|
|
31
|
+
The single global binary for Xema. Install it once to **launch the whole
|
|
32
|
+
platform with one command**, author and ship biomes, and invoke capabilities
|
|
33
|
+
from your terminal.
|
|
36
34
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
`xema up` resolves the platform's distribution lock into an effective service
|
|
36
|
+
roster, brings up the backing infrastructure you don't already run, and
|
|
37
|
+
supervises every service to readiness — over a **container** substrate
|
|
38
|
+
(customers) or a **native** substrate (contributors). It is a thin bring-up
|
|
39
|
+
coordinator: it resolves topology and sequences startup, delegating process
|
|
40
|
+
lifecycle (restart, health, resource limits) to the substrate beneath it
|
|
41
|
+
(Docker/Podman, or your own infra). It never becomes a second orchestrator.
|
|
41
42
|
|
|
42
43
|
## Installation
|
|
43
44
|
|
|
@@ -45,14 +46,83 @@ no monorepo checkout required.
|
|
|
45
46
|
npm i -g @xemahq/xema
|
|
46
47
|
```
|
|
47
48
|
|
|
48
|
-
##
|
|
49
|
+
## Launch the platform
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
xema up # boot the backend (infra + services) as one supervised process
|
|
53
|
+
xema up --web # also start the host-shell frontend
|
|
54
|
+
xema up --all # everything, including the frontend
|
|
55
|
+
xema up --detach # leave container workloads running and return
|
|
56
|
+
xema down # stop everything (xema down --purge also deletes data volumes)
|
|
57
|
+
xema status # show launcher-owned workloads + health
|
|
58
|
+
xema logs <service> -f # stream a service's logs
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Topology — `xema.config.yaml`
|
|
62
|
+
|
|
63
|
+
The launcher reads an optional `xema.config.yaml` (or `~/.xema/config.yaml`)
|
|
64
|
+
declaring **which infrastructure you own** and **what to run**. Every backing
|
|
65
|
+
component is `managed` (the launcher starts it), `external` (you already run it —
|
|
66
|
+
provide the URL), or `disabled`:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
edition: oss
|
|
70
|
+
infra:
|
|
71
|
+
postgres: { mode: managed }
|
|
72
|
+
redis: { mode: managed }
|
|
73
|
+
etcd: { mode: managed }
|
|
74
|
+
keycloak: { mode: external, url: https://sso.corp/realms/xema, realm: xema }
|
|
75
|
+
objectStore: { mode: external, url: https://s3.corp }
|
|
76
|
+
search: { mode: managed }
|
|
77
|
+
temporal: { mode: managed }
|
|
78
|
+
app:
|
|
79
|
+
substrate: container # container | native
|
|
80
|
+
include: [ all ] # all | <tier> | [service ...]
|
|
81
|
+
features: [] # curated capability bundles
|
|
82
|
+
web: { enabled: true }
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
- **`container`** (recommended): pulls content-addressed service images
|
|
86
|
+
(`imageRef:contentHash`) and runs them on a shared network, after bringing up
|
|
87
|
+
and bootstrapping managed infra — works without a monorepo checkout.
|
|
88
|
+
- **`native`**: runs services as host processes against a built monorepo (the
|
|
89
|
+
contributor inner loop). Equivalent: `xema serve --profile single-instance`.
|
|
90
|
+
- **`helm`**: deploys to Kubernetes via `helm upgrade --install` (the appliance /
|
|
91
|
+
cluster target). Equivalent: `xema serve --profile appliance`.
|
|
92
|
+
|
|
93
|
+
`xema up` fails fast on a missing required secret, an unreachable `external`
|
|
94
|
+
dependency, or a disabled-but-mandatory infra component — never a silent
|
|
95
|
+
degradation.
|
|
96
|
+
|
|
97
|
+
### Memory-optimized single-process mode + realtime dev
|
|
98
|
+
|
|
99
|
+
For a low-RAM local box or appliance, collapse the native composition into ONE
|
|
100
|
+
process (in-process registry + SQLite, no etcd):
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
xema up --monolith # or: app.processModel: monolith in xema.config.yaml
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Monolith is native-only and single-tenant — it trades fault isolation /
|
|
107
|
+
horizontal scaling for RAM. Prisma-bound services that can't run in-process are
|
|
108
|
+
fail-fast skip-logged (full collapse is gated on a cross-repo Prisma change;
|
|
109
|
+
tracked in the plan). The default `distributed` model is unchanged.
|
|
110
|
+
|
|
111
|
+
For development, see code changes live — the composition restarts when service
|
|
112
|
+
output changes (pair with each service's own `tsc -w` / `turbo watch`):
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
xema dev --watch # add --monolith for the low-RAM single-process loop
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Author biomes & run capabilities
|
|
49
119
|
|
|
50
120
|
```bash
|
|
51
|
-
xema dev
|
|
52
|
-
xema biome scaffold <name>
|
|
53
|
-
xema biome publish <path>
|
|
54
|
-
xema run <capability>
|
|
55
|
-
xema doctor
|
|
121
|
+
xema dev # lock-driven native dev boot (contributors)
|
|
122
|
+
xema biome scaffold <name> # author a new biome
|
|
123
|
+
xema biome publish <path> # ship a biome
|
|
124
|
+
xema run <capability> # invoke a capability by name
|
|
125
|
+
xema doctor # diagnose your environment
|
|
56
126
|
```
|
|
57
127
|
|
|
58
128
|
## License
|
|
@@ -0,0 +1,72 @@
|
|
|
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.",
|
|
3
|
+
"tiers": {
|
|
4
|
+
"infra": -1,
|
|
5
|
+
"kernel": 0,
|
|
6
|
+
"system": 1,
|
|
7
|
+
"base": 2,
|
|
8
|
+
"platform": 3,
|
|
9
|
+
"third-party": 4
|
|
10
|
+
},
|
|
11
|
+
"infraServices": [
|
|
12
|
+
"identity-api",
|
|
13
|
+
"event-hub-api",
|
|
14
|
+
"secrets-api",
|
|
15
|
+
"llm-gateway-api",
|
|
16
|
+
"kernel-state"
|
|
17
|
+
],
|
|
18
|
+
"services": {
|
|
19
|
+
"authorization-api": {
|
|
20
|
+
"tier": "system",
|
|
21
|
+
"startupRequires": ["identity-api"]
|
|
22
|
+
},
|
|
23
|
+
"object-registry-api": {
|
|
24
|
+
"tier": "system",
|
|
25
|
+
"startupRequires": ["identity-api"]
|
|
26
|
+
},
|
|
27
|
+
"capability-registry-api": {
|
|
28
|
+
"tier": "system",
|
|
29
|
+
"startupRequires": ["identity-api"]
|
|
30
|
+
},
|
|
31
|
+
"user-hub-api": {
|
|
32
|
+
"tier": "system",
|
|
33
|
+
"startupRequires": ["identity-api"]
|
|
34
|
+
},
|
|
35
|
+
"public-gateway-api": {
|
|
36
|
+
"tier": "system",
|
|
37
|
+
"startupRequires": ["identity-api"]
|
|
38
|
+
},
|
|
39
|
+
"xema-shell-api": {
|
|
40
|
+
"tier": "system",
|
|
41
|
+
"startupRequires": ["identity-api"]
|
|
42
|
+
},
|
|
43
|
+
"xema-capability-router": {
|
|
44
|
+
"tier": "system",
|
|
45
|
+
"startupRequires": []
|
|
46
|
+
},
|
|
47
|
+
"biome-host-api": {
|
|
48
|
+
"tier": "system",
|
|
49
|
+
"startupRequires": ["identity-api"]
|
|
50
|
+
},
|
|
51
|
+
"workload-runtime-api": {
|
|
52
|
+
"tier": "system",
|
|
53
|
+
"startupRequires": ["identity-api"]
|
|
54
|
+
},
|
|
55
|
+
"xema-biome-runner": {
|
|
56
|
+
"tier": "system",
|
|
57
|
+
"startupRequires": ["identity-api"]
|
|
58
|
+
},
|
|
59
|
+
"project-registry-api": {
|
|
60
|
+
"tier": "base",
|
|
61
|
+
"startupRequires": ["identity-api"]
|
|
62
|
+
},
|
|
63
|
+
"space-registry-api": {
|
|
64
|
+
"tier": "system",
|
|
65
|
+
"startupRequires": ["identity-api"]
|
|
66
|
+
},
|
|
67
|
+
"xema-kernel-server": {
|
|
68
|
+
"tier": "kernel",
|
|
69
|
+
"startupRequires": []
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|