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.
- package/.mcp.json +68 -0
- package/LICENSE +21 -0
- package/README.md +618 -0
- package/dist/agents/architect.d.ts +3 -0
- package/dist/agents/architect.d.ts.map +1 -0
- package/dist/agents/architect.js +84 -0
- package/dist/agents/architect.js.map +1 -0
- package/dist/agents/bug-triage-specialist.d.ts +3 -0
- package/dist/agents/bug-triage-specialist.d.ts.map +1 -0
- package/dist/agents/bug-triage-specialist.js +66 -0
- package/dist/agents/bug-triage-specialist.js.map +1 -0
- package/dist/agents/code-reviewer.d.ts +3 -0
- package/dist/agents/code-reviewer.d.ts.map +1 -0
- package/dist/agents/code-reviewer.js +66 -0
- package/dist/agents/code-reviewer.js.map +1 -0
- package/dist/agents/enforcer.d.ts +3 -0
- package/dist/agents/enforcer.d.ts.map +1 -0
- package/dist/agents/enforcer.js +109 -0
- package/dist/agents/enforcer.js.map +1 -0
- package/dist/agents/index.d.ts +15 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +26 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/librarian.d.ts +3 -0
- package/dist/agents/librarian.d.ts.map +1 -0
- package/dist/agents/librarian.js +70 -0
- package/dist/agents/librarian.js.map +1 -0
- package/dist/agents/log-monitor.d.ts +3 -0
- package/dist/agents/log-monitor.d.ts.map +1 -0
- package/dist/agents/log-monitor.js +102 -0
- package/dist/agents/log-monitor.js.map +1 -0
- package/dist/agents/orchestrator.d.ts +3 -0
- package/dist/agents/orchestrator.d.ts.map +1 -0
- package/dist/agents/orchestrator.js +85 -0
- package/dist/agents/orchestrator.js.map +1 -0
- package/dist/agents/refactorer.d.ts +3 -0
- package/dist/agents/refactorer.d.ts.map +1 -0
- package/dist/agents/refactorer.js +67 -0
- package/dist/agents/refactorer.js.map +1 -0
- package/dist/agents/security-auditor.d.ts +3 -0
- package/dist/agents/security-auditor.d.ts.map +1 -0
- package/dist/agents/security-auditor.js +66 -0
- package/dist/agents/security-auditor.js.map +1 -0
- package/dist/agents/sisyphus.d.ts +3 -0
- package/dist/agents/sisyphus.d.ts.map +1 -0
- package/dist/agents/sisyphus.js +53 -0
- package/dist/agents/sisyphus.js.map +1 -0
- package/dist/agents/test-architect.d.ts +3 -0
- package/dist/agents/test-architect.d.ts.map +1 -0
- package/dist/agents/test-architect.js +81 -0
- package/dist/agents/test-architect.js.map +1 -0
- package/dist/agents/types.d.ts +29 -0
- package/dist/agents/types.d.ts.map +1 -0
- package/dist/agents/types.js +2 -0
- package/dist/agents/types.js.map +1 -0
- package/dist/mcps/architect-tools.server.d.ts +40 -0
- package/dist/mcps/architect-tools.server.d.ts.map +1 -0
- package/dist/mcps/architect-tools.server.js +563 -0
- package/dist/mcps/architect-tools.server.js.map +1 -0
- package/dist/mcps/auto-format.server.d.ts +20 -0
- package/dist/mcps/auto-format.server.d.ts.map +1 -0
- package/dist/mcps/auto-format.server.js +391 -0
- package/dist/mcps/auto-format.server.js.map +1 -0
- package/dist/mcps/boot-orchestrator.server.d.ts +50 -0
- package/dist/mcps/boot-orchestrator.server.d.ts.map +1 -0
- package/dist/mcps/boot-orchestrator.server.js +871 -0
- package/dist/mcps/boot-orchestrator.server.js.map +1 -0
- package/dist/mcps/enforcer-tools.server.d.ts +26 -0
- package/dist/mcps/enforcer-tools.server.d.ts.map +1 -0
- package/dist/mcps/enforcer-tools.server.js +627 -0
- package/dist/mcps/enforcer-tools.server.js.map +1 -0
- package/dist/mcps/enhanced-orchestrator.server.d.ts +14 -0
- package/dist/mcps/enhanced-orchestrator.server.d.ts.map +1 -0
- package/dist/mcps/enhanced-orchestrator.server.js +250 -0
- package/dist/mcps/enhanced-orchestrator.server.js.map +1 -0
- package/dist/mcps/framework-compliance-audit.server.d.ts +23 -0
- package/dist/mcps/framework-compliance-audit.server.d.ts.map +1 -0
- package/dist/mcps/framework-compliance-audit.server.js +511 -0
- package/dist/mcps/framework-compliance-audit.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/api-design.server.d.ts +16 -0
- package/dist/mcps/knowledge-skills/api-design.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/api-design.server.js +120 -0
- package/dist/mcps/knowledge-skills/api-design.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts +16 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js +110 -0
- package/dist/mcps/knowledge-skills/architecture-patterns.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/code-review.server.d.ts +32 -0
- package/dist/mcps/knowledge-skills/code-review.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/code-review.server.js +777 -0
- package/dist/mcps/knowledge-skills/code-review.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/database-design.server.d.ts +44 -0
- package/dist/mcps/knowledge-skills/database-design.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/database-design.server.js +818 -0
- package/dist/mcps/knowledge-skills/database-design.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts +44 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.js +1178 -0
- package/dist/mcps/knowledge-skills/devops-deployment.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/documentation-generation.server.d.ts +48 -0
- package/dist/mcps/knowledge-skills/documentation-generation.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/documentation-generation.server.js +1188 -0
- package/dist/mcps/knowledge-skills/documentation-generation.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.d.ts +16 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.js +112 -0
- package/dist/mcps/knowledge-skills/git-workflow.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts +16 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.js +108 -0
- package/dist/mcps/knowledge-skills/performance-optimization.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.d.ts +34 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.js +710 -0
- package/dist/mcps/knowledge-skills/project-analysis.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts +34 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js +794 -0
- package/dist/mcps/knowledge-skills/refactoring-strategies.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/security-audit.server.d.ts +34 -0
- package/dist/mcps/knowledge-skills/security-audit.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/security-audit.server.js +769 -0
- package/dist/mcps/knowledge-skills/security-audit.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts +37 -0
- package/dist/mcps/knowledge-skills/testing-best-practices.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js +865 -0
- package/dist/mcps/knowledge-skills/testing-best-practices.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts +47 -0
- package/dist/mcps/knowledge-skills/testing-strategy.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/testing-strategy.server.js +672 -0
- package/dist/mcps/knowledge-skills/testing-strategy.server.js.map +1 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts +42 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.d.ts.map +1 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js +1016 -0
- package/dist/mcps/knowledge-skills/ui-ux-design.server.js.map +1 -0
- package/dist/mcps/lint.server.d.ts +18 -0
- package/dist/mcps/lint.server.d.ts.map +1 -0
- package/dist/mcps/lint.server.js +334 -0
- package/dist/mcps/lint.server.js.map +1 -0
- package/dist/mcps/model-health-check.server.d.ts +17 -0
- package/dist/mcps/model-health-check.server.d.ts.map +1 -0
- package/dist/mcps/model-health-check.server.js +226 -0
- package/dist/mcps/model-health-check.server.js.map +1 -0
- package/dist/mcps/orchestrator.server.d.ts +39 -0
- package/dist/mcps/orchestrator.server.d.ts.map +1 -0
- package/dist/mcps/orchestrator.server.js +908 -0
- package/dist/mcps/orchestrator.server.js.map +1 -0
- package/dist/mcps/performance-analysis.server.d.ts +28 -0
- package/dist/mcps/performance-analysis.server.d.ts.map +1 -0
- package/dist/mcps/performance-analysis.server.js +514 -0
- package/dist/mcps/performance-analysis.server.js.map +1 -0
- package/dist/mcps/processor-pipeline.server.d.ts +29 -0
- package/dist/mcps/processor-pipeline.server.d.ts.map +1 -0
- package/dist/mcps/processor-pipeline.server.js +520 -0
- package/dist/mcps/processor-pipeline.server.js.map +1 -0
- package/dist/mcps/security-scan.server.d.ts +20 -0
- package/dist/mcps/security-scan.server.d.ts.map +1 -0
- package/dist/mcps/security-scan.server.js +404 -0
- package/dist/mcps/security-scan.server.js.map +1 -0
- package/dist/mcps/state-manager.server.d.ts +29 -0
- package/dist/mcps/state-manager.server.d.ts.map +1 -0
- package/dist/mcps/state-manager.server.js +620 -0
- package/dist/mcps/state-manager.server.js.map +1 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.d.ts +109 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.d.ts.map +1 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js +337 -0
- package/dist/orchestrator/enhanced-multi-agent-orchestrator.js.map +1 -0
- package/dist/orchestrator/intelligent-commit-batcher.d.ts +112 -0
- package/dist/orchestrator/intelligent-commit-batcher.d.ts.map +1 -0
- package/dist/orchestrator/intelligent-commit-batcher.js +330 -0
- package/dist/orchestrator/intelligent-commit-batcher.js.map +1 -0
- package/dist/plugin/agents/architect.d.ts +3 -0
- package/dist/plugin/agents/architect.d.ts.map +1 -0
- package/dist/plugin/agents/architect.js +84 -0
- package/dist/plugin/agents/architect.js.map +1 -0
- package/dist/plugin/agents/bug-triage-specialist.d.ts +3 -0
- package/dist/plugin/agents/bug-triage-specialist.d.ts.map +1 -0
- package/dist/plugin/agents/bug-triage-specialist.js +66 -0
- package/dist/plugin/agents/bug-triage-specialist.js.map +1 -0
- package/dist/plugin/agents/code-reviewer.d.ts +3 -0
- package/dist/plugin/agents/code-reviewer.d.ts.map +1 -0
- package/dist/plugin/agents/code-reviewer.js +66 -0
- package/dist/plugin/agents/code-reviewer.js.map +1 -0
- package/dist/plugin/agents/enforcer.d.ts +3 -0
- package/dist/plugin/agents/enforcer.d.ts.map +1 -0
- package/dist/plugin/agents/enforcer.js +109 -0
- package/dist/plugin/agents/enforcer.js.map +1 -0
- package/dist/plugin/agents/index.d.ts +15 -0
- package/dist/plugin/agents/index.d.ts.map +1 -0
- package/dist/plugin/agents/index.js +26 -0
- package/dist/plugin/agents/index.js.map +1 -0
- package/dist/plugin/agents/librarian.d.ts +3 -0
- package/dist/plugin/agents/librarian.d.ts.map +1 -0
- package/dist/plugin/agents/librarian.js +70 -0
- package/dist/plugin/agents/librarian.js.map +1 -0
- package/dist/plugin/agents/log-monitor.d.ts +3 -0
- package/dist/plugin/agents/log-monitor.d.ts.map +1 -0
- package/dist/plugin/agents/log-monitor.js +102 -0
- package/dist/plugin/agents/log-monitor.js.map +1 -0
- package/dist/plugin/agents/orchestrator.d.ts +3 -0
- package/dist/plugin/agents/orchestrator.d.ts.map +1 -0
- package/dist/plugin/agents/orchestrator.js +85 -0
- package/dist/plugin/agents/orchestrator.js.map +1 -0
- package/dist/plugin/agents/refactorer.d.ts +3 -0
- package/dist/plugin/agents/refactorer.d.ts.map +1 -0
- package/dist/plugin/agents/refactorer.js +67 -0
- package/dist/plugin/agents/refactorer.js.map +1 -0
- package/dist/plugin/agents/security-auditor.d.ts +3 -0
- package/dist/plugin/agents/security-auditor.d.ts.map +1 -0
- package/dist/plugin/agents/security-auditor.js +66 -0
- package/dist/plugin/agents/security-auditor.js.map +1 -0
- package/dist/plugin/agents/sisyphus.d.ts +3 -0
- package/dist/plugin/agents/sisyphus.d.ts.map +1 -0
- package/dist/plugin/agents/sisyphus.js +53 -0
- package/dist/plugin/agents/sisyphus.js.map +1 -0
- package/dist/plugin/agents/test-architect.d.ts +3 -0
- package/dist/plugin/agents/test-architect.d.ts.map +1 -0
- package/dist/plugin/agents/test-architect.js +81 -0
- package/dist/plugin/agents/test-architect.js.map +1 -0
- package/dist/plugin/agents/types.d.ts +29 -0
- package/dist/plugin/agents/types.d.ts.map +1 -0
- package/dist/plugin/agents/types.js +2 -0
- package/dist/plugin/agents/types.js.map +1 -0
- package/dist/plugin/config-loader.d.ts +67 -0
- package/dist/plugin/config-loader.d.ts.map +1 -0
- package/dist/plugin/config-loader.js +125 -0
- package/dist/plugin/config-loader.js.map +1 -0
- package/dist/plugin/context-loader.d.ts +122 -0
- package/dist/plugin/context-loader.d.ts.map +1 -0
- package/dist/plugin/context-loader.js +273 -0
- package/dist/plugin/context-loader.js.map +1 -0
- package/dist/plugin/delegation/agent-delegator.d.ts +217 -0
- package/dist/plugin/delegation/agent-delegator.d.ts.map +1 -0
- package/dist/plugin/delegation/agent-delegator.js +928 -0
- package/dist/plugin/delegation/agent-delegator.js.map +1 -0
- package/dist/plugin/delegation/codebase-context-analyzer.d.ts +157 -0
- package/dist/plugin/delegation/codebase-context-analyzer.d.ts.map +1 -0
- package/dist/plugin/delegation/codebase-context-analyzer.js +1029 -0
- package/dist/plugin/delegation/codebase-context-analyzer.js.map +1 -0
- package/dist/plugin/delegation/complexity-analyzer.d.ts +61 -0
- package/dist/plugin/delegation/complexity-analyzer.d.ts.map +1 -0
- package/dist/plugin/delegation/complexity-analyzer.js +253 -0
- package/dist/plugin/delegation/complexity-analyzer.js.map +1 -0
- package/dist/plugin/enforcement/enforcer-tools.d.ts +62 -0
- package/dist/plugin/enforcement/enforcer-tools.d.ts.map +1 -0
- package/dist/plugin/enforcement/enforcer-tools.js +407 -0
- package/dist/plugin/enforcement/enforcer-tools.js.map +1 -0
- package/dist/plugin/enforcement/rule-enforcer.d.ts +171 -0
- package/dist/plugin/enforcement/rule-enforcer.d.ts.map +1 -0
- package/dist/plugin/enforcement/rule-enforcer.js +1342 -0
- package/dist/plugin/enforcement/rule-enforcer.js.map +1 -0
- package/dist/plugin/enforcement/test-auto-healing.d.ts +78 -0
- package/dist/plugin/enforcement/test-auto-healing.d.ts.map +1 -0
- package/dist/plugin/enforcement/test-auto-healing.js +318 -0
- package/dist/plugin/enforcement/test-auto-healing.js.map +1 -0
- package/dist/plugin/framework-logger.d.ts +20 -0
- package/dist/plugin/framework-logger.d.ts.map +1 -0
- package/dist/plugin/framework-logger.js +79 -0
- package/dist/plugin/framework-logger.js.map +1 -0
- package/dist/plugin/logging-config.d.ts +11 -0
- package/dist/plugin/logging-config.d.ts.map +1 -0
- package/dist/plugin/logging-config.js +44 -0
- package/dist/plugin/logging-config.js.map +1 -0
- package/dist/plugin/mcps/architect-tools.server.d.ts +40 -0
- package/dist/plugin/mcps/architect-tools.server.d.ts.map +1 -0
- package/dist/plugin/mcps/architect-tools.server.js +563 -0
- package/dist/plugin/mcps/architect-tools.server.js.map +1 -0
- package/dist/plugin/mcps/auto-format.server.d.ts +20 -0
- package/dist/plugin/mcps/auto-format.server.d.ts.map +1 -0
- package/dist/plugin/mcps/auto-format.server.js +391 -0
- package/dist/plugin/mcps/auto-format.server.js.map +1 -0
- package/dist/plugin/mcps/boot-orchestrator.server.d.ts +50 -0
- package/dist/plugin/mcps/boot-orchestrator.server.d.ts.map +1 -0
- package/dist/plugin/mcps/boot-orchestrator.server.js +871 -0
- package/dist/plugin/mcps/boot-orchestrator.server.js.map +1 -0
- package/dist/plugin/mcps/enforcer-tools.server.d.ts +26 -0
- package/dist/plugin/mcps/enforcer-tools.server.d.ts.map +1 -0
- package/dist/plugin/mcps/enforcer-tools.server.js +627 -0
- package/dist/plugin/mcps/enforcer-tools.server.js.map +1 -0
- package/dist/plugin/mcps/enhanced-orchestrator.server.d.ts +14 -0
- package/dist/plugin/mcps/enhanced-orchestrator.server.d.ts.map +1 -0
- package/dist/plugin/mcps/enhanced-orchestrator.server.js +250 -0
- package/dist/plugin/mcps/enhanced-orchestrator.server.js.map +1 -0
- package/dist/plugin/mcps/framework-compliance-audit.server.d.ts +23 -0
- package/dist/plugin/mcps/framework-compliance-audit.server.d.ts.map +1 -0
- package/dist/plugin/mcps/framework-compliance-audit.server.js +511 -0
- package/dist/plugin/mcps/framework-compliance-audit.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/api-design.server.d.ts +16 -0
- package/dist/plugin/mcps/knowledge-skills/api-design.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/api-design.server.js +120 -0
- package/dist/plugin/mcps/knowledge-skills/api-design.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/architecture-patterns.server.d.ts +16 -0
- package/dist/plugin/mcps/knowledge-skills/architecture-patterns.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/architecture-patterns.server.js +110 -0
- package/dist/plugin/mcps/knowledge-skills/architecture-patterns.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/code-review.server.d.ts +32 -0
- package/dist/plugin/mcps/knowledge-skills/code-review.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/code-review.server.js +777 -0
- package/dist/plugin/mcps/knowledge-skills/code-review.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/database-design.server.d.ts +44 -0
- package/dist/plugin/mcps/knowledge-skills/database-design.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/database-design.server.js +818 -0
- package/dist/plugin/mcps/knowledge-skills/database-design.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/devops-deployment.server.d.ts +44 -0
- package/dist/plugin/mcps/knowledge-skills/devops-deployment.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/devops-deployment.server.js +1178 -0
- package/dist/plugin/mcps/knowledge-skills/devops-deployment.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/documentation-generation.server.d.ts +48 -0
- package/dist/plugin/mcps/knowledge-skills/documentation-generation.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/documentation-generation.server.js +1188 -0
- package/dist/plugin/mcps/knowledge-skills/documentation-generation.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/git-workflow.server.d.ts +16 -0
- package/dist/plugin/mcps/knowledge-skills/git-workflow.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/git-workflow.server.js +112 -0
- package/dist/plugin/mcps/knowledge-skills/git-workflow.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/performance-optimization.server.d.ts +16 -0
- package/dist/plugin/mcps/knowledge-skills/performance-optimization.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/performance-optimization.server.js +108 -0
- package/dist/plugin/mcps/knowledge-skills/performance-optimization.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/project-analysis.server.d.ts +34 -0
- package/dist/plugin/mcps/knowledge-skills/project-analysis.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/project-analysis.server.js +710 -0
- package/dist/plugin/mcps/knowledge-skills/project-analysis.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/refactoring-strategies.server.d.ts +34 -0
- package/dist/plugin/mcps/knowledge-skills/refactoring-strategies.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/refactoring-strategies.server.js +794 -0
- package/dist/plugin/mcps/knowledge-skills/refactoring-strategies.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/security-audit.server.d.ts +34 -0
- package/dist/plugin/mcps/knowledge-skills/security-audit.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/security-audit.server.js +769 -0
- package/dist/plugin/mcps/knowledge-skills/security-audit.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/testing-best-practices.server.d.ts +37 -0
- package/dist/plugin/mcps/knowledge-skills/testing-best-practices.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/testing-best-practices.server.js +865 -0
- package/dist/plugin/mcps/knowledge-skills/testing-best-practices.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/testing-strategy.server.d.ts +47 -0
- package/dist/plugin/mcps/knowledge-skills/testing-strategy.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/testing-strategy.server.js +672 -0
- package/dist/plugin/mcps/knowledge-skills/testing-strategy.server.js.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/ui-ux-design.server.d.ts +42 -0
- package/dist/plugin/mcps/knowledge-skills/ui-ux-design.server.d.ts.map +1 -0
- package/dist/plugin/mcps/knowledge-skills/ui-ux-design.server.js +1016 -0
- package/dist/plugin/mcps/knowledge-skills/ui-ux-design.server.js.map +1 -0
- package/dist/plugin/mcps/lint.server.d.ts +18 -0
- package/dist/plugin/mcps/lint.server.d.ts.map +1 -0
- package/dist/plugin/mcps/lint.server.js +334 -0
- package/dist/plugin/mcps/lint.server.js.map +1 -0
- package/dist/plugin/mcps/model-health-check.server.d.ts +17 -0
- package/dist/plugin/mcps/model-health-check.server.d.ts.map +1 -0
- package/dist/plugin/mcps/model-health-check.server.js +226 -0
- package/dist/plugin/mcps/model-health-check.server.js.map +1 -0
- package/dist/plugin/mcps/orchestrator.server.d.ts +39 -0
- package/dist/plugin/mcps/orchestrator.server.d.ts.map +1 -0
- package/dist/plugin/mcps/orchestrator.server.js +908 -0
- package/dist/plugin/mcps/orchestrator.server.js.map +1 -0
- package/dist/plugin/mcps/performance-analysis.server.d.ts +28 -0
- package/dist/plugin/mcps/performance-analysis.server.d.ts.map +1 -0
- package/dist/plugin/mcps/performance-analysis.server.js +514 -0
- package/dist/plugin/mcps/performance-analysis.server.js.map +1 -0
- package/dist/plugin/mcps/processor-pipeline.server.d.ts +29 -0
- package/dist/plugin/mcps/processor-pipeline.server.d.ts.map +1 -0
- package/dist/plugin/mcps/processor-pipeline.server.js +520 -0
- package/dist/plugin/mcps/processor-pipeline.server.js.map +1 -0
- package/dist/plugin/mcps/security-scan.server.d.ts +20 -0
- package/dist/plugin/mcps/security-scan.server.d.ts.map +1 -0
- package/dist/plugin/mcps/security-scan.server.js +404 -0
- package/dist/plugin/mcps/security-scan.server.js.map +1 -0
- package/dist/plugin/mcps/state-manager.server.d.ts +29 -0
- package/dist/plugin/mcps/state-manager.server.d.ts.map +1 -0
- package/dist/plugin/mcps/state-manager.server.js +620 -0
- package/dist/plugin/mcps/state-manager.server.js.map +1 -0
- package/dist/plugin/monitoring/advanced-profiler.d.ts +48 -0
- package/dist/plugin/monitoring/advanced-profiler.d.ts.map +1 -0
- package/dist/plugin/monitoring/advanced-profiler.js +216 -0
- package/dist/plugin/monitoring/advanced-profiler.js.map +1 -0
- package/dist/plugin/monitoring/enterprise-monitoring-system.d.ts +331 -0
- package/dist/plugin/monitoring/enterprise-monitoring-system.d.ts.map +1 -0
- package/dist/plugin/monitoring/enterprise-monitoring-system.js +797 -0
- package/dist/plugin/monitoring/enterprise-monitoring-system.js.map +1 -0
- package/dist/plugin/orchestrator/enhanced-multi-agent-orchestrator.d.ts +111 -0
- package/dist/plugin/orchestrator/enhanced-multi-agent-orchestrator.d.ts.map +1 -0
- package/dist/plugin/orchestrator/enhanced-multi-agent-orchestrator.js +339 -0
- package/dist/plugin/orchestrator/enhanced-multi-agent-orchestrator.js.map +1 -0
- package/dist/plugin/orchestrator/intelligent-commit-batcher.d.ts +112 -0
- package/dist/plugin/orchestrator/intelligent-commit-batcher.d.ts.map +1 -0
- package/dist/plugin/orchestrator/intelligent-commit-batcher.js +330 -0
- package/dist/plugin/orchestrator/intelligent-commit-batcher.js.map +1 -0
- package/dist/plugin/orchestrator.d.ts +91 -0
- package/dist/plugin/orchestrator.d.ts.map +1 -0
- package/dist/plugin/orchestrator.js +444 -0
- package/dist/plugin/orchestrator.js.map +1 -0
- package/dist/plugin/plugins/marketplace/marketplace-service.d.ts +108 -0
- package/dist/plugin/plugins/marketplace/marketplace-service.d.ts.map +1 -0
- package/dist/plugin/plugins/marketplace/marketplace-service.js +620 -0
- package/dist/plugin/plugins/marketplace/marketplace-service.js.map +1 -0
- package/dist/plugin/plugins/marketplace/marketplace-types.d.ts +468 -0
- package/dist/plugin/plugins/marketplace/marketplace-types.d.ts.map +1 -0
- package/dist/plugin/plugins/marketplace/marketplace-types.js +11 -0
- package/dist/plugin/plugins/marketplace/marketplace-types.js.map +1 -0
- package/dist/plugin/plugins/plugin-system.d.ts +152 -0
- package/dist/plugin/plugins/plugin-system.d.ts.map +1 -0
- package/dist/plugin/plugins/plugin-system.js +405 -0
- package/dist/plugin/plugins/plugin-system.js.map +1 -0
- package/dist/plugin/plugins/stringray-codex-injection.d.ts +68 -0
- package/dist/plugin/plugins/stringray-codex-injection.d.ts.map +1 -0
- package/dist/plugin/plugins/stringray-codex-injection.js +225 -0
- package/dist/plugin/plugins/stringray-codex-injection.js.map +1 -0
- package/dist/plugin/plugins/strray-codex-injection.d.ts +68 -0
- package/dist/plugin/plugins/strray-codex-injection.d.ts.map +1 -0
- package/dist/plugin/plugins/strray-codex-injection.js +225 -0
- package/dist/plugin/plugins/strray-codex-injection.js.map +1 -0
- package/dist/plugin/processors/index.d.ts +12 -0
- package/dist/plugin/processors/index.d.ts.map +1 -0
- package/dist/plugin/processors/index.js +12 -0
- package/dist/plugin/processors/index.js.map +1 -0
- package/dist/plugin/processors/processor-manager.d.ts +113 -0
- package/dist/plugin/processors/processor-manager.d.ts.map +1 -0
- package/dist/plugin/processors/processor-manager.js +498 -0
- package/dist/plugin/processors/processor-manager.js.map +1 -0
- package/dist/plugin/processors/processor-types.d.ts +50 -0
- package/dist/plugin/processors/processor-types.d.ts.map +1 -0
- package/dist/plugin/processors/processor-types.js +10 -0
- package/dist/plugin/processors/processor-types.js.map +1 -0
- package/dist/plugin/processors/refactoring-logging-processor.d.ts +61 -0
- package/dist/plugin/processors/refactoring-logging-processor.d.ts.map +1 -0
- package/dist/plugin/processors/refactoring-logging-processor.js +257 -0
- package/dist/plugin/processors/refactoring-logging-processor.js.map +1 -0
- package/dist/plugin/reporting/framework-reporting-system.d.ts +157 -0
- package/dist/plugin/reporting/framework-reporting-system.d.ts.map +1 -0
- package/dist/plugin/reporting/framework-reporting-system.js +783 -0
- package/dist/plugin/reporting/framework-reporting-system.js.map +1 -0
- package/dist/plugin/security/security-hardening-system.d.ts +220 -0
- package/dist/plugin/security/security-hardening-system.d.ts.map +1 -0
- package/dist/plugin/security/security-hardening-system.js +605 -0
- package/dist/plugin/security/security-hardening-system.js.map +1 -0
- package/dist/plugin/state/context-providers.d.ts +5 -0
- package/dist/plugin/state/context-providers.d.ts.map +1 -0
- package/dist/plugin/state/context-providers.js +2 -0
- package/dist/plugin/state/context-providers.js.map +1 -0
- package/dist/plugin/state/index.d.ts +5 -0
- package/dist/plugin/state/index.d.ts.map +1 -0
- package/dist/plugin/state/index.js +8 -0
- package/dist/plugin/state/index.js.map +1 -0
- package/dist/plugin/state/state-manager.d.ts +29 -0
- package/dist/plugin/state/state-manager.d.ts.map +1 -0
- package/dist/plugin/state/state-manager.js +153 -0
- package/dist/plugin/state/state-manager.js.map +1 -0
- package/dist/plugin/state/state-types.d.ts +6 -0
- package/dist/plugin/state/state-types.d.ts.map +1 -0
- package/dist/plugin/state/state-types.js +2 -0
- package/dist/plugin/state/state-types.js.map +1 -0
- package/dist/plugin/utils/codex-parser.d.ts +62 -0
- package/dist/plugin/utils/codex-parser.d.ts.map +1 -0
- package/dist/plugin/utils/codex-parser.js +396 -0
- package/dist/plugin/utils/codex-parser.js.map +1 -0
- package/dist/plugin/utils/command-runner.d.ts +24 -0
- package/dist/plugin/utils/command-runner.d.ts.map +1 -0
- package/dist/plugin/utils/command-runner.js +44 -0
- package/dist/plugin/utils/command-runner.js.map +1 -0
- package/dist/plugin/utils/import-resolver.d.ts +55 -0
- package/dist/plugin/utils/import-resolver.d.ts.map +1 -0
- package/dist/plugin/utils/import-resolver.js +198 -0
- package/dist/plugin/utils/import-resolver.js.map +1 -0
- package/dist/plugin/utils/memory-pool.d.ts +90 -0
- package/dist/plugin/utils/memory-pool.d.ts.map +1 -0
- package/dist/plugin/utils/memory-pool.js +245 -0
- package/dist/plugin/utils/memory-pool.js.map +1 -0
- package/dist/plugin/utils/path-resolver.d.ts +49 -0
- package/dist/plugin/utils/path-resolver.d.ts.map +1 -0
- package/dist/plugin/utils/path-resolver.js +126 -0
- package/dist/plugin/utils/path-resolver.js.map +1 -0
- package/dist/plugin/utils/test-template-generator.d.ts +26 -0
- package/dist/plugin/utils/test-template-generator.d.ts.map +1 -0
- package/dist/plugin/utils/test-template-generator.js +178 -0
- package/dist/plugin/utils/test-template-generator.js.map +1 -0
- package/dist/processors/index.d.ts +12 -0
- package/dist/processors/index.d.ts.map +1 -0
- package/dist/processors/index.js +12 -0
- package/dist/processors/index.js.map +1 -0
- package/dist/processors/processor-manager.d.ts +113 -0
- package/dist/processors/processor-manager.d.ts.map +1 -0
- package/dist/processors/processor-manager.js +498 -0
- package/dist/processors/processor-manager.js.map +1 -0
- package/dist/processors/processor-types.d.ts +50 -0
- package/dist/processors/processor-types.d.ts.map +1 -0
- package/dist/processors/processor-types.js +10 -0
- package/dist/processors/processor-types.js.map +1 -0
- package/dist/processors/refactoring-logging-processor.d.ts +61 -0
- package/dist/processors/refactoring-logging-processor.d.ts.map +1 -0
- package/dist/processors/refactoring-logging-processor.js +257 -0
- package/dist/processors/refactoring-logging-processor.js.map +1 -0
- package/dist/state/context-providers.d.ts +5 -0
- package/dist/state/context-providers.d.ts.map +1 -0
- package/dist/state/context-providers.js +2 -0
- package/dist/state/context-providers.js.map +1 -0
- package/dist/state/index.d.ts +5 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/index.js +8 -0
- package/dist/state/index.js.map +1 -0
- package/dist/state/state-manager.d.ts +29 -0
- package/dist/state/state-manager.d.ts.map +1 -0
- package/dist/state/state-manager.js +153 -0
- package/dist/state/state-manager.js.map +1 -0
- package/dist/state/state-types.d.ts +6 -0
- package/dist/state/state-types.d.ts.map +1 -0
- package/dist/state/state-types.js +2 -0
- package/dist/state/state-types.js.map +1 -0
- package/dist/utils/codex-parser.d.ts +62 -0
- package/dist/utils/codex-parser.d.ts.map +1 -0
- package/dist/utils/codex-parser.js +396 -0
- package/dist/utils/codex-parser.js.map +1 -0
- package/dist/utils/command-runner.d.ts +24 -0
- package/dist/utils/command-runner.d.ts.map +1 -0
- package/dist/utils/command-runner.js +44 -0
- package/dist/utils/command-runner.js.map +1 -0
- package/dist/utils/import-resolver.d.ts +55 -0
- package/dist/utils/import-resolver.d.ts.map +1 -0
- package/dist/utils/import-resolver.js +198 -0
- package/dist/utils/import-resolver.js.map +1 -0
- package/dist/utils/memory-pool.d.ts +90 -0
- package/dist/utils/memory-pool.d.ts.map +1 -0
- package/dist/utils/memory-pool.js +245 -0
- package/dist/utils/memory-pool.js.map +1 -0
- package/dist/utils/path-resolver.d.ts +49 -0
- package/dist/utils/path-resolver.d.ts.map +1 -0
- package/dist/utils/path-resolver.js +126 -0
- package/dist/utils/path-resolver.js.map +1 -0
- package/dist/utils/test-template-generator.d.ts +26 -0
- package/dist/utils/test-template-generator.d.ts.map +1 -0
- package/dist/utils/test-template-generator.js +178 -0
- package/dist/utils/test-template-generator.js.map +1 -0
- package/package.json +138 -0
- package/scripts/analysis/analyze-context-awareness.ts +219 -0
- package/scripts/analysis/analyze-framework-usage.ts +208 -0
- package/scripts/analysis/analyzer-agent-runner.js +328 -0
- package/scripts/analysis/context-awareness-report.ts +250 -0
- package/scripts/analyze-imports.mjs +147 -0
- package/scripts/basic-security-audit.cjs +261 -0
- package/scripts/boot-check.cjs +188 -0
- package/scripts/build/check-syntax.sh +1 -0
- package/scripts/build/check-tsc.sh +1 -0
- package/scripts/build/check-types.sh +1 -0
- package/scripts/build/compile-single.sh +1 -0
- package/scripts/build/copy-plugin.sh +1 -0
- package/scripts/build/manual-build.sh +1 -0
- package/scripts/build/run-build-after-copy.sh +1 -0
- package/scripts/build/run-build-attempt.sh +1 -0
- package/scripts/build/run-build-errors-grep.sh +1 -0
- package/scripts/build/run-build-errors.sh +1 -0
- package/scripts/build/run-build-limited.sh +1 -0
- package/scripts/build/run-build-list.sh +1 -0
- package/scripts/build/run-build.sh +1 -0
- package/scripts/build/run-limited.sh +1 -0
- package/scripts/build/run-tsc-direct.sh +1 -0
- package/scripts/build/run-type-check.sh +1 -0
- package/scripts/build/run-typecheck.sh +1 -0
- package/scripts/build/test-build.sh +1 -0
- package/scripts/check-logs.sh +62 -0
- package/scripts/debug/debug-context-enhancement.ts +116 -0
- package/scripts/debug/debug-rules.mjs +23 -0
- package/scripts/demo/demo-clickable-monitoring.mjs +116 -0
- package/scripts/demo/profiling-demo.js +108 -0
- package/scripts/demo/profiling-demo.ts +126 -0
- package/scripts/demo/reporting-demonstration.ts +184 -0
- package/scripts/demo/reporting-examples.ts +105 -0
- package/scripts/dependency-scan.cjs +111 -0
- package/scripts/deploy-stringray-plugin.sh +323 -0
- package/scripts/disable-logging.sh +20 -0
- package/scripts/extract-framework.sh +405 -0
- package/scripts/fix-mcp-capabilities.js +83 -0
- package/scripts/framework/advanced-profiling-integration.sh +384 -0
- package/scripts/framework/check-agent-orchestration-health.sh +113 -0
- package/scripts/framework/enterprise-analysis-test.sh +174 -0
- package/scripts/framework/implement-analyzer-agent.sh +393 -0
- package/scripts/framework/merge-mcp-configs.sh +201 -0
- package/scripts/framework/validate-multi-agent-orchestration.sh +195 -0
- package/scripts/framework/validate-profiling.sh +64 -0
- package/scripts/github-actions-monitor.cjs +289 -0
- package/scripts/init.ts +121 -0
- package/scripts/monitoring/initialize-monitoring-pipeline.sh +89 -0
- package/scripts/monitoring/memory-dashboard.sh +52 -0
- package/scripts/monitoring/monitoring-daemon.mjs +67 -0
- package/scripts/monitoring/monitoring-daemon.sh +190 -0
- package/scripts/monitoring/profiling-dashboard.sh +69 -0
- package/scripts/performance-report.js +56 -0
- package/scripts/postinstall.cjs +240 -0
- package/scripts/profile-performance.sh +263 -0
- package/scripts/register-mcp-servers-fixed.sh +74 -0
- package/scripts/register-mcp-servers.sh +96 -0
- package/scripts/reporting/generate-phase1-report.js +28 -0
- package/scripts/reporting/run-postprocessor.js +59 -0
- package/scripts/reporting/trigger-report.js +15 -0
- package/scripts/run-simulations.mjs +29 -0
- package/scripts/scenario-data-processor.py +122 -0
- package/scripts/scenarios/scenario-security-check.ts +60 -0
- package/scripts/scenarios/scenario-user-management.ts +123 -0
- package/scripts/setup.cjs +128 -0
- package/scripts/simulation/run-simulations.js +84 -0
- package/scripts/simulation/simulate-full-orchestrator.ts +239 -0
- package/scripts/strray-triage.sh +349 -0
- package/scripts/test/run-memory-regression.sh +45 -0
- package/scripts/test/run-test.sh +2 -0
- package/scripts/test/test-deployment.sh +552 -0
- package/scripts/test/test-enhanced-report.ts +24 -0
- package/scripts/test/test-graceful-shutdown.sh +35 -0
- package/scripts/test/test-integration.mjs +79 -0
- package/scripts/test/test-manual-orchestration.sh +168 -0
- package/scripts/test/test-max-agents.sh +70 -0
- package/scripts/test/test-memory-monitor.sh +40 -0
- package/scripts/test/test-memory-pools.sh +58 -0
- package/scripts/test/test-module.ts +1 -0
- package/scripts/test/test-multi-agent-trigger.sh +251 -0
- package/scripts/test/test-orchestrator.txt +1 -0
- package/scripts/test/test-postinstall.js +1 -0
- package/scripts/test/test-security-module.ts +27 -0
- package/scripts/test/test-session-management.js +135 -0
- package/scripts/test/test-simulation.mjs +14 -0
- package/scripts/test/test-user-service.ts +111 -0
- package/scripts/test-comprehensive-path-resolution.mjs +62 -0
- package/scripts/test-data-processor.py +51 -0
- package/scripts/test-enforcement-e2e.mjs +127 -0
- package/scripts/test-full-plugin-no-timeout.sh +30 -0
- package/scripts/test-path-resolver.mjs +32 -0
- package/scripts/test-rules.mjs +128 -0
- package/scripts/test-stringray-plugin.mjs +66 -0
- package/scripts/test-utils/smart-test-runner.mjs +609 -0
- package/scripts/test-utils/test-quarantine.mjs +246 -0
- package/scripts/validate-codex.js +60 -0
- package/scripts/validate-phase1.mjs +189 -0
- package/scripts/validation/run-validators.js +114 -0
- package/scripts/validation/validate-external-processes.js +240 -0
- package/scripts/validation/validate-mcp-connectivity.js +165 -0
- package/scripts/validation/validate-oh-my-opencode-integration.js +200 -0
- package/scripts/validation/validate-reports.ts +114 -0
- package/scripts/verify-phase1.js +144 -0
|
@@ -0,0 +1,672 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StrRay Testing Strategy MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Knowledge skill for test planning, coverage optimization,
|
|
5
|
+
* and testing methodology recommendations
|
|
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
|
+
import * as fs from "fs";
|
|
11
|
+
import * as path from "path";
|
|
12
|
+
class StrRayTestingStrategyServer {
|
|
13
|
+
server;
|
|
14
|
+
constructor() {
|
|
15
|
+
this.server = new Server({
|
|
16
|
+
name: "strray-testing-strategy",
|
|
17
|
+
version: "1.0.0",
|
|
18
|
+
}, {
|
|
19
|
+
capabilities: {
|
|
20
|
+
tools: {},
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
this.setupToolHandlers();
|
|
24
|
+
console.log("StrRay Testing Strategy MCP Server initialized");
|
|
25
|
+
}
|
|
26
|
+
setupToolHandlers() {
|
|
27
|
+
this.server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
28
|
+
return {
|
|
29
|
+
tools: [
|
|
30
|
+
{
|
|
31
|
+
name: "analyze-test-coverage",
|
|
32
|
+
description: "Analyze current test coverage and identify gaps",
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: {
|
|
36
|
+
projectRoot: { type: "string" },
|
|
37
|
+
includeBreakdown: { type: "boolean", default: true },
|
|
38
|
+
coverageThreshold: { type: "number", default: 80 },
|
|
39
|
+
},
|
|
40
|
+
required: ["projectRoot"],
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "design-test-strategy",
|
|
45
|
+
description: "Design comprehensive testing strategy for the project",
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: {
|
|
49
|
+
projectRoot: { type: "string" },
|
|
50
|
+
projectType: {
|
|
51
|
+
type: "string",
|
|
52
|
+
enum: ["web", "api", "mobile", "desktop"],
|
|
53
|
+
},
|
|
54
|
+
complexity: {
|
|
55
|
+
type: "string",
|
|
56
|
+
enum: ["simple", "medium", "complex"],
|
|
57
|
+
},
|
|
58
|
+
timeline: {
|
|
59
|
+
type: "string",
|
|
60
|
+
enum: ["agile", "waterfall", "continuous"],
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
required: ["projectRoot"],
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
name: "identify-test-gaps",
|
|
68
|
+
description: "Identify untested code and recommend test cases",
|
|
69
|
+
inputSchema: {
|
|
70
|
+
type: "object",
|
|
71
|
+
properties: {
|
|
72
|
+
projectRoot: { type: "string" },
|
|
73
|
+
sourceFiles: { type: "array", items: { type: "string" } },
|
|
74
|
+
existingTests: { type: "array", items: { type: "string" } },
|
|
75
|
+
},
|
|
76
|
+
required: ["projectRoot"],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "optimize-test-coverage",
|
|
81
|
+
description: "Analyze and optimize test coverage patterns",
|
|
82
|
+
inputSchema: {
|
|
83
|
+
type: "object",
|
|
84
|
+
properties: {
|
|
85
|
+
projectRoot: { type: "string" },
|
|
86
|
+
currentCoverage: { type: "number" },
|
|
87
|
+
targetCoverage: { type: "number", default: 85 },
|
|
88
|
+
focusAreas: { type: "array", items: { type: "string" } },
|
|
89
|
+
},
|
|
90
|
+
required: ["projectRoot"],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
};
|
|
95
|
+
});
|
|
96
|
+
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
97
|
+
const { name, arguments: args } = request.params;
|
|
98
|
+
try {
|
|
99
|
+
switch (name) {
|
|
100
|
+
case "analyze-test-coverage":
|
|
101
|
+
return await this.analyzeTestCoverage(args);
|
|
102
|
+
case "design-test-strategy":
|
|
103
|
+
return await this.designTestStrategy(args);
|
|
104
|
+
case "identify-test-gaps":
|
|
105
|
+
return await this.identifyTestGaps(args);
|
|
106
|
+
case "optimize-test-coverage":
|
|
107
|
+
return await this.optimizeTestCoverage(args);
|
|
108
|
+
default:
|
|
109
|
+
throw new Error(`Unknown tool: ${name}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
console.error(`Error in testing strategy tool ${name}:`, error);
|
|
114
|
+
throw error;
|
|
115
|
+
}
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
async analyzeTestCoverage(args) {
|
|
119
|
+
const { projectRoot, includeBreakdown = true, coverageThreshold = 80, } = args;
|
|
120
|
+
const analysis = this.performTestCoverageAnalysis(projectRoot);
|
|
121
|
+
return {
|
|
122
|
+
content: [
|
|
123
|
+
{
|
|
124
|
+
type: "text",
|
|
125
|
+
text: JSON.stringify({
|
|
126
|
+
projectRoot,
|
|
127
|
+
analysis,
|
|
128
|
+
threshold: coverageThreshold,
|
|
129
|
+
status: analysis.coverage >= coverageThreshold
|
|
130
|
+
? "adequate"
|
|
131
|
+
: "insufficient",
|
|
132
|
+
analyzedAt: new Date().toISOString(),
|
|
133
|
+
}, null, 2),
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
async designTestStrategy(args) {
|
|
139
|
+
const { projectRoot, projectType, complexity, timeline } = args;
|
|
140
|
+
const strategy = this.generateTestStrategy(projectRoot, projectType, complexity, timeline);
|
|
141
|
+
return {
|
|
142
|
+
content: [
|
|
143
|
+
{
|
|
144
|
+
type: "text",
|
|
145
|
+
text: JSON.stringify({
|
|
146
|
+
projectRoot,
|
|
147
|
+
strategy,
|
|
148
|
+
recommendations: this.generateStrategyRecommendations(strategy, projectType),
|
|
149
|
+
implementation: this.createImplementationPlan(strategy, timeline),
|
|
150
|
+
analyzedAt: new Date().toISOString(),
|
|
151
|
+
}, null, 2),
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
async identifyTestGaps(args) {
|
|
157
|
+
const { projectRoot, sourceFiles, existingTests } = args;
|
|
158
|
+
const gaps = this.analyzeTestGaps(sourceFiles || [], existingTests || []);
|
|
159
|
+
return {
|
|
160
|
+
content: [
|
|
161
|
+
{
|
|
162
|
+
type: "text",
|
|
163
|
+
text: JSON.stringify({
|
|
164
|
+
projectRoot,
|
|
165
|
+
gaps,
|
|
166
|
+
coverage: this.calculateGapCoverage(gaps, sourceFiles?.length || 0),
|
|
167
|
+
recommendations: this.generateGapRecommendations(gaps),
|
|
168
|
+
analyzedAt: new Date().toISOString(),
|
|
169
|
+
}, null, 2),
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
async optimizeTestCoverage(args) {
|
|
175
|
+
const { projectRoot, currentCoverage, targetCoverage = 85, focusAreas, } = args;
|
|
176
|
+
const optimization = this.createCoverageOptimizationPlan(projectRoot, currentCoverage, targetCoverage, focusAreas);
|
|
177
|
+
return {
|
|
178
|
+
content: [
|
|
179
|
+
{
|
|
180
|
+
type: "text",
|
|
181
|
+
text: JSON.stringify({
|
|
182
|
+
projectRoot,
|
|
183
|
+
optimization,
|
|
184
|
+
timeline: this.estimateOptimizationTimeline(optimization),
|
|
185
|
+
roi: this.calculateOptimizationROI(optimization),
|
|
186
|
+
analyzedAt: new Date().toISOString(),
|
|
187
|
+
}, null, 2),
|
|
188
|
+
},
|
|
189
|
+
],
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
// Helper methods
|
|
193
|
+
performTestCoverageAnalysis(projectRoot) {
|
|
194
|
+
const testFiles = this.findTestFiles(projectRoot);
|
|
195
|
+
const sourceFiles = this.findSourceFiles(projectRoot);
|
|
196
|
+
const analysis = {
|
|
197
|
+
coverage: this.calculateCoverage(testFiles, sourceFiles),
|
|
198
|
+
testTypes: this.categorizeTests(testFiles),
|
|
199
|
+
testFrameworks: this.detectTestFrameworks(testFiles),
|
|
200
|
+
testPatterns: this.analyzeTestPatterns(testFiles),
|
|
201
|
+
gaps: this.identifyCoverageGaps(sourceFiles, testFiles),
|
|
202
|
+
recommendations: [],
|
|
203
|
+
};
|
|
204
|
+
analysis.recommendations = this.generateCoverageRecommendations(analysis);
|
|
205
|
+
return analysis;
|
|
206
|
+
}
|
|
207
|
+
generateTestStrategy(projectRoot, projectType, complexity, timeline) {
|
|
208
|
+
const baseTests = this.estimateBaseTestCounts(projectType, complexity);
|
|
209
|
+
// Adjust for timeline
|
|
210
|
+
const multiplier = timeline === "agile" ? 1.2 : timeline === "continuous" ? 1.4 : 1.0;
|
|
211
|
+
return {
|
|
212
|
+
unitTests: Math.round(baseTests.unit * multiplier),
|
|
213
|
+
integrationTests: Math.round(baseTests.integration * multiplier),
|
|
214
|
+
e2eTests: Math.round(baseTests.e2e * multiplier),
|
|
215
|
+
performanceTests: Math.round(baseTests.performance * multiplier),
|
|
216
|
+
securityTests: Math.round(baseTests.security * multiplier),
|
|
217
|
+
totalEstimated: 0, // Will be calculated
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
analyzeTestGaps(sourceFiles, existingTests) {
|
|
221
|
+
const gaps = [];
|
|
222
|
+
for (const sourceFile of sourceFiles) {
|
|
223
|
+
const expectedTest = this.generateExpectedTestFile(sourceFile);
|
|
224
|
+
const hasTest = existingTests.some((test) => test.includes(expectedTest));
|
|
225
|
+
if (!hasTest) {
|
|
226
|
+
gaps.push({
|
|
227
|
+
sourceFile,
|
|
228
|
+
expectedTest,
|
|
229
|
+
type: this.inferTestType(sourceFile),
|
|
230
|
+
priority: this.calculateTestPriority(sourceFile),
|
|
231
|
+
complexity: this.estimateTestComplexity(sourceFile),
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return gaps.sort((a, b) => b.priority - a.priority);
|
|
236
|
+
}
|
|
237
|
+
createCoverageOptimizationPlan(projectRoot, currentCoverage, targetCoverage, focusAreas) {
|
|
238
|
+
const gap = targetCoverage - currentCoverage;
|
|
239
|
+
const plan = {
|
|
240
|
+
currentCoverage,
|
|
241
|
+
targetCoverage,
|
|
242
|
+
gap,
|
|
243
|
+
phases: [],
|
|
244
|
+
estimatedEffort: this.estimateOptimizationEffort(gap),
|
|
245
|
+
priorityAreas: this.identifyPriorityAreas(projectRoot, focusAreas),
|
|
246
|
+
};
|
|
247
|
+
// Create optimization phases
|
|
248
|
+
if (gap > 0) {
|
|
249
|
+
plan.phases = this.createOptimizationPhases(gap, focusAreas);
|
|
250
|
+
}
|
|
251
|
+
return plan;
|
|
252
|
+
}
|
|
253
|
+
// Implementation helpers
|
|
254
|
+
findTestFiles(projectRoot) {
|
|
255
|
+
return this.findFiles(projectRoot, (file) => file.includes(".test.") ||
|
|
256
|
+
file.includes(".spec.") ||
|
|
257
|
+
file.includes("/__tests__/"));
|
|
258
|
+
}
|
|
259
|
+
findSourceFiles(projectRoot) {
|
|
260
|
+
return this.findFiles(projectRoot, (file) => {
|
|
261
|
+
const ext = path.extname(file);
|
|
262
|
+
return ([".ts", ".js", ".tsx", ".jsx", ".py", ".java"].includes(ext) &&
|
|
263
|
+
!file.includes(".test.") &&
|
|
264
|
+
!file.includes(".spec.") &&
|
|
265
|
+
!file.includes("/__tests__/"));
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
findFiles(projectRoot, filter) {
|
|
269
|
+
const files = [];
|
|
270
|
+
const traverse = (dir) => {
|
|
271
|
+
try {
|
|
272
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
273
|
+
for (const entry of entries) {
|
|
274
|
+
const entryPath = path.join(dir, entry.name);
|
|
275
|
+
if (this.shouldIgnorePath(entryPath))
|
|
276
|
+
continue;
|
|
277
|
+
if (entry.isFile() && filter(entryPath)) {
|
|
278
|
+
files.push(entryPath);
|
|
279
|
+
}
|
|
280
|
+
else if (entry.isDirectory()) {
|
|
281
|
+
traverse(entryPath);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
catch (error) {
|
|
286
|
+
// Skip inaccessible directories
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
traverse(projectRoot);
|
|
290
|
+
return files;
|
|
291
|
+
}
|
|
292
|
+
calculateCoverage(testFiles, sourceFiles) {
|
|
293
|
+
if (sourceFiles.length === 0)
|
|
294
|
+
return 0;
|
|
295
|
+
return Math.min(100, Math.round((testFiles.length / sourceFiles.length) * 100));
|
|
296
|
+
}
|
|
297
|
+
categorizeTests(testFiles) {
|
|
298
|
+
const categories = {
|
|
299
|
+
unit: 0,
|
|
300
|
+
integration: 0,
|
|
301
|
+
e2e: 0,
|
|
302
|
+
performance: 0,
|
|
303
|
+
security: 0,
|
|
304
|
+
};
|
|
305
|
+
for (const testFile of testFiles) {
|
|
306
|
+
const content = fs.readFileSync(testFile, "utf8").toLowerCase();
|
|
307
|
+
if (content.includes("integration") || content.includes("e2e")) {
|
|
308
|
+
categories.integration = (categories.integration || 0) + 1;
|
|
309
|
+
}
|
|
310
|
+
else if (content.includes("performance") ||
|
|
311
|
+
content.includes("benchmark")) {
|
|
312
|
+
categories.performance = (categories.performance || 0) + 1;
|
|
313
|
+
}
|
|
314
|
+
else if (content.includes("security") || content.includes("auth")) {
|
|
315
|
+
categories.security = (categories.security || 0) + 1;
|
|
316
|
+
}
|
|
317
|
+
else {
|
|
318
|
+
categories.unit = (categories.unit || 0) + 1;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
return categories;
|
|
322
|
+
}
|
|
323
|
+
detectTestFrameworks(testFiles) {
|
|
324
|
+
const frameworks = [];
|
|
325
|
+
const sampleFiles = testFiles.slice(0, 5);
|
|
326
|
+
for (const file of sampleFiles) {
|
|
327
|
+
try {
|
|
328
|
+
const content = fs.readFileSync(file, "utf8");
|
|
329
|
+
if (content.includes("describe(") && content.includes("it(")) {
|
|
330
|
+
if (content.includes("vitest"))
|
|
331
|
+
frameworks.push("vitest");
|
|
332
|
+
else if (content.includes("jest"))
|
|
333
|
+
frameworks.push("jest");
|
|
334
|
+
else
|
|
335
|
+
frameworks.push("mocha/chai");
|
|
336
|
+
}
|
|
337
|
+
if (content.includes("pytest"))
|
|
338
|
+
frameworks.push("pytest");
|
|
339
|
+
if (content.includes("junit"))
|
|
340
|
+
frameworks.push("junit");
|
|
341
|
+
}
|
|
342
|
+
catch (error) {
|
|
343
|
+
// Skip
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return Array.from(new Set(frameworks));
|
|
347
|
+
}
|
|
348
|
+
analyzeTestPatterns(testFiles) {
|
|
349
|
+
const patterns = [];
|
|
350
|
+
const sampleFiles = testFiles.slice(0, 3);
|
|
351
|
+
for (const file of sampleFiles) {
|
|
352
|
+
try {
|
|
353
|
+
const content = fs.readFileSync(file, "utf8");
|
|
354
|
+
if (content.includes("beforeEach") || content.includes("afterEach")) {
|
|
355
|
+
patterns.push("setup/teardown");
|
|
356
|
+
}
|
|
357
|
+
if (content.includes("mock") || content.includes("stub")) {
|
|
358
|
+
patterns.push("mocking");
|
|
359
|
+
}
|
|
360
|
+
if (content.includes("fixture") || content.includes("factory")) {
|
|
361
|
+
patterns.push("test data factories");
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
catch (error) {
|
|
365
|
+
// Skip
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
return Array.from(new Set(patterns));
|
|
369
|
+
}
|
|
370
|
+
identifyCoverageGaps(sourceFiles, testFiles) {
|
|
371
|
+
const gaps = [];
|
|
372
|
+
for (const sourceFile of sourceFiles) {
|
|
373
|
+
const hasTest = testFiles.some((testFile) => testFile
|
|
374
|
+
.replace(".test.", ".")
|
|
375
|
+
.replace(".spec.", ".")
|
|
376
|
+
.replace("/__tests__/", "/")
|
|
377
|
+
.includes(path.basename(sourceFile, path.extname(sourceFile))));
|
|
378
|
+
if (!hasTest) {
|
|
379
|
+
gaps.push(sourceFile);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
return gaps;
|
|
383
|
+
}
|
|
384
|
+
generateCoverageRecommendations(analysis) {
|
|
385
|
+
const recommendations = [];
|
|
386
|
+
if (analysis.coverage < 70) {
|
|
387
|
+
recommendations.push("Increase test coverage to at least 80%");
|
|
388
|
+
}
|
|
389
|
+
if ((analysis.testTypes.unit || 0) < (analysis.testTypes.integration || 0)) {
|
|
390
|
+
recommendations.push("Focus more on unit tests before integration tests");
|
|
391
|
+
}
|
|
392
|
+
if (analysis.gaps.length > 5) {
|
|
393
|
+
recommendations.push(`Address ${analysis.gaps.length} files without test coverage`);
|
|
394
|
+
}
|
|
395
|
+
return recommendations;
|
|
396
|
+
}
|
|
397
|
+
estimateBaseTestCounts(projectType, complexity) {
|
|
398
|
+
const baseMultipliers = {
|
|
399
|
+
web: { unit: 10, integration: 3, e2e: 2, performance: 1, security: 1 },
|
|
400
|
+
api: { unit: 8, integration: 4, e2e: 1, performance: 2, security: 2 },
|
|
401
|
+
mobile: { unit: 12, integration: 5, e2e: 3, performance: 1, security: 1 },
|
|
402
|
+
desktop: {
|
|
403
|
+
unit: 15,
|
|
404
|
+
integration: 4,
|
|
405
|
+
e2e: 2,
|
|
406
|
+
performance: 1,
|
|
407
|
+
security: 1,
|
|
408
|
+
},
|
|
409
|
+
};
|
|
410
|
+
const complexityMultipliers = {
|
|
411
|
+
simple: 0.7,
|
|
412
|
+
medium: 1.0,
|
|
413
|
+
complex: 1.5,
|
|
414
|
+
};
|
|
415
|
+
const base = baseMultipliers[projectType] ||
|
|
416
|
+
baseMultipliers.web;
|
|
417
|
+
const multiplier = complexityMultipliers[complexity] ||
|
|
418
|
+
1.0;
|
|
419
|
+
return {
|
|
420
|
+
unit: Math.round(base.unit * multiplier),
|
|
421
|
+
integration: Math.round(base.integration * multiplier),
|
|
422
|
+
e2e: Math.round(base.e2e * multiplier),
|
|
423
|
+
performance: Math.round(base.performance * multiplier),
|
|
424
|
+
security: Math.round(base.security * multiplier),
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
generateStrategyRecommendations(strategy, projectType) {
|
|
428
|
+
const recommendations = [];
|
|
429
|
+
if (strategy.unitTests < strategy.integrationTests) {
|
|
430
|
+
recommendations.push("Prioritize unit tests for better test pyramid balance");
|
|
431
|
+
}
|
|
432
|
+
if (projectType === "api" && strategy.e2eTests < 2) {
|
|
433
|
+
recommendations.push("Increase E2E tests for API contract validation");
|
|
434
|
+
}
|
|
435
|
+
return recommendations;
|
|
436
|
+
}
|
|
437
|
+
createImplementationPlan(strategy, timeline) {
|
|
438
|
+
const phases = timeline === "agile"
|
|
439
|
+
? ["sprint1", "sprint2", "sprint3"]
|
|
440
|
+
: timeline === "continuous"
|
|
441
|
+
? ["week1", "week2", "week3", "week4"]
|
|
442
|
+
: ["phase1", "phase2", "phase3"];
|
|
443
|
+
return {
|
|
444
|
+
phases: phases.map((phase, index) => ({
|
|
445
|
+
name: phase,
|
|
446
|
+
focus: index === 0
|
|
447
|
+
? "unit-tests"
|
|
448
|
+
: index === 1
|
|
449
|
+
? "integration-tests"
|
|
450
|
+
: "e2e-tests",
|
|
451
|
+
estimatedTests: Math.round(strategy.totalEstimated / phases.length),
|
|
452
|
+
})),
|
|
453
|
+
timeline,
|
|
454
|
+
milestones: this.generateMilestones(strategy, timeline),
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
generateExpectedTestFile(sourceFile) {
|
|
458
|
+
const ext = path.extname(sourceFile);
|
|
459
|
+
const baseName = path.basename(sourceFile, ext);
|
|
460
|
+
const dir = path.dirname(sourceFile);
|
|
461
|
+
return path.join(dir, "__tests__", `${baseName}.test${ext}`);
|
|
462
|
+
}
|
|
463
|
+
inferTestType(sourceFile) {
|
|
464
|
+
const content = fs.readFileSync(sourceFile, "utf8");
|
|
465
|
+
if (content.includes("export") && content.includes("function")) {
|
|
466
|
+
return "unit";
|
|
467
|
+
}
|
|
468
|
+
if (content.includes("router") || content.includes("endpoint")) {
|
|
469
|
+
return "integration";
|
|
470
|
+
}
|
|
471
|
+
if (content.includes("component") || content.includes("render")) {
|
|
472
|
+
return "component";
|
|
473
|
+
}
|
|
474
|
+
return "unit";
|
|
475
|
+
}
|
|
476
|
+
calculateTestPriority(sourceFile) {
|
|
477
|
+
const content = fs.readFileSync(sourceFile, "utf8");
|
|
478
|
+
let priority = 1;
|
|
479
|
+
// Critical business logic gets higher priority
|
|
480
|
+
if (content.includes("auth") ||
|
|
481
|
+
content.includes("security") ||
|
|
482
|
+
content.includes("payment")) {
|
|
483
|
+
priority += 3;
|
|
484
|
+
}
|
|
485
|
+
// Complex functions get higher priority
|
|
486
|
+
if ((content.match(/function/g) || []).length > 5) {
|
|
487
|
+
priority += 2;
|
|
488
|
+
}
|
|
489
|
+
// Public APIs get higher priority
|
|
490
|
+
if (content.includes("export")) {
|
|
491
|
+
priority += 1;
|
|
492
|
+
}
|
|
493
|
+
return Math.min(priority, 5);
|
|
494
|
+
}
|
|
495
|
+
estimateTestComplexity(sourceFile) {
|
|
496
|
+
const content = fs.readFileSync(sourceFile, "utf8");
|
|
497
|
+
const functions = (content.match(/function|class|interface/g) || []).length;
|
|
498
|
+
const branches = (content.match(/if|switch|catch/g) || []).length;
|
|
499
|
+
const asyncOps = (content.match(/async|await|Promise/g) || []).length;
|
|
500
|
+
return Math.min(Math.round((functions + branches + asyncOps) / 3), 5);
|
|
501
|
+
}
|
|
502
|
+
calculateGapCoverage(gaps, totalFiles) {
|
|
503
|
+
if (totalFiles === 0)
|
|
504
|
+
return 100;
|
|
505
|
+
return Math.round(((totalFiles - gaps.length) / totalFiles) * 100);
|
|
506
|
+
}
|
|
507
|
+
generateGapRecommendations(gaps) {
|
|
508
|
+
const recommendations = [];
|
|
509
|
+
const highPriorityGaps = gaps.filter((g) => g.priority >= 4);
|
|
510
|
+
if (highPriorityGaps.length > 0) {
|
|
511
|
+
recommendations.push(`Address ${highPriorityGaps.length} high-priority test gaps first`);
|
|
512
|
+
}
|
|
513
|
+
const complexGaps = gaps.filter((g) => g.complexity >= 4);
|
|
514
|
+
if (complexGaps.length > 0) {
|
|
515
|
+
recommendations.push(`Plan additional time for ${complexGaps.length} complex test implementations`);
|
|
516
|
+
}
|
|
517
|
+
return recommendations;
|
|
518
|
+
}
|
|
519
|
+
estimateOptimizationEffort(gap) {
|
|
520
|
+
if (gap <= 10)
|
|
521
|
+
return "1-2 days";
|
|
522
|
+
if (gap <= 20)
|
|
523
|
+
return "3-5 days";
|
|
524
|
+
if (gap <= 30)
|
|
525
|
+
return "1-2 weeks";
|
|
526
|
+
return "2-4 weeks";
|
|
527
|
+
}
|
|
528
|
+
identifyPriorityAreas(projectRoot, focusAreas) {
|
|
529
|
+
const areas = focusAreas || [
|
|
530
|
+
"authentication",
|
|
531
|
+
"data-validation",
|
|
532
|
+
"api-endpoints",
|
|
533
|
+
"ui-components",
|
|
534
|
+
];
|
|
535
|
+
// Analyze codebase to identify actual priority areas
|
|
536
|
+
const sourceFiles = this.findSourceFiles(projectRoot);
|
|
537
|
+
const priorityAreas = [];
|
|
538
|
+
for (const area of areas) {
|
|
539
|
+
const relevantFiles = sourceFiles.filter((file) => fs
|
|
540
|
+
.readFileSync(file, "utf8")
|
|
541
|
+
.toLowerCase()
|
|
542
|
+
.includes(area.toLowerCase()));
|
|
543
|
+
if (relevantFiles.length > 0) {
|
|
544
|
+
priorityAreas.push(`${area} (${relevantFiles.length} files)`);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return priorityAreas;
|
|
548
|
+
}
|
|
549
|
+
createOptimizationPhases(gap, focusAreas) {
|
|
550
|
+
const phases = [];
|
|
551
|
+
if (gap > 30) {
|
|
552
|
+
phases.push({
|
|
553
|
+
name: "Phase 1: Critical Paths",
|
|
554
|
+
focus: "authentication, security, payment flows",
|
|
555
|
+
targetCoverage: 70,
|
|
556
|
+
estimatedTests: Math.round(gap * 0.4),
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
if (gap > 20) {
|
|
560
|
+
phases.push({
|
|
561
|
+
name: "Phase 2: Core Functionality",
|
|
562
|
+
focus: "main business logic, data validation",
|
|
563
|
+
targetCoverage: 80,
|
|
564
|
+
estimatedTests: Math.round(gap * 0.4),
|
|
565
|
+
});
|
|
566
|
+
}
|
|
567
|
+
phases.push({
|
|
568
|
+
name: "Phase 3: Edge Cases & UI",
|
|
569
|
+
focus: "error handling, ui components, edge cases",
|
|
570
|
+
targetCoverage: 85,
|
|
571
|
+
estimatedTests: Math.round(gap * 0.2),
|
|
572
|
+
});
|
|
573
|
+
return phases;
|
|
574
|
+
}
|
|
575
|
+
estimateOptimizationTimeline(optimization) {
|
|
576
|
+
const baseDays = optimization.phases.length * 3;
|
|
577
|
+
const complexityMultiplier = optimization.gap > 20 ? 1.5 : 1.0;
|
|
578
|
+
return {
|
|
579
|
+
estimatedDays: Math.round(baseDays * complexityMultiplier),
|
|
580
|
+
phases: optimization.phases.map((phase) => ({
|
|
581
|
+
name: phase.name,
|
|
582
|
+
estimatedDays: Math.round(phase.estimatedTests / 5), // 5 tests per day estimate
|
|
583
|
+
})),
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
calculateOptimizationROI(optimization) {
|
|
587
|
+
const effortDays = optimization.estimatedEffort.includes("days")
|
|
588
|
+
? parseInt(optimization.estimatedEffort)
|
|
589
|
+
: 14;
|
|
590
|
+
const coverageIncrease = optimization.gap;
|
|
591
|
+
return {
|
|
592
|
+
coverageIncrease: `${coverageIncrease}%`,
|
|
593
|
+
effortDays,
|
|
594
|
+
bugsPrevented: Math.round(coverageIncrease * 0.8), // Rough estimate
|
|
595
|
+
confidenceIncrease: `${Math.min(coverageIncrease * 2, 90)}%`,
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
generateMilestones(strategy, timeline) {
|
|
599
|
+
const totalTests = strategy.unitTests +
|
|
600
|
+
strategy.integrationTests +
|
|
601
|
+
strategy.e2eTests +
|
|
602
|
+
strategy.performanceTests +
|
|
603
|
+
strategy.securityTests;
|
|
604
|
+
strategy.totalEstimated = totalTests;
|
|
605
|
+
if (timeline === "agile") {
|
|
606
|
+
return [
|
|
607
|
+
{
|
|
608
|
+
milestone: "Sprint 1 Complete",
|
|
609
|
+
tests: Math.round(totalTests * 0.3),
|
|
610
|
+
focus: "unit tests",
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
milestone: "Sprint 2 Complete",
|
|
614
|
+
tests: Math.round(totalTests * 0.6),
|
|
615
|
+
focus: "integration tests",
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
milestone: "Sprint 3 Complete",
|
|
619
|
+
tests: totalTests,
|
|
620
|
+
focus: "e2e and performance tests",
|
|
621
|
+
},
|
|
622
|
+
];
|
|
623
|
+
}
|
|
624
|
+
return [
|
|
625
|
+
{
|
|
626
|
+
milestone: "Phase 1 Complete",
|
|
627
|
+
tests: Math.round(totalTests * 0.4),
|
|
628
|
+
focus: "foundation tests",
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
milestone: "Phase 2 Complete",
|
|
632
|
+
tests: Math.round(totalTests * 0.75),
|
|
633
|
+
focus: "feature tests",
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
milestone: "Phase 3 Complete",
|
|
637
|
+
tests: totalTests,
|
|
638
|
+
focus: "complete coverage",
|
|
639
|
+
},
|
|
640
|
+
];
|
|
641
|
+
}
|
|
642
|
+
shouldIgnorePath(filePath) {
|
|
643
|
+
const ignorePatterns = [
|
|
644
|
+
/node_modules/,
|
|
645
|
+
/\.git/,
|
|
646
|
+
/dist/,
|
|
647
|
+
/build/,
|
|
648
|
+
/\.next/,
|
|
649
|
+
/\.nuxt/,
|
|
650
|
+
/\.cache/,
|
|
651
|
+
/\.temp/,
|
|
652
|
+
/coverage/,
|
|
653
|
+
/\.nyc_output/,
|
|
654
|
+
/logs/,
|
|
655
|
+
/\.DS_Store/,
|
|
656
|
+
/Thumbs\.db/,
|
|
657
|
+
];
|
|
658
|
+
return ignorePatterns.some((pattern) => pattern.test(filePath));
|
|
659
|
+
}
|
|
660
|
+
async run() {
|
|
661
|
+
const transport = new StdioServerTransport();
|
|
662
|
+
await this.server.connect(transport);
|
|
663
|
+
console.log("StrRay Testing Strategy MCP Server started");
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
// Start the server if run directly
|
|
667
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
668
|
+
const server = new StrRayTestingStrategyServer();
|
|
669
|
+
server.run().catch(console.error);
|
|
670
|
+
}
|
|
671
|
+
export default StrRayTestingStrategyServer;
|
|
672
|
+
//# sourceMappingURL=testing-strategy.server.js.map
|