0xray 3.0.14 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitignore.default +59 -0
- package/.mcp.json +35 -0
- package/.opencode/codex.codex +1 -1
- package/.opencode/commands/dependency-audit.md +3 -3
- package/.opencode/commands/summary-logger.md +4 -4
- package/.opencode/enforcer-config.json +2 -2
- package/.opencode/hooks/post-commit +1 -1
- package/.opencode/init.sh +10 -4
- package/.plugin/plugin.json +11 -0
- package/AGENTS-consumer.md +46 -0
- package/AGENTS.md +10 -10
- package/LICENSE +1 -1
- package/README.md +8 -8
- package/SKILLS.md +140 -0
- package/dist/.gitignore.default +59 -0
- package/dist/AGENTS.md +10 -10
- package/dist/CHANGELOG.md +34 -0
- package/dist/LICENSE +1 -1
- package/dist/README.md +8 -8
- package/dist/SKILLS.md +140 -0
- package/dist/agents/index.js +3 -1
- package/dist/agents/registry.js +13 -0
- package/dist/analytics/routing-refiner.js +1 -1
- package/dist/architect/architectural-integrity.js +3 -3
- package/dist/benchmark/performance-benchmark.js +4 -3
- package/dist/cli/commands/antigravity-status.js +23 -23
- package/dist/cli/commands/credible-init.js +1 -1
- package/dist/cli/commands/hermes-install.js +12 -4
- package/dist/cli/commands/mcp-install.js +1 -1
- package/dist/cli/commands/openclaw-install.js +10 -1
- package/dist/cli/commands/opencode-install.js +22 -0
- 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 +39 -2
- package/dist/cli/commands/status.js +8 -3
- package/dist/cli/commands/storyteller.js +2 -2
- package/dist/cli/index.js +17 -11
- package/dist/cli/server.js +4 -4
- package/dist/core/activity-logger.js +4 -4
- package/dist/core/agent-spawn-gate.js +1 -1
- package/dist/core/boot-orchestrator.js +30 -31
- package/dist/core/bridge.mjs +26 -26
- package/dist/core/codex-formatter.js +2 -3
- package/dist/core/codex-injector.js +7 -7
- package/dist/core/config-loader.js +3 -2
- package/dist/core/config-paths.js +38 -31
- package/dist/core/context-loader.js +5 -5
- package/dist/core/features-config.js +1 -1
- package/dist/core/index.js +2 -2
- package/dist/core/logging-config.js +7 -7
- package/dist/core/orchestrator.js +2 -2
- package/dist/core/system-prompt-generator.js +2 -2
- package/dist/core/xray-activation.js +42 -41
- package/dist/delegation/agent-delegator.js +3 -3
- package/dist/enforcement/enforcer-tools.js +4 -4
- package/dist/enforcement/loaders/codex-loader.js +2 -2
- package/dist/execution/opencode-cli-invoker.js +1 -1
- package/dist/governance/governance-service.js +1 -1
- package/dist/governance/llm-governance-provider.js +223 -0
- package/dist/index.js +6 -6
- package/dist/inference/deploy-verifier.js +1 -1
- package/dist/inference/inference-cycle.js +16 -16
- package/dist/integrations/base/README.md +1 -1
- package/dist/integrations/enforcement-gate.js +2 -2
- package/dist/integrations/governance/index.js +1 -1
- package/dist/integrations/grok/grok-cli.js +20 -6
- package/dist/integrations/grok/hooks/pre-tool-use.js +3 -3
- package/dist/integrations/grok/plugin/0xray/.mcp.json +16 -4
- package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
- package/dist/integrations/hermes-agent/__init__.py +90 -79
- package/dist/integrations/hermes-agent/after-install.md +14 -14
- package/dist/integrations/hermes-agent/bridge.mjs +60 -25
- package/dist/integrations/hermes-agent/plugin.yaml +5 -5
- package/dist/integrations/hermes-agent/schemas.py +61 -12
- package/dist/integrations/hermes-agent/test_plugin.py +124 -124
- package/dist/integrations/hermes-agent/tools.py +129 -25
- package/dist/integrations/openclaw/README.md +6 -6
- package/dist/integrations/openclaw/config.js +1 -1
- package/dist/integrations/openclaw/index.js +2 -2
- package/dist/integrations/openclaw/types.js +3 -3
- package/dist/integrations/plugins/plugin-integration.js +1 -1
- package/dist/integrations/plugins/plugin-registry.js +3 -3
- package/dist/mcps/architect-tools.server.js +3 -2
- package/dist/mcps/auto-format.server.js +2 -2
- package/dist/mcps/boot-orchestrator.server.js +2 -2
- package/dist/mcps/config/config-loader.js +40 -9
- package/dist/mcps/config/server-config-registry.js +10 -10
- package/dist/mcps/connection/mcp-connection.js +1 -1
- package/dist/mcps/enforcer-tools.server.js +2 -2
- package/dist/mcps/estimation.server.js +3 -2
- package/dist/mcps/framework-compliance-audit.server.js +2 -2
- package/dist/mcps/framework-help.server.js +9 -8
- package/dist/mcps/governance.server.js +8 -4
- package/dist/mcps/knowledge-skills/api-design.server.js +3 -2
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +3 -2
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +3 -3
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +2 -2
- package/dist/mcps/knowledge-skills/code-review.server.js +14 -39
- package/dist/mcps/knowledge-skills/content-creator.server.js +3 -3
- package/dist/mcps/knowledge-skills/database-design.server.js +2 -2
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +3 -2
- package/dist/mcps/knowledge-skills/git-workflow.server.js +3 -2
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +3 -3
- package/dist/mcps/knowledge-skills/log-monitor.server.js +3 -3
- package/dist/mcps/knowledge-skills/mobile-development.server.js +3 -3
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +3 -3
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +2 -2
- package/dist/mcps/knowledge-skills/project-analysis.server.js +2 -2
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +3 -2
- package/dist/mcps/knowledge-skills/security-audit.server.js +14 -44
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +3 -2
- package/dist/mcps/knowledge-skills/session-management.server.js +3 -2
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +105 -3
- package/dist/mcps/knowledge-skills/strategist.server.js +3 -3
- package/dist/mcps/knowledge-skills/tech-writer.server.js +3 -3
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js +3 -2
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +2 -2
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +5 -4
- package/dist/mcps/lint.server.js +4 -4
- package/dist/mcps/mcp-client.js +5 -5
- package/dist/mcps/model-health-check.server.js +3 -2
- package/dist/mcps/orchestrator/server.js +4 -3
- package/dist/mcps/orchestrator.server.js +2 -1
- package/dist/mcps/performance-analysis.server.js +2 -2
- package/dist/mcps/processor-pipeline.server.js +3 -2
- package/dist/mcps/registry.json +1 -1
- package/dist/mcps/researcher.server.js +14 -39
- package/dist/mcps/security-scan.server.js +2 -2
- package/dist/mcps/simulation/server-simulations.js +3 -3
- package/dist/mcps/state-manager.server.js +5 -5
- package/dist/metrics/agent-metrics.js +1 -1
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +4 -4
- package/dist/orchestrator/intelligent-commit-batcher.js +2 -3
- package/dist/orchestrator/multi-agent-orchestration-coordinator.js +9 -9
- package/dist/orchestrator/orchestrator.js +9 -8
- package/dist/orchestrator/universal-registry-bridge.js +4 -4
- package/dist/postprocessor/PostProcessor.js +9 -9
- package/dist/postprocessor/services/RegressionAnalysisService.js +4 -4
- package/dist/postprocessor/triggers/GitHookTrigger.js +18 -18
- package/dist/processors/implementations/agents-md-validation-processor.js +2 -2
- package/dist/processors/implementations/inference-improvement-processor.js +1 -2
- package/dist/processors/implementations/log-protection-processor.js +2 -2
- package/dist/processors/implementations/publish-preflight-processor.js +2 -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 +1 -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 +4 -4
- package/dist/scripts/pre-command +1 -1
- package/dist/services/inference-tuner.js +2 -2
- package/dist/skills/api-design/SKILL.md +1 -1
- package/dist/skills/architect-tools/SKILL.md +1 -1
- package/dist/skills/architecture-patterns/SKILL.md +1 -1
- package/dist/skills/auto-format/SKILL.md +1 -1
- package/dist/skills/boot-orchestrator/SKILL.md +1 -1
- package/dist/skills/bug-triage/SKILL.md +1 -1
- package/dist/skills/code-analyzer/SKILL.md +1 -1
- package/dist/skills/code-review/SKILL.md +1 -1
- package/dist/skills/enforcer/SKILL.md +1 -1
- package/dist/skills/framework-compliance-audit/SKILL.md +1 -1
- package/dist/skills/git-workflow/SKILL.md +1 -1
- package/dist/skills/hermes-agent/SKILL.md +42 -42
- package/dist/skills/inference-improve/SKILL.md +1 -1
- package/dist/skills/lint/SKILL.md +1 -1
- package/dist/skills/log-monitor/SKILL.md +1 -1
- package/dist/skills/model-health-check/SKILL.md +1 -1
- package/dist/skills/multimodal-looker/SKILL.md +1 -1
- package/dist/skills/orchestrator/SKILL.md +1 -1
- package/dist/skills/performance-analysis/SKILL.md +1 -1
- package/dist/skills/performance-optimization/SKILL.md +1 -1
- package/dist/skills/processor-pipeline/SKILL.md +1 -1
- package/dist/skills/project-analysis/SKILL.md +1 -1
- package/dist/skills/refactoring-strategies/SKILL.md +1 -1
- package/dist/skills/registry.json +1 -1
- package/dist/skills/researcher/SKILL.md +1 -1
- package/dist/skills/security-audit/SKILL.md +1 -1
- package/dist/skills/security-scan/SKILL.md +1 -1
- package/dist/skills/session-management/SKILL.md +1 -1
- package/dist/skills/state-manager/SKILL.md +1 -1
- package/dist/skills/storyteller/SKILL.md +1 -1
- package/dist/skills/testing-best-practices/SKILL.md +1 -1
- package/dist/skills/testing-strategy/SKILL.md +1 -1
- package/dist/skills/ui-ux-design/SKILL.md +1 -1
- package/dist/state/index.js +1 -1
- package/dist/state/state-manager.js +3 -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 +10 -3
- package/scripts/hooks/pre-command +1 -1
- package/scripts/hooks/run-hook.js +2 -2
- package/scripts/node/auto-reflection-generator.mjs +30 -36
- package/scripts/node/govern-reflection.mjs +1 -1
- package/scripts/node/postinstall.cjs +37 -2
- package/scripts/node/pre-publish-guard.js +13 -9
- package/scripts/node/setup-xai-oauth.mjs +244 -0
- package/scripts/node/universal-version-manager.js +8 -8
- package/scripts/node/version-manager.mjs +1 -1
- package/src/integrations/grok/plugin/0xray/.mcp.json +16 -4
- package/src/integrations/grok/plugin/0xray/hooks/hooks.json +2 -2
- package/src/mcps/architect-tools.server.ts +2 -2
- package/src/mcps/auto-format.server.ts +2 -2
- package/src/mcps/boot-orchestrator.server.ts +2 -2
- package/src/mcps/config/__tests__/config-loader.test.ts +29 -33
- package/src/mcps/config/__tests__/server-config-registry.test.ts +12 -12
- package/src/mcps/config/config-loader.ts +50 -11
- package/src/mcps/config/server-config-registry.ts +10 -10
- package/src/mcps/connection/mcp-connection.ts +1 -1
- package/src/mcps/enforcer-tools.server.ts +2 -2
- package/src/mcps/estimation.server.ts +3 -2
- package/src/mcps/framework-compliance-audit.server.ts +2 -2
- package/src/mcps/framework-help.server.ts +9 -8
- package/src/mcps/governance.server.ts +8 -3
- package/src/mcps/knowledge-skills/api-design.server.ts +3 -2
- package/src/mcps/knowledge-skills/architecture-patterns.server.ts +2 -2
- package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +2 -2
- package/src/mcps/knowledge-skills/code-analyzer.server.ts +2 -2
- package/src/mcps/knowledge-skills/code-review.server.ts +21 -36
- package/src/mcps/knowledge-skills/content-creator.server.ts +3 -3
- package/src/mcps/knowledge-skills/database-design.server.ts +2 -2
- package/src/mcps/knowledge-skills/devops-deployment.server.ts +3 -2
- package/src/mcps/knowledge-skills/git-workflow.server.ts +3 -2
- package/src/mcps/knowledge-skills/growth-strategist.server.ts +3 -3
- package/src/mcps/knowledge-skills/log-monitor.server.ts +3 -3
- package/src/mcps/knowledge-skills/mobile-development.server.ts +3 -3
- package/src/mcps/knowledge-skills/multimodal-looker.server.ts +3 -3
- package/src/mcps/knowledge-skills/performance-optimization.server.ts +2 -2
- package/src/mcps/knowledge-skills/project-analysis.server.ts +2 -2
- package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +3 -2
- package/src/mcps/knowledge-skills/security-audit.server.ts +21 -40
- package/src/mcps/knowledge-skills/seo-consultant.server.ts +3 -2
- package/src/mcps/knowledge-skills/session-management.server.ts +3 -2
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +113 -3
- package/src/mcps/knowledge-skills/strategist.server.ts +3 -3
- package/src/mcps/knowledge-skills/tech-writer.server.ts +3 -3
- package/src/mcps/knowledge-skills/testing-best-practices.server.ts +3 -2
- package/src/mcps/knowledge-skills/testing-strategy.server.ts +2 -2
- package/src/mcps/knowledge-skills/ui-ux-design.server.ts +5 -4
- package/src/mcps/lint.server.ts +4 -4
- package/src/mcps/mcp-client.ts +5 -5
- package/src/mcps/model-health-check.server.ts +2 -2
- package/src/mcps/orchestrator/server.ts +4 -3
- package/src/mcps/orchestrator.server.ts +2 -1
- package/src/mcps/performance-analysis.server.ts +2 -2
- package/src/mcps/processor-pipeline.server.ts +3 -2
- package/src/mcps/registry.json +1 -1
- package/src/mcps/researcher.server.ts +21 -36
- package/src/mcps/security-scan.server.ts +2 -2
- package/src/mcps/simulation/server-simulations.ts +3 -3
- package/src/mcps/state-manager.server.ts +5 -5
- package/src/opencode/codex.codex +1 -1
- package/src/opencode/commands/dependency-audit.md +3 -3
- package/src/opencode/commands/summary-logger.md +4 -4
- package/src/opencode/enforcer-config.json +2 -2
- package/src/skills/api-design/SKILL.md +1 -1
- package/src/skills/architect-tools/SKILL.md +1 -1
- package/src/skills/architecture-patterns/SKILL.md +1 -1
- package/src/skills/auto-format/SKILL.md +1 -1
- package/src/skills/boot-orchestrator/SKILL.md +1 -1
- package/src/skills/bug-triage/SKILL.md +1 -1
- package/src/skills/code-analyzer/SKILL.md +1 -1
- package/src/skills/code-review/SKILL.md +1 -1
- package/src/skills/enforcer/SKILL.md +1 -1
- package/src/skills/framework-compliance-audit/SKILL.md +1 -1
- package/src/skills/git-workflow/SKILL.md +1 -1
- package/src/skills/hermes-agent/SKILL.md +42 -42
- package/src/skills/inference-improve/SKILL.md +1 -1
- package/src/skills/lint/SKILL.md +1 -1
- package/src/skills/log-monitor/SKILL.md +1 -1
- package/src/skills/model-health-check/SKILL.md +1 -1
- package/src/skills/multimodal-looker/SKILL.md +1 -1
- package/src/skills/orchestrator/SKILL.md +1 -1
- package/src/skills/performance-analysis/SKILL.md +1 -1
- package/src/skills/performance-optimization/SKILL.md +1 -1
- package/src/skills/processor-pipeline/SKILL.md +1 -1
- package/src/skills/project-analysis/SKILL.md +1 -1
- package/src/skills/refactoring-strategies/SKILL.md +1 -1
- package/src/skills/registry.json +1 -1
- package/src/skills/researcher/SKILL.md +1 -1
- package/src/skills/security-audit/SKILL.md +1 -1
- package/src/skills/security-scan/SKILL.md +1 -1
- package/src/skills/session-management/SKILL.md +1 -1
- package/src/skills/state-manager/SKILL.md +1 -1
- package/src/skills/storyteller/SKILL.md +1 -1
- package/src/skills/testing-best-practices/SKILL.md +1 -1
- package/src/skills/testing-strategy/SKILL.md +1 -1
- package/src/skills/ui-ux-design/SKILL.md +1 -1
- package/xray/agents_template.md +46 -0
- package/xray/codex.json +598 -0
- package/dist/plugin/xray-codex-injection.js +0 -857
- /package/dist/integrations/openclaw/hooks/{strray-hooks.js → xray-hooks.js} +0 -0
|
@@ -40,7 +40,7 @@ class XrayAutoFormatServer {
|
|
|
40
40
|
constructor() {
|
|
41
41
|
this.server = new Server(
|
|
42
42
|
{
|
|
43
|
-
name: "auto-format", version: "1.
|
|
43
|
+
name: "auto-format", version: "3.1.0",
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
capabilities: {
|
|
@@ -521,7 +521,7 @@ ${checkResults.details.map((d) => `• ${d}`).join("\n")}
|
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
// Start the server if run directly
|
|
524
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
524
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1]!)}`) {
|
|
525
525
|
const server = new XrayAutoFormatServer();
|
|
526
526
|
server.run().catch((error) => frameworkLogger.log("mcps/auto-format", "run", "error", { error: String(error) }));
|
|
527
527
|
}
|
|
@@ -120,7 +120,7 @@ class XrayBootOrchestratorServer {
|
|
|
120
120
|
constructor() {
|
|
121
121
|
this.server = new Server(
|
|
122
122
|
{
|
|
123
|
-
name: "boot-orchestrator", version: "1.
|
|
123
|
+
name: "boot-orchestrator", version: "3.1.0",
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
capabilities: {
|
|
@@ -1074,7 +1074,7 @@ ${results.warnings.length > 0 ? `**Warnings:**\n${results.warnings.map((w: strin
|
|
|
1074
1074
|
}
|
|
1075
1075
|
|
|
1076
1076
|
// Start the server if run directly
|
|
1077
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
1077
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1]!)}`) {
|
|
1078
1078
|
const server = new XrayBootOrchestratorServer();
|
|
1079
1079
|
server.run().catch((error) => frameworkLogger.log("mcps/boot-orchestrator", "run", "error", { error: String(error) }));
|
|
1080
1080
|
}
|
|
@@ -17,25 +17,19 @@ describe('ConfigLoader', () => {
|
|
|
17
17
|
|
|
18
18
|
beforeEach(() => {
|
|
19
19
|
loader = new ConfigLoader();
|
|
20
|
+
// Remove default paths so tests don't pick up the real .mcp.json
|
|
21
|
+
loader.resetConfigPaths();
|
|
20
22
|
// Clean up any existing test files
|
|
21
|
-
|
|
22
|
-
fs.unlinkSync(
|
|
23
|
-
}
|
|
24
|
-
if (fs.existsSync(testConfigPath2)) {
|
|
25
|
-
fs.unlinkSync(testConfigPath2);
|
|
26
|
-
}
|
|
27
|
-
if (fs.existsSync(testDir)) {
|
|
28
|
-
fs.rmdirSync(testDir);
|
|
23
|
+
for (const p of [testConfigPath, testConfigPath2]) {
|
|
24
|
+
if (fs.existsSync(p)) fs.unlinkSync(p);
|
|
29
25
|
}
|
|
26
|
+
if (fs.existsSync(testDir)) fs.rmdirSync(testDir);
|
|
30
27
|
});
|
|
31
28
|
|
|
32
29
|
afterEach(() => {
|
|
33
30
|
// Clean up test files
|
|
34
|
-
|
|
35
|
-
fs.unlinkSync(
|
|
36
|
-
}
|
|
37
|
-
if (fs.existsSync(testConfigPath2)) {
|
|
38
|
-
fs.unlinkSync(testConfigPath2);
|
|
31
|
+
for (const p of [testConfigPath, testConfigPath2]) {
|
|
32
|
+
if (fs.existsSync(p)) fs.unlinkSync(p);
|
|
39
33
|
}
|
|
40
34
|
if (fs.existsSync(testDir)) {
|
|
41
35
|
fs.rmdirSync(testDir);
|
|
@@ -163,20 +157,24 @@ describe('ConfigLoader', () => {
|
|
|
163
157
|
});
|
|
164
158
|
|
|
165
159
|
describe('getConfigPaths', () => {
|
|
166
|
-
it('should return default paths', () => {
|
|
167
|
-
const paths = loader.getConfigPaths();
|
|
168
|
-
expect(paths).toContain('.mcp.json');
|
|
169
|
-
expect(paths).toContain('.opencode/mcp.json');
|
|
170
|
-
expect(paths).toContain('mcp.config.json');
|
|
171
|
-
});
|
|
172
|
-
|
|
173
160
|
it('should return added paths', () => {
|
|
161
|
+
loader.addConfigPath('.mcp.json');
|
|
174
162
|
loader.addConfigPath('custom/path.json');
|
|
175
163
|
const paths = loader.getConfigPaths();
|
|
164
|
+
expect(paths).toContain('.mcp.json');
|
|
176
165
|
expect(paths).toContain('custom/path.json');
|
|
177
166
|
});
|
|
178
167
|
|
|
168
|
+
it('should return default paths via new instance', () => {
|
|
169
|
+
const fresh = new ConfigLoader();
|
|
170
|
+
const paths = fresh.getConfigPaths();
|
|
171
|
+
expect(paths).toContain('.mcp.json');
|
|
172
|
+
expect(paths).toContain('.opencode/mcp.json');
|
|
173
|
+
expect(paths).toContain('mcp.config.json');
|
|
174
|
+
});
|
|
175
|
+
|
|
179
176
|
it('should return copy of paths array', () => {
|
|
177
|
+
loader.addConfigPath('.mcp.json');
|
|
180
178
|
const paths = loader.getConfigPaths();
|
|
181
179
|
paths.push('modified');
|
|
182
180
|
const paths2 = loader.getConfigPaths();
|
|
@@ -186,10 +184,12 @@ describe('ConfigLoader', () => {
|
|
|
186
184
|
|
|
187
185
|
describe('resetConfigPaths', () => {
|
|
188
186
|
it('should reset to default paths', () => {
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
// Add a custom path, then reset — must use fresh loader for baseline
|
|
188
|
+
const fresh = new ConfigLoader();
|
|
189
|
+
fresh.addConfigPath('custom/path.json');
|
|
190
|
+
fresh.resetConfigPaths();
|
|
191
191
|
|
|
192
|
-
const paths =
|
|
192
|
+
const paths = fresh.getConfigPaths();
|
|
193
193
|
expect(paths).not.toContain('custom/path.json');
|
|
194
194
|
expect(paths).toContain('.mcp.json');
|
|
195
195
|
});
|
|
@@ -269,15 +269,6 @@ describe('ConfigLoader', () => {
|
|
|
269
269
|
expect(loader.hasConfigFile()).toBe(false);
|
|
270
270
|
});
|
|
271
271
|
|
|
272
|
-
it('should return true when default config file exists', () => {
|
|
273
|
-
const testConfigs = [{ serverName: 'test', command: 'node', args: ['test.js'], timeout: 30000 }];
|
|
274
|
-
fs.writeFileSync('.mcp.json', JSON.stringify(testConfigs));
|
|
275
|
-
|
|
276
|
-
expect(loader.hasConfigFile()).toBe(true);
|
|
277
|
-
|
|
278
|
-
fs.unlinkSync('.mcp.json');
|
|
279
|
-
});
|
|
280
|
-
|
|
281
272
|
it('should return true when added config file exists', () => {
|
|
282
273
|
const testConfigs = [{ serverName: 'test', command: 'node', args: ['test.js'], timeout: 30000 }];
|
|
283
274
|
fs.writeFileSync(testConfigPath, JSON.stringify(testConfigs));
|
|
@@ -285,6 +276,11 @@ describe('ConfigLoader', () => {
|
|
|
285
276
|
|
|
286
277
|
expect(loader.hasConfigFile()).toBe(true);
|
|
287
278
|
});
|
|
279
|
+
|
|
280
|
+
it('should return false when only real .mcp.json exists but not in paths', () => {
|
|
281
|
+
// After resetConfigPaths, the real .mcp.json is not in the path list
|
|
282
|
+
expect(loader.hasConfigFile()).toBe(false);
|
|
283
|
+
});
|
|
288
284
|
});
|
|
289
285
|
|
|
290
286
|
describe('default singleton', () => {
|
|
@@ -294,7 +290,7 @@ describe('ConfigLoader', () => {
|
|
|
294
290
|
|
|
295
291
|
it('defaultConfigLoader should have default paths', () => {
|
|
296
292
|
const paths = defaultConfigLoader.getConfigPaths();
|
|
297
|
-
expect(paths).
|
|
293
|
+
expect(paths.length).toBeGreaterThan(0);
|
|
298
294
|
});
|
|
299
295
|
});
|
|
300
296
|
|
|
@@ -164,38 +164,38 @@ describe('ServerConfigRegistry', () => {
|
|
|
164
164
|
expect(config.timeout).toBe(30000);
|
|
165
165
|
});
|
|
166
166
|
|
|
167
|
-
it('should use
|
|
168
|
-
const originalEnv = process.env.
|
|
169
|
-
process.env.
|
|
167
|
+
it('should use XRAY_DEV_PATH env var in dynamic config', () => {
|
|
168
|
+
const originalEnv = process.env.XRAY_DEV_PATH;
|
|
169
|
+
process.env.XRAY_DEV_PATH = 'custom-dist';
|
|
170
170
|
|
|
171
171
|
const config = registry.createDynamicConfig('test-server');
|
|
172
172
|
expect(config.args[0]).toContain('custom-dist');
|
|
173
173
|
|
|
174
|
-
process.env.
|
|
174
|
+
process.env.XRAY_DEV_PATH = originalEnv;
|
|
175
175
|
});
|
|
176
176
|
});
|
|
177
177
|
|
|
178
178
|
describe('environment path handling', () => {
|
|
179
|
-
it('should use resolved framework path when
|
|
180
|
-
const originalEnv = process.env.
|
|
181
|
-
delete process.env.
|
|
179
|
+
it('should use resolved framework path when XRAY_DEV_PATH is not set', () => {
|
|
180
|
+
const originalEnv = process.env.XRAY_DEV_PATH;
|
|
181
|
+
delete process.env.XRAY_DEV_PATH;
|
|
182
182
|
|
|
183
183
|
const freshRegistry = new ServerConfigRegistry();
|
|
184
184
|
const config = freshRegistry.get('code-review');
|
|
185
185
|
expect(config?.args[0]).toContain('.server.js');
|
|
186
186
|
|
|
187
|
-
process.env.
|
|
187
|
+
process.env.XRAY_DEV_PATH = originalEnv;
|
|
188
188
|
});
|
|
189
189
|
|
|
190
|
-
it('should use
|
|
191
|
-
const originalEnv = process.env.
|
|
192
|
-
process.env.
|
|
190
|
+
it('should use XRAY_DEV_PATH when set', () => {
|
|
191
|
+
const originalEnv = process.env.XRAY_DEV_PATH;
|
|
192
|
+
process.env.XRAY_DEV_PATH = 'dist';
|
|
193
193
|
|
|
194
194
|
const freshRegistry = new ServerConfigRegistry();
|
|
195
195
|
const config = freshRegistry.get('code-review');
|
|
196
196
|
expect(config?.args[0]).toContain('dist/');
|
|
197
197
|
|
|
198
|
-
process.env.
|
|
198
|
+
process.env.XRAY_DEV_PATH = originalEnv;
|
|
199
199
|
});
|
|
200
200
|
});
|
|
201
201
|
|
|
@@ -41,12 +41,31 @@ export class ConfigLoader {
|
|
|
41
41
|
const content = fs.readFileSync(configPath, 'utf-8');
|
|
42
42
|
const parsed = JSON.parse(content);
|
|
43
43
|
|
|
44
|
-
// Handle
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
// Handle array format
|
|
45
|
+
if (Array.isArray(parsed)) {
|
|
46
|
+
return { success: true, configs: parsed };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Handle standard MCP format (mcpServers object — Claude/OpenCode .mcp.json)
|
|
50
|
+
if (parsed.mcpServers && typeof parsed.mcpServers === 'object') {
|
|
51
|
+
const configs: IServerConfig[] = Object.entries(parsed.mcpServers).map(
|
|
52
|
+
([serverName, config]: [string, any]) => ({
|
|
53
|
+
serverName,
|
|
54
|
+
command: config.command || '',
|
|
55
|
+
args: config.args || [],
|
|
56
|
+
timeout: config.timeout ?? 30000,
|
|
57
|
+
env: config.env,
|
|
58
|
+
}),
|
|
59
|
+
);
|
|
60
|
+
return { success: true, configs };
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Handle object with servers property
|
|
64
|
+
if (parsed.servers) {
|
|
65
|
+
return { success: true, configs: parsed.servers };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return { success: true, configs: [] };
|
|
50
69
|
} catch (error) {
|
|
51
70
|
return {
|
|
52
71
|
success: false,
|
|
@@ -100,11 +119,31 @@ export class ConfigLoader {
|
|
|
100
119
|
const content = fs.readFileSync(filePath, 'utf-8');
|
|
101
120
|
const parsed = JSON.parse(content);
|
|
102
121
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
: parsed
|
|
106
|
-
|
|
107
|
-
|
|
122
|
+
// Handle array format
|
|
123
|
+
if (Array.isArray(parsed)) {
|
|
124
|
+
return { success: true, configs: parsed };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Handle standard MCP format (mcpServers object)
|
|
128
|
+
if (parsed.mcpServers && typeof parsed.mcpServers === 'object') {
|
|
129
|
+
const configs: IServerConfig[] = Object.entries(parsed.mcpServers).map(
|
|
130
|
+
([serverName, config]: [string, any]) => ({
|
|
131
|
+
serverName,
|
|
132
|
+
command: config.command || '',
|
|
133
|
+
args: config.args || [],
|
|
134
|
+
timeout: config.timeout ?? 30000,
|
|
135
|
+
env: config.env,
|
|
136
|
+
}),
|
|
137
|
+
);
|
|
138
|
+
return { success: true, configs };
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
// Handle object with servers property
|
|
142
|
+
if (parsed.servers) {
|
|
143
|
+
return { success: true, configs: parsed.servers };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return { success: true, configs: [] };
|
|
108
147
|
} catch (error) {
|
|
109
148
|
return {
|
|
110
149
|
success: false,
|
|
@@ -20,21 +20,21 @@ import fs from 'fs';
|
|
|
20
20
|
/**
|
|
21
21
|
* Resolve the correct framework root and MCP servers path.
|
|
22
22
|
* Priority:
|
|
23
|
-
* 1.
|
|
24
|
-
* 2. The "
|
|
23
|
+
* 1. XRAY_DEV_PATH env var (explicit dev override)
|
|
24
|
+
* 2. The "xray" field in the nearest package.json that declares it (works in both source tree and installed package)
|
|
25
25
|
* 3. Safe fallback to node_modules/0xray/dist
|
|
26
26
|
*/
|
|
27
27
|
function resolveFrameworkPaths(): { frameworkRoot: string; mcpServersPath: string } {
|
|
28
28
|
// Highest priority: explicit environment override
|
|
29
|
-
if (process.env.
|
|
30
|
-
const devPath = process.env.
|
|
29
|
+
if (process.env.XRAY_DEV_PATH) {
|
|
30
|
+
const devPath = process.env.XRAY_DEV_PATH;
|
|
31
31
|
return {
|
|
32
32
|
frameworkRoot: devPath,
|
|
33
33
|
mcpServersPath: join(devPath, 'mcps'),
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
// Walk upward from this module to find the package that owns the "
|
|
37
|
+
// Walk upward from this module to find the package that owns the "xray" config
|
|
38
38
|
let currentDir = dirname(fileURLToPath(import.meta.url));
|
|
39
39
|
|
|
40
40
|
// Safety limit to avoid walking the entire filesystem
|
|
@@ -44,10 +44,10 @@ function resolveFrameworkPaths(): { frameworkRoot: string; mcpServersPath: strin
|
|
|
44
44
|
if (fs.existsSync(pkgPath)) {
|
|
45
45
|
try {
|
|
46
46
|
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
47
|
-
if (pkg.name === '0xray' && pkg.
|
|
48
|
-
const
|
|
47
|
+
if (pkg.name === '0xray' && pkg.xray) {
|
|
48
|
+
const xrayCfg = pkg.xray as Record<string, string>;
|
|
49
49
|
const frameworkRoot = currentDir;
|
|
50
|
-
const declaredMcp =
|
|
50
|
+
const declaredMcp = xrayCfg.mcpServersPath || (xrayCfg.dist ? join(xrayCfg.dist, 'mcps') : 'dist/mcps');
|
|
51
51
|
return {
|
|
52
52
|
frameworkRoot,
|
|
53
53
|
mcpServersPath: join(frameworkRoot, declaredMcp),
|
|
@@ -65,7 +65,7 @@ function resolveFrameworkPaths(): { frameworkRoot: string; mcpServersPath: strin
|
|
|
65
65
|
// Final fallback (should almost never be reached)
|
|
66
66
|
const fallback = 'node_modules/0xray/dist';
|
|
67
67
|
frameworkLogger.log('server-config-registry', 'using-fallback-path', 'warning', {
|
|
68
|
-
reason: 'Could not locate
|
|
68
|
+
reason: 'Could not locate xray package.json with "xray" field',
|
|
69
69
|
fallback,
|
|
70
70
|
});
|
|
71
71
|
return {
|
|
@@ -367,7 +367,7 @@ export class ServerConfigRegistry {
|
|
|
367
367
|
/**
|
|
368
368
|
* Create a dynamic configuration for an unknown server
|
|
369
369
|
* Uses the knowledge-skills directory as default location.
|
|
370
|
-
* Now respects the "
|
|
370
|
+
* Now respects the "xray" field declared in package.json.
|
|
371
371
|
*/
|
|
372
372
|
createDynamicConfig(serverName: string): IServerConfig {
|
|
373
373
|
// Validate serverName against path traversal attacks
|
|
@@ -144,7 +144,7 @@ class XrayEnforcerToolsServer {
|
|
|
144
144
|
constructor() {
|
|
145
145
|
this.server = new Server(
|
|
146
146
|
{
|
|
147
|
-
name: "enforcer", version: "1.
|
|
147
|
+
name: "enforcer", version: "3.1.0",
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
capabilities: {
|
|
@@ -1098,7 +1098,7 @@ class XrayEnforcerToolsServer {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
|
|
1101
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
1101
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1]!)}`) {
|
|
1102
1102
|
const server = new XrayEnforcerToolsServer();
|
|
1103
1103
|
server.run().catch((error) => frameworkLogger.log("mcps/enforcer", "run", "error", { error: String(error) }));
|
|
1104
1104
|
}
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
CallToolRequestSchema,
|
|
11
11
|
ListToolsRequestSchema,
|
|
12
12
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
13
|
+
import * as fs from "fs";
|
|
13
14
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
14
15
|
import { getEstimationValidator } from "../validation/estimation-validator.js";
|
|
15
16
|
|
|
@@ -24,7 +25,7 @@ class EstimationServer {
|
|
|
24
25
|
constructor() {
|
|
25
26
|
this.server = new Server(
|
|
26
27
|
{
|
|
27
|
-
name: "estimation-validator", version: "1.
|
|
28
|
+
name: "estimation-validator", version: "3.1.0",
|
|
28
29
|
},
|
|
29
30
|
{
|
|
30
31
|
capabilities: { tools: {} },
|
|
@@ -221,7 +222,7 @@ class EstimationServer {
|
|
|
221
222
|
}
|
|
222
223
|
|
|
223
224
|
// Run if called directly
|
|
224
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
225
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1]!)}`) {
|
|
225
226
|
const server = new EstimationServer();
|
|
226
227
|
server.start().catch((error) => frameworkLogger.log("mcps/estimation", "run", "error", { error: String(error) }));
|
|
227
228
|
}
|
|
@@ -39,7 +39,7 @@ class XrayFrameworkComplianceAuditServer {
|
|
|
39
39
|
constructor() {
|
|
40
40
|
this.server = new Server(
|
|
41
41
|
{
|
|
42
|
-
name: "framework-compliance-audit", version: "1.
|
|
42
|
+
name: "framework-compliance-audit", version: "3.1.0",
|
|
43
43
|
},
|
|
44
44
|
{
|
|
45
45
|
capabilities: {
|
|
@@ -627,7 +627,7 @@ ${results.recommendations.map((r) => `• 💡 ${r}`).join("\n")}
|
|
|
627
627
|
}
|
|
628
628
|
|
|
629
629
|
// Start the server if run directly
|
|
630
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
630
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1]!)}`) {
|
|
631
631
|
const server = new XrayFrameworkComplianceAuditServer();
|
|
632
632
|
server.run().catch((error) => frameworkLogger.log("mcps/framework-compliance-audit", "run", "error", { error: String(error) }));
|
|
633
633
|
}
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
ListToolsRequestSchema,
|
|
7
7
|
McpError,
|
|
8
8
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
9
|
+
import * as fs from "fs";
|
|
9
10
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
10
11
|
import { AGENT_REGISTRY, getActiveAgents } from "../agents/registry.js";
|
|
11
12
|
|
|
@@ -22,7 +23,7 @@ class FrameworkHelpServer {
|
|
|
22
23
|
constructor() {
|
|
23
24
|
this.server = new Server(
|
|
24
25
|
{
|
|
25
|
-
name: "xray/framework-help", version: "1.
|
|
26
|
+
name: "xray/framework-help", version: "3.1.0",
|
|
26
27
|
},
|
|
27
28
|
{
|
|
28
29
|
capabilities: {
|
|
@@ -40,7 +41,7 @@ class FrameworkHelpServer {
|
|
|
40
41
|
return {
|
|
41
42
|
tools: [
|
|
42
43
|
{
|
|
43
|
-
name: "
|
|
44
|
+
name: "xray_get_capabilities",
|
|
44
45
|
description:
|
|
45
46
|
"Get comprehensive list of all 0xRay framework capabilities, commands, and available tools",
|
|
46
47
|
inputSchema: {
|
|
@@ -63,7 +64,7 @@ class FrameworkHelpServer {
|
|
|
63
64
|
},
|
|
64
65
|
},
|
|
65
66
|
{
|
|
66
|
-
name: "
|
|
67
|
+
name: "xray_get_commands",
|
|
67
68
|
description:
|
|
68
69
|
"Get list of available 0xRay commands and their usage",
|
|
69
70
|
inputSchema: {
|
|
@@ -84,7 +85,7 @@ class FrameworkHelpServer {
|
|
|
84
85
|
},
|
|
85
86
|
},
|
|
86
87
|
{
|
|
87
|
-
name: "
|
|
88
|
+
name: "xray_explain_capability",
|
|
88
89
|
description:
|
|
89
90
|
"Get detailed explanation of a specific 0xRay capability",
|
|
90
91
|
inputSchema: {
|
|
@@ -108,11 +109,11 @@ class FrameworkHelpServer {
|
|
|
108
109
|
|
|
109
110
|
try {
|
|
110
111
|
switch (name) {
|
|
111
|
-
case "
|
|
112
|
+
case "xray_get_capabilities":
|
|
112
113
|
return this.handleGetCapabilities(args);
|
|
113
|
-
case "
|
|
114
|
+
case "xray_get_commands":
|
|
114
115
|
return this.handleGetCommands(args);
|
|
115
|
-
case "
|
|
116
|
+
case "xray_explain_capability":
|
|
116
117
|
return this.handleExplainCapability(args);
|
|
117
118
|
default:
|
|
118
119
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
@@ -459,7 +460,7 @@ ${items.map(([name, desc]) => `- **${name}**: ${desc}`).join("\n")}
|
|
|
459
460
|
}
|
|
460
461
|
|
|
461
462
|
// Auto-start if this file is run directly - conditional server initialization for development/testing
|
|
462
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
463
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1]!)}`) {
|
|
463
464
|
const server = new FrameworkHelpServer();
|
|
464
465
|
server.start().catch((error) => frameworkLogger.log("mcps/framework-help", "run", "error", { error: String(error) }));
|
|
465
466
|
}
|
|
@@ -68,7 +68,7 @@ class GovernanceServer {
|
|
|
68
68
|
constructor() {
|
|
69
69
|
this.server = new Server(
|
|
70
70
|
{
|
|
71
|
-
name: "governance", version: "1.
|
|
71
|
+
name: "governance", version: "3.1.0",
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
capabilities: {
|
|
@@ -475,7 +475,12 @@ class GovernanceServer {
|
|
|
475
475
|
async runHttp(port: number = parseInt(process.env.MCP_PORT ?? "3100", 10)): Promise<void> {
|
|
476
476
|
await this.initializeGovernance();
|
|
477
477
|
|
|
478
|
-
const
|
|
478
|
+
const mcpHost = process.env.MCP_HOST || "127.0.0.1";
|
|
479
|
+
const allowedHosts = process.env.MCP_ALLOWED_HOSTS?.split(",");
|
|
480
|
+
const app = createMcpExpressApp({
|
|
481
|
+
host: mcpHost,
|
|
482
|
+
...(allowedHosts ? { allowedHosts } : {}),
|
|
483
|
+
});
|
|
479
484
|
const transport = new StreamableHTTPServerTransport({
|
|
480
485
|
sessionIdGenerator: () => randomUUID(),
|
|
481
486
|
});
|
|
@@ -527,7 +532,7 @@ class GovernanceServer {
|
|
|
527
532
|
}
|
|
528
533
|
|
|
529
534
|
// Start the server if this file is run directly
|
|
530
|
-
const entryPoint =
|
|
535
|
+
const entryPoint = fs.realpathSync(process.argv[1] ?? "");
|
|
531
536
|
if (entryPoint && fileURLToPath(import.meta.url) === entryPoint) {
|
|
532
537
|
// If --port or MCP_PORT is set, use HTTP transport (for Grok CLI compatibility)
|
|
533
538
|
const cliPort = process.argv.find((a) => a.startsWith("--port="))?.split("=")[1];
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
CallToolRequestSchema,
|
|
12
12
|
ListToolsRequestSchema,
|
|
13
13
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
14
|
+
import * as fs from "fs";
|
|
14
15
|
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
15
16
|
import { createGracefulShutdown } from "../../utils/shutdown-handler.js";
|
|
16
17
|
|
|
@@ -31,7 +32,7 @@ class XrayApiDesignServer {
|
|
|
31
32
|
constructor() {
|
|
32
33
|
this.server = new Server(
|
|
33
34
|
{
|
|
34
|
-
name: "api-design", version: "1.
|
|
35
|
+
name: "api-design", version: "3.1.0",
|
|
35
36
|
},
|
|
36
37
|
{
|
|
37
38
|
capabilities: {
|
|
@@ -152,7 +153,7 @@ class XrayApiDesignServer {
|
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
|
|
155
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
156
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1]!)}`) {
|
|
156
157
|
const server = new XrayApiDesignServer();
|
|
157
158
|
server.run().catch(() => {});
|
|
158
159
|
}
|
|
@@ -33,7 +33,7 @@ class XrayArchitecturePatternsServer {
|
|
|
33
33
|
constructor() {
|
|
34
34
|
this.server = new Server(
|
|
35
35
|
{
|
|
36
|
-
name: "architecture-patterns", version: "1.
|
|
36
|
+
name: "architecture-patterns", version: "3.1.0",
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
capabilities: {
|
|
@@ -144,7 +144,7 @@ class XrayArchitecturePatternsServer {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
147
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1]!)}`) {
|
|
148
148
|
const server = new XrayArchitecturePatternsServer();
|
|
149
149
|
server.run().catch(() => {});
|
|
150
150
|
}
|
|
@@ -81,7 +81,7 @@ class BugTriageSpecialistServer {
|
|
|
81
81
|
|
|
82
82
|
constructor() {
|
|
83
83
|
this.server = new Server(
|
|
84
|
-
{ name: "bug-triage-specialist", version: "1.
|
|
84
|
+
{ name: "bug-triage-specialist", version: "3.1.0" },
|
|
85
85
|
{ capabilities: { tools: {} } },
|
|
86
86
|
);
|
|
87
87
|
this.setupToolHandlers();
|
|
@@ -615,7 +615,7 @@ class BugTriageSpecialistServer {
|
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
|
|
618
|
-
const entryPoint =
|
|
618
|
+
const entryPoint = fs.realpathSync(process.argv[1] ?? "");
|
|
619
619
|
if (entryPoint && fileURLToPath(import.meta.url) === entryPoint) {
|
|
620
620
|
const server = new BugTriageSpecialistServer();
|
|
621
621
|
server.run();
|
|
@@ -303,7 +303,7 @@ class CodeAnalyzerServer {
|
|
|
303
303
|
|
|
304
304
|
constructor() {
|
|
305
305
|
this.server = new Server(
|
|
306
|
-
{ name: "code-analyzer", version: "1.
|
|
306
|
+
{ name: "code-analyzer", version: "3.1.0" },
|
|
307
307
|
{ capabilities: { tools: {} } },
|
|
308
308
|
);
|
|
309
309
|
|
|
@@ -587,5 +587,5 @@ class CodeAnalyzerServer {
|
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
589
|
|
|
590
|
-
if (import.meta.url === `file://${process.argv[1]}`) { new CodeAnalyzerServer().run().catch(() => {}); }
|
|
590
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1]!)}`) { new CodeAnalyzerServer().run().catch(() => {}); }
|
|
591
591
|
export default CodeAnalyzerServer;
|