0xray 4.0.20 → 4.0.21

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 (43) hide show
  1. package/.grok-plugin/plugin.json +1 -1
  2. package/.opencode/skills/orchestrator/SKILL.md +1 -1
  3. package/.xray/features.json +1 -1
  4. package/AGENTS-consumer.md +4 -4
  5. package/AGENTS.md +4 -4
  6. package/README.md +14 -14
  7. package/SKILLS.md +3 -3
  8. package/dist/AGENTS.md +4 -4
  9. package/dist/CHANGELOG.md +16 -8
  10. package/dist/README.md +14 -14
  11. package/dist/SKILLS.md +3 -3
  12. package/dist/cli/commands/validate.d.ts +1 -1
  13. package/dist/cli/commands/validate.js +7 -1
  14. package/dist/integrations/cursor/README.md +6 -5
  15. package/dist/integrations/cursor/hooks/after-file-edit.sh +3 -0
  16. package/dist/integrations/cursor/hooks/before-read-file.sh +3 -0
  17. package/dist/integrations/cursor/hooks/before-shell-execution.sh +3 -0
  18. package/dist/integrations/cursor/hooks/cursor-hook-utils.js +93 -12
  19. package/dist/integrations/cursor/hooks/cursor-usage-receipt.js +3 -0
  20. package/dist/integrations/cursor/hooks/hooks.json +13 -3
  21. package/dist/integrations/cursor/hooks/pre-compact.js +9 -0
  22. package/dist/integrations/cursor/hooks/pre-compact.sh +3 -0
  23. package/dist/integrations/cursor/hooks/pre-tool-use.js +16 -12
  24. package/dist/integrations/cursor/hooks/pre-tool-use.sh +3 -0
  25. package/dist/integrations/cursor/hooks/xray-cloud-hook.sh +63 -0
  26. package/dist/integrations/grok/hooks/grok-hook-utils.js +3 -2
  27. package/dist/integrations/hooks/station-hook-runtime.cjs +222 -70
  28. package/dist/integrations/hooks/station-hook-runtime.mjs +9 -0
  29. package/dist/integrations/hooks/station-memory-ingest.mjs +1 -2
  30. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  31. package/dist/nucleus/suit-temperament.d.ts +0 -5
  32. package/dist/nucleus/suit-temperament.js +13 -1
  33. package/dist/skills/orchestrator/SKILL.md +1 -1
  34. package/llms.txt +1 -1
  35. package/package.json +2 -2
  36. package/scripts/foundry/README.md +2 -2
  37. package/scripts/foundry/assert-packed-dist-cli.mjs +4 -0
  38. package/scripts/foundry/plant/skills/mill/SKILL.md +1 -1
  39. package/scripts/foundry/validate-release-docs.mjs +44 -0
  40. package/scripts/node/install-bridges.cjs +256 -10
  41. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  42. package/src/skills/orchestrator/SKILL.md +1 -1
  43. package/xray/features.json +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0xray",
3
- "version": "4.0.20",
3
+ "version": "4.0.21",
4
4
  "description": "0xRay suit for Grok, Hermes, OpenClaw, OpenCode: mill+inspect, Codex, 7 MCP servers. Costume 45/42 is opt-in foundry, not the default wear.",
5
5
  "author": {
6
6
  "name": "0xRay AI",
@@ -76,5 +76,5 @@ The seven rules are the engine. The cadence is the time signature. Disk SSOT: `g
76
76
  - **Close:** loop until Station is done. Compact: Station survives the cut. Overlay dest names are OP-PROC — reload `repertoire-working.json` `opProcNames`, not Station.
77
77
  - **Board:** critic Strict comments; forge implements; lead stays main thread.
78
78
  - **Codex 69:** rewire this skill and existing ops. Do not add a new `SKILL.md` to hold the cadence.
79
- - **Ship matrix:** `LEAD-CADENCE.md` Decision matrix — A PR+CI · B pack · C `release:docs-check` · D `foundry release --i-mean-it`. Green CI is not ship. Spend / credentials stay Ask-first.
79
+ - **Ship matrix:** `LEAD-CADENCE.md` Decision matrix — A PR+CI · B pack · C `release:docs-check` (`reconcile --check`; no patch stamps on guides) · D `foundry release --i-mean-it`. Green CI is not ship. Spend / credentials stay Ask-first. Patch number lives in `package.json` + CHANGELOG.
80
80
  - **Metamorphosis:** LLM → OP-PROC is in-context worn seats (same critic, same dummy, resume only). Not more bots.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "./features.schema.json",
3
- "version": "4.0.20",
3
+ "version": "4.0.21",
4
4
  "description": "0xRay Framework - Unified Feature Configuration",
5
5
  "suit_temperament": {
6
6
  "profile": "auto",
@@ -6,7 +6,7 @@ Quick reference for the 0xRay AI orchestration framework worn on **{{CONSUMER_NA
6
6
 
7
7
  **4.0** — a suit that survives the context window
8
8
 
9
- Same **three-subsystem OS** as v2 (Inference · External Governance · Autonomous Engine). Constitution always on. Temperament scales ceremony. Four chat bridges plus Cursor project hooks. Repertoire organ ships **on** (vendored 0.2); opt out with `"enabled": false, "provider": "repertoire"`. Trim fat, do not gut the design.
9
+ Same **three-subsystem OS** as v2 (Inference · External Governance · Autonomous Engine). Constitution always on. Temperament scales ceremony. Four chat bridges plus Cursor project hooks. **Repertoire is preferred** — vendored 0.2.5 ships **on**. Dest is named laws, not keywords. Station is the compact ticket, not a substitute. Explicit opt-out only: `"enabled": false, "provider": "repertoire"`. Trim fat, do not gut the design.
10
10
 
11
11
  **Governance always on** (Codex PreToolUse, no new surface, no `eval`). **Engine ceremony** (analyze-complexity before spawn, confer) is **guided** by default so free-model OpenCode/Hermes stay in check. Frontier hosts (Grok 4.6 class) with `suit_temperament.profile: auto` **warn** on spawn-without-plan instead of deny — the engine is still there. Existing `.xray/features.json` without `suit_temperament` stays **guided**. Docs: v3 from v2 · Suit temperament.
12
12
 
@@ -83,9 +83,9 @@ xray operates under the three-subsystem model: **Inference** + **External Govern
83
83
 
84
84
  ## AsideContext (v3.2+)
85
85
 
86
- Bounded orchestrator subcontexts via `xray-orchestrator` MCP — `spawnAside` / `closeAside` on multi-step tasks. Repertoire memory routing (when enabled) flows through `inheritedContext.memoryRouting`.
86
+ Bounded orchestrator subcontexts via `xray-orchestrator` MCP — `spawnAside` / `closeAside` on multi-step tasks. Repertoire (preferred) flows through `inheritedContext.memoryRouting`.
87
87
 
88
- ## Memory Routing + Repertoire (optional, v3.3+)
88
+ ## Memory Routing + Repertoire (preferred, v3.3+)
89
89
 
90
90
  Configure in `.xray/features.json`:
91
91
 
@@ -102,7 +102,7 @@ Configure in `.xray/features.json`:
102
102
  }
103
103
  ```
104
104
 
105
- Opt out: `{ "enabled": false, "provider": "repertoire" }`.
105
+ **Wear Repertoire.** Dest is named invariants, not hangar `repo-*`. Explicit opt-out only: `{ "enabled": false, "provider": "repertoire" }`.
106
106
 
107
107
  **External MCP** (Hermes/Grok): add Repertoire alongside 0xRay servers:
108
108
 
package/AGENTS.md CHANGED
@@ -4,7 +4,7 @@ Quick reference for the xray AI orchestration framework (**4.0**).
4
4
 
5
5
  **4.0** — a suit that survives the context window.
6
6
 
7
- **Exo, not catalog.** Three-subsystem OS (Inference · External Governance · Autonomous Engine) · constitution always on · temperament by host · 4 floors · Repertoire when it resolves.
7
+ **Exo, not catalog.** Three-subsystem OS (Inference · External Governance · Autonomous Engine) · constitution always on · temperament by host · 4 floors · **Repertoire preferred** (vendored 0.2.5, dest = laws).
8
8
 
9
9
  **Temperament:** ceremony (analyze-complexity before spawn, confer) is **guided** by default so free-model OpenCode/Hermes stay in check. Frontier hosts (Grok 4.6 class) with `suit_temperament.profile: auto` **warn** on spawn-without-plan; Codex 11/29/69 still **deny**. Missing `suit_temperament` stays guided. See `docs-site/docs/architecture/v3-from-v2.md`.
10
10
 
@@ -50,7 +50,7 @@ Governance deliberation: **code-review**, **security-audit**, **researcher** wit
50
50
  4. `.xray/` config (`codex.json`, `features.json`, `config.json`) then overlay their plant
51
51
  5. `.mcp.json` (7 servers)
52
52
  6. Four chat bridges: OpenCode, Grok, Hermes, OpenClaw. Grok last-mile dest is project `.grok/plugins/0xray` (shared HOME does not last-wins clobber machine `~/.grok/plugins/0xray`)
53
- 7. Cursor fifth wear: fasten `.cursor/hooks.json` when absent (preToolUse / preCompact / afterFileEdit). Leaves an existing file alone. Not a fifth chat TUI.
53
+ 7. Cursor fifth wear: fasten `.cursor/hooks.json` + relative `.cursor/hooks/*.sh`. Rewrite leftover `XRAY_AI_PATH=` one-liners. Not a fifth chat TUI.
54
54
  8. Optional git hooks
55
55
 
56
56
  **Shop plant:** `shop-extract`, `shop-witness`, `shop-pin` (groover-hangar) are first-class with mill plant. Extra shops: `foundry.json` `shopPlant`. Not `"costume": true`. `npx @0xray/foundry inspect --skip-live` is the receipt.
@@ -59,9 +59,9 @@ Governance deliberation: **code-review**, **security-audit**, **researcher** wit
59
59
 
60
60
  **Blip plant:** Product mill `@0xray/blip` (not a mill copy). Hangar shop pair later. Alias `"plant": "blip"` + `npx @0xray/foundry blip render --brief "..." --mode still|motion:orb` writes a 4.44s mp4 **with an audio bed**. Registry v0: still + Rippel five (`orb` `swirl` `snap` `waves` `spark`). Motions are Rippel v2 `VisualConfig.circles` at ≥720p — sharp look + tempo/frequency animation on all five (wireframe is `--engine wireframe` only). Auto bed syncopates to the motion grid. Each mint wears a sparse seed mesh plus field accents (stars, grids, gradients, blinkers); receipt `visualConfig.mesh` + `visualConfig.field` are the fingerprints. `kapow` is a design opt (`motion:kapow`) — two-tier comic stamp on the same stanza. Organs live in the mill: `blip-vibe` (`npx @0xray/foundry blip vibe`) scores stamp density; `blip-looker` (`npx @0xray/foundry blip look`) is the friend hitting replay; appeal 0–10; ship bar is **8**. `still` is the Power Plant ident — plate dissolves over 4.44s at ≥720p (`#08090B` `#F5F7FA` `#3DE0E8` `#F5C518` `#4A7FD4`), not a frozen poster. Adding an organ is a mill publish, not an xray catalog PR. CLI shim `foundry blip` remains (0.1.11+). Inspect checks duration / mode id / file / audio.
61
61
 
62
- ## Memory routing + Repertoire (v3.3+)
62
+ ## Memory routing + Repertoire (preferred, v3.3+)
63
63
 
64
- **Station is the successor card** (Read `.xray/state/STATION.md`). Repertoire 0.2 is a thin routing seed (8 factory names). The worn mill reads the **project copy** under `.xray/state/repertoire/`. 0.1.0–0.1.8 were the same judgment organ; do not pin 0.1.8 for mill wear. Split: `docs-site/docs/guides/station-vs-repertoire.md`.
64
+ **Wear Repertoire.** It is the long-term judgment organ. Dest is named invariants (factory + stack laws), not hangar `repo-*` or git slugs. **Station is the compact ticket** (Read `.xray/state/STATION.md`) — not a substitute for Repertoire. The worn mill reads the **project copy** under `.xray/state/repertoire/`. 0.1.0–0.1.8 were the same judgment organ; do not pin 0.1.8. Split: `docs-site/docs/guides/station-vs-repertoire.md`.
65
65
 
66
66
  `xray/features.json` → `memory_routing` (schema: `features.schema.json`):
67
67
 
package/README.md CHANGED
@@ -14,13 +14,13 @@ Not a catalog of agents. The product is the **skeleton you wear**.
14
14
  - **Always on** — Codex 11 / 29 / 69, destructive shell, no new MCP/skill/handler surface
15
15
  - **Temperament** — `frontier` | `guided` | `strict` | `auto` — how loud the engine is, not whether governance exists
16
16
  - **Wear** — Grok, OpenCode, Hermes, OpenClaw, plus Cursor project hooks. One SSOT gate
17
- - **Muscle** — Repertoire: auto-enables when the module resolves; session-start writes a one-line resume so the next station is not born amnesiac
17
+ - **Muscle** — **Repertoire is preferred.** Vendored 0.2.5 ships **on**. Dest is named laws, not hangar `repo-*` or git slugs. Station is the compact-survival ticket — not a substitute for Repertoire.
18
18
 
19
19
  ```bash
20
20
  npm install 0xray
21
21
  ```
22
22
 
23
- Consumer `npm install 0xray` auto-wires four chat bridges, Cursor project hooks, and seven MCP servers. Repertoire **0.2** is the factory memory organ (vendored): seed primitives, in-process routing, extra host MCP `repertoire`. Not an eighth `xray-*` server. Opt out with `"enabled": false, "provider": "repertoire"`.
23
+ Consumer `npm install 0xray` auto-wires four chat bridges, Cursor project hooks, and seven MCP servers. **Repertoire is preferred** — vendored **0.2.5** ships on: factory + stack laws, in-process routing, extra host MCP `repertoire`. Not an eighth `xray-*` server. Dest is a judgment index. Explicit opt-out only: `"enabled": false, "provider": "repertoire"`. Do not pin 0.1.8.
24
24
 
25
25
  ## Quick Start
26
26
 
@@ -51,7 +51,7 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
51
51
 
52
52
  | Version | Highlights |
53
53
  |---------|------------|
54
- | **Unreleased** | Fasten is **foundry-plant/0**: builtin plant is mill+inspect only. `foundry.json` `"plant": "@0xray/blip"` (aliases `"plant": "blip"` / `"plant": "sound"`) fastens whatever that mill declares (looker / vibe / mixer live in the mill). Nested mill `@0xray/foundry@0.1.12`. CLI shims `foundry blip\|sound` remain (0.1.11+). Shop plant first-class (`shop-extract`, `shop-witness`, `shop-pin` + `foundry.json` `shopPlant`). 0xray stays 4.0.15. |
54
+ | **Unreleased** | Fasten is **foundry-plant/0**: builtin plant is mill+inspect only. `foundry.json` `"plant": "@0xray/blip"` (aliases `"plant": "blip"` / `"plant": "sound"`) fastens whatever that mill declares (looker / vibe / mixer live in the mill). Nested mill `@0xray/foundry@0.1.12`. CLI shims `foundry blip\|sound` remain (0.1.11+). Shop plant first-class (`shop-extract`, `shop-witness`, `shop-pin` + `foundry.json` `shopPlant`). |
55
55
  | **4.0.9** | Mill target: postinstall does not mill npm global prefix or `_npx` as a consumer. Isolated HOME skips machine `~/.grok`. |
56
56
  | **4.0.0** | Exo + temperament. Constitution always on; ceremony by host. Repertoire organ on (vendored 0.2). Station card survives compact/host-swap. **On npm.** [vision](docs-site/docs/architecture/v4-vision.md) · [now](docs-site/docs/architecture/v4-now.md) |
57
57
  | **3.4.1** | Unified `install-bridges.cjs` on postinstall — OpenCode, Grok, Hermes, OpenClaw in one pass. All 7 MCPs servers via `npx -y 0xray mcp <cmd>` (no `dist/` paths). Canonical `release.mjs` pipeline. |
@@ -63,7 +63,7 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
63
63
 
64
64
  ### Consolidations
65
65
 
66
- - **One consumer install path** — `postinstall.cjs` → `installAllBridges()` replaces scattered per-platform setup. **4.0.9:** does not mill npm global prefix or `_npx`.
66
+ - **One consumer install path** — `postinstall.cjs` → `installAllBridges()` replaces scattered per-platform setup. Mill target is the consumer project, not npm global prefix or `_npx`.
67
67
  - **7-server MCP surface** — `.mcp.json` SSOT; Grok plugin and all bridges share `XRAY_MCP_SERVERS`.
68
68
  - **Dev vs consumer AGENTS** — `AGENTS.md` (framework) vs `AGENTS-consumer.md` (copied to consumer projects on install).
69
69
  - **Release pipeline** — `npm run release:patch|minor|major` → reconcile → gate → artifacts → tag → publish.
@@ -149,9 +149,9 @@ Core governance agents:
149
149
 
150
150
  See [AGENTS.md](AGENTS.md) and [SKILLS.md](SKILLS.md) for the full agent and skill catalog.
151
151
 
152
- ## Memory Routing + Repertoire (v3.3+)
152
+ ## Memory Routing + Repertoire (preferred, v3.3+)
153
153
 
154
- Pluggable `memory_routing` block in `features.json` (validated by `features.schema.json`):
154
+ **Wear Repertoire.** It is the long-term judgment organ. Station holds the ticket across compact. Dest is named invariants, not keywords. Pluggable `memory_routing` in `features.json` (validated by `features.schema.json`) ships **on**:
155
155
 
156
156
  ```json
157
157
  "memory_routing": {
@@ -174,9 +174,9 @@ Pluggable `memory_routing` block in `features.json` (validated by `features.sche
174
174
  | **AsideContext** (v3.2) | `buildInheritedContext` → `inheritedContext.memoryRouting` on orchestrator `spawnAside` |
175
175
  | **Feedback** | Per-task `ingestFeedback()` closes the learning loop |
176
176
 
177
- **External hosts** (Hermes/Grok): add `repertoire-mcp` to `.mcp.json` — see Repertoire docs.
177
+ **External hosts** (Hermes/Grok): add `repertoire-mcp` to `.mcp.json` — see Repertoire docs. Preferred. Not optional flavor.
178
178
 
179
- Opt out: `"memory_routing": { "enabled": false, "provider": "repertoire" }`.
179
+ Explicit opt-out only: `"memory_routing": { "enabled": false, "provider": "repertoire" }`.
180
180
 
181
181
  Docs: [memory routing](docs-site/docs/guides/memory-routing.md) · [Repertoire](docs-site/docs/guides/repertoire.md) · [features.json](docs-site/docs/guides/features-json.md) · [all features since 3.1](docs-site/docs/guides/features-since-3.1.md)
182
182
 
@@ -188,7 +188,7 @@ Docs: [memory routing](docs-site/docs/guides/memory-routing.md) · [Repertoire](
188
188
  | **Grok CLI / Build** | `npx 0xray grok install` | Project `.grok/plugins/0xray` (shared HOME does not clobber machine plugin), 7 MCPs servers |
189
189
  | **Hermes Agent** | `npx 0xray hermes install` | `~/.hermes/plugins/xray-hermes`, consumer root marker |
190
190
  | **OpenClaw** | `npx 0xray openclaw install` | `.xray/config/openclaw.json`, skill sync |
191
- | **Cursor** | postinstall (`installCursorBridge`) | Fastens `.cursor/hooks.json` (preToolUse / preCompact / afterFileEdit). Leaves an existing file alone. Not a fifth chat TUI. |
191
+ | **Cursor** | postinstall (`installCursorBridge`) | Fastens `.cursor/hooks.json` + relative `.cursor/hooks/*.sh`. Rewrites leftover env-assignment one-liners. Not a fifth chat TUI. |
192
192
 
193
193
  ## Governance & Codex
194
194
 
@@ -200,9 +200,9 @@ Docs: [memory routing](docs-site/docs/guides/memory-routing.md) · [Repertoire](
200
200
 
201
201
  ## Testing
202
202
 
203
- | Suite | Status (v4.0.1) |
204
- |-------|-----------------|
205
- | Four-floor consumer e2e | OpenCode 34/0 · Grok 63/0 · Hermes 39/0/2 · OpenClaw 96/0/1 (npm 4.0.0 pack) |
203
+ | Suite | Status |
204
+ |-------|--------|
205
+ | Four-floor consumer e2e | OpenCode 34/0 · Grok 63/0 · Hermes 39/0/2 · OpenClaw 96/0/1 |
206
206
  | Consumer smoke | `npm run release:gate` — pack → clean install → 7 MCPs + 4 chat bridges + Cursor hooks + organ on |
207
207
  | Pack → tmp proof | `npm run pack:tmp-proof` — tgz install + `foundry mint --skip-live` + hangar shops + inspect (no costume dump). Playwright n/a (CLI). |
208
208
 
@@ -215,12 +215,12 @@ npm run release:npm # gate + prepare + npm publish --access public
215
215
 
216
216
  ## Release
217
217
 
218
- Product **4.0.0** is on npm. Do **not** run `release:major` to ship a 4.x fix (that becomes 5.0.0). Do **not** put a `scripts.publish` lifecycle that re-runs the gate after the registry PUT.
218
+ The **4.0** line is on npm. Do **not** run `release:major` to ship a 4.x fix (that becomes 5.0.0). Do **not** put a `scripts.publish` lifecycle that re-runs the gate after the registry PUT. Patch number lives in `package.json` + CHANGELOG.
219
219
 
220
220
  ```bash
221
221
  npm run release:gate
222
222
  npm run release:npm # after gate is green; uses npm publish --access public
223
- npm run release:patch # version bump pipeline (not for a already-bumped 4.0.0)
223
+ npm run release:patch # version bump pipeline (not for an already-bumped package.json)
224
224
  ```
225
225
 
226
226
  Pipeline: reconcile-version → release-gate (build + test + consumer smoke) → CHANGELOG/README/AGENTS artifacts → commit → tag → npm publish.
package/SKILLS.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **45 skills** in this exo catalog. Default consumer plant is **`mill` + `inspect`**, not this dump. `npm install 0xray` does **not** sync 45 skills unless `foundry.json` `"costume": true`. Factory shop plant (`shop-extract`, `shop-witness`, `shop-pin`) coexists with mill plant when a hangar wears those shops. Extra shops: `foundry.json` `shopPlant`. Fasten is **foundry-plant/0**: builtin plant is mill+inspect only. `foundry.json` `"plant": "@0xray/blip"` (aliases `"plant": "blip"` / `"plant": "sound"`) fastens whatever that mill package declares — organs (looker, vibe, mixer) live in the mill, not this catalog. Nested mill `@0xray/foundry@0.1.12`. CLI shims `foundry blip|sound` still exist on foundry 0.1.11+. Agent map: [llms.txt](llms.txt).
6
6
 
7
- xray ships 45 knowledge skills (`src/skills/<name>/SKILL.md`) as the **costume / self-plant catalog**. Lead-dev operating model lives in **`orchestrator`** skill + `multi_agent_orchestration.lead_dev_mode` in features.json. Skills load on demand via the **xray-skills** MCP server (`npx -y 0xray mcp skills`) or when you plant them. This file is the exo catalog — mill does **not** write it to the consumer root.
7
+ xray ships 45 knowledge skills (`src/skills/<name>/SKILL.md`) as the **costume / self-plant catalog**. Lead-dev operating model lives in **`orchestrator`** skill + `multi_agent_orchestration.lead_dev_mode` in features.json. **Repertoire is preferred** for long-term judgment (vendored 0.2.5, dest = named laws). Station is the compact ticket, not a skill and not a keyword store. Skills load on demand via the **xray-skills** MCP server (`npx -y 0xray mcp skills`) or when you plant them. This file is the exo catalog — mill does **not** write it to the consumer root.
8
8
 
9
9
  ---
10
10
 
@@ -156,9 +156,9 @@ npx 0xray skill:install <source>
156
156
 
157
157
  | Feature | Skill connection |
158
158
  |---------|------------------|
159
- | **Memory routing** (v3.3) | Researcher uses Repertoire signals; optional `@0xray/repertoire` MCP |
159
+ | **Memory routing** (v3.3) | **Repertoire preferred** — researcher + thinDispatch + planner use dest laws. Extra MCP `npx @0xray/repertoire mcp` (not an 8th `xray-*`). Dest is named invariants, not `repo-*` slugs. |
160
160
  | **AsideContext** (v3.2) | Orchestrator subcontexts during skill dispatch |
161
- | **7 MCP servers** (v4.0.1) | `xray-skills` is the primary skill invocation surface |
161
+ | **7 MCP servers** (v4.0) | `xray-skills` is the primary skill invocation surface |
162
162
 
163
163
  Docs: [AGENTS.md](AGENTS.md) · [README.md](README.md) · [Docusaurus guides](docs-site/docs/guides/)
164
164
 
package/dist/AGENTS.md CHANGED
@@ -4,7 +4,7 @@ Quick reference for the xray AI orchestration framework (**4.0**).
4
4
 
5
5
  **4.0** — a suit that survives the context window.
6
6
 
7
- **Exo, not catalog.** Three-subsystem OS (Inference · External Governance · Autonomous Engine) · constitution always on · temperament by host · 4 floors · Repertoire when it resolves.
7
+ **Exo, not catalog.** Three-subsystem OS (Inference · External Governance · Autonomous Engine) · constitution always on · temperament by host · 4 floors · **Repertoire preferred** (vendored 0.2.5, dest = laws).
8
8
 
9
9
  **Temperament:** ceremony (analyze-complexity before spawn, confer) is **guided** by default so free-model OpenCode/Hermes stay in check. Frontier hosts (Grok 4.6 class) with `suit_temperament.profile: auto` **warn** on spawn-without-plan; Codex 11/29/69 still **deny**. Missing `suit_temperament` stays guided. See `docs-site/docs/architecture/v3-from-v2.md`.
10
10
 
@@ -50,7 +50,7 @@ Governance deliberation: **code-review**, **security-audit**, **researcher** wit
50
50
  4. `.xray/` config (`codex.json`, `features.json`, `config.json`) then overlay their plant
51
51
  5. `.mcp.json` (7 servers)
52
52
  6. Four chat bridges: OpenCode, Grok, Hermes, OpenClaw. Grok last-mile dest is project `.grok/plugins/0xray` (shared HOME does not last-wins clobber machine `~/.grok/plugins/0xray`)
53
- 7. Cursor fifth wear: fasten `.cursor/hooks.json` when absent (preToolUse / preCompact / afterFileEdit). Leaves an existing file alone. Not a fifth chat TUI.
53
+ 7. Cursor fifth wear: fasten `.cursor/hooks.json` + relative `.cursor/hooks/*.sh`. Rewrite leftover `XRAY_AI_PATH=` one-liners. Not a fifth chat TUI.
54
54
  8. Optional git hooks
55
55
 
56
56
  **Shop plant:** `shop-extract`, `shop-witness`, `shop-pin` (groover-hangar) are first-class with mill plant. Extra shops: `foundry.json` `shopPlant`. Not `"costume": true`. `npx @0xray/foundry inspect --skip-live` is the receipt.
@@ -59,9 +59,9 @@ Governance deliberation: **code-review**, **security-audit**, **researcher** wit
59
59
 
60
60
  **Blip plant:** Product mill `@0xray/blip` (not a mill copy). Hangar shop pair later. Alias `"plant": "blip"` + `npx @0xray/foundry blip render --brief "..." --mode still|motion:orb` writes a 4.44s mp4 **with an audio bed**. Registry v0: still + Rippel five (`orb` `swirl` `snap` `waves` `spark`). Motions are Rippel v2 `VisualConfig.circles` at ≥720p — sharp look + tempo/frequency animation on all five (wireframe is `--engine wireframe` only). Auto bed syncopates to the motion grid. Each mint wears a sparse seed mesh plus field accents (stars, grids, gradients, blinkers); receipt `visualConfig.mesh` + `visualConfig.field` are the fingerprints. `kapow` is a design opt (`motion:kapow`) — two-tier comic stamp on the same stanza. Organs live in the mill: `blip-vibe` (`npx @0xray/foundry blip vibe`) scores stamp density; `blip-looker` (`npx @0xray/foundry blip look`) is the friend hitting replay; appeal 0–10; ship bar is **8**. `still` is the Power Plant ident — plate dissolves over 4.44s at ≥720p (`#08090B` `#F5F7FA` `#3DE0E8` `#F5C518` `#4A7FD4`), not a frozen poster. Adding an organ is a mill publish, not an xray catalog PR. CLI shim `foundry blip` remains (0.1.11+). Inspect checks duration / mode id / file / audio.
61
61
 
62
- ## Memory routing + Repertoire (v3.3+)
62
+ ## Memory routing + Repertoire (preferred, v3.3+)
63
63
 
64
- **Station is the successor card** (Read `.xray/state/STATION.md`). Repertoire 0.2 is a thin routing seed (8 factory names). The worn mill reads the **project copy** under `.xray/state/repertoire/`. 0.1.0–0.1.8 were the same judgment organ; do not pin 0.1.8 for mill wear. Split: `docs-site/docs/guides/station-vs-repertoire.md`.
64
+ **Wear Repertoire.** It is the long-term judgment organ. Dest is named invariants (factory + stack laws), not hangar `repo-*` or git slugs. **Station is the compact ticket** (Read `.xray/state/STATION.md`) — not a substitute for Repertoire. The worn mill reads the **project copy** under `.xray/state/repertoire/`. 0.1.0–0.1.8 were the same judgment organ; do not pin 0.1.8. Split: `docs-site/docs/guides/station-vs-repertoire.md`.
65
65
 
66
66
  `xray/features.json` → `memory_routing` (schema: `features.schema.json`):
67
67
 
package/dist/CHANGELOG.md CHANGED
@@ -6,16 +6,19 @@ The format is based on [Conventional Commits](https://www.conventionalcommits.or
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [4.0.21] - 2026-09-23
10
+
9
11
  ### ✨ Features
10
- - **Cleanup is memory** — `applyStationHeat` grows the project copy when Repertoire is on: kernel sessions, sibling `repo-*` names, and NOTES/CLEANSE diary heat. Groover field stays off. Opt-out still skips seed and grow. Station stays the pickup card. Not a new MCP/skill.
11
- - **Live context memory** — capture then grow. Session `patterns` come from real git (commit slugs + structural names), not a leftover catalog. Cursor skip / afterFileEdit, Grok heat, Hermes pre-process, and OpenClaw pre-tool share one dest lock so parallel seats write one project copy. Not a new MCP/skill.
12
- - **Vendored Repertoire 0.2.5** — `vendor/@0xray/repertoire` is the published 0.2.5 package (overlays included). Wear replaces an older leftover in `node_modules`. A newer user-installed copy is left alone. Boot reads worn `node_modules`, then vendor, then a sibling checkout last. Repertoire stays optional (`enabled: false` + `provider: repertoire`); Station is the memory when it is off.
13
- - **Cursor fifth wear** — `install-bridges.cjs` fastens project `.cursor/hooks.json` (preToolUse / preCompact / afterFileEdit) so Cursor Cloud heats Station and gates tools. Leaves an existing file alone. Not a fifth chat TUI. No new MCP/skill surface. Pack gate (`REQUIRED_PACK_PATHS`) now requires `dist/integrations/cursor/hooks/{hooks.json,pre-tool-use.js,pre-compact.js,after-file-edit.js,cursor-hook-utils.js,cursor-usage-receipt.js}` so a published tarball cannot ship a dead consumer command. `preToolUse` / `afterFileEdit` rewrite the card when git HEAD or Repertoire count diverges — Ticket / Durable / Seed stay. OP-PROC stays in the hook, not on Station.
12
+ - **Cleanup is memory** — `applyStationHeat` grows the project copy when Repertoire is on: kernel sessions and NOTES/CLEANSE diary heat, then prunes keyword names. Dest is laws (named invariants), not hangar `repo-*` or git slugs. Groover field stays off. Opt-out still skips seed and grow. Station stays the pickup card. Not a new MCP/skill.
13
+ - **Live context memory** — capture then grow. Session `patterns` observe existing dest/stack laws mentioned in git — they do not mint commit slugs. Cursor skip / afterFileEdit, Grok heat, Hermes pre-process, and OpenClaw pre-tool share one dest lock so parallel seats write one project copy. Not a new MCP/skill.
14
+ - **Vendored Repertoire 0.2.5** — `vendor/@0xray/repertoire` is the published 0.2.5 package (overlays included). Wear replaces an older leftover in `node_modules`. A newer user-installed copy is left alone. Boot reads worn `node_modules`, then vendor, then a sibling checkout last. **Repertoire is preferred.** Explicit opt-out (`enabled: false` + `provider: repertoire`) still skips seed and grow; Station is the memory when it is off.
15
+ - **Cursor fifth wear** — `install-bridges.cjs` fastens project `.cursor/hooks.json` plus relative `.cursor/hooks/*.sh` so Cursor Cloud heats Station and gates tools. Leftover env-assignment commands are rewritten. Not a fifth chat TUI. No new MCP/skill surface. Pack gate (`REQUIRED_PACK_PATHS`) now requires `dist/integrations/cursor/hooks/{hooks.json,pre-tool-use.js,pre-compact.js,after-file-edit.js,cursor-hook-utils.js,cursor-usage-receipt.js,xray-cloud-hook.sh,pre-tool-use.sh,pre-compact.sh,after-file-edit.sh}` so a published tarball cannot ship a dead consumer command. `preToolUse` / `afterFileEdit` rewrite the card when git HEAD or Repertoire count diverges — Ticket / Durable / Seed stay. OP-PROC stays in the hook, not on Station.
14
16
 
15
17
  ### 📚 Documentation
16
18
  - Cursor fifth wear in README integrations table, AGENTS / AGENTS-consumer / SKILLS / llms.txt, and Docusaurus integrations / getting-started / consumer-migration.
17
19
  - **Lead cadence (syncopation)** — `grok-bot/ops/LEAD-CADENCE.md` is the peer-lead OP-PROC: dummy `SKILLS.md` tests, same-sess wear + Station card, npm OTP+poll, always branch/worktree/PR, loop until Station is done, workstreams not idle pacers. Wired into `orchestrator` skill, AGENTS hot-swap, OPS-CATALOG. Not a new skill (Codex 69).
18
- - **Repertoire project copy** — shipped `memory_routing.config.signalsPath` is `.xray/state/repertoire/curated_signals.json`. The factory tarball stays read-only. After compact the suit routes the living project names, not the 8-name seed.
20
+ - **Repertoire is preferred** — README, SKILLS.md, llms.txt, AGENTS, AGENTS-consumer, and the memory guides say wear it. Dest is named laws. Station is the compact ticket, not a substitute. Shipped `signalsPath` is `.xray/state/repertoire/curated_signals.json`. Do not pin 0.1.8.
21
+ - **Few files have versions** — patch stamps live in `package.json`, CHANGELOG, and stamped JSON only. Guides, Station, and OP-PROC do not pin a cut. `release:docs-check` refuses present-tense `0xray@x.y.z` / “this cut is” on those surfaces.
19
22
  - **Board clock** — critique board wakes on PR events and resumes the same critic. Two idle pacers (reviewer + lead-reader) are forbidden; they inflate context and cause compact. Merge after PASS+CI (gate A). Publish only after mill-gate D + `foundry gate`.
20
23
  - **Dispatch encode** — lead cards ticket + PR URLs + “Wear, then review.” Critic OP-PROC lives on `SEATS.md` Reviewer. When a law is spoken twice, write it to disk this wake. No new skill.
21
24
  - **Ship decision matrix** — lead-owned. A PR+CI · B pack (`assert-packed-dist-cli` + consumer smoke) · C `npm run release:docs-check` · D `npx @0xray/foundry release --i-mean-it`. Green CI is not ship. Spend / credentials stay Ask-first. Host Auto Review may still card npm/Railway; that is not the OS decision.
@@ -29,11 +32,16 @@ The format is based on [Conventional Commits](https://www.conventionalcommits.or
29
32
  - **OP-PROC reload after compact** — overlay dest names *are* OP-PROC. Heat writes them to `.xray/state/repertoire-working.json` `opProcNames`. Station stays a ticket (count + four working matches). Not a new skill.
30
33
  - **Groover is not Repertoire.** Groover was a broken experiment of the organ. Do not grow dest from Groover field as if that is the KB. On `LEAD-CADENCE.md` Heads from tails. Not on Station.
31
34
 
35
+ ### 🐛 Bug Fixes
36
+ - **Dest is laws, not keywords** — wake hydrate is seed + stack only. `patternsFromGit` observes existing laws. Grow skips `syncWorkspaceRepos`. `pruneKeywordDest` drops `repo-*` / release-stamp slugs / generic field-observed names unless factory or stack protects them. Compact `hookEvent` / `event_class` hold across later preToolUse even when HEAD moves. Not a new MCP/skill.
37
+ - **Cursor Cloud host fire** — leftover `XRAY_AI_PATH=` / invoke-probe one-liners never start on Cloud (argv[0] is not a shell). Fasten copies `.cursor/hooks/*.sh` and rewrites leftover env-assignment templates to relative paths (`preToolUse` / `preCompact` / `afterFileEdit` / `beforeShellExecution` / `beforeReadFile`). Workspace wrapper (`/agent` with `repos/xray`) is not a dest heat root, even with a leftover wrapper card. Heat discovers mill cards under `repos/` and the Read path. Dest `EACCES` fail-opens so a wired hook cannot deny every tool. Fasten also writes the daemon workspace root when visible, then pokes local `ReloadAgentSkills` so a mid-session wear binds this daemon. Cloud `preCompact` is supported (hooks.md: Yes). It fires on a real window compact after bind — this seat `event=preCompact` at 2026-09-22T23:16:22 with host stdin (256k / 230861 / 90%). Hook stdout cannot spawn; persist `conversation_id` + `generation_id` on the receipt and resume that id (same as Task's returned agent id). Not a new MCP/skill.
38
+ - **Station ticket survives heat** — leftover `session-boot` extras (`Subject brain` / Draft #96) no longer overwrite a live Station Intent/Plan. Pickup beats a boot-echo card. HEAD move drops a leftover lead-dev-plan that still echoes boot. Not a new MCP/skill.
39
+
32
40
  ### 🔄 Changes
33
41
  - **Durable Hold npm** — heat + `cursorBootNeedsRefresh` + `npx 0xray validate` drop/fail `Hold npm` on Station. Identity stays. Mill-gate holds the ship latch. Not a new skill.
34
- - **Hangar catalog** — mill hangar docs use Clearing `GET /v1/catalog` as the directory (listed hangars: Groover DID + pin, plus solar + live shop), not a hardcoded extract/witness/pin route table. Groover MCP `list_hangars` reads that catalog. 0xray stays 4.0.15.
35
- - **foundry-plant/0** — fasten is a protocol any mill implements, not a 0xray-owned catalog of plant kinds. Builtin plant is mill+inspect only. `foundry.json` `"plant": "@0xray/blip"` (alias `"blip"`) fastens whatever that mill package declares. Organs (looker, vibe, mixer) live in the mill; adding one is a mill publish, not an xray catalog PR. Nested mill `@0xray/foundry@0.1.12`. CLI shims `foundry blip|sound` still exist on foundry 0.1.11+. 0xray stays 4.0.15.
36
- - **Blip/sound mills moved to `@0xray/blip`** — 4.44s drawers (render, kapow, vibe, wow-pass listen/cel, sound bed/mixer, looker) live in the blip product mill. `@0xray/foundry@0.1.11` shims `foundry blip|sound` including `blip look`. Railway plant consumes the product mill, not a hand-vendored copy. 0xray stays 4.0.15.
42
+ - **Hangar catalog** — mill hangar docs use Clearing `GET /v1/catalog` as the directory (listed hangars: Groover DID + pin, plus solar + live shop), not a hardcoded extract/witness/pin route table. Groover MCP `list_hangars` reads that catalog.
43
+ - **foundry-plant/0** — fasten is a protocol any mill implements, not a 0xray-owned catalog of plant kinds. Builtin plant is mill+inspect only. `foundry.json` `"plant": "@0xray/blip"` (alias `"blip"`) fastens whatever that mill package declares. Organs (looker, vibe, mixer) live in the mill; adding one is a mill publish, not an xray catalog PR. Nested mill `@0xray/foundry@0.1.12`. CLI shims `foundry blip|sound` still exist on foundry 0.1.11+.
44
+ - **Blip/sound mills moved to `@0xray/blip`** — 4.44s drawers (render, kapow, vibe, wow-pass listen/cel, sound bed/mixer, looker) live in the blip product mill. `@0xray/foundry@0.1.11` shims `foundry blip|sound` including `blip look`. Railway plant consumes the product mill, not a hand-vendored copy.
37
45
 
38
46
  ---
39
47
 
package/dist/README.md CHANGED
@@ -14,13 +14,13 @@ Not a catalog of agents. The product is the **skeleton you wear**.
14
14
  - **Always on** — Codex 11 / 29 / 69, destructive shell, no new MCP/skill/handler surface
15
15
  - **Temperament** — `frontier` | `guided` | `strict` | `auto` — how loud the engine is, not whether governance exists
16
16
  - **Wear** — Grok, OpenCode, Hermes, OpenClaw, plus Cursor project hooks. One SSOT gate
17
- - **Muscle** — Repertoire: auto-enables when the module resolves; session-start writes a one-line resume so the next station is not born amnesiac
17
+ - **Muscle** — **Repertoire is preferred.** Vendored 0.2.5 ships **on**. Dest is named laws, not hangar `repo-*` or git slugs. Station is the compact-survival ticket — not a substitute for Repertoire.
18
18
 
19
19
  ```bash
20
20
  npm install 0xray
21
21
  ```
22
22
 
23
- Consumer `npm install 0xray` auto-wires four chat bridges, Cursor project hooks, and seven MCP servers. Repertoire **0.2** is the factory memory organ (vendored): seed primitives, in-process routing, extra host MCP `repertoire`. Not an eighth `xray-*` server. Opt out with `"enabled": false, "provider": "repertoire"`.
23
+ Consumer `npm install 0xray` auto-wires four chat bridges, Cursor project hooks, and seven MCP servers. **Repertoire is preferred** — vendored **0.2.5** ships on: factory + stack laws, in-process routing, extra host MCP `repertoire`. Not an eighth `xray-*` server. Dest is a judgment index. Explicit opt-out only: `"enabled": false, "provider": "repertoire"`. Do not pin 0.1.8.
24
24
 
25
25
  ## Quick Start
26
26
 
@@ -51,7 +51,7 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
51
51
 
52
52
  | Version | Highlights |
53
53
  |---------|------------|
54
- | **Unreleased** | Fasten is **foundry-plant/0**: builtin plant is mill+inspect only. `foundry.json` `"plant": "@0xray/blip"` (aliases `"plant": "blip"` / `"plant": "sound"`) fastens whatever that mill declares (looker / vibe / mixer live in the mill). Nested mill `@0xray/foundry@0.1.12`. CLI shims `foundry blip\|sound` remain (0.1.11+). Shop plant first-class (`shop-extract`, `shop-witness`, `shop-pin` + `foundry.json` `shopPlant`). 0xray stays 4.0.15. |
54
+ | **Unreleased** | Fasten is **foundry-plant/0**: builtin plant is mill+inspect only. `foundry.json` `"plant": "@0xray/blip"` (aliases `"plant": "blip"` / `"plant": "sound"`) fastens whatever that mill declares (looker / vibe / mixer live in the mill). Nested mill `@0xray/foundry@0.1.12`. CLI shims `foundry blip\|sound` remain (0.1.11+). Shop plant first-class (`shop-extract`, `shop-witness`, `shop-pin` + `foundry.json` `shopPlant`). |
55
55
  | **4.0.9** | Mill target: postinstall does not mill npm global prefix or `_npx` as a consumer. Isolated HOME skips machine `~/.grok`. |
56
56
  | **4.0.0** | Exo + temperament. Constitution always on; ceremony by host. Repertoire organ on (vendored 0.2). Station card survives compact/host-swap. **On npm.** [vision](docs-site/docs/architecture/v4-vision.md) · [now](docs-site/docs/architecture/v4-now.md) |
57
57
  | **3.4.1** | Unified `install-bridges.cjs` on postinstall — OpenCode, Grok, Hermes, OpenClaw in one pass. All 7 MCPs servers via `npx -y 0xray mcp <cmd>` (no `dist/` paths). Canonical `release.mjs` pipeline. |
@@ -63,7 +63,7 @@ Docs: [guides/autonomy-command](docs-site/docs/guides/autonomy-command.md) · Sk
63
63
 
64
64
  ### Consolidations
65
65
 
66
- - **One consumer install path** — `postinstall.cjs` → `installAllBridges()` replaces scattered per-platform setup. **4.0.9:** does not mill npm global prefix or `_npx`.
66
+ - **One consumer install path** — `postinstall.cjs` → `installAllBridges()` replaces scattered per-platform setup. Mill target is the consumer project, not npm global prefix or `_npx`.
67
67
  - **7-server MCP surface** — `.mcp.json` SSOT; Grok plugin and all bridges share `XRAY_MCP_SERVERS`.
68
68
  - **Dev vs consumer AGENTS** — `AGENTS.md` (framework) vs `AGENTS-consumer.md` (copied to consumer projects on install).
69
69
  - **Release pipeline** — `npm run release:patch|minor|major` → reconcile → gate → artifacts → tag → publish.
@@ -149,9 +149,9 @@ Core governance agents:
149
149
 
150
150
  See [AGENTS.md](AGENTS.md) and [SKILLS.md](SKILLS.md) for the full agent and skill catalog.
151
151
 
152
- ## Memory Routing + Repertoire (v3.3+)
152
+ ## Memory Routing + Repertoire (preferred, v3.3+)
153
153
 
154
- Pluggable `memory_routing` block in `features.json` (validated by `features.schema.json`):
154
+ **Wear Repertoire.** It is the long-term judgment organ. Station holds the ticket across compact. Dest is named invariants, not keywords. Pluggable `memory_routing` in `features.json` (validated by `features.schema.json`) ships **on**:
155
155
 
156
156
  ```json
157
157
  "memory_routing": {
@@ -174,9 +174,9 @@ Pluggable `memory_routing` block in `features.json` (validated by `features.sche
174
174
  | **AsideContext** (v3.2) | `buildInheritedContext` → `inheritedContext.memoryRouting` on orchestrator `spawnAside` |
175
175
  | **Feedback** | Per-task `ingestFeedback()` closes the learning loop |
176
176
 
177
- **External hosts** (Hermes/Grok): add `repertoire-mcp` to `.mcp.json` — see Repertoire docs.
177
+ **External hosts** (Hermes/Grok): add `repertoire-mcp` to `.mcp.json` — see Repertoire docs. Preferred. Not optional flavor.
178
178
 
179
- Opt out: `"memory_routing": { "enabled": false, "provider": "repertoire" }`.
179
+ Explicit opt-out only: `"memory_routing": { "enabled": false, "provider": "repertoire" }`.
180
180
 
181
181
  Docs: [memory routing](docs-site/docs/guides/memory-routing.md) · [Repertoire](docs-site/docs/guides/repertoire.md) · [features.json](docs-site/docs/guides/features-json.md) · [all features since 3.1](docs-site/docs/guides/features-since-3.1.md)
182
182
 
@@ -188,7 +188,7 @@ Docs: [memory routing](docs-site/docs/guides/memory-routing.md) · [Repertoire](
188
188
  | **Grok CLI / Build** | `npx 0xray grok install` | Project `.grok/plugins/0xray` (shared HOME does not clobber machine plugin), 7 MCPs servers |
189
189
  | **Hermes Agent** | `npx 0xray hermes install` | `~/.hermes/plugins/xray-hermes`, consumer root marker |
190
190
  | **OpenClaw** | `npx 0xray openclaw install` | `.xray/config/openclaw.json`, skill sync |
191
- | **Cursor** | postinstall (`installCursorBridge`) | Fastens `.cursor/hooks.json` (preToolUse / preCompact / afterFileEdit). Leaves an existing file alone. Not a fifth chat TUI. |
191
+ | **Cursor** | postinstall (`installCursorBridge`) | Fastens `.cursor/hooks.json` + relative `.cursor/hooks/*.sh`. Rewrites leftover env-assignment one-liners. Not a fifth chat TUI. |
192
192
 
193
193
  ## Governance & Codex
194
194
 
@@ -200,9 +200,9 @@ Docs: [memory routing](docs-site/docs/guides/memory-routing.md) · [Repertoire](
200
200
 
201
201
  ## Testing
202
202
 
203
- | Suite | Status (v4.0.1) |
204
- |-------|-----------------|
205
- | Four-floor consumer e2e | OpenCode 34/0 · Grok 63/0 · Hermes 39/0/2 · OpenClaw 96/0/1 (npm 4.0.0 pack) |
203
+ | Suite | Status |
204
+ |-------|--------|
205
+ | Four-floor consumer e2e | OpenCode 34/0 · Grok 63/0 · Hermes 39/0/2 · OpenClaw 96/0/1 |
206
206
  | Consumer smoke | `npm run release:gate` — pack → clean install → 7 MCPs + 4 chat bridges + Cursor hooks + organ on |
207
207
  | Pack → tmp proof | `npm run pack:tmp-proof` — tgz install + `foundry mint --skip-live` + hangar shops + inspect (no costume dump). Playwright n/a (CLI). |
208
208
 
@@ -215,12 +215,12 @@ npm run release:npm # gate + prepare + npm publish --access public
215
215
 
216
216
  ## Release
217
217
 
218
- Product **4.0.0** is on npm. Do **not** run `release:major` to ship a 4.x fix (that becomes 5.0.0). Do **not** put a `scripts.publish` lifecycle that re-runs the gate after the registry PUT.
218
+ The **4.0** line is on npm. Do **not** run `release:major` to ship a 4.x fix (that becomes 5.0.0). Do **not** put a `scripts.publish` lifecycle that re-runs the gate after the registry PUT. Patch number lives in `package.json` + CHANGELOG.
219
219
 
220
220
  ```bash
221
221
  npm run release:gate
222
222
  npm run release:npm # after gate is green; uses npm publish --access public
223
- npm run release:patch # version bump pipeline (not for a already-bumped 4.0.0)
223
+ npm run release:patch # version bump pipeline (not for an already-bumped package.json)
224
224
  ```
225
225
 
226
226
  Pipeline: reconcile-version → release-gate (build + test + consumer smoke) → CHANGELOG/README/AGENTS artifacts → commit → tag → npm publish.
package/dist/SKILLS.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  **45 skills** in this exo catalog. Default consumer plant is **`mill` + `inspect`**, not this dump. `npm install 0xray` does **not** sync 45 skills unless `foundry.json` `"costume": true`. Factory shop plant (`shop-extract`, `shop-witness`, `shop-pin`) coexists with mill plant when a hangar wears those shops. Extra shops: `foundry.json` `shopPlant`. Fasten is **foundry-plant/0**: builtin plant is mill+inspect only. `foundry.json` `"plant": "@0xray/blip"` (aliases `"plant": "blip"` / `"plant": "sound"`) fastens whatever that mill package declares — organs (looker, vibe, mixer) live in the mill, not this catalog. Nested mill `@0xray/foundry@0.1.12`. CLI shims `foundry blip|sound` still exist on foundry 0.1.11+. Agent map: [llms.txt](llms.txt).
6
6
 
7
- xray ships 45 knowledge skills (`src/skills/<name>/SKILL.md`) as the **costume / self-plant catalog**. Lead-dev operating model lives in **`orchestrator`** skill + `multi_agent_orchestration.lead_dev_mode` in features.json. Skills load on demand via the **xray-skills** MCP server (`npx -y 0xray mcp skills`) or when you plant them. This file is the exo catalog — mill does **not** write it to the consumer root.
7
+ xray ships 45 knowledge skills (`src/skills/<name>/SKILL.md`) as the **costume / self-plant catalog**. Lead-dev operating model lives in **`orchestrator`** skill + `multi_agent_orchestration.lead_dev_mode` in features.json. **Repertoire is preferred** for long-term judgment (vendored 0.2.5, dest = named laws). Station is the compact ticket, not a skill and not a keyword store. Skills load on demand via the **xray-skills** MCP server (`npx -y 0xray mcp skills`) or when you plant them. This file is the exo catalog — mill does **not** write it to the consumer root.
8
8
 
9
9
  ---
10
10
 
@@ -156,9 +156,9 @@ npx 0xray skill:install <source>
156
156
 
157
157
  | Feature | Skill connection |
158
158
  |---------|------------------|
159
- | **Memory routing** (v3.3) | Researcher uses Repertoire signals; optional `@0xray/repertoire` MCP |
159
+ | **Memory routing** (v3.3) | **Repertoire preferred** — researcher + thinDispatch + planner use dest laws. Extra MCP `npx @0xray/repertoire mcp` (not an 8th `xray-*`). Dest is named invariants, not `repo-*` slugs. |
160
160
  | **AsideContext** (v3.2) | Orchestrator subcontexts during skill dispatch |
161
- | **7 MCP servers** (v4.0.1) | `xray-skills` is the primary skill invocation surface |
161
+ | **7 MCP servers** (v4.0) | `xray-skills` is the primary skill invocation surface |
162
162
 
163
163
  Docs: [AGENTS.md](AGENTS.md) · [README.md](README.md) · [Docusaurus guides](docs-site/docs/guides/)
164
164
 
@@ -6,7 +6,7 @@
6
6
  */
7
7
  /** Same paths as `REQUIRED_PACK_PATHS` in assert-packed-dist-cli.mjs — typed here so src/cli does not import untyped .mjs. */
8
8
  export declare const VALIDATE_PACK_PATHS: readonly string[];
9
- export declare const CONSUMER_WEAR_PATHS: readonly ["AGENTS.md", ".mcp.json", ".xray/codex.json", ".xray/features.json", ".cursor/hooks.json"];
9
+ export declare const CONSUMER_WEAR_PATHS: readonly ["AGENTS.md", ".mcp.json", ".xray/codex.json", ".xray/features.json", ".cursor/hooks.json", ".cursor/hooks/pre-tool-use.sh", ".cursor/hooks/xray-cloud-hook.sh"];
10
10
  export declare const MILL_PLANT_SKILLS: readonly ["mill", "inspect"];
11
11
  export type ValidateCheck = {
12
12
  id: string;
@@ -18,6 +18,10 @@ export const VALIDATE_PACK_PATHS = [
18
18
  "dist/integrations/cursor/hooks/after-file-edit.js",
19
19
  "dist/integrations/cursor/hooks/cursor-hook-utils.js",
20
20
  "dist/integrations/cursor/hooks/cursor-usage-receipt.js",
21
+ "dist/integrations/cursor/hooks/xray-cloud-hook.sh",
22
+ "dist/integrations/cursor/hooks/pre-tool-use.sh",
23
+ "dist/integrations/cursor/hooks/pre-compact.sh",
24
+ "dist/integrations/cursor/hooks/after-file-edit.sh",
21
25
  ];
22
26
  export const CONSUMER_WEAR_PATHS = [
23
27
  "AGENTS.md",
@@ -25,6 +29,8 @@ export const CONSUMER_WEAR_PATHS = [
25
29
  ".xray/codex.json",
26
30
  ".xray/features.json",
27
31
  ".cursor/hooks.json",
32
+ ".cursor/hooks/pre-tool-use.sh",
33
+ ".cursor/hooks/xray-cloud-hook.sh",
28
34
  ];
29
35
  export const MILL_PLANT_SKILLS = ["mill", "inspect"];
30
36
  export function resolveInstalledPackageRoot(cwd) {
@@ -101,7 +107,7 @@ export function collectValidateReport(cwd) {
101
107
  id: "consumer-wear",
102
108
  ok: missingWear.length === 0,
103
109
  detail: missingWear.length === 0
104
- ? "AGENTS.md · .mcp.json · .xray · .cursor/hooks.json"
110
+ ? "AGENTS.md · .mcp.json · .xray · .cursor/hooks.json · .cursor/hooks/*.sh"
105
111
  : `missing ${missingWear.join(", ")}`,
106
112
  });
107
113
  const millRoot = join(cwd, ".opencode", "skills");
@@ -8,18 +8,19 @@ Repertoire MCP is optional. Station + gates work without a full memory-routing r
8
8
 
9
9
  1. Commit `.cursor/hooks.json` at the **project root** (this file, not `~/.cursor/hooks.json`).
10
10
  2. Cursor Cloud Agent clones the repo and loads **project** hooks. Desktop Agent Chat does the same when the folder is the workspace.
11
- 3. Hook names are camelCase: `preToolUse`, `preCompact`, `afterFileEdit`. Commands are shell strings. Stdin is JSON; stdout is JSON.
12
- 4. First `preToolUse` or `afterFileEdit` writes `.xray/state/session-boot.json` + `.xray/state/STATION.md`. After a compact, **Read STATION.md**. The host does not inject it.
13
- 5. `preCompact` is observational (cannot block). It merges Station (stock heat updates; ticket / seed / Durable / unfinished keys stay).
11
+ 3. Hook names are camelCase: `preToolUse`, `preCompact`, `afterFileEdit`, plus Cloud `beforeShellExecution` / `beforeReadFile`. Command is a **relative** `.cursor/hooks/*.sh` — Cloud execs argv[0] without a shell. Do not put `XRAY_AI_PATH=` in `hooks.json`. Stdin is JSON; stdout is JSON.
12
+ 4. First `preToolUse` or `afterFileEdit` writes `.xray/state/session-boot.json` + `.xray/state/STATION.md`. After a compact, **Read STATION.md**. The host does not inject it. A multi-repo Cloud wrapper (`/agent` with `repos/xray`) is not a dest heat root, even if a leftover wrapper card exists. Heat the mill under `repos/` and the Read path. Dest `EACCES` fail-opens — a wired hook must not deny every tool.
13
+ 5. `install-bridges` also fastens the daemon workspace root when it can see `repos/xray` above the checkout, then pokes local `ReloadAgentSkills` so a mid-session wear binds this daemon. Command stays a relative `.cursor/hooks/*.sh`.
14
+ 6. `preCompact` is observational (cannot block). Cloud **does** fire it ([hooks.md](https://cursor.com/docs/hooks.md) support matrix: Yes) once hooks are bound and the host actually compacts. Stdout is only `{ "user_message": "…" }` — that is a notice, not a spawn. The spawn id is stdin `conversation_id` (same `bc-`) plus Task's returned agent id. Resume that id. Do not cold-start a twin. Station merge keeps ticket / seed / Durable / unfinished keys.
14
15
 
15
- Copy the consumer template from `src/integrations/cursor/hooks/hooks.json` (dist paths under `node_modules/0xray`) when wearing the published package. This exo repo wears `src/integrations/cursor/hooks/*.js` so a cloud can run before `npm run build`.
16
+ Copy the consumer template from `src/integrations/cursor/hooks/hooks.json` and the sibling `.sh` runners. `xray-cloud-hook.sh` finds mill JS at `XRAY_AI_PATH`, `../xray`, or `node_modules/0xray` (dist then src). This exo repo wears `src/integrations/cursor/hooks/*.js` so a cloud can run before `npm run build`.
16
17
 
17
18
  ## Contracts
18
19
 
19
20
  | Hook | Stdin | Stdout |
20
21
  |------|--------|--------|
21
22
  | `preToolUse` | Cursor tool event (`tool_name`, `tool_input`, `cwd`, `workspace_roots`, `conversation_id`) | `{ "permission": "allow" \| "deny" }` plus `user_message` / `agent_message` on deny |
22
- | `preCompact` | `{ trigger, context_tokens, … }` | `{ "user_message": "…" }` after Station write |
23
+ | `preCompact` | `{ trigger, context_tokens, conversation_id, generation_id, … }` | `{ "user_message": "…" }` after Station write. Receipt keeps `conversation_id` + `generation_id`. That id is enough to resume. |
23
24
  | `afterFileEdit` | file event | `{}` — boots Station only |
24
25
 
25
26
  `preCompact` labels `event_class`:
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+ HERE="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
3
+ exec /bin/sh "${HERE}/xray-cloud-hook.sh" afterFileEdit after-file-edit.js
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+ HERE="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
3
+ exec /bin/sh "${HERE}/xray-cloud-hook.sh" beforeReadFile pre-tool-use.js
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+ HERE="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
3
+ exec /bin/sh "${HERE}/xray-cloud-hook.sh" beforeShellExecution pre-tool-use.js