0xray 2.1.1 → 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 +3 -2
- package/README.md +12 -11
- package/dist/AGENTS.md +3 -2
- 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 +14 -10
- package/scripts/node/setup.cjs +32 -0
- 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/agents_template.md +109 -0
- package/xray/codex.json +598 -0
- package/xray/config.json +26 -0
- package/xray/features.json +132 -0
- package/xray/integrations.json +23 -0
- package/xray/routing-mappings.json +752 -0
- package/xray/workflow_state.json +28 -0
- 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
|
@@ -5,409 +5,372 @@
|
|
|
5
5
|
* Implements "Don't Make Me Think" principles for high-converting landing pages.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
9
|
-
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
10
|
-
import {
|
|
11
|
-
CallToolRequestSchema,
|
|
12
|
-
ListToolsRequestSchema,
|
|
13
|
-
} from "@modelcontextprotocol/sdk/types.js";
|
|
14
8
|
import * as path from "path";
|
|
15
9
|
import { fileURLToPath } from "url";
|
|
10
|
+
import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
|
|
11
|
+
import { frameworkLogger } from "../../core/framework-logger.js";
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
type: "string",
|
|
35
|
-
description: "Primary campaign objective",
|
|
13
|
+
class MarketingExpertServer extends XrayKnowledgeSkillBase {
|
|
14
|
+
constructor() {
|
|
15
|
+
super("growth-strategist", "2.0.1");
|
|
16
|
+
this.tools = [
|
|
17
|
+
{
|
|
18
|
+
name: "campaign_strategy",
|
|
19
|
+
description:
|
|
20
|
+
"Develop comprehensive marketing campaign strategy with channel mix, budget allocation, and KPIs",
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: "object",
|
|
23
|
+
properties: {
|
|
24
|
+
campaignGoal: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Primary campaign objective",
|
|
27
|
+
},
|
|
28
|
+
targetAudience: { type: "string", description: "Target demographic" },
|
|
29
|
+
budget: { type: "string", description: "Budget range" },
|
|
30
|
+
timeline: { type: "string", description: "Campaign duration" },
|
|
36
31
|
},
|
|
37
|
-
|
|
38
|
-
budget: { type: "string", description: "Budget range" },
|
|
39
|
-
timeline: { type: "string", description: "Campaign duration" },
|
|
32
|
+
required: ["campaignGoal", "targetAudience"],
|
|
40
33
|
},
|
|
41
|
-
required: ["campaignGoal", "targetAudience"],
|
|
42
34
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
{
|
|
36
|
+
name: "landing_page_audit",
|
|
37
|
+
description:
|
|
38
|
+
"Audit landing page using 'Don't Make Me Think' principles - 3 second rule, cognitive load, CTA visibility",
|
|
39
|
+
inputSchema: {
|
|
40
|
+
type: "object",
|
|
41
|
+
properties: {
|
|
42
|
+
url: { type: "string", description: "Landing page URL" },
|
|
43
|
+
goal: { type: "string", description: "Conversion goal" },
|
|
44
|
+
},
|
|
45
|
+
required: ["url", "goal"],
|
|
53
46
|
},
|
|
54
|
-
required: ["url", "goal"],
|
|
55
47
|
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
48
|
+
{
|
|
49
|
+
name: "conversion_optimization",
|
|
50
|
+
description:
|
|
51
|
+
"Analyze and optimize conversion paths with A/B testing recommendations",
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
pageType: {
|
|
56
|
+
type: "string",
|
|
57
|
+
enum: ["landing", "product", "checkout", "signup"],
|
|
58
|
+
},
|
|
59
|
+
currentConversion: {
|
|
60
|
+
type: "number",
|
|
61
|
+
description: "Current conversion rate %",
|
|
62
|
+
},
|
|
71
63
|
},
|
|
64
|
+
required: ["pageType"],
|
|
72
65
|
},
|
|
73
|
-
required: ["pageType"],
|
|
74
66
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
67
|
+
{
|
|
68
|
+
name: "market_analysis",
|
|
69
|
+
description:
|
|
70
|
+
"Conduct market analysis including competitor positioning, market size, and opportunities",
|
|
71
|
+
inputSchema: {
|
|
72
|
+
type: "object",
|
|
73
|
+
properties: {
|
|
74
|
+
industry: { type: "string", description: "Industry/niche" },
|
|
75
|
+
competitors: {
|
|
76
|
+
type: "array",
|
|
77
|
+
items: { type: "string" },
|
|
78
|
+
description: "Known competitors",
|
|
79
|
+
},
|
|
88
80
|
},
|
|
81
|
+
required: ["industry"],
|
|
89
82
|
},
|
|
90
|
-
required: ["industry"],
|
|
91
83
|
},
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
84
|
+
{
|
|
85
|
+
name: "brand_positioning",
|
|
86
|
+
description:
|
|
87
|
+
"Develop brand positioning and messaging framework with unique value proposition",
|
|
88
|
+
inputSchema: {
|
|
89
|
+
type: "object",
|
|
90
|
+
properties: {
|
|
91
|
+
product: {
|
|
92
|
+
type: "string",
|
|
93
|
+
description: "Product/service description",
|
|
94
|
+
},
|
|
95
|
+
targetMarket: { type: "string", description: "Ideal customer" },
|
|
96
|
+
competitors: { type: "array", items: { type: "string" } },
|
|
103
97
|
},
|
|
104
|
-
|
|
105
|
-
competitors: { type: "array", items: { type: "string" } },
|
|
98
|
+
required: ["product", "targetMarket"],
|
|
106
99
|
},
|
|
107
|
-
required: ["product", "targetMarket"],
|
|
108
100
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
119
|
-
tools: this.tools,
|
|
120
|
-
}));
|
|
121
|
-
|
|
122
|
-
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
123
|
-
const { name, arguments: args = {} } = request.params;
|
|
124
|
-
|
|
125
|
-
try {
|
|
126
|
-
switch (name) {
|
|
127
|
-
case "campaign_strategy": {
|
|
128
|
-
const argsObj = args as Record<string, unknown>;
|
|
129
|
-
return {
|
|
130
|
-
content: [
|
|
101
|
+
];
|
|
102
|
+
this.handlers = {
|
|
103
|
+
"campaign_strategy": async (args) => {
|
|
104
|
+
const argsObj = args as Record<string, unknown>;
|
|
105
|
+
return {
|
|
106
|
+
content: [
|
|
107
|
+
{
|
|
108
|
+
type: "text",
|
|
109
|
+
text: JSON.stringify(
|
|
131
110
|
{
|
|
132
|
-
|
|
133
|
-
|
|
111
|
+
campaignGoal: argsObj.campaignGoal,
|
|
112
|
+
strategy: {
|
|
113
|
+
channels: ["Content", "Email", "Social", "Paid"],
|
|
114
|
+
budgetAllocation: {
|
|
115
|
+
content: 30,
|
|
116
|
+
email: 20,
|
|
117
|
+
social: 25,
|
|
118
|
+
paid: 25,
|
|
119
|
+
},
|
|
120
|
+
timeline: argsObj.timeline || "3 months",
|
|
121
|
+
kpis: ["CTR", "Conversion Rate", "CAC", "LTV", "ROAS"],
|
|
122
|
+
},
|
|
123
|
+
phases: [
|
|
134
124
|
{
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
timeline: argsObj.timeline || "3 months",
|
|
145
|
-
kpis: ["CTR", "Conversion Rate", "CAC", "LTV", "ROAS"],
|
|
146
|
-
},
|
|
147
|
-
phases: [
|
|
148
|
-
{
|
|
149
|
-
name: "Awareness",
|
|
150
|
-
duration: "4 weeks",
|
|
151
|
-
goal: "Reach 100k impressions",
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
name: "Consideration",
|
|
155
|
-
duration: "6 weeks",
|
|
156
|
-
goal: "5% conversion",
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
name: "Conversion",
|
|
160
|
-
duration: "4 weeks",
|
|
161
|
-
goal: "2% purchase",
|
|
162
|
-
},
|
|
163
|
-
],
|
|
125
|
+
name: "Awareness",
|
|
126
|
+
duration: "4 weeks",
|
|
127
|
+
goal: "Reach 100k impressions",
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "Consideration",
|
|
131
|
+
duration: "6 weeks",
|
|
132
|
+
goal: "5% conversion",
|
|
164
133
|
},
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
134
|
+
{
|
|
135
|
+
name: "Conversion",
|
|
136
|
+
duration: "4 weeks",
|
|
137
|
+
goal: "2% purchase",
|
|
138
|
+
},
|
|
139
|
+
],
|
|
168
140
|
},
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
141
|
+
null,
|
|
142
|
+
2,
|
|
143
|
+
),
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
};
|
|
147
|
+
},
|
|
148
|
+
"landing_page_audit": async (args) => {
|
|
149
|
+
const argsObj = args as Record<string, unknown>;
|
|
150
|
+
return {
|
|
151
|
+
content: [
|
|
152
|
+
{
|
|
153
|
+
type: "text",
|
|
154
|
+
text: JSON.stringify(
|
|
176
155
|
{
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
priority: "high",
|
|
193
|
-
issue: "Navigation unclear",
|
|
194
|
-
fix: "Max 5 nav items, use familiar labels",
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
priority: "medium",
|
|
198
|
-
issue: "Too many choices",
|
|
199
|
-
fix: "Reduce to one primary CTA",
|
|
200
|
-
},
|
|
201
|
-
],
|
|
156
|
+
url: argsObj.url,
|
|
157
|
+
goal: argsObj.goal,
|
|
158
|
+
auditScore: 72,
|
|
159
|
+
dontMakeMeThink: {
|
|
160
|
+
score: 68,
|
|
161
|
+
issues: [
|
|
162
|
+
{
|
|
163
|
+
priority: "high",
|
|
164
|
+
issue: "Hero value prop not clear in 3 seconds",
|
|
165
|
+
fix: "Above fold: headline + subhead + CTA",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
priority: "high",
|
|
169
|
+
issue: "Navigation unclear",
|
|
170
|
+
fix: "Max 5 nav items, use familiar labels",
|
|
202
171
|
},
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
"Clear H1 + benefit statement + CTA in 3 seconds",
|
|
208
|
-
},
|
|
209
|
-
socialProof: {
|
|
210
|
-
status: "good",
|
|
211
|
-
recommendation: "Add testimonials above fold",
|
|
212
|
-
},
|
|
213
|
-
problem: {
|
|
214
|
-
status: "needs-work",
|
|
215
|
-
recommendation: "Lead with customer pain point",
|
|
216
|
-
},
|
|
217
|
-
solution: {
|
|
218
|
-
status: "good",
|
|
219
|
-
recommendation: "Show product/screenshot clearly",
|
|
220
|
-
},
|
|
221
|
-
benefits: {
|
|
222
|
-
status: "good",
|
|
223
|
-
recommendation: "Use bullet points, not paragraphs",
|
|
224
|
-
},
|
|
225
|
-
cta: {
|
|
226
|
-
status: "needs-work",
|
|
227
|
-
recommendation:
|
|
228
|
-
"Make CTA button stand out (color, size, text)",
|
|
229
|
-
},
|
|
230
|
-
riskReversal: {
|
|
231
|
-
status: "missing",
|
|
232
|
-
recommendation: "Add guarantees, testimonials",
|
|
233
|
-
},
|
|
234
|
-
faq: {
|
|
235
|
-
status: "good",
|
|
236
|
-
recommendation: "Address objections",
|
|
237
|
-
},
|
|
172
|
+
{
|
|
173
|
+
priority: "medium",
|
|
174
|
+
issue: "Too many choices",
|
|
175
|
+
fix: "Reduce to one primary CTA",
|
|
238
176
|
},
|
|
239
|
-
|
|
240
|
-
|
|
177
|
+
],
|
|
178
|
+
},
|
|
179
|
+
sections: {
|
|
180
|
+
hero: {
|
|
181
|
+
status: "needs-work",
|
|
182
|
+
recommendation:
|
|
183
|
+
"Clear H1 + benefit statement + CTA in 3 seconds",
|
|
184
|
+
},
|
|
185
|
+
socialProof: {
|
|
186
|
+
status: "good",
|
|
187
|
+
recommendation: "Add testimonials above fold",
|
|
188
|
+
},
|
|
189
|
+
problem: {
|
|
190
|
+
status: "needs-work",
|
|
191
|
+
recommendation: "Lead with customer pain point",
|
|
241
192
|
},
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
193
|
+
solution: {
|
|
194
|
+
status: "good",
|
|
195
|
+
recommendation: "Show product/screenshot clearly",
|
|
196
|
+
},
|
|
197
|
+
benefits: {
|
|
198
|
+
status: "good",
|
|
199
|
+
recommendation: "Use bullet points, not paragraphs",
|
|
200
|
+
},
|
|
201
|
+
cta: {
|
|
202
|
+
status: "needs-work",
|
|
203
|
+
recommendation:
|
|
204
|
+
"Make CTA button stand out (color, size, text)",
|
|
205
|
+
},
|
|
206
|
+
riskReversal: {
|
|
207
|
+
status: "missing",
|
|
208
|
+
recommendation: "Add guarantees, testimonials",
|
|
209
|
+
},
|
|
210
|
+
faq: {
|
|
211
|
+
status: "good",
|
|
212
|
+
recommendation: "Address objections",
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
cognitiveLoad: "Medium",
|
|
216
|
+
firstImpression: "Needs improvement - value prop unclear",
|
|
245
217
|
},
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
218
|
+
null,
|
|
219
|
+
2,
|
|
220
|
+
),
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
};
|
|
224
|
+
},
|
|
225
|
+
"conversion_optimization": async (args) => {
|
|
226
|
+
const argsObj = args as Record<string, unknown>;
|
|
227
|
+
const pageType = (argsObj.pageType as string) || "landing";
|
|
228
|
+
const currentConversion =
|
|
229
|
+
(argsObj.currentConversion as number) || 2;
|
|
230
|
+
return {
|
|
231
|
+
content: [
|
|
232
|
+
{
|
|
233
|
+
type: "text",
|
|
234
|
+
text: JSON.stringify(
|
|
256
235
|
{
|
|
257
|
-
|
|
258
|
-
|
|
236
|
+
pageType,
|
|
237
|
+
currentConversion,
|
|
238
|
+
targetConversion: currentConversion * 1.5,
|
|
239
|
+
recommendations: [
|
|
259
240
|
{
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
recommendations: [
|
|
264
|
-
{
|
|
265
|
-
priority: "high",
|
|
266
|
-
change: "Single clear CTA",
|
|
267
|
-
impact: "+25%",
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
priority: "high",
|
|
271
|
-
change: "Social proof near CTA",
|
|
272
|
-
impact: "+15%",
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
priority: "medium",
|
|
276
|
-
change: "Remove navigation distractions",
|
|
277
|
-
impact: "+10%",
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
priority: "medium",
|
|
281
|
-
change: "Add urgency indicators",
|
|
282
|
-
impact: "+10%",
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
priority: "low",
|
|
286
|
-
change: "Reduce form fields",
|
|
287
|
-
impact: "+5%",
|
|
288
|
-
},
|
|
289
|
-
],
|
|
290
|
-
abTests: [
|
|
291
|
-
{
|
|
292
|
-
name: "CTA Color Test",
|
|
293
|
-
hypothesis: "Contrast color increases clicks",
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
name: "Headline Test",
|
|
297
|
-
hypothesis:
|
|
298
|
-
"Benefit-driven headline outperforms feature",
|
|
299
|
-
},
|
|
300
|
-
{
|
|
301
|
-
name: "Social Proof Position",
|
|
302
|
-
hypothesis:
|
|
303
|
-
"Testimonial placement above vs below fold",
|
|
304
|
-
},
|
|
305
|
-
],
|
|
241
|
+
priority: "high",
|
|
242
|
+
change: "Single clear CTA",
|
|
243
|
+
impact: "+25%",
|
|
306
244
|
},
|
|
307
|
-
null,
|
|
308
|
-
2,
|
|
309
|
-
),
|
|
310
|
-
},
|
|
311
|
-
],
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
case "market_analysis": {
|
|
315
|
-
const argsObj = args as Record<string, unknown>;
|
|
316
|
-
return {
|
|
317
|
-
content: [
|
|
318
|
-
{
|
|
319
|
-
type: "text",
|
|
320
|
-
text: JSON.stringify(
|
|
321
245
|
{
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
marketSize: "Estimate based on industry benchmarks",
|
|
326
|
-
growthRate: "5-10% YoY",
|
|
327
|
-
keyPlayers: ["Player 1", "Player 2", "Player 3"],
|
|
328
|
-
opportunities: [
|
|
329
|
-
"Underserved segment",
|
|
330
|
-
"Technology gap",
|
|
331
|
-
"Pricing optimization",
|
|
332
|
-
],
|
|
333
|
-
threats: [
|
|
334
|
-
"Market saturation",
|
|
335
|
-
"Regulatory changes",
|
|
336
|
-
"Economic factors",
|
|
337
|
-
],
|
|
338
|
-
},
|
|
246
|
+
priority: "high",
|
|
247
|
+
change: "Social proof near CTA",
|
|
248
|
+
impact: "+15%",
|
|
339
249
|
},
|
|
340
|
-
null,
|
|
341
|
-
2,
|
|
342
|
-
),
|
|
343
|
-
},
|
|
344
|
-
],
|
|
345
|
-
};
|
|
346
|
-
}
|
|
347
|
-
case "brand_positioning": {
|
|
348
|
-
const argsObj = args as Record<string, unknown>;
|
|
349
|
-
return {
|
|
350
|
-
content: [
|
|
351
|
-
{
|
|
352
|
-
type: "text",
|
|
353
|
-
text: JSON.stringify(
|
|
354
250
|
{
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
},
|
|
380
|
-
},
|
|
251
|
+
priority: "medium",
|
|
252
|
+
change: "Remove navigation distractions",
|
|
253
|
+
impact: "+10%",
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
priority: "medium",
|
|
257
|
+
change: "Add urgency indicators",
|
|
258
|
+
impact: "+10%",
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
priority: "low",
|
|
262
|
+
change: "Reduce form fields",
|
|
263
|
+
impact: "+5%",
|
|
264
|
+
},
|
|
265
|
+
],
|
|
266
|
+
abTests: [
|
|
267
|
+
{
|
|
268
|
+
name: "CTA Color Test",
|
|
269
|
+
hypothesis: "Contrast color increases clicks",
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
name: "Headline Test",
|
|
273
|
+
hypothesis:
|
|
274
|
+
"Benefit-driven headline outperforms feature",
|
|
381
275
|
},
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
276
|
+
{
|
|
277
|
+
name: "Social Proof Position",
|
|
278
|
+
hypothesis:
|
|
279
|
+
"Testimonial placement above vs below fold",
|
|
280
|
+
},
|
|
281
|
+
],
|
|
385
282
|
},
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
}
|
|
392
|
-
}
|
|
283
|
+
null,
|
|
284
|
+
2,
|
|
285
|
+
),
|
|
286
|
+
},
|
|
287
|
+
],
|
|
288
|
+
};
|
|
289
|
+
},
|
|
290
|
+
"market_analysis": async (args) => {
|
|
291
|
+
const argsObj = args as Record<string, unknown>;
|
|
393
292
|
return {
|
|
394
|
-
content: [
|
|
395
|
-
|
|
293
|
+
content: [
|
|
294
|
+
{
|
|
295
|
+
type: "text",
|
|
296
|
+
text: JSON.stringify(
|
|
297
|
+
{
|
|
298
|
+
industry: argsObj.industry,
|
|
299
|
+
competitors: argsObj.competitors || [],
|
|
300
|
+
analysis: {
|
|
301
|
+
marketSize: "Estimate based on industry benchmarks",
|
|
302
|
+
growthRate: "5-10% YoY",
|
|
303
|
+
keyPlayers: ["Player 1", "Player 2", "Player 3"],
|
|
304
|
+
opportunities: [
|
|
305
|
+
"Underserved segment",
|
|
306
|
+
"Technology gap",
|
|
307
|
+
"Pricing optimization",
|
|
308
|
+
],
|
|
309
|
+
threats: [
|
|
310
|
+
"Market saturation",
|
|
311
|
+
"Regulatory changes",
|
|
312
|
+
"Economic factors",
|
|
313
|
+
],
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
null,
|
|
317
|
+
2,
|
|
318
|
+
),
|
|
319
|
+
},
|
|
320
|
+
],
|
|
396
321
|
};
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
322
|
+
},
|
|
323
|
+
"brand_positioning": async (args) => {
|
|
324
|
+
const argsObj = args as Record<string, unknown>;
|
|
325
|
+
return {
|
|
326
|
+
content: [
|
|
327
|
+
{
|
|
328
|
+
type: "text",
|
|
329
|
+
text: JSON.stringify(
|
|
330
|
+
{
|
|
331
|
+
product: argsObj.product,
|
|
332
|
+
targetMarket: argsObj.targetMarket,
|
|
333
|
+
positioning: {
|
|
334
|
+
valueProposition:
|
|
335
|
+
"Unique benefit statement that differentiates from competitors",
|
|
336
|
+
brandArchetype:
|
|
337
|
+
"Hero or Sage - choose based on audience",
|
|
338
|
+
keyMessages: [
|
|
339
|
+
"Primary message",
|
|
340
|
+
"Secondary message",
|
|
341
|
+
"Tertiary message",
|
|
342
|
+
],
|
|
343
|
+
differentiators: [
|
|
344
|
+
"Unique feature 1",
|
|
345
|
+
"Unique feature 2",
|
|
346
|
+
"Unique benefit",
|
|
347
|
+
],
|
|
348
|
+
messagingFramework: {
|
|
349
|
+
hero: "For [audience] who [need], [product] is [category] that [benefit]",
|
|
350
|
+
taglines: [
|
|
351
|
+
"Option 1: [Benefit-focused]",
|
|
352
|
+
"Option 2: [Emotion-focused]",
|
|
353
|
+
"Option 3: [Authority-focused]",
|
|
354
|
+
],
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
null,
|
|
359
|
+
2,
|
|
360
|
+
),
|
|
361
|
+
},
|
|
362
|
+
],
|
|
363
|
+
};
|
|
364
|
+
},
|
|
365
|
+
};
|
|
366
|
+
this.setupToolHandlers();
|
|
404
367
|
}
|
|
405
368
|
}
|
|
406
369
|
|
|
407
370
|
const entryPoint = path.resolve(process.argv[1] ?? "");
|
|
408
371
|
if (entryPoint && fileURLToPath(import.meta.url) === entryPoint) {
|
|
409
372
|
const server = new MarketingExpertServer();
|
|
410
|
-
server.run();
|
|
373
|
+
server.run("growth-strategist").catch((err) => { frameworkLogger.log("growth-strategist", "run", "error", { error: err instanceof Error ? err.message : String(err) }); });
|
|
411
374
|
}
|
|
412
375
|
|
|
413
376
|
export { MarketingExpertServer };
|