0xray 2.1.2 → 2.1.3
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/AGENTS.md +2 -1
- package/README.md +12 -11
- package/dist/AGENTS.md +2 -1
- package/dist/CHANGELOG.md +26 -0
- package/dist/README.md +12 -11
- package/dist/agents/code-reviewer.js +1 -1
- package/dist/analytics/routing-refiner.js +1 -1
- package/dist/cli/index.js +11 -1
- package/dist/cli/server.js +3 -3
- package/dist/core/activity-logger.d.ts +2 -2
- package/dist/core/activity-logger.js +4 -4
- package/dist/core/boot-orchestrator.d.ts +1 -1
- package/dist/core/boot-orchestrator.js +13 -28
- package/dist/core/bridge.mjs +3 -3
- package/dist/core/codex-formatter.js +2 -2
- package/dist/core/codex-injector.d.ts +0 -1
- package/dist/core/codex-injector.js +2 -3
- package/dist/core/config-loader.d.ts +1 -1
- package/dist/core/config-loader.js +1 -1
- package/dist/core/config-paths.d.ts +0 -2
- package/dist/core/config-paths.js +7 -8
- package/dist/core/context-loader.d.ts +1 -1
- package/dist/core/context-loader.js +1 -1
- package/dist/core/errors.d.ts +3 -0
- package/dist/core/errors.js +10 -0
- package/dist/core/features-config.js +1 -1
- package/dist/core/framework-logger.d.ts +3 -3
- package/dist/core/framework-logger.js +17 -9
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +4 -2
- package/dist/core/logging-config.d.ts +2 -1
- package/dist/core/logging-config.js +7 -7
- package/dist/enforcement/loaders/codex-loader.js +1 -1
- package/dist/execution/opencode-cli-invoker.js +5 -5
- package/dist/governance/governance-service.js +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/inference/inference-cycle.d.ts +1 -1
- package/dist/inference/inference-cycle.js +10 -10
- package/dist/integrations/base/Integration.js +1 -1
- package/dist/integrations/base/registry.js +19 -19
- package/dist/integrations/grok/grok-cli.js +17 -17
- package/dist/integrations/grok/hooks/pre-tool-use.js +1 -1
- package/dist/integrations/hermes-agent/bridge.mjs +1 -1
- package/dist/integrations/openclaw/api-server.d.ts +0 -1
- package/dist/integrations/openclaw/api-server.js +7 -10
- package/dist/integrations/openclaw/client.d.ts +0 -1
- package/dist/integrations/openclaw/client.js +22 -24
- package/dist/integrations/openclaw/hooks/xray-hooks.d.ts +0 -1
- package/dist/integrations/openclaw/hooks/xray-hooks.js +17 -18
- package/dist/integrations/plugins/plugin-registry.js +5 -5
- package/dist/mcps/architect-tools.server.d.ts +2 -4
- package/dist/mcps/architect-tools.server.js +112 -195
- package/dist/mcps/auto-format.server.d.ts +2 -4
- package/dist/mcps/auto-format.server.js +49 -95
- package/dist/mcps/boot-orchestrator.server.d.ts +2 -4
- package/dist/mcps/boot-orchestrator.server.js +73 -105
- package/dist/mcps/config/server-config-registry.js +3 -3
- package/dist/mcps/enforcer-tools.server.d.ts +2 -4
- package/dist/mcps/enforcer-tools.server.js +202 -285
- package/dist/mcps/estimation.server.d.ts +2 -4
- package/dist/mcps/estimation.server.js +63 -107
- package/dist/mcps/framework-compliance-audit.server.d.ts +2 -4
- package/dist/mcps/framework-compliance-audit.server.js +53 -82
- package/dist/mcps/framework-help.server.d.ts +2 -4
- package/dist/mcps/framework-help.server.js +63 -101
- package/dist/mcps/governance.server.js +2 -2
- package/dist/mcps/knowledge-skills/api-design.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/api-design.server.js +35 -67
- package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts +2 -10
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +35 -74
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +143 -162
- package/dist/mcps/knowledge-skills/code-analyzer.server.d.ts +3 -4
- package/dist/mcps/knowledge-skills/code-analyzer.server.js +20 -45
- package/dist/mcps/knowledge-skills/code-review.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/code-review.server.js +109 -143
- package/dist/mcps/knowledge-skills/content-creator.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/content-creator.server.js +205 -226
- package/dist/mcps/knowledge-skills/database-design.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/database-design.server.js +117 -151
- package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +71 -160
- package/dist/mcps/knowledge-skills/git-workflow.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/git-workflow.server.js +36 -68
- package/dist/mcps/knowledge-skills/growth-strategist.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/growth-strategist.server.js +303 -324
- package/dist/mcps/knowledge-skills/log-monitor.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/log-monitor.server.js +141 -160
- package/dist/mcps/knowledge-skills/mobile-development.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/mobile-development.server.js +92 -209
- package/dist/mcps/knowledge-skills/multimodal-looker.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/multimodal-looker.server.js +123 -159
- package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts +2 -5
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +155 -296
- package/dist/mcps/knowledge-skills/project-analysis.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/project-analysis.server.js +75 -226
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +63 -156
- package/dist/mcps/knowledge-skills/security-audit.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/security-audit.server.js +102 -136
- package/dist/mcps/knowledge-skills/seo-consultant.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/seo-consultant.server.js +80 -203
- package/dist/mcps/knowledge-skills/session-management.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/session-management.server.js +50 -203
- package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/skill-invocation.server.js +168 -347
- package/dist/mcps/knowledge-skills/strategist.server.d.ts +2 -11
- package/dist/mcps/knowledge-skills/strategist.server.js +72 -122
- package/dist/mcps/knowledge-skills/tech-writer.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/tech-writer.server.js +87 -300
- package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js +147 -182
- package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts +2 -4
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +78 -153
- package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +2 -5
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +90 -399
- package/dist/mcps/lint.server.d.ts +2 -4
- package/dist/mcps/lint.server.js +51 -92
- package/dist/mcps/mcp-client.js +2 -2
- package/dist/mcps/model-health-check.server.d.ts +2 -4
- package/dist/mcps/model-health-check.server.js +32 -60
- package/dist/mcps/performance-analysis.server.d.ts +2 -4
- package/dist/mcps/performance-analysis.server.js +57 -88
- package/dist/mcps/processor-pipeline.server.d.ts +2 -4
- package/dist/mcps/processor-pipeline.server.js +69 -100
- package/dist/mcps/registry.json +1 -1
- package/dist/mcps/researcher.server.d.ts +3 -5
- package/dist/mcps/researcher.server.js +81 -154
- package/dist/mcps/security-scan.server.d.ts +2 -4
- package/dist/mcps/security-scan.server.js +54 -96
- package/dist/mcps/shared/knowledge-skill-base.d.ts +14 -0
- package/dist/mcps/shared/knowledge-skill-base.js +45 -0
- package/dist/{security → mcps/shared}/security-scanner.js +1 -1
- package/dist/mcps/state-manager.server.d.ts +2 -4
- package/dist/mcps/state-manager.server.js +115 -160
- package/dist/orchestrator/orchestrator.d.ts +1 -1
- package/dist/orchestrator/orchestrator.js +1 -1
- 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 +1 -1
- package/dist/postprocessor/PostProcessor.d.ts +4 -44
- package/dist/postprocessor/PostProcessor.js +39 -553
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.d.ts +11 -0
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.js +50 -0
- package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.d.ts +11 -0
- package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.js +356 -0
- package/dist/postprocessor/config/ProcessorConfigLoader.d.ts +44 -0
- package/dist/postprocessor/config/ProcessorConfigLoader.js +21 -0
- package/dist/postprocessor/reporting/PostProcessorReporter.d.ts +19 -0
- package/dist/postprocessor/reporting/PostProcessorReporter.js +96 -0
- package/dist/postprocessor/triggers/GitHookTrigger.js +11 -11
- package/dist/processors/implementations/refactoring-logging-processor-wrapper.d.ts +32 -0
- package/dist/processors/implementations/refactoring-logging-processor-wrapper.js +95 -1
- package/dist/processors/processor-manager.js +346 -314
- package/dist/reporting/report-formatter.js +1 -1
- package/dist/security/security-hardener.d.ts +69 -2
- package/dist/security/security-hardener.js +129 -1
- package/dist/skills/registry.json +1 -1
- package/dist/state/index.d.ts +3 -5
- package/dist/state/index.js +1 -7
- package/dist/state/state-manager.d.ts +1 -1
- package/dist/state/state-manager.js +2 -3
- package/package.json +13 -10
- package/scripts/node/universal-version-manager.js +11 -11
- package/src/mcps/architect-tools.server.ts +112 -215
- package/src/mcps/auto-format.server.ts +50 -110
- package/src/mcps/boot-orchestrator.server.ts +75 -121
- package/src/mcps/config/__tests__/server-config-registry.test.ts +21 -12
- package/src/mcps/config/server-config-registry.ts +3 -3
- package/src/mcps/enforcer-tools.server.ts +212 -310
- package/src/mcps/estimation.server.ts +62 -122
- package/src/mcps/framework-compliance-audit.server.ts +52 -97
- package/src/mcps/framework-help.server.ts +64 -114
- package/src/mcps/governance.server.ts +2 -2
- package/src/mcps/knowledge-skills/api-design.server.ts +32 -77
- package/src/mcps/knowledge-skills/architecture-patterns.server.ts +31 -87
- package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +165 -193
- package/src/mcps/knowledge-skills/code-analyzer.server.ts +20 -55
- package/src/mcps/knowledge-skills/code-review.server.ts +114 -161
- package/src/mcps/knowledge-skills/content-creator.server.ts +218 -255
- package/src/mcps/knowledge-skills/database-design.server.ts +118 -165
- package/src/mcps/knowledge-skills/devops-deployment.server.ts +67 -172
- package/src/mcps/knowledge-skills/git-workflow.server.ts +32 -77
- package/src/mcps/knowledge-skills/growth-strategist.server.ts +324 -361
- package/src/mcps/knowledge-skills/log-monitor.server.ts +160 -187
- package/src/mcps/knowledge-skills/mobile-development.server.ts +89 -223
- package/src/mcps/knowledge-skills/multimodal-looker.server.ts +128 -175
- package/src/mcps/knowledge-skills/performance-optimization.server.ts +156 -329
- package/src/mcps/knowledge-skills/project-analysis.server.ts +72 -248
- package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +59 -171
- package/src/mcps/knowledge-skills/security-audit.server.ts +104 -151
- package/src/mcps/knowledge-skills/seo-consultant.server.ts +80 -220
- package/src/mcps/knowledge-skills/session-management.server.ts +51 -232
- package/src/mcps/knowledge-skills/skill-invocation.server.ts +165 -372
- package/src/mcps/knowledge-skills/strategist.server.ts +72 -143
- package/src/mcps/knowledge-skills/tech-writer.server.ts +85 -350
- package/src/mcps/knowledge-skills/testing-best-practices.server.ts +146 -195
- package/src/mcps/knowledge-skills/testing-strategy.server.ts +75 -161
- package/src/mcps/knowledge-skills/ui-ux-design.server.ts +93 -487
- package/src/mcps/lint.server.ts +53 -107
- package/src/mcps/mcp-client.ts +2 -2
- package/src/mcps/model-health-check.server.ts +34 -71
- package/src/mcps/performance-analysis.server.ts +60 -104
- package/src/mcps/processor-pipeline.server.ts +72 -110
- package/src/mcps/registry.json +1 -1
- package/src/mcps/researcher.server.ts +88 -177
- package/src/mcps/security-scan.server.ts +55 -104
- package/src/mcps/shared/knowledge-skill-base.ts +62 -0
- package/src/mcps/shared/prompt-security-validator.ts +199 -0
- package/src/mcps/shared/security-scanner.ts +599 -0
- package/src/mcps/state-manager.server.ts +117 -175
- 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/registry.json +1 -1
- package/xray/codex.json +1 -1
- package/xray/config.json +1 -1
- package/xray/features.json +1 -1
- package/xray/integrations.json +3 -3
- 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/conftest.py +0 -14
- package/dist/integrations/hermes-agent/test_plugin.py +0 -1103
- package/dist/processors/implementations/refactoring-logging-processor.d.ts +0 -31
- package/dist/processors/implementations/refactoring-logging-processor.js +0 -96
- package/dist/processors/implementations/session-capture-processor.d.ts +0 -14
- package/dist/processors/implementations/session-capture-processor.js +0 -37
- package/dist/scripts/activate-kernel-pipeline.d.ts +0 -7
- package/dist/scripts/activate-kernel-pipeline.js +0 -101
- package/dist/security/index.d.ts +0 -13
- package/dist/security/index.js +0 -13
- package/dist/security/security-agent-coordinator.d.ts +0 -72
- package/dist/security/security-agent-coordinator.js +0 -204
- package/dist/security/security-auditor.d.ts +0 -56
- package/dist/security/security-auditor.js +0 -584
- package/dist/security/security-hardening-system.d.ts +0 -239
- package/dist/security/security-hardening-system.js +0 -727
- package/dist/security/security-orchestration-layer.d.ts +0 -119
- package/dist/security/security-orchestration-layer.js +0 -496
- /package/dist/{security → mcps/shared}/prompt-security-validator.d.ts +0 -0
- /package/dist/{security → mcps/shared}/prompt-security-validator.js +0 -0
- /package/dist/{security → mcps/shared}/security-scanner.d.ts +0 -0
|
@@ -4,144 +4,119 @@
|
|
|
4
4
|
* Knowledge skill for comprehensive security analysis, vulnerability assessment,
|
|
5
5
|
* and compliance validation - ensures production-ready security posture
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
7
|
+
import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
|
|
8
|
+
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
10
9
|
import * as fs from "fs";
|
|
11
10
|
import * as path from "path";
|
|
12
|
-
|
|
13
|
-
class XraySecurityAuditServer {
|
|
14
|
-
server;
|
|
11
|
+
class XraySecurityAuditServer extends XrayKnowledgeSkillBase {
|
|
15
12
|
constructor() {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
return {
|
|
29
|
-
tools: [
|
|
30
|
-
{
|
|
31
|
-
name: "audit_security",
|
|
32
|
-
description: "Perform comprehensive security audit on codebase files",
|
|
33
|
-
inputSchema: {
|
|
34
|
-
type: "object",
|
|
35
|
-
properties: {
|
|
36
|
-
files: {
|
|
37
|
-
type: "array",
|
|
38
|
-
items: { type: "string" },
|
|
39
|
-
description: "List of file paths to audit",
|
|
40
|
-
},
|
|
41
|
-
includeDependencies: {
|
|
42
|
-
type: "boolean",
|
|
43
|
-
description: "Include dependency vulnerability analysis",
|
|
44
|
-
default: true,
|
|
45
|
-
},
|
|
46
|
-
complianceFrameworks: {
|
|
47
|
-
type: "array",
|
|
48
|
-
items: {
|
|
49
|
-
type: "string",
|
|
50
|
-
enum: ["owasp-top-10", "nist", "iso-27001", "pci-dss"],
|
|
51
|
-
},
|
|
52
|
-
description: "Compliance frameworks to check against",
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
required: ["files"],
|
|
13
|
+
super("security-audit", "2.0.1");
|
|
14
|
+
this.tools = [
|
|
15
|
+
{
|
|
16
|
+
name: "audit_security",
|
|
17
|
+
description: "Perform comprehensive security audit on codebase files",
|
|
18
|
+
inputSchema: {
|
|
19
|
+
type: "object",
|
|
20
|
+
properties: {
|
|
21
|
+
files: {
|
|
22
|
+
type: "array",
|
|
23
|
+
items: { type: "string" },
|
|
24
|
+
description: "List of file paths to audit",
|
|
56
25
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
vulnerabilityType: {
|
|
69
|
-
type: "string",
|
|
70
|
-
enum: [
|
|
71
|
-
"injection",
|
|
72
|
-
"authentication",
|
|
73
|
-
"authorization",
|
|
74
|
-
"cryptography",
|
|
75
|
-
"xss",
|
|
76
|
-
"csrf",
|
|
77
|
-
"secrets",
|
|
78
|
-
"configuration",
|
|
79
|
-
],
|
|
80
|
-
},
|
|
81
|
-
severity: {
|
|
82
|
-
type: "string",
|
|
83
|
-
enum: ["critical", "high", "medium", "low", "info"],
|
|
84
|
-
description: "Minimum severity level to report",
|
|
85
|
-
},
|
|
26
|
+
includeDependencies: {
|
|
27
|
+
type: "boolean",
|
|
28
|
+
description: "Include dependency vulnerability analysis",
|
|
29
|
+
default: true,
|
|
30
|
+
},
|
|
31
|
+
complianceFrameworks: {
|
|
32
|
+
type: "array",
|
|
33
|
+
items: {
|
|
34
|
+
type: "string",
|
|
35
|
+
enum: ["owasp-top-10", "nist", "iso-27001", "pci-dss"],
|
|
86
36
|
},
|
|
87
|
-
|
|
37
|
+
description: "Compliance frameworks to check against",
|
|
88
38
|
},
|
|
89
39
|
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
40
|
+
required: ["files"],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "check_vulnerability",
|
|
45
|
+
description: "Check specific security vulnerability patterns in a file",
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: {
|
|
49
|
+
filePath: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "Path to the file to check",
|
|
52
|
+
},
|
|
53
|
+
vulnerabilityType: {
|
|
54
|
+
type: "string",
|
|
55
|
+
enum: [
|
|
56
|
+
"injection",
|
|
57
|
+
"authentication",
|
|
58
|
+
"authorization",
|
|
59
|
+
"cryptography",
|
|
60
|
+
"xss",
|
|
61
|
+
"csrf",
|
|
62
|
+
"secrets",
|
|
63
|
+
"configuration",
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
severity: {
|
|
67
|
+
type: "string",
|
|
68
|
+
enum: ["critical", "high", "medium", "low", "info"],
|
|
69
|
+
description: "Minimum severity level to report",
|
|
111
70
|
},
|
|
112
71
|
},
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
72
|
+
required: ["filePath", "vulnerabilityType"],
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "generate_security_report",
|
|
77
|
+
description: "Generate comprehensive security report with remediation steps",
|
|
78
|
+
inputSchema: {
|
|
79
|
+
type: "object",
|
|
80
|
+
properties: {
|
|
81
|
+
auditResults: {
|
|
117
82
|
type: "object",
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
83
|
+
description: "Results from audit_security tool",
|
|
84
|
+
},
|
|
85
|
+
format: {
|
|
86
|
+
type: "string",
|
|
87
|
+
enum: ["markdown", "json", "html"],
|
|
88
|
+
default: "markdown",
|
|
89
|
+
},
|
|
90
|
+
includeRemediation: {
|
|
91
|
+
type: "boolean",
|
|
92
|
+
default: true,
|
|
125
93
|
},
|
|
126
94
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
|
|
95
|
+
required: ["auditResults"],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "analyze_proposal",
|
|
100
|
+
description: "Analyze an inference proposal (pattern/bug/refactor) from a security perspective and return a structured governance decision",
|
|
101
|
+
inputSchema: {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
proposalTitle: { type: "string" },
|
|
105
|
+
proposalDescription: { type: "string" },
|
|
106
|
+
evidence: { type: "array", items: { type: "string" } },
|
|
107
|
+
proposalType: { type: "string" },
|
|
108
|
+
},
|
|
109
|
+
required: ["proposalTitle", "proposalDescription"],
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
];
|
|
113
|
+
this.handlers = {
|
|
114
|
+
"audit_security": async (args) => this.auditSecurity(args),
|
|
115
|
+
"check_vulnerability": async (args) => this.checkVulnerability(args),
|
|
116
|
+
"generate_security_report": async (args) => this.generateSecurityReport(args),
|
|
117
|
+
"analyze_proposal": async (args) => this.analyzeProposal(args),
|
|
118
|
+
};
|
|
119
|
+
this.setupToolHandlers();
|
|
145
120
|
}
|
|
146
121
|
async auditSecurity(args) {
|
|
147
122
|
const { files, includeDependencies = true, complianceFrameworks = ["owasp-top-10"], } = args;
|
|
@@ -828,19 +803,10 @@ class XraySecurityAuditServer {
|
|
|
828
803
|
],
|
|
829
804
|
};
|
|
830
805
|
}
|
|
831
|
-
async run() {
|
|
832
|
-
const transport = new StdioServerTransport();
|
|
833
|
-
await this.server.connect(transport);
|
|
834
|
-
// Use centralized shutdown handler
|
|
835
|
-
createGracefulShutdown({
|
|
836
|
-
serverName: "security-audit.server",
|
|
837
|
-
server: this.server,
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
806
|
}
|
|
841
807
|
// Run the server if this file is executed directly
|
|
842
808
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
843
809
|
const server = new XraySecurityAuditServer();
|
|
844
|
-
server.run().catch(() => { });
|
|
810
|
+
server.run("security-audit").catch((err) => { frameworkLogger.log("security-audit", "run", "error", { error: err instanceof Error ? err.message : String(err) }); });
|
|
845
811
|
}
|
|
846
812
|
export { XraySecurityAuditServer };
|
|
@@ -5,10 +5,9 @@
|
|
|
5
5
|
* Provides schema markup, robots.txt, Core Web Vitals, AI search optimization,
|
|
6
6
|
* sitemap generation, and deep technical SEO audits.
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
|
|
9
|
+
declare class SEOSpecialistServer extends XrayKnowledgeSkillBase {
|
|
10
10
|
constructor();
|
|
11
|
-
private setupToolHandlers;
|
|
12
11
|
private auditTechnicalSEO;
|
|
13
12
|
private generateSchemaMarkup;
|
|
14
13
|
private generateMicrodata;
|
|
@@ -21,6 +20,5 @@ declare class SEOSpecialistServer {
|
|
|
21
20
|
private generateSitemap;
|
|
22
21
|
private optimizeRobotsTxt;
|
|
23
22
|
private validateRobotsTxt;
|
|
24
|
-
run(): Promise<void>;
|
|
25
23
|
}
|
|
26
24
|
export { SEOSpecialistServer };
|
|
@@ -5,213 +5,98 @@
|
|
|
5
5
|
* Provides schema markup, robots.txt, Core Web Vitals, AI search optimization,
|
|
6
6
|
* sitemap generation, and deep technical SEO audits.
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
import { createGracefulShutdown } from "../../utils/shutdown-handler.js";
|
|
12
|
-
class SEOSpecialistServer {
|
|
13
|
-
server;
|
|
8
|
+
import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
|
|
9
|
+
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
10
|
+
class SEOSpecialistServer extends XrayKnowledgeSkillBase {
|
|
14
11
|
constructor() {
|
|
15
|
-
|
|
16
|
-
this.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
type: "object",
|
|
26
|
-
properties: {
|
|
27
|
-
targetUrl: { type: "string", description: "Target URL to audit" },
|
|
28
|
-
focusAreas: {
|
|
29
|
-
type: "array",
|
|
30
|
-
items: { type: "string" },
|
|
31
|
-
description: "Areas to focus on (schema, performance, structure, links, accessibility)",
|
|
32
|
-
},
|
|
33
|
-
},
|
|
12
|
+
super("seo-consultant", "2.0.1");
|
|
13
|
+
this.tools = [
|
|
14
|
+
{
|
|
15
|
+
name: "audit-technical-seo",
|
|
16
|
+
description: "Perform deep technical SEO audit: schema markup, meta tags, heading structure, internal linking, performance, accessibility, mobile-friendliness",
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: "object",
|
|
19
|
+
properties: {
|
|
20
|
+
targetUrl: { type: "string", description: "Target URL to audit" },
|
|
21
|
+
focusAreas: { type: "array", items: { type: "string" }, description: "Areas to focus on (schema, performance, structure, links, accessibility)" },
|
|
34
22
|
},
|
|
35
23
|
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"Product",
|
|
47
|
-
"Article",
|
|
48
|
-
"FAQPage",
|
|
49
|
-
"BreadcrumbList",
|
|
50
|
-
"LocalBusiness",
|
|
51
|
-
"WebSite",
|
|
52
|
-
"HowTo",
|
|
53
|
-
"Recipe",
|
|
54
|
-
"VideoObject",
|
|
55
|
-
"AudioObject",
|
|
56
|
-
"Course",
|
|
57
|
-
"Event",
|
|
58
|
-
"Person",
|
|
59
|
-
"Book",
|
|
60
|
-
"SoftwareApplication",
|
|
61
|
-
],
|
|
62
|
-
},
|
|
63
|
-
data: {
|
|
64
|
-
type: "object",
|
|
65
|
-
description: "Data to populate schema (varies by type)",
|
|
66
|
-
},
|
|
67
|
-
includeMicrodata: {
|
|
68
|
-
type: "boolean",
|
|
69
|
-
description: "Also generate HTML microdata format",
|
|
70
|
-
default: false,
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
required: ["schemaType", "data"],
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: "generate-schema-markup",
|
|
27
|
+
description: "Generate JSON-LD schema markup for: Organization, Product, Article, FAQPage, BreadcrumbList, LocalBusiness, WebSite, HowTo, Recipe, Video, Audio, Course, Event, Person, Book, SoftwareApplication",
|
|
28
|
+
inputSchema: {
|
|
29
|
+
type: "object",
|
|
30
|
+
properties: {
|
|
31
|
+
schemaType: { type: "string", enum: ["Organization", "Product", "Article", "FAQPage", "BreadcrumbList", "LocalBusiness", "WebSite", "HowTo", "Recipe", "VideoObject", "AudioObject", "Course", "Event", "Person", "Book", "SoftwareApplication"] },
|
|
32
|
+
data: { type: "object", description: "Data to populate schema (varies by type)" },
|
|
33
|
+
includeMicrodata: { type: "boolean", description: "Also generate HTML microdata format", default: false },
|
|
74
34
|
},
|
|
35
|
+
required: ["schemaType", "data"],
|
|
75
36
|
},
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
description: "Type of page for context-specific recommendations",
|
|
87
|
-
},
|
|
88
|
-
currentMetrics: {
|
|
89
|
-
type: "object",
|
|
90
|
-
description: "Current Core Web Vitals values if known",
|
|
91
|
-
properties: {
|
|
92
|
-
LCP: { type: "number" },
|
|
93
|
-
INP: { type: "number" },
|
|
94
|
-
CLS: { type: "number" },
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
required: ["url"],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "optimize-core-web-vitals",
|
|
40
|
+
description: "Analyze and provide optimization recommendations for LCP (Largest Contentful Paint), INP (Interaction to Next Paint), CLS (Cumulative Layout Shift)",
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: {
|
|
44
|
+
url: { type: "string", description: "URL to analyze" },
|
|
45
|
+
pageType: { type: "string", enum: ["homepage", "article", "product", "category", "landing"], description: "Type of page for context-specific recommendations" },
|
|
46
|
+
currentMetrics: { type: "object", description: "Current Core Web Vitals values if known", properties: { LCP: { type: "number" }, INP: { type: "number" }, CLS: { type: "number" } } },
|
|
99
47
|
},
|
|
48
|
+
required: ["url"],
|
|
100
49
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
description: "Target AI engines (chatgpt, perplexity, grok, gemini, claude)",
|
|
112
|
-
},
|
|
113
|
-
pageContext: {
|
|
114
|
-
type: "string",
|
|
115
|
-
description: "Page context (documentation, blog, product, api)",
|
|
116
|
-
},
|
|
117
|
-
},
|
|
118
|
-
required: ["content"],
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "analyze-ai-search",
|
|
53
|
+
description: "Optimize content for AI search engines (ChatGPT, Perplexity, Grok, Gemini, Claude). Analyze E-E-A-T signals, structure content for citation",
|
|
54
|
+
inputSchema: {
|
|
55
|
+
type: "object",
|
|
56
|
+
properties: {
|
|
57
|
+
content: { type: "string", description: "Content to optimize" },
|
|
58
|
+
targetAI: { type: "array", items: { type: "string" }, description: "Target AI engines (chatgpt, perplexity, grok, gemini, claude)" },
|
|
59
|
+
pageContext: { type: "string", description: "Page context (documentation, blog, product, api)" },
|
|
119
60
|
},
|
|
61
|
+
required: ["content"],
|
|
120
62
|
},
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
properties: {
|
|
133
|
-
path: { type: "string" },
|
|
134
|
-
lastmod: { type: "string" },
|
|
135
|
-
changefreq: {
|
|
136
|
-
type: "string",
|
|
137
|
-
enum: [
|
|
138
|
-
"always",
|
|
139
|
-
"hourly",
|
|
140
|
-
"daily",
|
|
141
|
-
"weekly",
|
|
142
|
-
"monthly",
|
|
143
|
-
"yearly",
|
|
144
|
-
"never",
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
|
-
priority: { type: "number", minimum: 0, maximum: 1 },
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
includeImages: { type: "boolean", default: false },
|
|
152
|
-
includeVideos: { type: "boolean", default: false },
|
|
153
|
-
},
|
|
154
|
-
required: ["baseUrl", "pages"],
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "generate-sitemap",
|
|
66
|
+
description: "Generate XML sitemap for SEO with proper structure, priorities, and changefreq",
|
|
67
|
+
inputSchema: {
|
|
68
|
+
type: "object",
|
|
69
|
+
properties: {
|
|
70
|
+
baseUrl: { type: "string", description: "Base URL for sitemap" },
|
|
71
|
+
pages: { type: "array", items: { type: "object", properties: { path: { type: "string" }, lastmod: { type: "string" }, changefreq: { type: "string", enum: ["always", "hourly", "daily", "weekly", "monthly", "yearly", "never"] }, priority: { type: "number", minimum: 0, maximum: 1 } } } },
|
|
72
|
+
includeImages: { type: "boolean", default: false },
|
|
73
|
+
includeVideos: { type: "boolean", default: false },
|
|
155
74
|
},
|
|
75
|
+
required: ["baseUrl", "pages"],
|
|
156
76
|
},
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
properties: {
|
|
167
|
-
allowAI: { type: "boolean", description: "Allow AI crawlers", default: true },
|
|
168
|
-
allowSearchBots: {
|
|
169
|
-
type: "boolean",
|
|
170
|
-
description: "Allow standard search bots",
|
|
171
|
-
default: true,
|
|
172
|
-
},
|
|
173
|
-
blockPaths: {
|
|
174
|
-
type: "array",
|
|
175
|
-
items: { type: "string" },
|
|
176
|
-
description: "Paths to disallow",
|
|
177
|
-
},
|
|
178
|
-
crawlDelay: { type: "number", description: "Crawl delay in seconds" },
|
|
179
|
-
generateSitemapDirective: { type: "boolean", default: true },
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
},
|
|
183
|
-
required: ["baseUrl"],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "optimize-robots-txt",
|
|
80
|
+
description: "Optimize robots.txt for SEO best practices, AI crawler optimization, and proper directive structure",
|
|
81
|
+
inputSchema: {
|
|
82
|
+
type: "object",
|
|
83
|
+
properties: {
|
|
84
|
+
baseUrl: { type: "string", description: "Site base URL" },
|
|
85
|
+
options: { type: "object", properties: { allowAI: { type: "boolean", description: "Allow AI crawlers", default: true }, allowSearchBots: { type: "boolean", description: "Allow standard search bots", default: true }, blockPaths: { type: "array", items: { type: "string" }, description: "Paths to disallow" }, crawlDelay: { type: "number", description: "Crawl delay in seconds" }, generateSitemapDirective: { type: "boolean", default: true } } },
|
|
184
86
|
},
|
|
87
|
+
required: ["baseUrl"],
|
|
185
88
|
},
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
this.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
return this.optimizeCoreWebVitals(args);
|
|
198
|
-
case "analyze-ai-search":
|
|
199
|
-
return this.analyzeAISearch(args);
|
|
200
|
-
case "generate-sitemap":
|
|
201
|
-
return this.generateSitemap(args);
|
|
202
|
-
case "optimize-robots-txt":
|
|
203
|
-
return this.optimizeRobotsTxt(args);
|
|
204
|
-
default:
|
|
205
|
-
throw new Error(`Unknown tool: ${name}`);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
catch (error) {
|
|
209
|
-
return {
|
|
210
|
-
content: [{ type: "text", text: `Error: ${error}` }],
|
|
211
|
-
isError: true,
|
|
212
|
-
};
|
|
213
|
-
}
|
|
214
|
-
});
|
|
89
|
+
},
|
|
90
|
+
];
|
|
91
|
+
this.handlers = {
|
|
92
|
+
"audit-technical-seo": async (args) => this.auditTechnicalSEO(args),
|
|
93
|
+
"generate-schema-markup": async (args) => this.generateSchemaMarkup(args),
|
|
94
|
+
"optimize-core-web-vitals": async (args) => this.optimizeCoreWebVitals(args),
|
|
95
|
+
"analyze-ai-search": async (args) => this.analyzeAISearch(args),
|
|
96
|
+
"generate-sitemap": async (args) => this.generateSitemap(args),
|
|
97
|
+
"optimize-robots-txt": async (args) => this.optimizeRobotsTxt(args),
|
|
98
|
+
};
|
|
99
|
+
this.setupToolHandlers();
|
|
215
100
|
}
|
|
216
101
|
auditTechnicalSEO(args) {
|
|
217
102
|
const targetUrl = args.targetUrl || "https://example.com";
|
|
@@ -921,17 +806,9 @@ Sitemap: ${baseUrl}/sitemap.xml`;
|
|
|
921
806
|
}
|
|
922
807
|
return issues.join("\n");
|
|
923
808
|
}
|
|
924
|
-
async run() {
|
|
925
|
-
const transport = new StdioServerTransport();
|
|
926
|
-
await this.server.connect(transport);
|
|
927
|
-
createGracefulShutdown({
|
|
928
|
-
serverName: "seo-consultant.server",
|
|
929
|
-
server: this.server,
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
809
|
}
|
|
933
810
|
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
934
811
|
const server = new SEOSpecialistServer();
|
|
935
|
-
server.run().catch(() => { });
|
|
812
|
+
server.run("seo-consultant.server").catch((err) => { frameworkLogger.log("seo-consultant", "run", "error", { error: err instanceof Error ? err.message : String(err) }); });
|
|
936
813
|
}
|
|
937
814
|
export { SEOSpecialistServer };
|
|
@@ -4,10 +4,9 @@
|
|
|
4
4
|
* Tools for managing user sessions and persistent state.
|
|
5
5
|
* Provides session lifecycle management, state persistence, and cleanup utilities.
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
|
|
8
|
+
declare class SessionManagementServer extends XrayKnowledgeSkillBase {
|
|
9
9
|
private sessions;
|
|
10
|
-
private tools;
|
|
11
10
|
constructor();
|
|
12
11
|
private generateSessionId;
|
|
13
12
|
private isExpired;
|
|
@@ -18,6 +17,5 @@ declare class SessionManagementServer {
|
|
|
18
17
|
private handleListSessions;
|
|
19
18
|
private handleSessionExists;
|
|
20
19
|
private handleCleanupExpiredSessions;
|
|
21
|
-
run(): Promise<void>;
|
|
22
20
|
}
|
|
23
21
|
export default SessionManagementServer;
|