0xray 2.0.1 ā 2.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.
- package/.opencode/codex.codex +1 -1
- package/.opencode/commands/dependency-audit.md +3 -3
- package/.opencode/enforcer-config.json +2 -2
- package/.opencode/hooks/post-commit +1 -1
- package/.opencode/init.sh +2 -2
- package/AGENTS.md +1 -1
- package/README.md +2 -2
- package/dist/AGENTS.md +1 -1
- package/dist/CHANGELOG.md +10 -0
- package/dist/README.md +2 -2
- package/dist/analytics/routing-refiner.js +1 -1
- package/dist/benchmark/performance-benchmark.d.ts +2 -2
- package/dist/benchmark/performance-benchmark.js +3 -3
- package/dist/cli/commands/hermes-install.js +4 -4
- package/dist/cli/commands/mcp-install.js +1 -1
- package/dist/cli/commands/openclaw-install.js +1 -1
- package/dist/cli/commands/plugin-commands.js +2 -2
- package/dist/cli/commands/publish-agent.js +5 -5
- package/dist/cli/commands/skill-install.js +1 -1
- package/dist/cli/commands/status.js +3 -3
- package/dist/cli/commands/storyteller.js +2 -2
- package/dist/cli/index.js +8 -8
- package/dist/cli/server.js +1 -1
- package/dist/core/agent-spawn-gate.d.ts +1 -1
- package/dist/core/agent-spawn-gate.js +1 -1
- package/dist/core/boot-orchestrator.d.ts +4 -4
- package/dist/core/boot-orchestrator.js +27 -27
- package/dist/core/bridge.mjs +22 -22
- package/dist/core/codex-formatter.js +2 -2
- package/dist/core/codex-injector.d.ts +4 -3
- package/dist/core/codex-injector.js +11 -10
- package/dist/core/config-loader.d.ts +5 -4
- package/dist/core/config-loader.js +4 -2
- package/dist/core/config-paths.d.ts +9 -8
- package/dist/core/config-paths.js +24 -23
- package/dist/core/context-loader.d.ts +4 -3
- package/dist/core/context-loader.js +7 -5
- package/dist/core/features-config.js +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/orchestrator.d.ts +1 -0
- package/dist/core/orchestrator.js +3 -2
- package/dist/core/system-prompt-generator.js +2 -2
- package/dist/core/xray-activation.d.ts +4 -4
- package/dist/core/xray-activation.js +29 -24
- package/dist/delegation/agent-delegator.d.ts +3 -3
- package/dist/delegation/agent-delegator.js +3 -3
- package/dist/delegation/metrics-aggregator.d.ts +11 -11
- package/dist/delegation/session-coordinator.d.ts +3 -3
- package/dist/delegation/voting-coordinator.d.ts +3 -3
- package/dist/enforcement/enforcer-tools.js +2 -2
- package/dist/enforcement/loaders/codex-loader.d.ts +1 -1
- package/dist/enforcement/loaders/codex-loader.js +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/inference/deploy-verifier.js +1 -1
- package/dist/inference/inference-cycle.js +7 -7
- package/dist/integrations/base/README.md +2 -2
- package/dist/integrations/governance/index.js +1 -1
- package/dist/integrations/grok/grok-cli.d.ts +1 -1
- package/dist/integrations/grok/grok-cli.js +6 -6
- package/dist/integrations/grok/hooks/pre-tool-use.js +1 -1
- package/dist/integrations/grok/plugin/0xray/.mcp.json +3 -3
- package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
- package/dist/integrations/hermes-agent/__init__.py +77 -71
- package/dist/integrations/hermes-agent/__pycache__/__init__.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/conftest.cpython-313-pytest-9.0.2.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/schemas.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313-pytest-9.0.2.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/__pycache__/tools.cpython-313.pyc +0 -0
- package/dist/integrations/hermes-agent/after-install.md +14 -14
- package/dist/integrations/hermes-agent/bridge.mjs +14 -14
- package/dist/integrations/hermes-agent/logs/framework/routing-outcomes.json +1 -0
- package/dist/integrations/hermes-agent/plugin.yaml +5 -5
- package/dist/integrations/hermes-agent/schemas.py +12 -12
- package/dist/integrations/hermes-agent/test_plugin.py +128 -125
- package/dist/integrations/hermes-agent/tools.py +85 -23
- package/dist/integrations/openclaw/README.md +16 -16
- package/dist/integrations/openclaw/api-server.d.ts +4 -4
- package/dist/integrations/openclaw/api-server.js +9 -9
- package/dist/integrations/openclaw/config.js +1 -1
- package/dist/integrations/openclaw/hooks/{strray-hooks.d.ts ā xray-hooks.d.ts} +4 -4
- package/dist/integrations/openclaw/index.d.ts +4 -4
- package/dist/integrations/openclaw/index.js +4 -4
- package/dist/integrations/openclaw/types.d.ts +1 -1
- package/dist/integrations/plugins/plugin-registry.js +2 -2
- package/dist/mcps/architect-tools.server.d.ts +2 -2
- package/dist/mcps/architect-tools.server.js +4 -4
- package/dist/mcps/auto-format.server.d.ts +2 -2
- package/dist/mcps/auto-format.server.js +4 -4
- package/dist/mcps/boot-orchestrator.server.d.ts +2 -2
- package/dist/mcps/boot-orchestrator.server.js +4 -4
- package/dist/mcps/config/server-config-registry.d.ts +1 -1
- package/dist/mcps/config/server-config-registry.js +7 -7
- package/dist/mcps/connection/mcp-connection.js +1 -1
- package/dist/mcps/enforcer-tools.server.d.ts +2 -2
- package/dist/mcps/enforcer-tools.server.js +4 -4
- package/dist/mcps/estimation.server.js +1 -1
- package/dist/mcps/framework-compliance-audit.server.d.ts +2 -2
- package/dist/mcps/framework-compliance-audit.server.js +4 -4
- package/dist/mcps/framework-help.server.js +7 -7
- package/dist/mcps/governance.server.js +1 -1
- package/dist/mcps/in-process-skill-registry.js +6 -6
- package/dist/mcps/knowledge-skills/api-design.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/api-design.server.js +4 -4
- package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +4 -4
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +1 -1
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +1 -1
- package/dist/mcps/knowledge-skills/code-review.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/code-review.server.js +4 -4
- package/dist/mcps/knowledge-skills/content-creator.server.js +1 -1
- package/dist/mcps/knowledge-skills/database-design.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/database-design.server.js +4 -4
- package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +4 -4
- package/dist/mcps/knowledge-skills/git-workflow.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/git-workflow.server.js +4 -4
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +1 -1
- package/dist/mcps/knowledge-skills/log-monitor.server.js +1 -1
- package/dist/mcps/knowledge-skills/mobile-development.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/mobile-development.server.js +4 -4
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +1 -1
- package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +4 -4
- package/dist/mcps/knowledge-skills/project-analysis.server.js +1 -1
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +4 -4
- package/dist/mcps/knowledge-skills/security-audit.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/security-audit.server.js +4 -4
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +1 -1
- package/dist/mcps/knowledge-skills/session-management.server.js +1 -1
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +1 -1
- package/dist/mcps/knowledge-skills/strategist.server.js +1 -1
- package/dist/mcps/knowledge-skills/tech-writer.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/tech-writer.server.js +5 -5
- package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js +4 -4
- package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +4 -4
- package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +2 -2
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +6 -6
- package/dist/mcps/lint.server.d.ts +2 -2
- package/dist/mcps/lint.server.js +6 -6
- package/dist/mcps/mcp-client.js +3 -3
- package/dist/mcps/model-health-check.server.d.ts +2 -2
- package/dist/mcps/model-health-check.server.js +4 -4
- package/dist/mcps/orchestrator/server.js +2 -2
- package/dist/mcps/performance-analysis.server.d.ts +2 -2
- package/dist/mcps/performance-analysis.server.js +4 -4
- package/dist/mcps/processor-pipeline.server.d.ts +2 -2
- package/dist/mcps/processor-pipeline.server.js +4 -4
- package/dist/mcps/registry.json +1 -1
- package/dist/mcps/researcher.server.d.ts +3 -3
- package/dist/mcps/researcher.server.js +5 -5
- package/dist/mcps/security-scan.server.d.ts +2 -2
- package/dist/mcps/security-scan.server.js +4 -4
- package/dist/mcps/simulation/server-simulations.js +3 -3
- package/dist/mcps/state-manager.server.js +1 -1
- package/dist/metrics/agent-metrics.d.ts +4 -4
- package/dist/metrics/agent-metrics.js +1 -1
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.d.ts +2 -2
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +2 -2
- package/dist/orchestrator/intelligent-commit-batcher.d.ts +1 -1
- package/dist/orchestrator/intelligent-commit-batcher.js +3 -3
- package/dist/orchestrator/multi-agent-orchestration-coordinator.d.ts +3 -3
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js +9 -9
- package/dist/orchestrator/orchestrator.d.ts +3 -2
- package/dist/orchestrator/orchestrator.js +8 -6
- package/dist/orchestrator/universal-registry-bridge.js +1 -1
- package/dist/plugin/xray-codex-injection.d.ts +1 -1
- package/dist/plugin/xray-codex-injection.js +8 -7
- package/dist/postprocessor/PostProcessor.d.ts +2 -2
- package/dist/postprocessor/PostProcessor.js +1 -1
- package/dist/postprocessor/monitoring/MonitoringEngine.d.ts +2 -2
- package/dist/postprocessor/services/RegressionAnalysisService.js +2 -2
- package/dist/postprocessor/triggers/GitHookTrigger.js +14 -14
- package/dist/processors/implementations/agents-md-validation-processor.js +2 -2
- package/dist/processors/implementations/inference-improvement-processor.js +2 -2
- package/dist/processors/implementations/log-protection-processor.d.ts +1 -1
- package/dist/processors/implementations/log-protection-processor.js +2 -2
- package/dist/processors/implementations/publish-preflight-processor.d.ts +1 -1
- package/dist/processors/implementations/publish-preflight-processor.js +3 -3
- package/dist/processors/implementations/regression-testing-processor.js +2 -2
- package/dist/processors/implementations/session-summary-processor.js +2 -2
- package/dist/processors/implementations/storytelling-trigger-processor.js +2 -2
- package/dist/processors/processor-manager.d.ts +2 -2
- package/dist/public/about.html +6 -6
- package/dist/public/enterprise.html +1 -1
- package/dist/public/features.html +2 -2
- package/dist/public/index.html +4 -4
- package/dist/reporting/report-formatter.js +1 -1
- package/dist/scripts/activate-kernel-pipeline.js +2 -2
- package/dist/scripts/pre-command +1 -1
- package/dist/services/inference-tuner.js +2 -2
- package/dist/session/session-cleanup-manager.d.ts +3 -3
- package/dist/session/session-monitor.d.ts +3 -3
- package/dist/session/session-state-manager.d.ts +3 -3
- package/dist/skills/hermes-agent/SKILL.md +12 -12
- package/dist/skills/registry.json +1 -1
- package/dist/skills/storyteller/SKILL.md +1 -1
- package/dist/skills/xray-orchestrator/SKILL.md +141 -0
- package/dist/skills/xray-orchestrator/index.d.ts +13 -0
- package/dist/skills/xray-orchestrator/index.js +224 -0
- package/dist/state/index.d.ts +2 -1
- package/dist/state/index.js +2 -1
- package/dist/state/state-manager.d.ts +2 -2
- package/dist/state/state-manager.js +5 -4
- package/dist/utils/import-resolver.js +1 -1
- package/dist/utils/path-resolver.js +2 -2
- package/dist/utils/token-manager.js +1 -1
- package/dist/validation/estimation-validator.js +1 -1
- package/package.json +2 -2
- package/scripts/hooks/pre-command +1 -1
- package/scripts/hooks/run-hook.js +2 -2
- package/scripts/node/auto-reflection-generator.mjs +2 -2
- package/scripts/node/postinstall.cjs +1 -1
- package/scripts/node/pre-publish-guard.js +16 -10
- package/scripts/node/release.js +6 -6
- package/scripts/node/release.mjs +11 -11
- package/scripts/node/universal-version-manager.js +2 -2
- package/scripts/node/version-manager.mjs +1 -1
- package/src/integrations/grok/plugin/0xray/.mcp.json +3 -3
- package/src/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
- package/src/mcps/architect-tools.server.ts +4 -4
- package/src/mcps/auto-format.server.ts +4 -4
- package/src/mcps/boot-orchestrator.server.ts +4 -4
- package/src/mcps/config/server-config-registry.ts +7 -7
- package/src/mcps/connection/mcp-connection.ts +1 -1
- package/src/mcps/enforcer-tools.server.ts +4 -4
- package/src/mcps/estimation.server.ts +1 -1
- package/src/mcps/framework-compliance-audit.server.ts +4 -4
- package/src/mcps/framework-help.server.ts +7 -7
- package/src/mcps/governance.server.ts +1 -1
- package/src/mcps/in-process-skill-registry.ts +6 -6
- package/src/mcps/knowledge-skills/api-design.server.test.ts +8 -8
- package/src/mcps/knowledge-skills/api-design.server.ts +4 -4
- package/src/mcps/knowledge-skills/architecture-patterns.server.ts +4 -4
- package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +1 -1
- package/src/mcps/knowledge-skills/code-analyzer.server.ts +1 -1
- package/src/mcps/knowledge-skills/code-review.server.ts +4 -4
- package/src/mcps/knowledge-skills/content-creator.server.ts +1 -1
- package/src/mcps/knowledge-skills/database-design.server.ts +4 -4
- package/src/mcps/knowledge-skills/devops-deployment.server.ts +4 -4
- package/src/mcps/knowledge-skills/git-workflow.server.ts +4 -4
- package/src/mcps/knowledge-skills/growth-strategist.server.ts +1 -1
- package/src/mcps/knowledge-skills/log-monitor.server.ts +1 -1
- package/src/mcps/knowledge-skills/mobile-development.server.ts +4 -4
- package/src/mcps/knowledge-skills/multimodal-looker.server.ts +1 -1
- package/src/mcps/knowledge-skills/performance-optimization.server.ts +4 -4
- package/src/mcps/knowledge-skills/project-analysis.server.ts +1 -1
- package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +4 -4
- package/src/mcps/knowledge-skills/security-audit.server.test.ts +23 -23
- package/src/mcps/knowledge-skills/security-audit.server.ts +4 -4
- package/src/mcps/knowledge-skills/seo-consultant.server.ts +1 -1
- package/src/mcps/knowledge-skills/session-management.server.ts +1 -1
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +1 -1
- package/src/mcps/knowledge-skills/strategist.server.ts +1 -1
- package/src/mcps/knowledge-skills/tech-writer.server.ts +5 -5
- package/src/mcps/knowledge-skills/testing-best-practices.server.test.ts +28 -28
- package/src/mcps/knowledge-skills/testing-best-practices.server.ts +4 -4
- package/src/mcps/knowledge-skills/testing-strategy.server.test.ts +19 -19
- package/src/mcps/knowledge-skills/testing-strategy.server.ts +4 -4
- package/src/mcps/knowledge-skills/ui-ux-design.server.ts +6 -6
- package/src/mcps/lint.server.ts +6 -6
- package/src/mcps/mcp-client.ts +3 -3
- package/src/mcps/model-health-check.server.ts +4 -4
- package/src/mcps/orchestrator/server.ts +2 -2
- package/src/mcps/performance-analysis.server.ts +4 -4
- package/src/mcps/processor-pipeline.server.ts +4 -4
- package/src/mcps/registry.json +1 -1
- package/src/mcps/researcher.server.ts +5 -5
- package/src/mcps/security-scan.server.ts +4 -4
- package/src/mcps/simulation/server-simulations.ts +3 -3
- package/src/mcps/state-manager.server.ts +1 -1
- package/src/opencode/codex.codex +1 -1
- package/src/opencode/commands/dependency-audit.md +3 -3
- package/src/opencode/enforcer-config.json +2 -2
- package/src/skills/hermes-agent/SKILL.md +12 -12
- package/src/skills/registry.json +1 -1
- package/src/skills/storyteller/SKILL.md +1 -1
- package/src/skills/xray-orchestrator/SKILL.md +141 -0
- package/src/skills/xray-orchestrator/index.ts +268 -0
- package/scripts/validate-stringray-comprehensive.js +0 -636
- /package/dist/integrations/openclaw/hooks/{strray-hooks.js ā xray-hooks.js} +0 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* xray Orchestrator Skill
|
|
3
|
+
*
|
|
4
|
+
* OpenClaw skill that provides xray orchestration commands.
|
|
5
|
+
*
|
|
6
|
+
* @version 1.0.0
|
|
7
|
+
* @since 2026-03-14
|
|
8
|
+
*/
|
|
9
|
+
const API_BASE = process.env.XRAY_API_URL || 'http://localhost:18431';
|
|
10
|
+
const API_KEY = process.env.XRAY_API_KEY;
|
|
11
|
+
function parseArgs(input) {
|
|
12
|
+
const parts = input.trim().split(/\s+/);
|
|
13
|
+
const command = parts[0] || '';
|
|
14
|
+
const args = {};
|
|
15
|
+
for (const part of parts.slice(1)) {
|
|
16
|
+
if (part.startsWith('--')) {
|
|
17
|
+
const key = part.slice(2);
|
|
18
|
+
args[key] = true;
|
|
19
|
+
}
|
|
20
|
+
else if (part.includes(':')) {
|
|
21
|
+
const colonIdx = part.indexOf(':');
|
|
22
|
+
const key = part.slice(0, colonIdx);
|
|
23
|
+
const value = part.slice(colonIdx + 1);
|
|
24
|
+
if (key && value)
|
|
25
|
+
args[key] = value;
|
|
26
|
+
}
|
|
27
|
+
else if (!args._) {
|
|
28
|
+
args._ = [];
|
|
29
|
+
args._.push(part);
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
args._.push(part);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { command, args };
|
|
36
|
+
}
|
|
37
|
+
async function callAPI(endpoint, data) {
|
|
38
|
+
const headers = {
|
|
39
|
+
'Content-Type': 'application/json',
|
|
40
|
+
};
|
|
41
|
+
if (API_KEY) {
|
|
42
|
+
headers['Authorization'] = `Bearer ${API_KEY}`;
|
|
43
|
+
}
|
|
44
|
+
const response = await fetch(`${API_BASE}${endpoint}`, {
|
|
45
|
+
method: data ? 'POST' : 'GET',
|
|
46
|
+
headers,
|
|
47
|
+
body: data ? JSON.stringify(data) : null,
|
|
48
|
+
});
|
|
49
|
+
if (!response.ok) {
|
|
50
|
+
const error = await response.json().catch(() => ({ error: 'Unknown error' }));
|
|
51
|
+
throw new Error(error.error || `HTTP ${response.status}`);
|
|
52
|
+
}
|
|
53
|
+
return response.json();
|
|
54
|
+
}
|
|
55
|
+
export async function handleSkill(input) {
|
|
56
|
+
const { command, args } = parseArgs(input);
|
|
57
|
+
try {
|
|
58
|
+
switch (command.toLowerCase()) {
|
|
59
|
+
// xray primary
|
|
60
|
+
case 'xray':
|
|
61
|
+
case 'xray-status':
|
|
62
|
+
return await handleStatus();
|
|
63
|
+
case 'xray-analyze':
|
|
64
|
+
return await handleAnalyze(args);
|
|
65
|
+
case 'xray-code':
|
|
66
|
+
return await handleCodeReview(args);
|
|
67
|
+
case 'xray-file':
|
|
68
|
+
return await handleFileRead(args);
|
|
69
|
+
case 'xray-exec':
|
|
70
|
+
return await handleExec(args);
|
|
71
|
+
case 'xray-help':
|
|
72
|
+
return handleHelp(args._);
|
|
73
|
+
default:
|
|
74
|
+
return formatHelp();
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (error) {
|
|
78
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
79
|
+
return `ā Error: ${message}`;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async function handleStatus() {
|
|
83
|
+
const health = await callAPI('/health');
|
|
84
|
+
return `š¤ xray Status
|
|
85
|
+
|
|
86
|
+
⢠Status: ${health.status}
|
|
87
|
+
⢠Version: ${health.version}
|
|
88
|
+
⢠Uptime: ${formatUptime(health.uptime)}
|
|
89
|
+
|
|
90
|
+
Use /xray-help for available commands.`;
|
|
91
|
+
}
|
|
92
|
+
async function handleAnalyze(args) {
|
|
93
|
+
const filePath = args._?.[0];
|
|
94
|
+
if (!filePath) {
|
|
95
|
+
return 'ā Usage: /xray-analyze <file-path>';
|
|
96
|
+
}
|
|
97
|
+
const result = await callAPI('/api/agent/invoke', {
|
|
98
|
+
command: 'analyze',
|
|
99
|
+
args: { filePath },
|
|
100
|
+
});
|
|
101
|
+
if (!result.success) {
|
|
102
|
+
return `ā Analysis failed: ${result.error}`;
|
|
103
|
+
}
|
|
104
|
+
return `ā
Analysis complete for ${filePath}\n\n${JSON.stringify(result.result, null, 2)}`;
|
|
105
|
+
}
|
|
106
|
+
async function handleCodeReview(args) {
|
|
107
|
+
const filePath = args._?.[0];
|
|
108
|
+
const fix = args.fix === true;
|
|
109
|
+
if (!filePath) {
|
|
110
|
+
return 'ā Usage: /xray-code <file-path> [--fix]';
|
|
111
|
+
}
|
|
112
|
+
const result = await callAPI('/api/agent/invoke', {
|
|
113
|
+
command: 'code-review',
|
|
114
|
+
args: { filePath, fix },
|
|
115
|
+
});
|
|
116
|
+
if (!result.success) {
|
|
117
|
+
return `ā Code review failed: ${result.error}`;
|
|
118
|
+
}
|
|
119
|
+
return `ā
Code review complete for ${filePath}\n\n${JSON.stringify(result.result, null, 2)}`;
|
|
120
|
+
}
|
|
121
|
+
async function handleFileRead(args) {
|
|
122
|
+
const rest = args._;
|
|
123
|
+
const filePath = rest?.[0];
|
|
124
|
+
const range = rest?.[1];
|
|
125
|
+
if (!filePath) {
|
|
126
|
+
return 'ā Usage: /xray-file <file-path> [line-start:line-end]';
|
|
127
|
+
}
|
|
128
|
+
let lineRange;
|
|
129
|
+
if (range?.includes(':')) {
|
|
130
|
+
const [rawStart, rawEnd] = range.split(':');
|
|
131
|
+
lineRange = {};
|
|
132
|
+
if (rawStart)
|
|
133
|
+
lineRange.start = Number(rawStart);
|
|
134
|
+
if (rawEnd)
|
|
135
|
+
lineRange.end = Number(rawEnd);
|
|
136
|
+
}
|
|
137
|
+
const result = await callAPI('/api/agent/invoke', {
|
|
138
|
+
command: 'read',
|
|
139
|
+
args: { filePath, ...lineRange },
|
|
140
|
+
});
|
|
141
|
+
if (!result.success) {
|
|
142
|
+
return `ā File read failed: ${result.error}`;
|
|
143
|
+
}
|
|
144
|
+
return `š ${filePath}\n\`\`\`\n${result.result}\n\`\`\``;
|
|
145
|
+
}
|
|
146
|
+
async function handleExec(args) {
|
|
147
|
+
const command = args._?.[0];
|
|
148
|
+
if (!command) {
|
|
149
|
+
return 'ā Usage: /xray-exec <command>';
|
|
150
|
+
}
|
|
151
|
+
const result = await callAPI('/api/agent/invoke', {
|
|
152
|
+
command: 'exec',
|
|
153
|
+
args: { command },
|
|
154
|
+
});
|
|
155
|
+
if (!result.success) {
|
|
156
|
+
return `ā Execution failed: ${result.error}`;
|
|
157
|
+
}
|
|
158
|
+
return `ā
Command executed\n\n${JSON.stringify(result.result, null, 2)}`;
|
|
159
|
+
}
|
|
160
|
+
function handleHelp(command) {
|
|
161
|
+
if (command) {
|
|
162
|
+
switch (command) {
|
|
163
|
+
case 'xray-analyze':
|
|
164
|
+
return `š /xray-analyze <file-path>
|
|
165
|
+
|
|
166
|
+
Analyze code in a file.
|
|
167
|
+
|
|
168
|
+
Example: /xray-analyze src/index.ts`;
|
|
169
|
+
case 'xray-code':
|
|
170
|
+
return `š /xray-code <file-path> [--fix]
|
|
171
|
+
|
|
172
|
+
Perform code review on a file.
|
|
173
|
+
Use --fix to attempt automatic fixes.
|
|
174
|
+
|
|
175
|
+
Example: /xray-code src/utils/helper.ts
|
|
176
|
+
Example: /xray-code src/utils/helper.ts --fix`;
|
|
177
|
+
case 'xray-file':
|
|
178
|
+
return `š /xray-file <file-path> [line-start:line-end]
|
|
179
|
+
|
|
180
|
+
Read a file.
|
|
181
|
+
Optionally specify line range.
|
|
182
|
+
|
|
183
|
+
Example: /xray-file src/index.ts
|
|
184
|
+
Example: /xray-file src/index.ts 1:50`;
|
|
185
|
+
case 'xray-exec':
|
|
186
|
+
return `š /xray-exec <command>
|
|
187
|
+
|
|
188
|
+
Execute an arbitrary command.
|
|
189
|
+
|
|
190
|
+
Example: /xray-exec list files src/`;
|
|
191
|
+
default:
|
|
192
|
+
return `Unknown command: ${command}`;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return formatHelp();
|
|
196
|
+
}
|
|
197
|
+
function formatHelp() {
|
|
198
|
+
return `š¤ xray Orchestrator
|
|
199
|
+
|
|
200
|
+
Available Commands:
|
|
201
|
+
⢠/xray - Show status
|
|
202
|
+
⢠/xray-analyze <file> - Analyze code
|
|
203
|
+
⢠/xray-code <file> [--fix] - Code review
|
|
204
|
+
⢠/xray-file <file> [lines] - Read file
|
|
205
|
+
⢠/xray-exec <command> - Execute command
|
|
206
|
+
⢠/xray-help [command] - Show help
|
|
207
|
+
|
|
208
|
+
Use /xray-help <command> for detailed usage.`;
|
|
209
|
+
}
|
|
210
|
+
function formatUptime(ms) {
|
|
211
|
+
const seconds = Math.floor(ms / 1000);
|
|
212
|
+
const minutes = Math.floor(seconds / 60);
|
|
213
|
+
const hours = Math.floor(minutes / 60);
|
|
214
|
+
const days = Math.floor(hours / 24);
|
|
215
|
+
if (days > 0)
|
|
216
|
+
return `${days}d ${hours % 24}h`;
|
|
217
|
+
if (hours > 0)
|
|
218
|
+
return `${hours}h ${minutes % 60}m`;
|
|
219
|
+
if (minutes > 0)
|
|
220
|
+
return `${minutes}m`;
|
|
221
|
+
return `${seconds}s`;
|
|
222
|
+
}
|
|
223
|
+
// Export for OpenClaw
|
|
224
|
+
export default { handleSkill };
|
package/dist/state/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export * from "./state-manager.js";
|
|
2
2
|
export * from "./context-providers.js";
|
|
3
3
|
export * from "./state-types.js";
|
|
4
|
-
export {
|
|
4
|
+
export { XrayStateManager } from "./state-manager.js";
|
|
5
|
+
export { XrayStateManager as StringRayStateManager } from "./state-manager.js";
|
package/dist/state/index.js
CHANGED
|
@@ -4,4 +4,5 @@ export * from "./state-manager.js";
|
|
|
4
4
|
export * from "./context-providers.js";
|
|
5
5
|
export * from "./state-types.js";
|
|
6
6
|
// Re-export commonly used state utilities
|
|
7
|
-
export {
|
|
7
|
+
export { XrayStateManager } from "./state-manager.js";
|
|
8
|
+
export { XrayStateManager as StringRayStateManager } from "./state-manager.js";
|
|
@@ -3,7 +3,7 @@ export interface StateManager {
|
|
|
3
3
|
set: <T>(key: string, value: T) => void;
|
|
4
4
|
clear: (key: string) => void;
|
|
5
5
|
}
|
|
6
|
-
export declare class
|
|
6
|
+
export declare class XrayStateManager implements StateManager {
|
|
7
7
|
private store;
|
|
8
8
|
private persistencePath;
|
|
9
9
|
private persistenceEnabled;
|
|
@@ -39,4 +39,4 @@ export declare class StringRayStateManager implements StateManager {
|
|
|
39
39
|
value2: unknown;
|
|
40
40
|
}): unknown;
|
|
41
41
|
}
|
|
42
|
-
export { StringRayStateManager as StrRayStateManager };
|
|
42
|
+
export { XrayStateManager as StringRayStateManager, XrayStateManager as StrRayStateManager };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
2
2
|
import { resolveStateFilePath } from "../core/config-paths.js";
|
|
3
|
-
export class
|
|
3
|
+
export class XrayStateManager {
|
|
4
4
|
store = new Map();
|
|
5
5
|
persistencePath;
|
|
6
6
|
persistenceEnabled;
|
|
@@ -190,7 +190,7 @@ export class StringRayStateManager {
|
|
|
190
190
|
}
|
|
191
191
|
// Enterprise features for advanced state management
|
|
192
192
|
getStateVersion() {
|
|
193
|
-
return
|
|
193
|
+
return XrayStateManager.VERSION || "1.1.1";
|
|
194
194
|
}
|
|
195
195
|
getAuditLog() {
|
|
196
196
|
return []; // Simplified implementation for testing
|
|
@@ -204,5 +204,6 @@ export class StringRayStateManager {
|
|
|
204
204
|
return conflict.value2; // Prefer the second value as newer
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
// Export alias for scripts expecting
|
|
208
|
-
|
|
207
|
+
// Export alias for scripts expecting XrayStateManager
|
|
208
|
+
// Backward compat: StringRayStateManager and StrRayStateManager aliases
|
|
209
|
+
export { XrayStateManager as StringRayStateManager, XrayStateManager as StrRayStateManager };
|
|
@@ -77,7 +77,7 @@ export class ImportResolver {
|
|
|
77
77
|
detectInstalled() {
|
|
78
78
|
return (this.currentDir.includes("/node_modules/") ||
|
|
79
79
|
this.currentDir.includes("\\node_modules\\") ||
|
|
80
|
-
(this.currentDir.includes("
|
|
80
|
+
(this.currentDir.includes("xray") &&
|
|
81
81
|
!this.currentDir.includes(this.projectRoot)));
|
|
82
82
|
}
|
|
83
83
|
detectTesting() {
|
|
@@ -52,7 +52,7 @@ export class PathResolver {
|
|
|
52
52
|
detectBuilt() {
|
|
53
53
|
return (this.currentDir.includes("/dist/") ||
|
|
54
54
|
this.currentDir.includes("\\dist\\") ||
|
|
55
|
-
(this.currentDir.includes("
|
|
55
|
+
(this.currentDir.includes("xray") && !this.detectDevelopment()));
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
58
|
* Detect if we're running in installed package environment
|
|
@@ -60,7 +60,7 @@ export class PathResolver {
|
|
|
60
60
|
detectInstalled() {
|
|
61
61
|
return (this.currentDir.includes("/node_modules/") ||
|
|
62
62
|
this.currentDir.includes("\\node_modules\\") ||
|
|
63
|
-
(this.currentDir.includes("
|
|
63
|
+
(this.currentDir.includes("xray") && this.detectBuilt()));
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Resolve agent import path for current environment
|
|
@@ -3,7 +3,7 @@ import * as path from "path";
|
|
|
3
3
|
import { resolveConfigPath } from "../core/config-paths.js";
|
|
4
4
|
export class TokenManager {
|
|
5
5
|
config;
|
|
6
|
-
constructor(configPath = resolveConfigPath("config.json") || path.join(process.cwd(), ".
|
|
6
|
+
constructor(configPath = resolveConfigPath("config.json") || path.join(process.cwd(), ".xray", "config.json")) {
|
|
7
7
|
this.config = this.loadConfig(configPath);
|
|
8
8
|
}
|
|
9
9
|
loadConfig(configPath) {
|
|
@@ -12,7 +12,7 @@ import { frameworkLogger } from '../core/framework-logger.js';
|
|
|
12
12
|
export class EstimationValidator {
|
|
13
13
|
estimations = new Map();
|
|
14
14
|
calibrations = new Map();
|
|
15
|
-
STORAGE_KEY = '
|
|
15
|
+
STORAGE_KEY = 'xray-estimations';
|
|
16
16
|
constructor() {
|
|
17
17
|
this.loadFromStorage();
|
|
18
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "0xray",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Multi-agent orchestration and Codex governance for OpenCode, Hermes, Grok Build, and OpenClaw",
|
|
5
5
|
"readme": "README.md",
|
|
6
6
|
"license": "MIT",
|
|
@@ -120,7 +120,6 @@
|
|
|
120
120
|
"scripts/mjs/test-mcp-functionality.mjs",
|
|
121
121
|
"scripts/mjs/validate-mcp-connectivity.cjs",
|
|
122
122
|
"scripts/mjs/validate-postinstall-config.mjs",
|
|
123
|
-
"scripts/validate-stringray-comprehensive.js",
|
|
124
123
|
"src/opencode/",
|
|
125
124
|
"src/opencode/AGENTS-consumer.md",
|
|
126
125
|
"src/opencode/codex.codex",
|
|
@@ -149,6 +148,7 @@
|
|
|
149
148
|
],
|
|
150
149
|
"dependencies": {
|
|
151
150
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
151
|
+
"0xray": "^2.0.1",
|
|
152
152
|
"commander": "^11.1.0",
|
|
153
153
|
"express": "^5.2.1",
|
|
154
154
|
"jsonwebtoken": "^9.0.3",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* 0xRay Git Hook Runner
|
|
5
5
|
*
|
|
6
6
|
* Called by git hooks (pre-commit, post-commit, pre-push, post-push)
|
|
7
7
|
* to perform validation, logging, and monitoring.
|
|
@@ -565,6 +565,6 @@ handler()
|
|
|
565
565
|
})
|
|
566
566
|
.catch((err) => {
|
|
567
567
|
logError(`Hook crashed: ${err.message}`);
|
|
568
|
-
console.error(`
|
|
568
|
+
console.error(`0xRay hook error: ${err.message}`);
|
|
569
569
|
process.exit(1);
|
|
570
570
|
});
|
|
@@ -107,9 +107,9 @@ function getChangedFiles(count = 20) {
|
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
function loadConfig() {
|
|
110
|
-
// Primary: .opencode/xray/ YML SSOT. Min legacy fallbacks
|
|
110
|
+
// Primary: .opencode/xray/ YML SSOT. Min legacy fallbacks (transitional consumer compat; documented per Term 61)
|
|
111
111
|
const configPath = join(process.cwd(), ".opencode", "xray", "features.json");
|
|
112
|
-
const fallbackPath = join(process.cwd(), ".opencode", "
|
|
112
|
+
const fallbackPath = join(process.cwd(), ".opencode", "xray", "features.json");
|
|
113
113
|
const legacyPath = join(process.cwd(), ".strray", "features.json");
|
|
114
114
|
|
|
115
115
|
for (const p of [configPath, fallbackPath, legacyPath]) {
|
|
@@ -46,7 +46,7 @@ if (resolvedPackage !== resolvedTarget) {
|
|
|
46
46
|
const xrayRoot = targetDir;
|
|
47
47
|
|
|
48
48
|
execSync(
|
|
49
|
-
`grok mcp add xray-governance --command node --args "${govServer}" --env "
|
|
49
|
+
`grok mcp add xray-governance --command node --args "${govServer}" --env "XRAY_FORCE_MCP_GOVERNANCE=true" --env "XRAY_ROOT=${xrayRoot}"`,
|
|
50
50
|
{ stdio: 'pipe' }
|
|
51
51
|
);
|
|
52
52
|
structuredLog('postinstall', 'Registered xray-governance with Grok CLI', 'info');
|
|
@@ -165,16 +165,22 @@ function checkVersionManagerRan() {
|
|
|
165
165
|
const vmContent = fs.readFileSync(vmPath, 'utf-8');
|
|
166
166
|
|
|
167
167
|
// Check that files have been updated (look for recent timestamps or version)
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
168
|
+
try {
|
|
169
|
+
const { resolveConfigPath } = require('../helpers/resolve-config-path.cjs');
|
|
170
|
+
const featuresPath = resolveConfigPath('features.json', rootDir);
|
|
171
|
+
if (fs.existsSync(featuresPath)) {
|
|
172
|
+
const features = JSON.parse(fs.readFileSync(featuresPath, 'utf-8'));
|
|
173
|
+
if (!features.version && !features.xray_version) {
|
|
174
|
+
warnings.push('features.json may not have been synced by version manager');
|
|
175
|
+
log('features.json may need version sync', 'warn');
|
|
176
|
+
} else {
|
|
177
|
+
log('Version manager appears to have run', 'success');
|
|
178
|
+
}
|
|
179
|
+
} else {
|
|
180
|
+
log('features.json not found ā skipping check (non-blocking)', 'warn');
|
|
181
|
+
}
|
|
182
|
+
} catch (e) {
|
|
183
|
+
log('Could not check features.json ā non-blocking', 'warn');
|
|
178
184
|
}
|
|
179
185
|
|
|
180
186
|
return true;
|
package/scripts/node/release.js
CHANGED
|
@@ -63,7 +63,7 @@ function main() {
|
|
|
63
63
|
if (bumpType === "major" || bumpType === "minor") parts[2] = 0;
|
|
64
64
|
const nextVersion = parts.join(".");
|
|
65
65
|
|
|
66
|
-
console.log(`\n${BOLD}${BLUE}š
|
|
66
|
+
console.log(`\n${BOLD}${BLUE}š 0xray Release${RESET}`);
|
|
67
67
|
console.log(`${BOLD} ${currentVersion} ā ${nextVersion} (${bumpType})${RESET}\n`);
|
|
68
68
|
|
|
69
69
|
if (dryRun) {
|
|
@@ -123,20 +123,20 @@ function main() {
|
|
|
123
123
|
console.log(`${BLUE}āø Publishing to npm${RESET}`);
|
|
124
124
|
try {
|
|
125
125
|
execSync("npm publish --access public", { cwd: rootDir, stdio: "inherit" });
|
|
126
|
-
console.log(`${GREEN} ā Published
|
|
126
|
+
console.log(`${GREEN} ā Published 0xray@${nextVersion}${RESET}`);
|
|
127
127
|
} catch (e) {
|
|
128
128
|
const errMsg = (e.stderr?.toString() || "") + (e.message || "");
|
|
129
129
|
if (errMsg.includes("previously published")) {
|
|
130
|
-
console.log(`${GREEN} ā Already published
|
|
130
|
+
console.log(`${GREEN} ā Already published 0xray@${nextVersion}${RESET}`);
|
|
131
131
|
} else {
|
|
132
132
|
console.log(`${RED} ā Publish failed. Trying with --ignore-scripts...${RESET}`);
|
|
133
133
|
try {
|
|
134
134
|
execSync("npm publish --access public --ignore-scripts", { cwd: rootDir, stdio: "pipe", encoding: "utf-8" });
|
|
135
|
-
console.log(`${GREEN} ā Published
|
|
135
|
+
console.log(`${GREEN} ā Published 0xray@${nextVersion} (ignore-scripts)${RESET}`);
|
|
136
136
|
} catch (e2) {
|
|
137
137
|
const errMsg2 = (e2.stderr?.toString() || "") + (e2.message || "");
|
|
138
138
|
if (errMsg2.includes("previously published")) {
|
|
139
|
-
console.log(`${GREEN} ā Already published
|
|
139
|
+
console.log(`${GREEN} ā Already published 0xray@${nextVersion}${RESET}`);
|
|
140
140
|
} else {
|
|
141
141
|
console.log(`${RED} ā Publish failed: ${errMsg2.slice(0, 200)}${RESET}`);
|
|
142
142
|
process.exit(1);
|
|
@@ -153,7 +153,7 @@ function main() {
|
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
console.log(`\n${BOLD}${GREEN}ā
Released
|
|
156
|
+
console.log(`\n${BOLD}${GREEN}ā
Released 0xray@${nextVersion}${RESET}\n`);
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
main();
|
package/scripts/node/release.mjs
CHANGED
|
@@ -98,19 +98,19 @@ async function main() {
|
|
|
98
98
|
// This removes the brittle "must be exactly one ahead" problem.
|
|
99
99
|
let publishedVersion;
|
|
100
100
|
try {
|
|
101
|
-
publishedVersion = execSync('npm view
|
|
101
|
+
publishedVersion = execSync('npm view 0xray version', { encoding: 'utf-8' }).trim();
|
|
102
102
|
console.log(`š Latest published on npm: ${publishedVersion}`);
|
|
103
103
|
} catch {
|
|
104
|
-
publishedVersion =
|
|
105
|
-
console.log('ā ļø Could not fetch published version from npm
|
|
104
|
+
publishedVersion = null;
|
|
105
|
+
console.log('ā ļø Could not fetch published version from npm ā will use local version');
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
const
|
|
109
|
-
|
|
108
|
+
const baseVersion = publishedVersion || getCurrentVersion();
|
|
109
|
+
const targetVersion = bumpVersion(baseVersion, releaseType);
|
|
110
|
+
console.log(`š Target version (computed from ${publishedVersion ? 'registry' : 'local'}): ${targetVersion}`);
|
|
110
111
|
console.log(`š Release type: ${releaseType}`);
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
if (currentVersion !== targetVersion) {
|
|
113
|
+
if (publishedVersion && currentVersion !== targetVersion) {
|
|
114
114
|
console.log(`ā ļø Local version (${currentVersion}) differs from computed target. Using computed target ${targetVersion}.`);
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -154,13 +154,13 @@ async function main() {
|
|
|
154
154
|
|
|
155
155
|
// Step 5: Push
|
|
156
156
|
console.log('\nš¦ Step 5: Pushing to origin...');
|
|
157
|
-
runCommand('git push origin
|
|
157
|
+
runCommand('git push origin main', 'Failed to push to origin');
|
|
158
158
|
runCommand(`git push origin v${newVersion}`, 'Failed to push tag');
|
|
159
159
|
|
|
160
160
|
// Step 6: Publish to npm
|
|
161
161
|
console.log('\nš¦ Step 6: Publishing to npm...');
|
|
162
|
-
runCommand('npm publish --access public', 'npm publish failed');
|
|
163
|
-
console.log(`ā
Published
|
|
162
|
+
runCommand('npm publish --access public --ignore-scripts', 'npm publish failed');
|
|
163
|
+
console.log(`ā
Published 0xray@${newVersion} to npm`);
|
|
164
164
|
|
|
165
165
|
console.log('\nāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā');
|
|
166
166
|
console.log('ā ā
Release Complete! ā');
|
|
@@ -190,7 +190,7 @@ async function main() {
|
|
|
190
190
|
{EMOJI} {feature - consumer benefit}
|
|
191
191
|
{EMOJI} {feature - consumer benefit}
|
|
192
192
|
\`\`\`
|
|
193
|
-
npm install
|
|
193
|
+
npm install 0xray@latest
|
|
194
194
|
\`\`\`
|
|
195
195
|
What xray is: {one sentence positioning}
|
|
196
196
|
#xray #AIOps #DevTools #SelfHealing #NPM`;
|
|
@@ -155,7 +155,7 @@ const detectedCodex = detectCodexInfo();
|
|
|
155
155
|
const OFFICIAL_VERSIONS = {
|
|
156
156
|
// Framework version
|
|
157
157
|
framework: {
|
|
158
|
-
version: "2.
|
|
158
|
+
version: "2.1.1",
|
|
159
159
|
displayName: "xray: Self-Healing AI Governance OS",
|
|
160
160
|
lastUpdated: "2026-06-08",
|
|
161
161
|
// Counts (auto-calculated, but can be overridden)
|
|
@@ -403,7 +403,7 @@ const UPDATE_PATTERNS = [
|
|
|
403
403
|
pattern: /xray AI v[0-9]+\.[0-9]+\.[0-9]+/g,
|
|
404
404
|
replacement: `xray AI v${OFFICIAL_VERSIONS.framework.version}`,
|
|
405
405
|
},
|
|
406
|
-
// Footer bare version (e.g., "**Version**: 2.0.
|
|
406
|
+
// Footer bare version (e.g., "**Version**: 2.0.1")
|
|
407
407
|
{
|
|
408
408
|
pattern: /\*\*Version\*\*:\s*[0-9]+\.[0-9]+\.[0-9]+/g,
|
|
409
409
|
replacement: `**Version**: ${OFFICIAL_VERSIONS.framework.version}`,
|
|
@@ -308,7 +308,7 @@ function updateAgentsMd(counts) {
|
|
|
308
308
|
|
|
309
309
|
// Legacy header count update (min compat for old consumer AGENTS.md files only; xray v2 YML SSOT primary)
|
|
310
310
|
agentsMd = agentsMd.replace(
|
|
311
|
-
/0xRay\s*2\.0\s*-\s*\d+\s+Agents|
|
|
311
|
+
/0xRay\s*2\.0\s*-\s*\d+\s+Agents|xray\s*v2\s*-\s*\d+\s+Agents/,
|
|
312
312
|
`xray v2 - ${counts.agents} Agents`
|
|
313
313
|
);
|
|
314
314
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"mcpServers": {
|
|
3
|
-
"
|
|
3
|
+
"xray-governance": {
|
|
4
4
|
"command": "npx",
|
|
5
5
|
"args": ["-y", "0xray", "mcp", "governance"],
|
|
6
6
|
"env": {
|
|
7
|
-
"
|
|
7
|
+
"XRAY_FORCE_MCP_GOVERNANCE": "true"
|
|
8
8
|
}
|
|
9
9
|
},
|
|
10
|
-
"
|
|
10
|
+
"xray-skills": {
|
|
11
11
|
"command": "npx",
|
|
12
12
|
"args": ["-y", "0xray", "mcp", "skills"]
|
|
13
13
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node",
|
|
10
10
|
"args": [
|
|
11
|
-
"${
|
|
11
|
+
"${XRAY_PATH:-node_modules/0xray}/dist/integrations/grok/hooks/pre-tool-use.js"
|
|
12
12
|
],
|
|
13
13
|
"timeout": 30000
|
|
14
14
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
{
|
|
22
22
|
"type": "command",
|
|
23
23
|
"command": "echo",
|
|
24
|
-
"args": ["[0xRay] Grok session started with
|
|
24
|
+
"args": ["[0xRay] Grok session started with 0xRay governance enabled"]
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
}
|
|
@@ -35,13 +35,13 @@ interface FileNode {
|
|
|
35
35
|
extension: string;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
class
|
|
38
|
+
class XrayArchitectToolsServer {
|
|
39
39
|
private server: Server;
|
|
40
40
|
|
|
41
41
|
constructor() {
|
|
42
42
|
this.server = new Server(
|
|
43
43
|
{
|
|
44
|
-
name: "architect-tools", version: "2.0.
|
|
44
|
+
name: "architect-tools", version: "2.0.1",
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
capabilities: {
|
|
@@ -336,8 +336,8 @@ class StringRayArchitectToolsServer {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
339
|
-
const server = new
|
|
339
|
+
const server = new XrayArchitectToolsServer();
|
|
340
340
|
server.run().catch((error) => frameworkLogger.log("mcps/architect-tools", "run", "error", { error: String(error) }));
|
|
341
341
|
}
|
|
342
342
|
|
|
343
|
-
export default
|
|
343
|
+
export default XrayArchitectToolsServer;
|
|
@@ -34,13 +34,13 @@ interface FormatResults {
|
|
|
34
34
|
changes: Record<string, string[]>;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
class
|
|
37
|
+
class XrayAutoFormatServer {
|
|
38
38
|
private server: Server;
|
|
39
39
|
|
|
40
40
|
constructor() {
|
|
41
41
|
this.server = new Server(
|
|
42
42
|
{
|
|
43
|
-
name: "auto-format", version: "2.0.
|
|
43
|
+
name: "auto-format", version: "2.0.1",
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
capabilities: {
|
|
@@ -522,8 +522,8 @@ ${checkResults.details.map((d) => `⢠${d}`).join("\n")}
|
|
|
522
522
|
|
|
523
523
|
// Start the server if run directly
|
|
524
524
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
525
|
-
const server = new
|
|
525
|
+
const server = new XrayAutoFormatServer();
|
|
526
526
|
server.run().catch((error) => frameworkLogger.log("mcps/auto-format", "run", "error", { error: String(error) }));
|
|
527
527
|
}
|
|
528
528
|
|
|
529
|
-
export {
|
|
529
|
+
export { XrayAutoFormatServer };
|