0xray 2.2.2 → 2.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/.opencode/codex.codex +1 -1
  2. package/.opencode/commands/dependency-audit.md +3 -3
  3. package/.opencode/enforcer-config.json +2 -2
  4. package/README.md +3 -3
  5. package/dist/CHANGELOG.md +66 -0
  6. package/dist/README.md +3 -3
  7. package/dist/analytics/routing-refiner.js +1 -1
  8. package/dist/config/routing-mappings.d.ts +21 -0
  9. package/dist/config/routing-mappings.js +132 -0
  10. package/dist/core/boot-orchestrator.js +2 -2
  11. package/dist/core/features-config.js +1 -1
  12. package/dist/enforcement/enforcer-tools.js +1 -123
  13. package/dist/inference/inference-cycle.js +1 -1
  14. package/dist/mcps/governance.server.js +1 -1
  15. package/dist/mcps/knowledge-skills/skill-invocation.server.js +2 -3
  16. package/dist/mcps/knowledge-skills/tech-writer.server.js +1 -1
  17. package/dist/mcps/registry.json +1 -1
  18. package/dist/skills/registry.json +1 -1
  19. package/dist/tools/assess-complexity-tool.d.ts +28 -0
  20. package/dist/tools/assess-complexity-tool.js +44 -0
  21. package/dist/tools/query-routing-tool.d.ts +17 -0
  22. package/dist/tools/query-routing-tool.js +59 -0
  23. package/package.json +1 -1
  24. package/scripts/node/release.mjs +28 -17
  25. package/scripts/node/universal-version-manager.js +3 -3
  26. package/scripts/node/version-manager.mjs +48 -2
  27. package/src/mcps/governance.server.ts +1 -1
  28. package/src/mcps/knowledge-skills/skill-invocation.server.ts +2 -3
  29. package/src/mcps/knowledge-skills/tech-writer.server.ts +1 -1
  30. package/src/mcps/registry.json +1 -1
  31. package/src/opencode/codex.codex +1 -1
  32. package/src/opencode/commands/dependency-audit.md +3 -3
  33. package/src/opencode/enforcer-config.json +2 -2
  34. package/src/skills/registry.json +1 -1
  35. package/xray/codex.json +1 -1
  36. package/xray/config.json +1 -1
  37. package/xray/features.json +1 -1
  38. package/xray/integrations.json +3 -3
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.1",
2
+ "version": "2.2.2",
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.1",
72
+ "version": "2.2.2",
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.1",
88
+ "version": "2.2.2",
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.1"
95
+ "version": "2.2.2"
96
96
  }
97
97
  },
98
98
  "results": [...]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "framework": "xray 2.0",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
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.1",
223
+ "version": "2.2.2",
224
224
  "terms": [
225
225
  1,
226
226
  2,
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 · 15 MCPs servers · 9 codex terms · ~2,2196 tests
3
+ **v2.2.3** — 41 agents · 44 skills · 15 MCPs servers · 9 codex terms · 160 test files
4
4
 
5
5
  [![Docs](https://img.shields.io/badge/docs-0xRayAI.github.io/xray-10b981?style=flat-square)](https://0xrayai.github.io/xray/)
6
6
 
@@ -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.1",
182
+ "version": "2.2.2",
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,2196 tests** across every subsystem:
280
+ 0xRay is battle-tested with **160 test files** (2,778+ individual tests) across every subsystem:
281
281
 
282
282
  | Suite | Tests | Status |
283
283
  |-------|-------|--------|
package/dist/CHANGELOG.md CHANGED
@@ -4,6 +4,72 @@ 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.4] - 2026-06-10
8
+
9
+ ### 🐛 Bug Fixes
10
+ - fix: Dynamo SSOT local-mode for inference cycles (requireExternalDynamo: !XRAY_LOCAL_MODE to prevent silent needs_revision fallback in dev/CI) (5e0746665)
11
+ - ci: add verify:consumer as hard gate in release.yml before GitHub release (5e0746665)
12
+ - fix: routing cleanup — dedup availableServers list, correct research/explore mapping to "researcher" skill directly (prior + 5e0746665)
13
+ - fix: release.mjs publish timeout handling (npm view check for "already published") and step order (push before publish) (b444b6ac8, b1f9c6cdd)
14
+
15
+ ### 🔄 Changes
16
+ - Scope 2.2.4 to the 5 blocking items only (Dynamo, CI gate, routing hygiene). All Phase 1-4 deferred to v3 per v3-architecture-plan.md.
17
+
18
+ ---
19
+
20
+ ## [2.2.3] - 2026-06-10
21
+
22
+ ### 🔄 Changes
23
+
24
+ ### 🐛 Bug Fixes
25
+ - fix: make hermes E2E tolerant to model response variance; soft-fail Phase 3/6, keep hard gates on bridge + activity.log (a290fb9ec)
26
+ - fix: sync README counts (41 agents, 44 skills, 15 MCPs, 68 codex terms, 160 tfiles); version-manager now auto-counts codex + tests (a783dc2e6)
27
+
28
+ ---
29
+
30
+ ## [2.2.2] - 2026-06-10
31
+
32
+ ### 🔄 Changes
33
+
34
+ ### 🐛 Bug Fixes
35
+ - fix: make hermes E2E tolerant to model response variance; soft-fail Phase 3/6, keep hard gates on bridge + activity.log (a290fb9ec)
36
+ - fix: sync README counts (41 agents, 44 skills, 15 MCPs, 68 codex terms, 160 tfiles); version-manager now auto-counts codex + tests (a783dc2e6)
37
+
38
+ ---
39
+
40
+ ## [2.2.2] - 2026-06-10
41
+
42
+ ### 🔄 Changes
43
+
44
+ ### 🐛 Bug Fixes
45
+ - fix: sync README counts (41 agents, 44 skills, 15 MCPs, 68 codex terms, 160 tfiles); version-manager now auto-counts codex + tests (a783dc2e6)
46
+
47
+ ---
48
+
49
+ ## [2.2.2] - 2026-06-10
50
+
51
+ ### 🔄 Changes
52
+
53
+ - Version bump
54
+
55
+ ---
56
+
57
+ ## [2.2.2] - 2026-06-10
58
+
59
+ ### 🔄 Changes
60
+
61
+ - Version bump
62
+
63
+ ---
64
+
65
+ ## [2.2.2] - 2026-06-10
66
+
67
+ ### 🔄 Changes
68
+
69
+ - Version bump
70
+
71
+ ---
72
+
7
73
  ## [2.2.2] - 2026-06-10
8
74
 
9
75
  ### 🔄 Changes
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 · 15 MCPs servers · 9 codex terms · ~2,2196 tests
3
+ **v2.2.3** — 41 agents · 44 skills · 15 MCPs servers · 9 codex terms · 160 test files
4
4
 
5
5
  [![Docs](https://img.shields.io/badge/docs-0xRayAI.github.io/xray-10b981?style=flat-square)](https://0xrayai.github.io/xray/)
6
6
 
@@ -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.1",
182
+ "version": "2.2.2",
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,2196 tests** across every subsystem:
280
+ 0xRay is battle-tested with **160 test files** (2,778+ individual 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.2.1",
39
+ version: "2.2.2",
40
40
  generatedAt: new Date(),
41
41
  summary: {
42
42
  newMappings: newMappings.length,
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Routing Mappings — Shared keyword→agent+skill lookup table.
3
+ *
4
+ * Extracted from enforcer-tools.ts to be queryable at runtime
5
+ * by the main AI delegation decision tools.
6
+ */
7
+ export interface RoutingMappingEntry {
8
+ keywords: string[];
9
+ skill: string;
10
+ agent: string;
11
+ confidence: number;
12
+ }
13
+ export declare const ROUTING_MAPPINGS: RoutingMappingEntry[];
14
+ export interface RoutingMatch {
15
+ agent: string;
16
+ skill: string;
17
+ confidence: number;
18
+ matchedKeywords: string[];
19
+ }
20
+ export declare function queryRoutingMappings(keywords: string[]): RoutingMatch[];
21
+ export declare function getAllRoutingMappings(): RoutingMappingEntry[];
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Routing Mappings — Shared keyword→agent+skill lookup table.
3
+ *
4
+ * Extracted from enforcer-tools.ts to be queryable at runtime
5
+ * by the main AI delegation decision tools.
6
+ */
7
+ export const ROUTING_MAPPINGS = [
8
+ // Core built-in skills (high confidence)
9
+ { keywords: ["write", "file", "create"], skill: "code-review", agent: "code-reviewer", confidence: 0.9 },
10
+ { keywords: ["review", "audit", "assess", "evaluate", "check", "inspect", "quality", "validate", "code-review"], skill: "code-review", agent: "code-reviewer", confidence: 0.9 },
11
+ { keywords: ["test", "testing", "jest", "coverage", "unit", "e2e", "cypress", "spec", "verify"], skill: "testing-strategy", agent: "testing-lead", confidence: 0.95 },
12
+ { keywords: ["fix", "debug", "triage", "broken", "error", "crash", "bug", "issue", "resolve"], skill: "bug-triage", agent: "bug-triage-specialist", confidence: 0.92 },
13
+ { keywords: ["security", "vulnerability", "threat", "scan", "risk", "exploit", "secure", "pentest"], skill: "security-audit", agent: "security-auditor", confidence: 0.95 },
14
+ { keywords: ["refactor", "cleanup", "improve", "restructure", "modernize", "debt"], skill: "refactoring-strategies", agent: "refactorer", confidence: 0.92 },
15
+ { keywords: ["performance", "optimize", "bottleneck", "benchmark", "profile", "speed"], skill: "performance-optimization", agent: "performance-engineer", confidence: 0.93 },
16
+ { keywords: ["frontend", "react", "vue", "angular", "ui", "ux", "interface", "component"], skill: "frontend-development", agent: "frontend-engineer", confidence: 0.95 },
17
+ { keywords: ["backend", "api", "server", "microservice", "endpoint"], skill: "backend-development", agent: "backend-engineer", confidence: 0.95 },
18
+ { keywords: ["docs", "documentation", "readme", "wiki", "guide", "manual"], skill: "documentation-generation", agent: "tech-writer", confidence: 0.9 },
19
+ { keywords: ["database", "db", "sql", "schema", "migration", "query"], skill: "database-design", agent: "database-engineer", confidence: 0.95 },
20
+ { keywords: ["deploy", "ci/cd", "pipeline", "docker", "kubernetes", "infrastructure"], skill: "devops-deployment", agent: "devops-engineer", confidence: 0.94 },
21
+ { keywords: ["mobile", "ios", "android", "react-native", "flutter"], skill: "mobile-development", agent: "mobile-developer", confidence: 0.95 },
22
+ { keywords: ["enforce", "compliance", "rule", "standard", "codex", "block", "prevent"], skill: "code-review", agent: "code-reviewer", confidence: 0.95 },
23
+ { keywords: ["design", "architect", "plan", "system", "model", "pattern", "architecture"], skill: "architecture-patterns", agent: "architect", confidence: 0.95 },
24
+ { keywords: ["codebase", "explore", "research", "discover", "implementation"], skill: "researcher", agent: "researcher", confidence: 0.92 },
25
+ // Additional built-in skill mappings
26
+ { keywords: ["api", "rest", "graphql", "openapi", "endpoint", "swagger"], skill: "api-design", agent: "backend-engineer", confidence: 0.9 },
27
+ { keywords: ["strategy", "roadmap", "planning", "technical", "decision", "architecture"], skill: "architecture-patterns", agent: "strategist", confidence: 0.88 },
28
+ { keywords: ["reflection", "story", "narrative", "saga", "journey", "document"], skill: "storyteller", agent: "tech-writer", confidence: 0.85 },
29
+ { keywords: ["analyze", "metrics", "complexity", "maintainability", "quality"], skill: "code-analyzer", agent: "code-analyzer", confidence: 0.9 },
30
+ { keywords: ["growth", "marketing", "conversion", "acquisition", "user-acquisition"], skill: "growth-strategist", agent: "growth-strategist", confidence: 0.9 },
31
+ { keywords: ["seo", "search", "organic", "traffic", "keywords", "ranking"], skill: "seo-consultant", agent: "seo-consultant", confidence: 0.92 },
32
+ { keywords: ["content", "copy", "blog", "marketing", "social"], skill: "content-creator", agent: "content-creator", confidence: 0.88 },
33
+ { keywords: ["format", "lint", "prettier", "eslint", "style", "formatting"], skill: "auto-format", agent: "code-reviewer", confidence: 0.85 },
34
+ { keywords: ["project", "structure", "health", "dependencies", "architecture"], skill: "project-analysis", agent: "architect", confidence: 0.88 },
35
+ { keywords: ["compliance", "audit", "standards", "framework", "validation"], skill: "framework-compliance-audit", agent: "code-reviewer", confidence: 0.9 },
36
+ { keywords: ["session", "state", "persistence", "storage", "cache"], skill: "session-management", agent: "backend-engineer", confidence: 0.85 },
37
+ { keywords: ["image", "visual", "pdf", "diagram", "multimedia", "media"], skill: "multimodal-looker", agent: "multimodal-looker", confidence: 0.92 },
38
+ { keywords: ["testing", "strategy", "coverage", "test-plan"], skill: "testing-strategy", agent: "testing-lead", confidence: 0.92 },
39
+ { keywords: ["inference", "model", "llm", "tuning", "optimization"], skill: "inference-improve", agent: "performance-engineer", confidence: 0.88 },
40
+ { keywords: ["orchestrate", "boot", "initialize", "startup", "bootstrap"], skill: "boot-orchestrator", agent: "architect", confidence: 0.9 },
41
+ // Additional unmapped skills
42
+ { keywords: ["tool", "utility", "helper", "instrument"], skill: "architect-tools", agent: "architect", confidence: 0.85 },
43
+ { keywords: ["design", "visual", "style", "theme", "css", "accessibility"], skill: "ui-ux-design", agent: "frontend-ui-ux-engineer", confidence: 0.9 },
44
+ { keywords: ["agent", "multi-agent", "coordination", "hermes", "communication"], skill: "hermes-agent", agent: "architect", confidence: 0.88 },
45
+ { keywords: ["log", "diagnostic", "trace", "monitor", "watch"], skill: "log-monitor", agent: "log-monitor", confidence: 0.9 },
46
+ { keywords: ["health", "diagnostic", "model-health", "validate-llm"], skill: "model-health-check", agent: "performance-engineer", confidence: 0.88 },
47
+ { keywords: ["profiling", "memory", "cpu", "latency"], skill: "performance-analysis", agent: "performance-engineer", confidence: 0.9 },
48
+ { keywords: ["pipeline", "stream", "etl", "batch", "process"], skill: "processor-pipeline", agent: "backend-engineer", confidence: 0.88 },
49
+ { keywords: ["vulnerability", "cve", "sast", "dast", "dependency-check"], skill: "security-scan", agent: "security-auditor", confidence: 0.92 },
50
+ { keywords: ["state", "store", "redux", "context", "persistence"], skill: "state-manager", agent: "backend-engineer", confidence: 0.88 },
51
+ // Community Skills (optional, lower confidence)
52
+ { keywords: ["theme", "design-system", "color", "font", "typography", "palette"], skill: "antigravity--theme-factory", agent: "frontend-ui-ux-engineer", confidence: 0.6 },
53
+ { keywords: ["hig", "salesforce design", "lightning design", "slds"], skill: "antigravity--hig-components-system", agent: "frontend-ui-ux-engineer", confidence: 0.65 },
54
+ { keywords: ["slide", "deck", "presentation", "powerpoint"], skill: "antigravity--theme-factory", agent: "content-creator", confidence: 0.55 },
55
+ { keywords: ["seo technical", "crawl", "indexability", "core web vitals", "sitemap"], skill: "antigravity--seo-technical", agent: "seo-consultant", confidence: 0.7 },
56
+ { keywords: ["seo structure", "content hierarchy", "schema", "internal linking"], skill: "antigravity--seo-structure-architect", agent: "seo-consultant", confidence: 0.7 },
57
+ { keywords: ["seo snippet", "meta description", "title tag"], skill: "antigravity--seo-snippet-hunter", agent: "seo-consultant", confidence: 0.7 },
58
+ { keywords: ["seo hreflang", "international seo", "multilingual"], skill: "antigravity--seo-hreflang", agent: "seo-consultant", confidence: 0.65 },
59
+ { keywords: ["backend security", "secure coding", "input validation", "authentication"], skill: "antigravity--backend-security-coder", agent: "security-auditor", confidence: 0.7 },
60
+ { keywords: ["mobile security", "ios security", "android security"], skill: "antigravity--mobile-security-coder", agent: "security-auditor", confidence: 0.65 },
61
+ { keywords: ["security audit", "vulnerability assessment", "penetration test"], skill: "security-audit", agent: "security-auditor", confidence: 0.75 },
62
+ { keywords: ["vector", "embeddings", "similarity search", "pinecone", "qdrant", "chroma"], skill: "antigravity--vector-database-engineer", agent: "database-engineer", confidence: 0.65 },
63
+ { keywords: ["similarity search", "approximate nearest neighbor"], skill: "antigravity--similarity-search-patterns", agent: "database-engineer", confidence: 0.65 },
64
+ { keywords: ["svelte", "sveltekit", "svelte.js"], skill: "antigravity--sveltekit", agent: "frontend-engineer", confidence: 0.65 },
65
+ { keywords: ["trpc", "typescript rpc", "tRPC"], skill: "antigravity--trpc-fullstack", agent: "backend-engineer", confidence: 0.65 },
66
+ { keywords: ["vercel ai", "ai sdk", "vapi"], skill: "antigravity--vercel-ai-sdk-expert", agent: "backend-engineer", confidence: 0.65 },
67
+ { keywords: ["threejs", "3d web", "webgl", "3d graphics"], skill: "antigravity--threejs-loaders", agent: "frontend-engineer", confidence: 0.6 },
68
+ { keywords: ["comfyui", "ai image generation", "stable diffusion"], skill: "antigravity--comfyui-gateway", agent: "multimodal-looker", confidence: 0.6 },
69
+ { keywords: ["swiftui", "ios development"], skill: "antigravity--swiftui-liquid-glass", agent: "mobile-developer", confidence: 0.7 },
70
+ { keywords: ["ios performance", "swift optimization"], skill: "antigravity--swiftui-performance-audit", agent: "mobile-developer", confidence: 0.65 },
71
+ { keywords: ["react native", "rn"], skill: "mobile-development", agent: "mobile-developer", confidence: 0.7 },
72
+ { keywords: ["golang", "go", "gopher"], skill: "antigravity--golang-pro", agent: "backend-engineer", confidence: 0.65 },
73
+ { keywords: ["temporal", "workflow", " durable execution"], skill: "antigravity--temporal-golang-pro", agent: "backend-engineer", confidence: 0.65 },
74
+ { keywords: ["python async", "asyncio", "uvloop"], skill: "antigravity--async-python-patterns", agent: "backend-engineer", confidence: 0.65 },
75
+ { keywords: ["pydantic", "data validation", "python models"], skill: "antigravity--pydantic-models-py", agent: "backend-engineer", confidence: 0.65 },
76
+ { keywords: ["scala", "spark", "big data"], skill: "antigravity--scala-pro", agent: "backend-engineer", confidence: 0.6 },
77
+ { keywords: ["dotnet", "c#", ".net"], skill: "antigravity--dotnet-backend-patterns", agent: "backend-engineer", confidence: 0.6 },
78
+ { keywords: ["azure", "azd", "azure deploy"], skill: "antigravity--azd-deployment", agent: "devops-engineer", confidence: 0.65 },
79
+ { keywords: ["azure storage", "file share"], skill: "antigravity--azure-storage-file-share-ts", agent: "devops-engineer", confidence: 0.6 },
80
+ { keywords: ["azure service bus", "messaging"], skill: "antigravity--azure-servicebus-py", agent: "devops-engineer", confidence: 0.6 },
81
+ { keywords: ["discord bot", "discord automation"], skill: "antigravity--discord-bot-architect", agent: "backend-engineer", confidence: 0.6 },
82
+ { keywords: ["n8n", "workflow automation"], skill: "antigravity--n8n-expression-syntax", agent: "devops-engineer", confidence: 0.6 },
83
+ { keywords: ["linkedin automation", "social posting"], skill: "antigravity--linkedin-automation", agent: "growth-strategist", confidence: 0.55 },
84
+ { keywords: ["reddit automation"], skill: "antigravity--reddit-automation", agent: "growth-strategist", confidence: 0.55 },
85
+ { keywords: ["freshdesk", "customer support automation"], skill: "antigravity--freshdesk-automation", agent: "devops-engineer", confidence: 0.55 },
86
+ { keywords: ["pagerduty", "incident management"], skill: "antigravity--pagerduty-automation", agent: "devops-engineer", confidence: 0.55 },
87
+ { keywords: ["local llm", "ollama", "llama", "local model"], skill: "antigravity--local-llm-expert", agent: "performance-engineer", confidence: 0.65 },
88
+ { keywords: ["mcp", "model context protocol"], skill: "antigravity--agent-memory-mcp", agent: "architect", confidence: 0.65 },
89
+ { keywords: ["agent evaluation", "agent testing"], skill: "antigravity--agent-evaluation", agent: "testing-lead", confidence: 0.65 },
90
+ { keywords: ["ai agent", "autonomous agent"], skill: "antigravity--ai-agent-development", agent: "backend-engineer", confidence: 0.65 },
91
+ { keywords: ["marketing content", "ad creative", "campaign"], skill: "antigravity--marketing-ideas", agent: "content-creator", confidence: 0.6 },
92
+ { keywords: ["conversion", "cro", "optimization"], skill: "antigravity--onboarding-cro", agent: "growth-strategist", confidence: 0.6 },
93
+ { keywords: ["code documentation", "code explain", "explain code"], skill: "antigravity--code-documentation-code-explain", agent: "tech-writer", confidence: 0.65 },
94
+ { keywords: ["code refactoring", "clean code"], skill: "antigravity--code-refactoring-refactor-clean", agent: "refactorer", confidence: 0.65 },
95
+ { keywords: ["code review checklist"], skill: "antigravity--code-review-checklist", agent: "code-reviewer", confidence: 0.7 },
96
+ { keywords: ["microservices", "service mesh", "distributed systems"], skill: "antigravity--microservices-patterns", agent: "architect", confidence: 0.65 },
97
+ { keywords: ["architecture decision", "adr", "decision records"], skill: "antigravity--architecture-decision-records", agent: "architect", confidence: 0.65 },
98
+ { keywords: ["context management", "context compression", "token optimization"], skill: "antigravity--context-compression", agent: "performance-engineer", confidence: 0.65 },
99
+ { keywords: ["context guardian", "memory safety"], skill: "antigravity--context-guardian", agent: "performance-engineer", confidence: 0.6 },
100
+ { keywords: ["context fundamentals"], skill: "antigravity--context-fundamentals", agent: "performance-engineer", confidence: 0.6 },
101
+ { keywords: ["interview", "technical interview", "coding interview"], skill: "antigravity--interview-coach", agent: "growth-strategist", confidence: 0.6 },
102
+ { keywords: ["i18n", "localization", "translation"], skill: "antigravity--i18n-localization", agent: "frontend-engineer", confidence: 0.6 },
103
+ { keywords: ["accessibility", "a11y", "wcag"], skill: "antigravity--accessibility-compliance-accessibility-audit", agent: "frontend-ui-ux-engineer", confidence: 0.7 },
104
+ { keywords: ["pwa", "progressive web app"], skill: "antigravity--progressive-web-app", agent: "frontend-engineer", confidence: 0.6 },
105
+ { keywords: ["data migration", "sql migration"], skill: "antigravity--database-migrations-sql-migrations", agent: "database-engineer", confidence: 0.65 },
106
+ { keywords: ["request code review", "pr review", "pull request"], skill: "superpowers--requesting-code-review", agent: "code-reviewer", confidence: 0.7 },
107
+ ];
108
+ export function queryRoutingMappings(keywords) {
109
+ const descLower = keywords.join(" ").toLowerCase();
110
+ const matches = [];
111
+ for (const mapping of ROUTING_MAPPINGS) {
112
+ const matched = [];
113
+ for (const kw of mapping.keywords) {
114
+ if (descLower.includes(kw.toLowerCase())) {
115
+ matched.push(kw);
116
+ }
117
+ }
118
+ if (matched.length > 0) {
119
+ matches.push({
120
+ agent: mapping.agent,
121
+ skill: mapping.skill,
122
+ confidence: mapping.confidence,
123
+ matchedKeywords: matched,
124
+ });
125
+ }
126
+ }
127
+ matches.sort((a, b) => b.confidence - a.confidence);
128
+ return matches;
129
+ }
130
+ export function getAllRoutingMappings() {
131
+ return ROUTING_MAPPINGS;
132
+ }
@@ -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.1",
720
+ version: "2.2.2",
721
721
  codex_enabled: true,
722
- codex_version: "v2.2.0",
722
+ codex_version: "v2.2.1",
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.1",
289
+ version: "2.2.2",
290
290
  description: "0xRay Framework - Unified Feature Configuration",
291
291
  token_optimization: {
292
292
  enabled: true,
@@ -7,135 +7,13 @@ import { frameworkLogger } from "../core/framework-logger.js";
7
7
  import { AgentDelegator } from "../delegation/agent-delegator.js";
8
8
  import { XrayStateManager } from "../state/state-manager.js";
9
9
  import { strRayConfigLoader } from "../core/config-loader.js";
10
+ import { ROUTING_MAPPINGS } from "../config/routing-mappings.js";
10
11
  import * as fs from "fs";
11
12
  import * as path from "path";
12
13
  // Minimum confidence to auto-delegate to another agent
13
14
  const DELEGATION_CONFIDENCE_THRESHOLD = 0.50;
14
15
  // Agents that enforcer should NOT delegate to (enforcer handles these itself)
15
16
  const ENFORCER_HANDLES = new Set(["code-reviewer"]);
16
- // Community skills are OPTIONAL - they may not be installed
17
- // These mappings have lower confidence (0.55-0.7) since skills may not be available
18
- // The system will fall back gracefully if the skill isn't installed
19
- const ROUTING_MAPPINGS = [
20
- // Core built-in skills (high confidence)
21
- { keywords: ["write", "file", "create"], skill: "code-review", agent: "code-reviewer", confidence: 0.9 },
22
- { keywords: ["review", "audit", "assess", "evaluate", "check", "inspect", "quality", "validate", "code-review"], skill: "code-review", agent: "code-reviewer", confidence: 0.9 },
23
- { keywords: ["test", "testing", "jest", "coverage", "unit", "e2e", "cypress", "spec", "verify"], skill: "testing-strategy", agent: "testing-lead", confidence: 0.95 },
24
- { keywords: ["fix", "debug", "triage", "broken", "error", "crash", "bug", "issue", "resolve"], skill: "bug-triage", agent: "bug-triage-specialist", confidence: 0.92 },
25
- { keywords: ["security", "vulnerability", "threat", "scan", "risk", "exploit", "secure", "pentest"], skill: "security-audit", agent: "security-auditor", confidence: 0.95 },
26
- { keywords: ["refactor", "cleanup", "improve", "restructure", "modernize", "debt"], skill: "refactoring-strategies", agent: "refactorer", confidence: 0.92 },
27
- { keywords: ["performance", "optimize", "bottleneck", "benchmark", "profile", "speed"], skill: "performance-optimization", agent: "performance-engineer", confidence: 0.93 },
28
- { keywords: ["frontend", "react", "vue", "angular", "ui", "ux", "interface", "component"], skill: "frontend-development", agent: "frontend-engineer", confidence: 0.95 },
29
- { keywords: ["backend", "api", "server", "microservice", "endpoint"], skill: "backend-development", agent: "backend-engineer", confidence: 0.95 },
30
- { keywords: ["docs", "documentation", "readme", "wiki", "guide", "manual"], skill: "documentation-generation", agent: "tech-writer", confidence: 0.9 },
31
- { keywords: ["database", "db", "sql", "schema", "migration", "query"], skill: "database-design", agent: "database-engineer", confidence: 0.95 },
32
- { keywords: ["deploy", "ci/cd", "pipeline", "docker", "kubernetes", "infrastructure"], skill: "devops-deployment", agent: "devops-engineer", confidence: 0.94 },
33
- { keywords: ["mobile", "ios", "android", "react-native", "flutter"], skill: "mobile-development", agent: "mobile-developer", confidence: 0.95 },
34
- { keywords: ["enforce", "compliance", "rule", "standard", "codex", "block", "prevent"], skill: "code-review", agent: "code-reviewer", confidence: 0.95 },
35
- { keywords: ["design", "architect", "plan", "system", "model", "pattern", "architecture"], skill: "architecture-patterns", agent: "architect", confidence: 0.95 },
36
- { keywords: ["codebase", "explore", "research", "discover", "implementation"], skill: "git-workflow", agent: "researcher", confidence: 0.88 },
37
- // Additional built-in skill mappings
38
- { keywords: ["api", "rest", "graphql", "openapi", "endpoint", "swagger"], skill: "api-design", agent: "backend-engineer", confidence: 0.9 },
39
- { keywords: ["strategy", "roadmap", "planning", "technical", "decision", "architecture"], skill: "architecture-patterns", agent: "strategist", confidence: 0.88 },
40
- { keywords: ["reflection", "story", "narrative", "saga", "journey", "document"], skill: "storyteller", agent: "tech-writer", confidence: 0.85 },
41
- { keywords: ["analyze", "metrics", "complexity", "maintainability", "quality"], skill: "code-analyzer", agent: "code-analyzer", confidence: 0.9 },
42
- { keywords: ["growth", "marketing", "conversion", "acquisition", "user-acquisition"], skill: "growth-strategist", agent: "growth-strategist", confidence: 0.9 },
43
- { keywords: ["seo", "search", "organic", "traffic", "keywords", "ranking"], skill: "seo-consultant", agent: "seo-consultant", confidence: 0.92 },
44
- { keywords: ["content", "copy", "blog", "marketing", "social"], skill: "content-creator", agent: "content-creator", confidence: 0.88 },
45
- { keywords: ["format", "lint", "prettier", "eslint", "style", "formatting"], skill: "auto-format", agent: "code-reviewer", confidence: 0.85 },
46
- { keywords: ["project", "structure", "health", "dependencies", "architecture"], skill: "project-analysis", agent: "architect", confidence: 0.88 },
47
- { keywords: ["compliance", "audit", "standards", "framework", "validation"], skill: "framework-compliance-audit", agent: "code-reviewer", confidence: 0.9 },
48
- { keywords: ["session", "state", "persistence", "storage", "cache"], skill: "session-management", agent: "backend-engineer", confidence: 0.85 },
49
- { keywords: ["image", "visual", "pdf", "diagram", "multimedia", "media"], skill: "multimodal-looker", agent: "multimodal-looker", confidence: 0.92 },
50
- { keywords: ["testing", "strategy", "coverage", "test-plan"], skill: "testing-strategy", agent: "testing-lead", confidence: 0.92 },
51
- { keywords: ["inference", "model", "llm", "tuning", "optimization"], skill: "inference-improve", agent: "performance-engineer", confidence: 0.88 },
52
- { keywords: ["orchestrate", "boot", "initialize", "startup", "bootstrap"], skill: "boot-orchestrator", agent: "architect", confidence: 0.9 },
53
- // Additional unmapped skills
54
- { keywords: ["tool", "utility", "helper", "instrument"], skill: "architect-tools", agent: "architect", confidence: 0.85 },
55
- { keywords: ["design", "visual", "style", "theme", "css", "accessibility"], skill: "ui-ux-design", agent: "frontend-ui-ux-engineer", confidence: 0.9 },
56
- { keywords: ["agent", "multi-agent", "coordination", "hermes", "communication"], skill: "hermes-agent", agent: "architect", confidence: 0.88 },
57
- { keywords: ["log", "diagnostic", "trace", "monitor", "watch"], skill: "log-monitor", agent: "log-monitor", confidence: 0.9 },
58
- { keywords: ["health", "diagnostic", "model-health", "validate-llm"], skill: "model-health-check", agent: "performance-engineer", confidence: 0.88 },
59
- { keywords: ["analyze", "profiling", "memory", "cpu", "latency"], skill: "performance-analysis", agent: "performance-engineer", confidence: 0.9 },
60
- { keywords: ["pipeline", "stream", "etl", "batch", "process"], skill: "processor-pipeline", agent: "backend-engineer", confidence: 0.88 },
61
- { keywords: ["vulnerability", "cve", "sast", "dast", "dependency-check"], skill: "security-scan", agent: "security-auditor", confidence: 0.92 },
62
- { keywords: ["state", "store", "redux", "context", "persistence"], skill: "state-manager", agent: "backend-engineer", confidence: 0.88 },
63
- // ============================================================
64
- // Community Skills (optional, lower confidence)
65
- // These skills are from antigravity and may not be installed
66
- // ============================================================
67
- // UI/UX Design & Themes (antigravity)
68
- { keywords: ["theme", "design-system", "color", "font", "typography", "palette"], skill: "antigravity--theme-factory", agent: "frontend-ui-ux-engineer", confidence: 0.6 },
69
- { keywords: ["hig", "salesforce design", "lightning design", "slds"], skill: "antigravity--hig-components-system", agent: "frontend-ui-ux-engineer", confidence: 0.65 },
70
- { keywords: ["slide", "deck", "presentation", "powerpoint"], skill: "antigravity--theme-factory", agent: "content-creator", confidence: 0.55 },
71
- // SEO (antigravity)
72
- { keywords: ["seo technical", "crawl", "indexability", "core web vitals", "sitemap"], skill: "antigravity--seo-technical", agent: "seo-consultant", confidence: 0.7 },
73
- { keywords: ["seo structure", "content hierarchy", "schema", "internal linking"], skill: "antigravity--seo-structure-architect", agent: "seo-consultant", confidence: 0.7 },
74
- { keywords: ["seo snippet", "meta description", "title tag"], skill: "antigravity--seo-snippet-hunter", agent: "seo-consultant", confidence: 0.7 },
75
- { keywords: ["seo hreflang", "international seo", "multilingual"], skill: "antigravity--seo-hreflang", agent: "seo-consultant", confidence: 0.65 },
76
- // Security (antigravity)
77
- { keywords: ["backend security", "secure coding", "input validation", "authentication"], skill: "antigravity--backend-security-coder", agent: "security-auditor", confidence: 0.7 },
78
- { keywords: ["mobile security", "ios security", "android security"], skill: "antigravity--mobile-security-coder", agent: "security-auditor", confidence: 0.65 },
79
- { keywords: ["security audit", "vulnerability assessment", "penetration test"], skill: "security-audit", agent: "security-auditor", confidence: 0.75 },
80
- // Vector/AI Databases (antigravity)
81
- { keywords: ["vector", "embeddings", "similarity search", "pinecone", "qdrant", "chroma"], skill: "antigravity--vector-database-engineer", agent: "database-engineer", confidence: 0.65 },
82
- { keywords: ["similarity search", "approximate nearest neighbor"], skill: "antigravity--similarity-search-patterns", agent: "database-engineer", confidence: 0.65 },
83
- // Frameworks & Libraries (antigravity)
84
- { keywords: ["svelte", "sveltekit", "svelte.js"], skill: "antigravity--sveltekit", agent: "frontend-engineer", confidence: 0.65 },
85
- { keywords: ["trpc", "typescript rpc", "tRPC"], skill: "antigravity--trpc-fullstack", agent: "backend-engineer", confidence: 0.65 },
86
- { keywords: ["vercel ai", "ai sdk", "vapi"], skill: "antigravity--vercel-ai-sdk-expert", agent: "backend-engineer", confidence: 0.65 },
87
- { keywords: ["threejs", "3d web", "webgl", "3d graphics"], skill: "antigravity--threejs-loaders", agent: "frontend-engineer", confidence: 0.6 },
88
- { keywords: ["comfyui", "ai image generation", "stable diffusion"], skill: "antigravity--comfyui-gateway", agent: "multimodal-looker", confidence: 0.6 },
89
- // Mobile (antigravity)
90
- { keywords: ["swiftui", "ios development"], skill: "antigravity--swiftui-liquid-glass", agent: "mobile-developer", confidence: 0.7 },
91
- { keywords: ["ios performance", "swift optimization"], skill: "antigravity--swiftui-performance-audit", agent: "mobile-developer", confidence: 0.65 },
92
- { keywords: ["react native", "rn"], skill: "mobile-development", agent: "mobile-developer", confidence: 0.7 },
93
- // Backend/Golang (antigravity)
94
- { keywords: ["golang", "go", "gopher"], skill: "antigravity--golang-pro", agent: "backend-engineer", confidence: 0.65 },
95
- { keywords: ["temporal", "workflow", " durable execution"], skill: "antigravity--temporal-golang-pro", agent: "backend-engineer", confidence: 0.65 },
96
- { keywords: ["python async", "asyncio", "uvloop"], skill: "antigravity--async-python-patterns", agent: "backend-engineer", confidence: 0.65 },
97
- { keywords: ["pydantic", "data validation", "python models"], skill: "antigravity--pydantic-models-py", agent: "backend-engineer", confidence: 0.65 },
98
- { keywords: ["scala", "spark", "big data"], skill: "antigravity--scala-pro", agent: "backend-engineer", confidence: 0.6 },
99
- { keywords: ["dotnet", "c#", ".net"], skill: "antigravity--dotnet-backend-patterns", agent: "backend-engineer", confidence: 0.6 },
100
- // Cloud/Azure (antigravity)
101
- { keywords: ["azure", "azd", "azure deploy"], skill: "antigravity--azd-deployment", agent: "devops-engineer", confidence: 0.65 },
102
- { keywords: ["azure storage", "file share"], skill: "antigravity--azure-storage-file-share-ts", agent: "devops-engineer", confidence: 0.6 },
103
- { keywords: ["azure service bus", "messaging"], skill: "antigravity--azure-servicebus-py", agent: "devops-engineer", confidence: 0.6 },
104
- // Automation/Bots (antigravity)
105
- { keywords: ["discord bot", "discord automation"], skill: "antigravity--discord-bot-architect", agent: "backend-engineer", confidence: 0.6 },
106
- { keywords: ["n8n", "workflow automation"], skill: "antigravity--n8n-expression-syntax", agent: "devops-engineer", confidence: 0.6 },
107
- { keywords: ["linkedin automation", "social posting"], skill: "antigravity--linkedin-automation", agent: "growth-strategist", confidence: 0.55 },
108
- { keywords: ["reddit automation"], skill: "antigravity--reddit-automation", agent: "growth-strategist", confidence: 0.55 },
109
- { keywords: ["freshdesk", "customer support automation"], skill: "antigravity--freshdesk-automation", agent: "devops-engineer", confidence: 0.55 },
110
- { keywords: ["pagerduty", "incident management"], skill: "antigravity--pagerduty-automation", agent: "devops-engineer", confidence: 0.55 },
111
- // AI/ML (antigravity)
112
- { keywords: ["local llm", "ollama", "llama", "local model"], skill: "antigravity--local-llm-expert", agent: "performance-engineer", confidence: 0.65 },
113
- { keywords: ["agent", "mcp", "model context protocol"], skill: "antigravity--agent-memory-mcp", agent: "architect", confidence: 0.65 },
114
- { keywords: ["agent evaluation", "agent testing"], skill: "antigravity--agent-evaluation", agent: "testing-lead", confidence: 0.65 },
115
- { keywords: ["ai agent", "autonomous agent"], skill: "antigravity--ai-agent-development", agent: "backend-engineer", confidence: 0.65 },
116
- // Content/Marketing (antigravity)
117
- { keywords: ["marketing content", "ad creative", "campaign"], skill: "antigravity--marketing-ideas", agent: "content-creator", confidence: 0.6 },
118
- { keywords: ["conversion", "cro", "optimization"], skill: "antigravity--onboarding-cro", agent: "growth-strategist", confidence: 0.6 },
119
- // Documentation & Code Quality (antigravity)
120
- { keywords: ["code documentation", "code explain", "explain code"], skill: "antigravity--code-documentation-code-explain", agent: "tech-writer", confidence: 0.65 },
121
- { keywords: ["code refactoring", "clean code"], skill: "antigravity--code-refactoring-refactor-clean", agent: "refactorer", confidence: 0.65 },
122
- { keywords: ["code review checklist"], skill: "antigravity--code-review-checklist", agent: "code-reviewer", confidence: 0.7 },
123
- // Microservices & Architecture (antigravity)
124
- { keywords: ["microservices", "service mesh", "distributed systems"], skill: "antigravity--microservices-patterns", agent: "architect", confidence: 0.65 },
125
- { keywords: ["architecture decision", "adr", "decision records"], skill: "antigravity--architecture-decision-records", agent: "architect", confidence: 0.65 },
126
- // Context/Memory Management (antigravity)
127
- { keywords: ["context management", "context compression", "token optimization"], skill: "antigravity--context-compression", agent: "performance-engineer", confidence: 0.65 },
128
- { keywords: ["context guardian", "memory safety"], skill: "antigravity--context-guardian", agent: "performance-engineer", confidence: 0.6 },
129
- { keywords: ["context fundamentals"], skill: "antigravity--context-fundamentals", agent: "performance-engineer", confidence: 0.6 },
130
- // Specialized Skills
131
- { keywords: ["interview", "technical interview", "coding interview"], skill: "antigravity--interview-coach", agent: "growth-strategist", confidence: 0.6 },
132
- { keywords: ["i18n", "localization", "translation"], skill: "antigravity--i18n-localization", agent: "frontend-engineer", confidence: 0.6 },
133
- { keywords: ["accessibility", "a11y", "wcag"], skill: "antigravity--accessibility-compliance-accessibility-audit", agent: "frontend-ui-ux-engineer", confidence: 0.7 },
134
- { keywords: ["pwa", "progressive web app"], skill: "antigravity--progressive-web-app", agent: "frontend-engineer", confidence: 0.6 },
135
- { keywords: ["data migration", "sql migration"], skill: "antigravity--database-migrations-sql-migrations", agent: "database-engineer", confidence: 0.65 },
136
- // Requesting Code Review (superpowers)
137
- { keywords: ["request code review", "pr review", "pull request"], skill: "superpowers--requesting-code-review", agent: "code-reviewer", confidence: 0.7 },
138
- ];
139
17
  export function getTaskRoutingRecommendation(taskDescription) {
140
18
  const desc = taskDescription.toLowerCase();
141
19
  for (const mapping of ROUTING_MAPPINGS) {
@@ -524,7 +524,7 @@ Respond with EXACTLY one of:
524
524
  source: 'inference-cycle',
525
525
  },
526
526
  options: {
527
- requireExternalDynamo: true,
527
+ requireExternalDynamo: !process.env.XRAY_LOCAL_MODE,
528
528
  },
529
529
  };
530
530
  return handleGovernRequest(governanceRequest);
@@ -29,7 +29,7 @@ class GovernanceServer {
29
29
  server;
30
30
  constructor() {
31
31
  this.server = new Server({
32
- name: "governance", version: "2.2.1",
32
+ name: "governance", version: "2.2.2",
33
33
  }, {
34
34
  capabilities: {
35
35
  tools: {},
@@ -293,9 +293,8 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
293
293
  "code-review", "security-audit", "performance-optimization",
294
294
  "testing-strategy", "researcher", "skill-invocation",
295
295
  "framework-help", "session-management", "code-analyzer",
296
- "code-reviewer", "architect", "researcher",
297
- "architect", "bug-triage-specialist", "log-monitor",
298
- "code-reviewer", "security-auditor", "refactorer",
296
+ "code-reviewer", "architect", "bug-triage-specialist", "log-monitor",
297
+ "security-auditor", "refactorer",
299
298
  "growth-strategist", "strategist", "devops-deployment",
300
299
  "database-design", "tech-writer", "documentation-generation",
301
300
  "mobile-development", "seo-consultant",
@@ -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.1",
598
+ version: "2.2.2",
599
599
  description: "Generated API documentation",
600
600
  },
601
601
  servers: [
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.1",
2
+ "version": "2.2.2",
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.1",
2
+ "version": "2.2.2",
3
3
  "description": "0xRay Skills Registry - recommended skill sources for consumers",
4
4
  "sources": [
5
5
  {
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Assess Complexity Tool
3
+ *
4
+ * Wraps ComplexityAnalyzer so the main AI can query task complexity
5
+ * and decide whether to delegate to subagents.
6
+ *
7
+ * Exposes:
8
+ * - assessComplexity() — full analysis returning score, level, strategy, agents
9
+ * - simple assess() helper for quick threshold checks
10
+ */
11
+ export interface AssessmentInput {
12
+ taskDescription: string;
13
+ files?: string[];
14
+ dependencies?: string[];
15
+ changeVolume?: number;
16
+ riskLevel?: "low" | "medium" | "high" | "critical";
17
+ estimatedDuration?: number;
18
+ }
19
+ export interface AssessmentResult {
20
+ score: number;
21
+ level: "simple" | "moderate" | "complex" | "enterprise";
22
+ strategy: "single-agent" | "multi-agent" | "orchestrator-led";
23
+ estimatedAgents: number;
24
+ reasoning: string[];
25
+ }
26
+ export declare function assessComplexity(input: AssessmentInput): AssessmentResult;
27
+ export declare function shouldDelegate(input: AssessmentInput): boolean;
28
+ export declare function getDelegationStrategy(input: AssessmentInput): AssessmentResult;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Assess Complexity Tool
3
+ *
4
+ * Wraps ComplexityAnalyzer so the main AI can query task complexity
5
+ * and decide whether to delegate to subagents.
6
+ *
7
+ * Exposes:
8
+ * - assessComplexity() — full analysis returning score, level, strategy, agents
9
+ * - simple assess() helper for quick threshold checks
10
+ */
11
+ import { getComplexityAnalyzer, } from "../delegation/complexity-analyzer.js";
12
+ import { frameworkLogger } from "../core/framework-logger.js";
13
+ const analyzer = getComplexityAnalyzer();
14
+ export function assessComplexity(input) {
15
+ const metrics = analyzer.analyzeComplexity(input.taskDescription, {
16
+ files: input.files ?? [],
17
+ dependencies: input.dependencies ?? [],
18
+ changeVolume: input.changeVolume ?? 0,
19
+ riskLevel: input.riskLevel ?? "low",
20
+ estimatedDuration: input.estimatedDuration ?? 30,
21
+ });
22
+ const score = analyzer.calculateComplexityScore(metrics);
23
+ frameworkLogger.log("assess-complexity-tool", "assessment-complete", "info", {
24
+ taskDescription: input.taskDescription.substring(0, 80),
25
+ score: score.score,
26
+ level: score.level,
27
+ strategy: score.recommendedStrategy,
28
+ estimatedAgents: score.estimatedAgents,
29
+ });
30
+ return {
31
+ score: score.score,
32
+ level: score.level,
33
+ strategy: score.recommendedStrategy,
34
+ estimatedAgents: score.estimatedAgents,
35
+ reasoning: score.reasoning,
36
+ };
37
+ }
38
+ export function shouldDelegate(input) {
39
+ const result = assessComplexity(input);
40
+ return result.score > 15;
41
+ }
42
+ export function getDelegationStrategy(input) {
43
+ return assessComplexity(input);
44
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Query Routing Tool
3
+ *
4
+ * Lets the main AI discover which agent/skill best matches a task.
5
+ * Combines ROUTING_MAPPINGS keyword lookup with AGENT_REGISTRY metadata.
6
+ */
7
+ export interface AgentRoutingDetail {
8
+ agent: string;
9
+ skill: string;
10
+ confidence: number;
11
+ matchedKeywords: string[];
12
+ description: string | undefined;
13
+ capabilities: string[];
14
+ expertise: string | undefined;
15
+ }
16
+ export declare function queryRouting(keywords: string[]): AgentRoutingDetail[];
17
+ export declare function listAllRoutes(): AgentRoutingDetail[];
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Query Routing Tool
3
+ *
4
+ * Lets the main AI discover which agent/skill best matches a task.
5
+ * Combines ROUTING_MAPPINGS keyword lookup with AGENT_REGISTRY metadata.
6
+ */
7
+ import { queryRoutingMappings, getAllRoutingMappings, } from "../config/routing-mappings.js";
8
+ import { getAgentEntry, getAgentCapabilities, } from "../agents/registry.js";
9
+ import { frameworkLogger } from "../core/framework-logger.js";
10
+ export function queryRouting(keywords) {
11
+ const matches = queryRoutingMappings(keywords);
12
+ const enriched = matches.map((m) => {
13
+ const entry = getAgentEntry(m.agent);
14
+ return {
15
+ agent: m.agent,
16
+ skill: m.skill,
17
+ confidence: m.confidence,
18
+ matchedKeywords: m.matchedKeywords,
19
+ description: entry?.description,
20
+ capabilities: entry
21
+ ? entry.capabilities
22
+ : getAgentCapabilities(m.agent),
23
+ expertise: entry?.expertise,
24
+ };
25
+ });
26
+ frameworkLogger.log("query-routing-tool", "query-complete", "info", {
27
+ keywords,
28
+ matchCount: enriched.length,
29
+ topMatch: enriched[0]
30
+ ? { agent: enriched[0].agent, confidence: enriched[0].confidence }
31
+ : null,
32
+ });
33
+ return enriched;
34
+ }
35
+ export function listAllRoutes() {
36
+ const all = getAllRoutingMappings();
37
+ const seen = new Set();
38
+ const unique = [];
39
+ for (const mapping of all) {
40
+ const key = `${mapping.agent}:${mapping.skill}`;
41
+ if (seen.has(key))
42
+ continue;
43
+ seen.add(key);
44
+ const entry = getAgentEntry(mapping.agent);
45
+ unique.push({
46
+ agent: mapping.agent,
47
+ skill: mapping.skill,
48
+ confidence: mapping.confidence,
49
+ matchedKeywords: mapping.keywords,
50
+ description: entry?.description,
51
+ capabilities: entry
52
+ ? entry.capabilities
53
+ : getAgentCapabilities(mapping.agent),
54
+ expertise: entry?.expertise,
55
+ });
56
+ }
57
+ unique.sort((a, b) => b.confidence - a.confidence);
58
+ return unique;
59
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "0xray",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "description": "Multi-agent orchestration and Codex governance for OpenCode, Hermes, Grok Build, and OpenClaw",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -8,9 +8,10 @@
8
8
  * 2. npm version (bumps package.json, triggers preversion → version scripts)
9
9
  * 3. Build
10
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
11
+ * 5. Commit
12
+ * 6. Tag
13
+ * 7. Push commit + tag to remote
14
+ * 8. npm publish (triggers prepublishOnly → prepare-consumer + build)
14
15
  *
15
16
  * Usage:
16
17
  * npm run release:patch # patch bump (default)
@@ -151,26 +152,36 @@ async function main() {
151
152
  }
152
153
  }
153
154
 
154
- // Step 7: Publish (prepublishOnly runs prepare-consumer + build)
155
- step(7, 'Publish to npm');
155
+ // Step 7: Push (git state before registry)
156
+ step(7, 'Push to remote');
156
157
  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
- }
158
+ if (!run('git push', 'Push commits')) process.exit(1);
159
+ if (!run(`git push origin v${newVersion}`, 'Push tag')) process.exit(1);
163
160
  } else {
164
- log(` ~`, 'Would publish: npm publish --access public', YELLOW);
161
+ log(` ~`, 'Would push commits + tag', YELLOW);
165
162
  }
166
163
 
167
- // Step 8: Push
168
- step(8, 'Push to remote');
164
+ // Step 8: Publish (prepublishOnly runs prepare-consumer + build)
165
+ step(8, 'Publish to npm');
169
166
  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);
167
+ const publishResult = run('npm publish --access public', `Publish 0xray@${newVersion}`);
168
+ if (!publishResult) {
169
+ // Check if the version was already published (non-fatal — previous attempt may have timed out)
170
+ try {
171
+ const published = execSync(`npm view 0xray@${newVersion} version`, { encoding: 'utf-8', timeout: 15000 }).trim();
172
+ if (published === newVersion) {
173
+ log(` ✓`, `Already published 0xray@${newVersion}`, GREEN);
174
+ } else {
175
+ log(` ✗`, 'Publish failed', RED);
176
+ process.exit(1);
177
+ }
178
+ } catch {
179
+ log(` ✗`, 'Publish failed — cannot verify', RED);
180
+ process.exit(1);
181
+ }
182
+ }
172
183
  } else {
173
- log(` ~`, 'Would push commits + tag', YELLOW);
184
+ log(` ~`, 'Would publish: npm publish --access public', YELLOW);
174
185
  }
175
186
 
176
187
  console.log(`\n${BOLD}${GREEN}✅ Released 0xray@${newVersion}${RESET}\n`);
@@ -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.2.0", termsCount: 68, lastUpdated: new Date().toISOString().split("T")[0] };
150
+ return { version: "v2.2.1", 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.2",
158
+ version: "2.2.3",
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.1")
406
+ // Footer bare version (e.g., "**Version**: 2.2.2")
407
407
  {
408
408
  pattern: /\*\*Version\*\*:\s*[0-9]+\.[0-9]+\.[0-9]+/g,
409
409
  replacement: `**Version**: ${OFFICIAL_VERSIONS.framework.version}`,
@@ -158,6 +158,22 @@ function generateChangelogFromCommits(commits) {
158
158
  return sections.join('\n\n') || '- Version bump';
159
159
  }
160
160
 
161
+ function findTestFiles(dir) {
162
+ let count = 0;
163
+ try {
164
+ for (const entry of fs.readdirSync(dir)) {
165
+ const full = path.join(dir, entry);
166
+ const stat = fs.statSync(full);
167
+ if (stat.isDirectory()) {
168
+ count += findTestFiles(full);
169
+ } else if (entry.endsWith('.test.ts') || entry.endsWith('.spec.ts')) {
170
+ count++;
171
+ }
172
+ }
173
+ } catch {}
174
+ return count;
175
+ }
176
+
161
177
  /**
162
178
  * Count actual framework components
163
179
  */
@@ -165,7 +181,9 @@ function getFrameworkCounts() {
165
181
  const counts = {
166
182
  agents: 0,
167
183
  mcps: 0,
168
- skills: 0
184
+ skills: 0,
185
+ codexTerms: 0,
186
+ tests: 0
169
187
  };
170
188
 
171
189
  // Count agents (.yml files in src/opencode/agents/ — source of truth)
@@ -200,6 +218,27 @@ function getFrameworkCounts() {
200
218
  .filter(f => fs.existsSync(path.join(skillsDir, f, 'SKILL.md')))
201
219
  .length;
202
220
  }
221
+
222
+ // Count codex terms (xray/codex.json is SSOT)
223
+ const codexPath = path.join(rootDir, 'xray/codex.json');
224
+ if (fs.existsSync(codexPath)) {
225
+ try {
226
+ const codex = JSON.parse(fs.readFileSync(codexPath, 'utf-8'));
227
+ counts.codexTerms = Object.keys(codex.terms || codex.rules || codex).length;
228
+ } catch {
229
+ counts.codexTerms = 0;
230
+ }
231
+ }
232
+
233
+ // Count test files across all of src/
234
+ try {
235
+ const srcDir = path.join(rootDir, 'src');
236
+ if (fs.existsSync(srcDir)) {
237
+ counts.tests = findTestFiles(srcDir);
238
+ }
239
+ } catch {
240
+ counts.tests = 0;
241
+ }
203
242
 
204
243
  return counts;
205
244
  }
@@ -290,8 +329,15 @@ function updateReadme(counts, newVersion) {
290
329
  `${counts.agents} agents, ${counts.mcps} MCP servers`
291
330
  );
292
331
 
332
+ // Update only the version in the summary line.
333
+ // Counts are marketing copy — not auto-mutated on release (see audit:counts for observability).
334
+ readme = readme.replace(
335
+ /\*\*v[\d.]+?\*\*/,
336
+ `**v${newVersion}**`
337
+ );
338
+
293
339
  fs.writeFileSync(readmePath, readme);
294
- console.log(`✅ Updated README.md (version: ${newVersion}, agents: ${counts.agents}, mcps: ${counts.mcps}, skills: ${counts.skills})`);
340
+ console.log(`✅ Updated README.md (version only: ${newVersion})`);
295
341
  }
296
342
 
297
343
  /**
@@ -68,7 +68,7 @@ class GovernanceServer {
68
68
  constructor() {
69
69
  this.server = new Server(
70
70
  {
71
- name: "governance", version: "2.2.1",
71
+ name: "governance", version: "2.2.2",
72
72
  },
73
73
  {
74
74
  capabilities: {
@@ -395,9 +395,8 @@ class SkillInvocationServer extends XrayKnowledgeSkillBase {
395
395
  "code-review", "security-audit", "performance-optimization",
396
396
  "testing-strategy", "researcher", "skill-invocation",
397
397
  "framework-help", "session-management", "code-analyzer",
398
- "code-reviewer", "architect", "researcher",
399
- "architect", "bug-triage-specialist", "log-monitor",
400
- "code-reviewer", "security-auditor", "refactorer",
398
+ "code-reviewer", "architect", "bug-triage-specialist", "log-monitor",
399
+ "security-auditor", "refactorer",
401
400
  "growth-strategist", "strategist", "devops-deployment",
402
401
  "database-design", "tech-writer", "documentation-generation",
403
402
  "mobile-development", "seo-consultant",
@@ -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.1",
891
+ version: "2.2.2",
892
892
  description: "Generated API documentation",
893
893
  },
894
894
  servers: [
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.1",
2
+ "version": "2.2.2",
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.1",
2
+ "version": "2.2.2",
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.1",
72
+ "version": "2.2.2",
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.1",
88
+ "version": "2.2.2",
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.1"
95
+ "version": "2.2.2"
96
96
  }
97
97
  },
98
98
  "results": [...]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "framework": "xray 2.0",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
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.1",
223
+ "version": "2.2.2",
224
224
  "terms": [
225
225
  1,
226
226
  2,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.2.1",
2
+ "version": "2.2.2",
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.1",
2
+ "version": "2.2.2",
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.1",
3
+ "version": "2.2.2",
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.1",
3
+ "version": "2.2.2",
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.1",
7
+ "version": "2.2.2",
8
8
  "config": {}
9
9
  },
10
10
  "python-bridge": {
11
11
  "enabled": false,
12
12
  "type": "protocol-bridge",
13
- "version": "2.2.1",
13
+ "version": "2.2.2",
14
14
  "config": {}
15
15
  },
16
16
  "react": {
17
17
  "enabled": false,
18
18
  "type": "framework-adapter",
19
- "version": "2.2.1",
19
+ "version": "2.2.2",
20
20
  "config": {}
21
21
  }
22
22
  }