0xray 3.1.0 → 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 (274) 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 +6 -0
  9. package/.plugin/plugin.json +11 -0
  10. package/AGENTS-consumer.md +46 -0
  11. package/AGENTS.md +8 -8
  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 +8 -8
  17. package/dist/CHANGELOG.md +25 -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 +1 -2
  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 +8 -0
  29. package/dist/cli/commands/mcp-install.js +1 -1
  30. package/dist/cli/commands/openclaw-install.js +9 -0
  31. package/dist/cli/commands/opencode-install.js +22 -0
  32. package/dist/cli/commands/skill-install.js +39 -2
  33. package/dist/cli/commands/status.js +5 -0
  34. package/dist/cli/commands/storyteller.js +1 -1
  35. package/dist/cli/index.js +12 -6
  36. package/dist/core/activity-logger.js +4 -4
  37. package/dist/core/agent-spawn-gate.js +1 -1
  38. package/dist/core/boot-orchestrator.js +12 -13
  39. package/dist/core/bridge.mjs +4 -4
  40. package/dist/core/codex-formatter.js +1 -2
  41. package/dist/core/codex-injector.js +3 -3
  42. package/dist/core/config-loader.js +1 -2
  43. package/dist/core/config-paths.js +30 -23
  44. package/dist/core/context-loader.js +0 -3
  45. package/dist/core/features-config.js +1 -1
  46. package/dist/core/index.js +2 -2
  47. package/dist/core/logging-config.js +7 -7
  48. package/dist/core/orchestrator.js +1 -1
  49. package/dist/core/xray-activation.js +3 -4
  50. package/dist/delegation/agent-delegator.js +2 -2
  51. package/dist/enforcement/enforcer-tools.js +2 -2
  52. package/dist/enforcement/loaders/codex-loader.js +2 -2
  53. package/dist/execution/opencode-cli-invoker.js +1 -1
  54. package/dist/governance/governance-service.js +1 -1
  55. package/dist/governance/llm-governance-provider.js +14 -1
  56. package/dist/index.js +3 -5
  57. package/dist/inference/inference-cycle.js +11 -11
  58. package/dist/integrations/base/README.md +1 -1
  59. package/dist/integrations/enforcement-gate.js +2 -2
  60. package/dist/integrations/governance/index.js +1 -1
  61. package/dist/integrations/grok/grok-cli.js +20 -6
  62. package/dist/integrations/grok/hooks/pre-tool-use.js +3 -3
  63. package/dist/integrations/grok/plugin/0xray/.mcp.json +16 -4
  64. package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
  65. package/dist/integrations/hermes-agent/__init__.py +25 -14
  66. package/dist/integrations/hermes-agent/bridge.mjs +39 -4
  67. package/dist/integrations/hermes-agent/schemas.py +49 -0
  68. package/dist/integrations/hermes-agent/test_plugin.py +7 -7
  69. package/dist/integrations/hermes-agent/tools.py +107 -3
  70. package/dist/integrations/openclaw/README.md +6 -6
  71. package/dist/integrations/openclaw/config.js +1 -1
  72. package/dist/integrations/openclaw/index.js +2 -2
  73. package/dist/integrations/openclaw/types.js +3 -3
  74. package/dist/integrations/plugins/plugin-integration.js +1 -1
  75. package/dist/integrations/plugins/plugin-registry.js +1 -1
  76. package/dist/mcps/architect-tools.server.js +3 -2
  77. package/dist/mcps/auto-format.server.js +2 -2
  78. package/dist/mcps/boot-orchestrator.server.js +2 -2
  79. package/dist/mcps/config/config-loader.js +40 -9
  80. package/dist/mcps/enforcer-tools.server.js +2 -2
  81. package/dist/mcps/estimation.server.js +3 -2
  82. package/dist/mcps/framework-compliance-audit.server.js +2 -2
  83. package/dist/mcps/framework-help.server.js +3 -2
  84. package/dist/mcps/governance.server.js +8 -4
  85. package/dist/mcps/knowledge-skills/api-design.server.js +3 -2
  86. package/dist/mcps/knowledge-skills/architecture-patterns.server.js +3 -2
  87. package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +3 -3
  88. package/dist/mcps/knowledge-skills/code-analyzer.server.js +2 -2
  89. package/dist/mcps/knowledge-skills/code-review.server.js +2 -2
  90. package/dist/mcps/knowledge-skills/content-creator.server.js +3 -3
  91. package/dist/mcps/knowledge-skills/database-design.server.js +2 -2
  92. package/dist/mcps/knowledge-skills/devops-deployment.server.js +3 -2
  93. package/dist/mcps/knowledge-skills/git-workflow.server.js +3 -2
  94. package/dist/mcps/knowledge-skills/growth-strategist.server.js +3 -3
  95. package/dist/mcps/knowledge-skills/log-monitor.server.js +3 -3
  96. package/dist/mcps/knowledge-skills/mobile-development.server.js +3 -3
  97. package/dist/mcps/knowledge-skills/multimodal-looker.server.js +3 -3
  98. package/dist/mcps/knowledge-skills/performance-optimization.server.js +2 -2
  99. package/dist/mcps/knowledge-skills/project-analysis.server.js +2 -2
  100. package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +3 -2
  101. package/dist/mcps/knowledge-skills/security-audit.server.js +2 -2
  102. package/dist/mcps/knowledge-skills/seo-consultant.server.js +3 -2
  103. package/dist/mcps/knowledge-skills/session-management.server.js +3 -2
  104. package/dist/mcps/knowledge-skills/skill-invocation.server.js +105 -3
  105. package/dist/mcps/knowledge-skills/strategist.server.js +3 -3
  106. package/dist/mcps/knowledge-skills/tech-writer.server.js +3 -3
  107. package/dist/mcps/knowledge-skills/testing-best-practices.server.js +3 -2
  108. package/dist/mcps/knowledge-skills/testing-strategy.server.js +2 -2
  109. package/dist/mcps/knowledge-skills/ui-ux-design.server.js +3 -2
  110. package/dist/mcps/lint.server.js +2 -2
  111. package/dist/mcps/model-health-check.server.js +3 -2
  112. package/dist/mcps/orchestrator/server.js +2 -1
  113. package/dist/mcps/orchestrator.server.js +2 -1
  114. package/dist/mcps/performance-analysis.server.js +2 -2
  115. package/dist/mcps/processor-pipeline.server.js +3 -2
  116. package/dist/mcps/registry.json +1 -1
  117. package/dist/mcps/researcher.server.js +2 -2
  118. package/dist/mcps/security-scan.server.js +2 -2
  119. package/dist/mcps/state-manager.server.js +5 -5
  120. package/dist/metrics/agent-metrics.js +1 -1
  121. package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +2 -2
  122. package/dist/orchestrator/intelligent-commit-batcher.js +0 -1
  123. package/dist/orchestrator/multi-agent-orchestration-coordinator.js +1 -1
  124. package/dist/orchestrator/orchestrator.js +1 -2
  125. package/dist/orchestrator/universal-registry-bridge.js +1 -1
  126. package/dist/postprocessor/PostProcessor.js +5 -5
  127. package/dist/postprocessor/services/RegressionAnalysisService.js +2 -2
  128. package/dist/postprocessor/triggers/GitHookTrigger.js +4 -4
  129. package/dist/processors/implementations/inference-improvement-processor.js +0 -1
  130. package/dist/processors/implementations/publish-preflight-processor.js +0 -1
  131. package/dist/processors/implementations/session-summary-processor.js +2 -2
  132. package/dist/processors/implementations/storytelling-trigger-processor.js +0 -1
  133. package/dist/public/about.html +6 -6
  134. package/dist/public/enterprise.html +1 -1
  135. package/dist/public/features.html +2 -2
  136. package/dist/public/index.html +4 -4
  137. package/dist/reporting/report-formatter.js +1 -1
  138. package/dist/scripts/activate-kernel-pipeline.js +2 -2
  139. package/dist/scripts/pre-command +1 -1
  140. package/dist/services/inference-tuner.js +1 -1
  141. package/dist/skills/api-design/SKILL.md +1 -1
  142. package/dist/skills/architect-tools/SKILL.md +1 -1
  143. package/dist/skills/architecture-patterns/SKILL.md +1 -1
  144. package/dist/skills/auto-format/SKILL.md +1 -1
  145. package/dist/skills/boot-orchestrator/SKILL.md +1 -1
  146. package/dist/skills/bug-triage/SKILL.md +1 -1
  147. package/dist/skills/code-analyzer/SKILL.md +1 -1
  148. package/dist/skills/code-review/SKILL.md +1 -1
  149. package/dist/skills/enforcer/SKILL.md +1 -1
  150. package/dist/skills/framework-compliance-audit/SKILL.md +1 -1
  151. package/dist/skills/git-workflow/SKILL.md +1 -1
  152. package/dist/skills/hermes-agent/SKILL.md +2 -2
  153. package/dist/skills/inference-improve/SKILL.md +1 -1
  154. package/dist/skills/lint/SKILL.md +1 -1
  155. package/dist/skills/log-monitor/SKILL.md +1 -1
  156. package/dist/skills/model-health-check/SKILL.md +1 -1
  157. package/dist/skills/multimodal-looker/SKILL.md +1 -1
  158. package/dist/skills/orchestrator/SKILL.md +1 -1
  159. package/dist/skills/performance-analysis/SKILL.md +1 -1
  160. package/dist/skills/performance-optimization/SKILL.md +1 -1
  161. package/dist/skills/processor-pipeline/SKILL.md +1 -1
  162. package/dist/skills/project-analysis/SKILL.md +1 -1
  163. package/dist/skills/refactoring-strategies/SKILL.md +1 -1
  164. package/dist/skills/registry.json +1 -1
  165. package/dist/skills/researcher/SKILL.md +1 -1
  166. package/dist/skills/security-audit/SKILL.md +1 -1
  167. package/dist/skills/security-scan/SKILL.md +1 -1
  168. package/dist/skills/session-management/SKILL.md +1 -1
  169. package/dist/skills/state-manager/SKILL.md +1 -1
  170. package/dist/skills/storyteller/SKILL.md +1 -1
  171. package/dist/skills/testing-best-practices/SKILL.md +1 -1
  172. package/dist/skills/testing-strategy/SKILL.md +1 -1
  173. package/dist/skills/ui-ux-design/SKILL.md +1 -1
  174. package/dist/state/index.js +0 -1
  175. package/dist/state/state-manager.js +1 -2
  176. package/dist/utils/import-resolver.js +1 -1
  177. package/dist/utils/path-resolver.js +2 -2
  178. package/package.json +10 -3
  179. package/scripts/hooks/pre-command +1 -1
  180. package/scripts/hooks/run-hook.js +2 -2
  181. package/scripts/node/auto-reflection-generator.mjs +30 -36
  182. package/scripts/node/govern-reflection.mjs +1 -1
  183. package/scripts/node/postinstall.cjs +37 -2
  184. package/scripts/node/setup-xai-oauth.mjs +244 -0
  185. package/scripts/node/universal-version-manager.js +8 -8
  186. package/scripts/node/version-manager.mjs +1 -1
  187. package/src/integrations/grok/plugin/0xray/.mcp.json +16 -4
  188. package/src/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
  189. package/src/mcps/architect-tools.server.ts +2 -2
  190. package/src/mcps/auto-format.server.ts +2 -2
  191. package/src/mcps/boot-orchestrator.server.ts +2 -2
  192. package/src/mcps/config/__tests__/config-loader.test.ts +29 -33
  193. package/src/mcps/config/config-loader.ts +50 -11
  194. package/src/mcps/enforcer-tools.server.ts +2 -2
  195. package/src/mcps/estimation.server.ts +3 -2
  196. package/src/mcps/framework-compliance-audit.server.ts +2 -2
  197. package/src/mcps/framework-help.server.ts +3 -2
  198. package/src/mcps/governance.server.ts +8 -3
  199. package/src/mcps/knowledge-skills/api-design.server.ts +3 -2
  200. package/src/mcps/knowledge-skills/architecture-patterns.server.ts +2 -2
  201. package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +2 -2
  202. package/src/mcps/knowledge-skills/code-analyzer.server.ts +2 -2
  203. package/src/mcps/knowledge-skills/code-review.server.ts +2 -2
  204. package/src/mcps/knowledge-skills/content-creator.server.ts +3 -3
  205. package/src/mcps/knowledge-skills/database-design.server.ts +2 -2
  206. package/src/mcps/knowledge-skills/devops-deployment.server.ts +3 -2
  207. package/src/mcps/knowledge-skills/git-workflow.server.ts +3 -2
  208. package/src/mcps/knowledge-skills/growth-strategist.server.ts +3 -3
  209. package/src/mcps/knowledge-skills/log-monitor.server.ts +3 -3
  210. package/src/mcps/knowledge-skills/mobile-development.server.ts +3 -3
  211. package/src/mcps/knowledge-skills/multimodal-looker.server.ts +3 -3
  212. package/src/mcps/knowledge-skills/performance-optimization.server.ts +2 -2
  213. package/src/mcps/knowledge-skills/project-analysis.server.ts +2 -2
  214. package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +3 -2
  215. package/src/mcps/knowledge-skills/security-audit.server.ts +2 -2
  216. package/src/mcps/knowledge-skills/seo-consultant.server.ts +3 -2
  217. package/src/mcps/knowledge-skills/session-management.server.ts +3 -2
  218. package/src/mcps/knowledge-skills/skill-invocation.server.ts +113 -3
  219. package/src/mcps/knowledge-skills/strategist.server.ts +3 -3
  220. package/src/mcps/knowledge-skills/tech-writer.server.ts +3 -3
  221. package/src/mcps/knowledge-skills/testing-best-practices.server.ts +3 -2
  222. package/src/mcps/knowledge-skills/testing-strategy.server.ts +2 -2
  223. package/src/mcps/knowledge-skills/ui-ux-design.server.ts +3 -2
  224. package/src/mcps/lint.server.ts +2 -2
  225. package/src/mcps/model-health-check.server.ts +2 -2
  226. package/src/mcps/orchestrator/server.ts +2 -1
  227. package/src/mcps/orchestrator.server.ts +2 -1
  228. package/src/mcps/performance-analysis.server.ts +2 -2
  229. package/src/mcps/processor-pipeline.server.ts +3 -2
  230. package/src/mcps/registry.json +1 -1
  231. package/src/mcps/researcher.server.ts +2 -2
  232. package/src/mcps/security-scan.server.ts +2 -2
  233. package/src/mcps/state-manager.server.ts +5 -5
  234. package/src/opencode/codex.codex +1 -1
  235. package/src/opencode/commands/dependency-audit.md +3 -3
  236. package/src/opencode/commands/summary-logger.md +4 -4
  237. package/src/opencode/enforcer-config.json +2 -2
  238. package/src/skills/api-design/SKILL.md +1 -1
  239. package/src/skills/architect-tools/SKILL.md +1 -1
  240. package/src/skills/architecture-patterns/SKILL.md +1 -1
  241. package/src/skills/auto-format/SKILL.md +1 -1
  242. package/src/skills/boot-orchestrator/SKILL.md +1 -1
  243. package/src/skills/bug-triage/SKILL.md +1 -1
  244. package/src/skills/code-analyzer/SKILL.md +1 -1
  245. package/src/skills/code-review/SKILL.md +1 -1
  246. package/src/skills/enforcer/SKILL.md +1 -1
  247. package/src/skills/framework-compliance-audit/SKILL.md +1 -1
  248. package/src/skills/git-workflow/SKILL.md +1 -1
  249. package/src/skills/hermes-agent/SKILL.md +2 -2
  250. package/src/skills/inference-improve/SKILL.md +1 -1
  251. package/src/skills/lint/SKILL.md +1 -1
  252. package/src/skills/log-monitor/SKILL.md +1 -1
  253. package/src/skills/model-health-check/SKILL.md +1 -1
  254. package/src/skills/multimodal-looker/SKILL.md +1 -1
  255. package/src/skills/orchestrator/SKILL.md +1 -1
  256. package/src/skills/performance-analysis/SKILL.md +1 -1
  257. package/src/skills/performance-optimization/SKILL.md +1 -1
  258. package/src/skills/processor-pipeline/SKILL.md +1 -1
  259. package/src/skills/project-analysis/SKILL.md +1 -1
  260. package/src/skills/refactoring-strategies/SKILL.md +1 -1
  261. package/src/skills/registry.json +1 -1
  262. package/src/skills/researcher/SKILL.md +1 -1
  263. package/src/skills/security-audit/SKILL.md +1 -1
  264. package/src/skills/security-scan/SKILL.md +1 -1
  265. package/src/skills/session-management/SKILL.md +1 -1
  266. package/src/skills/state-manager/SKILL.md +1 -1
  267. package/src/skills/storyteller/SKILL.md +1 -1
  268. package/src/skills/testing-best-practices/SKILL.md +1 -1
  269. package/src/skills/testing-strategy/SKILL.md +1 -1
  270. package/src/skills/ui-ux-design/SKILL.md +1 -1
  271. package/xray/agents_template.md +46 -0
  272. package/xray/codex.json +598 -0
  273. package/dist/plugin/xray-codex-injection.js +0 -857
  274. /package/dist/integrations/openclaw/hooks/{strray-hooks.js → xray-hooks.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Boot Orchestrator (min documented consumer runtime compat shim from prior 0xRay releases; primary Xray* paths + XRAY_||STRRAY_ env + .xray fallbacks only; 1-line per Scope Rule).
2
+ * Boot Orchestrator (min documented consumer runtime compat shim from prior 0xRay releases; primary Xray paths + .xray fallbacks only; 1-line per Scope Rule).
3
3
  */
4
4
  import { XrayContextLoader } from "./context-loader.js";
5
5
  import { XrayStateManager } from "../state/state-manager.js";
@@ -9,7 +9,7 @@ import * as fs from "fs";
9
9
  import * as path from "path";
10
10
  const { existsSync, readFileSync } = fs;
11
11
  // Path configuration - can be overridden by environment or use path resolver
12
- const AGENTS_BASE_PATH = process.env.XRAY_AGENTS_PATH || process.env.STRRAY_AGENTS_PATH || "../agents";
12
+ const AGENTS_BASE_PATH = process.env.XRAY_AGENTS_PATH || process.env.XRAY_AGENTS_PATH || "../agents";
13
13
  import { createAgentDelegator, createSessionCoordinator, } from "../delegation/index.js";
14
14
  import { createSessionCleanupManager } from "../session/session-cleanup-manager.js";
15
15
  import { createSessionMonitor } from "../session/session-monitor.js";
@@ -20,7 +20,7 @@ import { frameworkLogger } from "../core/framework-logger.js";
20
20
  import { featuresConfigLoader } from "../core/features-config.js";
21
21
  import { memoryMonitor } from "../monitoring/memory-monitor.js";
22
22
  import { advancedProfiler } from "../monitoring/advanced-profiler.js";
23
- import { strRayConfigLoader } from "./config-loader.js";
23
+ import { xrayConfigLoader } from "./config-loader.js";
24
24
  import { PluginRegistry } from "../integrations/plugins/index.js";
25
25
  import { PluginServerConfigRegistry } from "../mcps/config/index.js";
26
26
  import { initializeGovernanceIntegration } from "../integrations/governance/index.js";
@@ -47,7 +47,7 @@ function setupGracefulShutdown() {
47
47
  }
48
48
  catch (error) {
49
49
  // Suppress error output in CLI mode to avoid breaking interface
50
- if (process.env.STRRAY_CLI_MODE !== "true" &&
50
+ if (process.env.XRAY_CLI_MODE !== "true" &&
51
51
  process.env.OPENCODE_CLI !== "true") {
52
52
  frameworkLogger.log("boot-orchestrator", "shutdown-error", "error", { error, message: "Error during graceful shutdown" });
53
53
  }
@@ -69,7 +69,7 @@ function setupGracefulShutdown() {
69
69
  // Handle uncaught exceptions that might cause JSON parsing errors
70
70
  process.on("uncaughtException", (error) => {
71
71
  // Suppress error output in CLI mode to avoid breaking interface
72
- if (process.env.STRRAY_CLI_MODE !== "true" &&
72
+ if (process.env.XRAY_CLI_MODE !== "true" &&
73
73
  process.env.OPENCODE_CLI !== "true") {
74
74
  frameworkLogger.log("boot-orchestrator", "uncaught-exception", "error", { error, message: "Uncaught Exception" });
75
75
  }
@@ -79,7 +79,7 @@ function setupGracefulShutdown() {
79
79
  });
80
80
  process.on("unhandledRejection", (reason, promise) => {
81
81
  // Suppress error output in CLI mode to avoid breaking interface
82
- if (process.env.STRRAY_CLI_MODE !== "true" &&
82
+ if (process.env.XRAY_CLI_MODE !== "true" &&
83
83
  process.env.OPENCODE_CLI !== "true") {
84
84
  frameworkLogger.log("boot-orchestrator", "unhandled-rejection", "error", { promise, reason, message: "Unhandled Rejection" });
85
85
  }
@@ -115,7 +115,7 @@ export class BootOrchestrator {
115
115
  */
116
116
  async initializeDelegationSystem() {
117
117
  try {
118
- const agentDelegator = createAgentDelegator(this.stateManager, strRayConfigLoader);
118
+ const agentDelegator = createAgentDelegator(this.stateManager, xrayConfigLoader);
119
119
  this.stateManager.set("delegation:agent_delegator", agentDelegator);
120
120
  const sessionCoordinator = createSessionCoordinator(this.stateManager);
121
121
  this.stateManager.set("delegation:session_coordinator", sessionCoordinator);
@@ -132,7 +132,6 @@ export class BootOrchestrator {
132
132
  try {
133
133
  const configPaths = [
134
134
  path.join(process.cwd(), ".xray", "features.json"),
135
- path.join(process.cwd(), ".opencode", "xray", "features.json"),
136
135
  ];
137
136
  for (const configPath of configPaths) {
138
137
  if (existsSync(configPath)) {
@@ -189,7 +188,7 @@ export class BootOrchestrator {
189
188
  });
190
189
  return false;
191
190
  }
192
- const orchestratorInstance = orchestratorModule.strRayOrchestrator;
191
+ const orchestratorInstance = orchestratorModule.xrayOrchestrator;
193
192
  if (!orchestratorInstance) {
194
193
  frameworkLogger.log("boot-orchestrator", "orchestrator-not-found", "error", { message: "Orchestrator instance not found in module" });
195
194
  return false;
@@ -596,7 +595,7 @@ export class BootOrchestrator {
596
595
  };
597
596
  try {
598
597
  frameworkLogger.log("boot-orchestrator", "loading xray configuration", "info", { jobId });
599
- // Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .xray fallbacks)
598
+ // Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + .xray fallbacks)
600
599
  await this.loadXrayConfiguration(jobId);
601
600
  frameworkLogger.log("boot-orchestrator", "xray configuration loaded", "success", { jobId });
602
601
  // Phase 1: Initialize core systems
@@ -727,12 +726,12 @@ export class BootOrchestrator {
727
726
  this.stateManager.set("boot:errors", result.errors);
728
727
  return result;
729
728
  }
730
- // Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .xray fallbacks)
729
+ // Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + .xray fallbacks)
731
730
  async loadXrayConfiguration(jobId) {
732
731
  try {
733
- // Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .xray fallbacks)
732
+ // Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + .xray fallbacks)
734
733
  const xrayConfig = {
735
- version: "1.22.67",
734
+ version: "3.1.0",
736
735
  codex_enabled: true,
737
736
  codex_version: "v1.7.5",
738
737
  codex_terms: [
@@ -69,7 +69,7 @@ let frameworkLoadAttempted = false;
69
69
  // ============================================================================
70
70
 
71
71
  function findProjectRoot() {
72
- const envHome = process.env.STRRAY_HOME;
72
+ const envHome = process.env.XRAY_HOME;
73
73
  if (envHome && existsSync(join(envHome, "package.json"))) return envHome;
74
74
 
75
75
  const candidates = [
@@ -219,7 +219,7 @@ async function handleHealth(input) {
219
219
  */
220
220
  /** Codex candidate paths — single source of truth for both loadCodexFromFs and handleGetConfig */
221
221
  function getCodexCandidates(projectRoot) {
222
- const envDir = process.env.STRRAY_CONFIG_DIR;
222
+ const envDir = process.env.XRAY_CONFIG_DIR;
223
223
  const candidates = [];
224
224
  if (envDir) candidates.push(join(projectRoot, envDir, "codex.json"));
225
225
  candidates.push(join(projectRoot, ".xray", "codex.json"));
@@ -747,8 +747,8 @@ function startHttpServer(port, projectRoot) {
747
747
 
748
748
  return new Promise((resolve, reject) => {
749
749
  const server = createServer(async (req, res) => {
750
- // CORS headers (wildcard — restrict via STRRAY_HTTP_CORS_ORIGIN env var in production)
751
- const corsOrigin = process.env.STRRAY_HTTP_CORS_ORIGIN || "*";
750
+ // CORS headers (wildcard — restrict via XRAY_HTTP_CORS_ORIGIN env var in production)
751
+ const corsOrigin = process.env.XRAY_HTTP_CORS_ORIGIN || "*";
752
752
  res.setHeader("Content-Type", "application/json");
753
753
  res.setHeader("Access-Control-Allow-Origin", corsOrigin);
754
754
  res.setHeader("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
@@ -84,13 +84,12 @@ export const BUILTIN_CODEX = {
84
84
  */
85
85
  export function findCodexPath(projectRoot) {
86
86
  const root = projectRoot || process.cwd();
87
- const envDir = process.env.STRRAY_CONFIG_DIR;
87
+ const envDir = process.env.XRAY_CONFIG_DIR;
88
88
  const candidates = [];
89
89
  if (envDir) {
90
90
  candidates.push(resolve(root, envDir, "codex.json"));
91
91
  }
92
92
  candidates.push(join(root, ".xray", "codex.json"));
93
- candidates.push(join(root, ".opencode", "xray", "codex.json"));
94
93
  // Additional fallback locations (for standalone usage)
95
94
  candidates.push(join(root, "codex.json"));
96
95
  candidates.push(join(root, "src", "codex.json"));
@@ -38,7 +38,7 @@ async function initializeImports() {
38
38
  const codexCache = new Map();
39
39
  /**
40
40
  * Codex file locations resolved through the standard priority chain.
41
- * Uses config-paths.ts resolver so STRRAY_CONFIG_DIR and .xray/ work.
41
+ * Uses config-paths.ts resolver so XRAY_CONFIG_DIR and .xray/ work.
42
42
  */
43
43
  function getCodexFileLocations(projectRoot) {
44
44
  const root = projectRoot || process.cwd();
@@ -170,7 +170,7 @@ export function createXrayCodexInjectorHook() {
170
170
  });
171
171
  // Skip codex enforcement during testing
172
172
  if (process.env.NODE_ENV === "test" ||
173
- process.env.STRRAY_TEST_MODE === "true") {
173
+ process.env.XRAY_TEST_MODE === "true") {
174
174
  await frameworkLogger.log("codex-injector", "skipping enforcement in test mode", "info", { jobId });
175
175
  return;
176
176
  }
@@ -263,7 +263,7 @@ export function createXrayCodexInjectorHook() {
263
263
  frameworkLogger.log("codex-injector", "tool.execute.after hook triggered", "info", { jobId, tool: input.tool, sessionId });
264
264
  // Skip codex enforcement during testing
265
265
  if (process.env.NODE_ENV === "test" ||
266
- process.env.STRRAY_TEST_MODE === "true") {
266
+ process.env.XRAY_TEST_MODE === "true") {
267
267
  frameworkLogger.log("codex-injector", "skipping injection in test mode", "info", { jobId });
268
268
  return output;
269
269
  }
@@ -146,5 +146,4 @@ export class XrayConfigLoader {
146
146
  }
147
147
  // Export singleton instance
148
148
  export const xrayConfigLoader = new XrayConfigLoader();
149
- export { XrayConfigLoader as StringRayConfigLoader };
150
- export { xrayConfigLoader as strRayConfigLoader };
149
+ // Backward compat aliases
@@ -2,17 +2,15 @@
2
2
  * Config Path Resolver
3
3
  *
4
4
  * Centralizes all 0xRay config file path resolution.
5
- * Supports STRRAY_CONFIG_DIR env var for custom config roots,
6
- * making .opencode/ completely optional for environments like Hermes Agent.
5
+ * Supports XRAY_CONFIG_DIR env var for custom config roots.
7
6
  *
8
7
  * Resolution order (per file type):
9
- * 1. STRRAY_CONFIG_DIR/<relative_path> (if env var set)
8
+ * 1. XRAY_CONFIG_DIR/<relative_path> (if env var set)
10
9
  * 2. .xray/<relative_path> (preferred lightweight root)
11
- * 3. .opencode/xray/<relative_path> (legacy OpenCode root)
12
- * 4. null (callers fall back to built-in defaults)
10
+ * 3. null (callers fall back to built-in defaults)
13
11
  *
14
12
  * For state/data directories, uses:
15
- * 1. STRRAY_CONFIG_DIR/state (if env var set)
13
+ * 1. XRAY_CONFIG_DIR/state (if env var set)
16
14
  * 2. .xray/state
17
15
  * 3. .opencode/state (legacy)
18
16
  * 4. .xray/state (default — always writable)
@@ -20,7 +18,7 @@
20
18
  import { existsSync } from "fs";
21
19
  import { join, resolve } from "path";
22
20
  /** Environment variable name for custom config root */
23
- export const STRRAY_CONFIG_DIR_ENV = "STRRAY_CONFIG_DIR";
21
+ export const XRAY_CONFIG_DIR_ENV = "XRAY_CONFIG_DIR";
24
22
  /** Resolved config directories, cached per projectRoot */
25
23
  const _resolvedConfigDirs = new Map();
26
24
  /**
@@ -28,11 +26,11 @@ const _resolvedConfigDirs = new Map();
28
26
  * Scans in priority order and caches the first one that exists (or the first default).
29
27
  */
30
28
  export function getConfigDir(projectRoot) {
31
- const root = projectRoot || process.cwd();
29
+ const root = resolveRoot(projectRoot);
32
30
  const cached = _resolvedConfigDirs.get(root);
33
31
  if (cached)
34
32
  return cached;
35
- const envDir = process.env[STRRAY_CONFIG_DIR_ENV];
33
+ const envDir = process.env[XRAY_CONFIG_DIR_ENV];
36
34
  // Priority candidates
37
35
  const candidates = [];
38
36
  if (envDir) {
@@ -41,7 +39,6 @@ export function getConfigDir(projectRoot) {
41
39
  candidates.push({ dir: resolved, source: "env" });
42
40
  }
43
41
  candidates.push({ dir: join(root, ".xray"), source: "dot-xray" });
44
- candidates.push({ dir: join(root, ".opencode", "xray"), source: "dot-opencode" });
45
42
  // Return the first that exists, or the highest-priority default
46
43
  for (const c of candidates) {
47
44
  if (existsSync(c.dir)) {
@@ -49,7 +46,7 @@ export function getConfigDir(projectRoot) {
49
46
  return c.dir;
50
47
  }
51
48
  }
52
- // Nothing exists — use highest priority default (env > .xray > .opencode)
49
+ // Nothing exists — use highest priority default (env > .xray)
53
50
  const defaultDir = candidates[0];
54
51
  _resolvedConfigDirs.set(root, defaultDir.dir);
55
52
  return defaultDir.dir;
@@ -62,14 +59,13 @@ export function getConfigDir(projectRoot) {
62
59
  * @param projectRoot - Optional project root override
63
60
  */
64
61
  export function resolveConfigPath(relativePath, projectRoot) {
65
- const root = projectRoot || process.cwd();
66
- const envDir = process.env[STRRAY_CONFIG_DIR_ENV];
62
+ const root = resolveRoot(projectRoot);
63
+ const envDir = process.env[XRAY_CONFIG_DIR_ENV];
67
64
  const candidates = [];
68
65
  if (envDir) {
69
66
  candidates.push(resolve(root, envDir, relativePath));
70
67
  }
71
68
  candidates.push(join(root, ".xray", relativePath));
72
- candidates.push(join(root, ".opencode", "xray", relativePath));
73
69
  for (const candidate of candidates) {
74
70
  if (existsSync(candidate)) {
75
71
  return candidate;
@@ -84,8 +80,8 @@ export function resolveConfigPath(relativePath, projectRoot) {
84
80
  * Similar logic to resolveConfigPath but for the state/ subdirectory.
85
81
  */
86
82
  export function resolveStateDir(projectRoot) {
87
- const root = projectRoot || process.cwd();
88
- const envDir = process.env[STRRAY_CONFIG_DIR_ENV];
83
+ const root = resolveRoot(projectRoot);
84
+ const envDir = process.env[XRAY_CONFIG_DIR_ENV];
89
85
  const candidates = [];
90
86
  if (envDir) {
91
87
  candidates.push(join(root, envDir, "state"));
@@ -111,14 +107,13 @@ export function resolveStateFilePath(projectRoot) {
111
107
  * Get the profiles storage directory.
112
108
  */
113
109
  export function resolveProfilesDir(projectRoot) {
114
- const root = projectRoot || process.cwd();
115
- const envDir = process.env[STRRAY_CONFIG_DIR_ENV];
110
+ const root = resolveRoot(projectRoot);
111
+ const envDir = process.env[XRAY_CONFIG_DIR_ENV];
116
112
  const candidates = [];
117
113
  if (envDir) {
118
114
  candidates.push(join(root, envDir, "profiles"));
119
115
  }
120
116
  candidates.push(join(root, ".xray", "profiles"));
121
- candidates.push(join(root, ".opencode", "xray", "profiles"));
122
117
  for (const candidate of candidates) {
123
118
  if (existsSync(candidate)) {
124
119
  return candidate;
@@ -130,16 +125,28 @@ export function resolveProfilesDir(projectRoot) {
130
125
  * Resolve codex.json path.
131
126
  * Has additional fallback locations beyond the standard config dir.
132
127
  */
128
+ /** Environment variable for explicit project root override */
129
+ export const XRAY_ROOT_ENV = "XRAY_ROOT";
130
+ /**
131
+ * Resolve project root using XRAY_ROOT env var if set,
132
+ * otherwise fall back to projectRoot param or cwd.
133
+ */
134
+ export function resolveProjectRoot(projectRoot) {
135
+ return process.env[XRAY_ROOT_ENV] || projectRoot || process.cwd();
136
+ }
137
+ /** @deprecated Use resolveProjectRoot — kept for internal consistency */
138
+ function resolveRoot(projectRoot) {
139
+ return resolveProjectRoot(projectRoot);
140
+ }
133
141
  export function resolveCodexPath(projectRoot) {
134
- const root = projectRoot || process.cwd();
135
- const envDir = process.env[STRRAY_CONFIG_DIR_ENV];
142
+ const root = resolveRoot(projectRoot);
143
+ const envDir = process.env[XRAY_CONFIG_DIR_ENV];
136
144
  const candidates = [];
137
145
  if (envDir) {
138
146
  candidates.push(join(root, envDir, "codex.json"));
139
147
  }
140
148
  candidates.push(join(root, ".xray", "codex.json"));
141
149
  candidates.push(join(root, "xray", "codex.json"));
142
- candidates.push(join(root, ".opencode", "xray", "codex.json"));
143
150
  // Additional fallback locations (for standalone usage)
144
151
  candidates.push(join(root, "codex.json"));
145
152
  candidates.push(join(root, "src", "codex.json"));
@@ -150,7 +157,7 @@ export function resolveCodexPath(projectRoot) {
150
157
  * Get the logs directory for framework logging.
151
158
  */
152
159
  export function resolveLogDir(projectRoot) {
153
- const root = projectRoot || process.cwd();
160
+ const root = resolveRoot(projectRoot);
154
161
  // Logs always go to logs/framework/ regardless of config dir
155
162
  return join(root, "logs", "framework");
156
163
  }
@@ -267,6 +267,3 @@ export class XrayContextLoader {
267
267
  * Export singleton instance
268
268
  */
269
269
  export const xrayContextLoader = XrayContextLoader.getInstance();
270
- // Backward compat aliases
271
- export { XrayContextLoader as StringRayContextLoader };
272
- export { xrayContextLoader as strRayContextLoader };
@@ -286,7 +286,7 @@ export class FeaturesConfigLoader {
286
286
  */
287
287
  getDefaultConfig() {
288
288
  return {
289
- version: "1.22.67",
289
+ version: "3.1.0",
290
290
  description: "0xRay Framework - Unified Feature Configuration",
291
291
  token_optimization: {
292
292
  enabled: true,
@@ -1,6 +1,6 @@
1
1
  export { KernelOrchestrator } from "./orchestrator.js";
2
- export { defaultXrayConfig, defaultXrayConfig as defaultStringRayConfig } from "./xray-activation.js"; // consumer runtime compat
2
+ export { defaultXrayConfig } from "./xray-activation.js";
3
3
  // Decoupled config path resolution (Layer 1)
4
- export { getConfigDir, resolveConfigPath, resolveStateDir, resolveProfilesDir, resolveCodexPath, resolveLogDir, resetConfigDirCache, STRRAY_CONFIG_DIR_ENV, } from "./config-paths.js";
4
+ export { getConfigDir, resolveConfigPath, resolveStateDir, resolveProfilesDir, resolveCodexPath, resolveLogDir, resetConfigDirCache, XRAY_CONFIG_DIR_ENV, } from "./config-paths.js";
5
5
  // Standalone codex formatter (Layer 2)
6
6
  export { formatCodexPrompt, formatMinimalCodexPrompt, getCodexConfig, findCodexPath, loadCodex, BUILTIN_CODEX, } from "./codex-formatter.js";
@@ -1,9 +1,9 @@
1
1
  // Default logging configuration
2
2
  const defaultLoggingConfig = {
3
- enabled: process.env.STRRAY_LOGGING_ENABLED !== "false", // Default true, can be disabled
4
- level: process.env.STRRAY_LOG_LEVEL || "info",
3
+ enabled: process.env.XRAY_LOGGING_ENABLED !== "false", // Default true, can be disabled
4
+ level: process.env.XRAY_LOG_LEVEL || "info",
5
5
  destinations: ["console", "file"],
6
- performanceMode: process.env.STRRAY_PERFORMANCE_MODE === "true",
6
+ performanceMode: process.env.XRAY_PERFORMANCE_MODE === "true",
7
7
  };
8
8
  // Available log levels in priority order (higher index = more verbose)
9
9
  const LOG_LEVELS = ["debug", "info", "warn", "error"];
@@ -32,12 +32,12 @@ export function shouldLog(level) {
32
32
  return messageLevelIndex >= currentLevelIndex;
33
33
  }
34
34
  // Environment variable configuration
35
- if (process.env.STRRAY_LOGGING_ENABLED === "false") {
35
+ if (process.env.XRAY_LOGGING_ENABLED === "false") {
36
36
  setLoggingConfig({ enabled: false });
37
37
  }
38
- if (process.env.STRRAY_LOG_LEVEL) {
39
- setLoggingConfig({ level: process.env.STRRAY_LOG_LEVEL });
38
+ if (process.env.XRAY_LOG_LEVEL) {
39
+ setLoggingConfig({ level: process.env.XRAY_LOG_LEVEL });
40
40
  }
41
- if (process.env.STRRAY_PERFORMANCE_MODE === "true") {
41
+ if (process.env.XRAY_PERFORMANCE_MODE === "true") {
42
42
  setLoggingConfig({ performanceMode: true });
43
43
  }
@@ -405,4 +405,4 @@ export class KernelOrchestrator {
405
405
  };
406
406
  }
407
407
  }
408
- export const strRayOrchestrator = new KernelOrchestrator();
408
+ export const xrayOrchestrator = new KernelOrchestrator();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + XRAY_||STRRAY_ env + .xray fallbacks).
2
+ * Consumer runtime compat shim from prior 0xRay releases (1-line min per Scope Rule; primary xray paths + .xray fallbacks).
3
3
  */
4
4
  import { frameworkLogger } from "../core/framework-logger.js";
5
5
  import { ensureCriticalComponents } from "../architect/architectural-integrity.js";
@@ -98,7 +98,7 @@ async function activateStateManagement(jobId) {
98
98
  }
99
99
  async function activateOrchestrator(jobId) {
100
100
  frameworkLogger.log("xray-activation", "activating xray orchestrator", "info", { jobId });
101
- const { strRayOrchestrator } = await import("./orchestrator");
101
+ const { xrayOrchestrator } = await import("./orchestrator");
102
102
  // Also activate the multi-agent orchestration coordinator
103
103
  const { multiAgentOrchestrationCoordinator } = await import("../orchestrator/multi-agent-orchestration-coordinator");
104
104
  frameworkLogger.log("xray-activation", "xray orchestrator and multi-agent coordination activated", "success", { jobId });
@@ -132,5 +132,4 @@ async function activatePostProcessor(jobId) {
132
132
  globalThis.xrayCodexInjector = codexInjector;
133
133
  frameworkLogger.log("xray-activation", "codex injector activated", "success", { jobId });
134
134
  }
135
- export { defaultXrayConfig as defaultStringRayConfig };
136
- export { activateXrayFramework as activateStringRayFramework };
135
+ // Backward compat aliases
@@ -47,7 +47,7 @@ export class AgentDelegator {
47
47
  const candidates = [
48
48
  path.resolve(process.cwd(), ".xray/routing-mappings.json"),
49
49
  path.resolve(process.cwd(), "xray/routing-mappings.json"),
50
- path.resolve(process.cwd(), ".opencode/xray/routing-mappings.json"),
50
+ path.resolve(process.cwd(), ".xray/routing-mappings.json"),
51
51
  path.resolve(process.cwd(), "routing-mappings.json"),
52
52
  ];
53
53
  for (const p of candidates) {
@@ -451,7 +451,7 @@ export class AgentDelegator {
451
451
  */
452
452
  resolveProjectDirectory() {
453
453
  const root = process.cwd();
454
- if (fs.existsSync(`${root}/package.json`) || fs.existsSync(`${root}/strray.config.json`)) {
454
+ if (fs.existsSync(`${root}/package.json`) || fs.existsSync(`${root}/xray.config.json`)) {
455
455
  return root;
456
456
  }
457
457
  let current = root;
@@ -6,7 +6,7 @@ import { ruleEnforcer, } from "./rule-enforcer.js";
6
6
  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
- import { strRayConfigLoader } from "../core/config-loader.js";
9
+ import { xrayConfigLoader } from "../core/config-loader.js";
10
10
  import * as fs from "fs";
11
11
  import * as path from "path";
12
12
  // Minimum confidence to auto-delegate to another agent
@@ -327,7 +327,7 @@ async function delegateToAgent(agentName, operation, context, jobId) {
327
327
  // Create a minimal state manager and config loader for the delegator
328
328
  const stateManager = new XrayStateManager();
329
329
  // Create the delegator
330
- const delegator = new AgentDelegator(stateManager, strRayConfigLoader);
330
+ const delegator = new AgentDelegator(stateManager, xrayConfigLoader);
331
331
  // Build task description for the delegated agent
332
332
  const taskDescription = buildTaskDescription(operation, context);
333
333
  // Build the delegation request
@@ -30,13 +30,13 @@ export class CodexLoader extends BaseLoader {
30
30
  name = "codex";
31
31
  /**
32
32
  * Path to the codex.json file.
33
- * Uses the standard config-paths resolver which checks .xray/, .opencode/xray/, etc.
33
+ * Uses the standard config-paths resolver which checks .xray/, etc.
34
34
  */
35
35
  get codexPath() {
36
36
  const candidates = resolveCodexPath();
37
37
  const found = candidates.find((p) => existsSync(p));
38
38
  // Fallback to primary path even if not found yet
39
- return found ?? candidates[0] ?? this.resolvePath(".opencode/xray/codex.json");
39
+ return found ?? candidates[0] ?? this.resolvePath(".xray/codex.json");
40
40
  }
41
41
  /**
42
42
  * Check if codex.json exists.
@@ -17,7 +17,7 @@ import { getConfigDir } from "../core/config-paths.js";
17
17
  let opencodeAvailable = null;
18
18
  export async function invokeViaOpencode(agentName, prompt, projectRoot = process.cwd()) {
19
19
  // In pure MCP mode we must never reach here
20
- if (process.env.STRRAY_FORCE_MCP_GOVERNANCE === "true") {
20
+ if (process.env.XRAY_FORCE_MCP_GOVERNANCE === "true") {
21
21
  throw new Error(`[PURE MCP] invokeViaOpencode called for "${agentName}" — this path is forbidden.`);
22
22
  }
23
23
  // GATE: Centralized spawn gate — blocks all agent spawning by default
@@ -128,7 +128,7 @@ export class GovernanceService {
128
128
  }
129
129
  async callSkillServer(serverName, proposals, context) {
130
130
  const votes = [];
131
- const useInProcess = process.env.VERCEL === '1';
131
+ const useInProcess = process.env.VERCEL === '1' || !!process.env.RAILWAY_ENVIRONMENT;
132
132
  for (const proposal of proposals) {
133
133
  try {
134
134
  let text = '';
@@ -59,8 +59,10 @@ function readHermesOAuthToken() {
59
59
  if (!entry?.access_token && Array.isArray(data)) {
60
60
  entry = data.find((e) => e.provider === "xai-oauth" || !!e.access_token);
61
61
  }
62
- if (!entry?.access_token)
62
+ if (!entry?.access_token) {
63
+ process.stderr.write("[llm] readHermesOAuthToken: no access_token in auth file\n");
63
64
  return null;
65
+ }
64
66
  if (entry.expires_at && Date.now() / 1000 > entry.expires_at) {
65
67
  frameworkLogger.log("llm-governance", "hermes-token-expired", "warning", { expiresAt: entry.expires_at });
66
68
  return null;
@@ -82,16 +84,25 @@ function getConfig() {
82
84
  const directModel = process.env.XRAY_LLM_MODEL ||
83
85
  process.env.XRAY_GOVERNANCE_LLM_MODEL ||
84
86
  "gpt-4o";
87
+ // First try: direct env-var config (highest priority)
85
88
  const directEnabled = process.env.XRAY_GOVERNANCE_LLM_ENABLED === "true" ||
86
89
  process.env.XRAY_LLM_ENABLED === "true";
87
90
  if (directEnabled && directEndpoint && directApiKey) {
88
91
  return { endpoint: directEndpoint, apiKey: directApiKey, model: directModel };
89
92
  }
93
+ // Second try: Hermes xAI OAuth token from ~/.hermes/auth.json
90
94
  const hermesToken = readHermesOAuthToken();
91
95
  if (hermesToken) {
92
96
  frameworkLogger.log("llm-governance", "using-hermes-oauth", "info", { provider: "xai-oauth", endpoint: XAI_ENDPOINT, model: XAI_MODEL });
93
97
  return { endpoint: XAI_ENDPOINT, apiKey: hermesToken, model: XAI_MODEL };
94
98
  }
99
+ // Third try: direct endpoint even without explicit enable flag (if endpoint+key set)
100
+ if (directEndpoint && directApiKey) {
101
+ return { endpoint: directEndpoint, apiKey: directApiKey, model: directModel };
102
+ }
103
+ if (process.env.DEBUG_LLM) {
104
+ process.stderr.write("[llm-debug] No config found. directEnabled=" + directEnabled + " endpoint=" + !!directEndpoint + " apiKey=" + !!directApiKey + " hermes=" + !!hermesToken + "\n");
105
+ }
95
106
  return null;
96
107
  }
97
108
  function parseVote(text) {
@@ -111,8 +122,10 @@ function parseVote(text) {
111
122
  export async function tryLLMGovernance(role, proposalTitle, proposalDescription, evidence, proposalType) {
112
123
  const config = getConfig();
113
124
  if (!config) {
125
+ process.stderr.write("[llm] no config for role=" + role + "\n");
114
126
  return null;
115
127
  }
128
+ process.stderr.write("[llm] using config endpoint=" + config.endpoint + " model=" + config.model + "\n");
116
129
  const systemPrompt = ROLE_PROMPTS[role];
117
130
  const userMessage = `## Proposal
118
131
 
package/dist/index.js CHANGED
@@ -4,13 +4,13 @@
4
4
  * This is the main entry point for the 0xRay framework.
5
5
  * It exports the core initialization function and key components.
6
6
  */
7
- export { XrayOrchestrator, StringRayOrchestrator } from "./orchestrator/orchestrator.js";
8
- export { XrayStateManager, StringRayStateManager } from "./state/index.js";
7
+ export { XrayOrchestrator } from "./orchestrator/orchestrator.js";
8
+ export { XrayStateManager } from "./state/index.js";
9
9
  export { AgentDelegator } from "./delegation/index.js";
10
10
  export { frameworkLogger } from "./core/framework-logger.js";
11
11
  export { BUILTIN_CODEX } from "./core/codex-formatter.js";
12
12
  import { defaultXrayConfig } from "./core/index.js";
13
- export { defaultXrayConfig, defaultXrayConfig as defaultStringRayConfig };
13
+ export { defaultXrayConfig };
14
14
  export { OpenClawIntegration, initializeOpenClawIntegration, getOpenClawIntegration, shutdownOpenClawIntegration } from "./integrations/openclaw/index.js";
15
15
  // Main initialization function
16
16
  export function initializeXray(config = {}) {
@@ -22,5 +22,3 @@ export function initializeXray(config = {}) {
22
22
  message: "0xRay framework initialized successfully",
23
23
  };
24
24
  }
25
- // Backward compat alias
26
- export { initializeXray as initializeStringRay };