0xray 2.2.0 → 2.2.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/.opencode/codex.codex +1 -1
- package/.opencode/commands/dependency-audit.md +3 -3
- package/.opencode/enforcer-config.json +2 -2
- package/.opencode/init.sh +1 -1
- package/AGENTS.md +6 -6
- package/README.md +4 -4
- package/dist/AGENTS.md +6 -6
- package/dist/CHANGELOG.md +16 -0
- package/dist/README.md +4 -4
- package/dist/agents/code-reviewer.js +1 -1
- package/dist/analytics/routing-refiner.js +1 -1
- package/dist/core/boot-orchestrator.js +2 -2
- package/dist/core/features-config.js +1 -1
- package/dist/core/framework-logger.d.ts +1 -0
- package/dist/core/framework-logger.js +27 -1
- package/dist/mcps/governance.server.js +1 -1
- package/dist/mcps/knowledge-skills/tech-writer.server.js +1 -1
- package/dist/mcps/registry.json +1 -1
- package/dist/mcps/simulation/server-simulations.js +1 -1
- package/dist/skills/registry.json +1 -1
- package/package.json +4 -4
- package/scripts/node/release.mjs +154 -159
- package/scripts/node/universal-version-manager.js +8 -8
- package/scripts/node/validate-mcp-connectivity.js +1 -1
- package/src/mcps/governance.server.ts +1 -1
- package/src/mcps/knowledge-skills/tech-writer.server.ts +1 -1
- package/src/mcps/registry.json +1 -1
- package/src/mcps/simulation/server-simulations.ts +1 -1
- package/src/opencode/codex.codex +1 -1
- package/src/opencode/commands/dependency-audit.md +3 -3
- package/src/opencode/enforcer-config.json +2 -2
- package/src/skills/registry.json +1 -1
- package/xray/codex.json +1 -1
- package/xray/config.json +1 -1
- package/xray/features.json +1 -1
- package/xray/integrations.json +3 -3
- package/scripts/node/release.js +0 -159
package/.opencode/codex.codex
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1
|
|
2
|
+
"version": "2.2.1",
|
|
3
3
|
"terms": [
|
|
4
4
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68
|
|
5
5
|
],
|
|
@@ -69,7 +69,7 @@ Comprehensive dependency analysis and security audit for all project dependencie
|
|
|
69
69
|
"vulnerabilities": [
|
|
70
70
|
{
|
|
71
71
|
"package": "lodash",
|
|
72
|
-
"version": "2.1
|
|
72
|
+
"version": "2.2.1",
|
|
73
73
|
"severity": "high",
|
|
74
74
|
"cve": "CVE-2021-23337",
|
|
75
75
|
"description": "Command injection vulnerability"
|
|
@@ -85,14 +85,14 @@ Security-focused format for CI/CD integration:
|
|
|
85
85
|
|
|
86
86
|
```json
|
|
87
87
|
{
|
|
88
|
-
"version": "2.1
|
|
88
|
+
"version": "2.2.1",
|
|
89
89
|
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
|
90
90
|
"runs": [
|
|
91
91
|
{
|
|
92
92
|
"tool": {
|
|
93
93
|
"driver": {
|
|
94
94
|
"name": "Dependency Audit",
|
|
95
|
-
"version": "2.1
|
|
95
|
+
"version": "2.2.1"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"results": [...]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "xray 2.0",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Codex-compliant framework configuration for Credible UI project",
|
|
5
5
|
"thresholds": {
|
|
6
6
|
"bundleSize": {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
"codex": {
|
|
223
|
-
"version": "2.1
|
|
223
|
+
"version": "2.2.1",
|
|
224
224
|
"terms": [
|
|
225
225
|
1,
|
|
226
226
|
2,
|
package/.opencode/init.sh
CHANGED
|
@@ -70,7 +70,7 @@ echo -e "${PURPLE}// ╚█████╔╝██╔╝ ██╗██
|
|
|
70
70
|
echo -e "${PURPLE}// ╚════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ //${NC}" && sleep 0.1
|
|
71
71
|
echo -e "${PURPLE}// //${NC}" && sleep 0.1
|
|
72
72
|
echo -e "${PURPLE}// ⚡ 0xRay: Self-Healing AI Governance OS //${NC}" && sleep 0.1
|
|
73
|
-
echo -e "${PURPLE}// 42 agents · 44 skills ·
|
|
73
|
+
echo -e "${PURPLE}// 42 agents · 44 skills · 39 MCP servers //${NC}" && sleep 0.1
|
|
74
74
|
echo -e "${PURPLE}//═══════════════════════════════════════════════════════//${NC}" && sleep 0.2
|
|
75
75
|
echo -e "${PURPLE}// 🚀 Initializing... //${NC}" && sleep 0.3
|
|
76
76
|
echo -e "${PURPLE}//═══════════════════════════════════════════════════════//${NC}" && sleep 0.2
|
package/AGENTS.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# xray Agents
|
|
2
2
|
|
|
3
|
-
Quick reference for xray AI orchestration framework (
|
|
3
|
+
Quick reference for xray AI orchestration framework (v15 MCPs-centric three-subsystem).
|
|
4
4
|
|
|
5
5
|
## What is xray?
|
|
6
6
|
|
|
7
7
|
xray provides intelligent multi-agent orchestration with automatic delegation and Codex compliance validation under the pure v2 three-subsystem model (Inference + External Governance via Dynamo + Autonomous Engine via thinDispatch 7-flow in MCP orchestrator). Agents operate via `.opencode/agents/*.yml` YML surfaces and 3 dedicated MCP skill servers — no manual setup needed.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## v15 MCPs-Centric Architecture
|
|
10
10
|
|
|
11
11
|
The v2 release centers on **MCP (Model Context Protocol)** as the primary surface for agent skills. Three agent MCP servers handle governance deliberation:
|
|
12
12
|
|
|
@@ -84,14 +84,14 @@ The Autonomous Engine routes via complexity:
|
|
|
84
84
|
|
|
85
85
|
xray enforces the Universal Development Codex (60 terms) via Dynamo governance. The codex lives in `.opencode/xray/codex.json`.
|
|
86
86
|
|
|
87
|
-
Pure
|
|
87
|
+
Pure v15 MCPs. Clean. Complete.
|
|
88
88
|
|
|
89
89
|
## Session: v2.1.2 Release Polish
|
|
90
90
|
|
|
91
91
|
- Package: `0xray` (npm), `github.com/0xRayAI/xray`. Version `2.0.0`.
|
|
92
92
|
- Renamed `strray-ai` → `0xray` across 60+ source files, CLI help text, grok plugin, hermes-agent bridge (Python + JS), docusaurus config.
|
|
93
93
|
- **12 stale docs git-rm'd**: AGENTS-consumer.md, AGENTS-full.md, CHANGELOG-v1.15.x.md, 7 docs/ files.
|
|
94
|
-
- **AGENTS.md + README.md**: Rewritten
|
|
94
|
+
- **AGENTS.md + README.md**: Rewritten v15 MCPs-centric.
|
|
95
95
|
- **CLI help text**: `npx 0xray` — removed dead `dashboard` command, stale examples.
|
|
96
96
|
- `.npmignore`: removed `src/` (conflicted with `files` field — was silently dropping published sources).
|
|
97
97
|
- `.gitignore`: cleaned stale `.strray/` entries, `strray-ai-*.tgz` → `0xray-*.tgz`.
|
|
@@ -107,5 +107,5 @@ Pure v16 MCPs. Clean. Complete.
|
|
|
107
107
|
- `status.ts` CLI command wired into `index.ts`
|
|
108
108
|
- Orphaned files analyzed (not deleted): `security-audit.ts`, `src/security/` (11 files), `session-capture-processor.ts`, `activate-kernel-pipeline.ts`
|
|
109
109
|
- **Hermes-agent bridge backward compat**: all JS/Python bridge files check for both `strray-ai` (old) and `0xray` (new). Default paths updated to `0xray`.
|
|
110
|
-
- **Test suite**: 162 files,
|
|
111
|
-
- **OpenClaw e2e**: Phase 13 validates `logs/framework/activity.log` via agent tool event → hooks → frameworkLogger pipeline —
|
|
110
|
+
- **Test suite**: 162 files, 2196 tests (+ 44 skipped), 0 failures. Build passes clean.
|
|
111
|
+
- **OpenClaw e2e**: Phase 13 validates `logs/framework/activity.log` via agent tool event → hooks → frameworkLogger pipeline — 2196 tests, 0 failures.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 0xRay — Self-Healing AI Governance OS
|
|
2
2
|
|
|
3
|
-
**v2.1.3** — 42 agents · 46 skills ·
|
|
3
|
+
**v2.1.3** — 42 agents · 46 skills · 15 MCPs servers · 9 codex terms · ~2,2196 tests
|
|
4
4
|
|
|
5
5
|
[](https://0xrayai.github.io/xray/)
|
|
6
6
|
|
|
@@ -62,7 +62,7 @@ AI coding assistants are powerful but unreliable. They hallucinate APIs, introdu
|
|
|
62
62
|
├─────────────────────────────────────────────────┤
|
|
63
63
|
│ External Governance (Dynamo) │
|
|
64
64
|
│ Codex enforcement · Multi-agent review · SSOT │
|
|
65
|
-
│
|
|
65
|
+
│ 15 MCPs servers (governance + knowledge skills) deliberate proposals │
|
|
66
66
|
├─────────────────────────────────────────────────┤
|
|
67
67
|
│ Autonomous Engine (thinDispatch) │
|
|
68
68
|
│ Task routing · Multi-agent coordination │
|
|
@@ -179,7 +179,7 @@ Every subsystem is configurable via `features.json` (located at `.opencode/xray/
|
|
|
179
179
|
|
|
180
180
|
```json
|
|
181
181
|
{
|
|
182
|
-
"version": "2.1
|
|
182
|
+
"version": "2.2.1",
|
|
183
183
|
"token_optimization": {
|
|
184
184
|
"enabled": true,
|
|
185
185
|
"max_context_tokens": 20000,
|
|
@@ -277,7 +277,7 @@ Install more skills anytime: `npx 0xray skill:install`
|
|
|
277
277
|
|
|
278
278
|
## Testing & Reliability
|
|
279
279
|
|
|
280
|
-
0xRay is battle-tested with **~2,
|
|
280
|
+
0xRay is battle-tested with **~2,2196 tests** across every subsystem:
|
|
281
281
|
|
|
282
282
|
| Suite | Tests | Status |
|
|
283
283
|
|-------|-------|--------|
|
package/dist/AGENTS.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# xray Agents
|
|
2
2
|
|
|
3
|
-
Quick reference for xray AI orchestration framework (
|
|
3
|
+
Quick reference for xray AI orchestration framework (v15 MCPs-centric three-subsystem).
|
|
4
4
|
|
|
5
5
|
## What is xray?
|
|
6
6
|
|
|
7
7
|
xray provides intelligent multi-agent orchestration with automatic delegation and Codex compliance validation under the pure v2 three-subsystem model (Inference + External Governance via Dynamo + Autonomous Engine via thinDispatch 7-flow in MCP orchestrator). Agents operate via `.opencode/agents/*.yml` YML surfaces and 3 dedicated MCP skill servers — no manual setup needed.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## v15 MCPs-Centric Architecture
|
|
10
10
|
|
|
11
11
|
The v2 release centers on **MCP (Model Context Protocol)** as the primary surface for agent skills. Three agent MCP servers handle governance deliberation:
|
|
12
12
|
|
|
@@ -84,14 +84,14 @@ The Autonomous Engine routes via complexity:
|
|
|
84
84
|
|
|
85
85
|
xray enforces the Universal Development Codex (60 terms) via Dynamo governance. The codex lives in `.opencode/xray/codex.json`.
|
|
86
86
|
|
|
87
|
-
Pure
|
|
87
|
+
Pure v15 MCPs. Clean. Complete.
|
|
88
88
|
|
|
89
89
|
## Session: v2.1.2 Release Polish
|
|
90
90
|
|
|
91
91
|
- Package: `0xray` (npm), `github.com/0xRayAI/xray`. Version `2.0.0`.
|
|
92
92
|
- Renamed `strray-ai` → `0xray` across 60+ source files, CLI help text, grok plugin, hermes-agent bridge (Python + JS), docusaurus config.
|
|
93
93
|
- **12 stale docs git-rm'd**: AGENTS-consumer.md, AGENTS-full.md, CHANGELOG-v1.15.x.md, 7 docs/ files.
|
|
94
|
-
- **AGENTS.md + README.md**: Rewritten
|
|
94
|
+
- **AGENTS.md + README.md**: Rewritten v15 MCPs-centric.
|
|
95
95
|
- **CLI help text**: `npx 0xray` — removed dead `dashboard` command, stale examples.
|
|
96
96
|
- `.npmignore`: removed `src/` (conflicted with `files` field — was silently dropping published sources).
|
|
97
97
|
- `.gitignore`: cleaned stale `.strray/` entries, `strray-ai-*.tgz` → `0xray-*.tgz`.
|
|
@@ -107,5 +107,5 @@ Pure v16 MCPs. Clean. Complete.
|
|
|
107
107
|
- `status.ts` CLI command wired into `index.ts`
|
|
108
108
|
- Orphaned files analyzed (not deleted): `security-audit.ts`, `src/security/` (11 files), `session-capture-processor.ts`, `activate-kernel-pipeline.ts`
|
|
109
109
|
- **Hermes-agent bridge backward compat**: all JS/Python bridge files check for both `strray-ai` (old) and `0xray` (new). Default paths updated to `0xray`.
|
|
110
|
-
- **Test suite**: 162 files,
|
|
111
|
-
- **OpenClaw e2e**: Phase 13 validates `logs/framework/activity.log` via agent tool event → hooks → frameworkLogger pipeline —
|
|
110
|
+
- **Test suite**: 162 files, 2196 tests (+ 44 skipped), 0 failures. Build passes clean.
|
|
111
|
+
- **OpenClaw e2e**: Phase 13 validates `logs/framework/activity.log` via agent tool event → hooks → frameworkLogger pipeline — 2196 tests, 0 failures.
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ 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
|
+
## [2.2.2] - 2026-06-10
|
|
8
|
+
|
|
9
|
+
### 🔄 Changes
|
|
10
|
+
|
|
11
|
+
- Version bump
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## [2.2.1] - 2026-06-10
|
|
16
|
+
|
|
17
|
+
### 🔄 Changes
|
|
18
|
+
|
|
19
|
+
- Version bump
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
7
23
|
## [2.2.0] - 2026-06-10
|
|
8
24
|
|
|
9
25
|
### 🚀 Features
|
package/dist/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 0xRay — Self-Healing AI Governance OS
|
|
2
2
|
|
|
3
|
-
**v2.1.3** — 42 agents · 46 skills ·
|
|
3
|
+
**v2.1.3** — 42 agents · 46 skills · 15 MCPs servers · 9 codex terms · ~2,2196 tests
|
|
4
4
|
|
|
5
5
|
[](https://0xrayai.github.io/xray/)
|
|
6
6
|
|
|
@@ -62,7 +62,7 @@ AI coding assistants are powerful but unreliable. They hallucinate APIs, introdu
|
|
|
62
62
|
├─────────────────────────────────────────────────┤
|
|
63
63
|
│ External Governance (Dynamo) │
|
|
64
64
|
│ Codex enforcement · Multi-agent review · SSOT │
|
|
65
|
-
│
|
|
65
|
+
│ 15 MCPs servers (governance + knowledge skills) deliberate proposals │
|
|
66
66
|
├─────────────────────────────────────────────────┤
|
|
67
67
|
│ Autonomous Engine (thinDispatch) │
|
|
68
68
|
│ Task routing · Multi-agent coordination │
|
|
@@ -179,7 +179,7 @@ Every subsystem is configurable via `features.json` (located at `.opencode/xray/
|
|
|
179
179
|
|
|
180
180
|
```json
|
|
181
181
|
{
|
|
182
|
-
"version": "2.1
|
|
182
|
+
"version": "2.2.1",
|
|
183
183
|
"token_optimization": {
|
|
184
184
|
"enabled": true,
|
|
185
185
|
"max_context_tokens": 20000,
|
|
@@ -277,7 +277,7 @@ Install more skills anytime: `npx 0xray skill:install`
|
|
|
277
277
|
|
|
278
278
|
## Testing & Reliability
|
|
279
279
|
|
|
280
|
-
0xRay is battle-tested with **~2,
|
|
280
|
+
0xRay is battle-tested with **~2,2196 tests** across every subsystem:
|
|
281
281
|
|
|
282
282
|
| Suite | Tests | Status |
|
|
283
283
|
|-------|-------|--------|
|
|
@@ -36,7 +36,7 @@ class RoutingRefiner {
|
|
|
36
36
|
const optimizations = this.suggestMappingOptimizations(promptAnalysis, performanceReport);
|
|
37
37
|
const warnings = this.generateWarnings(newMappings, optimizations);
|
|
38
38
|
return {
|
|
39
|
-
version: "2.1
|
|
39
|
+
version: "2.2.1",
|
|
40
40
|
generatedAt: new Date(),
|
|
41
41
|
summary: {
|
|
42
42
|
newMappings: newMappings.length,
|
|
@@ -717,9 +717,9 @@ export class BootOrchestrator {
|
|
|
717
717
|
try {
|
|
718
718
|
// Consumer runtime compat (XRAY_ env + .xray fallbacks)
|
|
719
719
|
const xrayConfig = {
|
|
720
|
-
version: "2.1
|
|
720
|
+
version: "2.2.1",
|
|
721
721
|
codex_enabled: true,
|
|
722
|
-
codex_version: "v2.
|
|
722
|
+
codex_version: "v2.2.0",
|
|
723
723
|
codex_terms: [
|
|
724
724
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
|
725
725
|
21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
|
|
@@ -72,5 +72,6 @@ export declare class FrameworkUsageLogger {
|
|
|
72
72
|
getRecentLogs(count?: number): FrameworkLogEntry[];
|
|
73
73
|
getComponentUsage(component: string): FrameworkLogEntry[];
|
|
74
74
|
printRundown(): void;
|
|
75
|
+
flushSync(): void;
|
|
75
76
|
}
|
|
76
77
|
export declare const frameworkLogger: FrameworkUsageLogger;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { promises as fs, existsSync, mkdirSync } from "fs";
|
|
1
|
+
import { promises as fs, existsSync, mkdirSync, appendFileSync } from "fs";
|
|
2
2
|
import { join } from "path";
|
|
3
3
|
/**
|
|
4
4
|
* Generate a unique job ID for tracking work sessions
|
|
@@ -304,8 +304,34 @@ export class FrameworkUsageLogger {
|
|
|
304
304
|
printRundown() {
|
|
305
305
|
// Framework usage analytics placeholder
|
|
306
306
|
}
|
|
307
|
+
flushSync() {
|
|
308
|
+
if (this.flushing || this.buffer.length === 0)
|
|
309
|
+
return;
|
|
310
|
+
const toWrite = this.buffer.splice(0, this.buffer.length);
|
|
311
|
+
const data = toWrite.join("");
|
|
312
|
+
try {
|
|
313
|
+
const cwd = process.cwd();
|
|
314
|
+
if (!cwd)
|
|
315
|
+
return;
|
|
316
|
+
const logDir = join(cwd, "logs", "framework");
|
|
317
|
+
const logFile = join(logDir, "activity.log");
|
|
318
|
+
if (!existsSync(logDir)) {
|
|
319
|
+
mkdirSync(logDir, { recursive: true });
|
|
320
|
+
}
|
|
321
|
+
appendFileSync(logFile, data);
|
|
322
|
+
}
|
|
323
|
+
catch {
|
|
324
|
+
// flush failure is non-fatal
|
|
325
|
+
}
|
|
326
|
+
}
|
|
307
327
|
}
|
|
308
328
|
export const frameworkLogger = new FrameworkUsageLogger();
|
|
329
|
+
// Flush buffer synchronously on exit so CLI commands don't lose log entries
|
|
330
|
+
if (typeof process !== "undefined" && process.env?.NODE_ENV !== "test") {
|
|
331
|
+
process.on("exit", () => {
|
|
332
|
+
frameworkLogger.flushSync();
|
|
333
|
+
});
|
|
334
|
+
}
|
|
309
335
|
// Startup self-test: verify logger works
|
|
310
336
|
if (typeof process !== "undefined" && process.env?.NODE_ENV !== "test") {
|
|
311
337
|
frameworkLogger.log("system", "logger initialized", "info").catch(() => { });
|
|
@@ -595,7 +595,7 @@ class XrayDocumentationGenerationServer extends XrayKnowledgeSkillBase {
|
|
|
595
595
|
openapi: "3.0.0",
|
|
596
596
|
info: {
|
|
597
597
|
title: "API Documentation",
|
|
598
|
-
version: "2.1
|
|
598
|
+
version: "2.2.1",
|
|
599
599
|
description: "Generated API documentation",
|
|
600
600
|
},
|
|
601
601
|
servers: [
|
package/dist/mcps/registry.json
CHANGED
|
@@ -79,7 +79,7 @@ export const frameworkHelpSimulations = {
|
|
|
79
79
|
type: 'text',
|
|
80
80
|
text: `**0xRay Framework Capabilities:**
|
|
81
81
|
|
|
82
|
-
**
|
|
82
|
+
**41 Specialized Agents:**
|
|
83
83
|
- enforcer: Codex compliance & error prevention
|
|
84
84
|
- architect: System design & technical decisions
|
|
85
85
|
- orchestrator: Multi-agent workflow coordination
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "0xray",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"description": "Multi-agent orchestration and Codex governance for OpenCode, Hermes, Grok Build, and OpenClaw",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"mcps": "./dist/mcps/"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
|
-
"prepublishOnly": "npm run prepare-consumer && npm run build:all && find dist -name '*.d.ts' -o -name '*.d.ts.map' -o -name '*.js.map' | xargs rm -f
|
|
48
|
+
"prepublishOnly": "npm run prepare-consumer && npm run build:all && find dist -name '*.d.ts' -o -name '*.d.ts.map' -o -name '*.js.map' | xargs rm -f",
|
|
49
49
|
"version:bump": "node scripts/node/version-manager.mjs",
|
|
50
50
|
"version": "node scripts/node/version-manager.mjs",
|
|
51
51
|
"postinstall": "node scripts/node/postinstall.cjs",
|
|
@@ -102,10 +102,10 @@
|
|
|
102
102
|
"enforce:versions": "bash scripts/node/enforce-version-compliance.sh",
|
|
103
103
|
"version:sync": "node scripts/node/universal-version-manager.js",
|
|
104
104
|
"preversion": "npm run version:sync",
|
|
105
|
-
"release": "node scripts/node/release.
|
|
105
|
+
"release": "node scripts/node/release.mjs patch",
|
|
106
106
|
"release:minor": "node scripts/node/release.mjs minor",
|
|
107
107
|
"release:major": "node scripts/node/release.mjs major",
|
|
108
|
-
"release:dry": "node scripts/node/release.
|
|
108
|
+
"release:dry": "node scripts/node/release.mjs --dry-run",
|
|
109
109
|
"pre-publish-guard": "node scripts/node/pre-publish-guard.js",
|
|
110
110
|
"safe-publish": "npm run prepare-consumer && npm run build",
|
|
111
111
|
"publish": "npm run pre-publish-guard && npm run safe-publish",
|
package/scripts/node/release.mjs
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
4
|
+
* Release Script for xray
|
|
5
|
+
*
|
|
6
|
+
* Thin orchestrator that delegates to npm lifecycle hooks:
|
|
7
|
+
* 1. Typecheck + full test suite
|
|
8
|
+
* 2. npm version (bumps package.json, triggers preversion → version scripts)
|
|
9
|
+
* 3. Build
|
|
10
|
+
* 4. Consumer verification (npm pack + fresh install + 4 bridge E2Es)
|
|
11
|
+
* 5. Commit + tag
|
|
12
|
+
* 6. npm publish (triggers prepublishOnly → prepare-consumer + build)
|
|
13
|
+
* 7. Push commit + tag
|
|
14
|
+
*
|
|
15
15
|
* Usage:
|
|
16
|
-
* npm run release:patch
|
|
17
|
-
* npm run release:minor
|
|
18
|
-
* npm run release:major
|
|
16
|
+
* npm run release:patch # patch bump (default)
|
|
17
|
+
* npm run release:minor # minor bump
|
|
18
|
+
* npm run release:major # major bump
|
|
19
|
+
* npm run release:dry # dry run (no changes)
|
|
19
20
|
*/
|
|
20
21
|
|
|
21
22
|
import { execSync } from 'child_process';
|
|
@@ -26,188 +27,182 @@ import { fileURLToPath } from 'url';
|
|
|
26
27
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
27
28
|
const rootDir = process.cwd();
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
const RED = '\x1b[31m';
|
|
31
|
+
const GREEN = '\x1b[32m';
|
|
32
|
+
const YELLOW = '\x1b[33m';
|
|
33
|
+
const BLUE = '\x1b[36m';
|
|
34
|
+
const BOLD = '\x1b[1m';
|
|
35
|
+
const RESET = '\x1b[0m';
|
|
36
|
+
|
|
37
|
+
const dryRun = process.argv.includes('--dry-run');
|
|
38
|
+
const args = process.argv.slice(2).filter(a => a !== '--dry-run');
|
|
39
|
+
const bumpType = args.find(a => ['major', 'minor', 'patch'].includes(a)) || 'patch';
|
|
40
|
+
|
|
41
|
+
function log(label, msg, color = BLUE) {
|
|
42
|
+
console.log(`${color}${label}${RESET}${msg ? ` ${msg}` : ''}`);
|
|
32
43
|
}
|
|
33
44
|
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
return {
|
|
37
|
-
major: parseInt(parts[0], 10),
|
|
38
|
-
minor: parseInt(parts[1], 10),
|
|
39
|
-
patch: parseInt(parts[2], 10)
|
|
40
|
-
};
|
|
45
|
+
function step(n, label) {
|
|
46
|
+
console.log(`\n${BOLD}${BLUE}▸ Step ${n}: ${label}${RESET}`);
|
|
41
47
|
}
|
|
42
48
|
|
|
43
|
-
function
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
case 'minor':
|
|
53
|
-
v.minor++;
|
|
54
|
-
v.patch = 0;
|
|
55
|
-
break;
|
|
56
|
-
case 'patch':
|
|
57
|
-
v.patch++;
|
|
58
|
-
break;
|
|
59
|
-
default:
|
|
60
|
-
return type;
|
|
49
|
+
function run(cmd, label) {
|
|
50
|
+
log(` ⚡`, label);
|
|
51
|
+
try {
|
|
52
|
+
execSync(cmd, { cwd: rootDir, stdio: 'pipe', encoding: 'utf-8' });
|
|
53
|
+
log(` ✓`, `${label} done`, GREEN);
|
|
54
|
+
return true;
|
|
55
|
+
} catch (e) {
|
|
56
|
+
log(` ✗`, `${label} failed: ${(e.stderr || e.message || '').slice(0, 200)}`, RED);
|
|
57
|
+
return false;
|
|
61
58
|
}
|
|
62
|
-
|
|
63
|
-
return `${v.major}.${v.minor}.${v.patch}`;
|
|
64
59
|
}
|
|
65
60
|
|
|
66
|
-
function
|
|
61
|
+
function runInherit(cmd, label) {
|
|
62
|
+
log(` ⚡`, label);
|
|
67
63
|
try {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
} catch (error) {
|
|
75
|
-
console.error(`\n❌ ${errorMsg}`);
|
|
76
|
-
console.error(error.message);
|
|
77
|
-
process.exit(1);
|
|
64
|
+
execSync(cmd, { cwd: rootDir, stdio: 'inherit', encoding: 'utf-8' });
|
|
65
|
+
log(` ✓`, `${label} done`, GREEN);
|
|
66
|
+
return true;
|
|
67
|
+
} catch (e) {
|
|
68
|
+
log(` ✗`, `${label} failed`, RED);
|
|
69
|
+
return false;
|
|
78
70
|
}
|
|
79
71
|
}
|
|
80
72
|
|
|
81
|
-
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
if (!['major', 'minor', 'patch'].includes(releaseType)) {
|
|
86
|
-
console.error('Usage: node scripts/node/release.mjs [major|minor|patch]');
|
|
87
|
-
process.exit(1);
|
|
88
|
-
}
|
|
73
|
+
function getCurrentVersion() {
|
|
74
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(rootDir, 'package.json'), 'utf-8'));
|
|
75
|
+
return pkg.version;
|
|
76
|
+
}
|
|
89
77
|
|
|
90
|
-
|
|
91
|
-
console.log('║ 🚀 xray Release Script ║');
|
|
92
|
-
console.log('╚════════════════════════════════════════════════════════╝');
|
|
93
|
-
|
|
78
|
+
async function main() {
|
|
94
79
|
const currentVersion = getCurrentVersion();
|
|
95
|
-
console.log(`\n📌 Current version (local): ${currentVersion}`);
|
|
96
80
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
publishedVersion = null;
|
|
105
|
-
console.log('⚠️ Could not fetch published version from npm — will use local version');
|
|
81
|
+
console.log(`\n${BOLD}${BLUE}╔══════════════════════════════════════════╗`);
|
|
82
|
+
console.log(`║ 🚀 0xray Release ║`);
|
|
83
|
+
console.log(`╚══════════════════════════════════════════╝${RESET}`);
|
|
84
|
+
console.log(`${BOLD} ${currentVersion} → (${bumpType})${RESET}`);
|
|
85
|
+
|
|
86
|
+
if (dryRun) {
|
|
87
|
+
console.log(`\n${YELLOW}${BOLD} DRY RUN — no changes will be made${RESET}\n`);
|
|
106
88
|
}
|
|
107
89
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
90
|
+
// Step 1: Typecheck + tests
|
|
91
|
+
step(1, 'Typecheck + Tests');
|
|
92
|
+
if (!runInherit('npx tsc --noEmit', 'Typecheck')) process.exit(1);
|
|
93
|
+
if (!runInherit('npx vitest run', 'Tests')) process.exit(1);
|
|
112
94
|
|
|
113
|
-
|
|
114
|
-
|
|
95
|
+
// Step 2: Version bump (npm version triggers preversion → version:sync → version-manager.mjs)
|
|
96
|
+
step(2, 'Version bump');
|
|
97
|
+
if (!dryRun) {
|
|
98
|
+
if (!run(`npm version ${bumpType} --no-git-tag-version`, `Bump ${bumpType}`)) {
|
|
99
|
+
process.exit(1);
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
log(` ~`, `Would bump: npm version ${bumpType} --no-git-tag-version`, YELLOW);
|
|
115
103
|
}
|
|
116
104
|
|
|
117
|
-
const newVersion =
|
|
118
|
-
|
|
119
|
-
// Step 1: Build
|
|
120
|
-
console.log('\n📦 Step 1: Building...');
|
|
121
|
-
runCommand('npm run build', 'Build failed');
|
|
105
|
+
const newVersion = getCurrentVersion();
|
|
106
|
+
console.log(` 📦 Version: ${currentVersion} → ${newVersion}`);
|
|
122
107
|
|
|
123
|
-
// Step
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
127
|
-
pkg.version = newVersion;
|
|
128
|
-
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
108
|
+
// Step 3: Build
|
|
109
|
+
step(3, 'Build');
|
|
110
|
+
if (!run('npm run build', 'Build')) process.exit(1);
|
|
129
111
|
|
|
130
|
-
// Step
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
112
|
+
// Step 4: Consumer verification (pack + install + bridge E2Es + activity.log check)
|
|
113
|
+
step(4, 'Consumer verification');
|
|
114
|
+
if (!dryRun) {
|
|
115
|
+
if (!runInherit('bash scripts/verify-consumer.sh', 'verify:consumer')) {
|
|
116
|
+
process.exit(1);
|
|
117
|
+
}
|
|
118
|
+
} else {
|
|
119
|
+
log(` ~`, 'Would run: bash scripts/verify-consumer.sh', YELLOW);
|
|
136
120
|
}
|
|
137
121
|
|
|
138
|
-
// Step
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
122
|
+
// Step 5: Commit
|
|
123
|
+
step(5, 'Commit');
|
|
124
|
+
if (!dryRun) {
|
|
125
|
+
if (!run('git add -A', 'Stage changes')) process.exit(1);
|
|
126
|
+
const commitMsg = `v${newVersion}`;
|
|
127
|
+
try {
|
|
128
|
+
execSync(`git commit -m "${commitMsg}"`, { cwd: rootDir, stdio: 'pipe', encoding: 'utf-8' });
|
|
129
|
+
log(` ✓`, `Committed: ${commitMsg}`, GREEN);
|
|
130
|
+
} catch (e) {
|
|
131
|
+
const output = e.stdout || e.stderr || '';
|
|
132
|
+
if (output.includes('nothing to commit')) {
|
|
133
|
+
log(` ⚠`, 'Nothing to commit', YELLOW);
|
|
134
|
+
} else {
|
|
135
|
+
log(` ✗`, `Commit failed: ${output.slice(0, 200)}`, RED);
|
|
136
|
+
process.exit(1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
} else {
|
|
140
|
+
log(` ~`, 'Would commit and tag', YELLOW);
|
|
153
141
|
}
|
|
154
|
-
|
|
155
|
-
// Step 5: Push
|
|
156
|
-
console.log('\n📦 Step 5: Pushing to origin...');
|
|
157
|
-
runCommand('git push origin main', 'Failed to push to origin');
|
|
158
|
-
runCommand(`git push origin v${newVersion}`, 'Failed to push tag');
|
|
159
|
-
|
|
160
|
-
// Step 6: Publish to npm
|
|
161
|
-
console.log('\n📦 Step 6: Publishing to npm...');
|
|
162
|
-
runCommand('npm publish --access public --ignore-scripts', 'npm publish failed');
|
|
163
|
-
console.log(`✅ Published 0xray@${newVersion} to npm`);
|
|
164
|
-
|
|
165
|
-
console.log('\n╔════════════════════════════════════════════════════════╗');
|
|
166
|
-
console.log('║ ✅ Release Complete! ║');
|
|
167
|
-
console.log('╚════════════════════════════════════════════════════════╝');
|
|
168
|
-
console.log(`\n📦 Package: xray@${newVersion}`);
|
|
169
|
-
console.log(`🏷 Tag: v${newVersion}`);
|
|
170
|
-
|
|
171
|
-
// Generate tweet
|
|
172
|
-
const tweetPath = path.join(rootDir, 'tweets', `v${newVersion}.md`);
|
|
173
|
-
const tweetDir = path.join(rootDir, 'tweets');
|
|
174
|
-
if (!fs.existsSync(tweetDir)) fs.mkdirSync(tweetDir, { recursive: true });
|
|
175
142
|
|
|
176
|
-
|
|
143
|
+
// Step 6: Tag
|
|
144
|
+
step(6, 'Tag');
|
|
145
|
+
if (!dryRun) {
|
|
177
146
|
try {
|
|
178
|
-
|
|
179
|
-
|
|
147
|
+
execSync(`git tag -a v${newVersion} -m "Release v${newVersion}"`, { cwd: rootDir, stdio: 'pipe' });
|
|
148
|
+
log(` ✓`, `Tagged v${newVersion}`, GREEN);
|
|
180
149
|
} catch {
|
|
181
|
-
|
|
182
|
-
catch { return '(could not read commits)'; }
|
|
150
|
+
log(` ⚠`, 'Tag may already exist', YELLOW);
|
|
183
151
|
}
|
|
184
|
-
}
|
|
152
|
+
}
|
|
185
153
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
154
|
+
// Step 7: Publish (prepublishOnly runs prepare-consumer + build)
|
|
155
|
+
step(7, 'Publish to npm');
|
|
156
|
+
if (!dryRun) {
|
|
157
|
+
if (!run('npm publish --access public', `Publish 0xray@${newVersion}`)) {
|
|
158
|
+
log(` ✗`, 'Publish failed — trying without scripts', RED);
|
|
159
|
+
if (!run('npm publish --access public --ignore-scripts', `Publish 0xray@${newVersion} (fallback)`)) {
|
|
160
|
+
process.exit(1);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
} else {
|
|
164
|
+
log(` ~`, 'Would publish: npm publish --access public', YELLOW);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Step 8: Push
|
|
168
|
+
step(8, 'Push to remote');
|
|
169
|
+
if (!dryRun) {
|
|
170
|
+
if (!run('git push', 'Push commits')) process.exit(1);
|
|
171
|
+
if (!run(`git push origin v${newVersion}`, 'Push tag')) process.exit(1);
|
|
172
|
+
} else {
|
|
173
|
+
log(` ~`, 'Would push commits + tag', YELLOW);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
console.log(`\n${BOLD}${GREEN}✅ Released 0xray@${newVersion}${RESET}\n`);
|
|
177
|
+
|
|
178
|
+
// Generate tweet template (non-blocking)
|
|
179
|
+
const tweetPath = path.join(rootDir, 'tweets', `v${newVersion}.md`);
|
|
180
|
+
const tweetDir = path.join(rootDir, 'tweets');
|
|
181
|
+
if (!fs.existsSync(tweetDir)) fs.mkdirSync(tweetDir, { recursive: true });
|
|
182
|
+
if (!fs.existsSync(tweetPath)) {
|
|
183
|
+
const recentCommits = (() => {
|
|
184
|
+
try {
|
|
185
|
+
const prevTag = execSync('git describe --tags --abbrev=0 HEAD~5 2>/dev/null || echo "HEAD~10"', { cwd: rootDir, encoding: 'utf-8' }).trim();
|
|
186
|
+
return execSync(`git log ${prevTag}..HEAD --oneline`, { cwd: rootDir, encoding: 'utf-8' }).trim();
|
|
187
|
+
} catch {
|
|
188
|
+
try { return execSync('git log -10 --oneline', { cwd: rootDir, encoding: 'utf-8' }).trim(); }
|
|
189
|
+
catch { return '(could not read commits)'; }
|
|
190
|
+
}
|
|
191
|
+
})();
|
|
192
|
+
const tweet = `🎉 0xray v${newVersion} is LIVE!
|
|
190
193
|
{EMOJI} {feature - consumer benefit}
|
|
191
194
|
{EMOJI} {feature - consumer benefit}
|
|
192
195
|
\`\`\`
|
|
193
196
|
npm install 0xray@latest
|
|
194
197
|
\`\`\`
|
|
195
|
-
|
|
196
|
-
#xray #AIOps #DevTools #SelfHealing #NPM`;
|
|
197
|
-
|
|
198
|
-
if (!fs.existsSync(tweetPath)) {
|
|
198
|
+
#0xray #AIOps #DevTools #MCP #Agentic`;
|
|
199
199
|
fs.writeFileSync(tweetPath, tweet);
|
|
200
|
-
console.log(
|
|
201
|
-
|
|
202
|
-
console.log(`\n📝 Tweet already exists at tweets/v${newVersion}.md`);
|
|
200
|
+
console.log(`📝 Tweet template saved to tweets/v${newVersion}.md`);
|
|
201
|
+
console.log(`📋 Recent commits:\n${recentCommits.split('\n').map(l => ' ' + l).join('\n')}`);
|
|
203
202
|
}
|
|
204
|
-
|
|
205
|
-
console.log(`\n📋 Recent commits for tweet bullets:\n${recentCommits.split('\n').map(l => ' ' + l).join('\n')}`);
|
|
206
|
-
console.log('\n📖 Tweet format guide: tweets/FORMAT.md');
|
|
207
|
-
console.log('\n🎉 All done!\n');
|
|
208
203
|
}
|
|
209
204
|
|
|
210
205
|
main().catch(error => {
|
|
211
|
-
console.error(
|
|
206
|
+
console.error(`\n❌ Release failed: ${error.message}`);
|
|
212
207
|
process.exit(1);
|
|
213
|
-
});
|
|
208
|
+
});
|
|
@@ -147,7 +147,7 @@ function detectCodexInfo() {
|
|
|
147
147
|
return { version: cver.startsWith("v") ? cver : `v${cver}`, termsCount: termCount, lastUpdated: new Date().toISOString().split("T")[0] };
|
|
148
148
|
} catch {}
|
|
149
149
|
}
|
|
150
|
-
return { version: "v2.
|
|
150
|
+
return { version: "v2.2.0", termsCount: 68, lastUpdated: new Date().toISOString().split("T")[0] };
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
const detectedCodex = detectCodexInfo();
|
|
@@ -155,7 +155,7 @@ const detectedCodex = detectCodexInfo();
|
|
|
155
155
|
const OFFICIAL_VERSIONS = {
|
|
156
156
|
// Framework version
|
|
157
157
|
framework: {
|
|
158
|
-
version: "2.2.
|
|
158
|
+
version: "2.2.2",
|
|
159
159
|
displayName: "xray: Self-Healing AI Governance OS",
|
|
160
160
|
lastUpdated: "2026-06-10",
|
|
161
161
|
// Counts (auto-calculated, but can be overridden)
|
|
@@ -346,29 +346,29 @@ const UPDATE_PATTERNS = [
|
|
|
346
346
|
},
|
|
347
347
|
|
|
348
348
|
// === BADGE AND COUNT PATTERNS ===
|
|
349
|
-
// Test count in docs badge (e.g., tests-
|
|
349
|
+
// Test count in docs badge (e.g., tests-2196-brightgreen)
|
|
350
350
|
{
|
|
351
351
|
pattern: /tests-[0-9]+(?=-brightgreen)/g,
|
|
352
352
|
replacement: `tests-${OFFICIAL_VERSIONS.framework.tests}`,
|
|
353
353
|
},
|
|
354
|
-
// Test count in npm badge (e.g., tests-
|
|
354
|
+
// Test count in npm badge (e.g., tests-2196%20passed-brightgreen)
|
|
355
355
|
{
|
|
356
356
|
pattern: /tests-[0-9,]+%20passed/g,
|
|
357
357
|
replacement: `tests-${OFFICIAL_VERSIONS.framework.tests}%20passed`,
|
|
358
358
|
},
|
|
359
|
-
// Test count in prose (e.g., "2,
|
|
359
|
+
// Test count in prose (e.g., "2,2196 Tests" or "2196 Tests" but NOT in badge URLs)
|
|
360
360
|
{
|
|
361
361
|
pattern: /(\*\s*✅\s*)([0-9]{1,3},?[0-9]{3})(\s*Tests)/g,
|
|
362
362
|
replacement: (match, p1, p2, p3) => {
|
|
363
363
|
return `${p1}${OFFICIAL_VERSIONS.framework.tests}${p3}`;
|
|
364
364
|
},
|
|
365
365
|
},
|
|
366
|
-
// Test count in feature bullets (e.g., "✅
|
|
366
|
+
// Test count in feature bullets (e.g., "✅ 2196 Tests")
|
|
367
367
|
{
|
|
368
368
|
pattern: /[0-9]+ Tests/g,
|
|
369
369
|
replacement: `${OFFICIAL_VERSIONS.framework.tests} Tests`,
|
|
370
370
|
},
|
|
371
|
-
// Test count in config tree (e.g., "
|
|
371
|
+
// Test count in config tree (e.g., "2196 tests")
|
|
372
372
|
{
|
|
373
373
|
pattern: /[0-9]+ tests/g,
|
|
374
374
|
replacement: `${OFFICIAL_VERSIONS.framework.tests} tests`,
|
|
@@ -403,7 +403,7 @@ const UPDATE_PATTERNS = [
|
|
|
403
403
|
pattern: /xray AI v[0-9]+\.[0-9]+\.[0-9]+/g,
|
|
404
404
|
replacement: `xray AI v${OFFICIAL_VERSIONS.framework.version}`,
|
|
405
405
|
},
|
|
406
|
-
// Footer bare version (e.g., "**Version**: 2.1
|
|
406
|
+
// Footer bare version (e.g., "**Version**: 2.2.1")
|
|
407
407
|
{
|
|
408
408
|
pattern: /\*\*Version\*\*:\s*[0-9]+\.[0-9]+\.[0-9]+/g,
|
|
409
409
|
replacement: `**Version**: ${OFFICIAL_VERSIONS.framework.version}`,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/**
|
|
4
4
|
* MCP Server Connectivity Validator
|
|
5
5
|
*
|
|
6
|
-
* Tests all xray
|
|
6
|
+
* Tests all xray v39 MCP servers for proper startup and protocol compliance
|
|
7
7
|
* Validates external integration points that internal tests miss
|
|
8
8
|
*
|
|
9
9
|
* FIXED: Converted to ES module syntax
|
|
@@ -888,7 +888,7 @@ class XrayDocumentationGenerationServer extends XrayKnowledgeSkillBase {
|
|
|
888
888
|
openapi: "3.0.0",
|
|
889
889
|
info: {
|
|
890
890
|
title: "API Documentation",
|
|
891
|
-
version: "2.1
|
|
891
|
+
version: "2.2.1",
|
|
892
892
|
description: "Generated API documentation",
|
|
893
893
|
},
|
|
894
894
|
servers: [
|
package/src/mcps/registry.json
CHANGED
|
@@ -92,7 +92,7 @@ export const frameworkHelpSimulations: Record<string, SimulatorFunction> = {
|
|
|
92
92
|
type: 'text',
|
|
93
93
|
text: `**0xRay Framework Capabilities:**
|
|
94
94
|
|
|
95
|
-
**
|
|
95
|
+
**41 Specialized Agents:**
|
|
96
96
|
- enforcer: Codex compliance & error prevention
|
|
97
97
|
- architect: System design & technical decisions
|
|
98
98
|
- orchestrator: Multi-agent workflow coordination
|
package/src/opencode/codex.codex
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.1
|
|
2
|
+
"version": "2.2.1",
|
|
3
3
|
"terms": [
|
|
4
4
|
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68
|
|
5
5
|
],
|
|
@@ -69,7 +69,7 @@ Comprehensive dependency analysis and security audit for all project dependencie
|
|
|
69
69
|
"vulnerabilities": [
|
|
70
70
|
{
|
|
71
71
|
"package": "lodash",
|
|
72
|
-
"version": "2.1
|
|
72
|
+
"version": "2.2.1",
|
|
73
73
|
"severity": "high",
|
|
74
74
|
"cve": "CVE-2021-23337",
|
|
75
75
|
"description": "Command injection vulnerability"
|
|
@@ -85,14 +85,14 @@ Security-focused format for CI/CD integration:
|
|
|
85
85
|
|
|
86
86
|
```json
|
|
87
87
|
{
|
|
88
|
-
"version": "2.1
|
|
88
|
+
"version": "2.2.1",
|
|
89
89
|
"$schema": "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json",
|
|
90
90
|
"runs": [
|
|
91
91
|
{
|
|
92
92
|
"tool": {
|
|
93
93
|
"driver": {
|
|
94
94
|
"name": "Dependency Audit",
|
|
95
|
-
"version": "2.1
|
|
95
|
+
"version": "2.2.1"
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
"results": [...]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"framework": "xray 2.0",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Codex-compliant framework configuration for Credible UI project",
|
|
5
5
|
"thresholds": {
|
|
6
6
|
"bundleSize": {
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
}
|
|
221
221
|
},
|
|
222
222
|
"codex": {
|
|
223
|
-
"version": "2.1
|
|
223
|
+
"version": "2.2.1",
|
|
224
224
|
"terms": [
|
|
225
225
|
1,
|
|
226
226
|
2,
|
package/src/skills/registry.json
CHANGED
package/xray/codex.json
CHANGED
package/xray/config.json
CHANGED
package/xray/features.json
CHANGED
package/xray/integrations.json
CHANGED
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
"openclaw": {
|
|
5
5
|
"enabled": false,
|
|
6
6
|
"type": "external-service",
|
|
7
|
-
"version": "2.1
|
|
7
|
+
"version": "2.2.1",
|
|
8
8
|
"config": {}
|
|
9
9
|
},
|
|
10
10
|
"python-bridge": {
|
|
11
11
|
"enabled": false,
|
|
12
12
|
"type": "protocol-bridge",
|
|
13
|
-
"version": "2.1
|
|
13
|
+
"version": "2.2.1",
|
|
14
14
|
"config": {}
|
|
15
15
|
},
|
|
16
16
|
"react": {
|
|
17
17
|
"enabled": false,
|
|
18
18
|
"type": "framework-adapter",
|
|
19
|
-
"version": "2.1
|
|
19
|
+
"version": "2.2.1",
|
|
20
20
|
"config": {}
|
|
21
21
|
}
|
|
22
22
|
}
|
package/scripts/node/release.js
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* One-command release: bump → build → commit → publish → push
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* node scripts/node/release.js # patch bump
|
|
8
|
-
* node scripts/node/release.js minor # minor bump
|
|
9
|
-
* node scripts/node/release.js major # major bump
|
|
10
|
-
* node scripts/node/release.js --dry-run # preview without publishing
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { execSync } from "child_process";
|
|
14
|
-
import fs from "fs";
|
|
15
|
-
import path from "path";
|
|
16
|
-
import { fileURLToPath } from "url";
|
|
17
|
-
|
|
18
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
19
|
-
const rootDir = path.resolve(__dirname, "../..");
|
|
20
|
-
|
|
21
|
-
const RED = "\x1b[31m";
|
|
22
|
-
const GREEN = "\x1b[32m";
|
|
23
|
-
const YELLOW = "\x1b[33m";
|
|
24
|
-
const BLUE = "\x1b[36m";
|
|
25
|
-
const BOLD = "\x1b[1m";
|
|
26
|
-
const RESET = "\x1b[0m";
|
|
27
|
-
|
|
28
|
-
const dryRun = process.argv.includes("--dry-run");
|
|
29
|
-
const bumpType = process.argv.find((a) => ["patch", "minor", "major"].includes(a)) || "patch";
|
|
30
|
-
|
|
31
|
-
function run(cmd, label) {
|
|
32
|
-
console.log(`${BLUE}▸ ${label}${RESET}`);
|
|
33
|
-
try {
|
|
34
|
-
execSync(cmd, { cwd: rootDir, stdio: "pipe", encoding: "utf-8" });
|
|
35
|
-
console.log(`${GREEN} ✓ ${label} done${RESET}`);
|
|
36
|
-
return true;
|
|
37
|
-
} catch (e) {
|
|
38
|
-
console.log(`${RED} ✗ ${label} failed: ${e.message?.slice(0, 200) || e}${RESET}`);
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
function runInherit(cmd, label) {
|
|
44
|
-
console.log(`${BLUE}▸ ${label}${RESET}`);
|
|
45
|
-
try {
|
|
46
|
-
execSync(cmd, { cwd: rootDir, stdio: "inherit" });
|
|
47
|
-
console.log(`${GREEN} ✓ ${label} done${RESET}`);
|
|
48
|
-
return true;
|
|
49
|
-
} catch (e) {
|
|
50
|
-
console.log(`${RED} ✗ ${label} failed${RESET}`);
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
function main() {
|
|
56
|
-
const pkg = JSON.parse(fs.readFileSync(path.join(rootDir, "package.json"), "utf-8"));
|
|
57
|
-
const currentVersion = pkg.version;
|
|
58
|
-
|
|
59
|
-
const parts = currentVersion.split(".").map(Number);
|
|
60
|
-
if (bumpType === "major") parts[0]++;
|
|
61
|
-
else if (bumpType === "minor") parts[1]++;
|
|
62
|
-
else parts[2]++;
|
|
63
|
-
if (bumpType === "major" || bumpType === "minor") parts[2] = 0;
|
|
64
|
-
const nextVersion = parts.join(".");
|
|
65
|
-
|
|
66
|
-
console.log(`\n${BOLD}${BLUE}🚀 0xray Release${RESET}`);
|
|
67
|
-
console.log(`${BOLD} ${currentVersion} → ${nextVersion} (${bumpType})${RESET}\n`);
|
|
68
|
-
|
|
69
|
-
if (dryRun) {
|
|
70
|
-
console.log(`${YELLOW}DRY RUN — no changes will be made${RESET}\n`);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Step 1: Tests
|
|
74
|
-
if (!runInherit("npm run test:comprehensive", "Tests")) {
|
|
75
|
-
process.exit(1);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// Step 2: Version bump (version:sync runs automatically via preversion hook)
|
|
79
|
-
if (!dryRun) {
|
|
80
|
-
if (!run(`npm version ${bumpType} --no-git-tag-version`, `Bump to ${nextVersion}`)) {
|
|
81
|
-
process.exit(1);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Step 3: Build
|
|
86
|
-
if (!run("npm run build", "Build")) {
|
|
87
|
-
process.exit(1);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// Step 4: Commit
|
|
91
|
-
if (!dryRun) {
|
|
92
|
-
if (!run("git add -A", "Stage changes")) {
|
|
93
|
-
process.exit(1);
|
|
94
|
-
}
|
|
95
|
-
const commitMsg = `v${nextVersion}`;
|
|
96
|
-
try {
|
|
97
|
-
execSync(`git commit -m "${commitMsg}"`, { cwd: rootDir, stdio: "pipe", encoding: "utf-8" });
|
|
98
|
-
console.log(`${GREEN} ✓ Committed: ${commitMsg}${RESET}`);
|
|
99
|
-
} catch (e) {
|
|
100
|
-
const output = e.stdout || e.stderr || "";
|
|
101
|
-
if (output.includes("nothing to commit")) {
|
|
102
|
-
console.log(`${YELLOW} ⚠ Nothing to commit${RESET}`);
|
|
103
|
-
} else if (output.includes("BLOCKED")) {
|
|
104
|
-
// Pre-commit hook blocked — likely version compliance
|
|
105
|
-
// Try with --no-verify since we manage versions ourselves
|
|
106
|
-
console.log(`${YELLOW} ⚠ Pre-commit blocked, retrying with --no-verify...${RESET}`);
|
|
107
|
-
try {
|
|
108
|
-
execSync(`git commit --no-verify -m "${commitMsg}"`, { cwd: rootDir, stdio: "pipe", encoding: "utf-8" });
|
|
109
|
-
console.log(`${GREEN} ✓ Committed (no-verify): ${commitMsg}${RESET}`);
|
|
110
|
-
} catch (e2) {
|
|
111
|
-
console.log(`${RED} ✗ Commit failed: ${e2.message?.slice(0, 200)}${RESET}`);
|
|
112
|
-
process.exit(1);
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
115
|
-
console.log(`${RED} ✗ Commit failed: ${output.slice(0, 200)}${RESET}`);
|
|
116
|
-
process.exit(1);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// Step 5: Publish
|
|
122
|
-
if (!dryRun) {
|
|
123
|
-
console.log(`${BLUE}▸ Publishing to npm${RESET}`);
|
|
124
|
-
try {
|
|
125
|
-
execSync("npm publish --access public", { cwd: rootDir, stdio: "inherit" });
|
|
126
|
-
console.log(`${GREEN} ✓ Published 0xray@${nextVersion}${RESET}`);
|
|
127
|
-
} catch (e) {
|
|
128
|
-
const errMsg = (e.stderr?.toString() || "") + (e.message || "");
|
|
129
|
-
if (errMsg.includes("previously published")) {
|
|
130
|
-
console.log(`${GREEN} ✓ Already published 0xray@${nextVersion}${RESET}`);
|
|
131
|
-
} else {
|
|
132
|
-
console.log(`${RED} ✗ Publish failed. Trying with --ignore-scripts...${RESET}`);
|
|
133
|
-
try {
|
|
134
|
-
execSync("npm publish --access public --ignore-scripts", { cwd: rootDir, stdio: "pipe", encoding: "utf-8" });
|
|
135
|
-
console.log(`${GREEN} ✓ Published 0xray@${nextVersion} (ignore-scripts)${RESET}`);
|
|
136
|
-
} catch (e2) {
|
|
137
|
-
const errMsg2 = (e2.stderr?.toString() || "") + (e2.message || "");
|
|
138
|
-
if (errMsg2.includes("previously published")) {
|
|
139
|
-
console.log(`${GREEN} ✓ Already published 0xray@${nextVersion}${RESET}`);
|
|
140
|
-
} else {
|
|
141
|
-
console.log(`${RED} ✗ Publish failed: ${errMsg2.slice(0, 200)}${RESET}`);
|
|
142
|
-
process.exit(1);
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Step 6: Push
|
|
150
|
-
if (!dryRun) {
|
|
151
|
-
if (!run("git push", "Push to remote")) {
|
|
152
|
-
process.exit(1);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
console.log(`\n${BOLD}${GREEN}✅ Released 0xray@${nextVersion}${RESET}\n`);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
main();
|