0xray 2.2.1 → 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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.0",
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.2.0",
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.2.0",
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.2.0"
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.2.0",
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.2.0",
223
+ "version": "2.2.1",
224
224
  "terms": [
225
225
  1,
226
226
  2,
package/README.md CHANGED
@@ -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.2.0",
182
+ "version": "2.2.1",
183
183
  "token_optimization": {
184
184
  "enabled": true,
185
185
  "max_context_tokens": 20000,
package/dist/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ 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
+
7
15
  ## [2.2.1] - 2026-06-10
8
16
 
9
17
  ### 🔄 Changes
package/dist/README.md CHANGED
@@ -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.2.0",
182
+ "version": "2.2.1",
183
183
  "token_optimization": {
184
184
  "enabled": true,
185
185
  "max_context_tokens": 20000,
@@ -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.2.0",
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.2.0",
720
+ version: "2.2.1",
721
721
  codex_enabled: true,
722
- codex_version: "v3.0.0",
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,
@@ -286,7 +286,7 @@ export class FeaturesConfigLoader {
286
286
  */
287
287
  getDefaultConfig() {
288
288
  return {
289
- version: "2.2.0",
289
+ version: "2.2.1",
290
290
  description: "0xRay Framework - Unified Feature Configuration",
291
291
  token_optimization: {
292
292
  enabled: true,
@@ -29,7 +29,7 @@ class GovernanceServer {
29
29
  server;
30
30
  constructor() {
31
31
  this.server = new Server({
32
- name: "governance", version: "2.2.0",
32
+ name: "governance", version: "2.2.1",
33
33
  }, {
34
34
  capabilities: {
35
35
  tools: {},
@@ -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.2.0",
598
+ version: "2.2.1",
599
599
  description: "Generated API documentation",
600
600
  },
601
601
  servers: [
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.0",
2
+ "version": "2.2.1",
3
3
  "description": "0xRay Community MCPs Registry - curated API-focused MCP servers",
4
4
  "sources": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.0",
2
+ "version": "2.2.1",
3
3
  "description": "0xRay Skills Registry - recommended skill sources for consumers",
4
4
  "sources": [
5
5
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0xray",
3
- "version": "2.2.1",
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 && echo 'Checking for stale STRRAY_ references...' && ! grep -rn 'STRRAY_' dist/ --include='*.js' --include='*.mjs' 2>/dev/null | grep -v '//.*STRRAY_' || { echo 'ERROR: Stale STRRAY_ references found in dist/'; exit 1; }",
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.js",
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.js --dry-run",
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",
@@ -1,21 +1,22 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * Proper Release Script for xray
5
- *
6
- * Safe release process that:
7
- * 1. Bumps version
8
- * 2. Commits version changes
9
- * 3. Creates git tag
10
- * 4. Pushes to origin
11
- * 5. Builds (stops on error)
12
- * 6. Publishes to npm (only if build succeeds)
13
- * 7. Generates release tweet
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
- function getCurrentVersion() {
30
- const pkg = JSON.parse(fs.readFileSync(path.join(rootDir, 'package.json'), 'utf-8'));
31
- return pkg.version;
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 parseVersion(version) {
35
- const parts = version.split('.');
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 bumpVersion(current, type) {
44
- const v = parseVersion(current);
45
-
46
- switch (type) {
47
- case 'major':
48
- v.major++;
49
- v.minor = 0;
50
- v.patch = 0;
51
- break;
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 runCommand(cmd, errorMsg) {
61
+ function runInherit(cmd, label) {
62
+ log(` ⚡`, label);
67
63
  try {
68
- console.log(`\n> ${cmd}`);
69
- execSync(cmd, {
70
- cwd: rootDir,
71
- stdio: 'inherit',
72
- encoding: 'utf-8'
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
- async function main() {
82
- const args = process.argv.slice(2);
83
- const releaseType = args[0] || 'patch';
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
- console.log('╔════════════════════════════════════════════════════════╗');
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
- // Better design: always compute target from the *published* version on npm
98
- // This removes the brittle "must be exactly one ahead" problem.
99
- let publishedVersion;
100
- try {
101
- publishedVersion = execSync('npm view 0xray version', { encoding: 'utf-8' }).trim();
102
- console.log(`📌 Latest published on npm: ${publishedVersion}`);
103
- } catch {
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
- const baseVersion = publishedVersion || getCurrentVersion();
109
- const targetVersion = bumpVersion(baseVersion, releaseType);
110
- console.log(`📌 Target version (computed from ${publishedVersion ? 'registry' : 'local'}): ${targetVersion}`);
111
- console.log(`📌 Release type: ${releaseType}`);
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
- if (publishedVersion && currentVersion !== targetVersion) {
114
- console.log(`⚠️ Local version (${currentVersion}) differs from computed target. Using computed target ${targetVersion}.`);
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 = targetVersion;
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 2: Update package.json
124
- console.log('\n📦 Step 2: Updating version in package.json...');
125
- const pkgPath = path.join(rootDir, 'package.json');
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 2.5: Sync version across config and doc files
131
- console.log('\n📦 Step 2.5: Syncing version across config and docs...');
132
- try {
133
- execSync('node scripts/node/sync-versions.mjs --apply', { cwd: rootDir, stdio: 'inherit' });
134
- } catch (e) {
135
- console.log('⚠️ Version sync had issues (non-blocking)');
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 3: Commit
139
- console.log('\n📦 Step 3: Committing version bump...');
140
- runCommand('git add -A', 'git add failed');
141
- runCommand(`git commit --no-verify -m "release: v${newVersion}"`, 'git commit failed');
142
-
143
- // Step 4: Tag
144
- console.log('\n📦 Step 4: Creating git tag...');
145
- try {
146
- execSync(
147
- `git tag -a v${newVersion} -m "Release v${newVersion}"`,
148
- { cwd: rootDir, stdio: 'inherit' }
149
- );
150
- console.log(`✅ Created tag v${newVersion}`);
151
- } catch (error) {
152
- console.log('⚠️ Tag may already exist');
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
- const recentCommits = (() => {
143
+ // Step 6: Tag
144
+ step(6, 'Tag');
145
+ if (!dryRun) {
177
146
  try {
178
- const prevTag = execSync('git describe --tags --abbrev=0 HEAD~5 2>/dev/null || echo "HEAD~10"', { cwd: rootDir, encoding: 'utf-8' }).trim();
179
- return execSync(`git log ${prevTag}..HEAD --oneline`, { cwd: rootDir, encoding: 'utf-8' }).trim();
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
- try { return execSync('git log -10 --oneline', { cwd: rootDir, encoding: 'utf-8' }).trim(); }
182
- catch { return '(could not read commits)'; }
150
+ log(` ⚠`, 'Tag may already exist', YELLOW);
183
151
  }
184
- })();
152
+ }
185
153
 
186
- const tweet = `🎉 xray v${newVersion} is LIVE - {THEME}!
187
- {EMOJI} {feature - consumer benefit}
188
- {EMOJI} {feature - consumer benefit}
189
- {EMOJI} {feature - consumer benefit}
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
- What xray is: {one sentence positioning}
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(`\n📝 Tweet template saved to tweets/v${newVersion}.md — FILL IN THE BLANKS`);
201
- } else {
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('\n❌ Release failed:', error.message);
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: "v3.0.0", termsCount: 68, lastUpdated: new Date().toISOString().split("T")[0] };
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.1",
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)
@@ -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.2.0")
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}`,
@@ -68,7 +68,7 @@ class GovernanceServer {
68
68
  constructor() {
69
69
  this.server = new Server(
70
70
  {
71
- name: "governance", version: "2.2.0",
71
+ name: "governance", version: "2.2.1",
72
72
  },
73
73
  {
74
74
  capabilities: {
@@ -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.2.0",
891
+ version: "2.2.1",
892
892
  description: "Generated API documentation",
893
893
  },
894
894
  servers: [
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.0",
2
+ "version": "2.2.1",
3
3
  "description": "0xRay Community MCPs Registry - curated API-focused MCP servers",
4
4
  "sources": [
5
5
  {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.0",
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.2.0",
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.2.0",
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.2.0"
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.2.0",
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.2.0",
223
+ "version": "2.2.1",
224
224
  "terms": [
225
225
  1,
226
226
  2,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.0",
2
+ "version": "2.2.1",
3
3
  "description": "0xRay Skills Registry - recommended skill sources for consumers",
4
4
  "sources": [
5
5
  {
package/xray/codex.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.0",
2
+ "version": "2.2.1",
3
3
  "lastUpdated": "2026-06-05",
4
4
  "errorPreventionTarget": 0.998,
5
5
  "terms": {
package/xray/config.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "./config.schema.json",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "0xRay Framework - Token Management & Performance Configuration",
5
5
  "token_management": {
6
6
  "maxPromptTokens": 20000,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "./features.schema.json",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "0xRay Framework - Unified Feature Configuration",
5
5
  "token_optimization": {
6
6
  "enabled": true,
@@ -4,19 +4,19 @@
4
4
  "openclaw": {
5
5
  "enabled": false,
6
6
  "type": "external-service",
7
- "version": "2.2.0",
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.2.0",
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.2.0",
19
+ "version": "2.2.1",
20
20
  "config": {}
21
21
  }
22
22
  }
@@ -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();