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.
Files changed (254) hide show
  1. package/.opencode/codex.codex +1 -1
  2. package/.opencode/commands/dependency-audit.md +3 -3
  3. package/.opencode/enforcer-config.json +2 -2
  4. package/AGENTS.md +3 -2
  5. package/README.md +12 -11
  6. package/dist/AGENTS.md +3 -2
  7. package/dist/CHANGELOG.md +26 -0
  8. package/dist/README.md +12 -11
  9. package/dist/agents/code-reviewer.js +1 -1
  10. package/dist/analytics/routing-refiner.js +1 -1
  11. package/dist/cli/index.js +11 -1
  12. package/dist/cli/server.js +3 -3
  13. package/dist/core/activity-logger.d.ts +2 -2
  14. package/dist/core/activity-logger.js +4 -4
  15. package/dist/core/boot-orchestrator.d.ts +1 -1
  16. package/dist/core/boot-orchestrator.js +13 -28
  17. package/dist/core/bridge.mjs +3 -3
  18. package/dist/core/codex-formatter.js +2 -2
  19. package/dist/core/codex-injector.d.ts +0 -1
  20. package/dist/core/codex-injector.js +2 -3
  21. package/dist/core/config-loader.d.ts +1 -1
  22. package/dist/core/config-loader.js +1 -1
  23. package/dist/core/config-paths.d.ts +0 -2
  24. package/dist/core/config-paths.js +7 -8
  25. package/dist/core/context-loader.d.ts +1 -1
  26. package/dist/core/context-loader.js +1 -1
  27. package/dist/core/errors.d.ts +3 -0
  28. package/dist/core/errors.js +10 -0
  29. package/dist/core/features-config.js +1 -1
  30. package/dist/core/framework-logger.d.ts +3 -3
  31. package/dist/core/framework-logger.js +17 -9
  32. package/dist/core/index.d.ts +2 -2
  33. package/dist/core/index.js +4 -2
  34. package/dist/core/logging-config.d.ts +2 -1
  35. package/dist/core/logging-config.js +7 -7
  36. package/dist/enforcement/loaders/codex-loader.js +1 -1
  37. package/dist/execution/opencode-cli-invoker.js +5 -5
  38. package/dist/governance/governance-service.js +1 -1
  39. package/dist/index.d.ts +3 -3
  40. package/dist/index.js +3 -3
  41. package/dist/inference/inference-cycle.d.ts +1 -1
  42. package/dist/inference/inference-cycle.js +10 -10
  43. package/dist/integrations/base/Integration.js +1 -1
  44. package/dist/integrations/base/registry.js +19 -19
  45. package/dist/integrations/grok/grok-cli.js +17 -17
  46. package/dist/integrations/grok/hooks/pre-tool-use.js +1 -1
  47. package/dist/integrations/hermes-agent/bridge.mjs +1 -1
  48. package/dist/integrations/openclaw/api-server.d.ts +0 -1
  49. package/dist/integrations/openclaw/api-server.js +7 -10
  50. package/dist/integrations/openclaw/client.d.ts +0 -1
  51. package/dist/integrations/openclaw/client.js +22 -24
  52. package/dist/integrations/openclaw/hooks/xray-hooks.d.ts +0 -1
  53. package/dist/integrations/openclaw/hooks/xray-hooks.js +17 -18
  54. package/dist/integrations/plugins/plugin-registry.js +5 -5
  55. package/dist/mcps/architect-tools.server.d.ts +2 -4
  56. package/dist/mcps/architect-tools.server.js +112 -195
  57. package/dist/mcps/auto-format.server.d.ts +2 -4
  58. package/dist/mcps/auto-format.server.js +49 -95
  59. package/dist/mcps/boot-orchestrator.server.d.ts +2 -4
  60. package/dist/mcps/boot-orchestrator.server.js +73 -105
  61. package/dist/mcps/config/server-config-registry.js +3 -3
  62. package/dist/mcps/enforcer-tools.server.d.ts +2 -4
  63. package/dist/mcps/enforcer-tools.server.js +202 -285
  64. package/dist/mcps/estimation.server.d.ts +2 -4
  65. package/dist/mcps/estimation.server.js +63 -107
  66. package/dist/mcps/framework-compliance-audit.server.d.ts +2 -4
  67. package/dist/mcps/framework-compliance-audit.server.js +53 -82
  68. package/dist/mcps/framework-help.server.d.ts +2 -4
  69. package/dist/mcps/framework-help.server.js +63 -101
  70. package/dist/mcps/governance.server.js +2 -2
  71. package/dist/mcps/knowledge-skills/api-design.server.d.ts +2 -4
  72. package/dist/mcps/knowledge-skills/api-design.server.js +35 -67
  73. package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts +2 -10
  74. package/dist/mcps/knowledge-skills/architecture-patterns.server.js +35 -74
  75. package/dist/mcps/knowledge-skills/bug-triage-specialist.server.d.ts +2 -4
  76. package/dist/mcps/knowledge-skills/bug-triage-specialist.server.js +143 -162
  77. package/dist/mcps/knowledge-skills/code-analyzer.server.d.ts +3 -4
  78. package/dist/mcps/knowledge-skills/code-analyzer.server.js +20 -45
  79. package/dist/mcps/knowledge-skills/code-review.server.d.ts +2 -4
  80. package/dist/mcps/knowledge-skills/code-review.server.js +109 -143
  81. package/dist/mcps/knowledge-skills/content-creator.server.d.ts +2 -4
  82. package/dist/mcps/knowledge-skills/content-creator.server.js +205 -226
  83. package/dist/mcps/knowledge-skills/database-design.server.d.ts +2 -4
  84. package/dist/mcps/knowledge-skills/database-design.server.js +117 -151
  85. package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts +2 -4
  86. package/dist/mcps/knowledge-skills/devops-deployment.server.js +71 -160
  87. package/dist/mcps/knowledge-skills/git-workflow.server.d.ts +2 -4
  88. package/dist/mcps/knowledge-skills/git-workflow.server.js +36 -68
  89. package/dist/mcps/knowledge-skills/growth-strategist.server.d.ts +2 -4
  90. package/dist/mcps/knowledge-skills/growth-strategist.server.js +303 -324
  91. package/dist/mcps/knowledge-skills/log-monitor.server.d.ts +2 -4
  92. package/dist/mcps/knowledge-skills/log-monitor.server.js +141 -160
  93. package/dist/mcps/knowledge-skills/mobile-development.server.d.ts +2 -4
  94. package/dist/mcps/knowledge-skills/mobile-development.server.js +92 -209
  95. package/dist/mcps/knowledge-skills/multimodal-looker.server.d.ts +2 -4
  96. package/dist/mcps/knowledge-skills/multimodal-looker.server.js +123 -159
  97. package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts +2 -5
  98. package/dist/mcps/knowledge-skills/performance-optimization.server.js +155 -296
  99. package/dist/mcps/knowledge-skills/project-analysis.server.d.ts +2 -4
  100. package/dist/mcps/knowledge-skills/project-analysis.server.js +75 -226
  101. package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts +2 -4
  102. package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +63 -156
  103. package/dist/mcps/knowledge-skills/security-audit.server.d.ts +2 -4
  104. package/dist/mcps/knowledge-skills/security-audit.server.js +102 -136
  105. package/dist/mcps/knowledge-skills/seo-consultant.server.d.ts +2 -4
  106. package/dist/mcps/knowledge-skills/seo-consultant.server.js +80 -203
  107. package/dist/mcps/knowledge-skills/session-management.server.d.ts +2 -4
  108. package/dist/mcps/knowledge-skills/session-management.server.js +50 -203
  109. package/dist/mcps/knowledge-skills/skill-invocation.server.d.ts +2 -4
  110. package/dist/mcps/knowledge-skills/skill-invocation.server.js +168 -347
  111. package/dist/mcps/knowledge-skills/strategist.server.d.ts +2 -11
  112. package/dist/mcps/knowledge-skills/strategist.server.js +72 -122
  113. package/dist/mcps/knowledge-skills/tech-writer.server.d.ts +2 -4
  114. package/dist/mcps/knowledge-skills/tech-writer.server.js +87 -300
  115. package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +2 -4
  116. package/dist/mcps/knowledge-skills/testing-best-practices.server.js +147 -182
  117. package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts +2 -4
  118. package/dist/mcps/knowledge-skills/testing-strategy.server.js +78 -153
  119. package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +2 -5
  120. package/dist/mcps/knowledge-skills/ui-ux-design.server.js +90 -399
  121. package/dist/mcps/lint.server.d.ts +2 -4
  122. package/dist/mcps/lint.server.js +51 -92
  123. package/dist/mcps/mcp-client.js +2 -2
  124. package/dist/mcps/model-health-check.server.d.ts +2 -4
  125. package/dist/mcps/model-health-check.server.js +32 -60
  126. package/dist/mcps/performance-analysis.server.d.ts +2 -4
  127. package/dist/mcps/performance-analysis.server.js +57 -88
  128. package/dist/mcps/processor-pipeline.server.d.ts +2 -4
  129. package/dist/mcps/processor-pipeline.server.js +69 -100
  130. package/dist/mcps/registry.json +1 -1
  131. package/dist/mcps/researcher.server.d.ts +3 -5
  132. package/dist/mcps/researcher.server.js +81 -154
  133. package/dist/mcps/security-scan.server.d.ts +2 -4
  134. package/dist/mcps/security-scan.server.js +54 -96
  135. package/dist/mcps/shared/knowledge-skill-base.d.ts +14 -0
  136. package/dist/mcps/shared/knowledge-skill-base.js +45 -0
  137. package/dist/{security → mcps/shared}/security-scanner.js +1 -1
  138. package/dist/mcps/state-manager.server.d.ts +2 -4
  139. package/dist/mcps/state-manager.server.js +115 -160
  140. package/dist/orchestrator/orchestrator.d.ts +1 -1
  141. package/dist/orchestrator/orchestrator.js +1 -1
  142. package/dist/orchestrator/universal-registry-bridge.js +1 -1
  143. package/dist/plugin/xray-codex-injection.d.ts +1 -1
  144. package/dist/plugin/xray-codex-injection.js +1 -1
  145. package/dist/postprocessor/PostProcessor.d.ts +4 -44
  146. package/dist/postprocessor/PostProcessor.js +39 -553
  147. package/dist/postprocessor/analysis/CodeChangeAnalyzer.d.ts +11 -0
  148. package/dist/postprocessor/analysis/CodeChangeAnalyzer.js +50 -0
  149. package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.d.ts +11 -0
  150. package/dist/postprocessor/compliance/ArchitecturalComplianceChecker.js +356 -0
  151. package/dist/postprocessor/config/ProcessorConfigLoader.d.ts +44 -0
  152. package/dist/postprocessor/config/ProcessorConfigLoader.js +21 -0
  153. package/dist/postprocessor/reporting/PostProcessorReporter.d.ts +19 -0
  154. package/dist/postprocessor/reporting/PostProcessorReporter.js +96 -0
  155. package/dist/postprocessor/triggers/GitHookTrigger.js +11 -11
  156. package/dist/processors/implementations/refactoring-logging-processor-wrapper.d.ts +32 -0
  157. package/dist/processors/implementations/refactoring-logging-processor-wrapper.js +95 -1
  158. package/dist/processors/processor-manager.js +346 -314
  159. package/dist/reporting/report-formatter.js +1 -1
  160. package/dist/security/security-hardener.d.ts +69 -2
  161. package/dist/security/security-hardener.js +129 -1
  162. package/dist/skills/registry.json +1 -1
  163. package/dist/state/index.d.ts +3 -5
  164. package/dist/state/index.js +1 -7
  165. package/dist/state/state-manager.d.ts +1 -1
  166. package/dist/state/state-manager.js +2 -3
  167. package/package.json +14 -10
  168. package/scripts/node/setup.cjs +32 -0
  169. package/scripts/node/universal-version-manager.js +11 -11
  170. package/src/mcps/architect-tools.server.ts +112 -215
  171. package/src/mcps/auto-format.server.ts +50 -110
  172. package/src/mcps/boot-orchestrator.server.ts +75 -121
  173. package/src/mcps/config/__tests__/server-config-registry.test.ts +21 -12
  174. package/src/mcps/config/server-config-registry.ts +3 -3
  175. package/src/mcps/enforcer-tools.server.ts +212 -310
  176. package/src/mcps/estimation.server.ts +62 -122
  177. package/src/mcps/framework-compliance-audit.server.ts +52 -97
  178. package/src/mcps/framework-help.server.ts +64 -114
  179. package/src/mcps/governance.server.ts +2 -2
  180. package/src/mcps/knowledge-skills/api-design.server.ts +32 -77
  181. package/src/mcps/knowledge-skills/architecture-patterns.server.ts +31 -87
  182. package/src/mcps/knowledge-skills/bug-triage-specialist.server.ts +165 -193
  183. package/src/mcps/knowledge-skills/code-analyzer.server.ts +20 -55
  184. package/src/mcps/knowledge-skills/code-review.server.ts +114 -161
  185. package/src/mcps/knowledge-skills/content-creator.server.ts +218 -255
  186. package/src/mcps/knowledge-skills/database-design.server.ts +118 -165
  187. package/src/mcps/knowledge-skills/devops-deployment.server.ts +67 -172
  188. package/src/mcps/knowledge-skills/git-workflow.server.ts +32 -77
  189. package/src/mcps/knowledge-skills/growth-strategist.server.ts +324 -361
  190. package/src/mcps/knowledge-skills/log-monitor.server.ts +160 -187
  191. package/src/mcps/knowledge-skills/mobile-development.server.ts +89 -223
  192. package/src/mcps/knowledge-skills/multimodal-looker.server.ts +128 -175
  193. package/src/mcps/knowledge-skills/performance-optimization.server.ts +156 -329
  194. package/src/mcps/knowledge-skills/project-analysis.server.ts +72 -248
  195. package/src/mcps/knowledge-skills/refactoring-strategies.server.ts +59 -171
  196. package/src/mcps/knowledge-skills/security-audit.server.ts +104 -151
  197. package/src/mcps/knowledge-skills/seo-consultant.server.ts +80 -220
  198. package/src/mcps/knowledge-skills/session-management.server.ts +51 -232
  199. package/src/mcps/knowledge-skills/skill-invocation.server.ts +165 -372
  200. package/src/mcps/knowledge-skills/strategist.server.ts +72 -143
  201. package/src/mcps/knowledge-skills/tech-writer.server.ts +85 -350
  202. package/src/mcps/knowledge-skills/testing-best-practices.server.ts +146 -195
  203. package/src/mcps/knowledge-skills/testing-strategy.server.ts +75 -161
  204. package/src/mcps/knowledge-skills/ui-ux-design.server.ts +93 -487
  205. package/src/mcps/lint.server.ts +53 -107
  206. package/src/mcps/mcp-client.ts +2 -2
  207. package/src/mcps/model-health-check.server.ts +34 -71
  208. package/src/mcps/performance-analysis.server.ts +60 -104
  209. package/src/mcps/processor-pipeline.server.ts +72 -110
  210. package/src/mcps/registry.json +1 -1
  211. package/src/mcps/researcher.server.ts +88 -177
  212. package/src/mcps/security-scan.server.ts +55 -104
  213. package/src/mcps/shared/knowledge-skill-base.ts +62 -0
  214. package/src/mcps/shared/prompt-security-validator.ts +199 -0
  215. package/src/mcps/shared/security-scanner.ts +599 -0
  216. package/src/mcps/state-manager.server.ts +117 -175
  217. package/src/opencode/codex.codex +1 -1
  218. package/src/opencode/commands/dependency-audit.md +3 -3
  219. package/src/opencode/enforcer-config.json +2 -2
  220. package/src/skills/registry.json +1 -1
  221. package/xray/agents_template.md +109 -0
  222. package/xray/codex.json +598 -0
  223. package/xray/config.json +26 -0
  224. package/xray/features.json +132 -0
  225. package/xray/integrations.json +23 -0
  226. package/xray/routing-mappings.json +752 -0
  227. package/xray/workflow_state.json +28 -0
  228. package/dist/integrations/hermes-agent/__pycache__/__init__.cpython-313.pyc +0 -0
  229. package/dist/integrations/hermes-agent/__pycache__/conftest.cpython-313-pytest-9.0.2.pyc +0 -0
  230. package/dist/integrations/hermes-agent/__pycache__/schemas.cpython-313.pyc +0 -0
  231. package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313-pytest-9.0.2.pyc +0 -0
  232. package/dist/integrations/hermes-agent/__pycache__/test_plugin.cpython-313.pyc +0 -0
  233. package/dist/integrations/hermes-agent/__pycache__/tools.cpython-313.pyc +0 -0
  234. package/dist/integrations/hermes-agent/conftest.py +0 -14
  235. package/dist/integrations/hermes-agent/test_plugin.py +0 -1103
  236. package/dist/processors/implementations/refactoring-logging-processor.d.ts +0 -31
  237. package/dist/processors/implementations/refactoring-logging-processor.js +0 -96
  238. package/dist/processors/implementations/session-capture-processor.d.ts +0 -14
  239. package/dist/processors/implementations/session-capture-processor.js +0 -37
  240. package/dist/scripts/activate-kernel-pipeline.d.ts +0 -7
  241. package/dist/scripts/activate-kernel-pipeline.js +0 -101
  242. package/dist/security/index.d.ts +0 -13
  243. package/dist/security/index.js +0 -13
  244. package/dist/security/security-agent-coordinator.d.ts +0 -72
  245. package/dist/security/security-agent-coordinator.js +0 -204
  246. package/dist/security/security-auditor.d.ts +0 -56
  247. package/dist/security/security-auditor.js +0 -584
  248. package/dist/security/security-hardening-system.d.ts +0 -239
  249. package/dist/security/security-hardening-system.js +0 -727
  250. package/dist/security/security-orchestration-layer.d.ts +0 -119
  251. package/dist/security/security-orchestration-layer.js +0 -496
  252. /package/dist/{security → mcps/shared}/prompt-security-validator.d.ts +0 -0
  253. /package/dist/{security → mcps/shared}/prompt-security-validator.js +0 -0
  254. /package/dist/{security → mcps/shared}/security-scanner.d.ts +0 -0
@@ -4,358 +4,337 @@
4
4
  * Strategic marketing for campaign strategy, market analysis, and conversion optimization.
5
5
  * Implements "Don't Make Me Think" principles for high-converting landing pages.
6
6
  */
7
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
8
- import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
9
- import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
10
7
  import * as path from "path";
11
8
  import { fileURLToPath } from "url";
12
- class MarketingExpertServer {
13
- server;
14
- tools = [
15
- {
16
- name: "campaign_strategy",
17
- description: "Develop comprehensive marketing campaign strategy with channel mix, budget allocation, and KPIs",
18
- inputSchema: {
19
- type: "object",
20
- properties: {
21
- campaignGoal: {
22
- type: "string",
23
- description: "Primary campaign objective",
9
+ import { XrayKnowledgeSkillBase } from "../shared/knowledge-skill-base.js";
10
+ import { frameworkLogger } from "../../core/framework-logger.js";
11
+ class MarketingExpertServer extends XrayKnowledgeSkillBase {
12
+ constructor() {
13
+ super("growth-strategist", "2.0.1");
14
+ this.tools = [
15
+ {
16
+ name: "campaign_strategy",
17
+ description: "Develop comprehensive marketing campaign strategy with channel mix, budget allocation, and KPIs",
18
+ inputSchema: {
19
+ type: "object",
20
+ properties: {
21
+ campaignGoal: {
22
+ type: "string",
23
+ description: "Primary campaign objective",
24
+ },
25
+ targetAudience: { type: "string", description: "Target demographic" },
26
+ budget: { type: "string", description: "Budget range" },
27
+ timeline: { type: "string", description: "Campaign duration" },
24
28
  },
25
- targetAudience: { type: "string", description: "Target demographic" },
26
- budget: { type: "string", description: "Budget range" },
27
- timeline: { type: "string", description: "Campaign duration" },
29
+ required: ["campaignGoal", "targetAudience"],
28
30
  },
29
- required: ["campaignGoal", "targetAudience"],
30
31
  },
31
- },
32
- {
33
- name: "landing_page_audit",
34
- description: "Audit landing page using 'Don't Make Me Think' principles - 3 second rule, cognitive load, CTA visibility",
35
- inputSchema: {
36
- type: "object",
37
- properties: {
38
- url: { type: "string", description: "Landing page URL" },
39
- goal: { type: "string", description: "Conversion goal" },
32
+ {
33
+ name: "landing_page_audit",
34
+ description: "Audit landing page using 'Don't Make Me Think' principles - 3 second rule, cognitive load, CTA visibility",
35
+ inputSchema: {
36
+ type: "object",
37
+ properties: {
38
+ url: { type: "string", description: "Landing page URL" },
39
+ goal: { type: "string", description: "Conversion goal" },
40
+ },
41
+ required: ["url", "goal"],
40
42
  },
41
- required: ["url", "goal"],
42
43
  },
43
- },
44
- {
45
- name: "conversion_optimization",
46
- description: "Analyze and optimize conversion paths with A/B testing recommendations",
47
- inputSchema: {
48
- type: "object",
49
- properties: {
50
- pageType: {
51
- type: "string",
52
- enum: ["landing", "product", "checkout", "signup"],
53
- },
54
- currentConversion: {
55
- type: "number",
56
- description: "Current conversion rate %",
44
+ {
45
+ name: "conversion_optimization",
46
+ description: "Analyze and optimize conversion paths with A/B testing recommendations",
47
+ inputSchema: {
48
+ type: "object",
49
+ properties: {
50
+ pageType: {
51
+ type: "string",
52
+ enum: ["landing", "product", "checkout", "signup"],
53
+ },
54
+ currentConversion: {
55
+ type: "number",
56
+ description: "Current conversion rate %",
57
+ },
57
58
  },
59
+ required: ["pageType"],
58
60
  },
59
- required: ["pageType"],
60
61
  },
61
- },
62
- {
63
- name: "market_analysis",
64
- description: "Conduct market analysis including competitor positioning, market size, and opportunities",
65
- inputSchema: {
66
- type: "object",
67
- properties: {
68
- industry: { type: "string", description: "Industry/niche" },
69
- competitors: {
70
- type: "array",
71
- items: { type: "string" },
72
- description: "Known competitors",
62
+ {
63
+ name: "market_analysis",
64
+ description: "Conduct market analysis including competitor positioning, market size, and opportunities",
65
+ inputSchema: {
66
+ type: "object",
67
+ properties: {
68
+ industry: { type: "string", description: "Industry/niche" },
69
+ competitors: {
70
+ type: "array",
71
+ items: { type: "string" },
72
+ description: "Known competitors",
73
+ },
73
74
  },
75
+ required: ["industry"],
74
76
  },
75
- required: ["industry"],
76
77
  },
77
- },
78
- {
79
- name: "brand_positioning",
80
- description: "Develop brand positioning and messaging framework with unique value proposition",
81
- inputSchema: {
82
- type: "object",
83
- properties: {
84
- product: {
85
- type: "string",
86
- description: "Product/service description",
78
+ {
79
+ name: "brand_positioning",
80
+ description: "Develop brand positioning and messaging framework with unique value proposition",
81
+ inputSchema: {
82
+ type: "object",
83
+ properties: {
84
+ product: {
85
+ type: "string",
86
+ description: "Product/service description",
87
+ },
88
+ targetMarket: { type: "string", description: "Ideal customer" },
89
+ competitors: { type: "array", items: { type: "string" } },
87
90
  },
88
- targetMarket: { type: "string", description: "Ideal customer" },
89
- competitors: { type: "array", items: { type: "string" } },
91
+ required: ["product", "targetMarket"],
90
92
  },
91
- required: ["product", "targetMarket"],
92
93
  },
93
- },
94
- ];
95
- constructor() {
96
- this.server = new Server({ name: "growth-strategist", version: "2.0.1" }, { capabilities: { tools: {} } });
97
- this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
98
- tools: this.tools,
99
- }));
100
- this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
101
- const { name, arguments: args = {} } = request.params;
102
- try {
103
- switch (name) {
104
- case "campaign_strategy": {
105
- const argsObj = args;
106
- return {
107
- content: [
108
- {
109
- type: "text",
110
- text: JSON.stringify({
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: [
124
- {
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",
133
- },
134
- {
135
- name: "Conversion",
136
- duration: "4 weeks",
137
- goal: "2% purchase",
138
- },
139
- ],
140
- }, null, 2),
94
+ ];
95
+ this.handlers = {
96
+ "campaign_strategy": async (args) => {
97
+ const argsObj = args;
98
+ return {
99
+ content: [
100
+ {
101
+ type: "text",
102
+ text: JSON.stringify({
103
+ campaignGoal: argsObj.campaignGoal,
104
+ strategy: {
105
+ channels: ["Content", "Email", "Social", "Paid"],
106
+ budgetAllocation: {
107
+ content: 30,
108
+ email: 20,
109
+ social: 25,
110
+ paid: 25,
111
+ },
112
+ timeline: argsObj.timeline || "3 months",
113
+ kpis: ["CTR", "Conversion Rate", "CAC", "LTV", "ROAS"],
141
114
  },
142
- ],
143
- };
144
- }
145
- case "landing_page_audit": {
146
- const argsObj = args;
147
- return {
148
- content: [
149
- {
150
- type: "text",
151
- text: JSON.stringify({
152
- url: argsObj.url,
153
- goal: argsObj.goal,
154
- auditScore: 72,
155
- dontMakeMeThink: {
156
- score: 68,
157
- issues: [
158
- {
159
- priority: "high",
160
- issue: "Hero value prop not clear in 3 seconds",
161
- fix: "Above fold: headline + subhead + CTA",
162
- },
163
- {
164
- priority: "high",
165
- issue: "Navigation unclear",
166
- fix: "Max 5 nav items, use familiar labels",
167
- },
168
- {
169
- priority: "medium",
170
- issue: "Too many choices",
171
- fix: "Reduce to one primary CTA",
172
- },
173
- ],
115
+ phases: [
116
+ {
117
+ name: "Awareness",
118
+ duration: "4 weeks",
119
+ goal: "Reach 100k impressions",
120
+ },
121
+ {
122
+ name: "Consideration",
123
+ duration: "6 weeks",
124
+ goal: "5% conversion",
125
+ },
126
+ {
127
+ name: "Conversion",
128
+ duration: "4 weeks",
129
+ goal: "2% purchase",
130
+ },
131
+ ],
132
+ }, null, 2),
133
+ },
134
+ ],
135
+ };
136
+ },
137
+ "landing_page_audit": async (args) => {
138
+ const argsObj = args;
139
+ return {
140
+ content: [
141
+ {
142
+ type: "text",
143
+ text: JSON.stringify({
144
+ url: argsObj.url,
145
+ goal: argsObj.goal,
146
+ auditScore: 72,
147
+ dontMakeMeThink: {
148
+ score: 68,
149
+ issues: [
150
+ {
151
+ priority: "high",
152
+ issue: "Hero value prop not clear in 3 seconds",
153
+ fix: "Above fold: headline + subhead + CTA",
174
154
  },
175
- sections: {
176
- hero: {
177
- status: "needs-work",
178
- recommendation: "Clear H1 + benefit statement + CTA in 3 seconds",
179
- },
180
- socialProof: {
181
- status: "good",
182
- recommendation: "Add testimonials above fold",
183
- },
184
- problem: {
185
- status: "needs-work",
186
- recommendation: "Lead with customer pain point",
187
- },
188
- solution: {
189
- status: "good",
190
- recommendation: "Show product/screenshot clearly",
191
- },
192
- benefits: {
193
- status: "good",
194
- recommendation: "Use bullet points, not paragraphs",
195
- },
196
- cta: {
197
- status: "needs-work",
198
- recommendation: "Make CTA button stand out (color, size, text)",
199
- },
200
- riskReversal: {
201
- status: "missing",
202
- recommendation: "Add guarantees, testimonials",
203
- },
204
- faq: {
205
- status: "good",
206
- recommendation: "Address objections",
207
- },
155
+ {
156
+ priority: "high",
157
+ issue: "Navigation unclear",
158
+ fix: "Max 5 nav items, use familiar labels",
208
159
  },
209
- cognitiveLoad: "Medium",
210
- firstImpression: "Needs improvement - value prop unclear",
211
- }, null, 2),
212
- },
213
- ],
214
- };
215
- }
216
- case "conversion_optimization": {
217
- const argsObj = args;
218
- const pageType = argsObj.pageType || "landing";
219
- const currentConversion = argsObj.currentConversion || 2;
220
- return {
221
- content: [
222
- {
223
- type: "text",
224
- text: JSON.stringify({
225
- pageType,
226
- currentConversion,
227
- targetConversion: currentConversion * 1.5,
228
- recommendations: [
229
- {
230
- priority: "high",
231
- change: "Single clear CTA",
232
- impact: "+25%",
233
- },
234
- {
235
- priority: "high",
236
- change: "Social proof near CTA",
237
- impact: "+15%",
238
- },
239
- {
240
- priority: "medium",
241
- change: "Remove navigation distractions",
242
- impact: "+10%",
243
- },
244
- {
245
- priority: "medium",
246
- change: "Add urgency indicators",
247
- impact: "+10%",
248
- },
249
- {
250
- priority: "low",
251
- change: "Reduce form fields",
252
- impact: "+5%",
253
- },
254
- ],
255
- abTests: [
256
- {
257
- name: "CTA Color Test",
258
- hypothesis: "Contrast color increases clicks",
259
- },
260
- {
261
- name: "Headline Test",
262
- hypothesis: "Benefit-driven headline outperforms feature",
263
- },
264
- {
265
- name: "Social Proof Position",
266
- hypothesis: "Testimonial placement above vs below fold",
267
- },
268
- ],
269
- }, null, 2),
270
- },
271
- ],
272
- };
273
- }
274
- case "market_analysis": {
275
- const argsObj = args;
276
- return {
277
- content: [
278
- {
279
- type: "text",
280
- text: JSON.stringify({
281
- industry: argsObj.industry,
282
- competitors: argsObj.competitors || [],
283
- analysis: {
284
- marketSize: "Estimate based on industry benchmarks",
285
- growthRate: "5-10% YoY",
286
- keyPlayers: ["Player 1", "Player 2", "Player 3"],
287
- opportunities: [
288
- "Underserved segment",
289
- "Technology gap",
290
- "Pricing optimization",
291
- ],
292
- threats: [
293
- "Market saturation",
294
- "Regulatory changes",
295
- "Economic factors",
296
- ],
160
+ {
161
+ priority: "medium",
162
+ issue: "Too many choices",
163
+ fix: "Reduce to one primary CTA",
297
164
  },
298
- }, null, 2),
165
+ ],
299
166
  },
300
- ],
301
- };
302
- }
303
- case "brand_positioning": {
304
- const argsObj = args;
305
- return {
306
- content: [
307
- {
308
- type: "text",
309
- text: JSON.stringify({
310
- product: argsObj.product,
311
- targetMarket: argsObj.targetMarket,
312
- positioning: {
313
- valueProposition: "Unique benefit statement that differentiates from competitors",
314
- brandArchetype: "Hero or Sage - choose based on audience",
315
- keyMessages: [
316
- "Primary message",
317
- "Secondary message",
318
- "Tertiary message",
319
- ],
320
- differentiators: [
321
- "Unique feature 1",
322
- "Unique feature 2",
323
- "Unique benefit",
324
- ],
325
- messagingFramework: {
326
- hero: "For [audience] who [need], [product] is [category] that [benefit]",
327
- taglines: [
328
- "Option 1: [Benefit-focused]",
329
- "Option 2: [Emotion-focused]",
330
- "Option 3: [Authority-focused]",
331
- ],
332
- },
333
- },
334
- }, null, 2),
167
+ sections: {
168
+ hero: {
169
+ status: "needs-work",
170
+ recommendation: "Clear H1 + benefit statement + CTA in 3 seconds",
171
+ },
172
+ socialProof: {
173
+ status: "good",
174
+ recommendation: "Add testimonials above fold",
175
+ },
176
+ problem: {
177
+ status: "needs-work",
178
+ recommendation: "Lead with customer pain point",
179
+ },
180
+ solution: {
181
+ status: "good",
182
+ recommendation: "Show product/screenshot clearly",
183
+ },
184
+ benefits: {
185
+ status: "good",
186
+ recommendation: "Use bullet points, not paragraphs",
187
+ },
188
+ cta: {
189
+ status: "needs-work",
190
+ recommendation: "Make CTA button stand out (color, size, text)",
191
+ },
192
+ riskReversal: {
193
+ status: "missing",
194
+ recommendation: "Add guarantees, testimonials",
195
+ },
196
+ faq: {
197
+ status: "good",
198
+ recommendation: "Address objections",
199
+ },
335
200
  },
336
- ],
337
- };
338
- }
339
- default:
340
- throw new Error(`Unknown tool: ${name}`);
341
- }
342
- }
343
- catch (error) {
201
+ cognitiveLoad: "Medium",
202
+ firstImpression: "Needs improvement - value prop unclear",
203
+ }, null, 2),
204
+ },
205
+ ],
206
+ };
207
+ },
208
+ "conversion_optimization": async (args) => {
209
+ const argsObj = args;
210
+ const pageType = argsObj.pageType || "landing";
211
+ const currentConversion = argsObj.currentConversion || 2;
344
212
  return {
345
- content: [{ type: "text", text: `Error: ${error}` }],
346
- isError: true,
213
+ content: [
214
+ {
215
+ type: "text",
216
+ text: JSON.stringify({
217
+ pageType,
218
+ currentConversion,
219
+ targetConversion: currentConversion * 1.5,
220
+ recommendations: [
221
+ {
222
+ priority: "high",
223
+ change: "Single clear CTA",
224
+ impact: "+25%",
225
+ },
226
+ {
227
+ priority: "high",
228
+ change: "Social proof near CTA",
229
+ impact: "+15%",
230
+ },
231
+ {
232
+ priority: "medium",
233
+ change: "Remove navigation distractions",
234
+ impact: "+10%",
235
+ },
236
+ {
237
+ priority: "medium",
238
+ change: "Add urgency indicators",
239
+ impact: "+10%",
240
+ },
241
+ {
242
+ priority: "low",
243
+ change: "Reduce form fields",
244
+ impact: "+5%",
245
+ },
246
+ ],
247
+ abTests: [
248
+ {
249
+ name: "CTA Color Test",
250
+ hypothesis: "Contrast color increases clicks",
251
+ },
252
+ {
253
+ name: "Headline Test",
254
+ hypothesis: "Benefit-driven headline outperforms feature",
255
+ },
256
+ {
257
+ name: "Social Proof Position",
258
+ hypothesis: "Testimonial placement above vs below fold",
259
+ },
260
+ ],
261
+ }, null, 2),
262
+ },
263
+ ],
347
264
  };
348
- }
349
- });
350
- }
351
- async run() {
352
- const transport = new StdioServerTransport();
353
- await this.server.connect(transport);
265
+ },
266
+ "market_analysis": async (args) => {
267
+ const argsObj = args;
268
+ return {
269
+ content: [
270
+ {
271
+ type: "text",
272
+ text: JSON.stringify({
273
+ industry: argsObj.industry,
274
+ competitors: argsObj.competitors || [],
275
+ analysis: {
276
+ marketSize: "Estimate based on industry benchmarks",
277
+ growthRate: "5-10% YoY",
278
+ keyPlayers: ["Player 1", "Player 2", "Player 3"],
279
+ opportunities: [
280
+ "Underserved segment",
281
+ "Technology gap",
282
+ "Pricing optimization",
283
+ ],
284
+ threats: [
285
+ "Market saturation",
286
+ "Regulatory changes",
287
+ "Economic factors",
288
+ ],
289
+ },
290
+ }, null, 2),
291
+ },
292
+ ],
293
+ };
294
+ },
295
+ "brand_positioning": async (args) => {
296
+ const argsObj = args;
297
+ return {
298
+ content: [
299
+ {
300
+ type: "text",
301
+ text: JSON.stringify({
302
+ product: argsObj.product,
303
+ targetMarket: argsObj.targetMarket,
304
+ positioning: {
305
+ valueProposition: "Unique benefit statement that differentiates from competitors",
306
+ brandArchetype: "Hero or Sage - choose based on audience",
307
+ keyMessages: [
308
+ "Primary message",
309
+ "Secondary message",
310
+ "Tertiary message",
311
+ ],
312
+ differentiators: [
313
+ "Unique feature 1",
314
+ "Unique feature 2",
315
+ "Unique benefit",
316
+ ],
317
+ messagingFramework: {
318
+ hero: "For [audience] who [need], [product] is [category] that [benefit]",
319
+ taglines: [
320
+ "Option 1: [Benefit-focused]",
321
+ "Option 2: [Emotion-focused]",
322
+ "Option 3: [Authority-focused]",
323
+ ],
324
+ },
325
+ },
326
+ }, null, 2),
327
+ },
328
+ ],
329
+ };
330
+ },
331
+ };
332
+ this.setupToolHandlers();
354
333
  }
355
334
  }
356
335
  const entryPoint = path.resolve(process.argv[1] ?? "");
357
336
  if (entryPoint && fileURLToPath(import.meta.url) === entryPoint) {
358
337
  const server = new MarketingExpertServer();
359
- server.run();
338
+ server.run("growth-strategist").catch((err) => { frameworkLogger.log("growth-strategist", "run", "error", { error: err instanceof Error ? err.message : String(err) }); });
360
339
  }
361
340
  export { MarketingExpertServer };