stringray-ai 1.0.0

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 (635) hide show
  1. package/.mcp.json +68 -0
  2. package/LICENSE +21 -0
  3. package/README.md +618 -0
  4. package/dist/agents/architect.d.ts +3 -0
  5. package/dist/agents/architect.d.ts.map +1 -0
  6. package/dist/agents/architect.js +84 -0
  7. package/dist/agents/architect.js.map +1 -0
  8. package/dist/agents/bug-triage-specialist.d.ts +3 -0
  9. package/dist/agents/bug-triage-specialist.d.ts.map +1 -0
  10. package/dist/agents/bug-triage-specialist.js +66 -0
  11. package/dist/agents/bug-triage-specialist.js.map +1 -0
  12. package/dist/agents/code-reviewer.d.ts +3 -0
  13. package/dist/agents/code-reviewer.d.ts.map +1 -0
  14. package/dist/agents/code-reviewer.js +66 -0
  15. package/dist/agents/code-reviewer.js.map +1 -0
  16. package/dist/agents/enforcer.d.ts +3 -0
  17. package/dist/agents/enforcer.d.ts.map +1 -0
  18. package/dist/agents/enforcer.js +109 -0
  19. package/dist/agents/enforcer.js.map +1 -0
  20. package/dist/agents/index.d.ts +15 -0
  21. package/dist/agents/index.d.ts.map +1 -0
  22. package/dist/agents/index.js +26 -0
  23. package/dist/agents/index.js.map +1 -0
  24. package/dist/agents/librarian.d.ts +3 -0
  25. package/dist/agents/librarian.d.ts.map +1 -0
  26. package/dist/agents/librarian.js +70 -0
  27. package/dist/agents/librarian.js.map +1 -0
  28. package/dist/agents/log-monitor.d.ts +3 -0
  29. package/dist/agents/log-monitor.d.ts.map +1 -0
  30. package/dist/agents/log-monitor.js +102 -0
  31. package/dist/agents/log-monitor.js.map +1 -0
  32. package/dist/agents/orchestrator.d.ts +3 -0
  33. package/dist/agents/orchestrator.d.ts.map +1 -0
  34. package/dist/agents/orchestrator.js +85 -0
  35. package/dist/agents/orchestrator.js.map +1 -0
  36. package/dist/agents/refactorer.d.ts +3 -0
  37. package/dist/agents/refactorer.d.ts.map +1 -0
  38. package/dist/agents/refactorer.js +67 -0
  39. package/dist/agents/refactorer.js.map +1 -0
  40. package/dist/agents/security-auditor.d.ts +3 -0
  41. package/dist/agents/security-auditor.d.ts.map +1 -0
  42. package/dist/agents/security-auditor.js +66 -0
  43. package/dist/agents/security-auditor.js.map +1 -0
  44. package/dist/agents/sisyphus.d.ts +3 -0
  45. package/dist/agents/sisyphus.d.ts.map +1 -0
  46. package/dist/agents/sisyphus.js +53 -0
  47. package/dist/agents/sisyphus.js.map +1 -0
  48. package/dist/agents/test-architect.d.ts +3 -0
  49. package/dist/agents/test-architect.d.ts.map +1 -0
  50. package/dist/agents/test-architect.js +81 -0
  51. package/dist/agents/test-architect.js.map +1 -0
  52. package/dist/agents/types.d.ts +29 -0
  53. package/dist/agents/types.d.ts.map +1 -0
  54. package/dist/agents/types.js +2 -0
  55. package/dist/agents/types.js.map +1 -0
  56. package/dist/mcps/architect-tools.server.d.ts +40 -0
  57. package/dist/mcps/architect-tools.server.d.ts.map +1 -0
  58. package/dist/mcps/architect-tools.server.js +563 -0
  59. package/dist/mcps/architect-tools.server.js.map +1 -0
  60. package/dist/mcps/auto-format.server.d.ts +20 -0
  61. package/dist/mcps/auto-format.server.d.ts.map +1 -0
  62. package/dist/mcps/auto-format.server.js +391 -0
  63. package/dist/mcps/auto-format.server.js.map +1 -0
  64. package/dist/mcps/boot-orchestrator.server.d.ts +50 -0
  65. package/dist/mcps/boot-orchestrator.server.d.ts.map +1 -0
  66. package/dist/mcps/boot-orchestrator.server.js +871 -0
  67. package/dist/mcps/boot-orchestrator.server.js.map +1 -0
  68. package/dist/mcps/enforcer-tools.server.d.ts +26 -0
  69. package/dist/mcps/enforcer-tools.server.d.ts.map +1 -0
  70. package/dist/mcps/enforcer-tools.server.js +627 -0
  71. package/dist/mcps/enforcer-tools.server.js.map +1 -0
  72. package/dist/mcps/enhanced-orchestrator.server.d.ts +14 -0
  73. package/dist/mcps/enhanced-orchestrator.server.d.ts.map +1 -0
  74. package/dist/mcps/enhanced-orchestrator.server.js +250 -0
  75. package/dist/mcps/enhanced-orchestrator.server.js.map +1 -0
  76. package/dist/mcps/framework-compliance-audit.server.d.ts +23 -0
  77. package/dist/mcps/framework-compliance-audit.server.d.ts.map +1 -0
  78. package/dist/mcps/framework-compliance-audit.server.js +511 -0
  79. package/dist/mcps/framework-compliance-audit.server.js.map +1 -0
  80. package/dist/mcps/knowledge-skills/api-design.server.d.ts +16 -0
  81. package/dist/mcps/knowledge-skills/api-design.server.d.ts.map +1 -0
  82. package/dist/mcps/knowledge-skills/api-design.server.js +120 -0
  83. package/dist/mcps/knowledge-skills/api-design.server.js.map +1 -0
  84. package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts +16 -0
  85. package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts.map +1 -0
  86. package/dist/mcps/knowledge-skills/architecture-patterns.server.js +110 -0
  87. package/dist/mcps/knowledge-skills/architecture-patterns.server.js.map +1 -0
  88. package/dist/mcps/knowledge-skills/code-review.server.d.ts +32 -0
  89. package/dist/mcps/knowledge-skills/code-review.server.d.ts.map +1 -0
  90. package/dist/mcps/knowledge-skills/code-review.server.js +777 -0
  91. package/dist/mcps/knowledge-skills/code-review.server.js.map +1 -0
  92. package/dist/mcps/knowledge-skills/database-design.server.d.ts +44 -0
  93. package/dist/mcps/knowledge-skills/database-design.server.d.ts.map +1 -0
  94. package/dist/mcps/knowledge-skills/database-design.server.js +818 -0
  95. package/dist/mcps/knowledge-skills/database-design.server.js.map +1 -0
  96. package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts +44 -0
  97. package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts.map +1 -0
  98. package/dist/mcps/knowledge-skills/devops-deployment.server.js +1178 -0
  99. package/dist/mcps/knowledge-skills/devops-deployment.server.js.map +1 -0
  100. package/dist/mcps/knowledge-skills/documentation-generation.server.d.ts +48 -0
  101. package/dist/mcps/knowledge-skills/documentation-generation.server.d.ts.map +1 -0
  102. package/dist/mcps/knowledge-skills/documentation-generation.server.js +1188 -0
  103. package/dist/mcps/knowledge-skills/documentation-generation.server.js.map +1 -0
  104. package/dist/mcps/knowledge-skills/git-workflow.server.d.ts +16 -0
  105. package/dist/mcps/knowledge-skills/git-workflow.server.d.ts.map +1 -0
  106. package/dist/mcps/knowledge-skills/git-workflow.server.js +112 -0
  107. package/dist/mcps/knowledge-skills/git-workflow.server.js.map +1 -0
  108. package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts +16 -0
  109. package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts.map +1 -0
  110. package/dist/mcps/knowledge-skills/performance-optimization.server.js +108 -0
  111. package/dist/mcps/knowledge-skills/performance-optimization.server.js.map +1 -0
  112. package/dist/mcps/knowledge-skills/project-analysis.server.d.ts +34 -0
  113. package/dist/mcps/knowledge-skills/project-analysis.server.d.ts.map +1 -0
  114. package/dist/mcps/knowledge-skills/project-analysis.server.js +710 -0
  115. package/dist/mcps/knowledge-skills/project-analysis.server.js.map +1 -0
  116. package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts +34 -0
  117. package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts.map +1 -0
  118. package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +794 -0
  119. package/dist/mcps/knowledge-skills/refactoring-strategies.server.js.map +1 -0
  120. package/dist/mcps/knowledge-skills/security-audit.server.d.ts +34 -0
  121. package/dist/mcps/knowledge-skills/security-audit.server.d.ts.map +1 -0
  122. package/dist/mcps/knowledge-skills/security-audit.server.js +769 -0
  123. package/dist/mcps/knowledge-skills/security-audit.server.js.map +1 -0
  124. package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +37 -0
  125. package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts.map +1 -0
  126. package/dist/mcps/knowledge-skills/testing-best-practices.server.js +865 -0
  127. package/dist/mcps/knowledge-skills/testing-best-practices.server.js.map +1 -0
  128. package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts +47 -0
  129. package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts.map +1 -0
  130. package/dist/mcps/knowledge-skills/testing-strategy.server.js +672 -0
  131. package/dist/mcps/knowledge-skills/testing-strategy.server.js.map +1 -0
  132. package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +42 -0
  133. package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts.map +1 -0
  134. package/dist/mcps/knowledge-skills/ui-ux-design.server.js +1016 -0
  135. package/dist/mcps/knowledge-skills/ui-ux-design.server.js.map +1 -0
  136. package/dist/mcps/lint.server.d.ts +18 -0
  137. package/dist/mcps/lint.server.d.ts.map +1 -0
  138. package/dist/mcps/lint.server.js +334 -0
  139. package/dist/mcps/lint.server.js.map +1 -0
  140. package/dist/mcps/model-health-check.server.d.ts +17 -0
  141. package/dist/mcps/model-health-check.server.d.ts.map +1 -0
  142. package/dist/mcps/model-health-check.server.js +226 -0
  143. package/dist/mcps/model-health-check.server.js.map +1 -0
  144. package/dist/mcps/orchestrator.server.d.ts +39 -0
  145. package/dist/mcps/orchestrator.server.d.ts.map +1 -0
  146. package/dist/mcps/orchestrator.server.js +908 -0
  147. package/dist/mcps/orchestrator.server.js.map +1 -0
  148. package/dist/mcps/performance-analysis.server.d.ts +28 -0
  149. package/dist/mcps/performance-analysis.server.d.ts.map +1 -0
  150. package/dist/mcps/performance-analysis.server.js +514 -0
  151. package/dist/mcps/performance-analysis.server.js.map +1 -0
  152. package/dist/mcps/processor-pipeline.server.d.ts +29 -0
  153. package/dist/mcps/processor-pipeline.server.d.ts.map +1 -0
  154. package/dist/mcps/processor-pipeline.server.js +520 -0
  155. package/dist/mcps/processor-pipeline.server.js.map +1 -0
  156. package/dist/mcps/security-scan.server.d.ts +20 -0
  157. package/dist/mcps/security-scan.server.d.ts.map +1 -0
  158. package/dist/mcps/security-scan.server.js +404 -0
  159. package/dist/mcps/security-scan.server.js.map +1 -0
  160. package/dist/mcps/state-manager.server.d.ts +29 -0
  161. package/dist/mcps/state-manager.server.d.ts.map +1 -0
  162. package/dist/mcps/state-manager.server.js +620 -0
  163. package/dist/mcps/state-manager.server.js.map +1 -0
  164. package/dist/orchestrator/enhanced-multi-agent-orchestrator.d.ts +109 -0
  165. package/dist/orchestrator/enhanced-multi-agent-orchestrator.d.ts.map +1 -0
  166. package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +337 -0
  167. package/dist/orchestrator/enhanced-multi-agent-orchestrator.js.map +1 -0
  168. package/dist/orchestrator/intelligent-commit-batcher.d.ts +112 -0
  169. package/dist/orchestrator/intelligent-commit-batcher.d.ts.map +1 -0
  170. package/dist/orchestrator/intelligent-commit-batcher.js +330 -0
  171. package/dist/orchestrator/intelligent-commit-batcher.js.map +1 -0
  172. package/dist/plugin/agents/architect.d.ts +3 -0
  173. package/dist/plugin/agents/architect.d.ts.map +1 -0
  174. package/dist/plugin/agents/architect.js +84 -0
  175. package/dist/plugin/agents/architect.js.map +1 -0
  176. package/dist/plugin/agents/bug-triage-specialist.d.ts +3 -0
  177. package/dist/plugin/agents/bug-triage-specialist.d.ts.map +1 -0
  178. package/dist/plugin/agents/bug-triage-specialist.js +66 -0
  179. package/dist/plugin/agents/bug-triage-specialist.js.map +1 -0
  180. package/dist/plugin/agents/code-reviewer.d.ts +3 -0
  181. package/dist/plugin/agents/code-reviewer.d.ts.map +1 -0
  182. package/dist/plugin/agents/code-reviewer.js +66 -0
  183. package/dist/plugin/agents/code-reviewer.js.map +1 -0
  184. package/dist/plugin/agents/enforcer.d.ts +3 -0
  185. package/dist/plugin/agents/enforcer.d.ts.map +1 -0
  186. package/dist/plugin/agents/enforcer.js +109 -0
  187. package/dist/plugin/agents/enforcer.js.map +1 -0
  188. package/dist/plugin/agents/index.d.ts +15 -0
  189. package/dist/plugin/agents/index.d.ts.map +1 -0
  190. package/dist/plugin/agents/index.js +26 -0
  191. package/dist/plugin/agents/index.js.map +1 -0
  192. package/dist/plugin/agents/librarian.d.ts +3 -0
  193. package/dist/plugin/agents/librarian.d.ts.map +1 -0
  194. package/dist/plugin/agents/librarian.js +70 -0
  195. package/dist/plugin/agents/librarian.js.map +1 -0
  196. package/dist/plugin/agents/log-monitor.d.ts +3 -0
  197. package/dist/plugin/agents/log-monitor.d.ts.map +1 -0
  198. package/dist/plugin/agents/log-monitor.js +102 -0
  199. package/dist/plugin/agents/log-monitor.js.map +1 -0
  200. package/dist/plugin/agents/orchestrator.d.ts +3 -0
  201. package/dist/plugin/agents/orchestrator.d.ts.map +1 -0
  202. package/dist/plugin/agents/orchestrator.js +85 -0
  203. package/dist/plugin/agents/orchestrator.js.map +1 -0
  204. package/dist/plugin/agents/refactorer.d.ts +3 -0
  205. package/dist/plugin/agents/refactorer.d.ts.map +1 -0
  206. package/dist/plugin/agents/refactorer.js +67 -0
  207. package/dist/plugin/agents/refactorer.js.map +1 -0
  208. package/dist/plugin/agents/security-auditor.d.ts +3 -0
  209. package/dist/plugin/agents/security-auditor.d.ts.map +1 -0
  210. package/dist/plugin/agents/security-auditor.js +66 -0
  211. package/dist/plugin/agents/security-auditor.js.map +1 -0
  212. package/dist/plugin/agents/sisyphus.d.ts +3 -0
  213. package/dist/plugin/agents/sisyphus.d.ts.map +1 -0
  214. package/dist/plugin/agents/sisyphus.js +53 -0
  215. package/dist/plugin/agents/sisyphus.js.map +1 -0
  216. package/dist/plugin/agents/test-architect.d.ts +3 -0
  217. package/dist/plugin/agents/test-architect.d.ts.map +1 -0
  218. package/dist/plugin/agents/test-architect.js +81 -0
  219. package/dist/plugin/agents/test-architect.js.map +1 -0
  220. package/dist/plugin/agents/types.d.ts +29 -0
  221. package/dist/plugin/agents/types.d.ts.map +1 -0
  222. package/dist/plugin/agents/types.js +2 -0
  223. package/dist/plugin/agents/types.js.map +1 -0
  224. package/dist/plugin/config-loader.d.ts +67 -0
  225. package/dist/plugin/config-loader.d.ts.map +1 -0
  226. package/dist/plugin/config-loader.js +125 -0
  227. package/dist/plugin/config-loader.js.map +1 -0
  228. package/dist/plugin/context-loader.d.ts +122 -0
  229. package/dist/plugin/context-loader.d.ts.map +1 -0
  230. package/dist/plugin/context-loader.js +273 -0
  231. package/dist/plugin/context-loader.js.map +1 -0
  232. package/dist/plugin/delegation/agent-delegator.d.ts +217 -0
  233. package/dist/plugin/delegation/agent-delegator.d.ts.map +1 -0
  234. package/dist/plugin/delegation/agent-delegator.js +928 -0
  235. package/dist/plugin/delegation/agent-delegator.js.map +1 -0
  236. package/dist/plugin/delegation/codebase-context-analyzer.d.ts +157 -0
  237. package/dist/plugin/delegation/codebase-context-analyzer.d.ts.map +1 -0
  238. package/dist/plugin/delegation/codebase-context-analyzer.js +1029 -0
  239. package/dist/plugin/delegation/codebase-context-analyzer.js.map +1 -0
  240. package/dist/plugin/delegation/complexity-analyzer.d.ts +61 -0
  241. package/dist/plugin/delegation/complexity-analyzer.d.ts.map +1 -0
  242. package/dist/plugin/delegation/complexity-analyzer.js +253 -0
  243. package/dist/plugin/delegation/complexity-analyzer.js.map +1 -0
  244. package/dist/plugin/enforcement/enforcer-tools.d.ts +62 -0
  245. package/dist/plugin/enforcement/enforcer-tools.d.ts.map +1 -0
  246. package/dist/plugin/enforcement/enforcer-tools.js +407 -0
  247. package/dist/plugin/enforcement/enforcer-tools.js.map +1 -0
  248. package/dist/plugin/enforcement/rule-enforcer.d.ts +171 -0
  249. package/dist/plugin/enforcement/rule-enforcer.d.ts.map +1 -0
  250. package/dist/plugin/enforcement/rule-enforcer.js +1342 -0
  251. package/dist/plugin/enforcement/rule-enforcer.js.map +1 -0
  252. package/dist/plugin/enforcement/test-auto-healing.d.ts +78 -0
  253. package/dist/plugin/enforcement/test-auto-healing.d.ts.map +1 -0
  254. package/dist/plugin/enforcement/test-auto-healing.js +318 -0
  255. package/dist/plugin/enforcement/test-auto-healing.js.map +1 -0
  256. package/dist/plugin/framework-logger.d.ts +20 -0
  257. package/dist/plugin/framework-logger.d.ts.map +1 -0
  258. package/dist/plugin/framework-logger.js +79 -0
  259. package/dist/plugin/framework-logger.js.map +1 -0
  260. package/dist/plugin/logging-config.d.ts +11 -0
  261. package/dist/plugin/logging-config.d.ts.map +1 -0
  262. package/dist/plugin/logging-config.js +44 -0
  263. package/dist/plugin/logging-config.js.map +1 -0
  264. package/dist/plugin/mcps/architect-tools.server.d.ts +40 -0
  265. package/dist/plugin/mcps/architect-tools.server.d.ts.map +1 -0
  266. package/dist/plugin/mcps/architect-tools.server.js +563 -0
  267. package/dist/plugin/mcps/architect-tools.server.js.map +1 -0
  268. package/dist/plugin/mcps/auto-format.server.d.ts +20 -0
  269. package/dist/plugin/mcps/auto-format.server.d.ts.map +1 -0
  270. package/dist/plugin/mcps/auto-format.server.js +391 -0
  271. package/dist/plugin/mcps/auto-format.server.js.map +1 -0
  272. package/dist/plugin/mcps/boot-orchestrator.server.d.ts +50 -0
  273. package/dist/plugin/mcps/boot-orchestrator.server.d.ts.map +1 -0
  274. package/dist/plugin/mcps/boot-orchestrator.server.js +871 -0
  275. package/dist/plugin/mcps/boot-orchestrator.server.js.map +1 -0
  276. package/dist/plugin/mcps/enforcer-tools.server.d.ts +26 -0
  277. package/dist/plugin/mcps/enforcer-tools.server.d.ts.map +1 -0
  278. package/dist/plugin/mcps/enforcer-tools.server.js +627 -0
  279. package/dist/plugin/mcps/enforcer-tools.server.js.map +1 -0
  280. package/dist/plugin/mcps/enhanced-orchestrator.server.d.ts +14 -0
  281. package/dist/plugin/mcps/enhanced-orchestrator.server.d.ts.map +1 -0
  282. package/dist/plugin/mcps/enhanced-orchestrator.server.js +250 -0
  283. package/dist/plugin/mcps/enhanced-orchestrator.server.js.map +1 -0
  284. package/dist/plugin/mcps/framework-compliance-audit.server.d.ts +23 -0
  285. package/dist/plugin/mcps/framework-compliance-audit.server.d.ts.map +1 -0
  286. package/dist/plugin/mcps/framework-compliance-audit.server.js +511 -0
  287. package/dist/plugin/mcps/framework-compliance-audit.server.js.map +1 -0
  288. package/dist/plugin/mcps/knowledge-skills/api-design.server.d.ts +16 -0
  289. package/dist/plugin/mcps/knowledge-skills/api-design.server.d.ts.map +1 -0
  290. package/dist/plugin/mcps/knowledge-skills/api-design.server.js +120 -0
  291. package/dist/plugin/mcps/knowledge-skills/api-design.server.js.map +1 -0
  292. package/dist/plugin/mcps/knowledge-skills/architecture-patterns.server.d.ts +16 -0
  293. package/dist/plugin/mcps/knowledge-skills/architecture-patterns.server.d.ts.map +1 -0
  294. package/dist/plugin/mcps/knowledge-skills/architecture-patterns.server.js +110 -0
  295. package/dist/plugin/mcps/knowledge-skills/architecture-patterns.server.js.map +1 -0
  296. package/dist/plugin/mcps/knowledge-skills/code-review.server.d.ts +32 -0
  297. package/dist/plugin/mcps/knowledge-skills/code-review.server.d.ts.map +1 -0
  298. package/dist/plugin/mcps/knowledge-skills/code-review.server.js +777 -0
  299. package/dist/plugin/mcps/knowledge-skills/code-review.server.js.map +1 -0
  300. package/dist/plugin/mcps/knowledge-skills/database-design.server.d.ts +44 -0
  301. package/dist/plugin/mcps/knowledge-skills/database-design.server.d.ts.map +1 -0
  302. package/dist/plugin/mcps/knowledge-skills/database-design.server.js +818 -0
  303. package/dist/plugin/mcps/knowledge-skills/database-design.server.js.map +1 -0
  304. package/dist/plugin/mcps/knowledge-skills/devops-deployment.server.d.ts +44 -0
  305. package/dist/plugin/mcps/knowledge-skills/devops-deployment.server.d.ts.map +1 -0
  306. package/dist/plugin/mcps/knowledge-skills/devops-deployment.server.js +1178 -0
  307. package/dist/plugin/mcps/knowledge-skills/devops-deployment.server.js.map +1 -0
  308. package/dist/plugin/mcps/knowledge-skills/documentation-generation.server.d.ts +48 -0
  309. package/dist/plugin/mcps/knowledge-skills/documentation-generation.server.d.ts.map +1 -0
  310. package/dist/plugin/mcps/knowledge-skills/documentation-generation.server.js +1188 -0
  311. package/dist/plugin/mcps/knowledge-skills/documentation-generation.server.js.map +1 -0
  312. package/dist/plugin/mcps/knowledge-skills/git-workflow.server.d.ts +16 -0
  313. package/dist/plugin/mcps/knowledge-skills/git-workflow.server.d.ts.map +1 -0
  314. package/dist/plugin/mcps/knowledge-skills/git-workflow.server.js +112 -0
  315. package/dist/plugin/mcps/knowledge-skills/git-workflow.server.js.map +1 -0
  316. package/dist/plugin/mcps/knowledge-skills/performance-optimization.server.d.ts +16 -0
  317. package/dist/plugin/mcps/knowledge-skills/performance-optimization.server.d.ts.map +1 -0
  318. package/dist/plugin/mcps/knowledge-skills/performance-optimization.server.js +108 -0
  319. package/dist/plugin/mcps/knowledge-skills/performance-optimization.server.js.map +1 -0
  320. package/dist/plugin/mcps/knowledge-skills/project-analysis.server.d.ts +34 -0
  321. package/dist/plugin/mcps/knowledge-skills/project-analysis.server.d.ts.map +1 -0
  322. package/dist/plugin/mcps/knowledge-skills/project-analysis.server.js +710 -0
  323. package/dist/plugin/mcps/knowledge-skills/project-analysis.server.js.map +1 -0
  324. package/dist/plugin/mcps/knowledge-skills/refactoring-strategies.server.d.ts +34 -0
  325. package/dist/plugin/mcps/knowledge-skills/refactoring-strategies.server.d.ts.map +1 -0
  326. package/dist/plugin/mcps/knowledge-skills/refactoring-strategies.server.js +794 -0
  327. package/dist/plugin/mcps/knowledge-skills/refactoring-strategies.server.js.map +1 -0
  328. package/dist/plugin/mcps/knowledge-skills/security-audit.server.d.ts +34 -0
  329. package/dist/plugin/mcps/knowledge-skills/security-audit.server.d.ts.map +1 -0
  330. package/dist/plugin/mcps/knowledge-skills/security-audit.server.js +769 -0
  331. package/dist/plugin/mcps/knowledge-skills/security-audit.server.js.map +1 -0
  332. package/dist/plugin/mcps/knowledge-skills/testing-best-practices.server.d.ts +37 -0
  333. package/dist/plugin/mcps/knowledge-skills/testing-best-practices.server.d.ts.map +1 -0
  334. package/dist/plugin/mcps/knowledge-skills/testing-best-practices.server.js +865 -0
  335. package/dist/plugin/mcps/knowledge-skills/testing-best-practices.server.js.map +1 -0
  336. package/dist/plugin/mcps/knowledge-skills/testing-strategy.server.d.ts +47 -0
  337. package/dist/plugin/mcps/knowledge-skills/testing-strategy.server.d.ts.map +1 -0
  338. package/dist/plugin/mcps/knowledge-skills/testing-strategy.server.js +672 -0
  339. package/dist/plugin/mcps/knowledge-skills/testing-strategy.server.js.map +1 -0
  340. package/dist/plugin/mcps/knowledge-skills/ui-ux-design.server.d.ts +42 -0
  341. package/dist/plugin/mcps/knowledge-skills/ui-ux-design.server.d.ts.map +1 -0
  342. package/dist/plugin/mcps/knowledge-skills/ui-ux-design.server.js +1016 -0
  343. package/dist/plugin/mcps/knowledge-skills/ui-ux-design.server.js.map +1 -0
  344. package/dist/plugin/mcps/lint.server.d.ts +18 -0
  345. package/dist/plugin/mcps/lint.server.d.ts.map +1 -0
  346. package/dist/plugin/mcps/lint.server.js +334 -0
  347. package/dist/plugin/mcps/lint.server.js.map +1 -0
  348. package/dist/plugin/mcps/model-health-check.server.d.ts +17 -0
  349. package/dist/plugin/mcps/model-health-check.server.d.ts.map +1 -0
  350. package/dist/plugin/mcps/model-health-check.server.js +226 -0
  351. package/dist/plugin/mcps/model-health-check.server.js.map +1 -0
  352. package/dist/plugin/mcps/orchestrator.server.d.ts +39 -0
  353. package/dist/plugin/mcps/orchestrator.server.d.ts.map +1 -0
  354. package/dist/plugin/mcps/orchestrator.server.js +908 -0
  355. package/dist/plugin/mcps/orchestrator.server.js.map +1 -0
  356. package/dist/plugin/mcps/performance-analysis.server.d.ts +28 -0
  357. package/dist/plugin/mcps/performance-analysis.server.d.ts.map +1 -0
  358. package/dist/plugin/mcps/performance-analysis.server.js +514 -0
  359. package/dist/plugin/mcps/performance-analysis.server.js.map +1 -0
  360. package/dist/plugin/mcps/processor-pipeline.server.d.ts +29 -0
  361. package/dist/plugin/mcps/processor-pipeline.server.d.ts.map +1 -0
  362. package/dist/plugin/mcps/processor-pipeline.server.js +520 -0
  363. package/dist/plugin/mcps/processor-pipeline.server.js.map +1 -0
  364. package/dist/plugin/mcps/security-scan.server.d.ts +20 -0
  365. package/dist/plugin/mcps/security-scan.server.d.ts.map +1 -0
  366. package/dist/plugin/mcps/security-scan.server.js +404 -0
  367. package/dist/plugin/mcps/security-scan.server.js.map +1 -0
  368. package/dist/plugin/mcps/state-manager.server.d.ts +29 -0
  369. package/dist/plugin/mcps/state-manager.server.d.ts.map +1 -0
  370. package/dist/plugin/mcps/state-manager.server.js +620 -0
  371. package/dist/plugin/mcps/state-manager.server.js.map +1 -0
  372. package/dist/plugin/monitoring/advanced-profiler.d.ts +48 -0
  373. package/dist/plugin/monitoring/advanced-profiler.d.ts.map +1 -0
  374. package/dist/plugin/monitoring/advanced-profiler.js +216 -0
  375. package/dist/plugin/monitoring/advanced-profiler.js.map +1 -0
  376. package/dist/plugin/monitoring/enterprise-monitoring-system.d.ts +331 -0
  377. package/dist/plugin/monitoring/enterprise-monitoring-system.d.ts.map +1 -0
  378. package/dist/plugin/monitoring/enterprise-monitoring-system.js +797 -0
  379. package/dist/plugin/monitoring/enterprise-monitoring-system.js.map +1 -0
  380. package/dist/plugin/orchestrator/enhanced-multi-agent-orchestrator.d.ts +111 -0
  381. package/dist/plugin/orchestrator/enhanced-multi-agent-orchestrator.d.ts.map +1 -0
  382. package/dist/plugin/orchestrator/enhanced-multi-agent-orchestrator.js +339 -0
  383. package/dist/plugin/orchestrator/enhanced-multi-agent-orchestrator.js.map +1 -0
  384. package/dist/plugin/orchestrator/intelligent-commit-batcher.d.ts +112 -0
  385. package/dist/plugin/orchestrator/intelligent-commit-batcher.d.ts.map +1 -0
  386. package/dist/plugin/orchestrator/intelligent-commit-batcher.js +330 -0
  387. package/dist/plugin/orchestrator/intelligent-commit-batcher.js.map +1 -0
  388. package/dist/plugin/orchestrator.d.ts +91 -0
  389. package/dist/plugin/orchestrator.d.ts.map +1 -0
  390. package/dist/plugin/orchestrator.js +444 -0
  391. package/dist/plugin/orchestrator.js.map +1 -0
  392. package/dist/plugin/plugins/marketplace/marketplace-service.d.ts +108 -0
  393. package/dist/plugin/plugins/marketplace/marketplace-service.d.ts.map +1 -0
  394. package/dist/plugin/plugins/marketplace/marketplace-service.js +620 -0
  395. package/dist/plugin/plugins/marketplace/marketplace-service.js.map +1 -0
  396. package/dist/plugin/plugins/marketplace/marketplace-types.d.ts +468 -0
  397. package/dist/plugin/plugins/marketplace/marketplace-types.d.ts.map +1 -0
  398. package/dist/plugin/plugins/marketplace/marketplace-types.js +11 -0
  399. package/dist/plugin/plugins/marketplace/marketplace-types.js.map +1 -0
  400. package/dist/plugin/plugins/plugin-system.d.ts +152 -0
  401. package/dist/plugin/plugins/plugin-system.d.ts.map +1 -0
  402. package/dist/plugin/plugins/plugin-system.js +405 -0
  403. package/dist/plugin/plugins/plugin-system.js.map +1 -0
  404. package/dist/plugin/plugins/stringray-codex-injection.d.ts +68 -0
  405. package/dist/plugin/plugins/stringray-codex-injection.d.ts.map +1 -0
  406. package/dist/plugin/plugins/stringray-codex-injection.js +225 -0
  407. package/dist/plugin/plugins/stringray-codex-injection.js.map +1 -0
  408. package/dist/plugin/plugins/strray-codex-injection.d.ts +68 -0
  409. package/dist/plugin/plugins/strray-codex-injection.d.ts.map +1 -0
  410. package/dist/plugin/plugins/strray-codex-injection.js +225 -0
  411. package/dist/plugin/plugins/strray-codex-injection.js.map +1 -0
  412. package/dist/plugin/processors/index.d.ts +12 -0
  413. package/dist/plugin/processors/index.d.ts.map +1 -0
  414. package/dist/plugin/processors/index.js +12 -0
  415. package/dist/plugin/processors/index.js.map +1 -0
  416. package/dist/plugin/processors/processor-manager.d.ts +113 -0
  417. package/dist/plugin/processors/processor-manager.d.ts.map +1 -0
  418. package/dist/plugin/processors/processor-manager.js +498 -0
  419. package/dist/plugin/processors/processor-manager.js.map +1 -0
  420. package/dist/plugin/processors/processor-types.d.ts +50 -0
  421. package/dist/plugin/processors/processor-types.d.ts.map +1 -0
  422. package/dist/plugin/processors/processor-types.js +10 -0
  423. package/dist/plugin/processors/processor-types.js.map +1 -0
  424. package/dist/plugin/processors/refactoring-logging-processor.d.ts +61 -0
  425. package/dist/plugin/processors/refactoring-logging-processor.d.ts.map +1 -0
  426. package/dist/plugin/processors/refactoring-logging-processor.js +257 -0
  427. package/dist/plugin/processors/refactoring-logging-processor.js.map +1 -0
  428. package/dist/plugin/reporting/framework-reporting-system.d.ts +157 -0
  429. package/dist/plugin/reporting/framework-reporting-system.d.ts.map +1 -0
  430. package/dist/plugin/reporting/framework-reporting-system.js +783 -0
  431. package/dist/plugin/reporting/framework-reporting-system.js.map +1 -0
  432. package/dist/plugin/security/security-hardening-system.d.ts +220 -0
  433. package/dist/plugin/security/security-hardening-system.d.ts.map +1 -0
  434. package/dist/plugin/security/security-hardening-system.js +605 -0
  435. package/dist/plugin/security/security-hardening-system.js.map +1 -0
  436. package/dist/plugin/state/context-providers.d.ts +5 -0
  437. package/dist/plugin/state/context-providers.d.ts.map +1 -0
  438. package/dist/plugin/state/context-providers.js +2 -0
  439. package/dist/plugin/state/context-providers.js.map +1 -0
  440. package/dist/plugin/state/index.d.ts +5 -0
  441. package/dist/plugin/state/index.d.ts.map +1 -0
  442. package/dist/plugin/state/index.js +8 -0
  443. package/dist/plugin/state/index.js.map +1 -0
  444. package/dist/plugin/state/state-manager.d.ts +29 -0
  445. package/dist/plugin/state/state-manager.d.ts.map +1 -0
  446. package/dist/plugin/state/state-manager.js +153 -0
  447. package/dist/plugin/state/state-manager.js.map +1 -0
  448. package/dist/plugin/state/state-types.d.ts +6 -0
  449. package/dist/plugin/state/state-types.d.ts.map +1 -0
  450. package/dist/plugin/state/state-types.js +2 -0
  451. package/dist/plugin/state/state-types.js.map +1 -0
  452. package/dist/plugin/utils/codex-parser.d.ts +62 -0
  453. package/dist/plugin/utils/codex-parser.d.ts.map +1 -0
  454. package/dist/plugin/utils/codex-parser.js +396 -0
  455. package/dist/plugin/utils/codex-parser.js.map +1 -0
  456. package/dist/plugin/utils/command-runner.d.ts +24 -0
  457. package/dist/plugin/utils/command-runner.d.ts.map +1 -0
  458. package/dist/plugin/utils/command-runner.js +44 -0
  459. package/dist/plugin/utils/command-runner.js.map +1 -0
  460. package/dist/plugin/utils/import-resolver.d.ts +55 -0
  461. package/dist/plugin/utils/import-resolver.d.ts.map +1 -0
  462. package/dist/plugin/utils/import-resolver.js +198 -0
  463. package/dist/plugin/utils/import-resolver.js.map +1 -0
  464. package/dist/plugin/utils/memory-pool.d.ts +90 -0
  465. package/dist/plugin/utils/memory-pool.d.ts.map +1 -0
  466. package/dist/plugin/utils/memory-pool.js +245 -0
  467. package/dist/plugin/utils/memory-pool.js.map +1 -0
  468. package/dist/plugin/utils/path-resolver.d.ts +49 -0
  469. package/dist/plugin/utils/path-resolver.d.ts.map +1 -0
  470. package/dist/plugin/utils/path-resolver.js +126 -0
  471. package/dist/plugin/utils/path-resolver.js.map +1 -0
  472. package/dist/plugin/utils/test-template-generator.d.ts +26 -0
  473. package/dist/plugin/utils/test-template-generator.d.ts.map +1 -0
  474. package/dist/plugin/utils/test-template-generator.js +178 -0
  475. package/dist/plugin/utils/test-template-generator.js.map +1 -0
  476. package/dist/processors/index.d.ts +12 -0
  477. package/dist/processors/index.d.ts.map +1 -0
  478. package/dist/processors/index.js +12 -0
  479. package/dist/processors/index.js.map +1 -0
  480. package/dist/processors/processor-manager.d.ts +113 -0
  481. package/dist/processors/processor-manager.d.ts.map +1 -0
  482. package/dist/processors/processor-manager.js +498 -0
  483. package/dist/processors/processor-manager.js.map +1 -0
  484. package/dist/processors/processor-types.d.ts +50 -0
  485. package/dist/processors/processor-types.d.ts.map +1 -0
  486. package/dist/processors/processor-types.js +10 -0
  487. package/dist/processors/processor-types.js.map +1 -0
  488. package/dist/processors/refactoring-logging-processor.d.ts +61 -0
  489. package/dist/processors/refactoring-logging-processor.d.ts.map +1 -0
  490. package/dist/processors/refactoring-logging-processor.js +257 -0
  491. package/dist/processors/refactoring-logging-processor.js.map +1 -0
  492. package/dist/state/context-providers.d.ts +5 -0
  493. package/dist/state/context-providers.d.ts.map +1 -0
  494. package/dist/state/context-providers.js +2 -0
  495. package/dist/state/context-providers.js.map +1 -0
  496. package/dist/state/index.d.ts +5 -0
  497. package/dist/state/index.d.ts.map +1 -0
  498. package/dist/state/index.js +8 -0
  499. package/dist/state/index.js.map +1 -0
  500. package/dist/state/state-manager.d.ts +29 -0
  501. package/dist/state/state-manager.d.ts.map +1 -0
  502. package/dist/state/state-manager.js +153 -0
  503. package/dist/state/state-manager.js.map +1 -0
  504. package/dist/state/state-types.d.ts +6 -0
  505. package/dist/state/state-types.d.ts.map +1 -0
  506. package/dist/state/state-types.js +2 -0
  507. package/dist/state/state-types.js.map +1 -0
  508. package/dist/utils/codex-parser.d.ts +62 -0
  509. package/dist/utils/codex-parser.d.ts.map +1 -0
  510. package/dist/utils/codex-parser.js +396 -0
  511. package/dist/utils/codex-parser.js.map +1 -0
  512. package/dist/utils/command-runner.d.ts +24 -0
  513. package/dist/utils/command-runner.d.ts.map +1 -0
  514. package/dist/utils/command-runner.js +44 -0
  515. package/dist/utils/command-runner.js.map +1 -0
  516. package/dist/utils/import-resolver.d.ts +55 -0
  517. package/dist/utils/import-resolver.d.ts.map +1 -0
  518. package/dist/utils/import-resolver.js +198 -0
  519. package/dist/utils/import-resolver.js.map +1 -0
  520. package/dist/utils/memory-pool.d.ts +90 -0
  521. package/dist/utils/memory-pool.d.ts.map +1 -0
  522. package/dist/utils/memory-pool.js +245 -0
  523. package/dist/utils/memory-pool.js.map +1 -0
  524. package/dist/utils/path-resolver.d.ts +49 -0
  525. package/dist/utils/path-resolver.d.ts.map +1 -0
  526. package/dist/utils/path-resolver.js +126 -0
  527. package/dist/utils/path-resolver.js.map +1 -0
  528. package/dist/utils/test-template-generator.d.ts +26 -0
  529. package/dist/utils/test-template-generator.d.ts.map +1 -0
  530. package/dist/utils/test-template-generator.js +178 -0
  531. package/dist/utils/test-template-generator.js.map +1 -0
  532. package/package.json +138 -0
  533. package/scripts/analysis/analyze-context-awareness.ts +219 -0
  534. package/scripts/analysis/analyze-framework-usage.ts +208 -0
  535. package/scripts/analysis/analyzer-agent-runner.js +328 -0
  536. package/scripts/analysis/context-awareness-report.ts +250 -0
  537. package/scripts/analyze-imports.mjs +147 -0
  538. package/scripts/basic-security-audit.cjs +261 -0
  539. package/scripts/boot-check.cjs +188 -0
  540. package/scripts/build/check-syntax.sh +1 -0
  541. package/scripts/build/check-tsc.sh +1 -0
  542. package/scripts/build/check-types.sh +1 -0
  543. package/scripts/build/compile-single.sh +1 -0
  544. package/scripts/build/copy-plugin.sh +1 -0
  545. package/scripts/build/manual-build.sh +1 -0
  546. package/scripts/build/run-build-after-copy.sh +1 -0
  547. package/scripts/build/run-build-attempt.sh +1 -0
  548. package/scripts/build/run-build-errors-grep.sh +1 -0
  549. package/scripts/build/run-build-errors.sh +1 -0
  550. package/scripts/build/run-build-limited.sh +1 -0
  551. package/scripts/build/run-build-list.sh +1 -0
  552. package/scripts/build/run-build.sh +1 -0
  553. package/scripts/build/run-limited.sh +1 -0
  554. package/scripts/build/run-tsc-direct.sh +1 -0
  555. package/scripts/build/run-type-check.sh +1 -0
  556. package/scripts/build/run-typecheck.sh +1 -0
  557. package/scripts/build/test-build.sh +1 -0
  558. package/scripts/check-logs.sh +62 -0
  559. package/scripts/debug/debug-context-enhancement.ts +116 -0
  560. package/scripts/debug/debug-rules.mjs +23 -0
  561. package/scripts/demo/demo-clickable-monitoring.mjs +116 -0
  562. package/scripts/demo/profiling-demo.js +108 -0
  563. package/scripts/demo/profiling-demo.ts +126 -0
  564. package/scripts/demo/reporting-demonstration.ts +184 -0
  565. package/scripts/demo/reporting-examples.ts +105 -0
  566. package/scripts/dependency-scan.cjs +111 -0
  567. package/scripts/deploy-stringray-plugin.sh +323 -0
  568. package/scripts/disable-logging.sh +20 -0
  569. package/scripts/extract-framework.sh +405 -0
  570. package/scripts/fix-mcp-capabilities.js +83 -0
  571. package/scripts/framework/advanced-profiling-integration.sh +384 -0
  572. package/scripts/framework/check-agent-orchestration-health.sh +113 -0
  573. package/scripts/framework/enterprise-analysis-test.sh +174 -0
  574. package/scripts/framework/implement-analyzer-agent.sh +393 -0
  575. package/scripts/framework/merge-mcp-configs.sh +201 -0
  576. package/scripts/framework/validate-multi-agent-orchestration.sh +195 -0
  577. package/scripts/framework/validate-profiling.sh +64 -0
  578. package/scripts/github-actions-monitor.cjs +289 -0
  579. package/scripts/init.ts +121 -0
  580. package/scripts/monitoring/initialize-monitoring-pipeline.sh +89 -0
  581. package/scripts/monitoring/memory-dashboard.sh +52 -0
  582. package/scripts/monitoring/monitoring-daemon.mjs +67 -0
  583. package/scripts/monitoring/monitoring-daemon.sh +190 -0
  584. package/scripts/monitoring/profiling-dashboard.sh +69 -0
  585. package/scripts/performance-report.js +56 -0
  586. package/scripts/postinstall.cjs +240 -0
  587. package/scripts/profile-performance.sh +263 -0
  588. package/scripts/register-mcp-servers-fixed.sh +74 -0
  589. package/scripts/register-mcp-servers.sh +96 -0
  590. package/scripts/reporting/generate-phase1-report.js +28 -0
  591. package/scripts/reporting/run-postprocessor.js +59 -0
  592. package/scripts/reporting/trigger-report.js +15 -0
  593. package/scripts/run-simulations.mjs +29 -0
  594. package/scripts/scenario-data-processor.py +122 -0
  595. package/scripts/scenarios/scenario-security-check.ts +60 -0
  596. package/scripts/scenarios/scenario-user-management.ts +123 -0
  597. package/scripts/setup.cjs +128 -0
  598. package/scripts/simulation/run-simulations.js +84 -0
  599. package/scripts/simulation/simulate-full-orchestrator.ts +239 -0
  600. package/scripts/strray-triage.sh +349 -0
  601. package/scripts/test/run-memory-regression.sh +45 -0
  602. package/scripts/test/run-test.sh +2 -0
  603. package/scripts/test/test-deployment.sh +552 -0
  604. package/scripts/test/test-enhanced-report.ts +24 -0
  605. package/scripts/test/test-graceful-shutdown.sh +35 -0
  606. package/scripts/test/test-integration.mjs +79 -0
  607. package/scripts/test/test-manual-orchestration.sh +168 -0
  608. package/scripts/test/test-max-agents.sh +70 -0
  609. package/scripts/test/test-memory-monitor.sh +40 -0
  610. package/scripts/test/test-memory-pools.sh +58 -0
  611. package/scripts/test/test-module.ts +1 -0
  612. package/scripts/test/test-multi-agent-trigger.sh +251 -0
  613. package/scripts/test/test-orchestrator.txt +1 -0
  614. package/scripts/test/test-postinstall.js +1 -0
  615. package/scripts/test/test-security-module.ts +27 -0
  616. package/scripts/test/test-session-management.js +135 -0
  617. package/scripts/test/test-simulation.mjs +14 -0
  618. package/scripts/test/test-user-service.ts +111 -0
  619. package/scripts/test-comprehensive-path-resolution.mjs +62 -0
  620. package/scripts/test-data-processor.py +51 -0
  621. package/scripts/test-enforcement-e2e.mjs +127 -0
  622. package/scripts/test-full-plugin-no-timeout.sh +30 -0
  623. package/scripts/test-path-resolver.mjs +32 -0
  624. package/scripts/test-rules.mjs +128 -0
  625. package/scripts/test-stringray-plugin.mjs +66 -0
  626. package/scripts/test-utils/smart-test-runner.mjs +609 -0
  627. package/scripts/test-utils/test-quarantine.mjs +246 -0
  628. package/scripts/validate-codex.js +60 -0
  629. package/scripts/validate-phase1.mjs +189 -0
  630. package/scripts/validation/run-validators.js +114 -0
  631. package/scripts/validation/validate-external-processes.js +240 -0
  632. package/scripts/validation/validate-mcp-connectivity.js +165 -0
  633. package/scripts/validation/validate-oh-my-opencode-integration.js +200 -0
  634. package/scripts/validation/validate-reports.ts +114 -0
  635. package/scripts/verify-phase1.js +144 -0
@@ -0,0 +1,1178 @@
1
+ /**
2
+ * StrRay DevOps Deployment MCP Server
3
+ *
4
+ * Knowledge skill for DevOps practices, deployment strategies,
5
+ * CI/CD pipeline design, and infrastructure automation
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
+ class StrRayDevOpsDeploymentServer {
11
+ server;
12
+ constructor() {
13
+ this.server = new Server({
14
+ name: "strray-devops-deployment",
15
+ version: "1.0.0",
16
+ }, {
17
+ capabilities: {
18
+ tools: {},
19
+ },
20
+ });
21
+ this.setupToolHandlers();
22
+ console.log("StrRay DevOps Deployment MCP Server initialized");
23
+ }
24
+ setupToolHandlers() {
25
+ this.server.setRequestHandler(ListToolsRequestSchema, async () => {
26
+ return {
27
+ tools: [
28
+ {
29
+ name: "analyze_ci_cd_pipeline",
30
+ description: "Analyze CI/CD pipeline configuration and suggest optimizations",
31
+ inputSchema: {
32
+ type: "object",
33
+ properties: {
34
+ pipelineConfig: {
35
+ type: "string",
36
+ description: "CI/CD pipeline configuration (YAML/JSON)",
37
+ },
38
+ platform: {
39
+ type: "string",
40
+ enum: [
41
+ "github-actions",
42
+ "gitlab-ci",
43
+ "jenkins",
44
+ "circle-ci",
45
+ "azure-devops",
46
+ ],
47
+ description: "CI/CD platform being used",
48
+ },
49
+ includeSecurity: {
50
+ type: "boolean",
51
+ description: "Include security gate analysis",
52
+ default: true,
53
+ },
54
+ },
55
+ required: ["pipelineConfig", "platform"],
56
+ },
57
+ },
58
+ {
59
+ name: "design_deployment_strategy",
60
+ description: "Design optimal deployment strategy for application requirements",
61
+ inputSchema: {
62
+ type: "object",
63
+ properties: {
64
+ applicationType: {
65
+ type: "string",
66
+ enum: [
67
+ "web-app",
68
+ "api",
69
+ "mobile",
70
+ "microservices",
71
+ "monolith",
72
+ ],
73
+ description: "Type of application",
74
+ },
75
+ scale: {
76
+ type: "string",
77
+ enum: ["small", "medium", "large", "enterprise"],
78
+ description: "Expected scale/traffic",
79
+ },
80
+ availability: {
81
+ type: "string",
82
+ enum: ["basic", "high", "critical"],
83
+ description: "Required availability level",
84
+ },
85
+ budget: {
86
+ type: "string",
87
+ enum: ["cost-optimized", "balanced", "performance-optimized"],
88
+ description: "Budget considerations",
89
+ },
90
+ },
91
+ required: ["applicationType", "scale"],
92
+ },
93
+ },
94
+ {
95
+ name: "generate_infrastructure_code",
96
+ description: "Generate infrastructure as code for deployment",
97
+ inputSchema: {
98
+ type: "object",
99
+ properties: {
100
+ platform: {
101
+ type: "string",
102
+ enum: ["aws", "azure", "gcp", "kubernetes"],
103
+ description: "Target cloud platform",
104
+ },
105
+ services: {
106
+ type: "array",
107
+ items: { type: "string" },
108
+ description: "Required services (database, cache, storage, etc.)",
109
+ },
110
+ environment: {
111
+ type: "string",
112
+ enum: ["development", "staging", "production"],
113
+ description: "Deployment environment",
114
+ },
115
+ scaling: {
116
+ type: "boolean",
117
+ description: "Include auto-scaling configuration",
118
+ default: true,
119
+ },
120
+ },
121
+ required: ["platform", "services"],
122
+ },
123
+ },
124
+ {
125
+ name: "optimize_deployment_performance",
126
+ description: "Analyze and optimize deployment performance and reliability",
127
+ inputSchema: {
128
+ type: "object",
129
+ properties: {
130
+ currentMetrics: {
131
+ type: "object",
132
+ properties: {
133
+ deployTime: { type: "number" },
134
+ failureRate: { type: "number" },
135
+ rollbackTime: { type: "number" },
136
+ },
137
+ description: "Current deployment metrics",
138
+ },
139
+ constraints: {
140
+ type: "object",
141
+ properties: {
142
+ maxDowntime: { type: "number" },
143
+ budget: { type: "number" },
144
+ teamSize: { type: "number" },
145
+ },
146
+ description: "Business and technical constraints",
147
+ },
148
+ },
149
+ required: ["currentMetrics"],
150
+ },
151
+ },
152
+ ],
153
+ };
154
+ });
155
+ this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
156
+ const { name, arguments: args } = request.params;
157
+ switch (name) {
158
+ case "analyze_ci_cd_pipeline":
159
+ return await this.analyzeCICDPipeline(args);
160
+ case "design_deployment_strategy":
161
+ return await this.designDeploymentStrategy(args);
162
+ case "generate_infrastructure_code":
163
+ return await this.generateInfrastructureCode(args);
164
+ case "optimize_deployment_performance":
165
+ return await this.optimizeDeploymentPerformance(args);
166
+ default:
167
+ throw new Error(`Unknown tool: ${name}`);
168
+ }
169
+ });
170
+ }
171
+ async analyzeCICDPipeline(args) {
172
+ const { pipelineConfig, platform, includeSecurity = true } = args;
173
+ try {
174
+ const pipeline = this.parsePipelineConfig(pipelineConfig, platform);
175
+ const analysis = this.analyzePipelineStructure(pipeline);
176
+ const optimizations = this.generatePipelineOptimizations(pipeline, analysis);
177
+ let securityAnalysis = null;
178
+ if (includeSecurity) {
179
+ securityAnalysis = this.analyzePipelineSecurity(pipeline);
180
+ }
181
+ const recommendations = [
182
+ ...optimizations,
183
+ ...(securityAnalysis ? securityAnalysis.recommendations : []),
184
+ ];
185
+ return {
186
+ content: [
187
+ {
188
+ type: "text",
189
+ text: `CI/CD Pipeline Analysis for ${platform.toUpperCase()}:\n\n` +
190
+ `📊 PIPELINE METRICS\n` +
191
+ `Stages: ${pipeline.stages.length}\n` +
192
+ `Total Duration: ${analysis.totalDuration} minutes\n` +
193
+ `Parallelizable Stages: ${pipeline.stages.filter((s) => s.parallelizable).length}/${pipeline.stages.length}\n` +
194
+ `Bottleneck Stage: ${analysis.bottleneckStage}\n\n` +
195
+ `🔍 PERFORMANCE ANALYSIS\n` +
196
+ `Build Time: ${analysis.performanceMetrics.buildTime} min\n` +
197
+ `Test Time: ${analysis.performanceMetrics.testTime} min\n` +
198
+ `Deploy Time: ${analysis.performanceMetrics.deployTime} min\n` +
199
+ `Failure Rate: ${(analysis.performanceMetrics.failureRate * 100).toFixed(1)}%\n` +
200
+ `MTTR: ${analysis.performanceMetrics.meanTimeToRecovery} min\n\n` +
201
+ `${includeSecurity
202
+ ? `🛡️ SECURITY GATES\n` +
203
+ `Total Gates: ${securityAnalysis.securityGates.length}\n` +
204
+ `Blocking Gates: ${securityAnalysis.securityGates.filter((g) => g.blocking).length}\n` +
205
+ `Coverage: ${securityAnalysis.securityGates.reduce((sum, g) => sum + g.coverage, 0) / securityAnalysis.securityGates.length}%\n\n`
206
+ : ""}` +
207
+ `💡 OPTIMIZATION RECOMMENDATIONS\n${recommendations.map((rec, i) => `${i + 1}. ${rec}`).join("\n")}`,
208
+ },
209
+ ],
210
+ data: {
211
+ pipeline,
212
+ analysis,
213
+ securityAnalysis,
214
+ recommendations,
215
+ score: this.calculatePipelineScore(analysis, securityAnalysis),
216
+ },
217
+ };
218
+ }
219
+ catch (error) {
220
+ return {
221
+ content: [
222
+ {
223
+ type: "text",
224
+ text: `Error analyzing CI/CD pipeline: ${error instanceof Error ? error.message : String(error)}`,
225
+ },
226
+ ],
227
+ };
228
+ }
229
+ }
230
+ async designDeploymentStrategy(args) {
231
+ const { applicationType, scale, availability, budget = "balanced" } = args;
232
+ try {
233
+ const strategies = this.generateDeploymentStrategies(applicationType, scale, availability, budget);
234
+ const recommended = this.selectOptimalStrategy(strategies, {
235
+ applicationType,
236
+ scale,
237
+ availability,
238
+ budget,
239
+ });
240
+ const implementation = this.generateStrategyImplementation(recommended);
241
+ return {
242
+ content: [
243
+ {
244
+ type: "text",
245
+ text: `Deployment Strategy Design for ${applicationType.toUpperCase()}:\n\n` +
246
+ `🎯 REQUIREMENTS\n` +
247
+ `Scale: ${scale.toUpperCase()}\n` +
248
+ `Availability: ${availability.toUpperCase()}\n` +
249
+ `Budget: ${budget.toUpperCase()}\n\n` +
250
+ `🏆 RECOMMENDED STRATEGY: ${recommended.name.toUpperCase()}\n` +
251
+ `Type: ${recommended.type}\n` +
252
+ `Downtime: ${recommended.downtime}\n` +
253
+ `Complexity: ${recommended.complexity}\n` +
254
+ `Use Case: ${recommended.useCase}\n\n` +
255
+ `✅ PROS\n${recommended.pros.map((pro) => `• ${pro}`).join("\n")}\n\n` +
256
+ `⚠️ CONS\n${recommended.cons.map((con) => `• ${con}`).join("\n")}\n\n` +
257
+ `🚀 IMPLEMENTATION STEPS\n${implementation.steps.map((step, i) => `${i + 1}. ${step}`).join("\n")}\n\n` +
258
+ `🛠️ REQUIRED TOOLS\n${implementation.tools.join(", ")}\n\n` +
259
+ `📊 SUCCESS METRICS\n${implementation.metrics.map((metric) => `• ${metric}`).join("\n")}`,
260
+ },
261
+ ],
262
+ data: {
263
+ strategies,
264
+ recommended,
265
+ implementation,
266
+ alternatives: strategies.filter((s) => s.name !== recommended.name),
267
+ },
268
+ };
269
+ }
270
+ catch (error) {
271
+ return {
272
+ content: [
273
+ {
274
+ type: "text",
275
+ text: `Error designing deployment strategy: ${error instanceof Error ? error.message : String(error)}`,
276
+ },
277
+ ],
278
+ };
279
+ }
280
+ }
281
+ async generateInfrastructureCode(args) {
282
+ const { platform, services, environment, scaling = true } = args;
283
+ try {
284
+ const recommendations = this.analyzeInfrastructureNeeds(services, environment);
285
+ const infrastructure = this.generateInfrastructureAsCode(platform, recommendations, scaling);
286
+ const monitoring = this.generateMonitoringConfiguration(platform, services);
287
+ const security = this.generateSecurityConfiguration(platform, environment);
288
+ return {
289
+ content: [
290
+ {
291
+ type: "text",
292
+ text: `Infrastructure as Code for ${platform.toUpperCase()} (${environment}):\n\n` +
293
+ `🏗️ ARCHITECTURE OVERVIEW\n` +
294
+ `Platform: ${platform}\n` +
295
+ `Environment: ${environment}\n` +
296
+ `Services: ${services.join(", ")}\n` +
297
+ `Auto-scaling: ${scaling ? "Enabled" : "Disabled"}\n\n` +
298
+ `💰 COST ESTIMATE: $${recommendations.reduce((sum, r) => sum + r.costEstimate, 0)}/month\n\n` +
299
+ `🔧 GENERATED INFRASTRUCTURE CODE\n\`\`\`${this.getInfrastructureLanguage(platform)}\n${infrastructure.code}\n\`\`\`\n\n` +
300
+ `📊 SCALING CONFIGURATION\n` +
301
+ `Strategy: ${recommendations[0]?.scalingStrategy}\n` +
302
+ `Min Instances: ${infrastructure.scaling.min}\n` +
303
+ `Max Instances: ${infrastructure.scaling.max}\n` +
304
+ `Target CPU: ${infrastructure.scaling.cpuThreshold}%\n\n` +
305
+ `📈 MONITORING DASHBOARDS\n${monitoring.dashboards.map((d) => `• ${d}`).join("\n")}\n\n` +
306
+ `🛡️ SECURITY CONFIGURATION\n${security.policies.map((p) => `• ${p}`).join("\n")}`,
307
+ },
308
+ ],
309
+ data: {
310
+ recommendations,
311
+ infrastructure,
312
+ monitoring,
313
+ security,
314
+ totalCost: recommendations.reduce((sum, r) => sum + r.costEstimate, 0),
315
+ },
316
+ };
317
+ }
318
+ catch (error) {
319
+ return {
320
+ content: [
321
+ {
322
+ type: "text",
323
+ text: `Error generating infrastructure code: ${error instanceof Error ? error.message : String(error)}`,
324
+ },
325
+ ],
326
+ };
327
+ }
328
+ }
329
+ async optimizeDeploymentPerformance(args) {
330
+ const { currentMetrics, constraints = {} } = args;
331
+ try {
332
+ const analysis = this.analyzeDeploymentMetrics(currentMetrics);
333
+ const bottlenecks = this.identifyDeploymentBottlenecks(analysis, constraints);
334
+ const optimizations = this.generateDeploymentOptimizations(bottlenecks, constraints);
335
+ const roadmap = this.createOptimizationRoadmap(optimizations, constraints);
336
+ return {
337
+ content: [
338
+ {
339
+ type: "text",
340
+ text: `Deployment Performance Optimization Analysis:\n\n` +
341
+ `📊 CURRENT METRICS\n` +
342
+ `Deploy Time: ${currentMetrics.deployTime || 0} minutes\n` +
343
+ `Failure Rate: ${(currentMetrics.failureRate || 0) * 100}%\n` +
344
+ `Rollback Time: ${currentMetrics.rollbackTime || 0} minutes\n\n` +
345
+ `🎯 CONSTRAINTS\n` +
346
+ `Max Downtime: ${constraints.maxDowntime || "N/A"} minutes\n` +
347
+ `Budget: $${constraints.budget || "N/A"}\n` +
348
+ `Team Size: ${constraints.teamSize || "N/A"} people\n\n` +
349
+ `🔍 BOTTLENECK ANALYSIS\n${bottlenecks.map((b, i) => `${i + 1}. ${b.issue} (Impact: ${b.impact})`).join("\n")}\n\n` +
350
+ `⚡ OPTIMIZATION RECOMMENDATIONS\n${optimizations.map((opt, i) => `${i + 1}. ${opt.title} (Effort: ${opt.effort}, Impact: ${opt.impact})`).join("\n")}\n\n` +
351
+ `🗓️ OPTIMIZATION ROADMAP\n${roadmap.phases.map((phase, i) => `Phase ${i + 1}: ${phase.name} (${phase.duration} weeks)`).join("\n")}\n\n` +
352
+ `📈 PROJECTED IMPROVEMENTS\n` +
353
+ `Deploy Time: ${roadmap.finalMetrics.deployTime} min (-${(((currentMetrics.deployTime - roadmap.finalMetrics.deployTime) / currentMetrics.deployTime) * 100).toFixed(0)}%)\n` +
354
+ `Failure Rate: ${(roadmap.finalMetrics.failureRate * 100).toFixed(1)}% (-${(((currentMetrics.failureRate - roadmap.finalMetrics.failureRate) / currentMetrics.failureRate) * 100).toFixed(0)}%)\n` +
355
+ `Rollback Time: ${roadmap.finalMetrics.rollbackTime} min (-${(((currentMetrics.rollbackTime - roadmap.finalMetrics.rollbackTime) / currentMetrics.rollbackTime) * 100).toFixed(0)}%)`,
356
+ },
357
+ ],
358
+ data: {
359
+ analysis,
360
+ bottlenecks,
361
+ optimizations,
362
+ roadmap,
363
+ improvements: roadmap.finalMetrics,
364
+ },
365
+ };
366
+ }
367
+ catch (error) {
368
+ return {
369
+ content: [
370
+ {
371
+ type: "text",
372
+ text: `Error optimizing deployment performance: ${error instanceof Error ? error.message : String(error)}`,
373
+ },
374
+ ],
375
+ };
376
+ }
377
+ }
378
+ parsePipelineConfig(config, platform) {
379
+ // Simplified pipeline parsing - in production would be more sophisticated
380
+ const stages = [];
381
+ let totalDuration = 0;
382
+ // Parse based on platform
383
+ switch (platform) {
384
+ case "github-actions":
385
+ // Parse GitHub Actions workflow
386
+ const jobs = config.match(/jobs:\s*\n((?:\s+\w+:[\s\S]*?(?=\n\s+\w+:|$))*)?/);
387
+ if (jobs) {
388
+ // Extract job definitions and estimate durations
389
+ stages.push({
390
+ name: "checkout",
391
+ type: "build",
392
+ duration: 0.5,
393
+ successRate: 0.99,
394
+ parallelizable: false,
395
+ dependencies: [],
396
+ }, {
397
+ name: "setup",
398
+ type: "build",
399
+ duration: 1,
400
+ successRate: 0.95,
401
+ parallelizable: false,
402
+ dependencies: ["checkout"],
403
+ }, {
404
+ name: "build",
405
+ type: "build",
406
+ duration: 3,
407
+ successRate: 0.9,
408
+ parallelizable: false,
409
+ dependencies: ["setup"],
410
+ }, {
411
+ name: "test",
412
+ type: "test",
413
+ duration: 5,
414
+ successRate: 0.85,
415
+ parallelizable: true,
416
+ dependencies: ["build"],
417
+ }, {
418
+ name: "security",
419
+ type: "security",
420
+ duration: 2,
421
+ successRate: 0.95,
422
+ parallelizable: true,
423
+ dependencies: ["build"],
424
+ }, {
425
+ name: "deploy",
426
+ type: "deploy",
427
+ duration: 2,
428
+ successRate: 0.8,
429
+ parallelizable: false,
430
+ dependencies: ["test", "security"],
431
+ });
432
+ }
433
+ break;
434
+ default:
435
+ // Generic pipeline structure
436
+ stages.push({
437
+ name: "build",
438
+ type: "build",
439
+ duration: 4,
440
+ successRate: 0.9,
441
+ parallelizable: false,
442
+ dependencies: [],
443
+ }, {
444
+ name: "test",
445
+ type: "test",
446
+ duration: 6,
447
+ successRate: 0.85,
448
+ parallelizable: true,
449
+ dependencies: ["build"],
450
+ }, {
451
+ name: "deploy",
452
+ type: "deploy",
453
+ duration: 3,
454
+ successRate: 0.8,
455
+ parallelizable: false,
456
+ dependencies: ["test"],
457
+ });
458
+ }
459
+ totalDuration = stages.reduce((sum, stage) => sum + stage.duration, 0);
460
+ return {
461
+ stages,
462
+ totalDuration,
463
+ bottleneckStage: stages.reduce((max, stage) => stage.duration > max.duration ? stage : max).name,
464
+ optimizationSuggestions: [],
465
+ securityGates: [],
466
+ performanceMetrics: {
467
+ buildTime: stages
468
+ .filter((s) => s.type === "build")
469
+ .reduce((sum, s) => sum + s.duration, 0),
470
+ testTime: stages
471
+ .filter((s) => s.type === "test")
472
+ .reduce((sum, s) => sum + s.duration, 0),
473
+ deployTime: stages
474
+ .filter((s) => s.type === "deploy")
475
+ .reduce((sum, s) => sum + s.duration, 0),
476
+ failureRate: 1 - stages.reduce((product, stage) => product * stage.successRate, 1),
477
+ meanTimeToRecovery: 15, // minutes
478
+ },
479
+ };
480
+ }
481
+ analyzePipelineStructure(pipeline) {
482
+ return {
483
+ parallelization: pipeline.stages.filter((s) => s.parallelizable).length /
484
+ pipeline.stages.length,
485
+ dependencyComplexity: this.calculateDependencyComplexity(pipeline.stages),
486
+ stageDistribution: this.analyzeStageDistribution(pipeline.stages),
487
+ optimizationOpportunities: this.identifyPipelineOptimizations(pipeline),
488
+ };
489
+ }
490
+ generatePipelineOptimizations(pipeline, analysis) {
491
+ const optimizations = [];
492
+ if (analysis.parallelization < 0.5) {
493
+ optimizations.push("Increase parallelization by running independent stages concurrently");
494
+ }
495
+ if (pipeline.bottleneckStage) {
496
+ optimizations.push(`Optimize ${pipeline.bottleneckStage} stage - consider caching or distributed processing`);
497
+ }
498
+ if (pipeline.totalDuration > 30) {
499
+ optimizations.push("Pipeline too slow - consider artifact caching and incremental builds");
500
+ }
501
+ if (pipeline.performanceMetrics.failureRate > 0.1) {
502
+ optimizations.push("High failure rate detected - improve test stability and add retries");
503
+ }
504
+ optimizations.push("Add automated rollback capability for failed deployments");
505
+ optimizations.push("Implement artifact versioning for reliable deployments");
506
+ return optimizations;
507
+ }
508
+ analyzePipelineSecurity(pipeline) {
509
+ const securityGates = [
510
+ {
511
+ name: "SAST",
512
+ type: "sast",
513
+ tools: ["eslint", "sonarcloud"],
514
+ blocking: true,
515
+ coverage: 85,
516
+ },
517
+ {
518
+ name: "Dependency Scan",
519
+ type: "dependency-scan",
520
+ tools: ["npm audit", "snyk"],
521
+ blocking: true,
522
+ coverage: 95,
523
+ },
524
+ {
525
+ name: "Secrets Scan",
526
+ type: "secrets-scan",
527
+ tools: ["gitleaks", "trufflehog"],
528
+ blocking: true,
529
+ coverage: 90,
530
+ },
531
+ ];
532
+ return {
533
+ securityGates,
534
+ recommendations: [
535
+ "Add DAST scanning for runtime security testing",
536
+ "Implement compliance checks for regulatory requirements",
537
+ "Add manual security review gates for critical changes",
538
+ ],
539
+ };
540
+ }
541
+ calculatePipelineScore(analysis, securityAnalysis) {
542
+ let score = 100;
543
+ // Deduct for long duration
544
+ if (analysis.totalDuration > 30)
545
+ score -= 20;
546
+ if (analysis.totalDuration > 60)
547
+ score -= 30;
548
+ // Deduct for high failure rate
549
+ score -= analysis.performanceMetrics.failureRate * 100;
550
+ // Deduct for poor parallelization
551
+ if (analysis.parallelization < 0.3)
552
+ score -= 15;
553
+ // Bonus for security
554
+ if (securityAnalysis && securityAnalysis.securityGates.length >= 3) {
555
+ score += 10;
556
+ }
557
+ return Math.max(0, Math.min(100, score));
558
+ }
559
+ generateDeploymentStrategies(appType, scale, availability, budget) {
560
+ const strategies = [];
561
+ // Blue-Green Strategy
562
+ strategies.push({
563
+ name: "blue-green",
564
+ type: "blue-green",
565
+ description: "Maintain two identical environments, switch traffic between them",
566
+ useCase: "Zero-downtime deployments with instant rollback",
567
+ pros: ["Zero downtime", "Instant rollback", "Safe testing"],
568
+ cons: [
569
+ "Double infrastructure cost",
570
+ "Complex routing",
571
+ "Storage synchronization",
572
+ ],
573
+ complexity: "high",
574
+ downtime: "zero",
575
+ });
576
+ // Canary Strategy
577
+ strategies.push({
578
+ name: "canary",
579
+ type: "canary",
580
+ description: "Gradually roll out to subset of users, monitor metrics",
581
+ useCase: "Risk mitigation with gradual rollout and monitoring",
582
+ pros: ["Gradual rollout", "Real-time monitoring", "Easy rollback"],
583
+ cons: [
584
+ "Complex traffic routing",
585
+ "Monitoring overhead",
586
+ "Slower rollout",
587
+ ],
588
+ complexity: "medium",
589
+ downtime: "zero",
590
+ });
591
+ // Rolling Update
592
+ strategies.push({
593
+ name: "rolling",
594
+ type: "rolling",
595
+ description: "Update instances gradually, keeping some running during deployment",
596
+ useCase: "Simple deployments with minimal infrastructure requirements",
597
+ pros: [
598
+ "Simple implementation",
599
+ "Minimal extra resources",
600
+ "Fast completion",
601
+ ],
602
+ cons: [
603
+ "Partial downtime",
604
+ "Mixed versions during update",
605
+ "Rollback complexity",
606
+ ],
607
+ complexity: "low",
608
+ downtime: "minimal",
609
+ });
610
+ return strategies;
611
+ }
612
+ selectOptimalStrategy(strategies, requirements) {
613
+ // Score strategies based on requirements
614
+ const scored = strategies.map((strategy) => {
615
+ let score = 0;
616
+ // Availability scoring
617
+ if (requirements.availability === "critical" &&
618
+ strategy.downtime === "zero")
619
+ score += 30;
620
+ if (requirements.availability === "high" &&
621
+ strategy.downtime !== "planned")
622
+ score += 20;
623
+ if (requirements.availability === "basic")
624
+ score += 10;
625
+ // Scale scoring
626
+ if (requirements.scale === "enterprise" && strategy.complexity === "high")
627
+ score += 20;
628
+ if (requirements.scale === "large" && strategy.complexity !== "low")
629
+ score += 15;
630
+ // Budget scoring
631
+ if (requirements.budget === "cost-optimized" &&
632
+ strategy.cons.some((c) => c.includes("cost")))
633
+ score -= 20;
634
+ if (requirements.budget === "performance-optimized" &&
635
+ strategy.pros.some((p) => p.includes("performance")))
636
+ score += 15;
637
+ return { strategy, score };
638
+ });
639
+ const topScored = scored.sort((a, b) => b.score - a.score)[0];
640
+ return (topScored?.strategy || strategies[0]);
641
+ }
642
+ generateStrategyImplementation(strategy) {
643
+ const implementations = {
644
+ "blue-green": {
645
+ steps: [
646
+ "Set up two identical environments (Blue and Green)",
647
+ "Deploy new version to inactive environment",
648
+ "Run comprehensive tests on new environment",
649
+ "Switch traffic routing to new environment",
650
+ "Monitor for issues, rollback if needed",
651
+ "Clean up old environment after confirmation",
652
+ ],
653
+ tools: ["Kubernetes", "Istio", "Terraform", "Prometheus"],
654
+ metrics: [
655
+ "Zero deployment downtime",
656
+ "99.9%+ availability during deployment",
657
+ "< 5 minute rollback time",
658
+ "100% traffic migration success rate",
659
+ ],
660
+ },
661
+ canary: {
662
+ steps: [
663
+ "Deploy new version to canary group (1-5% of traffic)",
664
+ "Monitor key metrics and error rates",
665
+ "Gradually increase traffic to new version",
666
+ "Monitor for performance degradation",
667
+ "Complete rollout or rollback based on metrics",
668
+ "Clean up old version after stabilization",
669
+ ],
670
+ tools: ["Kubernetes", "Istio", "Prometheus", "Grafana"],
671
+ metrics: [
672
+ "Real-time monitoring during rollout",
673
+ "< 10% error rate increase threshold",
674
+ "Gradual traffic increase (10% increments)",
675
+ "Automated rollback on metric violations",
676
+ ],
677
+ },
678
+ rolling: {
679
+ steps: [
680
+ "Update instances in batches (typically 25-30%)",
681
+ "Wait for health checks after each batch",
682
+ "Continue with next batch if healthy",
683
+ "Complete rollout or rollback on failures",
684
+ "Verify all instances running new version",
685
+ ],
686
+ tools: ["Kubernetes", "Docker", "AWS ECS", "Health checks"],
687
+ metrics: [
688
+ "Minimal service degradation during updates",
689
+ "< 2 minute per-instance update time",
690
+ "Automated health checks after each batch",
691
+ "Load balancer maintains service availability",
692
+ ],
693
+ },
694
+ };
695
+ return (implementations[strategy.type] || {
696
+ steps: ["Implement deployment strategy"],
697
+ tools: ["Deployment tools"],
698
+ metrics: ["Deployment success rate"],
699
+ });
700
+ }
701
+ analyzeInfrastructureNeeds(services, environment) {
702
+ const recommendations = [];
703
+ if (services.includes("database")) {
704
+ if (environment === "production") {
705
+ recommendations.push({
706
+ platform: "aws",
707
+ service: "RDS PostgreSQL",
708
+ configuration: {
709
+ instanceClass: "db.r5.large",
710
+ multiAz: true,
711
+ backupRetention: 30,
712
+ },
713
+ scalingStrategy: "Read replicas for read-heavy workloads",
714
+ costEstimate: 300,
715
+ reliability: 99.9,
716
+ });
717
+ }
718
+ else {
719
+ recommendations.push({
720
+ platform: "aws",
721
+ service: "RDS PostgreSQL",
722
+ configuration: {
723
+ instanceClass: "db.t3.medium",
724
+ multiAz: false,
725
+ backupRetention: 7,
726
+ },
727
+ scalingStrategy: "Vertical scaling as needed",
728
+ costEstimate: 50,
729
+ reliability: 99.5,
730
+ });
731
+ }
732
+ }
733
+ if (services.includes("cache")) {
734
+ recommendations.push({
735
+ platform: "aws",
736
+ service: "ElastiCache Redis",
737
+ configuration: {
738
+ nodeType: "cache.t3.micro",
739
+ numNodes: 1,
740
+ clusterMode: false,
741
+ },
742
+ scalingStrategy: "Cluster mode for high availability",
743
+ costEstimate: 25,
744
+ reliability: 99.9,
745
+ });
746
+ }
747
+ if (services.includes("storage")) {
748
+ recommendations.push({
749
+ platform: "aws",
750
+ service: "S3",
751
+ configuration: {
752
+ storageClass: "STANDARD",
753
+ versioning: true,
754
+ encryption: "AES256",
755
+ },
756
+ scalingStrategy: "Intelligent tiering for cost optimization",
757
+ costEstimate: 5,
758
+ reliability: 99.999999999,
759
+ });
760
+ }
761
+ // Compute resources based on services
762
+ const computeNeeds = services.length;
763
+ recommendations.push({
764
+ platform: "aws",
765
+ service: "ECS Fargate",
766
+ configuration: {
767
+ cpu: `${computeNeeds * 256} CPU units`,
768
+ memory: `${computeNeeds * 512} MB`,
769
+ desiredCount: Math.max(2, computeNeeds),
770
+ },
771
+ scalingStrategy: "CPU utilization based auto-scaling (30-70%)",
772
+ costEstimate: computeNeeds * 50,
773
+ reliability: 99.9,
774
+ });
775
+ return recommendations;
776
+ }
777
+ generateInfrastructureAsCode(platform, recommendations, scaling) {
778
+ let code = "";
779
+ switch (platform) {
780
+ case "aws":
781
+ code = this.generateTerraformAWS(recommendations, scaling);
782
+ break;
783
+ case "kubernetes":
784
+ code = this.generateKubernetesYAML(recommendations, scaling);
785
+ break;
786
+ default:
787
+ code = `# Infrastructure code for ${platform}\n# Implementation depends on specific platform requirements`;
788
+ }
789
+ return {
790
+ code,
791
+ scaling: {
792
+ min: 2,
793
+ max: 10,
794
+ cpuThreshold: 70,
795
+ memoryThreshold: 80,
796
+ },
797
+ };
798
+ }
799
+ generateTerraformAWS(recommendations, scaling) {
800
+ let terraform = `# AWS Infrastructure as Code
801
+ terraform {
802
+ required_providers {
803
+ aws = {
804
+ source = "hashicorp/aws"
805
+ version = "~> 4.0"
806
+ }
807
+ }
808
+ }
809
+
810
+ # VPC Configuration
811
+ resource "aws_vpc" "main" {
812
+ cidr_block = "10.0.0.0/16"
813
+ enable_dns_support = true
814
+ enable_dns_hostnames = true
815
+ }
816
+
817
+ # Subnets
818
+ resource "aws_subnet" "public" {
819
+ vpc_id = aws_vpc.main.id
820
+ cidr_block = "10.0.1.0/24"
821
+ availability_zone = "us-east-1a"
822
+ }
823
+
824
+ # Security Groups
825
+ resource "aws_security_group" "web" {
826
+ name_prefix = "web-"
827
+ vpc_id = aws_vpc.main.id
828
+
829
+ ingress {
830
+ from_port = 80
831
+ to_port = 80
832
+ protocol = "tcp"
833
+ cidr_blocks = ["0.0.0.0/0"]
834
+ }
835
+
836
+ ingress {
837
+ from_port = 443
838
+ to_port = 443
839
+ protocol = "tcp"
840
+ cidr_blocks = ["0.0.0.0/0"]
841
+ }
842
+ }
843
+ `;
844
+ // Add service-specific resources
845
+ recommendations.forEach((rec) => {
846
+ switch (rec.service) {
847
+ case "ECS Fargate":
848
+ terraform += `
849
+ # ECS Cluster
850
+ resource "aws_ecs_cluster" "main" {
851
+ name = "main-cluster"
852
+ }
853
+
854
+ # ECS Task Definition
855
+ resource "aws_ecs_task_definition" "app" {
856
+ family = "app"
857
+ network_mode = "awsvpc"
858
+ requires_compatibilities = ["FARGATE"]
859
+ cpu = "${rec.configuration.cpu}"
860
+ memory = "${rec.configuration.memory}"
861
+
862
+ container_definitions = jsonencode([
863
+ {
864
+ name = "app"
865
+ image = "nginx:latest"
866
+ essential = true
867
+ }
868
+ ])
869
+ }
870
+
871
+ # ECS Service
872
+ resource "aws_ecs_service" "app" {
873
+ name = "app-service"
874
+ cluster = aws_ecs_cluster.main.id
875
+ task_definition = aws_ecs_task_definition.app.arn
876
+ desired_count = ${rec.configuration.desiredCount}
877
+ launch_type = "FARGATE"
878
+
879
+ network_configuration {
880
+ subnets = [aws_subnet.public.id]
881
+ security_groups = [aws_security_group.web.id]
882
+ }
883
+ }
884
+ `;
885
+ break;
886
+ }
887
+ });
888
+ return terraform;
889
+ }
890
+ generateKubernetesYAML(recommendations, scaling) {
891
+ return `apiVersion: apps/v1
892
+ kind: Deployment
893
+ metadata:
894
+ name: app-deployment
895
+ spec:
896
+ replicas: 3
897
+ selector:
898
+ matchLabels:
899
+ app: my-app
900
+ template:
901
+ metadata:
902
+ labels:
903
+ app: my-app
904
+ spec:
905
+ containers:
906
+ - name: app
907
+ image: nginx:latest
908
+ ports:
909
+ - containerPort: 80
910
+ resources:
911
+ requests:
912
+ cpu: 100m
913
+ memory: 128Mi
914
+ limits:
915
+ cpu: 500m
916
+ memory: 512Mi
917
+ ---
918
+ apiVersion: v1
919
+ kind: Service
920
+ metadata:
921
+ name: app-service
922
+ spec:
923
+ selector:
924
+ app: my-app
925
+ ports:
926
+ - port: 80
927
+ targetPort: 80
928
+ type: LoadBalancer
929
+ `;
930
+ }
931
+ generateMonitoringConfiguration(platform, services) {
932
+ return {
933
+ dashboards: [
934
+ "Application Performance Dashboard",
935
+ "Infrastructure Health Dashboard",
936
+ "Error Rate and Latency Dashboard",
937
+ "Resource Utilization Dashboard",
938
+ ],
939
+ alerts: [
940
+ "High CPU utilization (>80%)",
941
+ "Memory usage spikes",
942
+ "Error rate increase (>5%)",
943
+ "Response time degradation (>2s)",
944
+ ],
945
+ metrics: [
946
+ "CPU utilization",
947
+ "Memory usage",
948
+ "Network I/O",
949
+ "Disk I/O",
950
+ "Response times",
951
+ "Error rates",
952
+ "Request throughput",
953
+ ],
954
+ };
955
+ }
956
+ generateSecurityConfiguration(platform, environment) {
957
+ return {
958
+ policies: [
959
+ "Least privilege access control",
960
+ "Network segmentation and security groups",
961
+ "Encryption at rest and in transit",
962
+ "Regular security updates and patching",
963
+ "Intrusion detection and monitoring",
964
+ "Backup and disaster recovery procedures",
965
+ ],
966
+ tools: [
967
+ "AWS Config (for AWS)",
968
+ "Azure Policy (for Azure)",
969
+ "Security Command Center (for GCP)",
970
+ "Container security scanning",
971
+ "Secret management integration",
972
+ ],
973
+ compliance: environment === "production"
974
+ ? [
975
+ "SOC 2 Type II",
976
+ "ISO 27001",
977
+ "PCI DSS (if handling payments)",
978
+ "GDPR (if handling EU data)",
979
+ ]
980
+ : [],
981
+ };
982
+ }
983
+ analyzeDeploymentMetrics(metrics) {
984
+ return {
985
+ efficiency: this.calculateDeploymentEfficiency(metrics),
986
+ reliability: this.calculateDeploymentReliability(metrics),
987
+ speed: this.calculateDeploymentSpeed(metrics),
988
+ bottlenecks: this.identifyMetricBottlenecks(metrics),
989
+ };
990
+ }
991
+ identifyDeploymentBottlenecks(analysis, constraints) {
992
+ const bottlenecks = [];
993
+ if (analysis.speed.deployTime > 30) {
994
+ bottlenecks.push({
995
+ issue: "Slow deployment time",
996
+ impact: "high",
997
+ cause: "Large artifacts, sequential processes, or inefficient pipelines",
998
+ });
999
+ }
1000
+ if (analysis.reliability.failureRate > 0.1) {
1001
+ bottlenecks.push({
1002
+ issue: "High failure rate",
1003
+ impact: "critical",
1004
+ cause: "Unstable tests, environment issues, or poor error handling",
1005
+ });
1006
+ }
1007
+ if (analysis.speed.rollbackTime > 10) {
1008
+ bottlenecks.push({
1009
+ issue: "Slow rollback capability",
1010
+ impact: "high",
1011
+ cause: "Lack of automated rollback scripts or backup strategies",
1012
+ });
1013
+ }
1014
+ if (constraints.maxDowntime &&
1015
+ analysis.speed.deployTime > constraints.maxDowntime) {
1016
+ bottlenecks.push({
1017
+ issue: "Deployment exceeds downtime constraints",
1018
+ impact: "critical",
1019
+ cause: "Deployment strategy incompatible with availability requirements",
1020
+ });
1021
+ }
1022
+ return bottlenecks;
1023
+ }
1024
+ generateDeploymentOptimizations(bottlenecks, constraints) {
1025
+ const optimizations = [];
1026
+ bottlenecks.forEach((bottleneck) => {
1027
+ switch (bottleneck.issue) {
1028
+ case "Slow deployment time":
1029
+ optimizations.push({
1030
+ title: "Implement artifact caching and parallel processing",
1031
+ effort: "medium",
1032
+ impact: "high",
1033
+ description: "Cache dependencies and run independent stages in parallel",
1034
+ });
1035
+ break;
1036
+ case "High failure rate":
1037
+ optimizations.push({
1038
+ title: "Add comprehensive testing and health checks",
1039
+ effort: "high",
1040
+ impact: "high",
1041
+ description: "Implement smoke tests, contract tests, and environment validation",
1042
+ });
1043
+ break;
1044
+ case "Slow rollback capability":
1045
+ optimizations.push({
1046
+ title: "Implement automated rollback mechanisms",
1047
+ effort: "medium",
1048
+ impact: "high",
1049
+ description: "Create rollback scripts and backup strategies for instant recovery",
1050
+ });
1051
+ break;
1052
+ }
1053
+ });
1054
+ return optimizations;
1055
+ }
1056
+ createOptimizationRoadmap(optimizations, constraints) {
1057
+ const phases = [];
1058
+ let currentWeek = 0;
1059
+ // Phase 1: Quick wins
1060
+ const quickWins = optimizations.filter((o) => o.effort === "low" || o.effort === "medium");
1061
+ if (quickWins.length > 0) {
1062
+ phases.push({
1063
+ name: "Quick Wins",
1064
+ duration: 2,
1065
+ optimizations: quickWins,
1066
+ focus: "Implement high-impact, low-effort optimizations",
1067
+ });
1068
+ currentWeek += 2;
1069
+ }
1070
+ // Phase 2: Infrastructure improvements
1071
+ const infraOpts = optimizations.filter((o) => o.title.includes("infrastructure") || o.title.includes("rollback"));
1072
+ if (infraOpts.length > 0) {
1073
+ phases.push({
1074
+ name: "Infrastructure Automation",
1075
+ duration: 3,
1076
+ optimizations: infraOpts,
1077
+ focus: "Automate deployment and rollback processes",
1078
+ });
1079
+ currentWeek += 3;
1080
+ }
1081
+ // Phase 3: Testing and quality
1082
+ const qualityOpts = optimizations.filter((o) => o.title.includes("testing") || o.title.includes("health"));
1083
+ if (qualityOpts.length > 0) {
1084
+ phases.push({
1085
+ name: "Quality Assurance",
1086
+ duration: 4,
1087
+ optimizations: qualityOpts,
1088
+ focus: "Improve testing and monitoring capabilities",
1089
+ });
1090
+ currentWeek += 4;
1091
+ }
1092
+ return {
1093
+ phases,
1094
+ totalDuration: currentWeek,
1095
+ finalMetrics: {
1096
+ deployTime: constraints.currentMetrics?.deployTime * 0.6 || 10,
1097
+ failureRate: constraints.currentMetrics?.failureRate * 0.3 || 0.02,
1098
+ rollbackTime: Math.min(constraints.currentMetrics?.rollbackTime * 0.2 || 2, 5),
1099
+ },
1100
+ };
1101
+ }
1102
+ calculateDeploymentEfficiency(metrics) {
1103
+ // Efficiency based on resource utilization and process optimization
1104
+ let efficiency = 100;
1105
+ if (metrics.deployTime > 20)
1106
+ efficiency -= 20;
1107
+ if (metrics.failureRate > 0.05)
1108
+ efficiency -= 15;
1109
+ if (metrics.rollbackTime > 5)
1110
+ efficiency -= 10;
1111
+ return Math.max(0, efficiency);
1112
+ }
1113
+ calculateDeploymentReliability(metrics) {
1114
+ return Math.max(0, 100 - metrics.failureRate * 100);
1115
+ }
1116
+ calculateDeploymentSpeed(metrics) {
1117
+ return {
1118
+ deployTime: metrics.deployTime || 0,
1119
+ rollbackTime: metrics.rollbackTime || 0,
1120
+ efficiency: this.calculateDeploymentEfficiency(metrics),
1121
+ };
1122
+ }
1123
+ identifyMetricBottlenecks(metrics) {
1124
+ const bottlenecks = [];
1125
+ if (metrics.deployTime > 15)
1126
+ bottlenecks.push("deployment-speed");
1127
+ if (metrics.failureRate > 0.05)
1128
+ bottlenecks.push("reliability");
1129
+ if (metrics.rollbackTime > 3)
1130
+ bottlenecks.push("rollback-speed");
1131
+ return bottlenecks;
1132
+ }
1133
+ calculateDependencyComplexity(stages) {
1134
+ return stages.reduce((complexity, stage) => complexity + stage.dependencies.length, 0);
1135
+ }
1136
+ analyzeStageDistribution(stages) {
1137
+ const types = stages.reduce((acc, stage) => {
1138
+ acc[stage.type] = (acc[stage.type] || 0) + 1;
1139
+ return acc;
1140
+ }, {});
1141
+ return types;
1142
+ }
1143
+ identifyPipelineOptimizations(pipeline) {
1144
+ const optimizations = [];
1145
+ const parallelizableCount = pipeline.stages.filter((s) => s.parallelizable).length;
1146
+ if (parallelizableCount < pipeline.stages.length * 0.5) {
1147
+ optimizations.push("Increase parallelization of independent stages");
1148
+ }
1149
+ if (pipeline.totalDuration > 20) {
1150
+ optimizations.push("Implement artifact caching to reduce build times");
1151
+ }
1152
+ return optimizations;
1153
+ }
1154
+ getInfrastructureLanguage(platform) {
1155
+ switch (platform) {
1156
+ case "aws":
1157
+ case "azure":
1158
+ case "gcp":
1159
+ return "hcl";
1160
+ case "kubernetes":
1161
+ return "yaml";
1162
+ default:
1163
+ return "json";
1164
+ }
1165
+ }
1166
+ async run() {
1167
+ const transport = new StdioServerTransport();
1168
+ await this.server.connect(transport);
1169
+ console.log("StrRay DevOps Deployment MCP Server running...");
1170
+ }
1171
+ }
1172
+ // Run the server if this file is executed directly
1173
+ if (import.meta.url === `file://${process.argv[1]}`) {
1174
+ const server = new StrRayDevOpsDeploymentServer();
1175
+ server.run().catch(console.error);
1176
+ }
1177
+ export { StrRayDevOpsDeploymentServer };
1178
+ //# sourceMappingURL=devops-deployment.server.js.map