0xray 4.0.1 → 4.0.3

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 (59) hide show
  1. package/.xray/features.json +1 -1
  2. package/AGENTS-consumer.md +4 -4
  3. package/AGENTS.md +3 -3
  4. package/README.md +1 -1
  5. package/SKILLS.md +1 -1
  6. package/dist/AGENTS.md +3 -3
  7. package/dist/CHANGELOG.md +43 -0
  8. package/dist/README.md +1 -1
  9. package/dist/SKILLS.md +1 -1
  10. package/dist/cli/commands/foundry-mint-wear.d.ts +3 -0
  11. package/dist/cli/commands/foundry-mint-wear.js +17 -0
  12. package/dist/cli/commands/hermes-install.js +2 -0
  13. package/dist/cli/commands/openclaw-install.js +2 -0
  14. package/dist/cli/commands/opencode-install.js +10 -2
  15. package/dist/cli/commands/skill-install.js +4 -0
  16. package/dist/enforcement/enforcer-tools.d.ts +7 -0
  17. package/dist/enforcement/enforcer-tools.js +18 -109
  18. package/dist/integrations/grok/grok-cli.js +2 -0
  19. package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  20. package/dist/processors/implementations/version-compliance-processor.d.ts +3 -34
  21. package/dist/processors/implementations/version-compliance-processor.js +8 -135
  22. package/package.json +15 -14
  23. package/scripts/foundry/CHANGELOG.md +38 -0
  24. package/scripts/foundry/LICENSE +21 -0
  25. package/scripts/foundry/README.md +69 -0
  26. package/scripts/foundry/ci-monitor.mjs +115 -0
  27. package/scripts/foundry/cli.js +2 -0
  28. package/scripts/foundry/cli.mjs +55 -0
  29. package/scripts/foundry/docs-build.mjs +38 -0
  30. package/scripts/foundry/hooks.mjs +36 -0
  31. package/scripts/foundry/mill-root.mjs +62 -0
  32. package/scripts/foundry/mint-suit.cjs +397 -0
  33. package/scripts/foundry/mint.mjs +33 -0
  34. package/scripts/foundry/package.json +54 -0
  35. package/scripts/foundry/plant/agents/mill.yml +5 -0
  36. package/scripts/foundry/plant/skills/mill/SKILL.md +22 -0
  37. package/scripts/foundry/reconcile-version.mjs +150 -0
  38. package/scripts/foundry/release-gate.mjs +100 -0
  39. package/scripts/foundry/release.mjs +266 -0
  40. package/scripts/foundry/validate-release-docs.mjs +316 -0
  41. package/scripts/foundry/version-manager.mjs +444 -0
  42. package/scripts/node/ci-cd-auto-fix.cjs +12 -257
  43. package/scripts/node/consumer-install-smoke.mjs +17 -0
  44. package/scripts/node/enforce-version-compliance.sh +5 -20
  45. package/scripts/node/enforce-version-compliance.ts +13 -113
  46. package/scripts/node/foundry-shim.mjs +19 -0
  47. package/scripts/node/github-actions-monitor.cjs +13 -18
  48. package/scripts/node/install-bridges.cjs +43 -29
  49. package/scripts/node/postinstall.cjs +36 -1
  50. package/scripts/node/reconcile-version.mjs +3 -142
  51. package/scripts/node/release-gate.mjs +3 -74
  52. package/scripts/node/release.mjs +3 -171
  53. package/scripts/node/validate-release-docs.mjs +3 -285
  54. package/scripts/node/version-manager.mjs +3 -738
  55. package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
  56. package/xray/features.json +1 -1
  57. package/scripts/node/release.js +0 -17
  58. package/scripts/node/sync-versions.mjs +0 -18
  59. package/scripts/node/universal-version-manager.js +0 -1043
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "./features.schema.json",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "0xRay Framework - Unified Feature Configuration",
5
5
  "suit_temperament": {
6
6
  "profile": "auto",
@@ -2,9 +2,9 @@
2
2
 
3
3
  <!-- 0xray-managed -->
4
4
 
5
- Quick reference for the 0xRay AI orchestration framework (shipped to your project on `npm install 0xray`).
5
+ Quick reference for the 0xRay AI orchestration framework worn on **{{CONSUMER_NAME}}**{{CONSUMER_VERSION_PAREN}}.
6
6
 
7
- **v4.0.1** — a suit that survives the context window
7
+ **4.0** — a suit that survives the context window
8
8
 
9
9
  Same **three-subsystem OS** as v2 (Inference · External Governance · Autonomous Engine). Constitution always on. Temperament scales ceremony. Four platform bridges. Repertoire organ ships **on** (vendored 0.2); opt out with `"enabled": false, "provider": "repertoire"`. Trim fat, do not gut the design.
10
10
 
@@ -19,9 +19,9 @@ Before other work, Read `.xray/state/STATION.md`. Compaction and host change are
19
19
  `npm install 0xray` runs `install-bridges.cjs` and:
20
20
 
21
21
  - Copies this file → **`AGENTS.md`** in your project root
22
- - Ships root **`SKILLS.md`** and syncs **45 skills** to platform skill directories
22
+ - Mill plant (`mill` skill) onto hangers, then overlays **your** `src/skills` (same name wins). Does **not** dump 45/42 costume unless `foundry.json` `"costume": true`. Does **not** write root **`SKILLS.md`**
23
23
  - Seeds **`.gitignore`** (from template, if absent)
24
- - Deploys **`.xray/`** (`codex.json`, `features.json`, `config.json`)
24
+ - Deploys **`.xray/`** (`codex.json`, `features.json`, `config.json`) then overlays **your** mill SSOT (`xray/codex.json`, `xray/features.json`, `src/skills`, `src/opencode/agents`; remap with `foundry.json`)
25
25
  - Writes **`.mcp.json`** with 7 MCPs servers (`npx -y 0xray mcp …`)
26
26
  - Installs bridges: **OpenCode**, **Grok**, **Hermes**, **OpenClaw**
27
27
 
package/AGENTS.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # xray Agents
2
2
 
3
- Quick reference for the xray AI orchestration framework (**v4.0.1**).
3
+ Quick reference for the xray AI orchestration framework (**4.0**).
4
4
 
5
- **v4.0.1** — a suit that survives the context window.
5
+ **4.0** — a suit that survives the context window.
6
6
 
7
7
  **Exo, not catalog.** Three-subsystem OS (Inference · External Governance · Autonomous Engine) · constitution always on · temperament by host · 4 floors · Repertoire when it resolves.
8
8
 
@@ -38,7 +38,7 @@ Registered in `.mcp.json`, invoked via `npx -y 0xray mcp <cmd>`:
38
38
 
39
39
  Governance deliberation: **code-review**, **security-audit**, **researcher** within the 7-server set.
40
40
 
41
- ## Postinstall (v4.0.1)
41
+ ## Postinstall
42
42
 
43
43
  `postinstall.cjs` → `installAllBridges()`:
44
44
 
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # xray — exo for coding agents
2
2
 
3
- **v4.0.1** — a suit that survives the context window
3
+ **4.0** — a suit that survives the context window
4
4
 
5
5
  ![0xRay v4 exo — CONSTITUTION ON](docs-site/static/img/exo-skeleton-v4.jpg)
6
6
 
package/SKILLS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 0xray Skills
2
2
 
3
- **v4.0.1** — **45 skills** · invoked via `xray-skills` MCP · synced on postinstall
3
+ **4.0** — **45 skills** · invoked via `xray-skills` MCP · synced on postinstall
4
4
 
5
5
  xray ships 45 knowledge skills (`src/skills/<name>/SKILL.md`) across the full software lifecycle. 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`), agent `@mentions`, or platform skill directories after postinstall.
6
6
 
package/dist/AGENTS.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # xray Agents
2
2
 
3
- Quick reference for the xray AI orchestration framework (**v4.0.1**).
3
+ Quick reference for the xray AI orchestration framework (**4.0**).
4
4
 
5
- **v4.0.1** — a suit that survives the context window.
5
+ **4.0** — a suit that survives the context window.
6
6
 
7
7
  **Exo, not catalog.** Three-subsystem OS (Inference · External Governance · Autonomous Engine) · constitution always on · temperament by host · 4 floors · Repertoire when it resolves.
8
8
 
@@ -38,7 +38,7 @@ Registered in `.mcp.json`, invoked via `npx -y 0xray mcp <cmd>`:
38
38
 
39
39
  Governance deliberation: **code-review**, **security-audit**, **researcher** within the 7-server set.
40
40
 
41
- ## Postinstall (v4.0.1)
41
+ ## Postinstall
42
42
 
43
43
  `postinstall.cjs` → `installAllBridges()`:
44
44
 
package/dist/CHANGELOG.md CHANGED
@@ -4,6 +4,49 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Conventional Commits](https://www.conventionalcommits.org/).
6
6
 
7
+ ## [Unreleased]
8
+
9
+ ### 🔧 Maintenance
10
+ - Foundry mill: one bumper (`reconcile-version.mjs`); `version-manager.mjs` is `--artifacts-only` (JSON + CHANGELOG). Bump and `--tag` are refused.
11
+ - Docs mill verifies era kernel headers (`4.0`) and skill counts; it does not rewrite markdown prose.
12
+ - Exo cannot ship: `executeReleaseWorkflow` is blocked (`FOUNDRY_EXO_CANNOT_SHIP`).
13
+ - Full `release-gate` now runs `validate-release-docs` (not only `--verify-only`).
14
+ - `VersionComplianceProcessor` treats `package.json` as SSOT; UVM is frozen.
15
+ - CI: version-compliance and AGENTS.md workflows target `main`; mill check is `validate-release-docs` (not UVM 1-ahead). `publish.yml` runs the docs mill before PUT.
16
+ - Mill extracted to `scripts/foundry/` (`@0xray/foundry`). `release:npm` is `release.mjs --publish-only`. UVM file removed. Consumer mint writes `foundry-inventory.json` from their package.json.
17
+ - Consumer postinstall overlays their mill SSOT onto the hanger: constitution (`xray/codex.json`), features/temperament, config, `src/skills/<name>/SKILL.md`, `src/opencode/agents/*.yml`. Remap with `foundry.json`. Overlay is **project** skill hangers. JSON mill-fill always merges. CLI re-wear mints once after mill copies. `npx @0xray/foundry mint` reapplies overlay.
18
+ - `@0xray/foundry@0.1.0` mills `FOUNDRY_ROOT` or cwd. Full docs corpus only on the 0xray exo; light mill otherwise. Stamp creates CHANGELOG when missing. Publish refuses a nameless `package.json`. Mill PUT is `cd scripts/foundry && npm publish`; stranger `release` does not force `--access public`. Deprecated `sync-versions.mjs` and `release.js` wrappers removed.
19
+ - Honesty: consumer card does not claim it writes root `SKILLS.md`; mill help is `npx @0xray/foundry`; shims mill cwd; mill-managed `AGENTS.md` overlays from `xray/AGENTS.md`. Mill-fill stays law.
20
+ - Scar tissue cut: no `homeSkills`, no `codexMode`/`featuresMode`/`configMode`. JSON always merge. One `mintConsumerSuit` after mill copies (not inside `syncBuiltinSkills`).
21
+ - Mill flesh: live `npx @0xray/foundry release` is opt-in (`--i-mean-it` / `FOUNDRY_RELEASE=1`). Packed mill mint and Unreleased stamp are executed tests. `@0xray/foundry` tree is 0.1.1 (not a 0xray bump).
22
+ - Mill CI: `0xRay CI/CD` is the mill gate on `main` (typecheck, lint, mill tests, build, curated tests, smoke). Monitor reports Actions; it does not auto-push. `npx @0xray/foundry ci` / `hooks`. Mill package 0.1.2.
23
+ - GitHub Pages: stop copying stale `docs-site/static/index.html` over the Docusaurus homepage (unprefixed `/docs` links 404ed). `npx @0xray/foundry docs-build` is the mill Docusaurus build. Mill 0.1.3.
24
+ - Mill self-host: `0xRay CI/CD` lives in `mill-ci.yml` so GitHub registers push/PR after the inactivity disable. Mill CI always builds Docusaurus.
25
+ - GitHub Pages homepage: no client `<Redirect to="/docs/…">` (that 404s at the org root). Meta refresh + `useBaseUrl('/docs/')`. `.nojekyll` in static.
26
+ - Mill CI report: `mill-monitor.yml` (fresh workflow ID) listens for mill CI completion. Report only.
27
+ - Published mill `hooks` uses the 0xray garment installer (`node_modules/0xray/scripts/hooks`), not `node_modules/@0xray/hooks`. Mill tree 0.1.4 (not a 0xray bump).
28
+ - Nested mill in the 0xray tarball (`scripts/foundry/`). Wear no longer needs a second `npm i @0xray/foundry` for mint-on-install. 4.0.2.
29
+ - Empty garment: mill plant (`mill` skill) is the hanger. Not 45/42 costume unless `foundry.json` `"costume": true`. Mill 0.1.5.
30
+
31
+ ---
32
+
33
+ ## [4.0.3] - 2026-09-04
34
+
35
+ Empty garment. Their plant is the suit. Mill plant (`mill` skill) is the factory discipline on the hanger. Not 45/42 costume unless `foundry.json` `"costume": true`. Factory Repertoire still enable-when-resolves. PPE stays worn. Mill **0.1.5**. Not 5.0.0.
36
+
37
+ ---
38
+
39
+ ## [4.0.2] - 2026-09-04
40
+
41
+ Nested mill in the **0xray tarball**. `npm i 0xray` mill-fills via `scripts/foundry/` (postinstall + CLI re-wear `require` it). `@0xray/foundry` stays the standalone mill CLI (**0.1.4**). Not 5.0.0.
42
+
43
+ Pack tests and consumer smoke require `scripts/foundry/mint-suit.cjs` in the tarball. Mill self-host (mill-ci, mill-monitor, Pages `docs-build`, mill-fill overlay) was already on main; this patch is the npm PUT of that mill next to the garment.
44
+
45
+ ### 🐛 Bug Fixes
46
+ - Processor-test ESLint config is ESLint 9 ESM
47
+
48
+ ---
49
+
7
50
  ## [4.0.1] - 2026-09-02
8
51
 
9
52
  Patch on the 4.0 temperament line. npm **4.0.0** stays latest until this tag publishes.
package/dist/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # xray — exo for coding agents
2
2
 
3
- **v4.0.1** — a suit that survives the context window
3
+ **4.0** — a suit that survives the context window
4
4
 
5
5
  ![0xRay v4 exo — CONSTITUTION ON](docs-site/static/img/exo-skeleton-v4.jpg)
6
6
 
package/dist/SKILLS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 0xray Skills
2
2
 
3
- **v4.0.1** — **45 skills** · invoked via `xray-skills` MCP · synced on postinstall
3
+ **4.0** — **45 skills** · invoked via `xray-skills` MCP · synced on postinstall
4
4
 
5
5
  xray ships 45 knowledge skills (`src/skills/<name>/SKILL.md`) across the full software lifecycle. 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`), agent `@mentions`, or platform skill directories after postinstall.
6
6
 
@@ -0,0 +1,3 @@
1
+ export declare function wantsCostume(targetDir: string): boolean;
2
+ /** Re-apply mill overlay after CLI re-wear copies mill skills. */
3
+ export declare function mintAfterWear(targetDir: string): void;
@@ -0,0 +1,17 @@
1
+ import path from "path";
2
+ import { createRequire } from "module";
3
+ import { fileURLToPath } from "url";
4
+ import { frameworkLogger } from "../../core/framework-logger.js";
5
+ const require = createRequire(import.meta.url);
6
+ const packageRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
7
+ const millSuit = require(path.join(packageRoot, "scripts/foundry/mint-suit.cjs"));
8
+ export function wantsCostume(targetDir) {
9
+ return millSuit.wantsCostume(targetDir);
10
+ }
11
+ /** Re-apply mill overlay after CLI re-wear copies mill skills. */
12
+ export function mintAfterWear(targetDir) {
13
+ millSuit.mintConsumerSuit(packageRoot, targetDir, (component, action, status, details) => {
14
+ const level = status === "error" ? "error" : "info";
15
+ frameworkLogger.log(component, action, level, details);
16
+ });
17
+ }
@@ -4,6 +4,7 @@ import { homedir } from 'os';
4
4
  import { createRequire } from 'module';
5
5
  import { frameworkLogger } from '../../core/framework-logger.js';
6
6
  import { syncBuiltinSkills } from './skill-install.js';
7
+ import { mintAfterWear } from './foundry-mint-wear.js';
7
8
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
8
9
  const require = createRequire(import.meta.url);
9
10
  const packageRoot = path.join(__dirname, '..', '..', '..');
@@ -68,6 +69,7 @@ async function installForHermes(options = {}) {
68
69
  frameworkLogger.log('hermes-integration', 'hooks-copied', 'info', {});
69
70
  }
70
71
  const wired = wiring.wireHermesBridge(targetDir);
72
+ mintAfterWear(targetDir);
71
73
  console.log(`\x1b[32m✓ Wired Hermes mcp_servers (${wired.count} servers)\x1b[0m`);
72
74
  console.log(`\x1b[32m✓ Consumer root → ${targetDir}\x1b[0m`);
73
75
  const afterInstallPath = path.join(targetPluginDir, 'after-install.md');
@@ -4,6 +4,7 @@ import { homedir } from 'os';
4
4
  import { createRequire } from 'module';
5
5
  import { frameworkLogger } from '../../core/framework-logger.js';
6
6
  import { syncBuiltinSkills } from './skill-install.js';
7
+ import { mintAfterWear } from './foundry-mint-wear.js';
7
8
  import { OpenClawConfigLoader } from '../../integrations/openclaw/config.js';
8
9
  import { writeSuitSessionBoot } from '../../nucleus/suit-temperament.js';
9
10
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
@@ -45,6 +46,7 @@ async function installForOpenClaw(options = {}) {
45
46
  console.log(`\x1b[32m✓ Synced ${skillsCopied} builtin skills to ~/.openclaw/skills/\x1b[0m`);
46
47
  }
47
48
  frameworkLogger.log('openclaw-integration', 'skills-synced', 'info', { count: skillsCopied });
49
+ mintAfterWear(targetDir);
48
50
  const wired = wiring.wireOpenClawBridge(targetDir);
49
51
  console.log(`\x1b[32m✓ Wired OpenClaw MCP servers (${wired.count} via ${wired.method}) → ${wired.path}\x1b[0m`);
50
52
  console.log(`\x1b[32m✓ Consumer root → ${targetDir}\x1b[0m`);
@@ -3,6 +3,7 @@ import path from 'path';
3
3
  import { createRequire } from 'module';
4
4
  import { frameworkLogger } from '../../core/framework-logger.js';
5
5
  import { syncBuiltinSkills } from './skill-install.js';
6
+ import { mintAfterWear, wantsCostume } from './foundry-mint-wear.js';
6
7
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
7
8
  const require = createRequire(import.meta.url);
8
9
  const wiring = require(path.join(__dirname, '..', '..', '..', 'scripts', 'node', 'bridge-mcp-wiring.cjs'));
@@ -104,8 +105,14 @@ async function installForOpencode(options = {}) {
104
105
  console.log('Use --force to reinstall.');
105
106
  }
106
107
  else {
107
- copyDir(opencodeSource, opencodeDest);
108
- frameworkLogger.log('opencode-integration', 'opencode-copied', 'info', { destination: opencodeDest });
108
+ if (wantsCostume(process.cwd())) {
109
+ copyDir(opencodeSource, opencodeDest);
110
+ frameworkLogger.log('opencode-integration', 'opencode-copied', 'info', { destination: opencodeDest });
111
+ }
112
+ else {
113
+ fs.mkdirSync(opencodeDest, { recursive: true });
114
+ frameworkLogger.log('opencode-integration', 'empty-garment-plugin', 'info', { destination: opencodeDest });
115
+ }
109
116
  const pluginSource = path.join(__dirname, '..', '..', '..', 'dist', 'plugin', 'xray-codex-injection.js');
110
117
  const pluginDest = path.join(opencodeDest, 'plugin', 'xray-codex-injection.js');
111
118
  if (fs.existsSync(pluginSource)) {
@@ -133,6 +140,7 @@ async function installForOpencode(options = {}) {
133
140
  console.log(`\x1b[32m✓ Seeded opencode.json from 0xRay template\x1b[0m`);
134
141
  }
135
142
  const mcpCount = wiring.wireOpencodeBridge(process.cwd());
143
+ mintAfterWear(process.cwd());
136
144
  console.log(`\x1b[32m✓ Wired opencode.json mcp (${mcpCount} servers)\x1b[0m`);
137
145
  console.log('\n✅ 0xRay OpenCode plugin installed!');
138
146
  console.log('Restart OpenCode or run `opencode mcp list` to verify MCP servers.');
@@ -1,6 +1,7 @@
1
1
  import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, cpSync, rmSync, statSync, unlinkSync, copyFileSync } from "fs";
2
2
  import { join, basename, dirname } from "path";
3
3
  import { fileURLToPath } from "url";
4
+ import { createRequire } from "module";
4
5
  import { execSync } from "child_process";
5
6
  function getLocalRegistryPath() {
6
7
  return join(process.cwd(), ".xray", "skill-registry.json");
@@ -484,6 +485,9 @@ export async function skillRegistryCommand(action, args) {
484
485
  // Each platform's install command calls this to copy framework skills.
485
486
  export function syncBuiltinSkills(targetSkillsDir, packageRoot) {
486
487
  const root = packageRoot ?? join(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
488
+ const millSuit = createRequire(import.meta.url)(join(root, "scripts/foundry/mint-suit.cjs"));
489
+ if (!millSuit.wantsCostume(process.cwd()))
490
+ return 0;
487
491
  const candidateDirs = [
488
492
  join(root, "dist", "skills"),
489
493
  join(root, "src", "skills"),
@@ -18,6 +18,13 @@ export declare function preProcessAndRoute(operation: string, context: RuleValid
18
18
  enhancedContext: RuleValidationContext;
19
19
  routing: RoutingRecommendation;
20
20
  }>;
21
+ /** Foundry mill ships. The worn exo must not bump, commit, or publish. */
22
+ export declare const FOUNDRY_EXO_CANNOT_SHIP = "Exo cannot ship. Use: node scripts/node/release.mjs [patch|minor|major]";
23
+ /**
24
+ * Release keyword used to run version-manager + git add -A + npm publish from the exo.
25
+ * That path is refused. Canonical mill: reconcile → artifacts-only → gate → PUT → tag.
26
+ */
27
+ export declare function executeReleaseWorkflow(operation: string, _context: RuleValidationContext, jobId: string, _routing: RoutingRecommendation): Promise<EnforcementResult>;
21
28
  export interface EnforcementResult {
22
29
  operation: string;
23
30
  passed: boolean;
@@ -199,121 +199,31 @@ function buildTaskDescription(operation, context) {
199
199
  }
200
200
  return parts.join(" ");
201
201
  }
202
+ /** Foundry mill ships. The worn exo must not bump, commit, or publish. */
203
+ export const FOUNDRY_EXO_CANNOT_SHIP = "Exo cannot ship. Use: node scripts/node/release.mjs [patch|minor|major]";
202
204
  /**
203
- * Execute the full release workflow
204
- * Triggered when user says: release, npm publish, publish to npm, bump and publish, ship it
205
+ * Release keyword used to run version-manager + git add -A + npm publish from the exo.
206
+ * That path is refused. Canonical mill: reconcile → artifacts-only → gate → PUT → tag.
205
207
  */
206
- async function executeReleaseWorkflow(operation, context, jobId, routing) {
207
- const { execSync } = await import('child_process');
208
- // Extract release options from routing context
209
- const releaseContext = routing.context || {};
210
- const bumpType = releaseContext.bumpType || 'patch';
211
- const createTag = releaseContext.createTag || false;
212
- await frameworkLogger.log("enforcer-tools", "release-workflow-starting", "info", { jobId, bumpType, createTag });
213
- const steps = [];
214
- const errors = [];
215
- // HARD STOP: Build must pass before release
216
- await frameworkLogger.log("enforcer-tools", "release-build-check", "info", { step: "Verifying build passes..." });
217
- try {
218
- execSync(`npm run build`, {
219
- cwd: process.cwd(),
220
- stdio: 'pipe'
221
- });
222
- steps.push("✅ Build verified");
223
- }
224
- catch (e) {
225
- const errorMsg = `🛑 RELEASE STOPPED: Build failed before publishing. Fix build errors first.`;
226
- frameworkLogger.log("enforcer-tools", "release-blocked", "error", {
227
- message: errorMsg,
228
- });
229
- frameworkLogger.log("enforcer-tools", "release-build-error", "error", {
230
- message: `Error: ${e}`,
231
- error: e,
232
- });
233
- return {
234
- operation: "release",
235
- passed: false,
236
- blocked: true,
237
- errors: [errorMsg, `Build error: ${e}`],
238
- warnings: [],
239
- fixes: [],
240
- report: {
241
- passed: false,
242
- operation: "release",
243
- errors: [errorMsg, `Build error: ${e}`],
244
- warnings: [],
245
- results: [],
246
- timestamp: new Date(),
247
- },
248
- };
249
- }
250
- try {
251
- // Step 1: Run version-manager to bump version and generate changelog
252
- await frameworkLogger.log("enforcer-tools", "release-step-1-version", "info", { step: "Bumping version..." });
253
- try {
254
- const versionArg = createTag ? '--tag' : '';
255
- execSync(`node scripts/node/version-manager.mjs ${bumpType} ${versionArg}`, {
256
- cwd: process.cwd(),
257
- stdio: 'inherit'
258
- });
259
- steps.push("✅ Version bumped + changelog generated");
260
- }
261
- catch (e) {
262
- errors.push(`Version bump failed: ${e}`);
263
- }
264
- // Step 2: Git commit and push
265
- await frameworkLogger.log("enforcer-tools", "release-step-2-git", "info", { step: "Committing and pushing..." });
266
- try {
267
- execSync(`git add -A && git commit -m "release: v${bumpType} - Changelog updated" && git push`, {
268
- cwd: process.cwd(),
269
- stdio: 'inherit'
270
- });
271
- steps.push("✅ Git commit + push");
272
- }
273
- catch (e) {
274
- errors.push(`Git commit/push failed: ${e}`);
275
- }
276
- // Step 3: npm publish
277
- await frameworkLogger.log("enforcer-tools", "release-step-3-npm", "info", { step: "Publishing to npm..." });
278
- try {
279
- execSync(`npm publish`, {
280
- cwd: process.cwd(),
281
- stdio: 'inherit'
282
- });
283
- steps.push("✅ npm published");
284
- }
285
- catch (e) {
286
- errors.push(`npm publish failed: ${e}`);
287
- }
288
- // Step 4: Generate tweet context
289
- await frameworkLogger.log("enforcer-tools", "release-step-4-tweet", "info", { step: "Generating tweet..." });
290
- try {
291
- execSync(`node scripts/node/release-tweet.mjs`, {
292
- cwd: process.cwd(),
293
- stdio: 'inherit'
294
- });
295
- steps.push("✅ Tweet context generated - ready for @growth-strategist");
296
- }
297
- catch (e) {
298
- errors.push(`Tweet generation failed: ${e}`);
299
- }
300
- }
301
- catch (e) {
302
- errors.push(`Release workflow failed: ${e}`);
303
- }
208
+ export async function executeReleaseWorkflow(operation, _context, jobId, _routing) {
209
+ await frameworkLogger.log("enforcer-tools", "release-workflow-refused", "error", {
210
+ jobId,
211
+ operation,
212
+ reason: "foundry-exo-cannot-ship",
213
+ });
304
214
  return {
305
215
  operation: "release",
306
- passed: errors.length === 0,
307
- blocked: false,
308
- errors,
216
+ passed: false,
217
+ blocked: true,
218
+ errors: [FOUNDRY_EXO_CANNOT_SHIP],
309
219
  warnings: [],
310
220
  fixes: [],
311
221
  report: {
312
- passed: errors.length === 0,
222
+ passed: false,
313
223
  operation: "release",
314
- errors,
315
- warnings: steps,
316
- results: steps.map(s => ({ rule: 'release', passed: true, message: s })),
224
+ errors: [FOUNDRY_EXO_CANNOT_SHIP],
225
+ warnings: [],
226
+ results: [],
317
227
  timestamp: new Date(),
318
228
  },
319
229
  };
@@ -457,8 +367,7 @@ export async function ruleValidation(operation, context) {
457
367
  await frameworkLogger.log("enforcer-tools", "release-workflow-triggered", "info", {
458
368
  jobId,
459
369
  operation,
460
- bumpType: routing.context?.bumpType || 'patch',
461
- createTag: routing.context?.createTag || false,
370
+ reason: "foundry-exo-cannot-ship",
462
371
  });
463
372
  // Execute the release workflow
464
373
  return await executeReleaseWorkflow(operation, context, jobId, routing);
@@ -20,6 +20,7 @@ import path from 'path';
20
20
  import { execSync } from 'child_process';
21
21
  import { createRequire } from 'module';
22
22
  import { syncBuiltinSkills } from '../../cli/commands/skill-install.js';
23
+ import { mintAfterWear } from '../../cli/commands/foundry-mint-wear.js';
23
24
  // ESM-compatible __dirname (this file is compiled to ESM)
24
25
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
25
26
  const packageRoot = path.resolve(__dirname, '..', '..', '..');
@@ -101,6 +102,7 @@ export async function installForGrokCLI(options = {}) {
101
102
  wearGrokHookCommands(projectPluginDir, packageRoot, targetDir);
102
103
  }
103
104
  writeProjectRepertoireMcp(targetDir);
105
+ mintAfterWear(targetDir);
104
106
  // Attempt auto-trust (best effort)
105
107
  try {
106
108
  execSync(`grok plugins trust "${targetPluginDir}"`, { stdio: 'ignore' });
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xray-pre-tool",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "description": "0xRay constitution + temperament PreToolUse for OpenClaw",
@@ -5,10 +5,9 @@
5
5
  * commits or publishes. Integrates with 0xRay's processor pipeline.
6
6
  *
7
7
  * Rules Enforced:
8
- * 1. Universal Version Manager MUST be 1 ahead of NPM published version
9
- * 2. package.json SHOULD match UVM (warning if not)
10
- * 3. Source files MUST be synchronized to UVM version
11
- * 4. README SHOULD reference current version
8
+ * 1. package.json version is the SSOT (semver)
9
+ * 2. Mill SSOT is package.json via scripts/foundry/reconcile-version.mjs
10
+ * 3. Do not bump or publish from this processor (foundry mill ships)
12
11
  *
13
12
  * @processor_type pre
14
13
  * @priority 25 (high - runs early, after preValidate, before errorBoundary)
@@ -31,12 +30,6 @@ export interface VersionFix {
31
30
  command: string;
32
31
  autoFixable: boolean;
33
32
  }
34
- export interface VersionInfo {
35
- major: number;
36
- minor: number;
37
- patch: number;
38
- raw: string;
39
- }
40
33
  export declare class VersionComplianceProcessor {
41
34
  private projectRoot;
42
35
  private errors;
@@ -67,34 +60,10 @@ export declare class VersionComplianceProcessor {
67
60
  * Get NPM published version
68
61
  */
69
62
  private getNpmVersion;
70
- /**
71
- * Get Universal Version Manager version
72
- */
73
- private getUvmVersion;
74
63
  /**
75
64
  * Get package.json version
76
65
  */
77
66
  private getPackageVersion;
78
- /**
79
- * Get version from source files
80
- */
81
- private getSourceVersion;
82
- /**
83
- * Get version from README
84
- */
85
- private getReadmeVersion;
86
- /**
87
- * Parse version string into components
88
- */
89
- private parseVersion;
90
- /**
91
- * Format version components back to string
92
- */
93
- private formatVersion;
94
- /**
95
- * Increment patch version
96
- */
97
- private incrementPatch;
98
67
  /**
99
68
  * Auto-fix version compliance issues
100
69
  */