0xray 3.0.14 → 3.1.1

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 (296) hide show
  1. package/.gitignore.default +59 -0
  2. package/.mcp.json +35 -0
  3. package/.opencode/codex.codex +1 -1
  4. package/.opencode/commands/dependency-audit.md +3 -3
  5. package/.opencode/commands/summary-logger.md +4 -4
  6. package/.opencode/enforcer-config.json +2 -2
  7. package/.opencode/hooks/post-commit +1 -1
  8. package/.opencode/init.sh +10 -4
  9. package/.plugin/plugin.json +11 -0
  10. package/AGENTS-consumer.md +46 -0
  11. package/AGENTS.md +10 -10
  12. package/LICENSE +1 -1
  13. package/README.md +8 -8
  14. package/SKILLS.md +140 -0
  15. package/dist/.gitignore.default +59 -0
  16. package/dist/AGENTS.md +10 -10
  17. package/dist/CHANGELOG.md +34 -0
  18. package/dist/LICENSE +1 -1
  19. package/dist/README.md +8 -8
  20. package/dist/SKILLS.md +140 -0
  21. package/dist/agents/index.js +3 -1
  22. package/dist/agents/registry.js +13 -0
  23. package/dist/analytics/routing-refiner.js +1 -1
  24. package/dist/architect/architectural-integrity.js +3 -3
  25. package/dist/benchmark/performance-benchmark.js +4 -3
  26. package/dist/cli/commands/antigravity-status.js +23 -23
  27. package/dist/cli/commands/credible-init.js +1 -1
  28. package/dist/cli/commands/hermes-install.js +12 -4
  29. package/dist/cli/commands/mcp-install.js +1 -1
  30. package/dist/cli/commands/openclaw-install.js +10 -1
  31. package/dist/cli/commands/opencode-install.js +22 -0
  32. package/dist/cli/commands/plugin-commands.js +2 -2
  33. package/dist/cli/commands/publish-agent.js +5 -5
  34. package/dist/cli/commands/skill-install.js +39 -2
  35. package/dist/cli/commands/status.js +8 -3
  36. package/dist/cli/commands/storyteller.js +2 -2
  37. package/dist/cli/index.js +17 -11
  38. package/dist/cli/server.js +4 -4
  39. package/dist/core/activity-logger.js +4 -4
  40. package/dist/core/agent-spawn-gate.js +1 -1
  41. package/dist/core/boot-orchestrator.js +30 -31
  42. package/dist/core/bridge.mjs +26 -26
  43. package/dist/core/codex-formatter.js +2 -3
  44. package/dist/core/codex-injector.js +7 -7
  45. package/dist/core/config-loader.js +3 -2
  46. package/dist/core/config-paths.js +38 -31
  47. package/dist/core/context-loader.js +5 -5
  48. package/dist/core/features-config.js +1 -1
  49. package/dist/core/index.js +2 -2
  50. package/dist/core/logging-config.js +7 -7
  51. package/dist/core/orchestrator.js +2 -2
  52. package/dist/core/system-prompt-generator.js +2 -2
  53. package/dist/core/xray-activation.js +42 -41
  54. package/dist/delegation/agent-delegator.js +3 -3
  55. package/dist/enforcement/enforcer-tools.js +4 -4
  56. package/dist/enforcement/loaders/codex-loader.js +2 -2
  57. package/dist/execution/opencode-cli-invoker.js +1 -1
  58. package/dist/governance/governance-service.js +1 -1
  59. package/dist/governance/llm-governance-provider.js +223 -0
  60. package/dist/index.js +6 -6
  61. package/dist/inference/deploy-verifier.js +1 -1
  62. package/dist/inference/inference-cycle.js +16 -16
  63. package/dist/integrations/base/README.md +1 -1
  64. package/dist/integrations/enforcement-gate.js +2 -2
  65. package/dist/integrations/governance/index.js +1 -1
  66. package/dist/integrations/grok/grok-cli.js +20 -6
  67. package/dist/integrations/grok/hooks/pre-tool-use.js +3 -3
  68. package/dist/integrations/grok/plugin/0xray/.mcp.json +16 -4
  69. package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
  70. package/dist/integrations/hermes-agent/__init__.py +90 -79
  71. package/dist/integrations/hermes-agent/after-install.md +14 -14
  72. package/dist/integrations/hermes-agent/bridge.mjs +60 -25
  73. package/dist/integrations/hermes-agent/plugin.yaml +5 -5
  74. package/dist/integrations/hermes-agent/schemas.py +61 -12
  75. package/dist/integrations/hermes-agent/test_plugin.py +124 -124
  76. package/dist/integrations/hermes-agent/tools.py +129 -25
  77. package/dist/integrations/openclaw/README.md +6 -6
  78. package/dist/integrations/openclaw/config.js +1 -1
  79. package/dist/integrations/openclaw/index.js +2 -2
  80. package/dist/integrations/openclaw/types.js +3 -3
  81. package/dist/integrations/plugins/plugin-integration.js +1 -1
  82. package/dist/integrations/plugins/plugin-registry.js +3 -3
  83. package/dist/mcps/architect-tools.server.js +3 -2
  84. package/dist/mcps/auto-format.server.js +2 -2
  85. package/dist/mcps/boot-orchestrator.server.js +2 -2
  86. package/dist/mcps/config/config-loader.js +40 -9
  87. package/dist/mcps/config/server-config-registry.js +10 -10
  88. package/dist/mcps/connection/mcp-connection.js +1 -1
  89. package/dist/mcps/enforcer-tools.server.js +2 -2
  90. package/dist/mcps/estimation.server.js +3 -2
  91. package/dist/mcps/framework-compliance-audit.server.js +2 -2
  92. package/dist/mcps/framework-help.server.js +9 -8
  93. package/dist/mcps/governance.server.js +8 -4
  94. package/dist/mcps/knowledge-skills/api-design.server.js +3 -2
  95. package/dist/mcps/knowledge-skills/architecture-patterns.server.js +3 -2
  96. package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +3 -3
  97. package/dist/mcps/knowledge-skills/code-analyzer.server.js +2 -2
  98. package/dist/mcps/knowledge-skills/code-review.server.js +14 -39
  99. package/dist/mcps/knowledge-skills/content-creator.server.js +3 -3
  100. package/dist/mcps/knowledge-skills/database-design.server.js +2 -2
  101. package/dist/mcps/knowledge-skills/devops-deployment.server.js +3 -2
  102. package/dist/mcps/knowledge-skills/git-workflow.server.js +3 -2
  103. package/dist/mcps/knowledge-skills/growth-strategist.server.js +3 -3
  104. package/dist/mcps/knowledge-skills/log-monitor.server.js +3 -3
  105. package/dist/mcps/knowledge-skills/mobile-development.server.js +3 -3
  106. package/dist/mcps/knowledge-skills/multimodal-looker.server.js +3 -3
  107. package/dist/mcps/knowledge-skills/performance-optimization.server.js +2 -2
  108. package/dist/mcps/knowledge-skills/project-analysis.server.js +2 -2
  109. package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +3 -2
  110. package/dist/mcps/knowledge-skills/security-audit.server.js +14 -44
  111. package/dist/mcps/knowledge-skills/seo-consultant.server.js +3 -2
  112. package/dist/mcps/knowledge-skills/session-management.server.js +3 -2
  113. package/dist/mcps/knowledge-skills/skill-invocation.server.js +105 -3
  114. package/dist/mcps/knowledge-skills/strategist.server.js +3 -3
  115. package/dist/mcps/knowledge-skills/tech-writer.server.js +3 -3
  116. package/dist/mcps/knowledge-skills/testing-best-practices.server.js +3 -2
  117. package/dist/mcps/knowledge-skills/testing-strategy.server.js +2 -2
  118. package/dist/mcps/knowledge-skills/ui-ux-design.server.js +5 -4
  119. package/dist/mcps/lint.server.js +4 -4
  120. package/dist/mcps/mcp-client.js +5 -5
  121. package/dist/mcps/model-health-check.server.js +3 -2
  122. package/dist/mcps/orchestrator/server.js +4 -3
  123. package/dist/mcps/orchestrator.server.js +2 -1
  124. package/dist/mcps/performance-analysis.server.js +2 -2
  125. package/dist/mcps/processor-pipeline.server.js +3 -2
  126. package/dist/mcps/registry.json +1 -1
  127. package/dist/mcps/researcher.server.js +14 -39
  128. package/dist/mcps/security-scan.server.js +2 -2
  129. package/dist/mcps/simulation/server-simulations.js +3 -3
  130. package/dist/mcps/state-manager.server.js +5 -5
  131. package/dist/metrics/agent-metrics.js +1 -1
  132. package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +4 -4
  133. package/dist/orchestrator/intelligent-commit-batcher.js +2 -3
  134. package/dist/orchestrator/multi-agent-orchestration-coordinator.js +9 -9
  135. package/dist/orchestrator/orchestrator.js +9 -8
  136. package/dist/orchestrator/universal-registry-bridge.js +4 -4
  137. package/dist/postprocessor/PostProcessor.js +9 -9
  138. package/dist/postprocessor/services/RegressionAnalysisService.js +4 -4
  139. package/dist/postprocessor/triggers/GitHookTrigger.js +18 -18
  140. package/dist/processors/implementations/agents-md-validation-processor.js +2 -2
  141. package/dist/processors/implementations/inference-improvement-processor.js +1 -2
  142. package/dist/processors/implementations/log-protection-processor.js +2 -2
  143. package/dist/processors/implementations/publish-preflight-processor.js +2 -3
  144. package/dist/processors/implementations/regression-testing-processor.js +2 -2
  145. package/dist/processors/implementations/session-summary-processor.js +2 -2
  146. package/dist/processors/implementations/storytelling-trigger-processor.js +1 -2
  147. package/dist/public/about.html +6 -6
  148. package/dist/public/enterprise.html +1 -1
  149. package/dist/public/features.html +2 -2
  150. package/dist/public/index.html +4 -4
  151. package/dist/reporting/report-formatter.js +1 -1
  152. package/dist/scripts/activate-kernel-pipeline.js +4 -4
  153. package/dist/scripts/pre-command +1 -1
  154. package/dist/services/inference-tuner.js +2 -2
  155. package/dist/skills/api-design/SKILL.md +1 -1
  156. package/dist/skills/architect-tools/SKILL.md +1 -1
  157. package/dist/skills/architecture-patterns/SKILL.md +1 -1
  158. package/dist/skills/auto-format/SKILL.md +1 -1
  159. package/dist/skills/boot-orchestrator/SKILL.md +1 -1
  160. package/dist/skills/bug-triage/SKILL.md +1 -1
  161. package/dist/skills/code-analyzer/SKILL.md +1 -1
  162. package/dist/skills/code-review/SKILL.md +1 -1
  163. package/dist/skills/enforcer/SKILL.md +1 -1
  164. package/dist/skills/framework-compliance-audit/SKILL.md +1 -1
  165. package/dist/skills/git-workflow/SKILL.md +1 -1
  166. package/dist/skills/hermes-agent/SKILL.md +42 -42
  167. package/dist/skills/inference-improve/SKILL.md +1 -1
  168. package/dist/skills/lint/SKILL.md +1 -1
  169. package/dist/skills/log-monitor/SKILL.md +1 -1
  170. package/dist/skills/model-health-check/SKILL.md +1 -1
  171. package/dist/skills/multimodal-looker/SKILL.md +1 -1
  172. package/dist/skills/orchestrator/SKILL.md +1 -1
  173. package/dist/skills/performance-analysis/SKILL.md +1 -1
  174. package/dist/skills/performance-optimization/SKILL.md +1 -1
  175. package/dist/skills/processor-pipeline/SKILL.md +1 -1
  176. package/dist/skills/project-analysis/SKILL.md +1 -1
  177. package/dist/skills/refactoring-strategies/SKILL.md +1 -1
  178. package/dist/skills/registry.json +1 -1
  179. package/dist/skills/researcher/SKILL.md +1 -1
  180. package/dist/skills/security-audit/SKILL.md +1 -1
  181. package/dist/skills/security-scan/SKILL.md +1 -1
  182. package/dist/skills/session-management/SKILL.md +1 -1
  183. package/dist/skills/state-manager/SKILL.md +1 -1
  184. package/dist/skills/storyteller/SKILL.md +1 -1
  185. package/dist/skills/testing-best-practices/SKILL.md +1 -1
  186. package/dist/skills/testing-strategy/SKILL.md +1 -1
  187. package/dist/skills/ui-ux-design/SKILL.md +1 -1
  188. package/dist/state/index.js +1 -1
  189. package/dist/state/state-manager.js +3 -4
  190. package/dist/utils/import-resolver.js +1 -1
  191. package/dist/utils/path-resolver.js +2 -2
  192. package/dist/utils/token-manager.js +1 -1
  193. package/dist/validation/estimation-validator.js +1 -1
  194. package/package.json +10 -3
  195. package/scripts/hooks/pre-command +1 -1
  196. package/scripts/hooks/run-hook.js +2 -2
  197. package/scripts/node/auto-reflection-generator.mjs +30 -36
  198. package/scripts/node/govern-reflection.mjs +1 -1
  199. package/scripts/node/postinstall.cjs +37 -2
  200. package/scripts/node/pre-publish-guard.js +13 -9
  201. package/scripts/node/setup-xai-oauth.mjs +244 -0
  202. package/scripts/node/universal-version-manager.js +8 -8
  203. package/scripts/node/version-manager.mjs +1 -1
  204. package/src/integrations/grok/plugin/0xray/.mcp.json +16 -4
  205. package/src/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
  206. package/src/mcps/architect-tools.server.ts +2 -2
  207. package/src/mcps/auto-format.server.ts +2 -2
  208. package/src/mcps/boot-orchestrator.server.ts +2 -2
  209. package/src/mcps/config/__tests__/config-loader.test.ts +29 -33
  210. package/src/mcps/config/__tests__/server-config-registry.test.ts +12 -12
  211. package/src/mcps/config/config-loader.ts +50 -11
  212. package/src/mcps/config/server-config-registry.ts +10 -10
  213. package/src/mcps/connection/mcp-connection.ts +1 -1
  214. package/src/mcps/enforcer-tools.server.ts +2 -2
  215. package/src/mcps/estimation.server.ts +3 -2
  216. package/src/mcps/framework-compliance-audit.server.ts +2 -2
  217. package/src/mcps/framework-help.server.ts +9 -8
  218. package/src/mcps/governance.server.ts +8 -3
  219. package/src/mcps/knowledge-skills/api-design.server.ts +3 -2
  220. package/src/mcps/knowledge-skills/architecture-patterns.server.ts +2 -2
  221. package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +2 -2
  222. package/src/mcps/knowledge-skills/code-analyzer.server.ts +2 -2
  223. package/src/mcps/knowledge-skills/code-review.server.ts +21 -36
  224. package/src/mcps/knowledge-skills/content-creator.server.ts +3 -3
  225. package/src/mcps/knowledge-skills/database-design.server.ts +2 -2
  226. package/src/mcps/knowledge-skills/devops-deployment.server.ts +3 -2
  227. package/src/mcps/knowledge-skills/git-workflow.server.ts +3 -2
  228. package/src/mcps/knowledge-skills/growth-strategist.server.ts +3 -3
  229. package/src/mcps/knowledge-skills/log-monitor.server.ts +3 -3
  230. package/src/mcps/knowledge-skills/mobile-development.server.ts +3 -3
  231. package/src/mcps/knowledge-skills/multimodal-looker.server.ts +3 -3
  232. package/src/mcps/knowledge-skills/performance-optimization.server.ts +2 -2
  233. package/src/mcps/knowledge-skills/project-analysis.server.ts +2 -2
  234. package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +3 -2
  235. package/src/mcps/knowledge-skills/security-audit.server.ts +21 -40
  236. package/src/mcps/knowledge-skills/seo-consultant.server.ts +3 -2
  237. package/src/mcps/knowledge-skills/session-management.server.ts +3 -2
  238. package/src/mcps/knowledge-skills/skill-invocation.server.ts +113 -3
  239. package/src/mcps/knowledge-skills/strategist.server.ts +3 -3
  240. package/src/mcps/knowledge-skills/tech-writer.server.ts +3 -3
  241. package/src/mcps/knowledge-skills/testing-best-practices.server.ts +3 -2
  242. package/src/mcps/knowledge-skills/testing-strategy.server.ts +2 -2
  243. package/src/mcps/knowledge-skills/ui-ux-design.server.ts +5 -4
  244. package/src/mcps/lint.server.ts +4 -4
  245. package/src/mcps/mcp-client.ts +5 -5
  246. package/src/mcps/model-health-check.server.ts +2 -2
  247. package/src/mcps/orchestrator/server.ts +4 -3
  248. package/src/mcps/orchestrator.server.ts +2 -1
  249. package/src/mcps/performance-analysis.server.ts +2 -2
  250. package/src/mcps/processor-pipeline.server.ts +3 -2
  251. package/src/mcps/registry.json +1 -1
  252. package/src/mcps/researcher.server.ts +21 -36
  253. package/src/mcps/security-scan.server.ts +2 -2
  254. package/src/mcps/simulation/server-simulations.ts +3 -3
  255. package/src/mcps/state-manager.server.ts +5 -5
  256. package/src/opencode/codex.codex +1 -1
  257. package/src/opencode/commands/dependency-audit.md +3 -3
  258. package/src/opencode/commands/summary-logger.md +4 -4
  259. package/src/opencode/enforcer-config.json +2 -2
  260. package/src/skills/api-design/SKILL.md +1 -1
  261. package/src/skills/architect-tools/SKILL.md +1 -1
  262. package/src/skills/architecture-patterns/SKILL.md +1 -1
  263. package/src/skills/auto-format/SKILL.md +1 -1
  264. package/src/skills/boot-orchestrator/SKILL.md +1 -1
  265. package/src/skills/bug-triage/SKILL.md +1 -1
  266. package/src/skills/code-analyzer/SKILL.md +1 -1
  267. package/src/skills/code-review/SKILL.md +1 -1
  268. package/src/skills/enforcer/SKILL.md +1 -1
  269. package/src/skills/framework-compliance-audit/SKILL.md +1 -1
  270. package/src/skills/git-workflow/SKILL.md +1 -1
  271. package/src/skills/hermes-agent/SKILL.md +42 -42
  272. package/src/skills/inference-improve/SKILL.md +1 -1
  273. package/src/skills/lint/SKILL.md +1 -1
  274. package/src/skills/log-monitor/SKILL.md +1 -1
  275. package/src/skills/model-health-check/SKILL.md +1 -1
  276. package/src/skills/multimodal-looker/SKILL.md +1 -1
  277. package/src/skills/orchestrator/SKILL.md +1 -1
  278. package/src/skills/performance-analysis/SKILL.md +1 -1
  279. package/src/skills/performance-optimization/SKILL.md +1 -1
  280. package/src/skills/processor-pipeline/SKILL.md +1 -1
  281. package/src/skills/project-analysis/SKILL.md +1 -1
  282. package/src/skills/refactoring-strategies/SKILL.md +1 -1
  283. package/src/skills/registry.json +1 -1
  284. package/src/skills/researcher/SKILL.md +1 -1
  285. package/src/skills/security-audit/SKILL.md +1 -1
  286. package/src/skills/security-scan/SKILL.md +1 -1
  287. package/src/skills/session-management/SKILL.md +1 -1
  288. package/src/skills/state-manager/SKILL.md +1 -1
  289. package/src/skills/storyteller/SKILL.md +1 -1
  290. package/src/skills/testing-best-practices/SKILL.md +1 -1
  291. package/src/skills/testing-strategy/SKILL.md +1 -1
  292. package/src/skills/ui-ux-design/SKILL.md +1 -1
  293. package/xray/agents_template.md +46 -0
  294. package/xray/codex.json +598 -0
  295. package/dist/plugin/xray-codex-injection.js +0 -857
  296. /package/dist/integrations/openclaw/hooks/{strray-hooks.js → xray-hooks.js} +0 -0
package/dist/CHANGELOG.md CHANGED
@@ -4,6 +4,40 @@ 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
+ ## [3.1.1] - 2026-06-16
8
+
9
+ ### 🔄 Changes
10
+
11
+ ### ✨ Features
12
+ - feat: add root .mcp.json and .grok-plugin/plugin.json for marketplace discovery (f8d084cc0)
13
+ - feat: ship .gitignore.default template + SKILLS.md to consumers via postinstall (44bba8c4c)
14
+
15
+ ### 🐛 Bug Fixes
16
+ - fix: restore .mcp.json (deleted by test writing to same path) (e22202cfc)
17
+ - fix: support mcpServers format in ConfigLoader, fix tests for real .mcp.json (a930aa034)
18
+ - fix: add missing fs imports, process.argv[1]! assertions, and vitest v4 config (0dffc5683)
19
+ - fix: remove .opencode/xray/ fallback from auto-reflection-generator.mjs (de7633152)
20
+ - fix: Railway deployment - MCP host, in-process skills, Hermes OAuth decode, OAuth daemon mode (a519338c3)
21
+ - fix: pre-publish-guard handles missing features.json (855e3cfdb)
22
+
23
+ ### ♻️ Refactoring
24
+ - refactor: complete StringRay→0xRay rename, archive cleanup, skill syncing, MCP tools (d78bc3763)
25
+
26
+ ### 🔎 Other Changes
27
+ - Revert "Add marketplace files: .grok-plugin/plugin.json and .mcp.json for xAI plugin catalog" (05feb6fba)
28
+ - Add marketplace files: .grok-plugin/plugin.json and .mcp.json for xAI plugin catalog (5824d5776)
29
+
30
+ ---
31
+
32
+ ## [3.1.0] - 2026-06-15
33
+
34
+ ### 🔄 Changes
35
+
36
+ ### 🐛 Bug Fixes
37
+ - fix: pre-publish-guard handles missing features.json (855e3cfdb)
38
+
39
+ ---
40
+
7
41
  ## [3.0.14] - 2026-06-14
8
42
 
9
43
  ### 🔄 Changes
package/dist/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 StrRay Framework Team
3
+ Copyright (c) 2026 Xray Framework Team
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/dist/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # xray — MCP-Centric AI Governance OS
2
2
 
3
- **v2.0.0** — 9 agents · 44 skills · 16 MCPs governance servers · 60 codex terms · 2,2527 tests
3
+ **v2.0.0** — 9 agents · 44 skills · 1 MCPs governance servers · 60 codex terms · 2,2500 tests
4
4
 
5
5
  xray is the pure v2 three-subsystem AI orchestration framework, now **MCP-centric** with dedicated skill servers for governance deliberation:
6
6
 
@@ -32,7 +32,7 @@ The installation seeds YML surfaces and MCP servers. Place agent definitions in
32
32
  ├─────────────────────────────────────────────────┤
33
33
  │ External Governance (Dynamo) │
34
34
  │ Codex enforcement · Resonance/Isotopic · SSOT │
35
- │ 16 MCPs skill servers deliberate proposals │
35
+ │ 1 MCPs skill servers deliberate proposals │
36
36
  ├─────────────────────────────────────────────────┤
37
37
  │ Autonomous Engine (thinDispatch) │
38
38
  │ 7-flow MCP · Delegation · Governance gate │
@@ -94,21 +94,21 @@ Codex enforcement is integrated at every level:
94
94
  - **60 terms** across categories: core, architecture, testing, performance, security, operations, governance
95
95
  - CodexPolicyService — canonical Governance-owned SSOT for Codex loading
96
96
  - Pre-governance gate blocks non-compliant proposals before execution
97
- - 16 MCPs skill servers deliberate each proposal
97
+ - 1 MCPs skill servers deliberate each proposal
98
98
  - frameworkLogger structured logging throughout (never console.*)
99
99
  - Active codex snapshot available via `get_active_codex` MCP tool
100
100
 
101
- ## Testing (2,2527 tests)
101
+ ## Testing (2,2500 tests)
102
102
 
103
103
  | Suite | Status |
104
104
  |-------|--------|
105
105
  | Unit / Integration | 158 files, all pass |
106
- | Performance | 2527 tests, all pass |
107
- | Infrastructure | 2527 tests, all pass |
106
+ | Performance | 2500 tests, all pass |
107
+ | Infrastructure | 2500 tests, all pass |
108
108
  | Consumer E2E | 4 platforms, all pass |
109
109
  | OpenCode E2E | 42/42 solo, 34/34 orchestrator, all pass |
110
- | OpenClaw E2E | 2527 tests, all pass |
111
- | Hermes E2E | 2527 tests, all pass |
110
+ | OpenClaw E2E | 2500 tests, all pass |
111
+ | Hermes E2E | 2500 tests, all pass |
112
112
  | Grok CLI E2E | 60/60 solo, 59/59 orchestrator, all pass |
113
113
 
114
114
  ## Release
package/dist/SKILLS.md ADDED
@@ -0,0 +1,140 @@
1
+ # 0xray Skills
2
+
3
+ xray ships **46 skills** that provide domain expertise across the full software lifecycle. Skills are loaded on demand and invoked via MCP servers, agents, or direct API.
4
+
5
+ ---
6
+
7
+ ## Governance & Compliance
8
+
9
+ | Skill | Agent | Description |
10
+ |-------|-------|-------------|
11
+ | `code-review` | @code-reviewer | Proposal quality, code analysis, best practices |
12
+ | `security-audit` | @security-auditor | Vulnerability detection, threat modeling |
13
+ | `security-scan` | — | Security vulnerability scanning and assessment |
14
+ | `enforcer` | @enforcer | Codex compliance validation and error prevention |
15
+ | `framework-compliance-audit` | — | Framework compliance auditing and validation |
16
+
17
+ ## Architecture & Design
18
+
19
+ | Skill | Agent | Description |
20
+ |-------|-------|-------------|
21
+ | `architect-tools` | — | System design and technical architecture tools |
22
+ | `architecture-patterns` | — | Software architecture patterns and best practices |
23
+ | `api-design` | — | RESTful API design and validation |
24
+ | `database-engineer` | — | SQL/NoSQL schema design, query optimization, migrations |
25
+ | `state-manager` | — | Application state management and persistence |
26
+ | `session-management` | — | Manage user sessions and persistent state |
27
+
28
+ ## Engineering
29
+
30
+ | Skill | Agent | Description |
31
+ |-------|-------|-------------|
32
+ | `backend-engineer` | — | REST/GraphQL APIs, microservices, auth, server architecture |
33
+ | `frontend-engineer` | — | React/Vue/Angular/Svelte, responsive design, accessibility |
34
+ | `frontend-ui-ux-engineer` | — | Visual design, CSS systems, accessibility, UX |
35
+ | `mobile-developer` | — | iOS (Swift/SwiftUI), Android (Kotlin/Compose), RN, Flutter |
36
+ | `devops-engineer` | — | CI/CD, IaaC, containers, cloud deployment, reliability |
37
+
38
+ ## Code Quality & Analysis
39
+
40
+ | Skill | Agent | Description |
41
+ |-------|-------|-------------|
42
+ | `code-analyzer` | — | Deep code analysis, metrics extraction, pattern detection |
43
+ | `project-analysis` | — | Analyze project structure, complexity, and health metrics |
44
+ | `lint` | — | Code linting and static analysis |
45
+ | `auto-format` | — | Automated code formatting and style consistency |
46
+ | `refactoring-strategies` | @refactorer | Code refactoring techniques and strategies |
47
+
48
+ ## Testing
49
+
50
+ | Skill | Agent | Description |
51
+ |-------|-------|-------------|
52
+ | `testing-strategy` | @testing-lead | Comprehensive testing strategies and coverage |
53
+ | `testing-best-practices` | — | Testing best practices and patterns |
54
+
55
+ ## Performance
56
+
57
+ | Skill | Agent | Description |
58
+ |-------|-------|-------------|
59
+ | `performance-analysis` | — | System performance analysis and optimization |
60
+ | `performance-engineer` | — | Profiling, benchmarking, load testing, optimization |
61
+ | `performance-optimization` | — | Application performance optimization and tuning |
62
+
63
+ ## Debugging & Monitoring
64
+
65
+ | Skill | Agent | Description |
66
+ |-------|-------|-------------|
67
+ | `bug-triage` | @bug-triage-specialist | Bug triage, debugging analysis, issue prioritization |
68
+ | `log-monitor` | — | Log analysis, pattern detection, alerting |
69
+ | `model-health-check` | — | AI model health monitoring and diagnostics |
70
+
71
+ ## Orchestration & Workflow
72
+
73
+ | Skill | Agent | Description |
74
+ |-------|-------|-------------|
75
+ | `orchestrator` | @orchestrator | Multi-agent workflow coordination and task delegation |
76
+ | `xray-orchestrator` | — | Main orchestration skill for xray agents |
77
+ | `processor-pipeline` | — | Data processing pipeline management |
78
+ | `boot-orchestrator` | — | Framework initialization and boot orchestration |
79
+
80
+ ## Research & Content
81
+
82
+ | Skill | Agent | Description |
83
+ |-------|-------|-------------|
84
+ | `researcher` | @researcher | Codebase exploration, implementation lookup |
85
+ | `content-creator` | — | Marketing copy, technical docs, blog posts, social media |
86
+ | `tech-writer` | — | API docs, READMEs, ADRs, changelogs, DX |
87
+ | `storyteller` | — | Deep narrative reflections, sagas, technical stories |
88
+ | `seo-consultant` | — | Technical SEO, schema markup, Core Web Vitals |
89
+ | `growth-strategist` | — | Campaign strategy, market analysis, brand positioning |
90
+
91
+ ## UX & Design
92
+
93
+ | Skill | Agent | Description |
94
+ |-------|-------|-------------|
95
+ | `ui-ux-design` | — | Mobile-first, cognitive simplicity, accessibility-first |
96
+ | `multimodal-looker` | — | Visual content analysis for diagrams, screenshots, UI mockups |
97
+
98
+ ## Strategy
99
+
100
+ | Skill | Agent | Description |
101
+ |-------|-------|-------------|
102
+ | `strategist` | @strategist | Strategic guidance, architectural decisions, risk analysis |
103
+ | `inference-improve` | — | Autonomous inference improvement through collaborative analysis |
104
+
105
+ ## Git & Workflow
106
+
107
+ | Skill | Agent | Description |
108
+ |-------|-------|-------------|
109
+ | `git-workflow` | — | Git workflow management and collaboration tools |
110
+
111
+ ## Integration
112
+
113
+ | Skill | Agent | Description |
114
+ |-------|-------|-------------|
115
+ | `hermes-agent` | — | Manage xray from Hermes Agent via native plugin |
116
+
117
+ ---
118
+
119
+ ## Invoking Skills
120
+
121
+ Skills are invoked automatically by agents or via MCP:
122
+
123
+ ```bash
124
+ # Via agent mention (in any chat)
125
+ @code-reviewer review this PR
126
+
127
+ # Via MCP tool call
128
+ npx xray mcp call code-review analyze_code_quality --args '{"path": "src/"}'
129
+
130
+ # Via direct agent
131
+ npx xray agent run @refactorer "optimize src/core/"
132
+ ```
133
+
134
+ ## Skill Locations
135
+
136
+ Each skill has a `SKILL.md` with full reference:
137
+
138
+ - **Source**: `src/skills/<name>/SKILL.md`
139
+ - **Consumer**: `node_modules/0xray/dist/skills/<name>/SKILL.md`
140
+ - **Opend**: `.opencode/skills/<name>/SKILL.md` (copied on `npx xray setup`)
@@ -19,6 +19,7 @@ import { performanceEngineer } from "./performance-engineer.js";
19
19
  import { seoConsultant } from "./seo-consultant.js";
20
20
  import { strategist } from "./strategist.js";
21
21
  import { techWriter } from "./tech-writer.js";
22
+ import { multimodalLooker } from "./multimodal-looker.js";
22
23
  export const builtinAgents = {
23
24
  architect,
24
25
  "bug-triage-specialist": bugTriageSpecialist,
@@ -41,5 +42,6 @@ export const builtinAgents = {
41
42
  "seo-consultant": seoConsultant,
42
43
  strategist,
43
44
  "tech-writer": techWriter,
45
+ "multimodal-looker": multimodalLooker,
44
46
  };
45
- export { architect, bugTriageSpecialist, codeReviewer, securityAuditor, refactorer, testingLead, logMonitor, researcher, codeAnalyzer, backendEngineer, contentCreator, databaseEngineer, devopsEngineer, frontendEngineer, frontendUiUxEngineer, growthStrategist, mobileDeveloper, performanceEngineer, seoConsultant, strategist, techWriter, };
47
+ export { architect, bugTriageSpecialist, codeReviewer, securityAuditor, refactorer, testingLead, logMonitor, researcher, codeAnalyzer, backendEngineer, contentCreator, databaseEngineer, devopsEngineer, frontendEngineer, frontendUiUxEngineer, growthStrategist, mobileDeveloper, performanceEngineer, seoConsultant, strategist, techWriter, multimodalLooker, };
@@ -285,6 +285,19 @@ export const AGENT_REGISTRY = {
285
285
  performance: 85,
286
286
  expertise: "technical documentation and writing",
287
287
  },
288
+ "multimodal-looker": {
289
+ name: "multimodal-looker",
290
+ description: "Visual content analysis for images, diagrams, PDFs, and screenshots",
291
+ capabilities: ["visual-analysis", "image-processing", "document-analysis", "multimodal-data-processing"],
292
+ capacity: 60,
293
+ specialties: ["image", "visual", "diagram", "screenshot", "pdf"],
294
+ mode: "subagent",
295
+ maxComplexity: 35,
296
+ concurrentTasks: 2,
297
+ status: "active",
298
+ performance: 80,
299
+ expertise: "multimodal content analysis and interpretation",
300
+ },
288
301
  };
289
302
  export function getActiveAgents() {
290
303
  return Object.values(AGENT_REGISTRY)
@@ -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: "1.22.67",
39
+ version: "3.1.0",
40
40
  generatedAt: new Date(),
41
41
  summary: {
42
42
  newMappings: newMappings.length,
@@ -20,17 +20,17 @@ export async function verifyArchitecturalIntegrity() {
20
20
  const issues = [];
21
21
  const recommendations = [];
22
22
  // Check state manager
23
- const stateManager = globalThis.strRayStateManager;
23
+ const stateManager = globalThis.xrayStateManager;
24
24
  if (!stateManager) {
25
25
  issues.push("State manager not initialized");
26
26
  recommendations.push("Ensure boot orchestrator runs before framework activation");
27
27
  }
28
- const postProcessor = globalThis.strRayPostProcessor;
28
+ const postProcessor = globalThis.xrayPostProcessor;
29
29
  if (!postProcessor) {
30
30
  issues.push("Post-processor not activated");
31
31
  recommendations.push("Add post-processor activation to xray-activation.ts");
32
32
  }
33
- const codexInjector = globalThis.strRayCodexInjector;
33
+ const codexInjector = globalThis.xrayCodexInjector;
34
34
  if (!codexInjector) {
35
35
  issues.push("Codex injector not initialized");
36
36
  recommendations.push("Ensure codex injection is active in plugin context");
@@ -1,7 +1,7 @@
1
- // Consumer runtime compat shim from prior StringRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .strray fallbacks)
1
+ // Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + .xray fallbacks)
2
2
  import { frameworkLogger } from "../core/framework-logger.js";
3
3
  import crypto from "crypto";
4
- export class StringRayPerformanceBenchmark {
4
+ export class XrayPerformanceBenchmark {
5
5
  results = [];
6
6
  activeBenchmarks = new Map();
7
7
  /**
@@ -369,4 +369,5 @@ export class StringRayPerformanceBenchmark {
369
369
  }
370
370
  }
371
371
  // Export singleton instance
372
- export const performanceBenchmark = new StringRayPerformanceBenchmark();
372
+ export const performanceBenchmark = new XrayPerformanceBenchmark();
373
+ // Backward compat alias
@@ -10,30 +10,30 @@ import { join } from "path";
10
10
  import { getConfigDir } from "../../core/config-paths.js";
11
11
  function getSkillsFromSkills(cwd) {
12
12
  const skills = [];
13
- const skillsPath = join(getConfigDir(cwd), "skills");
14
- if (!existsSync(skillsPath)) {
15
- return skills;
16
- }
17
- const dirs = readdirSync(skillsPath).filter((f) => {
18
- const skillPath = join(skillsPath, f, "SKILL.md");
19
- return existsSync(skillPath);
20
- });
21
- for (const dir of dirs) {
22
- const skillPath = join(skillsPath, dir, "SKILL.md");
23
- const content = readFileSync(skillPath, "utf-8");
24
- const sourceMatch = content.match(/^source:\s*(.+)/m);
25
- const sourceNameMatch = content.match(/^source_name:\s*(.+)/m);
26
- const licenseMatch = content.match(/License:\s*(.+)/m);
27
- const rawName = dir.includes("--") ? dir.split("--").slice(1).join("--") : dir;
28
- const communitySource = sourceNameMatch ? sourceNameMatch[1].trim() : null;
29
- skills.push({
30
- name: rawName,
31
- source: sourceMatch && sourceMatch[1] ? sourceMatch[1].trim() : "custom",
32
- communitySource,
33
- license: licenseMatch ? licenseMatch[1].trim() : "unknown",
34
- category: extractCategory(content),
35
- path: skillPath,
13
+ for (const skillsPath of [join(getConfigDir(cwd), "skills"), join(cwd, ".opencode", "skills")]) {
14
+ if (!existsSync(skillsPath))
15
+ continue;
16
+ const dirs = readdirSync(skillsPath).filter((f) => {
17
+ const skillPath = join(skillsPath, f, "SKILL.md");
18
+ return existsSync(skillPath);
36
19
  });
20
+ for (const dir of dirs) {
21
+ const skillPath = join(skillsPath, dir, "SKILL.md");
22
+ const content = readFileSync(skillPath, "utf-8");
23
+ const sourceMatch = content.match(/^source:\s*(.+)/m);
24
+ const sourceNameMatch = content.match(/^source_name:\s*(.+)/m);
25
+ const licenseMatch = content.match(/License:\s*(.+)/m);
26
+ const rawName = dir.includes("--") ? dir.split("--").slice(1).join("--") : dir;
27
+ const communitySource = sourceNameMatch ? sourceNameMatch[1].trim() : null;
28
+ skills.push({
29
+ name: rawName,
30
+ source: sourceMatch && sourceMatch[1] ? sourceMatch[1].trim() : "custom",
31
+ communitySource,
32
+ license: licenseMatch ? licenseMatch[1].trim() : "unknown",
33
+ category: extractCategory(content),
34
+ path: skillPath,
35
+ });
36
+ }
37
37
  }
38
38
  return skills;
39
39
  }
@@ -60,7 +60,7 @@ function showNotImplemented() {
60
60
  console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━");
61
61
  console.log("");
62
62
  console.log("💡 To be notified when this feature is available:");
63
- console.log(" Track the evolution spec at docs/roadmap/STRINGRAY_EVOLUTION_SPEC.md");
63
+ console.log(" Track the evolution spec at docs/roadmap/XRAY_EVOLUTION_SPEC.md");
64
64
  console.log("");
65
65
  console.log("🔜 Roadmap: Phase 3 (Polishing & Release)");
66
66
  console.log("");
@@ -2,6 +2,7 @@ import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { homedir } from 'os';
4
4
  import { frameworkLogger } from '../../core/framework-logger.js';
5
+ import { syncBuiltinSkills } from './skill-install.js';
5
6
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
6
7
  export function registerHermesCommands(hermesCmd) {
7
8
  hermesCmd
@@ -16,14 +17,14 @@ export function registerHermesCommands(hermesCmd) {
16
17
  async function installForHermes(options = {}) {
17
18
  frameworkLogger.log('hermes-integration', 'install-start', 'info', { options });
18
19
  const home = homedir();
19
- const targetPluginDir = path.join(home, '.hermes/plugins/strray-hermes');
20
+ const targetPluginDir = path.join(home, '.hermes/plugins/xray-hermes');
20
21
  const possibleSources = [
21
22
  path.join(__dirname, '..', '..', '..', 'dist/integrations/hermes-agent'),
22
23
  path.join(__dirname, '..', '..', '..', 'src/integrations/hermes-agent'),
23
24
  ];
24
25
  let sourceDir = possibleSources.find(p => fs.existsSync(p));
25
26
  if (!sourceDir) {
26
- console.error('[Hermes] Could not locate the strray-hermes plugin inside the package.');
27
+ console.error('[Hermes] Could not locate the xray-hermes plugin inside the package.');
27
28
  return;
28
29
  }
29
30
  if (options.dryRun) {
@@ -32,7 +33,7 @@ async function installForHermes(options = {}) {
32
33
  }
33
34
  try {
34
35
  if (fs.existsSync(targetPluginDir) && !options.force) {
35
- console.log('[Hermes] strray-hermes plugin is already installed.');
36
+ console.log('[Hermes] xray-hermes plugin is already installed.');
36
37
  console.log('Use --force to reinstall.');
37
38
  return;
38
39
  }
@@ -49,6 +50,13 @@ async function installForHermes(options = {}) {
49
50
  }
50
51
  frameworkLogger.log('hermes-integration', 'plugin-copied', 'info', { destination: targetPluginDir });
51
52
  console.log(`\x1b[32m✓ Copied Hermes plugin to ${targetPluginDir}\x1b[0m`);
53
+ // Sync builtin skills to Hermes plugin skills dir
54
+ const hermesSkillsDir = path.join(targetPluginDir, 'skills');
55
+ const skillsCopied = syncBuiltinSkills(hermesSkillsDir);
56
+ if (skillsCopied > 0) {
57
+ console.log(`\x1b[32m✓ Synced ${skillsCopied} builtin skills to Hermes plugin\x1b[0m`);
58
+ }
59
+ frameworkLogger.log('hermes-integration', 'skills-synced', 'info', { count: skillsCopied });
52
60
  // Write after-install instructions
53
61
  const afterInstallPath = path.join(targetPluginDir, 'after-install.md');
54
62
  if (fs.existsSync(afterInstallPath)) {
@@ -56,7 +64,7 @@ async function installForHermes(options = {}) {
56
64
  }
57
65
  console.log('\n✅ 0xRay is now installed as a Hermes Agent plugin!');
58
66
  console.log('Restart Hermes to load the plugin and its tools.');
59
- console.log(' Run: /strray status (to verify)');
67
+ console.log(' Run: /xray status (to verify)');
60
68
  }
61
69
  catch (err) {
62
70
  frameworkLogger.log('hermes-integration', 'install-error', 'error', { error: err.message });
@@ -3,7 +3,7 @@ import { join, dirname } from "path";
3
3
  import { execSync } from "child_process";
4
4
  import { getConfigDir } from "../../core/config-paths.js";
5
5
  function getMCPConfigPath() {
6
- return join(process.cwd(), ".opencode", "strray", "mcp-registry.json");
6
+ return join(process.cwd(), ".xray", "mcp-registry.json");
7
7
  }
8
8
  function getBundledMCPRegistry() {
9
9
  const paths = [
@@ -1,6 +1,8 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
+ import { homedir } from 'os';
3
4
  import { frameworkLogger } from '../../core/framework-logger.js';
5
+ import { syncBuiltinSkills } from './skill-install.js';
4
6
  import { OpenClawConfigLoader } from '../../integrations/openclaw/config.js';
5
7
  export function registerOpenClawCommands(openclawCmd) {
6
8
  openclawCmd
@@ -14,7 +16,7 @@ export function registerOpenClawCommands(openclawCmd) {
14
16
  }
15
17
  async function installForOpenClaw(options = {}) {
16
18
  frameworkLogger.log('openclaw-integration', 'install-start', 'info', { options });
17
- const configPath = path.join(process.cwd(), '.strray', 'config', 'openclaw.json');
19
+ const configPath = path.join(process.cwd(), '.xray', 'config', 'openclaw.json');
18
20
  if (options.dryRun) {
19
21
  console.log(`[OpenClaw] Dry run: Would create config at ${configPath}`);
20
22
  return;
@@ -29,6 +31,13 @@ async function installForOpenClaw(options = {}) {
29
31
  loader.createSampleConfig();
30
32
  const relative = path.relative(process.cwd(), configPath);
31
33
  console.log(`\x1b[32m✓ Created OpenClaw config at ${relative}\x1b[0m`);
34
+ // Sync builtin skills to ~/.openclaw/skills/
35
+ const openclawSkillsDir = path.join(homedir(), '.openclaw', 'skills');
36
+ const skillsCopied = syncBuiltinSkills(openclawSkillsDir);
37
+ if (skillsCopied > 0) {
38
+ console.log(`\x1b[32m✓ Synced ${skillsCopied} builtin skills to ~/.openclaw/skills/\x1b[0m`);
39
+ }
40
+ frameworkLogger.log('openclaw-integration', 'skills-synced', 'info', { count: skillsCopied });
32
41
  console.log('\n✅ 0xRay OpenClaw integration configured!');
33
42
  console.log('Edit the config file to set your gateway URL, auth token, and device ID.');
34
43
  console.log('');
@@ -1,6 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import { frameworkLogger } from '../../core/framework-logger.js';
4
+ import { syncBuiltinSkills } from './skill-install.js';
4
5
  const __dirname = path.dirname(new URL(import.meta.url).pathname);
5
6
  export function registerOpencodeCommands(opencodeCmd) {
6
7
  opencodeCmd
@@ -80,6 +81,20 @@ async function installForOpencode(options = {}) {
80
81
  return;
81
82
  }
82
83
  try {
84
+ // Auto-create package.json if missing (OpenCode requires it)
85
+ const consumerPkgPath = path.join(process.cwd(), 'package.json');
86
+ if (!fs.existsSync(consumerPkgPath)) {
87
+ const pkg = {
88
+ name: path.basename(process.cwd()),
89
+ version: '1.0.0',
90
+ private: true,
91
+ dependencies: {
92
+ '0xray': '*',
93
+ },
94
+ };
95
+ fs.writeFileSync(consumerPkgPath, JSON.stringify(pkg, null, 2) + '\n');
96
+ console.log(`\x1b[32m✓ Created package.json with 0xray dependency\x1b[0m`);
97
+ }
83
98
  if (fs.existsSync(opencodeDest) && !options.force) {
84
99
  console.log('[Opencode] .opencode/ directory already exists.');
85
100
  console.log('Use --force to reinstall.');
@@ -87,6 +102,13 @@ async function installForOpencode(options = {}) {
87
102
  }
88
103
  copyDir(opencodeSource, opencodeDest);
89
104
  frameworkLogger.log('opencode-integration', 'opencode-copied', 'info', { destination: opencodeDest });
105
+ // Sync builtin skills to .opencode/skills/
106
+ const opencodeSkillsDir = path.join(opencodeDest, 'skills');
107
+ const skillsCopied = syncBuiltinSkills(opencodeSkillsDir);
108
+ if (skillsCopied > 0) {
109
+ console.log(`\x1b[32m✓ Synced ${skillsCopied} builtin skills to .opencode/skills/\x1b[0m`);
110
+ }
111
+ frameworkLogger.log('opencode-integration', 'skills-synced', 'info', { count: skillsCopied });
90
112
  console.log(`\x1b[32m✓ Copied OpenCode config to .opencode/\x1b[0m`);
91
113
  console.log('\n✅ 0xRay OpenCode plugin installed!');
92
114
  console.log('Restart OpenCode or run `opencode` to load the plugin.');
@@ -14,8 +14,8 @@
14
14
  import * as fs from "fs";
15
15
  import * as path from "path";
16
16
  import { spawnSync } from "child_process";
17
- const PLUGINS_DIR = ".strray/plugins";
18
- const CONFIG_PATH = ".strray/config/plugin-config.json";
17
+ const PLUGINS_DIR = ".xray/plugins";
18
+ const CONFIG_PATH = ".xray/config/plugin-config.json";
19
19
  export async function pluginListCommand() {
20
20
  console.log("\n📦 0xRay Plugins\n");
21
21
  console.log("═".repeat(60));
@@ -69,10 +69,10 @@ function getPackageVersion(cwd) {
69
69
  }
70
70
  }
71
71
  catch { /* ignore */ }
72
- const strrayPkgPath = join(cwd, ".opencode", "package.json");
72
+ const xrayPkgPath = join(cwd, ".opencode", "package.json");
73
73
  try {
74
- if (existsSync(strrayPkgPath)) {
75
- const pkg = JSON.parse(readFileSync(strrayPkgPath, "utf-8"));
74
+ if (existsSync(xrayPkgPath)) {
75
+ const pkg = JSON.parse(readFileSync(xrayPkgPath, "utf-8"));
76
76
  if (pkg.version)
77
77
  return pkg.version;
78
78
  }
@@ -89,7 +89,7 @@ function createAgentManifest(agentName, configPath, version, cwd) {
89
89
  author: extractYamlField(content, "author") || extractYamlField(content, "maintainer") || "0xRay User",
90
90
  license: extractYamlField(content, "license") || "MIT",
91
91
  source: extractYamlField(content, "source") || "custom",
92
- framework: "stringray",
92
+ framework: "0xray",
93
93
  frameworkVersion: getPackageVersion(cwd),
94
94
  publishedAt: new Date().toISOString(),
95
95
  skills: [],
@@ -98,7 +98,7 @@ function createAgentManifest(agentName, configPath, version, cwd) {
98
98
  };
99
99
  }
100
100
  function packageAgent(agentName, configPath, version, cwd) {
101
- const outputDir = join(cwd, ".strray", "publish", agentName);
101
+ const outputDir = join(cwd, ".xray", "publish", agentName);
102
102
  mkdirSync(outputDir, { recursive: true });
103
103
  const manifest = createAgentManifest(agentName, configPath, version, cwd);
104
104
  writeFileSync(join(outputDir, "agent.json"), JSON.stringify(manifest, null, 2));
@@ -1,8 +1,9 @@
1
- import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, cpSync, rmSync, statSync, unlinkSync } from "fs";
1
+ import { existsSync, readdirSync, readFileSync, mkdirSync, writeFileSync, cpSync, rmSync, statSync, unlinkSync, copyFileSync } from "fs";
2
2
  import { join, basename, dirname } from "path";
3
+ import { fileURLToPath } from "url";
3
4
  import { execSync } from "child_process";
4
5
  function getLocalRegistryPath() {
5
- return join(process.cwd(), ".opencode", "strray", "skill-registry.json");
6
+ return join(process.cwd(), ".xray", "skill-registry.json");
6
7
  }
7
8
  function getBundledRegistry() {
8
9
  const paths = [
@@ -479,3 +480,39 @@ export async function skillRegistryCommand(action, args) {
479
480
  console.log(` Unknown action: ${action}`);
480
481
  console.log(" Usage: npx 0xray skill:registry [list|add|remove]");
481
482
  }
483
+ // ── Cross-platform builtin skill sync ────────────────────────────────
484
+ // Each platform's install command calls this to copy framework skills.
485
+ export function syncBuiltinSkills(targetSkillsDir, packageRoot) {
486
+ const root = packageRoot ?? join(dirname(fileURLToPath(import.meta.url)), "..", "..", "..");
487
+ const candidateDirs = [
488
+ join(root, "dist", "skills"),
489
+ join(root, "src", "skills"),
490
+ ];
491
+ const sourceDir = candidateDirs.find(existsSync);
492
+ if (!sourceDir)
493
+ return 0;
494
+ let copied = 0;
495
+ try {
496
+ if (!existsSync(targetSkillsDir))
497
+ mkdirSync(targetSkillsDir, { recursive: true });
498
+ for (const entry of readdirSync(sourceDir, { withFileTypes: true })) {
499
+ if (!entry.isDirectory())
500
+ continue;
501
+ const skillMd = join(sourceDir, entry.name, "SKILL.md");
502
+ if (!existsSync(skillMd))
503
+ continue;
504
+ const destMd = join(targetSkillsDir, entry.name, "SKILL.md");
505
+ const destDir = dirname(destMd);
506
+ if (!existsSync(destDir))
507
+ mkdirSync(destDir, { recursive: true });
508
+ if (existsSync(destMd) && statSync(skillMd).mtime <= statSync(destMd).mtime)
509
+ continue;
510
+ copyFileSync(skillMd, destMd);
511
+ copied++;
512
+ }
513
+ }
514
+ catch {
515
+ // best-effort
516
+ }
517
+ return copied;
518
+ }