0xray 3.0.14 → 3.1.0

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 (95) hide show
  1. package/.opencode/hooks/post-commit +1 -1
  2. package/.opencode/init.sh +4 -4
  3. package/AGENTS.md +2 -2
  4. package/dist/AGENTS.md +2 -2
  5. package/dist/CHANGELOG.md +9 -0
  6. package/dist/benchmark/performance-benchmark.js +4 -2
  7. package/dist/cli/commands/hermes-install.js +4 -4
  8. package/dist/cli/commands/mcp-install.js +1 -1
  9. package/dist/cli/commands/openclaw-install.js +1 -1
  10. package/dist/cli/commands/plugin-commands.js +2 -2
  11. package/dist/cli/commands/publish-agent.js +5 -5
  12. package/dist/cli/commands/skill-install.js +1 -1
  13. package/dist/cli/commands/status.js +3 -3
  14. package/dist/cli/commands/storyteller.js +1 -1
  15. package/dist/cli/index.js +6 -6
  16. package/dist/cli/server.js +4 -4
  17. package/dist/core/boot-orchestrator.js +24 -24
  18. package/dist/core/bridge.mjs +22 -22
  19. package/dist/core/codex-formatter.js +2 -2
  20. package/dist/core/codex-injector.js +5 -5
  21. package/dist/core/config-loader.js +4 -2
  22. package/dist/core/config-paths.js +14 -14
  23. package/dist/core/context-loader.js +8 -5
  24. package/dist/core/index.js +1 -1
  25. package/dist/core/orchestrator.js +1 -1
  26. package/dist/core/system-prompt-generator.js +2 -2
  27. package/dist/core/xray-activation.js +42 -40
  28. package/dist/delegation/agent-delegator.js +2 -2
  29. package/dist/enforcement/enforcer-tools.js +2 -2
  30. package/dist/enforcement/loaders/codex-loader.js +2 -2
  31. package/dist/governance/llm-governance-provider.js +210 -0
  32. package/dist/index.js +8 -6
  33. package/dist/inference/deploy-verifier.js +1 -1
  34. package/dist/inference/inference-cycle.js +7 -7
  35. package/dist/integrations/hermes-agent/__init__.py +72 -72
  36. package/dist/integrations/hermes-agent/after-install.md +14 -14
  37. package/dist/integrations/hermes-agent/bridge.mjs +24 -24
  38. package/dist/integrations/hermes-agent/plugin.yaml +5 -5
  39. package/dist/integrations/hermes-agent/schemas.py +12 -12
  40. package/dist/integrations/hermes-agent/test_plugin.py +117 -117
  41. package/dist/integrations/hermes-agent/tools.py +25 -25
  42. package/dist/integrations/plugins/plugin-registry.js +2 -2
  43. package/dist/mcps/config/server-config-registry.js +10 -10
  44. package/dist/mcps/connection/mcp-connection.js +1 -1
  45. package/dist/mcps/framework-help.server.js +6 -6
  46. package/dist/mcps/knowledge-skills/code-review.server.js +12 -37
  47. package/dist/mcps/knowledge-skills/security-audit.server.js +12 -42
  48. package/dist/mcps/knowledge-skills/ui-ux-design.server.js +2 -2
  49. package/dist/mcps/lint.server.js +2 -2
  50. package/dist/mcps/mcp-client.js +5 -5
  51. package/dist/mcps/orchestrator/server.js +2 -2
  52. package/dist/mcps/researcher.server.js +12 -37
  53. package/dist/mcps/simulation/server-simulations.js +3 -3
  54. package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +2 -2
  55. package/dist/orchestrator/intelligent-commit-batcher.js +3 -3
  56. package/dist/orchestrator/multi-agent-orchestration-coordinator.js +9 -9
  57. package/dist/orchestrator/orchestrator.js +10 -8
  58. package/dist/orchestrator/universal-registry-bridge.js +3 -3
  59. package/dist/plugin/xray-codex-injection.js +21 -21
  60. package/dist/postprocessor/PostProcessor.js +5 -5
  61. package/dist/postprocessor/services/RegressionAnalysisService.js +2 -2
  62. package/dist/postprocessor/triggers/GitHookTrigger.js +14 -14
  63. package/dist/processors/implementations/agents-md-validation-processor.js +2 -2
  64. package/dist/processors/implementations/inference-improvement-processor.js +1 -1
  65. package/dist/processors/implementations/log-protection-processor.js +2 -2
  66. package/dist/processors/implementations/publish-preflight-processor.js +3 -3
  67. package/dist/processors/implementations/regression-testing-processor.js +2 -2
  68. package/dist/processors/implementations/session-summary-processor.js +1 -1
  69. package/dist/processors/implementations/storytelling-trigger-processor.js +1 -1
  70. package/dist/reporting/report-formatter.js +1 -1
  71. package/dist/scripts/activate-kernel-pipeline.js +2 -2
  72. package/dist/services/inference-tuner.js +2 -2
  73. package/dist/skills/hermes-agent/SKILL.md +42 -42
  74. package/dist/skills/storyteller/SKILL.md +1 -1
  75. package/dist/state/index.js +2 -1
  76. package/dist/state/state-manager.js +3 -3
  77. package/dist/utils/token-manager.js +1 -1
  78. package/dist/validation/estimation-validator.js +1 -1
  79. package/package.json +1 -1
  80. package/scripts/node/pre-publish-guard.js +13 -9
  81. package/scripts/node/universal-version-manager.js +2 -2
  82. package/src/mcps/config/__tests__/server-config-registry.test.ts +12 -12
  83. package/src/mcps/config/server-config-registry.ts +10 -10
  84. package/src/mcps/connection/mcp-connection.ts +1 -1
  85. package/src/mcps/framework-help.server.ts +6 -6
  86. package/src/mcps/knowledge-skills/code-review.server.ts +19 -34
  87. package/src/mcps/knowledge-skills/security-audit.server.ts +19 -38
  88. package/src/mcps/knowledge-skills/ui-ux-design.server.ts +2 -2
  89. package/src/mcps/lint.server.ts +2 -2
  90. package/src/mcps/mcp-client.ts +5 -5
  91. package/src/mcps/orchestrator/server.ts +2 -2
  92. package/src/mcps/researcher.server.ts +19 -34
  93. package/src/mcps/simulation/server-simulations.ts +3 -3
  94. package/src/skills/hermes-agent/SKILL.md +42 -42
  95. package/src/skills/storyteller/SKILL.md +1 -1
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  /**
4
- * StringRay Framework Bridge for Hermes Agent
4
+ * Xray Framework Bridge for Hermes Agent
5
5
  *
6
- * Provides direct access to StringRay framework components
6
+ * Provides direct access to Xray framework components
7
7
  * (ProcessorManager, QualityGate, StateManager) from Python.
8
8
  * Uses JSON stdin/stdout protocol for IPC.
9
9
  *
@@ -44,7 +44,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
44
44
 
45
45
  // ── Framework components (lazy-loaded) ───────────────────────
46
46
  let ProcessorManager = null;
47
- let StrRayStateManager = null;
47
+ let XrayStateManager = null;
48
48
  let featuresConfigLoader = null;
49
49
  let runQualityGateWithLogging = null;
50
50
  let enforcerValidators = null;
@@ -53,7 +53,7 @@ let frameworkLoadAttempted = false;
53
53
 
54
54
  // ── Project root detection ───────────────────────────────────
55
55
  function findProjectRoot() {
56
- const envHome = process.env.STRRAY_HOME;
56
+ const envHome = process.env.XRAY_HOME;
57
57
  if (envHome && existsSync(join(envHome, "package.json"))) return envHome;
58
58
 
59
59
  const candidates = [
@@ -67,7 +67,7 @@ function findProjectRoot() {
67
67
  const pkgPath = join(dir, "package.json");
68
68
  if (existsSync(pkgPath)) {
69
69
  const pkg = JSON.parse(readFileSync(pkgPath, "utf-8"));
70
- if (pkg.name === "strray-ai" || pkg.dependencies?.["strray-ai"] || pkg.name === "0xray" || pkg.dependencies?.["0xray"]) {
70
+ if (pkg.name === "0xray" || pkg.dependencies?.["0xray"] || pkg.name === "0xray" || pkg.dependencies?.["0xray"]) {
71
71
  return dir;
72
72
  }
73
73
  }
@@ -149,11 +149,11 @@ async function loadFramework(projectRoot) {
149
149
  }
150
150
  }
151
151
 
152
- if (!StrRayStateManager) {
152
+ if (!XrayStateManager) {
153
153
  const smPath = join(distDir, "state", "state-manager.js");
154
154
  if (existsSync(smPath)) {
155
155
  const sm = await import(smPath);
156
- StrRayStateManager = sm.StrRayStateManager;
156
+ XrayStateManager = sm.XrayStateManager;
157
157
  }
158
158
  }
159
159
 
@@ -230,15 +230,15 @@ async function runQualityGateCheck(context, projectRoot, logDir) {
230
230
 
231
231
  // ── Processor Pipeline ───────────────────────────────────────
232
232
  async function runProcessors(tool, args, phase, projectRoot, logDir) {
233
- if (!ProcessorManager || !StrRayStateManager) {
233
+ if (!ProcessorManager || !XrayStateManager) {
234
234
  return { ran: false, reason: "framework modules not loaded" };
235
235
  }
236
236
 
237
237
  const logger = new BridgeLogger(logDir);
238
238
 
239
239
  try {
240
- const stateDir = join(projectRoot, ".strray", "state");
241
- const stateManager = new StrRayStateManager(stateDir);
240
+ const stateDir = join(projectRoot, ".xray", "state");
241
+ const stateManager = new XrayStateManager(stateDir);
242
242
  const processorManager = new ProcessorManager(stateManager);
243
243
 
244
244
  // Register processors matching OpenCode plugin
@@ -353,7 +353,7 @@ async function handleHealth(input) {
353
353
  const components = {
354
354
  qualityGate: !!runQualityGateWithLogging,
355
355
  processorManager: !!ProcessorManager,
356
- stateManager: !!StrRayStateManager,
356
+ stateManager: !!XrayStateManager,
357
357
  featuresConfig: !!featuresConfigLoader,
358
358
  };
359
359
 
@@ -563,7 +563,7 @@ function handleHooks(input, projectRoot) {
563
563
  const { action, hooks } = input;
564
564
  const hookTypes = hooks || ["pre-commit", "post-commit", "pre-push", "post-push"];
565
565
  const gitHooksDir = join(projectRoot, ".git", "hooks");
566
- const strrayHooksDir = join(projectRoot, "hooks");
566
+ const xrayHooksDir = join(projectRoot, "hooks");
567
567
 
568
568
  if (!existsSync(gitHooksDir)) {
569
569
  return { error: "Not a git repository — no .git/hooks directory" };
@@ -575,14 +575,14 @@ function handleHooks(input, projectRoot) {
575
575
  if (action === "list" || action === "status") {
576
576
  for (const hookName of hookTypes) {
577
577
  const gitHook = join(gitHooksDir, hookName);
578
- const strrayHook = join(strrayHooksDir, hookName);
578
+ const xrayHook = join(xrayHooksDir, hookName);
579
579
 
580
580
  if (!existsSync(gitHook)) {
581
581
  result.missing.push(hookName);
582
582
  } else {
583
583
  try {
584
584
  const content = readFileSync(gitHook, "utf-8");
585
- if (content.includes("StringRay") || content.includes("strray") || content.includes("run-hook.js")) {
585
+ if (content.includes("Xray") || content.includes("xray") || content.includes("strray") || content.includes("run-hook.js")) {
586
586
  result.managed.push(hookName);
587
587
  } else {
588
588
  result.external.push(hookName);
@@ -592,8 +592,8 @@ function handleHooks(input, projectRoot) {
592
592
  }
593
593
  }
594
594
 
595
- // Check if strray source hook exists
596
- if (!existsSync(strrayHook)) {
595
+ // Check if xray source hook exists
596
+ if (!existsSync(xrayHook)) {
597
597
  result.stale.push(hookName);
598
598
  }
599
599
  }
@@ -603,7 +603,7 @@ function handleHooks(input, projectRoot) {
603
603
  action,
604
604
  hooks: result,
605
605
  gitHooksDir,
606
- strrayHooksDir,
606
+ xrayHooksDir,
607
607
  };
608
608
  }
609
609
 
@@ -614,7 +614,7 @@ function handleHooks(input, projectRoot) {
614
614
  const errors = [];
615
615
 
616
616
  for (const hookName of hookTypes) {
617
- const src = join(strrayHooksDir, hookName);
617
+ const src = join(xrayHooksDir, hookName);
618
618
  const dst = join(gitHooksDir, hookName);
619
619
 
620
620
  if (!existsSync(src)) {
@@ -623,11 +623,11 @@ function handleHooks(input, projectRoot) {
623
623
  }
624
624
 
625
625
  try {
626
- // Backup existing non-strray hooks
626
+ // Backup existing non-xray hooks
627
627
  if (existsSync(dst)) {
628
628
  const content = readFileSync(dst, "utf-8");
629
- if (!content.includes("StringRay") && !content.includes("strray") && !content.includes("run-hook.js")) {
630
- renameSync(dst, `${dst}.strray-backup`);
629
+ if (!content.includes("Xray") && !content.includes("xray") && !content.includes("strray") && !content.includes("run-hook.js")) {
630
+ renameSync(dst, `${dst}.xray-backup`);
631
631
  } else {
632
632
  unlinkSync(dst);
633
633
  }
@@ -659,15 +659,15 @@ function handleHooks(input, projectRoot) {
659
659
 
660
660
  for (const hookName of hookTypes) {
661
661
  const dst = join(gitHooksDir, hookName);
662
- const backup = `${dst}.strray-backup`;
662
+ const backup = `${dst}.xray-backup`;
663
663
 
664
664
  if (!existsSync(dst)) continue;
665
665
 
666
666
  try {
667
667
  const content = readFileSync(dst, "utf-8");
668
- const isStrray = content.includes("StringRay") || content.includes("strray") || content.includes("run-hook.js");
668
+ const isXray = content.includes("Xray") || content.includes("xray") || content.includes("strray") || content.includes("run-hook.js");
669
669
 
670
- if (isStrray || lstatSync(dst).isSymbolicLink()) {
670
+ if (isXray || lstatSync(dst).isSymbolicLink()) {
671
671
  unlinkSync(dst);
672
672
 
673
673
  // Restore backup if exists
@@ -1,12 +1,12 @@
1
- name: strray-hermes
1
+ name: xray-hermes
2
2
  version: 2.2.0
3
3
  description: 0xRay AI integration plugin — auto-enforcement hooks, quality gates, git hooks, and tool awareness for Hermes Agent
4
4
  author: 0xRay AI
5
5
  provides_tools:
6
- - strray_validate
7
- - strray_codex_check
8
- - strray_health
9
- - strray_hooks
6
+ - xray_validate
7
+ - xray_codex_check
8
+ - xray_health
9
+ - xray_hooks
10
10
  provides_hooks:
11
11
  - pre_tool_call
12
12
  - post_tool_call
@@ -1,9 +1,9 @@
1
1
  """Tool schemas — what the LLM sees."""
2
2
 
3
- STRRAY_VALIDATE = {
4
- "name": "strray_validate",
3
+ XRAY_VALIDATE = {
4
+ "name": "xray_validate",
5
5
  "description": (
6
- "Run StringRay pre-commit validation on specified files. "
6
+ "Run Xray pre-commit validation on specified files. "
7
7
  "Checks codex compliance, rule validation, and quality gates. "
8
8
  "Use this before committing any code changes. Returns pass/fail "
9
9
  "with actionable remediation for any violations."
@@ -26,8 +26,8 @@ STRRAY_VALIDATE = {
26
26
  },
27
27
  }
28
28
 
29
- STRRAY_CODEX_CHECK = {
30
- "name": "strray_codex_check",
29
+ XRAY_CODEX_CHECK = {
30
+ "name": "xray_codex_check",
31
31
  "description": (
32
32
  "Validate code against the Universal Development Codex (60 error-prevention terms). "
33
33
  "Checks error-handling, type-safety, performance, security, and architecture patterns. "
@@ -57,12 +57,12 @@ STRRAY_CODEX_CHECK = {
57
57
  },
58
58
  }
59
59
 
60
- STRRAY_HEALTH = {
61
- "name": "strray_health",
60
+ XRAY_HEALTH = {
61
+ "name": "xray_health",
62
62
  "description": (
63
- "Run StringRay framework health check. Returns version, agent count, "
63
+ "Run Xray framework health check. Returns version, agent count, "
64
64
  "MCP server status, and enforcement statistics. Use to verify the "
65
- "StringRay integration is working correctly."
65
+ "Xray integration is working correctly."
66
66
  ),
67
67
  "parameters": {
68
68
  "type": "object",
@@ -70,10 +70,10 @@ STRRAY_HEALTH = {
70
70
  },
71
71
  }
72
72
 
73
- STRRAY_HOOKS = {
74
- "name": "strray_hooks",
73
+ XRAY_HOOKS = {
74
+ "name": "xray_hooks",
75
75
  "description": (
76
- "Manage StringRay git hooks (install, uninstall, list, status). "
76
+ "Manage Xray git hooks (install, uninstall, list, status). "
77
77
  "Installs pre-commit, post-commit, pre-push, and post-push hooks "
78
78
  "that run TypeScript validation, Codex checks, and monitoring. "
79
79
  "Use 'install' to set up all hooks, 'list' to see current status."