@vfarcic/dot-ai 0.116.0 → 0.118.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/README.md +91 -137
  2. package/dist/core/ai-provider-factory.d.ts +4 -2
  3. package/dist/core/ai-provider-factory.d.ts.map +1 -1
  4. package/dist/core/ai-provider-factory.js +17 -6
  5. package/dist/core/capability-operations.js +1 -1
  6. package/dist/core/generic-session-manager.d.ts +67 -0
  7. package/dist/core/generic-session-manager.d.ts.map +1 -0
  8. package/dist/core/generic-session-manager.js +192 -0
  9. package/dist/core/pattern-operations.js +1 -1
  10. package/dist/core/providers/noop-provider.d.ts +47 -0
  11. package/dist/core/providers/noop-provider.d.ts.map +1 -0
  12. package/dist/core/providers/noop-provider.js +63 -0
  13. package/dist/core/schema.d.ts.map +1 -1
  14. package/dist/core/schema.js +13 -13
  15. package/dist/core/session-utils.d.ts +3 -6
  16. package/dist/core/session-utils.d.ts.map +1 -1
  17. package/dist/core/session-utils.js +5 -13
  18. package/dist/core/shared-prompt-loader.d.ts +15 -3
  19. package/dist/core/shared-prompt-loader.d.ts.map +1 -1
  20. package/dist/core/shared-prompt-loader.js +67 -14
  21. package/dist/core/unified-creation-session.d.ts +3 -10
  22. package/dist/core/unified-creation-session.d.ts.map +1 -1
  23. package/dist/core/unified-creation-session.js +34 -75
  24. package/dist/core/unified-creation-types.d.ts +31 -22
  25. package/dist/core/unified-creation-types.d.ts.map +1 -1
  26. package/dist/interfaces/mcp.d.ts.map +1 -1
  27. package/dist/interfaces/mcp.js +9 -34
  28. package/dist/tools/answer-question.d.ts.map +1 -1
  29. package/dist/tools/answer-question.js +12 -12
  30. package/dist/tools/choose-solution.js +1 -1
  31. package/dist/tools/generate-manifests.d.ts.map +1 -1
  32. package/dist/tools/generate-manifests.js +9 -10
  33. package/dist/tools/index.d.ts +1 -1
  34. package/dist/tools/index.d.ts.map +1 -1
  35. package/dist/tools/index.js +6 -6
  36. package/dist/tools/organizational-data.js +12 -12
  37. package/dist/tools/project-setup/discovery.d.ts +15 -0
  38. package/dist/tools/project-setup/discovery.d.ts.map +1 -0
  39. package/dist/tools/project-setup/discovery.js +104 -0
  40. package/dist/tools/project-setup/generate-scope.d.ts +15 -0
  41. package/dist/tools/project-setup/generate-scope.d.ts.map +1 -0
  42. package/dist/tools/project-setup/generate-scope.js +237 -0
  43. package/dist/tools/project-setup/report-scan.d.ts +15 -0
  44. package/dist/tools/project-setup/report-scan.d.ts.map +1 -0
  45. package/dist/tools/project-setup/report-scan.js +156 -0
  46. package/dist/tools/project-setup/types.d.ts +111 -0
  47. package/dist/tools/project-setup/types.d.ts.map +1 -0
  48. package/dist/tools/project-setup/types.js +8 -0
  49. package/dist/tools/project-setup.d.ts +28 -0
  50. package/dist/tools/project-setup.d.ts.map +1 -0
  51. package/dist/tools/project-setup.js +134 -0
  52. package/dist/tools/recommend.js +1 -1
  53. package/dist/tools/remediate.js +1 -1
  54. package/dist/tools/version.d.ts +0 -7
  55. package/dist/tools/version.d.ts.map +1 -1
  56. package/dist/tools/version.js +5 -34
  57. package/package.json +4 -2
  58. package/prompts/capability-inference.md +2 -2
  59. package/prompts/infrastructure-trigger-expansion.md +2 -2
  60. package/prompts/intent-analysis.md +2 -2
  61. package/prompts/kyverno-generation.md +14 -14
  62. package/prompts/manifest-generation.md +5 -5
  63. package/prompts/map-intent-to-operation.md +2 -2
  64. package/prompts/pattern-complete-error.md +1 -1
  65. package/prompts/pattern-complete-success.md +4 -4
  66. package/prompts/pattern-rationale.md +1 -1
  67. package/prompts/pattern-resources.md +1 -1
  68. package/prompts/pattern-review.md +5 -5
  69. package/prompts/policy-complete-apply.md +4 -4
  70. package/prompts/policy-complete-discard.md +1 -1
  71. package/prompts/policy-complete-error.md +1 -1
  72. package/prompts/policy-complete-save.md +4 -4
  73. package/prompts/policy-complete-success.md +4 -4
  74. package/prompts/policy-namespace-scope.md +1 -1
  75. package/prompts/question-generation.md +5 -5
  76. package/prompts/resource-analysis.md +3 -3
  77. package/prompts/resource-selection.md +3 -3
  78. package/prompts/solution-enhancement.md +4 -4
  79. package/scripts/anthropic.nu +9 -13
  80. package/scripts/common.nu +31 -33
  81. package/scripts/ingress.nu +5 -4
  82. package/scripts/kubernetes.nu +38 -53
  83. package/shared-prompts/prd-create.md +15 -1
  84. package/shared-prompts/prd-done.md +1 -0
  85. package/shared-prompts/prd-next.md +0 -2
  86. package/shared-prompts/prd-start.md +2 -2
  87. package/dist/core/doc-discovery.d.ts +0 -38
  88. package/dist/core/doc-discovery.d.ts.map +0 -1
  89. package/dist/core/doc-discovery.js +0 -231
  90. package/dist/core/doc-testing-session.d.ts +0 -109
  91. package/dist/core/doc-testing-session.d.ts.map +0 -1
  92. package/dist/core/doc-testing-session.js +0 -696
  93. package/dist/core/doc-testing-types.d.ts +0 -127
  94. package/dist/core/doc-testing-types.d.ts.map +0 -1
  95. package/dist/core/doc-testing-types.js +0 -53
  96. package/dist/core/nushell-runtime.d.ts +0 -39
  97. package/dist/core/nushell-runtime.d.ts.map +0 -1
  98. package/dist/core/nushell-runtime.js +0 -103
  99. package/dist/core/platform-operations.d.ts +0 -70
  100. package/dist/core/platform-operations.d.ts.map +0 -1
  101. package/dist/core/platform-operations.js +0 -294
  102. package/dist/tools/build-platform.d.ts +0 -25
  103. package/dist/tools/build-platform.d.ts.map +0 -1
  104. package/dist/tools/build-platform.js +0 -277
  105. package/dist/tools/test-docs.d.ts +0 -22
  106. package/dist/tools/test-docs.d.ts.map +0 -1
  107. package/dist/tools/test-docs.js +0 -351
  108. package/prompts/doc-testing-done.md +0 -51
  109. package/prompts/doc-testing-fix.md +0 -120
  110. package/prompts/doc-testing-scan.md +0 -140
  111. package/prompts/doc-testing-test-section.md +0 -169
  112. package/prompts/platform-operations-parse-script-help.md +0 -68
  113. package/scripts/ack.nu +0 -195
  114. package/scripts/argo-workflows.nu +0 -47
  115. package/scripts/argocd.nu +0 -85
  116. package/scripts/aso.nu +0 -74
  117. package/scripts/backstage.nu +0 -349
  118. package/scripts/cert-manager.nu +0 -13
  119. package/scripts/cnpg.nu +0 -14
  120. package/scripts/dot.nu +0 -32
  121. package/scripts/external-secrets.nu +0 -110
  122. package/scripts/gatekeeper.nu +0 -19
  123. package/scripts/github.nu +0 -42
  124. package/scripts/image.nu +0 -67
  125. package/scripts/kro.nu +0 -11
  126. package/scripts/kubevela.nu +0 -22
  127. package/scripts/port.nu +0 -71
  128. package/scripts/prometheus.nu +0 -21
  129. package/scripts/registry.nu +0 -55
  130. package/scripts/storage.nu +0 -210
  131. package/scripts/tests.nu +0 -12
  132. package/scripts/velero.nu +0 -45
  133. package/shared-prompts/validate-docs.md +0 -22
package/README.md CHANGED
@@ -4,143 +4,81 @@
4
4
 
5
5
  ![DevOps AI Toolkit Logo](assets/images/logo.png)
6
6
 
7
+ [![npm version](https://badge.fury.io/js/%40vfarcic%2Fdot-ai.svg)](https://www.npmjs.com/package/@vfarcic/dot-ai)
8
+ [![npm downloads](https://img.shields.io/npm/dm/@vfarcic/dot-ai.svg)](https://www.npmjs.com/package/@vfarcic/dot-ai)
9
+ [![GitHub release](https://img.shields.io/github/release/vfarcic/dot-ai.svg)](https://github.com/vfarcic/dot-ai/releases/latest)
10
+ [![License](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
11
+ ![Project Status](https://img.shields.io/badge/status-beta-orange)
12
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/vfarcic/dot-ai/badge)](https://scorecard.dev/viewer/?uri=github.com/vfarcic/dot-ai)
13
+ [![GitHub stars](https://img.shields.io/github/stars/vfarcic/dot-ai.svg?style=social&label=Star)](https://github.com/vfarcic/dot-ai)
14
+
7
15
  </div>
8
16
 
9
- DevOps AI Toolkit is an AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance.
17
+ **AI-powered platform engineering and DevOps automation through intelligent Kubernetes operations and conversational workflows.**
10
18
 
11
19
  📚 [Quick Start](./docs/quick-start.md) | 🔧 [MCP Setup](./docs/mcp-setup.md) | 🛠️ [Features & Tools](./docs/mcp-tools-overview.md)
12
20
 
13
- ## Who is this for?
14
-
15
- ### Kubernetes Deployment
16
- - **Developers**: Deploy applications without needing deep Kubernetes expertise
17
- - **Platform Engineers**: Create organizational deployment patterns that enhance AI recommendations with institutional knowledge and best practices, and scan cluster resources to enable semantic matching for dramatically improved recommendation accuracy
18
- - **Security Engineers**: Define governance policies that integrate into deployment workflows with optional Kyverno enforcement
19
-
20
- ### Kubernetes Issue Remediation
21
- - **DevOps Engineers**: Quickly diagnose and fix Kubernetes issues without deep troubleshooting expertise
22
- - **SRE Teams**: Automate root cause analysis and generate executable remediation commands
23
- - **Support Teams**: Handle incident response with AI-guided investigation and repair workflows
24
-
25
- <!--
26
- ### Platform Building
27
- DEVELOPER NOTE: This tool is under active development with incomplete functionality. Not recommended for production use.
28
- - **Platform Engineers**: Install and configure platform tools conversationally without memorizing script paths and commands
29
- - **New Team Members**: Build platform infrastructure through zero-knowledge guided workflows
30
- - **DevOps Teams**: Create and manage Kubernetes clusters through natural language interactions
31
- -->
32
-
33
- ### Documentation Testing
34
- - **Documentation Maintainers**: Automatically validate documentation accuracy and catch outdated content
35
- - **Technical Writers**: Identify which sections need updates and prioritize work effectively
36
- - **Open Source Maintainers**: Ensure documentation works correctly for new contributors
21
+ ---
37
22
 
38
- ### Shared Prompts Library
39
- - **Development Teams**: Share proven prompts across projects without file management
40
- - **Project Managers**: Standardize workflows with consistent prompt usage across teams
41
- - **Individual Developers**: Access curated prompt library via native slash commands
23
+ ## What is DevOps AI Toolkit?
42
24
 
43
- ### AI Integration
44
- - **AI Agents**: Integrate all capabilities with Claude Code, Cursor, or VS Code for conversational workflows
45
- - **REST API**: Access all tools via standard HTTP endpoints for CI/CD pipelines, automation scripts, and traditional applications
25
+ DevOps AI Toolkit brings AI-powered intelligence to platform engineering, Kubernetes operations, and development workflows. It provides intelligent Kubernetes deployment recommendations through capability discovery and semantic matching, AI-powered issue remediation, automated repository setup with governance and security files, and shared prompt libraries for consistent development workflows—all through natural language conversation.
46
26
 
47
- ## Key Features
27
+ Built on the Model Context Protocol (MCP), it integrates seamlessly with Claude Code, Cursor, and VS Code to provide conversational interaction for complex DevOps and development tasks.
48
28
 
49
- ### Kubernetes Deployment Intelligence
50
- 🔍 **Smart Discovery**: Automatically finds all available resources and operators in your cluster
51
- 🧠 **Semantic Capability Management**: Discovers what each resource actually does for intelligent matching
52
- 🤖 **AI Recommendations**: Smart intent clarification gathers missing context, then provides deployment suggestions tailored to your specific cluster setup with enhanced semantic understanding
53
- 🔧 **Operator-Aware**: Leverages custom operators and CRDs when available
54
- 🚀 **Complete Workflow**: From discovery to deployment with automated Kubernetes integration
29
+ ## Mission
55
30
 
56
- 📖 [Learn more →](./docs/mcp-recommendation-guide.md)
31
+ DevOps AI Toolkit democratizes platform engineering and cloud native operations by making complex workflows accessible through AI-powered automation. We eliminate the expertise barrier that prevents teams from adopting best practices in Kubernetes operations, repository governance, and standardized development workflows—making professional-grade DevOps accessible through natural language interaction.
57
32
 
58
- #### Capability-Enhanced Recommendations
59
- Transform how AI understands your cluster by discovering semantic capabilities of each resource:
33
+ ## Who Should Use This?
60
34
 
61
- **The Problem**: Traditional discovery sees `sqls.devopstoolkit.live` as a meaningless name among hundreds of resources.
35
+ **DevOps AI Toolkit is for teams who want to**:
36
+ - Manage cloud resources (AWS, Azure, GCP) using Kubernetes as a control plane (developers, platform engineers)
37
+ - Quickly diagnose and fix cluster and infrastructure issues (SREs, DevOps engineers)
38
+ - Standardize resource provisioning with organizational patterns and policies (security engineers, platform teams)
39
+ - Bootstrap repositories with governance and security files (project maintainers)
40
+ - Access curated development prompts through native slash commands (development teams)
62
41
 
63
- **The Solution**: Capability management teaches the system that `sqls.devopstoolkit.live` handles PostgreSQL databases with multi-cloud support.
42
+ ## Scope
64
43
 
65
- **Before Capability Management:**
66
- ```
67
- User: "I need a PostgreSQL database"
68
- AI: Gets 400+ generic resource names picks complex multi-resource solution
69
- Result: Misses optimal single-resource solutions
70
- ```
44
+ ### In Scope
45
+ - AI-powered resource provisioning recommendations using Kubernetes as control plane
46
+ - Intelligent issue remediation and root cause analysis
47
+ - Organizational pattern and policy management with semantic search
48
+ - MCP-based integration with AI coding assistants
49
+ - Multi-provider AI model support (Claude, GPT, Gemini)
50
+ - Project setup with governance, legal, and security files
71
51
 
72
- **After Capability Management:**
73
- ```
74
- User: "I need a PostgreSQL database"
75
- AI: Gets pre-filtered relevant resources with rich context
76
- Result: Finds sqls.devopstoolkit.live as perfect match ✨
77
- ```
52
+ ### Out of Scope
53
+ - Kubernetes cluster provisioning/management (delegates to existing tools)
54
+ - CI/CD pipeline execution (provides recommendations only)
55
+ - Application runtime monitoring (integrates with existing observability tools)
78
56
 
79
- 📖 [Learn more →](./docs/mcp-capability-management-guide.md)
57
+ ## Key Features
80
58
 
81
- ### Kubernetes Issue Remediation
82
- 🔍 **AI-Powered Root Cause Analysis**: Multi-step investigation loop identifies the real cause behind Kubernetes failures
83
- 🛠️ **Executable Remediation**: Generates specific kubectl commands with risk assessment and validation
84
- ⚡ **Dual Execution Modes**: Manual approval workflow or automatic execution based on confidence thresholds
85
- 🔒 **Safety Mechanisms**: Automatic fallback to manual mode when validation discovers additional issues
86
- 🎯 **Cross-Resource Intelligence**: Understands how pod issues may require fixes in different resource types (storage, networking, etc.)
59
+ ### 🔍 Resource Provisioning Intelligence
60
+ Automatically discovers cluster resources using semantic capability management. AI understands what each resource actually does, providing intelligent recommendations for provisioning resources across clouds using Kubernetes as a control plane.
61
+ 📖 [Deployment Guide](./docs/mcp-recommendation-guide.md) | [Capability Management](./docs/mcp-capability-management-guide.md)
87
62
 
63
+ ### 🛠️ Issue Remediation
64
+ AI-powered root cause analysis with multi-step investigation, executable remediation commands, and safety mechanisms for manual or automatic execution.
88
65
  📖 [Learn more →](./docs/mcp-remediate-guide.md)
89
66
 
90
- <!--
91
- ### Platform Building
92
- DEVELOPER NOTE: This tool is under active development with incomplete functionality. Not recommended for production use.
93
- 🗣️ **Natural Language Operations**: Install tools and create clusters through conversation without memorizing commands
94
- 🔍 **Dynamic Discovery**: Automatically discovers 21+ available platform operations from infrastructure scripts
95
- 🤖 **AI-Powered Intent Mapping**: Understands variations like "Install Argo CD", "Set up ArgoCD", "Deploy Argo CD"
96
- 💬 **Conversational Configuration**: Guides through parameter collection step-by-step with sensible defaults
97
- 🎯 **Zero-Knowledge Onboarding**: New users successfully build platforms without documentation
98
-
99
- 📖 [Learn more →](./docs/mcp-build-platform-guide.md)
100
- -->
101
-
102
- ### Documentation Testing & Validation
103
- 📖 **Automated Testing**: Validates documentation by executing commands and testing examples
104
- 🔍 **Two-Phase Validation**: Tests both functionality (does it work?) and semantic accuracy (are descriptions truthful?)
105
- 🛠️ **Fix Application**: User-driven selection and application of recommended documentation improvements
106
- 💾 **Session Management**: Resumable testing workflows for large documentation sets
107
-
108
- 📖 [Learn more →](./docs/mcp-documentation-testing-guide.md)
109
-
110
- ### Organizational Pattern Management
111
- 🏛️ **Pattern Creation**: Define organizational deployment patterns that capture institutional knowledge
112
- 🧠 **AI Enhancement**: Patterns automatically enhance deployment recommendations with organizational context
113
- 🔍 **Semantic Search**: Uses Vector DB (Qdrant) for intelligent pattern matching based on user intent
114
- 📋 **Best Practices**: Share deployment standards across teams through reusable patterns
115
-
116
- 📖 [Learn more →](./docs/pattern-management-guide.md)
117
-
118
- ### Policy Management & Governance
119
- 🛡️ **Policy Creation**: Define governance policies that guide users toward compliant configurations
120
- ⚠️ **Compliance Integration**: Policies create required questions with compliance indicators during deployment
121
- 🤖 **Kyverno Generation**: Automatically generates Kyverno ClusterPolicies for active enforcement
122
- 🎯 **Proactive Governance**: Prevents configuration drift by embedding compliance into the recommendation workflow
123
- 🔍 **Vector Storage**: Uses Qdrant Vector DB for semantic policy matching and retrieval
124
-
125
- 📖 [Learn more →](./docs/policy-management-guide.md)
126
-
127
- ### Shared Prompts Library
128
- 🎯 **Native Slash Commands**: Prompts appear as `/dot-ai:prompt-name` in your coding agent
129
- 📚 **Curated Library**: Access proven prompts for code review, documentation, architecture, and project management
130
- 🔄 **Zero Setup**: Connect to MCP server and prompts are immediately available across all projects
131
- 🤝 **Team Consistency**: Standardized prompt usage with centralized management
132
-
133
- 📖 [Learn more →](./docs/mcp-prompts-guide.md)
67
+ ### 🏛️ Pattern & Policy Management
68
+ Capture organizational knowledge and governance policies that automatically enhance AI recommendations with best practices and compliance requirements. Uses vector search for intelligent semantic matching.
69
+ 📖 [Pattern Management](./docs/pattern-management-guide.md) | [Policy Management](./docs/policy-management-guide.md)
134
70
 
135
- ### AI Integration
136
- **MCP Integration**: Works seamlessly with Claude Code, Cursor, or VS Code through Model Context Protocol
137
- 🤖 **Conversational Interface**: Natural language interaction for deployment, documentation testing, pattern management, and shared prompt workflows
71
+ ### 📦 Project Setup & Governance
72
+ Generate 25+ governance, legal, and automation files (LICENSE, CODE_OF_CONDUCT, CONTRIBUTING, SECURITY, GitHub workflows, Renovate, OpenSSF Scorecard) for repository standardization.
73
+ 📖 [Learn more →](./docs/mcp-project-setup-guide.md)
138
74
 
139
- **Setup Required**: See the [MCP Setup Guide](./docs/mcp-setup.md) for complete configuration instructions.
75
+ ### 💬 Shared Prompts Library
76
+ Access curated prompts as native slash commands (`/dot-ai:prompt-name`) in your coding agent for consistent workflows across projects.
77
+ 📖 [Learn more →](./docs/mcp-prompts-guide.md)
140
78
 
141
- ---
142
- 🚀 **Ready to deploy?** Jump to the [Quick Start](./docs/quick-start.md) guide to begin using DevOps AI Toolkit.
143
- ---
79
+ ### ⚡ AI Integration
80
+ Works with Claude Code, Cursor, VS Code via Model Context Protocol. Supports multiple AI providers (Claude, GPT, Gemini) for flexibility and cost optimization.
81
+ 📖 [AI Model Configuration](./docs/mcp-setup.md#ai-model-configuration)
144
82
 
145
83
  ## See It In Action
146
84
 
@@ -148,42 +86,58 @@ DEVELOPER NOTE: This tool is under active development with incomplete functional
148
86
 
149
87
  This video explains the platform engineering problem and demonstrates the Kubernetes deployment recommendation workflow from intent to running applications.
150
88
 
151
- ## Documentation
152
-
153
- ### 🚀 Getting Started
154
- - **[MCP Setup Guide](docs/mcp-setup.md)** - Complete configuration instructions for AI tools integration
155
- - **[Tools and Features Overview](docs/mcp-tools-overview.md)** - Comprehensive guide to all available tools and features
89
+ ## Quick Start
156
90
 
157
- ## Troubleshooting
91
+ Get started in 3 steps:
92
+ 1. Configure MCP server (Docker or npm)
93
+ 2. Connect your AI coding assistant (Claude Code, Cursor, VS Code)
94
+ 3. Start using conversational workflows
158
95
 
159
- ### MCP Issues
96
+ ## Documentation
160
97
 
161
- **MCP server won't start:**
162
- - Verify environment variables are correctly configured in `.mcp.json` env section
163
- - Check session directory exists and is writable
164
- - Ensure `ANTHROPIC_API_KEY` is valid
98
+ ### Getting Started
99
+ - **[Quick Start Guide](docs/quick-start.md)** - Get started in minutes
100
+ - **[MCP Setup Guide](docs/mcp-setup.md)** - Complete configuration instructions
101
+ - **[Tools Overview](docs/mcp-tools-overview.md)** - All available tools and features
165
102
 
166
- **"No active cluster" errors:**
167
- - Verify kubectl connectivity: `kubectl cluster-info`
168
- - Check KUBECONFIG path in environment variables
169
- - Test cluster access: `kubectl get nodes`
103
+ ### Feature Guides
104
+ - **[Resource Provisioning](docs/mcp-recommendation-guide.md)** - AI-powered deployment recommendations
105
+ - **[Capability Management](docs/mcp-capability-management-guide.md)** - Semantic resource discovery
106
+ - **[Issue Remediation](docs/mcp-remediate-guide.md)** - AI-powered troubleshooting
107
+ - **[Pattern Management](docs/pattern-management-guide.md)** - Organizational deployment patterns
108
+ - **[Policy Management](docs/policy-management-guide.md)** - Governance and compliance
109
+ - **[Project Setup](docs/mcp-project-setup-guide.md)** - Repository governance automation
170
110
 
171
111
  ## Support
172
112
 
173
- - **Issues**: [GitHub Issues](https://github.com/vfarcic/dot-ai/issues)
113
+ - **[Support Guide](SUPPORT.md)** - How to get help and where to ask questions
114
+ - **GitHub Issues**: [Bug reports and feature requests](https://github.com/vfarcic/dot-ai/issues)
115
+ - **GitHub Discussions**: [Community Q&A and discussions](https://github.com/vfarcic/dot-ai/discussions)
116
+ - **Troubleshooting**: See [Troubleshooting Guide](./docs/mcp-setup.md#troubleshooting) for common problems
117
+
118
+ ## Contributing & Governance
174
119
 
175
- ## Contributing
120
+ We welcome contributions from the community! Please review:
176
121
 
177
- We welcome contributions! Please:
178
- - Fork the repository and create a feature branch
179
- - Run integration tests to ensure changes work correctly (see [Integration Testing Guide](docs/integration-testing-guide.md))
180
- - Follow existing code style and conventions
181
- - Submit a pull request with a clear description of changes
122
+ - **[Contributing Guidelines](CONTRIBUTING.md)** - How to contribute code, docs, and ideas
123
+ - **[Code of Conduct](CODE_OF_CONDUCT.md)** - Community standards and expectations
124
+ - **[Security Policy](SECURITY.md)** - How to report security vulnerabilities
125
+ - **[Governance](docs/GOVERNANCE.md)** - Project governance and decision-making
126
+ - **[Maintainers](docs/MAINTAINERS.md)** - Current project maintainers
127
+ - **[Roadmap](docs/ROADMAP.md)** - Project direction and priorities
182
128
 
183
129
  ## License
184
130
 
185
131
  MIT License - see [LICENSE](LICENSE) file for details.
186
132
 
133
+ ## Acknowledgments
134
+
135
+ DevOps AI Toolkit is built on:
136
+ - [Model Context Protocol](https://modelcontextprotocol.io/) for AI integration framework
137
+ - [Vercel AI SDK](https://sdk.vercel.ai/) for unified AI provider interface
138
+ - [Kubernetes](https://kubernetes.io/) for the cloud native foundation
139
+ - [CNCF](https://www.cncf.io/) for the cloud native ecosystem
140
+
187
141
  ---
188
142
 
189
- **DevOps AI Toolkit** - AI-powered development productivity platform for enhanced software development workflows.
143
+ **DevOps AI Toolkit** - Making cloud native operations accessible through AI-powered intelligence.
@@ -38,12 +38,14 @@ export declare class AIProviderFactory {
38
38
  * Detects provider from AI_PROVIDER env var (defaults to 'anthropic')
39
39
  * and loads corresponding API key from environment.
40
40
  *
41
+ * If no API keys are configured, returns a NoOpAIProvider that allows
42
+ * the MCP server to start but returns helpful errors when AI is needed.
43
+ *
41
44
  * Supports AI_PROVIDER_SDK env var to override SDK choice:
42
45
  * - 'native' (default): Use native provider SDK
43
46
  * - 'vercel': Use Vercel AI SDK for the provider
44
47
  *
45
- * @returns Configured AI provider instance
46
- * @throws Error if required environment variables are missing
48
+ * @returns Configured AI provider instance or NoOpProvider if no keys available
47
49
  */
48
50
  static createFromEnv(): AIProvider;
49
51
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ai-provider-factory.d.ts","sourceRoot":"","sources":["../../src/core/ai-provider-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,UAAU,EACV,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AA8BjC;;;;;;;;;;;;;;GAcG;AACH,qBAAa,iBAAiB;IAC5B;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU;IAgCnD;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,aAAa,IAAI,UAAU;IA+ClC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAItC;;;;;OAKG;IACH,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAMrD;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,IAAI,MAAM,EAAE;IAMxC;;;;;OAKG;IACH,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;CAGxD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,UAAU,CAE7C"}
1
+ {"version":3,"file":"ai-provider-factory.d.ts","sourceRoot":"","sources":["../../src/core/ai-provider-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,UAAU,EACV,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AA+BjC;;;;;;;;;;;;;;GAcG;AACH,qBAAa,iBAAiB;IAC5B;;;;;;OAMG;IACH,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU;IAgCnD;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,aAAa,IAAI,UAAU;IA2DlC;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAC,uBAAuB;IAItC;;;;;OAKG;IACH,MAAM,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAMrD;;;;OAIG;IACH,MAAM,CAAC,qBAAqB,IAAI,MAAM,EAAE;IAMxC;;;;;OAKG;IACH,MAAM,CAAC,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;CAGxD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,UAAU,CAE7C"}
@@ -13,6 +13,7 @@ exports.AIProviderFactory = void 0;
13
13
  exports.createAIProvider = createAIProvider;
14
14
  const anthropic_provider_1 = require("./providers/anthropic-provider");
15
15
  const vercel_provider_1 = require("./providers/vercel-provider");
16
+ const noop_provider_1 = require("./providers/noop-provider");
16
17
  const model_config_1 = require("./model-config");
17
18
  /**
18
19
  * Provider environment variable mappings
@@ -86,29 +87,39 @@ class AIProviderFactory {
86
87
  * Detects provider from AI_PROVIDER env var (defaults to 'anthropic')
87
88
  * and loads corresponding API key from environment.
88
89
  *
90
+ * If no API keys are configured, returns a NoOpAIProvider that allows
91
+ * the MCP server to start but returns helpful errors when AI is needed.
92
+ *
89
93
  * Supports AI_PROVIDER_SDK env var to override SDK choice:
90
94
  * - 'native' (default): Use native provider SDK
91
95
  * - 'vercel': Use Vercel AI SDK for the provider
92
96
  *
93
- * @returns Configured AI provider instance
94
- * @throws Error if required environment variables are missing
97
+ * @returns Configured AI provider instance or NoOpProvider if no keys available
95
98
  */
96
99
  static createFromEnv() {
97
100
  const providerType = process.env.AI_PROVIDER || 'anthropic';
98
101
  const sdkPreference = process.env.AI_PROVIDER_SDK || 'native';
99
102
  // Validate provider is implemented
100
103
  if (!IMPLEMENTED_PROVIDERS.includes(providerType)) {
101
- throw new Error(`Invalid AI_PROVIDER: ${providerType}. ` +
102
- `Must be one of: ${IMPLEMENTED_PROVIDERS.join(', ')}`);
104
+ // Write to stderr for logging
105
+ process.stderr.write(`WARNING: Invalid AI_PROVIDER: ${providerType}. ` +
106
+ `Must be one of: ${IMPLEMENTED_PROVIDERS.join(', ')}. ` +
107
+ `Falling back to NoOpProvider.\n`);
108
+ return new noop_provider_1.NoOpAIProvider();
103
109
  }
104
110
  // Get API key for the provider
105
111
  const apiKeyEnvVar = PROVIDER_ENV_KEYS[providerType];
106
112
  if (!apiKeyEnvVar) {
107
- throw new Error(`No API key environment variable defined for provider: ${providerType}`);
113
+ process.stderr.write(`WARNING: No API key environment variable defined for provider: ${providerType}. ` +
114
+ `Falling back to NoOpProvider.\n`);
115
+ return new noop_provider_1.NoOpAIProvider();
108
116
  }
109
117
  const apiKey = process.env[apiKeyEnvVar];
110
118
  if (!apiKey) {
111
- throw new Error(`${apiKeyEnvVar} environment variable must be set for ${providerType} provider`);
119
+ process.stderr.write(`INFO: ${apiKeyEnvVar} not configured. ` +
120
+ `AI features will be unavailable. ` +
121
+ `Tools that don't require AI (prompts, project-setup) will still work.\n`);
122
+ return new noop_provider_1.NoOpAIProvider();
112
123
  }
113
124
  // Get optional model override
114
125
  const model = process.env.AI_MODEL;
@@ -346,7 +346,7 @@ async function handleCapabilityProgress(args, logger, requestId) {
346
346
  sessionId: args.sessionId
347
347
  });
348
348
  // Get session directory first
349
- const sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(args, false);
349
+ const sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(false);
350
350
  let sessionId = args.sessionId;
351
351
  let sessionFilePath;
352
352
  // If no sessionId provided, auto-discover the latest session
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Generic Session Manager
3
+ *
4
+ * Reusable file-based session management for MCP tools
5
+ * Provides CRUD operations with persistent storage
6
+ *
7
+ * Usage:
8
+ * const manager = new GenericSessionManager<MySessionData>('myprefix', args);
9
+ * const session = manager.createSession({ myData: 'value' });
10
+ */
11
+ /**
12
+ * Generic session structure
13
+ * T is the type of data stored in the session
14
+ */
15
+ export interface GenericSession<T = any> {
16
+ sessionId: string;
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ data: T;
20
+ }
21
+ /**
22
+ * Generic session manager with file-based storage
23
+ */
24
+ export declare class GenericSessionManager<T = any> {
25
+ private prefix;
26
+ private sessionDir;
27
+ private sessionsPath;
28
+ /**
29
+ * Create a new session manager
30
+ * @param prefix - Prefix for session IDs and directory (e.g., 'proj', 'pattern', 'test')
31
+ */
32
+ constructor(prefix: string);
33
+ /**
34
+ * Create a new session
35
+ * Pattern: {prefix}-{timestamp}-{uuid}
36
+ */
37
+ createSession(initialData?: T): GenericSession<T>;
38
+ /**
39
+ * Get an existing session
40
+ */
41
+ getSession(sessionId: string): GenericSession<T> | null;
42
+ /**
43
+ * Update session data (merges with existing data)
44
+ */
45
+ updateSession(sessionId: string, newData: Partial<T>): GenericSession<T> | null;
46
+ /**
47
+ * Replace session data entirely
48
+ */
49
+ replaceSession(sessionId: string, newData: T): GenericSession<T> | null;
50
+ /**
51
+ * Delete a session
52
+ */
53
+ deleteSession(sessionId: string): boolean;
54
+ /**
55
+ * List all sessions (returns session IDs)
56
+ */
57
+ listSessions(): string[];
58
+ /**
59
+ * Clear all sessions (useful for testing)
60
+ */
61
+ clearAllSessions(): void;
62
+ /**
63
+ * Save session to file
64
+ */
65
+ private saveSession;
66
+ }
67
+ //# sourceMappingURL=generic-session-manager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generic-session-manager.d.ts","sourceRoot":"","sources":["../../src/core/generic-session-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH;;;GAGG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,GAAG;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,CAAC,CAAC;CACT;AAED;;GAEG;AACH,qBAAa,qBAAqB,CAAC,CAAC,GAAG,GAAG;IACxC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAS;IAE7B;;;OAGG;gBACS,MAAM,EAAE,MAAM;IAW1B;;;OAGG;IACH,aAAa,CAAC,WAAW,GAAE,CAAW,GAAG,cAAc,CAAC,CAAC,CAAC;IAgB1D;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI;IAgBvD;;OAEG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI;IAc/E;;OAEG;IACH,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI;IAcvE;;OAEG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAgBzC;;OAEG;IACH,YAAY,IAAI,MAAM,EAAE;IAgBxB;;OAEG;IACH,gBAAgB,IAAI,IAAI;IAiBxB;;OAEG;IACH,OAAO,CAAC,WAAW;CAIpB"}
@@ -0,0 +1,192 @@
1
+ "use strict";
2
+ /**
3
+ * Generic Session Manager
4
+ *
5
+ * Reusable file-based session management for MCP tools
6
+ * Provides CRUD operations with persistent storage
7
+ *
8
+ * Usage:
9
+ * const manager = new GenericSessionManager<MySessionData>('myprefix', args);
10
+ * const session = manager.createSession({ myData: 'value' });
11
+ */
12
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ var desc = Object.getOwnPropertyDescriptor(m, k);
15
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
16
+ desc = { enumerable: true, get: function() { return m[k]; } };
17
+ }
18
+ Object.defineProperty(o, k2, desc);
19
+ }) : (function(o, m, k, k2) {
20
+ if (k2 === undefined) k2 = k;
21
+ o[k2] = m[k];
22
+ }));
23
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
24
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
25
+ }) : function(o, v) {
26
+ o["default"] = v;
27
+ });
28
+ var __importStar = (this && this.__importStar) || (function () {
29
+ var ownKeys = function(o) {
30
+ ownKeys = Object.getOwnPropertyNames || function (o) {
31
+ var ar = [];
32
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
33
+ return ar;
34
+ };
35
+ return ownKeys(o);
36
+ };
37
+ return function (mod) {
38
+ if (mod && mod.__esModule) return mod;
39
+ var result = {};
40
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
41
+ __setModuleDefault(result, mod);
42
+ return result;
43
+ };
44
+ })();
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.GenericSessionManager = void 0;
47
+ const fs = __importStar(require("fs"));
48
+ const path = __importStar(require("path"));
49
+ const crypto_1 = require("crypto");
50
+ const session_utils_1 = require("./session-utils");
51
+ /**
52
+ * Generic session manager with file-based storage
53
+ */
54
+ class GenericSessionManager {
55
+ prefix;
56
+ sessionDir;
57
+ sessionsPath;
58
+ /**
59
+ * Create a new session manager
60
+ * @param prefix - Prefix for session IDs and directory (e.g., 'proj', 'pattern', 'test')
61
+ */
62
+ constructor(prefix) {
63
+ this.prefix = prefix;
64
+ this.sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(true);
65
+ this.sessionsPath = path.join(this.sessionDir, `${prefix}-sessions`);
66
+ // Create sessions directory if it doesn't exist
67
+ if (!fs.existsSync(this.sessionsPath)) {
68
+ fs.mkdirSync(this.sessionsPath, { recursive: true });
69
+ }
70
+ }
71
+ /**
72
+ * Create a new session
73
+ * Pattern: {prefix}-{timestamp}-{uuid}
74
+ */
75
+ createSession(initialData = {}) {
76
+ const sessionId = `${this.prefix}-${Date.now()}-${(0, crypto_1.randomUUID)().substring(0, 8)}`;
77
+ const now = new Date().toISOString();
78
+ const session = {
79
+ sessionId,
80
+ createdAt: now,
81
+ updatedAt: now,
82
+ data: initialData,
83
+ };
84
+ this.saveSession(session);
85
+ return session;
86
+ }
87
+ /**
88
+ * Get an existing session
89
+ */
90
+ getSession(sessionId) {
91
+ try {
92
+ const sessionFile = path.join(this.sessionsPath, `${sessionId}.json`);
93
+ if (!fs.existsSync(sessionFile)) {
94
+ return null;
95
+ }
96
+ const sessionData = fs.readFileSync(sessionFile, 'utf8');
97
+ return JSON.parse(sessionData);
98
+ }
99
+ catch (error) {
100
+ console.error(`Failed to load session ${sessionId}:`, error);
101
+ return null;
102
+ }
103
+ }
104
+ /**
105
+ * Update session data (merges with existing data)
106
+ */
107
+ updateSession(sessionId, newData) {
108
+ const session = this.getSession(sessionId);
109
+ if (!session) {
110
+ return null;
111
+ }
112
+ session.data = { ...session.data, ...newData };
113
+ session.updatedAt = new Date().toISOString();
114
+ this.saveSession(session);
115
+ return session;
116
+ }
117
+ /**
118
+ * Replace session data entirely
119
+ */
120
+ replaceSession(sessionId, newData) {
121
+ const session = this.getSession(sessionId);
122
+ if (!session) {
123
+ return null;
124
+ }
125
+ session.data = newData;
126
+ session.updatedAt = new Date().toISOString();
127
+ this.saveSession(session);
128
+ return session;
129
+ }
130
+ /**
131
+ * Delete a session
132
+ */
133
+ deleteSession(sessionId) {
134
+ try {
135
+ const sessionFile = path.join(this.sessionsPath, `${sessionId}.json`);
136
+ if (!fs.existsSync(sessionFile)) {
137
+ return false;
138
+ }
139
+ fs.unlinkSync(sessionFile);
140
+ return true;
141
+ }
142
+ catch (error) {
143
+ console.error(`Failed to delete session ${sessionId}:`, error);
144
+ return false;
145
+ }
146
+ }
147
+ /**
148
+ * List all sessions (returns session IDs)
149
+ */
150
+ listSessions() {
151
+ try {
152
+ if (!fs.existsSync(this.sessionsPath)) {
153
+ return [];
154
+ }
155
+ return fs
156
+ .readdirSync(this.sessionsPath)
157
+ .filter((file) => file.endsWith('.json'))
158
+ .map((file) => file.replace('.json', ''));
159
+ }
160
+ catch (error) {
161
+ console.error('Failed to list sessions:', error);
162
+ return [];
163
+ }
164
+ }
165
+ /**
166
+ * Clear all sessions (useful for testing)
167
+ */
168
+ clearAllSessions() {
169
+ try {
170
+ if (!fs.existsSync(this.sessionsPath)) {
171
+ return;
172
+ }
173
+ const sessions = fs.readdirSync(this.sessionsPath);
174
+ for (const file of sessions) {
175
+ if (file.endsWith('.json')) {
176
+ fs.unlinkSync(path.join(this.sessionsPath, file));
177
+ }
178
+ }
179
+ }
180
+ catch (error) {
181
+ console.error('Failed to clear sessions:', error);
182
+ }
183
+ }
184
+ /**
185
+ * Save session to file
186
+ */
187
+ saveSession(session) {
188
+ const sessionFile = path.join(this.sessionsPath, `${session.sessionId}.json`);
189
+ fs.writeFileSync(sessionFile, JSON.stringify(session, null, 2), 'utf8');
190
+ }
191
+ }
192
+ exports.GenericSessionManager = GenericSessionManager;
@@ -238,7 +238,7 @@ async function handlePatternOperation(operation, args, logger, requestId, valida
238
238
  });
239
239
  // Clean up session file after successful Vector DB storage
240
240
  try {
241
- const sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(args, false);
241
+ const sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(false);
242
242
  const sessionFile = path.join(sessionDir, 'pattern-sessions', `${workflowStep.sessionId}.json`);
243
243
  if (fs.existsSync(sessionFile)) {
244
244
  fs.unlinkSync(sessionFile);