Consumer Migration & Integration Guide (v3.4+)
Audience: Plugin authors, bridge maintainers (Hermes, OpenClaw, Grok Build, OpenCode), and projects that consume 0xray directly.
Temperament on upgrade (v4.0)
Existing .xray/features.json without suit_temperament stays guided (full spawn-plan deny). Postinstall merge will not silently frontier a Grok consumer. New installs copy shipped profile: "auto" (Grok → frontier, Hermes/OpenCode → guided). See Suit temperament.
Quick Start for v3 Consumers
npm install 0xray
npx 0xray wear
Wear writes the consumer suit, including when npm did not run the install script. When that script does run, it symlinks vendored @0xray/repertoire into node_modules and prints npx 0xray wear. Wear then:
| Step | Action |
|---|---|
| 1 | AGENTS-consumer.md → project AGENTS.md |
| 2 | .gitignore.default → .gitignore (if absent) |
| 3 | Deploy .xray/ (codex.json, features.json, config.json) |
| 4 | Write project .mcp.json with 7 MCP servers |
| 5 | Install 4 chat bridges: OpenCode, Grok, Hermes, OpenClaw, plus Cursor .cursor/hooks.json |
| 6 | Fasten mill plant (mill + inspect). Fasten is foundry-plant/0. "plant": "@0xray/blip" (aliases blip/sound) fastens whatever that mill declares. Nested mill @0xray/foundry@0.1.12. The mill suit also wears every catalog skill and every role file. A blip or sound seat fastens that plant only. |
| 7 | Optional git pre-commit hook. Factory hangar shops coexist via shopPlant |
Manual install (idempotent, same outcome):
npx 0xray opencode install
npx 0xray grok install
npx 0xray hermes install
npx 0xray openclaw install
npx 0xray setup # optional extras
Seven MCP Servers (v3.4.1)
All consumer MCP servers use npx -y 0xray mcp <cmd> — no dist/ subpath hacks:
| Server | Command |
|---|---|
xray-governance | mcp governance |
xray-skills | mcp skills |
xray-orchestrator | mcp orchestrator |
xray-enforcer | mcp enforcer |
xray-researcher | mcp researcher |
xray-code-review | mcp code-review |
xray-architect-tools | mcp architect-tools |
Grok plugin MCP config shares the same XRAY_MCP_SERVERS constant as install-bridges.cjs.
Key v3 Consumer Changes
v3.4.1 — Unified bridge installer
install-bridges.cjsis the single consumer onboarding path (replaces scattered per-platform setup).setup.cjsusesisConsumerInstall()— works for bothnode_modules/0xrayandnode_modules/xray.- Hermes bridge honors
XRAY_ROOTenv andxray-consumer-root.txtmarker. - Grok skills sync to both
~/.grok/plugins/0xray/skills/and~/.grok/skills/.
v3.4 — Nucleus exports
0xray/nucleusand0xray/nucleus/*are the supported way to reach core surfaces.- Internal
dist/nucleus/...paths are not part of the public contract.
v3.3 — Memory routing + Repertoire
- Repertoire is preferred. Vendored 0.2.9 ships on. Dest is named laws, not hangar
repo-*. - Pluggable
memory_routingblock infeatures.json(validated byfeatures.schema.json). - Repertoire (
@0xray/repertoire) is the default provider. Station is the compact ticket, not a substitute. MemoryRoutingProvidercontract:enrichTasks,getTaskConfidence,resolveThinDispatch,ingestFeedback.- External hosts: add
repertoire-mcpto.mcp.json(repertoire__get_task_confidence, etc.). - See Memory Routing and Repertoire Integration.
v3.3.1 — Confidence gate
- Orchestrator execution planning applies a confidence gate before multi-agent dispatch.
v3.2 — Hardening
- Typecheck integration for orphan files, SelfProposalEngine, AsideContext.
- Canonical
release.mjspipeline with consumer smoke gate.
v3.1.1 — Rename + marketplace
- StringRay → 0xRay rename complete.
- Root
.mcp.json+.grok-plugin/plugin.jsonfor marketplace discovery. - ConfigLoader supports
mcpServersformat. - Removed:
hermes bridgeCLI (usehermes install),.opencode/xray/fallback.
Postinstall / setup hygiene
scripts/node/postinstall.cjs, setup.cjs, and install-bridges.cjs:
- Walk from
node_modulesto consumer project root. - Legacy
xraypackage name tolerance. - Hooks and MCPs placed correctly for node_modules and copy-to-root layouts.
- Mill target: do not mill npm global prefix or npx
_npxcache. Parent ofnode_modulesis the mill target only when it is a real project (package.json).npm i -gmill-skips dogfood (mills the 0xray package itself, not Homebrewlib). Isolated HOME never writes passwd~/.grok.
Verify gate (term 76)
Every release passes npm run release:gate (or CI equivalent):
npm pack→ fresh consumer install- ValidatorRegistry load (29 validators)
- Enforcement gate from tarball
- Nucleus plugin-registry access
- Activity log reachability
- Hook pipeline + MCP packaging
- 4-bridge consumer smoke (7 MCP servers)
npm run release:gate
npm run release:npm # gate first, then npm publish — do not use a scripts.publish lifecycle
0xray (framework) vs consumer project
| Context | Proposals |
|---|---|
Framework repo (0xray) | source: 'system' | 'metamorphosis', tags: ['0xray'], onChain: true |
| Consumer projects | source: 'agent', tags: ['<package>'], onChain: false |
Automatic in inference-cycle.ts + governance-service.ts.
Recommended integration points
- Enforcement: shared gate via plugin injection or
0xray/integration - Direct nucleus (advanced):
0xray/nucleusfor plugin registry, governance handle - Logging:
frameworkLogger→logs/framework/activity.log - Hooks: rely on postinstall; manual:
npx 0xray setup
Removals / deprecations (since 3.1)
| Item | Status |
|---|---|
| StringRay / strray-ai branding | Retired (3.1.1) |
hermes bridge CLI | Removed — use hermes install |
.opencode/xray/ fallback | Removed (3.1.1) |
advanced-features/ | Removed |
| PostProcessor default | Soft-deprecated (enablePostProcessor: false) |
No breaking changes for basic users
If you only use @agent invocations, the CLI/TUI, or default plugin hook injection, v3.4+ changes are transparent.