@vfarcic/dot-ai 0.100.0 → 0.102.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -228
- package/dist/core/capability-operations.d.ts +2 -1
- package/dist/core/capability-operations.d.ts.map +1 -1
- package/dist/core/capability-operations.js +5 -3
- package/dist/core/capability-vector-service.d.ts +1 -1
- package/dist/core/capability-vector-service.d.ts.map +1 -1
- package/dist/core/capability-vector-service.js +2 -2
- package/dist/core/claude.js +1 -1
- package/dist/core/schema.d.ts +1 -0
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +5 -3
- package/dist/core/unified-creation-session.d.ts.map +1 -1
- package/dist/core/unified-creation-session.js +16 -9
- package/dist/core/unified-creation-types.d.ts +1 -0
- package/dist/core/unified-creation-types.d.ts.map +1 -1
- package/dist/interfaces/mcp.d.ts.map +1 -1
- package/dist/interfaces/mcp.js +4 -35
- package/dist/tools/answer-question.js +2 -2
- package/dist/tools/choose-solution.js +1 -1
- package/dist/tools/organizational-data.d.ts +1 -0
- package/dist/tools/organizational-data.d.ts.map +1 -1
- package/dist/tools/organizational-data.js +5 -2
- package/dist/tools/recommend.d.ts +7 -6
- package/dist/tools/recommend.d.ts.map +1 -1
- package/dist/tools/recommend.js +40 -6
- package/package.json +11 -46
- package/prompts/question-generation.md +3 -1
- package/shared-prompts/prd-done.md +7 -1
package/README.md
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
DevOps AI Toolkit is an AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance.
|
|
10
10
|
|
|
11
|
+
📚 [Quick Start](./docs/quick-start.md) | 🔧 [MCP Setup](./docs/mcp-setup.md) | 🛠️ [Features & Tools](./docs/mcp-tools-overview.md)
|
|
11
12
|
|
|
12
13
|
## Who is this for?
|
|
13
14
|
|
|
@@ -44,6 +45,8 @@ DevOps AI Toolkit is an AI-powered development productivity platform that enhanc
|
|
|
44
45
|
🔧 **Operator-Aware**: Leverages custom operators and CRDs when available
|
|
45
46
|
🚀 **Complete Workflow**: From discovery to deployment with automated Kubernetes integration
|
|
46
47
|
|
|
48
|
+
📖 [Learn more →](./docs/mcp-recommendation-guide.md)
|
|
49
|
+
|
|
47
50
|
#### Capability-Enhanced Recommendations
|
|
48
51
|
Transform how AI understands your cluster by discovering semantic capabilities of each resource:
|
|
49
52
|
|
|
@@ -65,7 +68,7 @@ AI: Gets pre-filtered relevant resources with rich context
|
|
|
65
68
|
Result: Finds sqls.devopstoolkit.live as perfect match ✨
|
|
66
69
|
```
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
📖 [Learn more →](./docs/mcp-capability-management-guide.md)
|
|
69
72
|
|
|
70
73
|
### Kubernetes Issue Remediation
|
|
71
74
|
🔍 **AI-Powered Root Cause Analysis**: Multi-step investigation loop identifies the real cause behind Kubernetes failures
|
|
@@ -74,18 +77,24 @@ Result: Finds sqls.devopstoolkit.live as perfect match ✨
|
|
|
74
77
|
🔒 **Safety Mechanisms**: Automatic fallback to manual mode when validation discovers additional issues
|
|
75
78
|
🎯 **Cross-Resource Intelligence**: Understands how pod issues may require fixes in different resource types (storage, networking, etc.)
|
|
76
79
|
|
|
80
|
+
📖 [Learn more →](./docs/mcp-remediate-guide.md)
|
|
81
|
+
|
|
77
82
|
### Documentation Testing & Validation
|
|
78
83
|
📖 **Automated Testing**: Validates documentation by executing commands and testing examples
|
|
79
84
|
🔍 **Two-Phase Validation**: Tests both functionality (does it work?) and semantic accuracy (are descriptions truthful?)
|
|
80
85
|
🛠️ **Fix Application**: User-driven selection and application of recommended documentation improvements
|
|
81
86
|
💾 **Session Management**: Resumable testing workflows for large documentation sets
|
|
82
87
|
|
|
88
|
+
📖 [Learn more →](./docs/mcp-documentation-testing-guide.md)
|
|
89
|
+
|
|
83
90
|
### Organizational Pattern Management
|
|
84
91
|
🏛️ **Pattern Creation**: Define organizational deployment patterns that capture institutional knowledge
|
|
85
92
|
🧠 **AI Enhancement**: Patterns automatically enhance deployment recommendations with organizational context
|
|
86
93
|
🔍 **Semantic Search**: Uses Vector DB (Qdrant) for intelligent pattern matching based on user intent
|
|
87
94
|
📋 **Best Practices**: Share deployment standards across teams through reusable patterns
|
|
88
95
|
|
|
96
|
+
📖 [Learn more →](./docs/pattern-management-guide.md)
|
|
97
|
+
|
|
89
98
|
### Policy Management & Governance
|
|
90
99
|
🛡️ **Policy Creation**: Define governance policies that guide users toward compliant configurations
|
|
91
100
|
⚠️ **Compliance Integration**: Policies create required questions with compliance indicators during deployment
|
|
@@ -93,245 +102,37 @@ Result: Finds sqls.devopstoolkit.live as perfect match ✨
|
|
|
93
102
|
🎯 **Proactive Governance**: Prevents configuration drift by embedding compliance into the recommendation workflow
|
|
94
103
|
🔍 **Vector Storage**: Uses Qdrant Vector DB for semantic policy matching and retrieval
|
|
95
104
|
|
|
105
|
+
📖 [Learn more →](./docs/policy-management-guide.md)
|
|
106
|
+
|
|
96
107
|
### Shared Prompts Library
|
|
97
108
|
🎯 **Native Slash Commands**: Prompts appear as `/dot-ai:prompt-name` in your coding agent
|
|
98
109
|
📚 **Curated Library**: Access proven prompts for code review, documentation, architecture, and project management
|
|
99
110
|
🔄 **Zero Setup**: Connect to MCP server and prompts are immediately available across all projects
|
|
100
111
|
🤝 **Team Consistency**: Standardized prompt usage with centralized management
|
|
101
112
|
|
|
113
|
+
📖 [Learn more →](./docs/mcp-prompts-guide.md)
|
|
114
|
+
|
|
102
115
|
### AI Integration
|
|
103
116
|
⚡ **MCP Integration**: Works seamlessly with Claude Code, Cursor, or VS Code through Model Context Protocol
|
|
104
117
|
🤖 **Conversational Interface**: Natural language interaction for deployment, documentation testing, pattern management, and shared prompt workflows
|
|
105
118
|
|
|
106
119
|
**Setup Required**: See the [MCP Setup Guide](./docs/mcp-setup.md) for complete configuration instructions.
|
|
107
120
|
|
|
121
|
+
---
|
|
122
|
+
🚀 **Ready to deploy?** Jump to the [Quick Start](./docs/quick-start.md) guide to begin using DevOps AI Toolkit.
|
|
123
|
+
---
|
|
124
|
+
|
|
108
125
|
## See It In Action
|
|
109
126
|
|
|
110
127
|
[](https://youtu.be/8Yzn-9qQpQI)
|
|
111
128
|
|
|
112
129
|
This video explains the platform engineering problem and demonstrates the Kubernetes deployment recommendation workflow from intent to running applications.
|
|
113
130
|
|
|
114
|
-
##
|
|
115
|
-
|
|
116
|
-
### Prerequisites
|
|
117
|
-
|
|
118
|
-
**For Kubernetes deployment and documentation testing:**
|
|
119
|
-
- **Claude API key** (required for AI analysis)
|
|
120
|
-
- Get your API key from [Anthropic Console](https://console.anthropic.com/) (requires account login)
|
|
121
|
-
<!-- dotai-ignore: Console URL may return 403 - expected behavior for auth-protected endpoint -->
|
|
122
|
-
- Set it as environment variable: `export ANTHROPIC_API_KEY=your_api_key_here`
|
|
123
|
-
|
|
124
|
-
**For shared prompts library:**
|
|
125
|
-
- **No API key required** - Works with any MCP-enabled coding agent (other features like deployments do require ANTHROPIC_API_KEY)
|
|
126
|
-
|
|
127
|
-
**For Kubernetes deployment recommendations:**
|
|
128
|
-
- **kubectl** configured with cluster access
|
|
129
|
-
- Verify cluster access with: `kubectl get nodes`
|
|
130
|
-
- Should show your cluster nodes without authentication errors
|
|
131
|
-
<!-- dotai-ignore: kubectl verification command output format - implementation-specific -->
|
|
132
|
-
|
|
133
|
-
**For documentation testing:**
|
|
134
|
-
- **Documentation files** to test (Markdown, HTML, etc.)
|
|
135
|
-
- **File system access** to the documentation you want to validate
|
|
136
|
-
|
|
137
|
-
**For organizational pattern management:**
|
|
138
|
-
- **Vector DB service** (Qdrant) for pattern storage and semantic search
|
|
139
|
-
- **OpenAI API key** (required) for semantic pattern matching and vector operations
|
|
140
|
-
|
|
141
|
-
**For policy management and governance:**
|
|
142
|
-
- **Vector DB service** (Qdrant) for policy storage and semantic search
|
|
143
|
-
- **OpenAI API key** (required) for semantic policy matching and vector operations
|
|
144
|
-
- **Optional**: Kyverno installed in cluster for active policy enforcement
|
|
145
|
-
|
|
146
|
-
### Installation
|
|
147
|
-
|
|
148
|
-
DevOps AI Toolkit is designed to be used through AI development tools via MCP (Model Context Protocol). No direct installation needed - simply configure your AI tool to connect to the MCP server.
|
|
149
|
-
|
|
150
|
-
### Usage
|
|
151
|
-
|
|
152
|
-
**🎯 Recommended: Docker Setup (Complete Stack)**
|
|
153
|
-
Perfect for getting all features working immediately with minimal setup:
|
|
154
|
-
|
|
155
|
-
1. **Download Docker Compose configuration:**
|
|
156
|
-
```bash
|
|
157
|
-
curl -o docker-compose-dot-ai.yaml https://raw.githubusercontent.com/vfarcic/dot-ai/main/docker-compose-dot-ai.yaml
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
2. **Set environment variables and create MCP configuration:**
|
|
161
|
-
```bash
|
|
162
|
-
# Set your API keys
|
|
163
|
-
export ANTHROPIC_API_KEY="sk-ant-api03-your-key-here"
|
|
164
|
-
export OPENAI_API_KEY="sk-proj-your-openai-key-here"
|
|
165
|
-
|
|
166
|
-
# Create MCP configuration for Claude Code
|
|
167
|
-
cat > .mcp.json << 'EOF'
|
|
168
|
-
{
|
|
169
|
-
"mcpServers": {
|
|
170
|
-
"dot-ai": {
|
|
171
|
-
"command": "docker",
|
|
172
|
-
"args": [
|
|
173
|
-
"compose",
|
|
174
|
-
"-f",
|
|
175
|
-
"docker-compose-dot-ai.yaml",
|
|
176
|
-
"--env-file",
|
|
177
|
-
".env",
|
|
178
|
-
"run",
|
|
179
|
-
"--rm",
|
|
180
|
-
"--remove-orphans",
|
|
181
|
-
"dot-ai"
|
|
182
|
-
]
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
EOF
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
**What you get:**
|
|
190
|
-
- ✅ **Complete Stack**: MCP server + Qdrant vector database included
|
|
191
|
-
- ✅ **All Features Working**: Capability management, pattern storage, policy governance, semantic search
|
|
192
|
-
- ✅ **No External Dependencies**: Everything runs in containers
|
|
193
|
-
- ✅ **Kubernetes Integration**: Direct kubectl access to your clusters
|
|
194
|
-
|
|
195
|
-
**Alternative Methods**: See the [MCP Setup Guide](docs/mcp-setup.md) for NPX (Node.js) and Development setup options.
|
|
196
|
-
|
|
197
|
-
3. **Start your MCP client:**
|
|
198
|
-
```bash
|
|
199
|
-
claude # or your preferred MCP-enabled AI tool
|
|
200
|
-
|
|
201
|
-
# Verify everything works by asking:
|
|
202
|
-
"Show dot-ai status"
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
4. **Use conversational workflows:**
|
|
206
|
-
|
|
207
|
-
**Example: Kubernetes Deployment**
|
|
208
|
-
```
|
|
209
|
-
User: I want to deploy a web application to my cluster
|
|
210
|
-
|
|
211
|
-
Agent: I'll help you deploy a web application. Let me get recommendations. First, a few questions to provide better suggestions:
|
|
212
|
-
|
|
213
|
-
What type of web application is this? Is it for development or production?
|
|
214
|
-
Does it need external access?
|
|
215
|
-
[Uses recommend tool for clarification]
|
|
216
|
-
|
|
217
|
-
User: It's a production Node.js API that needs external access
|
|
218
|
-
|
|
219
|
-
Agent: Perfect! Based on your production requirements, I found 3 deployment options.
|
|
220
|
-
Let's use the Production Web Stack with external access.
|
|
221
|
-
What's your application name and container image?
|
|
222
|
-
[Uses recommend tool with refined intent]
|
|
223
|
-
|
|
224
|
-
User: App name is "myapp" and image is "myapp:v1.0.0"
|
|
225
|
-
|
|
226
|
-
Agent: Excellent! Generating production-ready manifests and deploying...
|
|
227
|
-
[Uses chooseSolution, answerQuestion, generateManifests, deployManifests]
|
|
228
|
-
|
|
229
|
-
Agent: ✅ Successfully deployed! Your production API is running with external access.
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
**Example: Capability Management**
|
|
233
|
-
```
|
|
234
|
-
User: I want to scan my cluster for resource capabilities to improve recommendations
|
|
235
|
-
|
|
236
|
-
[Uses manageOrgData with capabilities scanning]
|
|
237
|
-
|
|
238
|
-
Agent: Would you like to scan all cluster resources or specify a subset?
|
|
239
|
-
Options: 1) All resources 2) Specific subset
|
|
240
|
-
|
|
241
|
-
User: All resources in auto mode
|
|
242
|
-
|
|
243
|
-
Agent: Starting comprehensive cluster capability scan...
|
|
244
|
-
✅ Capability scan completed! Processed cluster resources successfully.
|
|
245
|
-
|
|
246
|
-
User: Now I need a PostgreSQL database
|
|
247
|
-
|
|
248
|
-
Agent: Let me get enhanced recommendations using your capability data.
|
|
249
|
-
[Uses recommend tool with capability pre-filtering]
|
|
250
|
-
|
|
251
|
-
Agent: Perfect! I found sqls.devopstoolkit.live as the top match - it's a managed database solution supporting PostgreSQL with multi-cloud capabilities and low complexity. Much better than the generic StatefulSet approach I would have suggested before!
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
**Example: Kubernetes Issue Remediation**
|
|
255
|
-
```
|
|
256
|
-
User: Something is wrong with my database in postgres-demo namespace
|
|
257
|
-
|
|
258
|
-
Agent: I'll investigate the database issue using AI-powered analysis.
|
|
259
|
-
[Uses remediate tool for systematic investigation]
|
|
260
|
-
|
|
261
|
-
Agent: 🔍 Root Cause (95% confidence): PostgreSQL pod can't start because the required PersistentVolumeClaim 'postgres-pvc' is missing.
|
|
262
|
-
|
|
263
|
-
🔧 Recommended Fix: Create missing PVC
|
|
264
|
-
- Risk Level: Low
|
|
265
|
-
- Command: kubectl apply [PVC manifest]
|
|
266
|
-
|
|
267
|
-
Choose execution: 1) Execute via MCP 2) Show commands
|
|
268
|
-
|
|
269
|
-
User: 1
|
|
270
|
-
|
|
271
|
-
Agent: ✅ Issue Resolved! Created postgres-pvc, pod transitioned to Running state. Database is operational!
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
**Example: Policy Management**
|
|
275
|
-
```
|
|
276
|
-
User: I want to create a policy requiring resource limits on all deployments
|
|
277
|
-
|
|
278
|
-
Agent: I'll help you create a governance policy for resource limits. Let me start the creation workflow.
|
|
279
|
-
[Uses manageOrgData with policy creation]
|
|
280
|
-
|
|
281
|
-
Agent: Please describe your resource limits policy intent:
|
|
282
|
-
|
|
283
|
-
User: All container deployments must have CPU and memory limits to prevent resource exhaustion. CPU limits should be between 100m-2000m, memory between 128Mi-4Gi.
|
|
284
|
-
|
|
285
|
-
Agent: Excellent! I've created your Resource Limits Policy and generated a Kyverno ClusterPolicy for enforcement.
|
|
286
|
-
|
|
287
|
-
Would you like to:
|
|
288
|
-
1. Store policy intent only (for AI guidance)
|
|
289
|
-
2. Apply Kyverno policy to cluster (active enforcement)
|
|
290
|
-
|
|
291
|
-
User: Apply the Kyverno policy for active enforcement
|
|
292
|
-
|
|
293
|
-
Agent: ✅ Policy deployed! Now when users deploy applications, they'll get required questions for CPU/memory limits with your specified ranges, and any non-compliant deployments will be blocked by Kyverno.
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
**Example: Documentation Testing**
|
|
297
|
-
```
|
|
298
|
-
User: I want to test my README.md file to make sure all the examples work
|
|
299
|
-
|
|
300
|
-
Agent: I'll help you test your README.md for accuracy. Let me start a documentation testing session.
|
|
301
|
-
[Uses testDocs tool]
|
|
302
|
-
|
|
303
|
-
Agent: Found 6 testable sections in your README. Testing installation instructions...
|
|
304
|
-
|
|
305
|
-
✅ npm install command works correctly
|
|
306
|
-
❌ Configuration example has wrong port number (8080 vs 3000)
|
|
307
|
-
⚠️ Claims "works out of the box" but requires additional setup
|
|
308
|
-
|
|
309
|
-
Which issues would you like me to help you fix?
|
|
310
|
-
|
|
311
|
-
User: Fix the port number directly in the doc, and I'll create a GitHub issue for the setup requirements.
|
|
312
|
-
|
|
313
|
-
Agent: ✅ Documentation testing complete! Fixed 1 issue directly, 1 issue tracked externally.
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
*Note: Conversational examples are illustrative - actual AI responses will vary based on specific context and implementation.*
|
|
317
|
-
|
|
318
|
-
**Example: Shared Prompts Library**
|
|
319
|
-
```
|
|
320
|
-
# Conversational approach
|
|
321
|
-
User: I want to create a new PRD for a feature
|
|
322
|
-
|
|
323
|
-
Agent: I'll help you create a documentation-first PRD. Let me start the process.
|
|
324
|
-
[Uses prd-create prompt via /dot-ai:prd-create]
|
|
325
|
-
|
|
326
|
-
Agent: Great! I've created GitHub issue #34 and the PRD file. What feature would you like to document?
|
|
327
|
-
|
|
328
|
-
# Direct slash command approach
|
|
329
|
-
User: /dot-ai:prd-create
|
|
330
|
-
|
|
331
|
-
Agent: I'm executing the PRD creation workflow. Please describe the feature you want to create a PRD for...
|
|
332
|
-
```
|
|
131
|
+
## Documentation
|
|
333
132
|
|
|
334
|
-
|
|
133
|
+
### 🚀 Getting Started
|
|
134
|
+
- **[MCP Setup Guide](docs/mcp-setup.md)** - Complete configuration instructions for AI tools integration
|
|
135
|
+
- **[Tools and Features Overview](docs/mcp-tools-overview.md)** - Comprehensive guide to all available tools and features
|
|
335
136
|
|
|
336
137
|
## Troubleshooting
|
|
337
138
|
|
|
@@ -347,12 +148,6 @@ Agent: I'm executing the PRD creation workflow. Please describe the feature you
|
|
|
347
148
|
- Check KUBECONFIG path in environment variables
|
|
348
149
|
- Test cluster access: `kubectl get nodes`
|
|
349
150
|
|
|
350
|
-
## Documentation
|
|
351
|
-
|
|
352
|
-
### 🚀 Getting Started
|
|
353
|
-
- **[MCP Setup Guide](docs/mcp-setup.md)** - Complete configuration instructions for AI tools integration
|
|
354
|
-
- **[Tools and Features Overview](docs/mcp-tools-overview.md)** - Comprehensive guide to all available tools and features
|
|
355
|
-
|
|
356
151
|
## Support
|
|
357
152
|
|
|
358
153
|
- **Issues**: [GitHub Issues](https://github.com/vfarcic/dot-ai/issues)
|
|
@@ -361,7 +156,7 @@ Agent: I'm executing the PRD creation workflow. Please describe the feature you
|
|
|
361
156
|
|
|
362
157
|
We welcome contributions! Please:
|
|
363
158
|
- Fork the repository and create a feature branch
|
|
364
|
-
- Run tests
|
|
159
|
+
- Run integration tests to ensure changes work correctly (see [Integration Testing Guide](docs/integration-testing-guide.md))
|
|
365
160
|
- Follow existing code style and conventions
|
|
366
161
|
- Submit a pull request with a clear description of changes
|
|
367
162
|
|
|
@@ -8,8 +8,9 @@ import { Logger } from './error-handling';
|
|
|
8
8
|
import { CapabilityVectorService } from './capability-vector-service';
|
|
9
9
|
/**
|
|
10
10
|
* Get initialized capability service
|
|
11
|
+
* @param collection - Collection name (default: 'capabilities')
|
|
11
12
|
*/
|
|
12
|
-
export declare function getCapabilityService(): Promise<CapabilityVectorService>;
|
|
13
|
+
export declare function getCapabilityService(collection?: string): Promise<CapabilityVectorService>;
|
|
13
14
|
/**
|
|
14
15
|
* Handle capability list operation
|
|
15
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-operations.d.ts","sourceRoot":"","sources":["../../src/core/capability-operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAStE
|
|
1
|
+
{"version":3,"file":"capability-operations.d.ts","sourceRoot":"","sources":["../../src/core/capability-operations.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAStE;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAahG;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,uBAAuB,GACzC,OAAO,CAAC,GAAG,CAAC,CA2Dd;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,uBAAuB,GACzC,OAAO,CAAC,GAAG,CAAC,CA+Ed;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,uBAAuB,GACzC,OAAO,CAAC,GAAG,CAAC,CAuEd;AAED;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,uBAAuB,GACzC,OAAO,CAAC,GAAG,CAAC,CA2Dd;AAoCD;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,CA4Nd;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,uBAAuB,GACzC,OAAO,CAAC,GAAG,CAAC,CAwFd;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,CAmDd"}
|
|
@@ -56,9 +56,10 @@ const path = __importStar(require("path"));
|
|
|
56
56
|
// that remain in the main organizational-data.ts file as they're used by multiple domains
|
|
57
57
|
/**
|
|
58
58
|
* Get initialized capability service
|
|
59
|
+
* @param collection - Collection name (default: 'capabilities')
|
|
59
60
|
*/
|
|
60
|
-
async function getCapabilityService() {
|
|
61
|
-
const capabilityService = new capability_vector_service_1.CapabilityVectorService();
|
|
61
|
+
async function getCapabilityService(collection) {
|
|
62
|
+
const capabilityService = new capability_vector_service_1.CapabilityVectorService(collection);
|
|
62
63
|
// Always ensure proper collection initialization
|
|
63
64
|
try {
|
|
64
65
|
await capabilityService.initialize();
|
|
@@ -635,7 +636,8 @@ async function handleCapabilitySearch(args, logger, requestId, capabilityService
|
|
|
635
636
|
*/
|
|
636
637
|
async function handleCapabilityCRUD(operation, args, logger, requestId) {
|
|
637
638
|
// Create and initialize capability service for CRUD operations
|
|
638
|
-
|
|
639
|
+
// Use collection from args if provided, otherwise defaults to 'capabilities'
|
|
640
|
+
const capabilityService = new capability_vector_service_1.CapabilityVectorService(args.collection);
|
|
639
641
|
try {
|
|
640
642
|
const vectorDBHealthy = await capabilityService.healthCheck();
|
|
641
643
|
if (!vectorDBHealthy) {
|
|
@@ -26,7 +26,7 @@ export interface CapabilitySearchOptions extends BaseSearchOptions {
|
|
|
26
26
|
* Vector service for storing and searching resource capabilities
|
|
27
27
|
*/
|
|
28
28
|
export declare class CapabilityVectorService extends BaseVectorService<ResourceCapability> {
|
|
29
|
-
constructor(vectorDB?: VectorDBService, embeddingService?: EmbeddingService);
|
|
29
|
+
constructor(collectionName?: string, vectorDB?: VectorDBService, embeddingService?: EmbeddingService);
|
|
30
30
|
/**
|
|
31
31
|
* Create searchable text from capability data for embedding generation
|
|
32
32
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability-vector-service.d.ts","sourceRoot":"","sources":["../../src/core/capability-vector-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAGvD,MAAM,WAAW,kBAAkB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACtC,WAAW,EAAE,MAA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
|
|
|
13
13
|
* Vector service for storing and searching resource capabilities
|
|
14
14
|
*/
|
|
15
15
|
class CapabilityVectorService extends base_vector_service_1.BaseVectorService {
|
|
16
|
-
constructor(vectorDB, embeddingService) {
|
|
17
|
-
super(
|
|
16
|
+
constructor(collectionName = 'capabilities', vectorDB, embeddingService) {
|
|
17
|
+
super(collectionName, vectorDB, embeddingService);
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Create searchable text from capability data for embedding generation
|
package/dist/core/claude.js
CHANGED
|
@@ -148,7 +148,7 @@ ${response.content}`;
|
|
|
148
148
|
if (this.apiKey.startsWith('sk-ant-') && this.client) {
|
|
149
149
|
// Make real API call to Claude with streaming
|
|
150
150
|
const stream = await this.client.messages.create({
|
|
151
|
-
model: 'claude-sonnet-4-
|
|
151
|
+
model: process.env.MODEL || 'claude-sonnet-4-5-20250929', // Latest Claude Sonnet 4.5
|
|
152
152
|
max_tokens: 64000,
|
|
153
153
|
messages: [{ role: 'user', content: message }],
|
|
154
154
|
stream: true // Enable streaming by default to support long operations (>10 minutes)
|
package/dist/core/schema.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/core/schema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAclD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;I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;CAWhC;AAED;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,cAAc,CAAC,CAAuB;IAC9C,OAAO,CAAC,iBAAiB,CAAC,CAA0B;IACpD,OAAO,CAAC,aAAa,CAAC,CAAsB;gBAEhC,MAAM,EAAE,eAAe;IAqCnC;;OAEG;IACG,iBAAiB,CACrB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,GACnD,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAyE9B;;OAEG;YACW,wBAAwB;IAiBtC;;OAEG;IACH,OAAO,CAAC,2BAA2B;IA+CnC;;OAEG;YACW,0BAA0B;IA6CxC;;OAEG;YACW,0BAA0B;IAuFxC;;OAEG;IACH,OAAO,CAAC,8BAA8B;IAOtC;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAanC;;OAEG;IACH,OAAO,CAAC,4BAA4B;IASpC;;OAEG;IACH,OAAO,CAAC,mCAAmC;IAU3C;;;OAGG;YACW,sBAAsB;IAsBpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8FG;YACW,oBAAoB;IAmDlC;;OAEG;YACW,sBAAsB;IAiEpC;;OAEG;IACH,OAAO,CAAC,yBAAyB;IAgCjC;;OAEG;YACW,uBAAuB;CAqItC"}
|
package/dist/core/schema.js
CHANGED
|
@@ -276,9 +276,11 @@ class ResourceRecommender {
|
|
|
276
276
|
this.claudeIntegration = new claude_1.ClaudeIntegration(config.claudeApiKey);
|
|
277
277
|
// Initialize capability service - fail gracefully if Vector DB unavailable
|
|
278
278
|
try {
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
279
|
+
// Use environment variable for collection name (allows using test data collection)
|
|
280
|
+
const collectionName = process.env.QDRANT_CAPABILITIES_COLLECTION || 'capabilities';
|
|
281
|
+
const capabilityVectorDB = new vector_db_service_1.VectorDBService({ collectionName });
|
|
282
|
+
this.capabilityService = new capability_vector_service_1.CapabilityVectorService(collectionName, capabilityVectorDB);
|
|
283
|
+
console.log(`✅ Capability service initialized with Vector DB (collection: ${collectionName})`);
|
|
282
284
|
}
|
|
283
285
|
catch (error) {
|
|
284
286
|
console.warn('⚠️ Vector DB not available, capabilities disabled:', error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-creation-session.d.ts","sourceRoot":"","sources":["../../src/core/unified-creation-session.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,iCAAiC,EACjC,UAAU,EAIX,MAAM,0BAA0B,CAAC;AAKlC,qBAAa,6BAA6B;IACxC,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,SAAS,CAAsB;gBAE3B,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,mBAAmB;IAKnE;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,GAAG,GAAG,sBAAsB;
|
|
1
|
+
{"version":3,"file":"unified-creation-session.d.ts","sourceRoot":"","sources":["../../src/core/unified-creation-session.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAKlD,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,iCAAiC,EACjC,UAAU,EAIX,MAAM,0BAA0B,CAAC;AAKlC,qBAAa,6BAA6B;IACxC,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,SAAS,CAAsB;gBAE3B,UAAU,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,mBAAmB;IAKnE;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,GAAG,GAAG,sBAAsB;IAqBhD;;OAEG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,sBAAsB,GAAG,IAAI;IAiBxE;;OAEG;IACH,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,sBAAsB;IA2GvF;;OAEG;IACG,mBAAmB,CAAC,OAAO,EAAE,sBAAsB,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,2BAA2B,GAAG,iCAAiC,CAAC;IAoGhJ;;OAEG;YACW,4BAA4B;IA4C1C;;OAEG;YACW,gCAAgC;IAsC9C;;OAEG;IACH,OAAO,CAAC,kBAAkB;IA6E1B;;OAEG;YACW,gBAAgB;IAsF9B;;OAEG;YACW,4BAA4B;IAoH1C;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAY1B;;OAEG;YACW,qBAAqB;IAqCnC;;OAEG;YACW,mBAAmB;IAqLjC;;OAEG;YACW,uBAAuB;IAmFrC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAU5B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAY9B;;OAEG;IACH,OAAO,CAAC,WAAW;IAgBnB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAG1B"}
|
|
@@ -74,7 +74,10 @@ class UnifiedCreationSessionManager {
|
|
|
74
74
|
currentStep: this.config.steps[0], // Start with first step
|
|
75
75
|
createdAt: new Date().toISOString(),
|
|
76
76
|
updatedAt: new Date().toISOString(),
|
|
77
|
-
data: {
|
|
77
|
+
data: {
|
|
78
|
+
// Store capabilities collection if provided (for policy testing with pre-populated data)
|
|
79
|
+
capabilitiesCollection: args.collection
|
|
80
|
+
}
|
|
78
81
|
};
|
|
79
82
|
this.saveSession(session, args);
|
|
80
83
|
return session;
|
|
@@ -703,7 +706,8 @@ The policy intent has been stored in the database. The Kyverno policy was not ap
|
|
|
703
706
|
// Ensure discovery service is connected to cluster before retrieving schemas
|
|
704
707
|
await this.discovery.connect();
|
|
705
708
|
// Retrieve actual resource schemas using semantic search and discovery
|
|
706
|
-
|
|
709
|
+
// Use capabilities collection from session data if provided (for testing with pre-populated data)
|
|
710
|
+
const resourceSchemas = await this.retrieveRelevantSchemas(data.description || '', finalTriggers, data.capabilitiesCollection);
|
|
707
711
|
// Prepare session directory for YAML saving
|
|
708
712
|
const sessionDir = (0, session_utils_1.getAndValidateSessionDirectory)(args, true);
|
|
709
713
|
const policySessionDir = path.join(sessionDir, 'policy-sessions');
|
|
@@ -829,14 +833,15 @@ Please try again or modify your policy description.`,
|
|
|
829
833
|
/**
|
|
830
834
|
* Retrieve relevant schemas for Kyverno generation using semantic search
|
|
831
835
|
*/
|
|
832
|
-
async retrieveRelevantSchemas(policyDescription, triggers) {
|
|
836
|
+
async retrieveRelevantSchemas(policyDescription, triggers, collection) {
|
|
833
837
|
// Combine policy description with triggers for enhanced search
|
|
834
838
|
const searchQuery = [policyDescription, ...triggers].join(' ');
|
|
835
839
|
console.info('Performing semantic search for relevant capabilities', {
|
|
836
840
|
searchQuery,
|
|
837
|
-
triggerCount: triggers.length
|
|
841
|
+
triggerCount: triggers.length,
|
|
842
|
+
collection: collection || 'capabilities'
|
|
838
843
|
});
|
|
839
|
-
const capabilityService = new capability_vector_service_1.CapabilityVectorService();
|
|
844
|
+
const capabilityService = new capability_vector_service_1.CapabilityVectorService(collection);
|
|
840
845
|
// Use existing searchCapabilities function - no fallback, let it throw if it fails
|
|
841
846
|
const searchResults = await capabilityService.searchCapabilities(searchQuery, {
|
|
842
847
|
limit: 50 // Higher limit to get more relevant resources - aligns with recommendation tool
|
|
@@ -877,11 +882,13 @@ Please try again or modify your policy description.`,
|
|
|
877
882
|
});
|
|
878
883
|
}
|
|
879
884
|
catch (error) {
|
|
880
|
-
console.
|
|
881
|
-
resourceName
|
|
885
|
+
console.warn('Skipping resource schema (not available in cluster)', error, {
|
|
886
|
+
resourceName,
|
|
887
|
+
error: error instanceof Error ? error.message : String(error)
|
|
882
888
|
});
|
|
883
|
-
//
|
|
884
|
-
|
|
889
|
+
// Skip resources that don't exist in the cluster instead of failing
|
|
890
|
+
// This allows policy generation to work across different Kubernetes versions
|
|
891
|
+
continue;
|
|
885
892
|
}
|
|
886
893
|
}
|
|
887
894
|
console.info('All resource schemas retrieved successfully', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified-creation-types.d.ts","sourceRoot":"","sources":["../../src/core/unified-creation-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,WAAW,GACX,WAAW,GACX,YAAY,GACZ,iBAAiB,GACjB,oBAAoB,GACpB,QAAQ,GACR,oBAAoB,GACpB,UAAU,CAAC;AAEf,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,YAAY,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAGlB,IAAI,EAAE;QACJ,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC5B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAChC,sBAAsB,CAAC,EAAE,MAAM,CAAC;QAChC,wBAAwB,CAAC,EAAE,OAAO,CAAC;QACnC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAE1B,cAAc,CAAC,EAAE;YACf,IAAI,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;YACpC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;SACvB,CAAC;
|
|
1
|
+
{"version":3,"file":"unified-creation-types.d.ts","sourceRoot":"","sources":["../../src/core/unified-creation-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,YAAY,GACpB,aAAa,GACb,UAAU,GACV,mBAAmB,GACnB,WAAW,GACX,WAAW,GACX,YAAY,GACZ,iBAAiB,GACjB,oBAAoB,GACpB,QAAQ,GACR,oBAAoB,GACpB,UAAU,CAAC;AAEf,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE9C,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,YAAY,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAGlB,IAAI,EAAE;QACJ,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC5B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;QAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,C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sourceRoot":"","sources":["../../src/interfaces/mcp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/interfaces/mcp.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAWH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAwCtC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC;CACxC;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,MAAM,CAAY;IAC1B,OAAO,CAAC,KAAK,CAAQ;IACrB,OAAO,CAAC,WAAW,CAAkB;IACrC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,gBAAgB,CAAa;IACrC,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,UAAU,CAAC,CAAkC;IACrD,OAAO,CAAC,aAAa,CAAC,CAAgC;IACtD,OAAO,CAAC,YAAY,CAAmB;IACvC,OAAO,CAAC,aAAa,CAAgB;gBAEzB,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe;IAsCjD;;OAEG;IACH,OAAO,CAAC,YAAY;IAsBpB;;OAEG;IACH,OAAO,CAAC,aAAa;IA0GrB;;OAEG;IACH,OAAO,CAAC,eAAe;IAqCvB,OAAO,CAAC,iBAAiB;IAInB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAkBd,mBAAmB;YAMnB,kBAAkB;YAiFlB,gBAAgB;IAexB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAgB3B,OAAO,IAAI,OAAO;CAGnB"}
|
package/dist/interfaces/mcp.js
CHANGED
|
@@ -15,10 +15,6 @@ const node_crypto_1 = require("node:crypto");
|
|
|
15
15
|
const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
|
|
16
16
|
const error_handling_1 = require("../core/error-handling");
|
|
17
17
|
const recommend_1 = require("../tools/recommend");
|
|
18
|
-
const choose_solution_1 = require("../tools/choose-solution");
|
|
19
|
-
const answer_question_1 = require("../tools/answer-question");
|
|
20
|
-
const generate_manifests_1 = require("../tools/generate-manifests");
|
|
21
|
-
const deploy_manifests_1 = require("../tools/deploy-manifests");
|
|
22
18
|
const version_1 = require("../tools/version");
|
|
23
19
|
const test_docs_1 = require("../tools/test-docs");
|
|
24
20
|
const organizational_data_1 = require("../tools/organizational-data");
|
|
@@ -83,38 +79,15 @@ class MCPServer {
|
|
|
83
79
|
* Register all tools with McpServer and REST registry
|
|
84
80
|
*/
|
|
85
81
|
registerTools() {
|
|
86
|
-
// Register recommend tool
|
|
82
|
+
// Register unified recommend tool with stage-based routing
|
|
83
|
+
// Handles all deployment workflow stages: recommend, chooseSolution, answerQuestion, generateManifests, deployManifests
|
|
87
84
|
this.registerTool(recommend_1.RECOMMEND_TOOL_NAME, recommend_1.RECOMMEND_TOOL_DESCRIPTION, recommend_1.RECOMMEND_TOOL_INPUT_SCHEMA, async (args) => {
|
|
88
85
|
const requestId = this.generateRequestId();
|
|
89
86
|
this.logger.info(`Processing ${recommend_1.RECOMMEND_TOOL_NAME} tool request`, {
|
|
90
87
|
requestId,
|
|
91
88
|
});
|
|
92
89
|
return await (0, recommend_1.handleRecommendTool)(args, this.dotAI, this.logger, requestId);
|
|
93
|
-
}, '
|
|
94
|
-
// Register chooseSolution tool
|
|
95
|
-
this.registerTool(choose_solution_1.CHOOSESOLUTION_TOOL_NAME, choose_solution_1.CHOOSESOLUTION_TOOL_DESCRIPTION, choose_solution_1.CHOOSESOLUTION_TOOL_INPUT_SCHEMA, async (args) => {
|
|
96
|
-
const requestId = this.generateRequestId();
|
|
97
|
-
this.logger.info(`Processing ${choose_solution_1.CHOOSESOLUTION_TOOL_NAME} tool request`, { requestId });
|
|
98
|
-
return await (0, choose_solution_1.handleChooseSolutionTool)(args, this.dotAI, this.logger, requestId);
|
|
99
|
-
}, 'AI Tools', ['solution', 'kubernetes', 'configuration']);
|
|
100
|
-
// Register answerQuestion tool
|
|
101
|
-
this.registerTool(answer_question_1.ANSWERQUESTION_TOOL_NAME, answer_question_1.ANSWERQUESTION_TOOL_DESCRIPTION, answer_question_1.ANSWERQUESTION_TOOL_INPUT_SCHEMA, async (args) => {
|
|
102
|
-
const requestId = this.generateRequestId();
|
|
103
|
-
this.logger.info(`Processing ${answer_question_1.ANSWERQUESTION_TOOL_NAME} tool request`, { requestId });
|
|
104
|
-
return await (0, answer_question_1.handleAnswerQuestionTool)(args, this.dotAI, this.logger, requestId);
|
|
105
|
-
}, 'AI Tools', ['configuration', 'questions', 'workflow']);
|
|
106
|
-
// Register generateManifests tool
|
|
107
|
-
this.registerTool(generate_manifests_1.GENERATEMANIFESTS_TOOL_NAME, generate_manifests_1.GENERATEMANIFESTS_TOOL_DESCRIPTION, generate_manifests_1.GENERATEMANIFESTS_TOOL_INPUT_SCHEMA, async (args) => {
|
|
108
|
-
const requestId = this.generateRequestId();
|
|
109
|
-
this.logger.info(`Processing ${generate_manifests_1.GENERATEMANIFESTS_TOOL_NAME} tool request`, { requestId });
|
|
110
|
-
return await (0, generate_manifests_1.handleGenerateManifestsTool)(args, this.dotAI, this.logger, requestId);
|
|
111
|
-
}, 'Deployment', ['manifests', 'kubernetes', 'generation']);
|
|
112
|
-
// Register deployManifests tool
|
|
113
|
-
this.registerTool(deploy_manifests_1.DEPLOYMANIFESTS_TOOL_NAME, deploy_manifests_1.DEPLOYMANIFESTS_TOOL_DESCRIPTION, deploy_manifests_1.DEPLOYMANIFESTS_TOOL_INPUT_SCHEMA, async (args) => {
|
|
114
|
-
const requestId = this.generateRequestId();
|
|
115
|
-
this.logger.info(`Processing ${deploy_manifests_1.DEPLOYMANIFESTS_TOOL_NAME} tool request`, { requestId });
|
|
116
|
-
return await (0, deploy_manifests_1.handleDeployManifestsTool)(args, this.dotAI, this.logger, requestId);
|
|
117
|
-
}, 'Deployment', ['deployment', 'kubernetes', 'kubectl']);
|
|
90
|
+
}, 'Deployment', ['recommendation', 'kubernetes', 'deployment', 'workflow']);
|
|
118
91
|
// Register version tool
|
|
119
92
|
this.registerTool(version_1.VERSION_TOOL_NAME, version_1.VERSION_TOOL_DESCRIPTION, version_1.VERSION_TOOL_INPUT_SCHEMA, async (args) => {
|
|
120
93
|
const requestId = this.generateRequestId();
|
|
@@ -146,16 +119,12 @@ class MCPServer {
|
|
|
146
119
|
this.logger.info('Registered all tools with McpServer', {
|
|
147
120
|
tools: [
|
|
148
121
|
recommend_1.RECOMMEND_TOOL_NAME,
|
|
149
|
-
choose_solution_1.CHOOSESOLUTION_TOOL_NAME,
|
|
150
|
-
answer_question_1.ANSWERQUESTION_TOOL_NAME,
|
|
151
|
-
generate_manifests_1.GENERATEMANIFESTS_TOOL_NAME,
|
|
152
|
-
deploy_manifests_1.DEPLOYMANIFESTS_TOOL_NAME,
|
|
153
122
|
version_1.VERSION_TOOL_NAME,
|
|
154
123
|
test_docs_1.TESTDOCS_TOOL_NAME,
|
|
155
124
|
organizational_data_1.ORGANIZATIONAL_DATA_TOOL_NAME,
|
|
156
125
|
remediate_1.REMEDIATE_TOOL_NAME,
|
|
157
126
|
],
|
|
158
|
-
totalTools:
|
|
127
|
+
totalTools: 5,
|
|
159
128
|
});
|
|
160
129
|
}
|
|
161
130
|
/**
|
|
@@ -736,7 +736,7 @@ async function handleAnswerQuestionTool(args, dotAI, logger, requestId) {
|
|
|
736
736
|
userAnswers: userAnswers,
|
|
737
737
|
hasOpenRequirements: !!(openAnswer && openAnswer !== 'N/A')
|
|
738
738
|
},
|
|
739
|
-
nextAction: 'generateManifests',
|
|
739
|
+
nextAction: 'Call recommend tool with stage: generateManifests',
|
|
740
740
|
guidance: 'Configuration complete. Ready to generate Kubernetes manifests for deployment.',
|
|
741
741
|
agentInstructions: 'All configuration stages are now complete. You may proceed to generate Kubernetes manifests using the generateManifests tool.',
|
|
742
742
|
timestamp: new Date().toISOString()
|
|
@@ -763,7 +763,7 @@ async function handleAnswerQuestionTool(args, dotAI, logger, requestId) {
|
|
|
763
763
|
message: getStageMessage(newStageState.currentStage),
|
|
764
764
|
guidance: getStageGuidance(newStageState.currentStage),
|
|
765
765
|
agentInstructions: getAgentInstructions(newStageState.currentStage),
|
|
766
|
-
nextAction:
|
|
766
|
+
nextAction: `Call recommend tool with stage: answerQuestion:${newStageState.currentStage}`,
|
|
767
767
|
timestamp: new Date().toISOString()
|
|
768
768
|
};
|
|
769
769
|
return {
|
|
@@ -138,7 +138,7 @@ async function handleChooseSolutionTool(args, dotAI, logger, requestId) {
|
|
|
138
138
|
questions: solution.questions.required || [],
|
|
139
139
|
nextStage: 'basic',
|
|
140
140
|
message: 'Please provide the required configuration for your application.',
|
|
141
|
-
nextAction: 'answerQuestion',
|
|
141
|
+
nextAction: 'Call recommend tool with stage: answerQuestion:required',
|
|
142
142
|
guidance: 'Answer questions in this stage or skip to proceed to the next stage. Do NOT try to generate manifests yet.',
|
|
143
143
|
timestamp: new Date().toISOString()
|
|
144
144
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizational-data.d.ts","sourceRoot":"","sources":["../../src/tools/organizational-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAchD,eAAO,MAAM,6BAA6B,kBAAkB,CAAC;AAC7D,eAAO,MAAM,oCAAoC,+jBAAyjB,CAAC;AAG3mB,eAAO,MAAM,qCAAqC
|
|
1
|
+
{"version":3,"file":"organizational-data.d.ts","sourceRoot":"","sources":["../../src/tools/organizational-data.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAchD,eAAO,MAAM,6BAA6B,kBAAkB,CAAC;AAC7D,eAAO,MAAM,oCAAoC,+jBAAyjB,CAAC;AAG3mB,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;CA2BjD,CAAC;AAujBF;;GAEG;AACH,wBAAsB,4BAA4B,CAChD,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,KAAK,GAAG,IAAI,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,GAAG,CAAC,CA0Hd"}
|
|
@@ -78,7 +78,9 @@ exports.ORGANIZATIONAL_DATA_TOOL_INPUT_SCHEMA = {
|
|
|
78
78
|
apiVersion: zod_1.z.string()
|
|
79
79
|
}).optional().describe('Kubernetes resource reference (for capabilities operations)'),
|
|
80
80
|
// Resource list for specific resource scanning
|
|
81
|
-
resourceList: zod_1.z.string().optional().describe('Comma-separated list of resources to scan (format: Kind.group or Kind for core resources)')
|
|
81
|
+
resourceList: zod_1.z.string().optional().describe('Comma-separated list of resources to scan (format: Kind.group or Kind for core resources)'),
|
|
82
|
+
// Collection name for capabilities (allows using different collections for different purposes)
|
|
83
|
+
collection: zod_1.z.string().optional().describe('Collection name for capabilities operations (default: "capabilities", use "capabilities-policies" for pre-populated test data)')
|
|
82
84
|
};
|
|
83
85
|
/**
|
|
84
86
|
* Validate Vector DB connection and return helpful error if unavailable
|
|
@@ -374,7 +376,8 @@ function cleanupCapabilitySession(session, args, logger, requestId) {
|
|
|
374
376
|
async function handleCapabilityScan(args, logger, requestId) {
|
|
375
377
|
// Validate Vector DB and embedding service dependencies upfront
|
|
376
378
|
// This prevents users from going through the entire workflow only to fail at storage
|
|
377
|
-
|
|
379
|
+
// Use collection from args if provided (for testing with pre-populated data)
|
|
380
|
+
const capabilityService = new index_1.CapabilityVectorService(args.collection);
|
|
378
381
|
// Check Vector DB connection and initialize collection
|
|
379
382
|
try {
|
|
380
383
|
const vectorDBHealthy = await capabilityService.healthCheck();
|
|
@@ -7,16 +7,17 @@ import { Logger } from '../core/error-handling';
|
|
|
7
7
|
export declare const RECOMMEND_TOOL_NAME = "recommend";
|
|
8
8
|
export declare const RECOMMEND_TOOL_DESCRIPTION = "Deploy, create, setup, install, or run applications, infrastructure, and services on Kubernetes with AI recommendations. Describe what you want to deploy. Does NOT handle policy creation, organizational patterns, or resource capabilities - use manageOrgData for those.";
|
|
9
9
|
export declare const RECOMMEND_TOOL_INPUT_SCHEMA: {
|
|
10
|
-
|
|
10
|
+
stage: z.ZodOptional<z.ZodString>;
|
|
11
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
11
12
|
final: z.ZodOptional<z.ZodBoolean>;
|
|
13
|
+
solutionId: z.ZodOptional<z.ZodString>;
|
|
14
|
+
answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
15
|
+
timeout: z.ZodOptional<z.ZodNumber>;
|
|
12
16
|
};
|
|
13
17
|
/**
|
|
14
|
-
* Direct MCP tool handler for recommend functionality
|
|
18
|
+
* Direct MCP tool handler for recommend functionality (unified with stage routing)
|
|
15
19
|
*/
|
|
16
|
-
export declare function handleRecommendTool(args: {
|
|
17
|
-
intent: string;
|
|
18
|
-
final?: boolean;
|
|
19
|
-
}, dotAI: DotAI, logger: Logger, requestId: string): Promise<{
|
|
20
|
+
export declare function handleRecommendTool(args: any, dotAI: DotAI, logger: Logger, requestId: string): Promise<{
|
|
20
21
|
content: {
|
|
21
22
|
type: 'text';
|
|
22
23
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommend.d.ts","sourceRoot":"","sources":["../../src/tools/recommend.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"recommend.d.ts","sourceRoot":"","sources":["../../src/tools/recommend.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAYhD,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,0BAA0B,iRAAiR,CAAC;AAGzT,eAAO,MAAM,2BAA2B;;;;;;;CAUvC,CAAC;AA2EF;;GAEG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAgSxD"}
|
package/dist/tools/recommend.js
CHANGED
|
@@ -47,13 +47,24 @@ const fs = __importStar(require("fs"));
|
|
|
47
47
|
const path = __importStar(require("path"));
|
|
48
48
|
const crypto = __importStar(require("crypto"));
|
|
49
49
|
const session_utils_1 = require("../core/session-utils");
|
|
50
|
+
const choose_solution_1 = require("./choose-solution");
|
|
51
|
+
const answer_question_1 = require("./answer-question");
|
|
52
|
+
const generate_manifests_1 = require("./generate-manifests");
|
|
53
|
+
const deploy_manifests_1 = require("./deploy-manifests");
|
|
50
54
|
// Tool metadata for direct MCP registration
|
|
51
55
|
exports.RECOMMEND_TOOL_NAME = 'recommend';
|
|
52
56
|
exports.RECOMMEND_TOOL_DESCRIPTION = 'Deploy, create, setup, install, or run applications, infrastructure, and services on Kubernetes with AI recommendations. Describe what you want to deploy. Does NOT handle policy creation, organizational patterns, or resource capabilities - use manageOrgData for those.';
|
|
53
|
-
// Zod schema for MCP registration
|
|
57
|
+
// Zod schema for MCP registration (unified tool with stage routing)
|
|
54
58
|
exports.RECOMMEND_TOOL_INPUT_SCHEMA = {
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
stage: zod_1.z.string().optional().describe('Deployment workflow stage: "recommend" (default), "chooseSolution", "answerQuestion:required", "answerQuestion:basic", "answerQuestion:advanced", "answerQuestion:open", "generateManifests", "deployManifests". Defaults to "recommend" if omitted.'),
|
|
60
|
+
intent: zod_1.z.string().min(1).max(1000).optional().describe('What the user wants to deploy, create, setup, install, or run on Kubernetes. Examples: "deploy web application", "create PostgreSQL database", "setup Redis cache", "install Prometheus monitoring", "configure Ingress controller", "provision storage volumes", "launch MongoDB operator", "run Node.js API", "setup CI/CD pipeline", "create load balancer", "install Grafana dashboard", "deploy React frontend"'),
|
|
61
|
+
final: zod_1.z.boolean().optional().describe('Set to true to skip intent clarification and proceed directly with recommendations. If false or omitted, the tool will analyze the intent and provide clarification questions to help improve recommendation quality.'),
|
|
62
|
+
// Parameters for chooseSolution stage
|
|
63
|
+
solutionId: zod_1.z.string().optional().describe('Solution ID for chooseSolution, answerQuestion, generateManifests, and deployManifests stages'),
|
|
64
|
+
// Parameters for answerQuestion stage (stage parameter contains the config stage like "answerQuestion:required")
|
|
65
|
+
answers: zod_1.z.record(zod_1.z.any()).optional().describe('User answers for answerQuestion stage'),
|
|
66
|
+
// Parameters for deployManifests stage
|
|
67
|
+
timeout: zod_1.z.number().optional().describe('Deployment timeout in seconds for deployManifests stage')
|
|
57
68
|
};
|
|
58
69
|
/**
|
|
59
70
|
* Analyze intent for clarification opportunities using AI
|
|
@@ -120,11 +131,34 @@ function writeSolutionFile(sessionDir, solutionId, solutionData) {
|
|
|
120
131
|
}
|
|
121
132
|
}
|
|
122
133
|
/**
|
|
123
|
-
* Direct MCP tool handler for recommend functionality
|
|
134
|
+
* Direct MCP tool handler for recommend functionality (unified with stage routing)
|
|
124
135
|
*/
|
|
125
136
|
async function handleRecommendTool(args, dotAI, logger, requestId) {
|
|
126
137
|
return await error_handling_1.ErrorHandler.withErrorHandling(async () => {
|
|
127
|
-
|
|
138
|
+
// Stage-based routing: extract stage and route to appropriate handler
|
|
139
|
+
const stage = args.stage || 'recommend'; // Default to 'recommend' if not specified
|
|
140
|
+
logger.debug('Handling recommend request with stage routing', { requestId, stage, intent: args?.intent });
|
|
141
|
+
// Route to appropriate handler based on stage
|
|
142
|
+
if (stage === 'chooseSolution') {
|
|
143
|
+
return await (0, choose_solution_1.handleChooseSolutionTool)(args, dotAI, logger, requestId);
|
|
144
|
+
}
|
|
145
|
+
if (stage.startsWith('answerQuestion:')) {
|
|
146
|
+
// Extract config stage from stage parameter (e.g., "answerQuestion:required" -> "required")
|
|
147
|
+
const configStage = stage.split(':')[1];
|
|
148
|
+
const answerQuestionArgs = {
|
|
149
|
+
solutionId: args.solutionId,
|
|
150
|
+
stage: configStage,
|
|
151
|
+
answers: args.answers
|
|
152
|
+
};
|
|
153
|
+
return await (0, answer_question_1.handleAnswerQuestionTool)(answerQuestionArgs, dotAI, logger, requestId);
|
|
154
|
+
}
|
|
155
|
+
if (stage === 'generateManifests') {
|
|
156
|
+
return await (0, generate_manifests_1.handleGenerateManifestsTool)(args, dotAI, logger, requestId);
|
|
157
|
+
}
|
|
158
|
+
if (stage === 'deployManifests') {
|
|
159
|
+
return await (0, deploy_manifests_1.handleDeployManifestsTool)(args, dotAI, logger, requestId);
|
|
160
|
+
}
|
|
161
|
+
// Default: recommend stage (original recommend logic)
|
|
128
162
|
// Input validation is handled automatically by MCP SDK with Zod schema
|
|
129
163
|
// args are already validated and typed when we reach this point
|
|
130
164
|
// Check for Claude API key
|
|
@@ -308,7 +342,7 @@ async function handleRecommendTool(args, dotAI, logger, requestId) {
|
|
|
308
342
|
totalPatternInfluences: totalPatternInfluences,
|
|
309
343
|
patternsAvailable: totalPatternInfluences > 0 ? "Yes" : "None found or pattern search failed"
|
|
310
344
|
},
|
|
311
|
-
nextAction: "Call
|
|
345
|
+
nextAction: "Call recommend tool with stage: chooseSolution and your preferred solutionId",
|
|
312
346
|
guidance: "🔴 CRITICAL: You MUST present these solutions to the user and ask them to choose. DO NOT automatically call chooseSolution() without user input. Stop here and wait for user selection. IMPORTANT: Show the list of Kubernetes resources (from the 'resources' field) that each solution will use - this helps users understand what gets deployed. ALSO: Include pattern usage information in your response - show which solutions used organizational patterns and which did not.",
|
|
313
347
|
timestamp
|
|
314
348
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vfarcic/dot-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.0",
|
|
4
4
|
"description": "AI-powered development productivity platform that enhances software development workflows through intelligent automation and AI-driven assistance",
|
|
5
5
|
"mcpName": "io.github.vfarcic/dot-ai",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
"./mcp": "./dist/mcp/server.js"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"
|
|
17
|
-
"test": "
|
|
18
|
-
"test:
|
|
19
|
-
"test:
|
|
20
|
-
"test:
|
|
16
|
+
"test": "npm run test:integration",
|
|
17
|
+
"test:integration:setup": "./tests/integration/infrastructure/setup-cluster.sh",
|
|
18
|
+
"test:integration:teardown": "./tests/integration/infrastructure/teardown-cluster.sh",
|
|
19
|
+
"test:integration:server": "KUBECONFIG=./kubeconfig-test.yaml PORT=3456 DOT_AI_SESSION_DIR=./tmp/sessions TRANSPORT_TYPE=http QDRANT_URL=http://localhost:6335 QDRANT_CAPABILITIES_COLLECTION=capabilities-policies ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY OPENAI_API_KEY=$OPENAI_API_KEY node dist/mcp/server.js",
|
|
20
|
+
"test:integration": "vitest run --config=vitest.integration.config.ts --test-timeout=1200000",
|
|
21
|
+
"test:integration:watch": "vitest --config=vitest.integration.config.ts --test-timeout=1200000",
|
|
21
22
|
"clean": "rm -rf dist",
|
|
22
23
|
"prebuild": "npm run clean && npm run lint",
|
|
23
24
|
"build": "tsc --sourceMap false",
|
|
@@ -30,9 +31,6 @@
|
|
|
30
31
|
"start:mcp": "node dist/mcp/server.js",
|
|
31
32
|
"lint": "eslint src/ --ext .ts",
|
|
32
33
|
"format": "prettier --write src/",
|
|
33
|
-
"ci": "npm run lint && npm run ci:build && npm run ci:test && npm audit --audit-level moderate",
|
|
34
|
-
"ci:test": "npm run test",
|
|
35
|
-
"ci:build": "npm run build:prod",
|
|
36
34
|
"audit": "npm audit",
|
|
37
35
|
"version:dev": "npm version patch --preid=devel --prerelease",
|
|
38
36
|
"version:prod": "npm version patch"
|
|
@@ -72,19 +70,18 @@
|
|
|
72
70
|
],
|
|
73
71
|
"devDependencies": {
|
|
74
72
|
"@types/glob": "^9.0.0",
|
|
75
|
-
"@types/jest": "^29.5.0",
|
|
76
73
|
"@types/node": "^22.0.0",
|
|
77
74
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
78
75
|
"@typescript-eslint/parser": "^6.21.0",
|
|
76
|
+
"@vitest/ui": "^3.2.4",
|
|
79
77
|
"eslint": "^8.0.0",
|
|
80
|
-
"jest": "^29.5.0",
|
|
81
78
|
"prettier": "^3.0.0",
|
|
82
|
-
"ts-jest": "^29.1.0",
|
|
83
79
|
"ts-node": "^10.9.0",
|
|
84
|
-
"typescript": "^5.0.0"
|
|
80
|
+
"typescript": "^5.0.0",
|
|
81
|
+
"vitest": "^3.2.4"
|
|
85
82
|
},
|
|
86
83
|
"dependencies": {
|
|
87
|
-
"@anthropic-ai/sdk": "^0.
|
|
84
|
+
"@anthropic-ai/sdk": "^0.65.0",
|
|
88
85
|
"@kubernetes/client-node": "^1.3.0",
|
|
89
86
|
"@modelcontextprotocol/sdk": "^1.13.2",
|
|
90
87
|
"@qdrant/js-client-rest": "^1.15.0",
|
|
@@ -92,37 +89,5 @@
|
|
|
92
89
|
"openai": "^5.11.0",
|
|
93
90
|
"yaml": "^2.8.0",
|
|
94
91
|
"zod-to-json-schema": "^3.24.6"
|
|
95
|
-
},
|
|
96
|
-
"jest": {
|
|
97
|
-
"preset": "ts-jest",
|
|
98
|
-
"testEnvironment": "node",
|
|
99
|
-
"silent": false,
|
|
100
|
-
"verbose": false,
|
|
101
|
-
"roots": [
|
|
102
|
-
"<rootDir>/src",
|
|
103
|
-
"<rootDir>/tests"
|
|
104
|
-
],
|
|
105
|
-
"testMatch": [
|
|
106
|
-
"**/__tests__/**/*.ts",
|
|
107
|
-
"**/*.test.ts",
|
|
108
|
-
"**/*.spec.ts"
|
|
109
|
-
],
|
|
110
|
-
"collectCoverageFrom": [
|
|
111
|
-
"src/**/*.ts",
|
|
112
|
-
"!src/**/*.d.ts",
|
|
113
|
-
"!src/**/index.ts"
|
|
114
|
-
],
|
|
115
|
-
"coverageDirectory": "coverage",
|
|
116
|
-
"coverageReporters": [
|
|
117
|
-
"text",
|
|
118
|
-
"lcov",
|
|
119
|
-
"html"
|
|
120
|
-
],
|
|
121
|
-
"moduleNameMapper": {
|
|
122
|
-
"@kubernetes/client-node": "<rootDir>/tests/__mocks__/@kubernetes/client-node.ts"
|
|
123
|
-
},
|
|
124
|
-
"setupFilesAfterEnv": [
|
|
125
|
-
"<rootDir>/tests/setup.ts"
|
|
126
|
-
]
|
|
127
92
|
}
|
|
128
93
|
}
|
|
@@ -125,13 +125,14 @@ Return your response as JSON in this exact format:
|
|
|
125
125
|
"max": 100,
|
|
126
126
|
"pattern": "^[a-z0-9-]+$"
|
|
127
127
|
},
|
|
128
|
+
"suggestedAnswer": "example-value"
|
|
128
129
|
}
|
|
129
130
|
],
|
|
130
131
|
"basic": [
|
|
131
132
|
// same format as required
|
|
132
133
|
],
|
|
133
134
|
"advanced": [
|
|
134
|
-
// same format as required
|
|
135
|
+
// same format as required
|
|
135
136
|
],
|
|
136
137
|
"open": {
|
|
137
138
|
"question": "Is there anything else about your requirements or constraints that would help us provide better recommendations?",
|
|
@@ -143,6 +144,7 @@ Return your response as JSON in this exact format:
|
|
|
143
144
|
## Important Notes
|
|
144
145
|
|
|
145
146
|
- **CRITICAL**: Only ask questions about properties explicitly defined in the provided resource schemas
|
|
147
|
+
- **REQUIRED**: Each question must include a `suggestedAnswer` field with a valid example value that passes the validation rules
|
|
146
148
|
- **Generate comprehensive questions** covering all meaningful configuration options available in the resource schemas
|
|
147
149
|
- Focus on questions that actually affect the generated manifests based on the actual schema
|
|
148
150
|
- **Prefer explicit configuration over defaults** - give users control over important settings even if reasonable defaults exist
|
|
@@ -29,10 +29,12 @@ Complete the PRD implementation workflow including branch management, pull reque
|
|
|
29
29
|
|
|
30
30
|
### 1. Pre-Completion Validation
|
|
31
31
|
- [ ] **All PRD checkboxes completed**: Verify every requirement is implemented and tested
|
|
32
|
-
- [ ] **All tests passing**: Run project test suite to ensure quality standards (skip if documentation-only)
|
|
33
32
|
- [ ] **Documentation updated**: All user-facing docs reflect implemented functionality
|
|
34
33
|
- [ ] **No outstanding blockers**: All dependencies resolved and technical debt addressed
|
|
35
34
|
- [ ] **Update PRD status**: Mark PRD as "Complete" with completion date
|
|
35
|
+
- [ ] **Archive PRD file**: Move completed PRD to `./prds/done/` directory to maintain project organization
|
|
36
|
+
|
|
37
|
+
**Note**: Tests will run automatically in the CI/CD pipeline when the PR is created. Do not run tests locally during the completion workflow.
|
|
36
38
|
|
|
37
39
|
### 2. Branch and Commit Management
|
|
38
40
|
|
|
@@ -60,6 +62,9 @@ Complete the PRD implementation workflow including branch management, pull reque
|
|
|
60
62
|
- [ ] **Check PR details**: Use `gh pr view [pr-number]` to check for human review comments and PR metadata
|
|
61
63
|
- [ ] **Review all automated feedback**: Check PR comments section for automated code review feedback (bots, linters, analyzers)
|
|
62
64
|
- **Use multiple methods to capture all feedback**:
|
|
65
|
+
- **MCP servers** (preferred when available): Use any available MCP servers for comprehensive review data
|
|
66
|
+
- Code review MCPs (e.g., CodeRabbit, custom review servers) for detailed AI code reviews
|
|
67
|
+
- Check available MCP tools/functions related to code reviews, pull requests, or automated feedback
|
|
63
68
|
- CLI commands: `gh pr view [pr-number]`, `gh pr checks [pr-number]`, `gh api repos/owner/repo/pulls/[pr-number]/comments`
|
|
64
69
|
- **Web interface inspection**: Fetch the PR URL directly to capture all comments, including inline code suggestions that CLI tools may miss
|
|
65
70
|
- Look for comments from automated tools (usernames ending in 'ai', 'bot', or known review tools)
|
|
@@ -89,6 +94,7 @@ Complete the PRD implementation workflow including branch management, pull reque
|
|
|
89
94
|
- [ ] **Monitor for issues**: Watch for any post-deployment problems
|
|
90
95
|
|
|
91
96
|
### 5. Issue Closure
|
|
97
|
+
- [ ] **Update issue PRD link**: Update the GitHub issue description to reference the new PRD path in `./prds/done/` directory
|
|
92
98
|
- [ ] **Close GitHub issue**: Add final completion comment and close
|
|
93
99
|
- [ ] **Archive artifacts**: Save any temporary files or testing data if needed
|
|
94
100
|
- [ ] **Team notification**: Announce feature completion to relevant stakeholders
|