0xray 4.0.1 → 4.0.2
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/.xray/features.json +1 -1
- package/AGENTS-consumer.md +4 -4
- package/AGENTS.md +3 -3
- package/README.md +1 -1
- package/SKILLS.md +1 -1
- package/dist/AGENTS.md +3 -3
- package/dist/CHANGELOG.md +36 -0
- package/dist/README.md +1 -1
- package/dist/SKILLS.md +1 -1
- package/dist/cli/commands/foundry-mint-wear.d.ts +2 -0
- package/dist/cli/commands/foundry-mint-wear.js +14 -0
- package/dist/cli/commands/hermes-install.js +2 -0
- package/dist/cli/commands/openclaw-install.js +2 -0
- package/dist/cli/commands/opencode-install.js +2 -0
- package/dist/enforcement/enforcer-tools.d.ts +7 -0
- package/dist/enforcement/enforcer-tools.js +18 -109
- package/dist/integrations/grok/grok-cli.js +2 -0
- package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/dist/processors/implementations/version-compliance-processor.d.ts +3 -34
- package/dist/processors/implementations/version-compliance-processor.js +8 -135
- package/package.json +15 -14
- package/scripts/foundry/CHANGELOG.md +34 -0
- package/scripts/foundry/LICENSE +21 -0
- package/scripts/foundry/README.md +67 -0
- package/scripts/foundry/ci-monitor.mjs +115 -0
- package/scripts/foundry/cli.js +2 -0
- package/scripts/foundry/cli.mjs +55 -0
- package/scripts/foundry/docs-build.mjs +38 -0
- package/scripts/foundry/hooks.mjs +36 -0
- package/scripts/foundry/mill-root.mjs +62 -0
- package/scripts/foundry/mint-suit.cjs +313 -0
- package/scripts/foundry/mint.mjs +33 -0
- package/scripts/foundry/package.json +53 -0
- package/scripts/foundry/reconcile-version.mjs +150 -0
- package/scripts/foundry/release-gate.mjs +100 -0
- package/scripts/foundry/release.mjs +266 -0
- package/scripts/foundry/validate-release-docs.mjs +316 -0
- package/scripts/foundry/version-manager.mjs +444 -0
- package/scripts/node/ci-cd-auto-fix.cjs +12 -257
- package/scripts/node/consumer-install-smoke.mjs +2 -0
- package/scripts/node/enforce-version-compliance.sh +5 -20
- package/scripts/node/enforce-version-compliance.ts +13 -113
- package/scripts/node/foundry-shim.mjs +19 -0
- package/scripts/node/github-actions-monitor.cjs +13 -18
- package/scripts/node/postinstall.cjs +36 -1
- package/scripts/node/reconcile-version.mjs +3 -142
- package/scripts/node/release-gate.mjs +3 -74
- package/scripts/node/release.mjs +3 -171
- package/scripts/node/validate-release-docs.mjs +3 -285
- package/scripts/node/version-manager.mjs +3 -738
- package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/xray/features.json +1 -1
- package/scripts/node/release.js +0 -17
- package/scripts/node/sync-versions.mjs +0 -18
- package/scripts/node/universal-version-manager.js +0 -1043
package/.xray/features.json
CHANGED
package/AGENTS-consumer.md
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- 0xray-managed -->
|
|
4
4
|
|
|
5
|
-
Quick reference for the 0xRay AI orchestration framework
|
|
5
|
+
Quick reference for the 0xRay AI orchestration framework worn on **{{CONSUMER_NAME}}**{{CONSUMER_VERSION_PAREN}}.
|
|
6
6
|
|
|
7
|
-
**
|
|
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
|
-
-
|
|
22
|
+
- Syncs **45 mill skills** to platform skill directories, then overlays **your** `src/skills` (same name wins). 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 (**
|
|
3
|
+
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
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
|
|
41
|
+
## Postinstall
|
|
42
42
|
|
|
43
43
|
`postinstall.cjs` → `installAllBridges()`:
|
|
44
44
|
|
package/README.md
CHANGED
package/SKILLS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 0xray Skills
|
|
2
2
|
|
|
3
|
-
**
|
|
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 (**
|
|
3
|
+
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
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
|
|
41
|
+
## Postinstall
|
|
42
42
|
|
|
43
43
|
`postinstall.cjs` → `installAllBridges()`:
|
|
44
44
|
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,42 @@ 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
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## [4.0.2] - 2026-09-04
|
|
33
|
+
|
|
34
|
+
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.
|
|
35
|
+
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
### 🐛 Bug Fixes
|
|
39
|
+
- Processor-test ESLint config is ESLint 9 ESM
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
7
43
|
## [4.0.1] - 2026-09-02
|
|
8
44
|
|
|
9
45
|
Patch on the 4.0 temperament line. npm **4.0.0** stays latest until this tag publishes.
|
package/dist/README.md
CHANGED
package/dist/SKILLS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 0xray Skills
|
|
2
2
|
|
|
3
|
-
**
|
|
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,14 @@
|
|
|
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
|
+
/** Re-apply mill overlay after CLI re-wear copies mill skills. */
|
|
8
|
+
export function mintAfterWear(targetDir) {
|
|
9
|
+
const { mintConsumerSuit } = require(path.join(packageRoot, "scripts/foundry/mint-suit.cjs"));
|
|
10
|
+
mintConsumerSuit(packageRoot, targetDir, (component, action, status, details) => {
|
|
11
|
+
const level = status === "error" ? "error" : "info";
|
|
12
|
+
frameworkLogger.log(component, action, level, details);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
@@ -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 } 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'));
|
|
@@ -133,6 +134,7 @@ async function installForOpencode(options = {}) {
|
|
|
133
134
|
console.log(`\x1b[32m✓ Seeded opencode.json from 0xRay template\x1b[0m`);
|
|
134
135
|
}
|
|
135
136
|
const mcpCount = wiring.wireOpencodeBridge(process.cwd());
|
|
137
|
+
mintAfterWear(process.cwd());
|
|
136
138
|
console.log(`\x1b[32m✓ Wired opencode.json mcp (${mcpCount} servers)\x1b[0m`);
|
|
137
139
|
console.log('\n✅ 0xRay OpenCode plugin installed!');
|
|
138
140
|
console.log('Restart OpenCode or run `opencode mcp list` to verify MCP servers.');
|
|
@@ -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
|
-
*
|
|
204
|
-
*
|
|
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,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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:
|
|
307
|
-
blocked:
|
|
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:
|
|
222
|
+
passed: false,
|
|
313
223
|
operation: "release",
|
|
314
|
-
errors,
|
|
315
|
-
warnings:
|
|
316
|
-
results:
|
|
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
|
-
|
|
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' });
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* commits or publishes. Integrates with 0xRay's processor pipeline.
|
|
6
6
|
*
|
|
7
7
|
* Rules Enforced:
|
|
8
|
-
* 1.
|
|
9
|
-
* 2. package.json
|
|
10
|
-
* 3.
|
|
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
|
*/
|