mcp-adr-analysis-server 2.1.9 → 2.1.19
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/README.md +55 -8
- package/dist/.tsbuildinfo +1 -1
- package/dist/src/index.d.ts +78 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1793 -577
- package/dist/src/index.js.map +1 -1
- package/dist/src/prompts/index.d.ts.map +1 -1
- package/dist/src/prompts/index.js +23 -6
- package/dist/src/prompts/index.js.map +1 -1
- package/dist/src/prompts/validated-pattern-prompts.d.ts +33 -0
- package/dist/src/prompts/validated-pattern-prompts.d.ts.map +1 -0
- package/dist/src/prompts/validated-pattern-prompts.js +337 -0
- package/dist/src/prompts/validated-pattern-prompts.js.map +1 -0
- package/dist/src/resources/adr-by-id-resource.d.ts +116 -0
- package/dist/src/resources/adr-by-id-resource.d.ts.map +1 -0
- package/dist/src/resources/adr-by-id-resource.js +213 -0
- package/dist/src/resources/adr-by-id-resource.js.map +1 -0
- package/dist/src/resources/code-quality-resource.d.ts +105 -0
- package/dist/src/resources/code-quality-resource.d.ts.map +1 -0
- package/dist/src/resources/code-quality-resource.js +282 -0
- package/dist/src/resources/code-quality-resource.js.map +1 -0
- package/dist/src/resources/deployment-history-resource.d.ts +214 -0
- package/dist/src/resources/deployment-history-resource.d.ts.map +1 -0
- package/dist/src/resources/deployment-history-resource.js +308 -0
- package/dist/src/resources/deployment-history-resource.js.map +1 -0
- package/dist/src/resources/deployment-status-resource.d.ts +256 -0
- package/dist/src/resources/deployment-status-resource.d.ts.map +1 -0
- package/dist/src/resources/deployment-status-resource.js +665 -0
- package/dist/src/resources/deployment-status-resource.js.map +1 -0
- package/dist/src/resources/environment-analysis-resource.d.ts +237 -0
- package/dist/src/resources/environment-analysis-resource.d.ts.map +1 -0
- package/dist/src/resources/environment-analysis-resource.js +646 -0
- package/dist/src/resources/environment-analysis-resource.js.map +1 -0
- package/dist/src/resources/index.d.ts +6 -2
- package/dist/src/resources/index.d.ts.map +1 -1
- package/dist/src/resources/index.js +247 -492
- package/dist/src/resources/index.js.map +1 -1
- package/dist/src/resources/memory-snapshots-resource.d.ts +180 -0
- package/dist/src/resources/memory-snapshots-resource.d.ts.map +1 -0
- package/dist/src/resources/memory-snapshots-resource.js +847 -0
- package/dist/src/resources/memory-snapshots-resource.js.map +1 -0
- package/dist/src/resources/pattern-base-code-by-platform-resource.d.ts +35 -0
- package/dist/src/resources/pattern-base-code-by-platform-resource.d.ts.map +1 -0
- package/dist/src/resources/pattern-base-code-by-platform-resource.js +72 -0
- package/dist/src/resources/pattern-base-code-by-platform-resource.js.map +1 -0
- package/dist/src/resources/pattern-by-name-resource.d.ts +53 -0
- package/dist/src/resources/pattern-by-name-resource.d.ts.map +1 -0
- package/dist/src/resources/pattern-by-name-resource.js +200 -0
- package/dist/src/resources/pattern-by-name-resource.js.map +1 -0
- package/dist/src/resources/pattern-sources-by-platform-resource.d.ts +26 -0
- package/dist/src/resources/pattern-sources-by-platform-resource.d.ts.map +1 -0
- package/dist/src/resources/pattern-sources-by-platform-resource.js +59 -0
- package/dist/src/resources/pattern-sources-by-platform-resource.js.map +1 -0
- package/dist/src/resources/project-metrics-resource.d.ts +180 -0
- package/dist/src/resources/project-metrics-resource.d.ts.map +1 -0
- package/dist/src/resources/project-metrics-resource.js +487 -0
- package/dist/src/resources/project-metrics-resource.js.map +1 -0
- package/dist/src/resources/project-status-resource.d.ts +75 -0
- package/dist/src/resources/project-status-resource.d.ts.map +1 -0
- package/dist/src/resources/project-status-resource.js +189 -0
- package/dist/src/resources/project-status-resource.js.map +1 -0
- package/dist/src/resources/research-by-topic-resource.d.ts +21 -0
- package/dist/src/resources/research-by-topic-resource.d.ts.map +1 -0
- package/dist/src/resources/research-by-topic-resource.js +125 -0
- package/dist/src/resources/research-by-topic-resource.js.map +1 -0
- package/dist/src/resources/research-index-resource.d.ts +100 -0
- package/dist/src/resources/research-index-resource.d.ts.map +1 -0
- package/dist/src/resources/research-index-resource.js +200 -0
- package/dist/src/resources/research-index-resource.js.map +1 -0
- package/dist/src/resources/resource-cache.d.ts +144 -0
- package/dist/src/resources/resource-cache.d.ts.map +1 -0
- package/dist/src/resources/resource-cache.js +316 -0
- package/dist/src/resources/resource-cache.js.map +1 -0
- package/dist/src/resources/resource-router.d.ts +45 -0
- package/dist/src/resources/resource-router.d.ts.map +1 -0
- package/dist/src/resources/resource-router.js +96 -0
- package/dist/src/resources/resource-router.js.map +1 -0
- package/dist/src/resources/rule-by-id-resource.d.ts +38 -0
- package/dist/src/resources/rule-by-id-resource.d.ts.map +1 -0
- package/dist/src/resources/rule-by-id-resource.js +104 -0
- package/dist/src/resources/rule-by-id-resource.js.map +1 -0
- package/dist/src/resources/rule-catalog-resource.d.ts +126 -0
- package/dist/src/resources/rule-catalog-resource.d.ts.map +1 -0
- package/dist/src/resources/rule-catalog-resource.js +224 -0
- package/dist/src/resources/rule-catalog-resource.js.map +1 -0
- package/dist/src/resources/rule-generation-resource.d.ts +80 -0
- package/dist/src/resources/rule-generation-resource.d.ts.map +1 -0
- package/dist/src/resources/rule-generation-resource.js +282 -0
- package/dist/src/resources/rule-generation-resource.js.map +1 -0
- package/dist/src/resources/technology-by-name-resource.d.ts +43 -0
- package/dist/src/resources/technology-by-name-resource.d.ts.map +1 -0
- package/dist/src/resources/technology-by-name-resource.js +176 -0
- package/dist/src/resources/technology-by-name-resource.js.map +1 -0
- package/dist/src/resources/todo-by-id-resource.d.ts +46 -0
- package/dist/src/resources/todo-by-id-resource.d.ts.map +1 -0
- package/dist/src/resources/todo-by-id-resource.js +192 -0
- package/dist/src/resources/todo-by-id-resource.js.map +1 -0
- package/dist/src/resources/todo-list-resource.d.ts +96 -0
- package/dist/src/resources/todo-list-resource.d.ts.map +1 -0
- package/dist/src/resources/todo-list-resource.js +209 -0
- package/dist/src/resources/todo-list-resource.js.map +1 -0
- package/dist/src/resources/validated-pattern-by-platform-resource.d.ts +14 -0
- package/dist/src/resources/validated-pattern-by-platform-resource.d.ts.map +1 -0
- package/dist/src/resources/validated-pattern-by-platform-resource.js +45 -0
- package/dist/src/resources/validated-pattern-by-platform-resource.js.map +1 -0
- package/dist/src/resources/validated-patterns-catalog-resource.d.ts +36 -0
- package/dist/src/resources/validated-patterns-catalog-resource.d.ts.map +1 -0
- package/dist/src/resources/validated-patterns-catalog-resource.js +57 -0
- package/dist/src/resources/validated-patterns-catalog-resource.js.map +1 -0
- package/dist/src/templates/domain-knowledge-templates.d.ts.map +1 -1
- package/dist/src/templates/domain-knowledge-templates.js +49 -49
- package/dist/src/templates/domain-knowledge-templates.js.map +1 -1
- package/dist/src/tools/adr-bootstrap-validation-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-bootstrap-validation-tool.js +214 -4
- package/dist/src/tools/adr-bootstrap-validation-tool.js.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.d.ts +2 -2
- package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.js +129 -12
- package/dist/src/tools/adr-suggestion-tool.js.map +1 -1
- package/dist/src/tools/adr-validation-tool.d.ts +98 -0
- package/dist/src/tools/adr-validation-tool.d.ts.map +1 -0
- package/dist/src/tools/adr-validation-tool.js +372 -0
- package/dist/src/tools/adr-validation-tool.js.map +1 -0
- package/dist/src/tools/bootstrap-validation-loop-tool.d.ts +262 -0
- package/dist/src/tools/bootstrap-validation-loop-tool.d.ts.map +1 -0
- package/dist/src/tools/bootstrap-validation-loop-tool.js +1934 -0
- package/dist/src/tools/bootstrap-validation-loop-tool.js.map +1 -0
- package/dist/src/tools/conversation-memory-tool.d.ts +48 -0
- package/dist/src/tools/conversation-memory-tool.d.ts.map +1 -0
- package/dist/src/tools/conversation-memory-tool.js +254 -0
- package/dist/src/tools/conversation-memory-tool.js.map +1 -0
- package/dist/src/tools/deployment-analysis-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-analysis-tool.js +82 -6
- package/dist/src/tools/deployment-analysis-tool.js.map +1 -1
- package/dist/src/tools/deployment-guidance-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-guidance-tool.js +126 -25
- package/dist/src/tools/deployment-guidance-tool.js.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.js +166 -5
- package/dist/src/tools/deployment-readiness-tool.js.map +1 -1
- package/dist/src/tools/environment-analysis-tool.d.ts.map +1 -1
- package/dist/src/tools/environment-analysis-tool.js +36 -1
- package/dist/src/tools/environment-analysis-tool.js.map +1 -1
- package/dist/src/tools/expand-analysis-tool.d.ts +23 -0
- package/dist/src/tools/expand-analysis-tool.d.ts.map +1 -0
- package/dist/src/tools/expand-analysis-tool.js +107 -0
- package/dist/src/tools/expand-analysis-tool.js.map +1 -0
- package/dist/src/tools/get-server-context-tool.d.ts +67 -0
- package/dist/src/tools/get-server-context-tool.d.ts.map +1 -0
- package/dist/src/tools/get-server-context-tool.js +75 -0
- package/dist/src/tools/get-server-context-tool.js.map +1 -0
- package/dist/src/tools/interactive-adr-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/interactive-adr-planning-tool.js +82 -9
- package/dist/src/tools/interactive-adr-planning-tool.js.map +1 -1
- package/dist/src/tools/llm-cloud-management-tool.d.ts +62 -0
- package/dist/src/tools/llm-cloud-management-tool.d.ts.map +1 -0
- package/dist/src/tools/llm-cloud-management-tool.js +202 -0
- package/dist/src/tools/llm-cloud-management-tool.js.map +1 -0
- package/dist/src/tools/llm-database-management-tool.d.ts +62 -0
- package/dist/src/tools/llm-database-management-tool.d.ts.map +1 -0
- package/dist/src/tools/llm-database-management-tool.js +203 -0
- package/dist/src/tools/llm-database-management-tool.js.map +1 -0
- package/dist/src/tools/llm-web-search-tool.d.ts +59 -0
- package/dist/src/tools/llm-web-search-tool.d.ts.map +1 -0
- package/dist/src/tools/llm-web-search-tool.js +165 -0
- package/dist/src/tools/llm-web-search-tool.js.map +1 -0
- package/dist/src/tools/mcp-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/mcp-planning-tool.js +10 -3
- package/dist/src/tools/mcp-planning-tool.js.map +1 -1
- package/dist/src/tools/memory-loading-tool.d.ts.map +1 -1
- package/dist/src/tools/memory-loading-tool.js +4 -2
- package/dist/src/tools/memory-loading-tool.js.map +1 -1
- package/dist/src/tools/perform-research-tool.d.ts +61 -0
- package/dist/src/tools/perform-research-tool.d.ts.map +1 -0
- package/dist/src/tools/perform-research-tool.js +324 -0
- package/dist/src/tools/perform-research-tool.js.map +1 -0
- package/dist/src/tools/research-question-tool.d.ts.map +1 -1
- package/dist/src/tools/research-question-tool.js +11 -9
- package/dist/src/tools/research-question-tool.js.map +1 -1
- package/dist/src/tools/review-existing-adrs-tool.d.ts.map +1 -1
- package/dist/src/tools/review-existing-adrs-tool.js +42 -3
- package/dist/src/tools/review-existing-adrs-tool.js.map +1 -1
- package/dist/src/tools/tool-chain-orchestrator.d.ts +15 -94
- package/dist/src/tools/tool-chain-orchestrator.d.ts.map +1 -1
- package/dist/src/tools/tool-chain-orchestrator.js +2 -2
- package/dist/src/tools/tool-chain-orchestrator.js.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts +25 -120
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js +91 -2
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js.map +1 -1
- package/dist/src/types/ape-framework.d.ts +50 -283
- package/dist/src/types/ape-framework.d.ts.map +1 -1
- package/dist/src/types/conversation-context.d.ts.map +1 -1
- package/dist/src/types/conversation-context.js +12 -12
- package/dist/src/types/conversation-context.js.map +1 -1
- package/dist/src/types/conversation-memory.d.ts +184 -0
- package/dist/src/types/conversation-memory.d.ts.map +1 -0
- package/dist/src/types/conversation-memory.js +8 -0
- package/dist/src/types/conversation-memory.js.map +1 -0
- package/dist/src/types/index.d.ts +112 -339
- package/dist/src/types/index.d.ts.map +1 -1
- package/dist/src/types/knowledge-generation.d.ts +96 -401
- package/dist/src/types/knowledge-generation.d.ts.map +1 -1
- package/dist/src/types/knowledge-graph-schemas.d.ts +77 -715
- package/dist/src/types/knowledge-graph-schemas.d.ts.map +1 -1
- package/dist/src/types/knowledge-graph-schemas.js +8 -8
- package/dist/src/types/knowledge-graph-schemas.js.map +1 -1
- package/dist/src/types/memory-entities.d.ts +1230 -6164
- package/dist/src/types/memory-entities.d.ts.map +1 -1
- package/dist/src/types/memory-entities.js +8 -8
- package/dist/src/types/memory-entities.js.map +1 -1
- package/dist/src/types/reflexion-framework.d.ts +35 -264
- package/dist/src/types/reflexion-framework.d.ts.map +1 -1
- package/dist/src/types/reflexion-framework.js +1 -1
- package/dist/src/types/reflexion-framework.js.map +1 -1
- package/dist/src/types/state-reinforcement.d.ts +87 -0
- package/dist/src/types/state-reinforcement.d.ts.map +1 -0
- package/dist/src/types/state-reinforcement.js +5 -0
- package/dist/src/types/state-reinforcement.js.map +1 -0
- package/dist/src/types/tiered-response.d.ts +61 -0
- package/dist/src/types/tiered-response.d.ts.map +1 -0
- package/dist/src/types/tiered-response.js +8 -0
- package/dist/src/types/tiered-response.js.map +1 -0
- package/dist/src/types/tool-context.d.ts +50 -0
- package/dist/src/types/tool-context.d.ts.map +1 -0
- package/dist/src/types/tool-context.js +20 -0
- package/dist/src/types/tool-context.js.map +1 -0
- package/dist/src/utils/adr-action-analyzer.d.ts +23 -0
- package/dist/src/utils/adr-action-analyzer.d.ts.map +1 -0
- package/dist/src/utils/adr-action-analyzer.js +323 -0
- package/dist/src/utils/adr-action-analyzer.js.map +1 -0
- package/dist/src/utils/adr-context-detector.d.ts +33 -0
- package/dist/src/utils/adr-context-detector.d.ts.map +1 -0
- package/dist/src/utils/adr-context-detector.js +279 -0
- package/dist/src/utils/adr-context-detector.js.map +1 -0
- package/dist/src/utils/adr-discovery.d.ts +28 -2
- package/dist/src/utils/adr-discovery.d.ts.map +1 -1
- package/dist/src/utils/adr-discovery.js +91 -7
- package/dist/src/utils/adr-discovery.js.map +1 -1
- package/dist/src/utils/adr-knowledge-initializer.d.ts +54 -0
- package/dist/src/utils/adr-knowledge-initializer.d.ts.map +1 -0
- package/dist/src/utils/adr-knowledge-initializer.js +240 -0
- package/dist/src/utils/adr-knowledge-initializer.js.map +1 -0
- package/dist/src/utils/adr-timeline-extractor.d.ts +21 -0
- package/dist/src/utils/adr-timeline-extractor.d.ts.map +1 -0
- package/dist/src/utils/adr-timeline-extractor.js +294 -0
- package/dist/src/utils/adr-timeline-extractor.js.map +1 -0
- package/dist/src/utils/adr-timeline-types.d.ts +234 -0
- package/dist/src/utils/adr-timeline-types.d.ts.map +1 -0
- package/dist/src/utils/adr-timeline-types.js +7 -0
- package/dist/src/utils/adr-timeline-types.js.map +1 -0
- package/dist/src/utils/ai-executor.d.ts +36 -0
- package/dist/src/utils/ai-executor.d.ts.map +1 -1
- package/dist/src/utils/ai-executor.js +39 -3
- package/dist/src/utils/ai-executor.js.map +1 -1
- package/dist/src/utils/apply-cot-enhancement.d.ts.map +1 -1
- package/dist/src/utils/apply-cot-enhancement.js +15 -15
- package/dist/src/utils/apply-cot-enhancement.js.map +1 -1
- package/dist/src/utils/automatic-prompt-engineering.d.ts.map +1 -1
- package/dist/src/utils/automatic-prompt-engineering.js +68 -58
- package/dist/src/utils/automatic-prompt-engineering.js.map +1 -1
- package/dist/src/utils/conditional-request.d.ts +105 -0
- package/dist/src/utils/conditional-request.d.ts.map +1 -0
- package/dist/src/utils/conditional-request.js +186 -0
- package/dist/src/utils/conditional-request.js.map +1 -0
- package/dist/src/utils/config.d.ts +72 -18
- package/dist/src/utils/config.d.ts.map +1 -1
- package/dist/src/utils/config.js +75 -0
- package/dist/src/utils/config.js.map +1 -1
- package/dist/src/utils/context-document-manager.d.ts +112 -0
- package/dist/src/utils/context-document-manager.d.ts.map +1 -0
- package/dist/src/utils/context-document-manager.js +351 -0
- package/dist/src/utils/context-document-manager.js.map +1 -0
- package/dist/src/utils/conversation-memory-manager.d.ts +86 -0
- package/dist/src/utils/conversation-memory-manager.d.ts.map +1 -0
- package/dist/src/utils/conversation-memory-manager.js +443 -0
- package/dist/src/utils/conversation-memory-manager.js.map +1 -0
- package/dist/src/utils/dag-executor.d.ts +106 -0
- package/dist/src/utils/dag-executor.d.ts.map +1 -0
- package/dist/src/utils/dag-executor.js +420 -0
- package/dist/src/utils/dag-executor.js.map +1 -0
- package/dist/src/utils/deployment-analysis.d.ts.map +1 -1
- package/dist/src/utils/deployment-analysis.js +17 -9
- package/dist/src/utils/deployment-analysis.js.map +1 -1
- package/dist/src/utils/deployment-type-registry.d.ts +52 -0
- package/dist/src/utils/deployment-type-registry.d.ts.map +1 -0
- package/dist/src/utils/deployment-type-registry.js +543 -0
- package/dist/src/utils/deployment-type-registry.js.map +1 -0
- package/dist/src/utils/dynamic-deployment-intelligence.d.ts +117 -0
- package/dist/src/utils/dynamic-deployment-intelligence.d.ts.map +1 -0
- package/dist/src/utils/dynamic-deployment-intelligence.js +445 -0
- package/dist/src/utils/dynamic-deployment-intelligence.js.map +1 -0
- package/dist/src/utils/environment-analysis.d.ts.map +1 -1
- package/dist/src/utils/environment-analysis.js +63 -44
- package/dist/src/utils/environment-analysis.js.map +1 -1
- package/dist/src/utils/environment-capability-registry.d.ts +101 -0
- package/dist/src/utils/environment-capability-registry.d.ts.map +1 -0
- package/dist/src/utils/environment-capability-registry.js +489 -0
- package/dist/src/utils/environment-capability-registry.js.map +1 -0
- package/dist/src/utils/index.d.ts +3 -3
- package/dist/src/utils/index.d.ts.map +1 -1
- package/dist/src/utils/index.js +3 -3
- package/dist/src/utils/index.js.map +1 -1
- package/dist/src/utils/knowledge-generation.d.ts.map +1 -1
- package/dist/src/utils/knowledge-generation.js +61 -35
- package/dist/src/utils/knowledge-generation.js.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts +19 -0
- package/dist/src/utils/knowledge-graph-manager.d.ts.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.js +165 -1
- package/dist/src/utils/knowledge-graph-manager.js.map +1 -1
- package/dist/src/utils/llm-artifact-detector.d.ts.map +1 -1
- package/dist/src/utils/llm-artifact-detector.js +28 -24
- package/dist/src/utils/llm-artifact-detector.js.map +1 -1
- package/dist/src/utils/mermaid-diagrams.d.ts +101 -0
- package/dist/src/utils/mermaid-diagrams.d.ts.map +1 -0
- package/dist/src/utils/mermaid-diagrams.js +445 -0
- package/dist/src/utils/mermaid-diagrams.js.map +1 -0
- package/dist/src/utils/monitoring.d.ts +249 -0
- package/dist/src/utils/monitoring.d.ts.map +1 -0
- package/dist/src/utils/monitoring.js +513 -0
- package/dist/src/utils/monitoring.js.map +1 -0
- package/dist/src/utils/pattern-contribution-helper.d.ts +60 -0
- package/dist/src/utils/pattern-contribution-helper.d.ts.map +1 -0
- package/dist/src/utils/pattern-contribution-helper.js +308 -0
- package/dist/src/utils/pattern-contribution-helper.js.map +1 -0
- package/dist/src/utils/pattern-loader.d.ts +183 -0
- package/dist/src/utils/pattern-loader.d.ts.map +1 -0
- package/dist/src/utils/pattern-loader.js +200 -0
- package/dist/src/utils/pattern-loader.js.map +1 -0
- package/dist/src/utils/pattern-research-utility.d.ts +107 -0
- package/dist/src/utils/pattern-research-utility.d.ts.map +1 -0
- package/dist/src/utils/pattern-research-utility.js +360 -0
- package/dist/src/utils/pattern-research-utility.js.map +1 -0
- package/dist/src/utils/pattern-to-dag-converter.d.ts +62 -0
- package/dist/src/utils/pattern-to-dag-converter.d.ts.map +1 -0
- package/dist/src/utils/pattern-to-dag-converter.js +265 -0
- package/dist/src/utils/pattern-to-dag-converter.js.map +1 -0
- package/dist/src/utils/platform-detector.d.ts +86 -0
- package/dist/src/utils/platform-detector.d.ts.map +1 -0
- package/dist/src/utils/platform-detector.js +509 -0
- package/dist/src/utils/platform-detector.js.map +1 -0
- package/dist/src/utils/prompt-composition.d.ts.map +1 -1
- package/dist/src/utils/prompt-composition.js +1 -4
- package/dist/src/utils/prompt-composition.js.map +1 -1
- package/dist/src/utils/reflexion.d.ts.map +1 -1
- package/dist/src/utils/reflexion.js +51 -42
- package/dist/src/utils/reflexion.js.map +1 -1
- package/dist/src/utils/research-integration.d.ts.map +1 -1
- package/dist/src/utils/research-integration.js +8 -2
- package/dist/src/utils/research-integration.js.map +1 -1
- package/dist/src/utils/research-orchestrator.d.ts +209 -0
- package/dist/src/utils/research-orchestrator.d.ts.map +1 -0
- package/dist/src/utils/research-orchestrator.js +863 -0
- package/dist/src/utils/research-orchestrator.js.map +1 -0
- package/dist/src/utils/research-questions.d.ts.map +1 -1
- package/dist/src/utils/research-questions.js +4 -1
- package/dist/src/utils/research-questions.js.map +1 -1
- package/dist/src/utils/resource-extractor.d.ts +57 -0
- package/dist/src/utils/resource-extractor.d.ts.map +1 -0
- package/dist/src/utils/resource-extractor.js +323 -0
- package/dist/src/utils/resource-extractor.js.map +1 -0
- package/dist/src/utils/resource-versioning.d.ts +124 -0
- package/dist/src/utils/resource-versioning.d.ts.map +1 -0
- package/dist/src/utils/resource-versioning.js +272 -0
- package/dist/src/utils/resource-versioning.js.map +1 -0
- package/dist/src/utils/root-manager.d.ts +118 -0
- package/dist/src/utils/root-manager.d.ts.map +1 -0
- package/dist/src/utils/root-manager.js +154 -0
- package/dist/src/utils/root-manager.js.map +1 -0
- package/dist/src/utils/rule-generation.d.ts.map +1 -1
- package/dist/src/utils/rule-generation.js +4 -1
- package/dist/src/utils/rule-generation.js.map +1 -1
- package/dist/src/utils/server-context-generator.d.ts +47 -0
- package/dist/src/utils/server-context-generator.d.ts.map +1 -0
- package/dist/src/utils/server-context-generator.js +666 -0
- package/dist/src/utils/server-context-generator.js.map +1 -0
- package/dist/src/utils/state-reinforcement-manager.d.ts +60 -0
- package/dist/src/utils/state-reinforcement-manager.d.ts.map +1 -0
- package/dist/src/utils/state-reinforcement-manager.js +200 -0
- package/dist/src/utils/state-reinforcement-manager.js.map +1 -0
- package/dist/src/utils/system-card-manager.d.ts +194 -0
- package/dist/src/utils/system-card-manager.d.ts.map +1 -0
- package/dist/src/utils/system-card-manager.js +336 -0
- package/dist/src/utils/system-card-manager.js.map +1 -0
- package/dist/src/utils/tiered-response-manager.d.ts +40 -0
- package/dist/src/utils/tiered-response-manager.d.ts.map +1 -0
- package/dist/src/utils/tiered-response-manager.js +243 -0
- package/dist/src/utils/tiered-response-manager.js.map +1 -0
- package/dist/src/utils/tree-sitter-analyzer.d.ts.map +1 -1
- package/dist/src/utils/tree-sitter-analyzer.js +83 -11
- package/dist/src/utils/tree-sitter-analyzer.js.map +1 -1
- package/dist/src/utils/validated-pattern-definitions.d.ts +219 -0
- package/dist/src/utils/validated-pattern-definitions.d.ts.map +1 -0
- package/dist/src/utils/validated-pattern-definitions.js +1511 -0
- package/dist/src/utils/validated-pattern-definitions.js.map +1 -0
- package/package.json +21 -12
- package/dist/src/prompts/todo-prompts.d.ts +0 -49
- package/dist/src/prompts/todo-prompts.d.ts.map +0 -1
- package/dist/src/prompts/todo-prompts.js +0 -824
- package/dist/src/prompts/todo-prompts.js.map +0 -1
- package/dist/src/types/todo-json-schemas.d.ts +0 -17
- package/dist/src/types/todo-json-schemas.d.ts.map +0 -1
- package/dist/src/types/todo-json-schemas.js +0 -9
- package/dist/src/types/todo-json-schemas.js.map +0 -1
- package/dist/src/utils/todo-file-watcher.d.ts +0 -14
- package/dist/src/utils/todo-file-watcher.d.ts.map +0 -1
- package/dist/src/utils/todo-file-watcher.js +0 -25
- package/dist/src/utils/todo-file-watcher.js.map +0 -1
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic Deployment Intelligence System
|
|
3
|
+
*
|
|
4
|
+
* Instead of static registry, this uses:
|
|
5
|
+
* 1. AI + ResearchOrchestrator to query LIVE documentation
|
|
6
|
+
* 2. Environment detection to see what's actually available
|
|
7
|
+
* 3. Memory system to learn from successful deployments
|
|
8
|
+
* 4. Fallback to basic templates when needed
|
|
9
|
+
*
|
|
10
|
+
* This stays current as software updates daily and best practices evolve.
|
|
11
|
+
*/
|
|
12
|
+
import { ResearchOrchestrator } from './research-orchestrator.js';
|
|
13
|
+
import { MemoryEntityManager } from './memory-entity-manager.js';
|
|
14
|
+
import { EnhancedLogger } from './enhanced-logging.js';
|
|
15
|
+
import { getAIExecutor } from './ai-executor.js';
|
|
16
|
+
import { DEPLOYMENT_TYPES } from './deployment-type-registry.js';
|
|
17
|
+
import { promises as fs } from 'fs';
|
|
18
|
+
import { exec } from 'child_process';
|
|
19
|
+
import { promisify } from 'util';
|
|
20
|
+
import * as path from 'path';
|
|
21
|
+
const execAsync = promisify(exec);
|
|
22
|
+
export class DynamicDeploymentIntelligence {
|
|
23
|
+
research;
|
|
24
|
+
memory;
|
|
25
|
+
logger;
|
|
26
|
+
projectPath;
|
|
27
|
+
adrDirectory;
|
|
28
|
+
constructor(projectPath, adrDirectory) {
|
|
29
|
+
this.projectPath = projectPath;
|
|
30
|
+
this.adrDirectory = adrDirectory;
|
|
31
|
+
this.research = new ResearchOrchestrator(projectPath, adrDirectory);
|
|
32
|
+
this.memory = new MemoryEntityManager();
|
|
33
|
+
this.logger = new EnhancedLogger();
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Generate a comprehensive, AI-powered deployment plan
|
|
37
|
+
* Uses live research + learned patterns + environment detection
|
|
38
|
+
*/
|
|
39
|
+
async generateDeploymentPlan() {
|
|
40
|
+
this.logger.info('Starting dynamic deployment plan generation', 'DynamicDeploymentIntelligence');
|
|
41
|
+
// Step 1: Detect what deployment platforms are available in environment
|
|
42
|
+
const availablePlatforms = await this.detectAvailableDeploymentPlatforms();
|
|
43
|
+
this.logger.info(`Detected available platforms: ${availablePlatforms.join(', ')}`, 'DynamicDeploymentIntelligence');
|
|
44
|
+
// Step 2: Analyze ADRs to understand architecture decisions
|
|
45
|
+
const adrContext = await this.analyzeAdrDeploymentContext();
|
|
46
|
+
// Step 3: Check memory for similar successful deployments
|
|
47
|
+
const learnedPatterns = await this.queryLearnedDeploymentPatterns(availablePlatforms, adrContext);
|
|
48
|
+
// Step 4: If learned pattern exists with high confidence, use it
|
|
49
|
+
if (learnedPatterns && learnedPatterns.confidence > 0.8) {
|
|
50
|
+
this.logger.info('Using learned deployment pattern from memory', 'DynamicDeploymentIntelligence');
|
|
51
|
+
return this.enhanceLearnedPattern(learnedPatterns);
|
|
52
|
+
}
|
|
53
|
+
// Step 5: Research live documentation for current best practices
|
|
54
|
+
const researchResults = await this.researchCurrentDeploymentBestPractices(availablePlatforms, adrContext);
|
|
55
|
+
// Step 6: Use AI to synthesize research + ADRs + environment into deployment plan
|
|
56
|
+
const aiGeneratedPlan = await this.generateAIPoweredDeploymentPlan(availablePlatforms, adrContext, researchResults);
|
|
57
|
+
// Step 7: Store this pattern in memory for future learning
|
|
58
|
+
await this.storeDeploymentPattern(aiGeneratedPlan);
|
|
59
|
+
return aiGeneratedPlan;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Detect which deployment platforms are available in the current environment
|
|
63
|
+
*/
|
|
64
|
+
async detectAvailableDeploymentPlatforms() {
|
|
65
|
+
const platforms = [];
|
|
66
|
+
// Check for various deployment tools
|
|
67
|
+
const checks = [
|
|
68
|
+
{ name: 'docker', command: 'docker --version' },
|
|
69
|
+
{ name: 'kubernetes', command: 'kubectl version --client' },
|
|
70
|
+
{ name: 'openshift', command: 'oc version' },
|
|
71
|
+
{ name: 'firebase', command: 'firebase --version' },
|
|
72
|
+
{ name: 'ansible', command: 'ansible --version' },
|
|
73
|
+
{ name: 'terraform', command: 'terraform --version' },
|
|
74
|
+
{ name: 'npm', command: 'npm --version' },
|
|
75
|
+
{ name: 'python', command: 'python --version' },
|
|
76
|
+
{ name: 'python3', command: 'python3 --version' },
|
|
77
|
+
{ name: 'node', command: 'node --version' },
|
|
78
|
+
{ name: 'pip', command: 'pip --version' },
|
|
79
|
+
{ name: 'uvx', command: 'uvx --version' },
|
|
80
|
+
];
|
|
81
|
+
for (const check of checks) {
|
|
82
|
+
try {
|
|
83
|
+
await execAsync(check.command);
|
|
84
|
+
platforms.push(check.name);
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
// Tool not available
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
// Check for deployment-related files
|
|
91
|
+
const fileChecks = [
|
|
92
|
+
{ name: 'docker', files: ['Dockerfile', 'docker-compose.yml'] },
|
|
93
|
+
{ name: 'kubernetes', files: ['k8s/', 'kubernetes/'] },
|
|
94
|
+
{ name: 'openshift', files: ['openshift/', '.s2i/', 'k8s/', 'kubernetes/'] }, // OpenShift can use k8s dirs too
|
|
95
|
+
{ name: 'firebase', files: ['firebase.json'] },
|
|
96
|
+
{ name: 'mcp-nodejs', files: ['package.json'] }, // Check package.json for MCP dependencies
|
|
97
|
+
{ name: 'fastmcp', files: ['server.py', 'pyproject.toml', 'requirements.txt'] },
|
|
98
|
+
];
|
|
99
|
+
for (const check of fileChecks) {
|
|
100
|
+
for (const file of check.files) {
|
|
101
|
+
try {
|
|
102
|
+
await fs.access(path.join(this.projectPath, file));
|
|
103
|
+
if (!platforms.includes(check.name)) {
|
|
104
|
+
platforms.push(check.name);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
// File doesn't exist
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return platforms;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Analyze ADRs to understand deployment context and requirements
|
|
116
|
+
*/
|
|
117
|
+
async analyzeAdrDeploymentContext() {
|
|
118
|
+
try {
|
|
119
|
+
const { discoverAdrsInDirectory } = await import('./adr-discovery.js');
|
|
120
|
+
const adrs = await discoverAdrsInDirectory(this.adrDirectory, this.projectPath, {
|
|
121
|
+
includeContent: true,
|
|
122
|
+
includeTimeline: false,
|
|
123
|
+
});
|
|
124
|
+
// Extract deployment-related information from ADRs
|
|
125
|
+
const deploymentContext = {
|
|
126
|
+
technologies: new Set(),
|
|
127
|
+
platforms: new Set(),
|
|
128
|
+
requirements: new Set(),
|
|
129
|
+
constraints: new Set(),
|
|
130
|
+
};
|
|
131
|
+
for (const adr of adrs.adrs) {
|
|
132
|
+
const content = adr.content || '';
|
|
133
|
+
// Look for technology mentions
|
|
134
|
+
const techPatterns = [
|
|
135
|
+
/node\.?js/gi,
|
|
136
|
+
/python/gi,
|
|
137
|
+
/docker/gi,
|
|
138
|
+
/kubernetes/gi,
|
|
139
|
+
/k8s/gi,
|
|
140
|
+
/openshift/gi,
|
|
141
|
+
/firebase/gi,
|
|
142
|
+
/mcp[ -]server/gi,
|
|
143
|
+
/fastmcp/gi,
|
|
144
|
+
/@modelcontextprotocol/gi,
|
|
145
|
+
/uvx/gi,
|
|
146
|
+
/ansible/gi,
|
|
147
|
+
];
|
|
148
|
+
for (const pattern of techPatterns) {
|
|
149
|
+
const matches = content.match(pattern);
|
|
150
|
+
if (matches) {
|
|
151
|
+
deploymentContext.technologies.add(matches[0].toLowerCase());
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// Extract requirements
|
|
155
|
+
if (content.includes('Requirements') || content.includes('Constraints')) {
|
|
156
|
+
const lines = content.split('\n');
|
|
157
|
+
for (const line of lines) {
|
|
158
|
+
if (line.includes('must') || line.includes('should') || line.includes('shall')) {
|
|
159
|
+
deploymentContext.requirements.add(line.trim());
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
technologies: Array.from(deploymentContext.technologies),
|
|
166
|
+
platforms: Array.from(deploymentContext.platforms),
|
|
167
|
+
requirements: Array.from(deploymentContext.requirements),
|
|
168
|
+
constraints: Array.from(deploymentContext.constraints),
|
|
169
|
+
totalAdrs: adrs.adrs.length,
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
catch (error) {
|
|
173
|
+
this.logger.warn('Failed to analyze ADR context', 'DynamicDeploymentIntelligence', error);
|
|
174
|
+
return { technologies: [], platforms: [], requirements: [], constraints: [] };
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Query memory system for learned deployment patterns
|
|
179
|
+
*/
|
|
180
|
+
async queryLearnedDeploymentPatterns(platforms, _adrContext) {
|
|
181
|
+
try {
|
|
182
|
+
const result = await this.memory.queryEntities({
|
|
183
|
+
entityTypes: ['knowledge_artifact'],
|
|
184
|
+
limit: 5,
|
|
185
|
+
});
|
|
186
|
+
// Find most similar deployment pattern
|
|
187
|
+
for (const entity of result.entities) {
|
|
188
|
+
// Only process knowledge artifacts that are deployment patterns
|
|
189
|
+
if (entity.type !== 'knowledge_artifact')
|
|
190
|
+
continue;
|
|
191
|
+
try {
|
|
192
|
+
const plan = JSON.parse(entity.artifactData.content);
|
|
193
|
+
// Check if platforms match
|
|
194
|
+
const platformMatch = platforms.some(p => plan.detectedPlatforms?.includes(p));
|
|
195
|
+
if (platformMatch && plan.confidence > 0.8) {
|
|
196
|
+
this.logger.info('Found matching learned pattern', 'DynamicDeploymentIntelligence', {
|
|
197
|
+
patternId: entity.id,
|
|
198
|
+
confidence: plan.confidence,
|
|
199
|
+
});
|
|
200
|
+
return plan;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
catch {
|
|
204
|
+
// Skip entities that don't contain valid deployment plans
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
this.logger.warn('Failed to query learned patterns', 'DynamicDeploymentIntelligence', error);
|
|
212
|
+
return null;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Research current best practices from live documentation
|
|
217
|
+
*/
|
|
218
|
+
async researchCurrentDeploymentBestPractices(platforms, _adrContext) {
|
|
219
|
+
const researchResults = {};
|
|
220
|
+
for (const platform of platforms) {
|
|
221
|
+
try {
|
|
222
|
+
// Research current best practices for this platform
|
|
223
|
+
const result = await this.research.answerResearchQuestion(`What are the current ${platform} deployment best practices and requirements in 2025? Include required files, configuration, and validation steps.`);
|
|
224
|
+
researchResults[platform] = {
|
|
225
|
+
answer: result.answer,
|
|
226
|
+
confidence: result.confidence,
|
|
227
|
+
sources: result.sources,
|
|
228
|
+
};
|
|
229
|
+
this.logger.info(`Researched ${platform} best practices`, 'DynamicDeploymentIntelligence', {
|
|
230
|
+
confidence: result.confidence,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
catch (error) {
|
|
234
|
+
this.logger.warn(`Failed to research ${platform}`, 'DynamicDeploymentIntelligence', error);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return researchResults;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Generate AI-powered deployment plan by synthesizing all inputs
|
|
241
|
+
*/
|
|
242
|
+
async generateAIPoweredDeploymentPlan(platforms, adrContext, researchResults) {
|
|
243
|
+
const prompt = `You are an expert DevOps architect. Generate a comprehensive deployment plan.
|
|
244
|
+
|
|
245
|
+
**Available Platforms**: ${platforms.join(', ')}
|
|
246
|
+
**Project Technologies**: ${adrContext.technologies.join(', ')}
|
|
247
|
+
**ADR Requirements**: ${JSON.stringify(adrContext.requirements, null, 2)}
|
|
248
|
+
|
|
249
|
+
**Latest Research**:
|
|
250
|
+
${JSON.stringify(researchResults, null, 2)}
|
|
251
|
+
|
|
252
|
+
Generate a detailed deployment plan in JSON format with:
|
|
253
|
+
1. detectedPlatforms: array of detected platforms
|
|
254
|
+
2. recommendedPlatform: best platform choice with explanation
|
|
255
|
+
3. confidence: 0-1 confidence score
|
|
256
|
+
4. requiredFiles: array of files needed (path, purpose, required, isSecret, canAutoGenerate, templateContent, validationCommand, currentBestPractice, lastUpdated)
|
|
257
|
+
5. environmentVariables: array of env vars (name, purpose, required, isSecret, defaultValue, validationPattern)
|
|
258
|
+
6. deploymentSteps: ordered array of steps (order, title, command, description, expectedOutput, troubleshooting, estimatedTime)
|
|
259
|
+
7. validationChecks: array of checks (name, command, expectedResult, severity)
|
|
260
|
+
8. architectureDiagram: Mermaid diagram showing deployment flow
|
|
261
|
+
9. risks: array of deployment risks (risk, severity, mitigation, likelihood)
|
|
262
|
+
10. estimatedDuration: total time estimate
|
|
263
|
+
11. prerequisites: array of things needed before deployment
|
|
264
|
+
|
|
265
|
+
Focus on ${platforms[0] || 'docker'} as the primary platform.
|
|
266
|
+
Include current 2025 best practices from the research.
|
|
267
|
+
Make file paths and commands specific and actionable.
|
|
268
|
+
Include complete template content for generated files.`;
|
|
269
|
+
try {
|
|
270
|
+
const aiExecutor = getAIExecutor();
|
|
271
|
+
const result = await aiExecutor.executePrompt(prompt, {
|
|
272
|
+
temperature: 0.3,
|
|
273
|
+
maxTokens: 4000,
|
|
274
|
+
});
|
|
275
|
+
const plan = JSON.parse(result.content);
|
|
276
|
+
return {
|
|
277
|
+
...plan,
|
|
278
|
+
source: 'ai-research',
|
|
279
|
+
researchSources: Object.keys(researchResults),
|
|
280
|
+
timestamp: new Date().toISOString(),
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
catch (error) {
|
|
284
|
+
this.logger.error('Failed to generate AI deployment plan, using fallback', 'DynamicDeploymentIntelligence', error);
|
|
285
|
+
return this.generateFallbackPlan(platforms, adrContext);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Store successful deployment pattern in memory for learning
|
|
290
|
+
*/
|
|
291
|
+
async storeDeploymentPattern(plan) {
|
|
292
|
+
try {
|
|
293
|
+
await this.memory.upsertEntity({
|
|
294
|
+
type: 'knowledge_artifact',
|
|
295
|
+
title: `Deployment Pattern: ${plan.recommendedPlatform}`,
|
|
296
|
+
description: `Deployment plan for ${plan.detectedPlatforms.join(', ')} platforms with ${plan.confidence} confidence`,
|
|
297
|
+
artifactData: {
|
|
298
|
+
artifactType: 'pattern',
|
|
299
|
+
content: JSON.stringify(plan, null, 2),
|
|
300
|
+
format: 'json',
|
|
301
|
+
sourceReliability: plan.confidence,
|
|
302
|
+
applicabilityScope: plan.detectedPlatforms,
|
|
303
|
+
lastValidated: plan.timestamp,
|
|
304
|
+
keyInsights: [
|
|
305
|
+
`Recommended platform: ${plan.recommendedPlatform}`,
|
|
306
|
+
`Confidence: ${plan.confidence}`,
|
|
307
|
+
`Required files: ${plan.requiredFiles.length}`,
|
|
308
|
+
`Deployment steps: ${plan.deploymentSteps.length}`,
|
|
309
|
+
],
|
|
310
|
+
actionableItems: plan.deploymentSteps.slice(0, 5).map((step, index) => ({
|
|
311
|
+
action: step.title,
|
|
312
|
+
priority: index < 2 ? 'high' : 'medium',
|
|
313
|
+
timeframe: step.estimatedTime,
|
|
314
|
+
dependencies: [],
|
|
315
|
+
})),
|
|
316
|
+
},
|
|
317
|
+
});
|
|
318
|
+
this.logger.info('Stored deployment pattern in memory', 'DynamicDeploymentIntelligence');
|
|
319
|
+
}
|
|
320
|
+
catch (error) {
|
|
321
|
+
this.logger.warn('Failed to store deployment pattern', 'DynamicDeploymentIntelligence', error);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Enhance learned pattern with latest information
|
|
326
|
+
*/
|
|
327
|
+
async enhanceLearnedPattern(learnedPattern) {
|
|
328
|
+
// Update timestamp and source
|
|
329
|
+
return {
|
|
330
|
+
...learnedPattern,
|
|
331
|
+
source: 'memory-pattern',
|
|
332
|
+
timestamp: new Date().toISOString(),
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Generate fallback plan using static templates when AI fails
|
|
337
|
+
*/
|
|
338
|
+
generateFallbackPlan(platforms, _adrContext) {
|
|
339
|
+
this.logger.warn('Using fallback deployment plan', 'DynamicDeploymentIntelligence');
|
|
340
|
+
const primaryPlatform = platforms[0] || 'docker';
|
|
341
|
+
const staticTemplate = DEPLOYMENT_TYPES.find(t => t.id === primaryPlatform);
|
|
342
|
+
// If no template found, return minimal plan
|
|
343
|
+
if (!staticTemplate) {
|
|
344
|
+
return {
|
|
345
|
+
detectedPlatforms: platforms,
|
|
346
|
+
recommendedPlatform: primaryPlatform,
|
|
347
|
+
confidence: 0.3,
|
|
348
|
+
requiredFiles: [],
|
|
349
|
+
environmentVariables: [],
|
|
350
|
+
deploymentSteps: [],
|
|
351
|
+
validationChecks: [],
|
|
352
|
+
architectureDiagram: `graph TD\n A[Source Code] --> B[Build]\n B --> C[Deploy]\n C --> D[Validate]`,
|
|
353
|
+
risks: [
|
|
354
|
+
{
|
|
355
|
+
risk: 'No template available for detected platform',
|
|
356
|
+
severity: 'high',
|
|
357
|
+
mitigation: 'Manual configuration required',
|
|
358
|
+
likelihood: 'high',
|
|
359
|
+
},
|
|
360
|
+
],
|
|
361
|
+
estimatedDuration: 'Unknown',
|
|
362
|
+
prerequisites: ['Platform-specific setup'],
|
|
363
|
+
source: 'fallback-template',
|
|
364
|
+
researchSources: [],
|
|
365
|
+
timestamp: new Date().toISOString(),
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
return {
|
|
369
|
+
detectedPlatforms: platforms,
|
|
370
|
+
recommendedPlatform: primaryPlatform,
|
|
371
|
+
confidence: 0.5,
|
|
372
|
+
requiredFiles: staticTemplate.requiredFiles.map(f => {
|
|
373
|
+
const fileReq = {
|
|
374
|
+
path: f.path,
|
|
375
|
+
purpose: f.description,
|
|
376
|
+
required: f.required,
|
|
377
|
+
isSecret: f.isSecret,
|
|
378
|
+
canAutoGenerate: f.canAutoGenerate,
|
|
379
|
+
currentBestPractice: 'Using fallback template - update recommended',
|
|
380
|
+
lastUpdated: new Date().toISOString(),
|
|
381
|
+
};
|
|
382
|
+
// Only add optional properties if they have values
|
|
383
|
+
if (f.templateContent) {
|
|
384
|
+
fileReq.templateContent = f.templateContent;
|
|
385
|
+
}
|
|
386
|
+
if (f.validationRules?.[0]) {
|
|
387
|
+
fileReq.validationCommand = f.validationRules[0];
|
|
388
|
+
}
|
|
389
|
+
return fileReq;
|
|
390
|
+
}),
|
|
391
|
+
environmentVariables: staticTemplate.environmentVariables.map(e => ({
|
|
392
|
+
name: e.name,
|
|
393
|
+
purpose: e.description,
|
|
394
|
+
required: e.required,
|
|
395
|
+
isSecret: e.isSecret,
|
|
396
|
+
})),
|
|
397
|
+
deploymentSteps: staticTemplate.deploymentCommands.map((cmd, i) => ({
|
|
398
|
+
order: i + 1,
|
|
399
|
+
title: `Step ${i + 1}`,
|
|
400
|
+
command: cmd,
|
|
401
|
+
description: `Execute ${cmd}`,
|
|
402
|
+
expectedOutput: 'Success',
|
|
403
|
+
troubleshooting: ['Check logs', 'Verify prerequisites'],
|
|
404
|
+
estimatedTime: '5 minutes',
|
|
405
|
+
})),
|
|
406
|
+
validationChecks: staticTemplate.validationCommands.map(cmd => ({
|
|
407
|
+
name: `Validate ${cmd}`,
|
|
408
|
+
command: cmd,
|
|
409
|
+
expectedResult: 'No errors',
|
|
410
|
+
severity: 'error',
|
|
411
|
+
})),
|
|
412
|
+
architectureDiagram: `graph TD\n A[Source Code] --> B[Build]\n B --> C[Deploy]\n C --> D[Validate]`,
|
|
413
|
+
risks: [
|
|
414
|
+
{
|
|
415
|
+
risk: 'Using fallback template - may be outdated',
|
|
416
|
+
severity: 'medium',
|
|
417
|
+
mitigation: 'Update to AI-generated plan when possible',
|
|
418
|
+
likelihood: 'high',
|
|
419
|
+
},
|
|
420
|
+
],
|
|
421
|
+
estimatedDuration: '30-60 minutes',
|
|
422
|
+
prerequisites: ['Platform tools installed', 'Credentials configured'],
|
|
423
|
+
source: 'fallback-template',
|
|
424
|
+
researchSources: [],
|
|
425
|
+
timestamp: new Date().toISOString(),
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Update a deployment plan with post-execution learnings
|
|
430
|
+
*/
|
|
431
|
+
async updatePlanWithLearnings(plan, executionResult, _learnings) {
|
|
432
|
+
const updatedPlan = { ...plan };
|
|
433
|
+
// Increase confidence if deployment was successful
|
|
434
|
+
if (executionResult.success) {
|
|
435
|
+
updatedPlan.confidence = Math.min(1.0, updatedPlan.confidence + 0.1);
|
|
436
|
+
}
|
|
437
|
+
else {
|
|
438
|
+
updatedPlan.confidence = Math.max(0.3, updatedPlan.confidence - 0.1);
|
|
439
|
+
}
|
|
440
|
+
// Store updated pattern
|
|
441
|
+
await this.storeDeploymentPattern(updatedPlan);
|
|
442
|
+
return updatedPlan;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
//# sourceMappingURL=dynamic-deployment-intelligence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-deployment-intelligence.js","sourceRoot":"","sources":["../../../src/utils/dynamic-deployment-intelligence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;AAgElC,MAAM,OAAO,6BAA6B;IAChC,QAAQ,CAAuB;IAC/B,MAAM,CAAsB;IAC5B,MAAM,CAAiB;IACvB,WAAW,CAAS;IACpB,YAAY,CAAS;IAE7B,YAAY,WAAmB,EAAE,YAAoB;QACnD,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,IAAI,oBAAoB,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QAC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ACd,QAAQ,EAAE,GAAG,CAAC;IACd,WAAW,EAAE,GAAG,CAAC;IACjB,uBAAuB,EAAE,GAAG,CAAC;IAC7B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,eAAe,EAAE,GAAG,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,GAAG,CAAC;IACpB,iBAAiB,EAAE,GAAG,EAAE,CAAC;IACzB,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,SAAS,EAAE,GAAG,EAAE,CAAC;IACjB,eAAe,EAAE,GAAG,EAAE,CAAC;IACvB,eAAe,EAAE,GAAG,CAAC;IACrB,cAAc,EAAE,GAAG,CAAC;IACpB,iBAAiB,EAAE,GAAG,CAAC;CACxB;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"environment-analysis.d.ts","sourceRoot":"","sources":["../../../src/utils/environment-analysis.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA+BH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;CAClF;AAED,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EA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MAAsB,GAClC,OAAO,CAAC;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,CA+F5D;AAED;;GAEG;AACH,wBAAsB,gCAAgC,CACpD,YAAY,GAAE,MAAoB,EAClC,WAAW,GAAE,MAAsB,GAClC,OAAO,CAAC;IAAE,kBAAkB,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,CAsG/D;AAED;;GAEG;AACH,wBAAsB,2BAA2B,CAC/C,kBAAkB,EAAE,GAAG,EACvB,YAAY,EAAE,GAAG,EACjB,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAC3B,OAAO,CAAC;IAAE,gBAAgB,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC,CA2D7D;AAED;;;GAGG"}
|
|
@@ -9,23 +9,23 @@ import { McpAdrError } from '../types/index.js';
|
|
|
9
9
|
function getFileExtension(filename) {
|
|
10
10
|
const ext = filename.split('.').pop()?.toLowerCase();
|
|
11
11
|
const mapping = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
json: 'json',
|
|
13
|
+
yml: 'yaml',
|
|
14
|
+
yaml: 'yaml',
|
|
15
|
+
js: 'javascript',
|
|
16
|
+
ts: 'typescript',
|
|
17
|
+
py: 'python',
|
|
18
|
+
md: 'markdown',
|
|
19
|
+
dockerfile: 'dockerfile',
|
|
20
|
+
toml: 'toml',
|
|
21
|
+
xml: 'xml',
|
|
22
|
+
sh: 'bash',
|
|
23
|
+
bash: 'bash',
|
|
24
|
+
zsh: 'bash',
|
|
25
|
+
fish: 'fish',
|
|
26
|
+
ps1: 'powershell',
|
|
27
|
+
bat: 'batch',
|
|
28
|
+
cmd: 'batch',
|
|
29
29
|
};
|
|
30
30
|
return mapping[ext || ''] || 'bash'; // Default to bash for script files
|
|
31
31
|
}
|
|
@@ -50,58 +50,77 @@ Based on actual file system analysis, here are the findings:
|
|
|
50
50
|
- **Directories**: ${projectStructure.directories.join(', ')}
|
|
51
51
|
|
|
52
52
|
## Package Management
|
|
53
|
-
${projectStructure.packageFiles.length > 0
|
|
54
|
-
projectStructure.packageFiles
|
|
53
|
+
${projectStructure.packageFiles.length > 0
|
|
54
|
+
? projectStructure.packageFiles
|
|
55
|
+
.map(f => `
|
|
55
56
|
### ${f.filename}
|
|
56
57
|
\`\`\`${getFileExtension(f.filename)}
|
|
57
58
|
${f.content.slice(0, 1000)}${f.content.length > 1000 ? '\n... (truncated)' : ''}
|
|
58
59
|
\`\`\`
|
|
59
|
-
`)
|
|
60
|
+
`)
|
|
61
|
+
.join('\n')
|
|
62
|
+
: '- No package files found'}
|
|
60
63
|
|
|
61
64
|
## Docker Configuration
|
|
62
|
-
${projectStructure.dockerFiles.length > 0
|
|
63
|
-
projectStructure.dockerFiles
|
|
65
|
+
${projectStructure.dockerFiles.length > 0
|
|
66
|
+
? projectStructure.dockerFiles
|
|
67
|
+
.map(f => `
|
|
64
68
|
### ${f.filename}
|
|
65
69
|
\`\`\`${getFileExtension(f.filename)}
|
|
66
70
|
${f.content.slice(0, 1000)}${f.content.length > 1000 ? '\n... (truncated)' : ''}
|
|
67
71
|
\`\`\`
|
|
68
|
-
`)
|
|
72
|
+
`)
|
|
73
|
+
.join('\n')
|
|
74
|
+
: '- No Docker files found'}
|
|
69
75
|
|
|
70
76
|
## Environment Configuration
|
|
71
|
-
${environmentFiles.filter(f => f.filename.includes('.env')).length > 0
|
|
72
|
-
environmentFiles
|
|
77
|
+
${environmentFiles.filter(f => f.filename.includes('.env')).length > 0
|
|
78
|
+
? environmentFiles
|
|
79
|
+
.filter(f => f.filename.includes('.env'))
|
|
80
|
+
.map(f => `
|
|
73
81
|
### ${f.filename}
|
|
74
82
|
\`\`\`bash
|
|
75
83
|
${f.content.slice(0, 500)}${f.content.length > 500 ? '\n... (truncated)' : ''}
|
|
76
84
|
\`\`\`
|
|
77
|
-
`)
|
|
85
|
+
`)
|
|
86
|
+
.join('\n')
|
|
87
|
+
: '- No environment files found'}
|
|
78
88
|
|
|
79
89
|
## Kubernetes Manifests
|
|
80
|
-
${projectStructure.kubernetesFiles.length > 0
|
|
81
|
-
projectStructure.kubernetesFiles
|
|
90
|
+
${projectStructure.kubernetesFiles.length > 0
|
|
91
|
+
? projectStructure.kubernetesFiles
|
|
92
|
+
.map(f => `
|
|
82
93
|
### ${f.filename}
|
|
83
94
|
\`\`\`yaml
|
|
84
95
|
${f.content.slice(0, 800)}${f.content.length > 800 ? '\n... (truncated)' : ''}
|
|
85
96
|
\`\`\`
|
|
86
|
-
`)
|
|
97
|
+
`)
|
|
98
|
+
.join('\n')
|
|
99
|
+
: '- No Kubernetes manifests found'}
|
|
87
100
|
|
|
88
101
|
## CI/CD Configuration
|
|
89
|
-
${projectStructure.ciFiles.length > 0
|
|
90
|
-
projectStructure.ciFiles
|
|
102
|
+
${projectStructure.ciFiles.length > 0
|
|
103
|
+
? projectStructure.ciFiles
|
|
104
|
+
.map(f => `
|
|
91
105
|
### ${f.filename}
|
|
92
106
|
\`\`\`yaml
|
|
93
107
|
${f.content.slice(0, 600)}${f.content.length > 600 ? '\n... (truncated)' : ''}
|
|
94
108
|
\`\`\`
|
|
95
|
-
`)
|
|
109
|
+
`)
|
|
110
|
+
.join('\n')
|
|
111
|
+
: '- No CI/CD files found'}
|
|
96
112
|
|
|
97
113
|
## Shell Scripts & Automation
|
|
98
|
-
${projectStructure.scriptFiles.length > 0
|
|
99
|
-
projectStructure.scriptFiles
|
|
114
|
+
${projectStructure.scriptFiles.length > 0
|
|
115
|
+
? projectStructure.scriptFiles
|
|
116
|
+
.map(f => `
|
|
100
117
|
### ${f.filename}
|
|
101
118
|
\`\`\`${getFileExtension(f.filename)}
|
|
102
119
|
${f.content.slice(0, 800)}${f.content.length > 800 ? '\n... (truncated)' : ''}
|
|
103
120
|
\`\`\`
|
|
104
|
-
`)
|
|
121
|
+
`)
|
|
122
|
+
.join('\n')
|
|
123
|
+
: '- No shell scripts found'}
|
|
105
124
|
|
|
106
125
|
## Analysis Requirements
|
|
107
126
|
|
|
@@ -170,9 +189,9 @@ const result = await analyzeEnvironmentSpecs(projectPath);
|
|
|
170
189
|
kubernetesFiles: projectStructure.kubernetesFiles.length,
|
|
171
190
|
ciFiles: projectStructure.ciFiles.length,
|
|
172
191
|
scriptFiles: projectStructure.scriptFiles.length,
|
|
173
|
-
environmentFiles: environmentFiles.length
|
|
174
|
-
}
|
|
175
|
-
}
|
|
192
|
+
environmentFiles: environmentFiles.length,
|
|
193
|
+
},
|
|
194
|
+
},
|
|
176
195
|
};
|
|
177
196
|
}
|
|
178
197
|
catch (error) {
|
|
@@ -188,13 +207,10 @@ export async function detectContainerization(projectPath = process.cwd()) {
|
|
|
188
207
|
// Use actual project structure scanning
|
|
189
208
|
const projectStructure = await scanProjectStructure(projectPath, {
|
|
190
209
|
readContent: true,
|
|
191
|
-
includeHidden: false
|
|
210
|
+
includeHidden: false,
|
|
192
211
|
});
|
|
193
212
|
// Get container-related files
|
|
194
|
-
const containerFiles = [
|
|
195
|
-
...projectStructure.dockerFiles,
|
|
196
|
-
...projectStructure.kubernetesFiles
|
|
197
|
-
];
|
|
213
|
+
const containerFiles = [...projectStructure.dockerFiles, ...projectStructure.kubernetesFiles];
|
|
198
214
|
let containerAnalysis = '';
|
|
199
215
|
if (containerFiles.length > 0) {
|
|
200
216
|
containerAnalysis = `Found ${containerFiles.length} container-related files:\n\n`;
|
|
@@ -287,7 +303,10 @@ export async function determineEnvironmentRequirements(adrDirectory = 'docs/adrs
|
|
|
287
303
|
? adrDirectory
|
|
288
304
|
: path.resolve(projectPath, adrDirectory);
|
|
289
305
|
// Use actual ADR discovery
|
|
290
|
-
const discoveryResult = await discoverAdrsInDirectory(absoluteAdrPath,
|
|
306
|
+
const discoveryResult = await discoverAdrsInDirectory(absoluteAdrPath, projectPath, {
|
|
307
|
+
includeContent: true,
|
|
308
|
+
includeTimeline: false,
|
|
309
|
+
});
|
|
291
310
|
let adrAnalysis = '';
|
|
292
311
|
if (discoveryResult.adrs.length > 0) {
|
|
293
312
|
adrAnalysis = `Found ${discoveryResult.adrs.length} ADRs to analyze for environment requirements:\n\n`;
|