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
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
9
9
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
10
10
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
11
|
+
import * as fs from "fs";
|
|
11
12
|
import { createGracefulShutdown } from "../../utils/shutdown-handler.js";
|
|
12
13
|
class SEOSpecialistServer {
|
|
13
14
|
server;
|
|
14
15
|
constructor() {
|
|
15
|
-
this.server = new Server({ name: "seo-consultant", version: "1.
|
|
16
|
+
this.server = new Server({ name: "seo-consultant", version: "3.1.0" }, { capabilities: { tools: {} } });
|
|
16
17
|
this.setupToolHandlers();
|
|
17
18
|
}
|
|
18
19
|
setupToolHandlers() {
|
|
@@ -930,7 +931,7 @@ Sitemap: ${baseUrl}/sitemap.xml`;
|
|
|
930
931
|
});
|
|
931
932
|
}
|
|
932
933
|
}
|
|
933
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
934
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
934
935
|
const server = new SEOSpecialistServer();
|
|
935
936
|
server.run().catch(() => { });
|
|
936
937
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
8
8
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
9
9
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
10
|
+
import * as fs from "fs";
|
|
10
11
|
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
11
12
|
class SessionManagementServer {
|
|
12
13
|
server;
|
|
@@ -132,7 +133,7 @@ class SessionManagementServer {
|
|
|
132
133
|
},
|
|
133
134
|
];
|
|
134
135
|
constructor() {
|
|
135
|
-
this.server = new Server({ name: "session-management", version: "1.
|
|
136
|
+
this.server = new Server({ name: "session-management", version: "3.1.0" }, { capabilities: { tools: {} } });
|
|
136
137
|
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
137
138
|
tools: this.tools,
|
|
138
139
|
}));
|
|
@@ -463,7 +464,7 @@ class SessionManagementServer {
|
|
|
463
464
|
});
|
|
464
465
|
}
|
|
465
466
|
}
|
|
466
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
467
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
467
468
|
const server = new SessionManagementServer();
|
|
468
469
|
server.run().catch((error) => frameworkLogger.log("mcps/session-management", "run", "error", { error: String(error) }));
|
|
469
470
|
}
|
|
@@ -3,16 +3,17 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
|
|
|
3
3
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
4
4
|
import { createMcpExpressApp } from "@modelcontextprotocol/sdk/server/express.js";
|
|
5
5
|
import { CallToolRequestSchema, ErrorCode, ListToolsRequestSchema, McpError, } from "@modelcontextprotocol/sdk/types.js";
|
|
6
|
-
import * as
|
|
6
|
+
import * as fs from "fs";
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
8
8
|
import { randomUUID } from "crypto";
|
|
9
9
|
import { mcpClientManager } from "../mcp-client.js";
|
|
10
10
|
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
11
|
+
import { skillInstallCommand, skillRegistryCommand } from "../../cli/commands/skill-install.js";
|
|
11
12
|
class SkillInvocationServer {
|
|
12
13
|
server;
|
|
13
14
|
constructor() {
|
|
14
15
|
this.server = new Server({
|
|
15
|
-
name: "xray/skill-invocation", version: "1.
|
|
16
|
+
name: "xray/skill-invocation", version: "3.1.0",
|
|
16
17
|
}, {
|
|
17
18
|
capabilities: {
|
|
18
19
|
tools: {},
|
|
@@ -274,6 +275,61 @@ class SkillInvocationServer {
|
|
|
274
275
|
required: ["storyType"],
|
|
275
276
|
},
|
|
276
277
|
},
|
|
278
|
+
{
|
|
279
|
+
name: "install-skill",
|
|
280
|
+
description: "Install skills from the registry or any git repo",
|
|
281
|
+
inputSchema: {
|
|
282
|
+
type: "object",
|
|
283
|
+
properties: {
|
|
284
|
+
source: {
|
|
285
|
+
type: "string",
|
|
286
|
+
description: "Source name or git URL to install skills from",
|
|
287
|
+
},
|
|
288
|
+
path: {
|
|
289
|
+
type: "string",
|
|
290
|
+
description: "Subdirectory in repo containing skills",
|
|
291
|
+
},
|
|
292
|
+
force: {
|
|
293
|
+
type: "boolean",
|
|
294
|
+
description: "Reinstall even if already installed",
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
required: ["source"],
|
|
298
|
+
},
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
name: "skill-registry-list",
|
|
302
|
+
description: "List all available skill registry sources",
|
|
303
|
+
inputSchema: {
|
|
304
|
+
type: "object",
|
|
305
|
+
properties: {},
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: "skill-registry-add",
|
|
310
|
+
description: "Add a new source to the skills registry",
|
|
311
|
+
inputSchema: {
|
|
312
|
+
type: "object",
|
|
313
|
+
properties: {
|
|
314
|
+
name: { type: "string", description: "Unique source name" },
|
|
315
|
+
url: { type: "string", description: "Repository URL" },
|
|
316
|
+
desc: { type: "string", description: "Short description" },
|
|
317
|
+
license: { type: "string", description: "License type" },
|
|
318
|
+
},
|
|
319
|
+
required: ["name", "url"],
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: "skill-registry-remove",
|
|
324
|
+
description: "Remove a source from the skills registry",
|
|
325
|
+
inputSchema: {
|
|
326
|
+
type: "object",
|
|
327
|
+
properties: {
|
|
328
|
+
name: { type: "string", description: "Source name to remove" },
|
|
329
|
+
},
|
|
330
|
+
required: ["name"],
|
|
331
|
+
},
|
|
332
|
+
},
|
|
277
333
|
],
|
|
278
334
|
};
|
|
279
335
|
});
|
|
@@ -308,6 +364,14 @@ class SkillInvocationServer {
|
|
|
308
364
|
return await this.handleSkillDocumentationGeneration(args);
|
|
309
365
|
case "skill-storyteller":
|
|
310
366
|
return await this.handleSkillStoryteller(args);
|
|
367
|
+
case "install-skill":
|
|
368
|
+
return await this.handleInstallSkill(args);
|
|
369
|
+
case "skill-registry-list":
|
|
370
|
+
return await this.handleSkillRegistryList();
|
|
371
|
+
case "skill-registry-add":
|
|
372
|
+
return await this.handleSkillRegistryAdd(args);
|
|
373
|
+
case "skill-registry-remove":
|
|
374
|
+
return await this.handleSkillRegistryRemove(args);
|
|
311
375
|
default:
|
|
312
376
|
throw new McpError(ErrorCode.MethodNotFound, `Unknown tool: ${name}`);
|
|
313
377
|
}
|
|
@@ -626,6 +690,44 @@ class SkillInvocationServer {
|
|
|
626
690
|
],
|
|
627
691
|
};
|
|
628
692
|
}
|
|
693
|
+
async captureConsole(fn) {
|
|
694
|
+
const chunks = [];
|
|
695
|
+
const origLog = console.log;
|
|
696
|
+
console.log = (...args) => chunks.push(args.map(String).join(" "));
|
|
697
|
+
try {
|
|
698
|
+
await fn();
|
|
699
|
+
}
|
|
700
|
+
finally {
|
|
701
|
+
console.log = origLog;
|
|
702
|
+
}
|
|
703
|
+
return chunks.join("\n");
|
|
704
|
+
}
|
|
705
|
+
async handleInstallSkill(args) {
|
|
706
|
+
const opts = {};
|
|
707
|
+
if (args.path !== undefined)
|
|
708
|
+
opts.path = args.path;
|
|
709
|
+
if (args.force !== undefined)
|
|
710
|
+
opts.force = args.force;
|
|
711
|
+
const output = await this.captureConsole(() => skillInstallCommand(args.source, opts));
|
|
712
|
+
return { content: [{ type: "text", text: output || "Skill installation completed." }] };
|
|
713
|
+
}
|
|
714
|
+
async handleSkillRegistryList() {
|
|
715
|
+
const output = await this.captureConsole(() => skillRegistryCommand("list"));
|
|
716
|
+
return { content: [{ type: "text", text: output || "No registry sources configured." }] };
|
|
717
|
+
}
|
|
718
|
+
async handleSkillRegistryAdd(args) {
|
|
719
|
+
const registryArgs = { name: args.name, url: args.url };
|
|
720
|
+
if (args.desc !== undefined)
|
|
721
|
+
registryArgs.desc = args.desc;
|
|
722
|
+
if (args.license !== undefined)
|
|
723
|
+
registryArgs.license = args.license;
|
|
724
|
+
const output = await this.captureConsole(() => skillRegistryCommand("add", registryArgs));
|
|
725
|
+
return { content: [{ type: "text", text: output || "Source added." }] };
|
|
726
|
+
}
|
|
727
|
+
async handleSkillRegistryRemove(args) {
|
|
728
|
+
const output = await this.captureConsole(() => skillRegistryCommand("remove", { name: args.name }));
|
|
729
|
+
return { content: [{ type: "text", text: output || "Source removed." }] };
|
|
730
|
+
}
|
|
629
731
|
async run() {
|
|
630
732
|
const transport = new StdioServerTransport();
|
|
631
733
|
await this.server.connect(transport);
|
|
@@ -706,7 +808,7 @@ class SkillInvocationServer {
|
|
|
706
808
|
}
|
|
707
809
|
}
|
|
708
810
|
// Start the server if this file is run directly
|
|
709
|
-
const entryPoint =
|
|
811
|
+
const entryPoint = fs.realpathSync(process.argv[1] ?? "");
|
|
710
812
|
if (entryPoint && fileURLToPath(import.meta.url) === entryPoint) {
|
|
711
813
|
// If --port or MCP_PORT is set, use HTTP transport (for Grok CLI compatibility)
|
|
712
814
|
const cliPort = process.argv.find((a) => a.startsWith("--port="))?.split("=")[1];
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
8
8
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
9
9
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
10
|
-
import * as
|
|
10
|
+
import * as fs from "fs";
|
|
11
11
|
import { fileURLToPath } from "url";
|
|
12
12
|
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
13
13
|
class StrategistServer {
|
|
@@ -78,7 +78,7 @@ class StrategistServer {
|
|
|
78
78
|
];
|
|
79
79
|
constructor() {
|
|
80
80
|
this.server = new Server({
|
|
81
|
-
name: "xray/strategist", version: "1.
|
|
81
|
+
name: "xray/strategist", version: "3.1.0",
|
|
82
82
|
}, {
|
|
83
83
|
capabilities: {
|
|
84
84
|
tools: {},
|
|
@@ -209,7 +209,7 @@ class StrategistServer {
|
|
|
209
209
|
await frameworkLogger.log("mcp-strategist", "server-started", "success");
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
|
-
const entryPoint =
|
|
212
|
+
const entryPoint = fs.realpathSync(process.argv[1] ?? "");
|
|
213
213
|
if (entryPoint && fileURLToPath(import.meta.url) === entryPoint) {
|
|
214
214
|
const server = new StrategistServer();
|
|
215
215
|
server.start().catch((error) => frameworkLogger.log("mcps/strategist", "run", "error", { error: String(error) }));
|
|
@@ -14,7 +14,7 @@ class XrayDocumentationGenerationServer {
|
|
|
14
14
|
server;
|
|
15
15
|
constructor() {
|
|
16
16
|
this.server = new Server({
|
|
17
|
-
name: "documentation-generation", version: "1.
|
|
17
|
+
name: "documentation-generation", version: "3.1.0",
|
|
18
18
|
}, {
|
|
19
19
|
capabilities: {
|
|
20
20
|
tools: {},
|
|
@@ -727,7 +727,7 @@ class XrayDocumentationGenerationServer {
|
|
|
727
727
|
openapi: "3.0.0",
|
|
728
728
|
info: {
|
|
729
729
|
title: "API Documentation",
|
|
730
|
-
version: "1.
|
|
730
|
+
version: "3.1.0",
|
|
731
731
|
description: "Generated API documentation",
|
|
732
732
|
},
|
|
733
733
|
servers: [
|
|
@@ -1184,7 +1184,7 @@ class XrayDocumentationGenerationServer {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
1186
1186
|
// Run the server if this file is executed directly
|
|
1187
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
1187
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
1188
1188
|
const server = new XrayDocumentationGenerationServer();
|
|
1189
1189
|
server.run().catch(() => { });
|
|
1190
1190
|
}
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
8
8
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
9
|
+
import * as fs from "fs";
|
|
9
10
|
import { createGracefulShutdown } from "../../utils/shutdown-handler.js";
|
|
10
11
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
11
12
|
class XrayTestingBestPracticesServer {
|
|
12
13
|
server;
|
|
13
14
|
constructor() {
|
|
14
15
|
this.server = new Server({
|
|
15
|
-
name: "testing-best-practices", version: "1.
|
|
16
|
+
name: "testing-best-practices", version: "3.1.0",
|
|
16
17
|
}, {
|
|
17
18
|
capabilities: {
|
|
18
19
|
tools: {},
|
|
@@ -859,7 +860,7 @@ class XrayTestingBestPracticesServer {
|
|
|
859
860
|
}
|
|
860
861
|
}
|
|
861
862
|
// Run the server if this file is executed directly
|
|
862
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
863
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
863
864
|
const server = new XrayTestingBestPracticesServer();
|
|
864
865
|
server.run().catch(() => { });
|
|
865
866
|
}
|
|
@@ -16,7 +16,7 @@ class XrayTestingStrategyServer {
|
|
|
16
16
|
server;
|
|
17
17
|
constructor() {
|
|
18
18
|
this.server = new Server({
|
|
19
|
-
name: "testing-strategy", version: "1.
|
|
19
|
+
name: "testing-strategy", version: "3.1.0",
|
|
20
20
|
}, {
|
|
21
21
|
capabilities: {
|
|
22
22
|
tools: {},
|
|
@@ -820,7 +820,7 @@ describe("${pathModule.basename(sourceFile, ".ts")}", () => {${testCases}
|
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
// Start the server if run directly
|
|
823
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
823
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
824
824
|
const server = new XrayTestingStrategyServer();
|
|
825
825
|
server.run().catch(() => { });
|
|
826
826
|
}
|
|
@@ -7,12 +7,13 @@
|
|
|
7
7
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
8
8
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
9
9
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
10
|
+
import * as fs from "fs";
|
|
10
11
|
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
11
12
|
class XrayUIUXDesignServer {
|
|
12
13
|
server;
|
|
13
14
|
constructor() {
|
|
14
15
|
this.server = new Server({
|
|
15
|
-
name: "ui-ux-design", version: "1.
|
|
16
|
+
name: "ui-ux-design", version: "3.1.0",
|
|
16
17
|
}, {
|
|
17
18
|
capabilities: {
|
|
18
19
|
tools: {},
|
|
@@ -1475,7 +1476,7 @@ Available: ${Object.keys(system.components).length} component types
|
|
|
1475
1476
|
async run() {
|
|
1476
1477
|
const transport = new StdioServerTransport();
|
|
1477
1478
|
await this.server.connect(transport);
|
|
1478
|
-
await frameworkLogger.log("ui-ux-design.server", "-
|
|
1479
|
+
await frameworkLogger.log("ui-ux-design.server", "-xray-ui-ux-design-mcp-server-running-", "info", { message: "xray UI/UX Design MCP Server running..." });
|
|
1479
1480
|
const cleanup = async (signal) => {
|
|
1480
1481
|
await frameworkLogger.log("ui-ux-design.server", "-received-signal-shutting-down-gracefully-", "info", { message: `Received ${signal}, shutting down gracefully...` });
|
|
1481
1482
|
// Set a timeout to force exit if graceful shutdown fails
|
|
@@ -1488,7 +1489,7 @@ Available: ${Object.keys(system.components).length} component types
|
|
|
1488
1489
|
await this.server.close();
|
|
1489
1490
|
}
|
|
1490
1491
|
clearTimeout(timeout);
|
|
1491
|
-
await frameworkLogger.log("ui-ux-design.server", "-
|
|
1492
|
+
await frameworkLogger.log("ui-ux-design.server", "-xray-mcp-server-shut-down-gracefully-", "info", { message: "xray MCP Server shut down gracefully" });
|
|
1492
1493
|
process.exit(0);
|
|
1493
1494
|
}
|
|
1494
1495
|
catch (error) {
|
|
@@ -1531,7 +1532,7 @@ Available: ${Object.keys(system.components).length} component types
|
|
|
1531
1532
|
}
|
|
1532
1533
|
}
|
|
1533
1534
|
// Run the server if this file is executed directly
|
|
1534
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
1535
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
1535
1536
|
const server = new XrayUIUXDesignServer();
|
|
1536
1537
|
server.run().catch((error) => frameworkLogger.log("mcps/ui-ux-design", "run", "error", { error: String(error) }));
|
|
1537
1538
|
}
|
package/dist/mcps/lint.server.js
CHANGED
|
@@ -13,14 +13,14 @@ class XrayLintServer {
|
|
|
13
13
|
server;
|
|
14
14
|
constructor() {
|
|
15
15
|
this.server = new Server({
|
|
16
|
-
name: "lint", version: "1.
|
|
16
|
+
name: "lint", version: "3.1.0",
|
|
17
17
|
}, {
|
|
18
18
|
capabilities: {
|
|
19
19
|
tools: {},
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
22
|
this.setupToolHandlers();
|
|
23
|
-
void frameworkLogger.log("lint.server", "-
|
|
23
|
+
void frameworkLogger.log("lint.server", "-xray-lint-mcp-server-initialized-", "info", { message: "0xRay Lint MCP Server initialized" });
|
|
24
24
|
}
|
|
25
25
|
setupToolHandlers() {
|
|
26
26
|
// List available tools
|
|
@@ -370,11 +370,11 @@ ${checkResults.details.map((d) => `• ${d}`).join("\n")}
|
|
|
370
370
|
async run() {
|
|
371
371
|
const transport = new StdioServerTransport();
|
|
372
372
|
await this.server.connect(transport);
|
|
373
|
-
await frameworkLogger.log("lint.server", "-
|
|
373
|
+
await frameworkLogger.log("lint.server", "-xray-lint-mcp-server-started-", "info", { message: "0xRay Lint MCP Server started" });
|
|
374
374
|
}
|
|
375
375
|
}
|
|
376
376
|
// Start the server if run directly
|
|
377
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
377
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
378
378
|
const server = new XrayLintServer();
|
|
379
379
|
server.run().catch((error) => frameworkLogger.log("mcps/lint", "run", "error", { error: String(error) }));
|
|
380
380
|
}
|
package/dist/mcps/mcp-client.js
CHANGED
|
@@ -98,7 +98,7 @@ export class MCPClient extends EventEmitter {
|
|
|
98
98
|
* Pure MCP mode — simulation and generic fallbacks are disabled.
|
|
99
99
|
*/
|
|
100
100
|
get isPureMcpMode() {
|
|
101
|
-
return process.env.
|
|
101
|
+
return process.env.XRAY_FORCE_MCP_GOVERNANCE === 'true';
|
|
102
102
|
}
|
|
103
103
|
/**
|
|
104
104
|
* Register default simulation implementations
|
|
@@ -267,17 +267,17 @@ export class MCPClient extends EventEmitter {
|
|
|
267
267
|
],
|
|
268
268
|
'framework-help': [
|
|
269
269
|
{
|
|
270
|
-
name: '
|
|
270
|
+
name: 'xray_get_capabilities',
|
|
271
271
|
description: 'Get 0xRay framework capabilities',
|
|
272
272
|
inputSchema: { type: 'object', properties: {} },
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
|
-
name: '
|
|
275
|
+
name: 'xray_get_commands',
|
|
276
276
|
description: 'Get available 0xRay commands',
|
|
277
277
|
inputSchema: { type: 'object', properties: {} },
|
|
278
278
|
},
|
|
279
279
|
{
|
|
280
|
-
name: '
|
|
280
|
+
name: 'xray_explain_capability',
|
|
281
281
|
description: 'Explain a specific capability',
|
|
282
282
|
inputSchema: {
|
|
283
283
|
type: 'object',
|
|
@@ -375,7 +375,7 @@ export class MCPClient extends EventEmitter {
|
|
|
375
375
|
// === LAST RESORT: Generic fallback (disabled in pure mode) ===
|
|
376
376
|
if (this.isPureMcpMode) {
|
|
377
377
|
throw new Error(`[PURE MCP] No real response for ${serverName}/${toolName}. ` +
|
|
378
|
-
`All fallbacks are disabled when
|
|
378
|
+
`All fallbacks are disabled when XRAY_FORCE_MCP_GOVERNANCE=true.`);
|
|
379
379
|
}
|
|
380
380
|
const fallbackResult = {
|
|
381
381
|
content: [
|
|
@@ -7,12 +7,13 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
|
7
7
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
8
|
import { modelRouter } from "../core/model-router.js";
|
|
9
9
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
10
|
+
import fs from "fs";
|
|
10
11
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
11
12
|
class XrayModelHealthCheckServer {
|
|
12
13
|
server;
|
|
13
14
|
constructor() {
|
|
14
15
|
this.server = new Server({
|
|
15
|
-
name: "model-health-check", version: "1.
|
|
16
|
+
name: "model-health-check", version: "3.1.0",
|
|
16
17
|
}, {
|
|
17
18
|
capabilities: {
|
|
18
19
|
tools: {},
|
|
@@ -221,7 +222,7 @@ class XrayModelHealthCheckServer {
|
|
|
221
222
|
}
|
|
222
223
|
}
|
|
223
224
|
// Start the server if this file is run 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 XrayModelHealthCheckServer();
|
|
226
227
|
server.start().catch((error) => frameworkLogger.log("mcps/model-health-check", "run", "error", { error: String(error) }));
|
|
227
228
|
}
|
|
@@ -7,8 +7,9 @@
|
|
|
7
7
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
8
8
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
9
9
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
10
|
+
import * as fs from 'fs';
|
|
10
11
|
import { frameworkLogger } from '../../core/framework-logger.js';
|
|
11
|
-
import {
|
|
12
|
+
import { XrayStateManager } from '../../state/state-manager.js';
|
|
12
13
|
import { MultiAgentOrchestrationCoordinator } from '../../orchestrator/multi-agent-orchestration-coordinator.js';
|
|
13
14
|
import { TaskHandler } from './handlers/task-handler.js';
|
|
14
15
|
import { ComplexityHandler } from './handlers/complexity-handler.js';
|
|
@@ -29,7 +30,7 @@ export class OrchestratorServer {
|
|
|
29
30
|
coordinator;
|
|
30
31
|
constructor() {
|
|
31
32
|
// Initialize actual coordinator
|
|
32
|
-
const stateManager = new
|
|
33
|
+
const stateManager = new XrayStateManager();
|
|
33
34
|
this.coordinator = new MultiAgentOrchestrationCoordinator(stateManager);
|
|
34
35
|
// Initialize handlers
|
|
35
36
|
this.taskHandler = new TaskHandler();
|
|
@@ -294,7 +295,7 @@ export function createOrchestratorServer() {
|
|
|
294
295
|
return serverInstance;
|
|
295
296
|
}
|
|
296
297
|
// Run if called directly
|
|
297
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
298
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
298
299
|
const server = createOrchestratorServer();
|
|
299
300
|
server.start().catch((error) => {
|
|
300
301
|
frameworkLogger.log('orchestrator.server', 'fatal-error', 'error', {
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @deprecated Use src/mcps/orchestrator/server.ts instead
|
|
8
8
|
*/
|
|
9
|
+
import * as fs from 'fs';
|
|
9
10
|
import { frameworkLogger } from '../core/framework-logger.js';
|
|
10
11
|
export { OrchestratorServer, createOrchestratorServer } from './orchestrator/server.js';
|
|
11
12
|
// Run if called directly
|
|
12
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
13
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
13
14
|
const { createOrchestratorServer } = await import('./orchestrator/server.js');
|
|
14
15
|
const server = createOrchestratorServer();
|
|
15
16
|
server.start().catch((error) => {
|
|
@@ -16,7 +16,7 @@ class XrayPerformanceAnalysisServer {
|
|
|
16
16
|
startTime;
|
|
17
17
|
constructor() {
|
|
18
18
|
this.server = new Server({
|
|
19
|
-
name: "performance-analysis", version: "1.
|
|
19
|
+
name: "performance-analysis", version: "3.1.0",
|
|
20
20
|
}, {
|
|
21
21
|
capabilities: {
|
|
22
22
|
tools: {},
|
|
@@ -512,7 +512,7 @@ ${results.recommendations.map((r) => `• 💡 ${r}`).join("\n") || "No recommen
|
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
514
|
// Start the server if run directly
|
|
515
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
515
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
516
516
|
const server = new XrayPerformanceAnalysisServer();
|
|
517
517
|
server.run().catch((error) => frameworkLogger.log("mcps/performance-analysis", "run", "error", { error: String(error) }));
|
|
518
518
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
7
7
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
8
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
9
|
+
import * as fs from "fs";
|
|
9
10
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
10
11
|
import { CodexLoader } from "../enforcement/loaders/codex-loader.js";
|
|
11
12
|
class XrayProcessorPipelineServer {
|
|
@@ -26,7 +27,7 @@ class XrayProcessorPipelineServer {
|
|
|
26
27
|
constructor() {
|
|
27
28
|
this.codexLoader = new CodexLoader();
|
|
28
29
|
this.server = new Server({
|
|
29
|
-
name: "processor-pipeline", version: "1.
|
|
30
|
+
name: "processor-pipeline", version: "3.1.0",
|
|
30
31
|
}, {
|
|
31
32
|
capabilities: {
|
|
32
33
|
tools: {},
|
|
@@ -554,7 +555,7 @@ ${complianceResults.actions.map((a) => `• 🔧 ${a}`).join("\n") || "None requ
|
|
|
554
555
|
}
|
|
555
556
|
}
|
|
556
557
|
// Start the server if run directly
|
|
557
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
558
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
558
559
|
const server = new XrayProcessorPipelineServer();
|
|
559
560
|
server.run().catch((error) => frameworkLogger.log("mcps/processor-pipeline", "run", "error", { error: String(error) }));
|
|
560
561
|
}
|
package/dist/mcps/registry.json
CHANGED
|
@@ -13,11 +13,12 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextpro
|
|
|
13
13
|
import * as fs from "fs";
|
|
14
14
|
import * as path from "path";
|
|
15
15
|
import { frameworkLogger } from "../core/framework-logger.js";
|
|
16
|
+
import { tryLLMGovernance } from "../governance/llm-governance-provider.js";
|
|
16
17
|
class XrayLibrarianServer {
|
|
17
18
|
server;
|
|
18
19
|
constructor() {
|
|
19
20
|
this.server = new Server({
|
|
20
|
-
name: "researcher", version: "1.
|
|
21
|
+
name: "researcher", version: "3.1.0",
|
|
21
22
|
}, {
|
|
22
23
|
capabilities: {
|
|
23
24
|
tools: {},
|
|
@@ -400,48 +401,22 @@ class XrayLibrarianServer {
|
|
|
400
401
|
*/
|
|
401
402
|
async analyzeProposal(args) {
|
|
402
403
|
const { proposalTitle = "", proposalDescription = "", evidence = [], proposalType = "" } = args || {};
|
|
403
|
-
const
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
decision = "approve";
|
|
414
|
-
confidence = 0.88;
|
|
415
|
-
reasoning = "PSD2 SCA patterns are well-established in the corpus across multiple implementations. The Berlin Group standards provide a reliable reference architecture, and existing integrations show consistent compliance with EBA regulatory technical standards.";
|
|
416
|
-
}
|
|
417
|
-
else if (text.includes("gdpr") || text.includes("right to erasure") || text.includes("data protection")) {
|
|
418
|
-
decision = "approve";
|
|
419
|
-
confidence = 0.91;
|
|
420
|
-
reasoning = "GDPR data erasure pipeline patterns appear in approximately 35% of enterprise codebases in the corpus. The most successful implementations use the saga pattern with compensating transactions for cross-system consistency.";
|
|
421
|
-
}
|
|
422
|
-
else if (text.includes("extract method")) {
|
|
423
|
-
decision = "approve";
|
|
424
|
-
confidence = 0.89;
|
|
425
|
-
reasoning = "The Extract Method pattern is a core refactoring technique that improves modularity; the corpus shows consistent positive outcomes when applied to repeated logic across many sessions.";
|
|
426
|
-
}
|
|
427
|
-
else if (text.includes("test coverage")) {
|
|
428
|
-
decision = "approve";
|
|
429
|
-
confidence = 0.94;
|
|
430
|
-
reasoning = "Test coverage expansion is one of the highest-leverage improvements for long-term project health, directly reducing regression incidents across 100+ sessions in the historical data.";
|
|
431
|
-
}
|
|
432
|
-
else if (text.includes("technical debt")) {
|
|
433
|
-
decision = "approve";
|
|
434
|
-
confidence = 0.85;
|
|
435
|
-
reasoning = "Systematic technical debt reduction is strongly supported by historical data showing fewer critical violations and faster feature delivery in low-debt modules.";
|
|
436
|
-
}
|
|
437
|
-
if (proposalType === "fix" && !text.includes("pattern") && !text.includes("recurring")) {
|
|
438
|
-
confidence = Math.max(0.68, confidence - 0.10);
|
|
404
|
+
const vote = await tryLLMGovernance("researcher", proposalTitle || "", proposalDescription || "", evidence || [], proposalType || "");
|
|
405
|
+
if (!vote) {
|
|
406
|
+
return {
|
|
407
|
+
content: [
|
|
408
|
+
{
|
|
409
|
+
type: "text",
|
|
410
|
+
text: "DECISION: abstain\nCONFIDENCE: 0.50\nREASONING: No LLM governance provider configured. Set XRAY_GOVERNANCE_LLM_ENABLED=true + XRAY_LLM_ENDPOINT, or install Hermes and run: hermes auth add xai-oauth --no-browser",
|
|
411
|
+
},
|
|
412
|
+
],
|
|
413
|
+
};
|
|
439
414
|
}
|
|
440
415
|
return {
|
|
441
416
|
content: [
|
|
442
417
|
{
|
|
443
418
|
type: "text",
|
|
444
|
-
text: `DECISION: ${decision}\nCONFIDENCE: ${confidence.toFixed(2)}\nREASONING: ${reasoning}`,
|
|
419
|
+
text: `DECISION: ${vote.decision}\nCONFIDENCE: ${vote.confidence.toFixed(2)}\nREASONING: ${vote.reasoning}`,
|
|
445
420
|
},
|
|
446
421
|
],
|
|
447
422
|
};
|
|
@@ -497,7 +472,7 @@ class XrayLibrarianServer {
|
|
|
497
472
|
}
|
|
498
473
|
}
|
|
499
474
|
// Run the server if this file is executed directly
|
|
500
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
475
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
501
476
|
const server = new XrayLibrarianServer();
|
|
502
477
|
server.run().catch((error) => frameworkLogger.log("mcps/researcher", "run", "error", { error: String(error) }));
|
|
503
478
|
}
|
|
@@ -15,7 +15,7 @@ class XraySecurityScanServer {
|
|
|
15
15
|
server;
|
|
16
16
|
constructor() {
|
|
17
17
|
this.server = new Server({
|
|
18
|
-
name: "security-scan", version: "1.
|
|
18
|
+
name: "security-scan", version: "3.1.0",
|
|
19
19
|
}, {
|
|
20
20
|
capabilities: {
|
|
21
21
|
tools: {},
|
|
@@ -524,7 +524,7 @@ ${results.recommendations.map((r) => `• ${r}`).join("\n") || "No recommendatio
|
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
// Start the server if run directly
|
|
527
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
527
|
+
if (import.meta.url === `file://${fs.realpathSync(process.argv[1])}`) {
|
|
528
528
|
const server = new XraySecurityScanServer();
|
|
529
529
|
server.run().catch((error) => frameworkLogger.log("mcps/security-scan", "run", "error", { error: String(error) }));
|
|
530
530
|
}
|