kubeview-mcp 1.6.0 → 1.7.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 (73) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +24 -10
  3. package/SKILL.md +101 -92
  4. package/dist/src/kubernetes/resources/HelmReleaseOperations.d.ts +62 -0
  5. package/dist/src/kubernetes/resources/HelmReleaseOperations.d.ts.map +1 -0
  6. package/dist/src/kubernetes/resources/HelmReleaseOperations.js +381 -0
  7. package/dist/src/kubernetes/resources/HelmReleaseOperations.js.map +1 -0
  8. package/dist/src/plugins/HelmToolsPlugin.d.ts +3 -1
  9. package/dist/src/plugins/HelmToolsPlugin.d.ts.map +1 -1
  10. package/dist/src/plugins/HelmToolsPlugin.js +43 -6
  11. package/dist/src/plugins/HelmToolsPlugin.js.map +1 -1
  12. package/dist/src/tools/helm/BaseTool.d.ts +2 -1
  13. package/dist/src/tools/helm/BaseTool.d.ts.map +1 -1
  14. package/dist/src/tools/helm/BaseTool.js.map +1 -1
  15. package/dist/src/tools/helm/HelmGetHooksTool.d.ts +2 -1
  16. package/dist/src/tools/helm/HelmGetHooksTool.d.ts.map +1 -1
  17. package/dist/src/tools/helm/HelmGetHooksTool.js +1 -1
  18. package/dist/src/tools/helm/HelmGetHooksTool.js.map +1 -1
  19. package/dist/src/tools/helm/HelmGetManifestTool.d.ts +2 -1
  20. package/dist/src/tools/helm/HelmGetManifestTool.d.ts.map +1 -1
  21. package/dist/src/tools/helm/HelmGetManifestTool.js +1 -1
  22. package/dist/src/tools/helm/HelmGetManifestTool.js.map +1 -1
  23. package/dist/src/tools/helm/HelmGetNotesTool.d.ts +2 -1
  24. package/dist/src/tools/helm/HelmGetNotesTool.d.ts.map +1 -1
  25. package/dist/src/tools/helm/HelmGetNotesTool.js +1 -1
  26. package/dist/src/tools/helm/HelmGetNotesTool.js.map +1 -1
  27. package/dist/src/tools/helm/HelmGetResourcesTool.d.ts +2 -1
  28. package/dist/src/tools/helm/HelmGetResourcesTool.d.ts.map +1 -1
  29. package/dist/src/tools/helm/HelmGetResourcesTool.js +1 -1
  30. package/dist/src/tools/helm/HelmGetResourcesTool.js.map +1 -1
  31. package/dist/src/tools/helm/HelmGetTool.d.ts +4 -2
  32. package/dist/src/tools/helm/HelmGetTool.d.ts.map +1 -1
  33. package/dist/src/tools/helm/HelmGetTool.js +179 -91
  34. package/dist/src/tools/helm/HelmGetTool.js.map +1 -1
  35. package/dist/src/tools/helm/HelmGetValuesTool.d.ts +2 -1
  36. package/dist/src/tools/helm/HelmGetValuesTool.d.ts.map +1 -1
  37. package/dist/src/tools/helm/HelmGetValuesTool.js +1 -1
  38. package/dist/src/tools/helm/HelmGetValuesTool.js.map +1 -1
  39. package/dist/src/tools/helm/HelmHistoryTool.d.ts +2 -1
  40. package/dist/src/tools/helm/HelmHistoryTool.d.ts.map +1 -1
  41. package/dist/src/tools/helm/HelmHistoryTool.js +1 -1
  42. package/dist/src/tools/helm/HelmHistoryTool.js.map +1 -1
  43. package/dist/src/tools/helm/HelmListTool.d.ts +3 -1
  44. package/dist/src/tools/helm/HelmListTool.d.ts.map +1 -1
  45. package/dist/src/tools/helm/HelmListTool.js +42 -10
  46. package/dist/src/tools/helm/HelmListTool.js.map +1 -1
  47. package/dist/src/tools/helm/HelmListWithResourcesTool.d.ts +2 -1
  48. package/dist/src/tools/helm/HelmListWithResourcesTool.d.ts.map +1 -1
  49. package/dist/src/tools/helm/HelmListWithResourcesTool.js +1 -1
  50. package/dist/src/tools/helm/HelmListWithResourcesTool.js.map +1 -1
  51. package/dist/src/tools/helm/HelmStatusTool.d.ts +2 -1
  52. package/dist/src/tools/helm/HelmStatusTool.d.ts.map +1 -1
  53. package/dist/src/tools/helm/HelmStatusTool.js +1 -1
  54. package/dist/src/tools/helm/HelmStatusTool.js.map +1 -1
  55. package/dist/src/utils/HelmDataParser.d.ts +51 -0
  56. package/dist/src/utils/HelmDataParser.d.ts.map +1 -0
  57. package/dist/src/utils/HelmDataParser.js +144 -0
  58. package/dist/src/utils/HelmDataParser.js.map +1 -0
  59. package/dist/src/version.d.ts +1 -1
  60. package/dist/src/version.js +1 -1
  61. package/dist/tests/helm/HelmGetTool.test.d.ts +2 -0
  62. package/dist/tests/helm/HelmGetTool.test.d.ts.map +1 -0
  63. package/dist/tests/helm/HelmGetTool.test.js +78 -0
  64. package/dist/tests/helm/HelmGetTool.test.js.map +1 -0
  65. package/dist/tests/kubernetes/HelmReleaseOperations.test.d.ts +2 -0
  66. package/dist/tests/kubernetes/HelmReleaseOperations.test.d.ts.map +1 -0
  67. package/dist/tests/kubernetes/HelmReleaseOperations.test.js +218 -0
  68. package/dist/tests/kubernetes/HelmReleaseOperations.test.js.map +1 -0
  69. package/dist/tests/utils/HelmDataParser.test.d.ts +2 -0
  70. package/dist/tests/utils/HelmDataParser.test.d.ts.map +1 -0
  71. package/dist/tests/utils/HelmDataParser.test.js +81 -0
  72. package/dist/tests/utils/HelmDataParser.test.js.map +1 -0
  73. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.7.0] - 2026-02-17
11
+
12
+ ### Added
13
+ - **feat(helm): add API-first backend support for Helm commands**
14
+ - **feat(helm): add CLI fallback support for Helm v4 commands**
15
+
16
+ ### Changed
17
+ - **Refactor CLI run-command.js to simplify Kubernetes and Helm tool class handling**
18
+
19
+
10
20
  ## [1.6.0] - 2026-02-04
11
21
 
12
22
  ### Changed
package/README.md CHANGED
@@ -14,7 +14,7 @@ Learn more about the benefits of code mode and implementation in [Evicting MCP t
14
14
  - **🧠 Code Mode**: Sandboxed TypeScript environment for complex reasoning and multi-step workflows.
15
15
  - **🛡️ Read-Only & Safe**: Designed for production safety with zero write access and sensitive data masking.
16
16
  - **☸️ Kubernetes Integration**: List/get resources, fetch metrics, stream logs and events, execute commands, and tools to diagnose network issues.
17
- - **📦 Helm Support**: Inspect releases, values, manifests, and history.
17
+ - **📦 Helm Support (API-first)**: Inspect releases, values, manifests, and history via Kubernetes API first, with the CLI fallback.
18
18
  - **🐙 Argo Ecosystem**: Manage Argo Workflows and Argo CD applications using direct Kubernetes API or CLI.
19
19
 
20
20
  ---
@@ -33,7 +33,7 @@ Learn more about the benefits of code mode and implementation in [Evicting MCP t
33
33
 
34
34
  - Node.js ≥ 18
35
35
  - Access to a Kubernetes cluster
36
- - Optionally, CLIs installed in current $PATH: `helm`, `argo`, `argocd`
36
+ - Optionally, CLIs installed in current $PATH: `helm` (fallback only), `argo`, `argocd`
37
37
 
38
38
  ### Installation
39
39
 
@@ -64,18 +64,19 @@ Add to your `mcpServers` configuration (e.g., in Cursor or Claude Desktop):
64
64
 
65
65
  Configure the server using environment variables:
66
66
 
67
- | Variable | Description | Default |
68
- |----------|-------------|---------|
69
- | `KUBECONFIG` | Path to kubeconfig file | `~/.kube/config` |
70
- | `MCP_MODE` | Server mode: `all`, `code`, or `tools` | `all` |
71
- | `MCP_LOG_LEVEL` | Log level (`error`, `warn`, `info`, `debug`) | `info` |
72
- | `MCP_HIDE_SENSITIVE` | Enable global sensitive data masking | `false` |
67
+ | Variable | Description | Default |
68
+ | -------------------- | -------------------------------------------- | ---------------- |
69
+ | `KUBECONFIG` | Path to kubeconfig file | `~/.kube/config` |
70
+ | `MCP_MODE` | Server mode: `all`, `code`, or `tools` | `all` |
71
+ | `MCP_LOG_LEVEL` | Log level (`error`, `warn`, `info`, `debug`) | `info` |
72
+ | `MCP_HIDE_SENSITIVE` | Enable global sensitive data masking | `false` |
73
73
 
74
74
  ---
75
75
 
76
76
  ## 🛠️ Tools Overview
77
77
 
78
78
  ### Kubernetes
79
+
79
80
  - **`kube_list`**: List resources or get cluster diagnostics.
80
81
  - **`kube_get`**: Describe specific resources (supports all K8s types).
81
82
  - **`kube_metrics`**: Fetch CPU/memory metrics for nodes and pods.
@@ -85,14 +86,25 @@ Configure the server using environment variables:
85
86
  - **`kube_net`**: Run in-cluster network diagnostics.
86
87
 
87
88
  ### Helm
88
- - **`helm_list`**: List Helm releases.
89
- - **`helm_get`**: Fetch release values, manifests, and history.
89
+
90
+ - **`helm_list`**: List Helm releases (Kubernetes API first, CLI fallback).
91
+ - **`helm_get`**: Fetch release values, manifests, notes, hooks, resources, status, and history (Kubernetes API first, CLI fallback).
92
+
93
+ ### Helm Execution Strategy
94
+
95
+ - Helm tools are **API-first by default** and read Helm release metadata from Kubernetes storage backends (Secrets and ConfigMaps).
96
+ - Helm CLI is retained as a compatibility fallback path.
97
+ - In normal read-only scenarios with Kubernetes API access, Helm operations do not require the `helm` binary.
98
+ - If Helm is configured with a non-Kubernetes storage backend (for example SQL), CLI fallback may be required.
99
+ - For `helm_get`/`helm_list`, JSON/default behavior uses API first; non-JSON formatting may use CLI fallback.
90
100
 
91
101
  ### Argo
102
+
92
103
  - **`argo_list` / `argo_get`**: Manage Argo Workflows.
93
104
  - **`argocd_app`**: Inspect Argo CD applications and resources.
94
105
 
95
106
  ### Utilities
107
+
96
108
  - **`run_code`**: Execute sandboxed TypeScript code for complex tasks.
97
109
  - **`plan_step`**: Record step-by-step planning state for long, complex investigations.
98
110
 
@@ -138,6 +150,7 @@ Simply type `/kubeview/code-mode` in the prompt (or select it from the `/` promp
138
150
  ## 💻 Local Development
139
151
 
140
152
  1. **Clone & Install**:
153
+
141
154
  ```bash
142
155
  git clone https://github.com/mikhae1/kubeview-mcp.git
143
156
  cd kubeview-mcp
@@ -145,6 +158,7 @@ Simply type `/kubeview/code-mode` in the prompt (or select it from the `/` promp
145
158
  ```
146
159
 
147
160
  2. **Build & Run**:
161
+
148
162
  ```bash
149
163
  npm run build
150
164
  npm start
package/SKILL.md CHANGED
@@ -1,76 +1,81 @@
1
- # KubeView MCP Skills: Debugging Kubernetes Clusters
1
+ ---
2
+ name: kubeview-debug
3
+ description: Debug and diagnose Kubernetes clusters using KubeView MCP server tools. Use when investigating cluster issues (pod crashes, deployment failures, service connectivity problems, node issues, resource constraints), performing cluster health checks, or troubleshooting any Kubernetes workload. Trigger phrases include "cluster health", "pod won't start", "CrashLoopBackOff", "service unreachable", "deployment stuck", "node pressure", "OOMKilled", "ImagePullBackOff".
4
+ ---
5
+
6
+ # Kubernetes Cluster Debugging
2
7
 
3
- This document contains reusable investigation playbooks ("skills") for debugging Kubernetes clusters using the KubeView MCP server.
8
+ Reusable investigation playbooks for debugging Kubernetes clusters using KubeView MCP.
4
9
 
5
- ## Assumptions & Constraints
10
+ ## Core Principles
6
11
 
7
- - **Read-Only by Design**: Avoid making state changes (edit, delete, scale) through these tools unless explicitly authorized.
8
- - **Documentation**: Use `search_tools` to find new capabilities.
9
- - **Prefer MCP Tools**: Use `kube_*` tools over shelling out to `kubectl`.
12
+ - **Read-Only**: Avoid state changes unless explicitly authorized.
13
+ - **Prefer MCP Tools**: Use `kube_*` tools over `kubectl` commands.
10
14
  - **Security First**: Treat output as potentially sensitive.
11
- - **Declarative over Imperative**: When suggesting fixes, provide YAML snippets rather than `kubectl patch/edit` commands.
15
+ - **Declarative Fixes**: Provide YAML snippets rather than imperative `kubectl` commands.
12
16
 
13
- ## Tool Quick Map
17
+ ## Tool Quick Reference
14
18
 
15
- - **Cluster + Workloads**: `kube_list`, `kube_get`, `kube_metrics`
19
+ - **Cluster & Workloads**: `kube_list`, `kube_get`, `kube_metrics`
16
20
  - **Logs**: `kube_logs` (single pod), `kube_log` (multi-pod with filters + events)
17
21
  - **Network**: `kube_net`, `kube_exec`, `kube_port`
18
22
  - **Discovery**: `search_tools` (tools-mode), `run_code` (code-mode)
19
23
 
20
- In code-mode (`run_code`), these become `tools.kubernetes.*` (e.g., `tools.kubernetes.list`).
21
-
22
- ---
24
+ In code-mode, tools become `tools.kubernetes.*` (e.g., `tools.kubernetes.list`).
23
25
 
24
26
  ## Debugging Decision Tree
25
27
 
26
28
  ```
27
29
  Issue reported
28
30
 
29
- ├─ Pod not running? ──────────► See: Debug a Pod that Won't Start
31
+ ├─ Pod not running? ──────────► Skill: Debug Pod Failures
30
32
 
31
- ├─ Service unreachable? ──────► See: Debug a Service With No Traffic
33
+ ├─ Service unreachable? ──────► Skill: Debug Service Connectivity
32
34
 
33
- ├─ Deployment stuck? ─────────► See: Debug a Deployment
35
+ ├─ Deployment stuck? ─────────► Skill: Debug Deployment Rollout
34
36
 
35
- ├─ Node issues? ──────────────► See: Node Debugging
37
+ ├─ Node issues? ──────────────► Skill: Node Debugging
36
38
 
37
- └─ Performance/Resources? ────► See: Resource Debugging
39
+ └─ Performance/Resources? ────► Skill: Resource Debugging
38
40
  ```
39
41
 
40
42
  ---
41
43
 
42
- ## Skill: Cluster Triage (fast)
44
+ ## Skill: Cluster Triage
43
45
 
44
- **Intent**: Get a high-signal overview and decide where to drill down next.
46
+ **When**: Get high-level cluster health overview, identify problem areas.
45
47
 
46
- **Procedure**:
48
+ **Trigger**: "cluster health", "triage the cluster", "what's wrong"
47
49
 
48
- 1. **Cluster overview (diagnostics)**
50
+ **Steps**:
51
+
52
+ 1. **Cluster diagnostics**
49
53
  ```json
50
54
  { "tool": "kube_list", "args": {} }
51
55
  ```
52
56
 
53
- 2. **Metrics + diagnostics**
57
+ 2. **Metrics + top consumers**
54
58
  ```json
55
59
  { "tool": "kube_metrics", "args": { "diagnostics": true, "includeSummary": true, "topN": 5 } }
56
60
  ```
57
61
 
58
- 3. **Identify "Worst" Namespaces** (if not obvious)
59
- - Look for high counts of `CrashLoopBackOff` or `Pending`.
60
- - List pods in that namespace:
62
+ 3. **Drill into problem namespaces**
63
+ - Identify namespaces with high `CrashLoopBackOff` or `Pending` counts
61
64
  ```json
62
65
  { "tool": "kube_list", "args": { "namespace": "<ns>" } }
63
66
  ```
64
67
 
65
68
  ---
66
69
 
67
- ## Skill: Debug a Pod that Won't Start / CrashLoop
70
+ ## Skill: Debug Pod Failures
71
+
72
+ **When**: Pod is Pending, CrashLoopBackOff, ImagePullBackOff, or OOMKilled.
68
73
 
69
- **Intent**: Identify why a pod is Pending / CrashLoopBackOff / ImagePullBackOff / OOMKilled.
74
+ **Trigger**: "pod won't start", "CrashLoopBackOff", "ImagePullBackOff", "OOMKilled"
70
75
 
71
- **Procedure**:
76
+ **Steps**:
72
77
 
73
- 1. **Describe the pod with events + diagnostics**
78
+ 1. **Describe pod with events**
74
79
  ```json
75
80
  {
76
81
  "tool": "kube_get",
@@ -84,7 +89,7 @@ Issue reported
84
89
  }
85
90
  ```
86
91
 
87
- 2. **Pull logs (current & previous)**
92
+ 2. **Check logs (current & previous)**
88
93
  ```json
89
94
  {
90
95
  "tool": "kube_logs",
@@ -92,28 +97,25 @@ Issue reported
92
97
  }
93
98
  ```
94
99
 
95
- 3. **Common Pod Issues Checklist**:
100
+ 3. **Common causes**:
96
101
  - **CrashLoopBackOff**:
97
- - Exit Code 1: App error (check logs).
98
- - Exit Code 137: OOMKilled (check memory limits vs usage).
99
- - Exit Code 143: Graceful termination timeout or SIGTERM.
100
- - **ImagePullBackOff**:
101
- - Check image name/tag spelling.
102
- - Check ImagePullSecrets (registry auth).
103
- - **Pending**:
104
- - Insufficient CPU/Memory (Cluster full?).
105
- - Unsatisfiable Node Affinity/Selector.
106
- - PVC binding failure.
102
+ - Exit 1: App error (check logs)
103
+ - Exit 137: OOMKilled (memory limit too low)
104
+ - Exit 143: SIGTERM timeout
105
+ - **ImagePullBackOff**: Check image name/tag, verify ImagePullSecrets
106
+ - **Pending**: Insufficient resources, node affinity issues, or PVC binding failure
107
107
 
108
108
  ---
109
109
 
110
- ## Skill: Debug a Deployment / Rollout Not Progressing
110
+ ## Skill: Debug Deployment Rollout
111
+
112
+ **When**: Deployment has 0 ready replicas or rollout not progressing.
111
113
 
112
- **Intent**: Explain why a deployment has missing/zero ready replicas.
114
+ **Trigger**: "deployment stuck", "rollout not progressing", "0/1 ready"
113
115
 
114
- **Procedure**:
116
+ **Steps**:
115
117
 
116
- 1. **Check Deployment Status & Conditions**
118
+ 1. **Check deployment status**
117
119
  ```json
118
120
  {
119
121
  "tool": "kube_get",
@@ -126,7 +128,7 @@ Issue reported
126
128
  }
127
129
  ```
128
130
 
129
- 2. **Inspect ReplicaSets** (Is a new RS failing to spin up?)
131
+ 2. **Inspect ReplicaSets** (Is new RS failing to create pods?)
130
132
  ```json
131
133
  {
132
134
  "tool": "kube_list",
@@ -134,7 +136,7 @@ Issue reported
134
136
  }
135
137
  ```
136
138
 
137
- 3. **Aggregate Logs** (See if new pods are failing immediately)
139
+ 3. **Aggregate logs** (Are new pods failing immediately?)
138
140
  ```json
139
141
  {
140
142
  "tool": "kube_log",
@@ -148,29 +150,31 @@ Issue reported
148
150
  }
149
151
  ```
150
152
 
151
- **Common Issues**:
152
- - **Progressing Stuck**: New ReplicaSet can't create pods (quota? errors?).
153
- - **Available < Desired**: Pods running but failing Readiness Probe.
154
- - **Old ReplicaSets not cleaning up**: Deployment strategy issues.
153
+ **Common issues**:
154
+ - New ReplicaSet can't create pods (quota/errors?)
155
+ - Pods running but failing readiness probe
156
+ - Old ReplicaSets not cleaning up (strategy issue)
155
157
 
156
158
  ---
157
159
 
158
- ## Skill: Debug a Service With No Traffic / No Endpoints
160
+ ## Skill: Debug Service Connectivity
159
161
 
160
- **Intent**: Determine if the issue is Selector, Pod Readiness, or Network Policy.
162
+ **When**: Service has no traffic, endpoints missing, or unreachable.
161
163
 
162
- **Procedure**:
164
+ **Trigger**: "service unreachable", "no endpoints", "can't reach service"
163
165
 
164
- 1. **Verify Endpoints Exist**
166
+ **Steps**:
167
+
168
+ 1. **Verify endpoints exist**
165
169
  ```json
166
170
  {
167
171
  "tool": "kube_get",
168
172
  "args": { "resourceType": "endpoints", "name": "<svc>", "namespace": "<ns>" }
169
173
  }
170
174
  ```
171
- - *Empty?* Check Service Selector vs Pod Labels. Are pods Ready?
175
+ - Empty? Check Service selector vs Pod labels. Are pods Ready?
172
176
 
173
- 2. **Test Connectivity from inside cluster**
177
+ 2. **Test connectivity from cluster**
174
178
  ```json
175
179
  {
176
180
  "tool": "kube_net",
@@ -188,53 +192,73 @@ Issue reported
188
192
 
189
193
  ## Skill: Node Debugging
190
194
 
191
- **Intent**: Identify if node-level issues (Pressure, Taints) are causing pod failures.
195
+ **When**: Node-level issues causing pod failures.
196
+
197
+ **Trigger**: "node not ready", "node pressure", "taints blocking pods"
192
198
 
193
- **Procedure**:
199
+ **Steps**:
194
200
 
195
- 1. **List Nodes & Status**
201
+ 1. **List nodes**
196
202
  ```json
197
203
  { "tool": "kube_list", "args": { "resourceType": "node" } }
198
204
  ```
199
205
 
200
- 2. **Describe Specific Node**
206
+ 2. **Describe specific node**
201
207
  ```json
202
208
  { "tool": "kube_get", "args": { "resourceType": "node", "name": "<node>", "includeEvents": true } }
203
209
  ```
204
210
 
205
- **Conditions to Watch**:
206
- - **Ready**: Must be `True`.
207
- - **MemoryPressure / DiskPressure / PIDPressure**: If `True`, node is evicting/blocking pods.
208
- - **NetworkUnavailable**: CNI plugin failure?
211
+ **Key conditions**:
212
+ - **Ready**: Must be `True`
213
+ - **MemoryPressure/DiskPressure/PIDPressure**: If `True`, node is evicting pods
214
+ - **NetworkUnavailable**: CNI plugin failure
209
215
 
210
216
  ---
211
217
 
212
218
  ## Skill: Resource Debugging
213
219
 
214
- **Intent**: Detect resource bottlenecks (CPU throttling, OOM).
220
+ **When**: Detecting resource bottlenecks (CPU throttling, OOM).
215
221
 
216
- **Procedure**:
222
+ **Trigger**: "CPU throttling", "memory pressure", "high CPU/memory"
217
223
 
218
- 1. **Top Pods/Nodes**
224
+ **Steps**:
225
+
226
+ 1. **Top consumers**
219
227
  ```json
220
228
  { "tool": "kube_metrics", "args": { "topN": 10, "includeSummary": true } }
221
229
  ```
222
230
 
223
- 2. **OOMKilled Investigation**
224
- - Check `kube_get` pod status for `LastState: OOMKilled`.
225
- - Solution: Increase Memory Limit or fix leak.
231
+ 2. **OOMKilled investigation**
232
+ - Check `kube_get` pod status for `LastState: OOMKilled`
233
+ - Solution: Increase memory limit or fix leak
234
+
235
+ 3. **CPU throttling**
236
+ - App slow but no errors? Check if usage near CPU limit
237
+ - Solution: Increase CPU limit or remove limit (keep request)
238
+
239
+ ---
240
+
241
+ ## Advanced: Code Mode Bulk Analysis
226
242
 
227
- 3. **CPU Throttling**
228
- - If app is slow but no errors: Check if usage is near CPU Limit.
229
- - Solution: Increase CPU Limit (or remove limit and keep request).
243
+ **When**: Complex queries requiring logic (e.g., "find all pods without resource limits").
244
+
245
+ **Trigger**: "bulk analysis", "find pods without limits", "code mode"
246
+
247
+ **Example**:
248
+ ```typescript
249
+ const pods = await tools.kubernetes.list({ resourceType: 'pod' });
250
+ const noLimits = pods.items.filter(p =>
251
+ p.spec.containers.some(c => !c.resources?.limits)
252
+ );
253
+ return { count: noLimits.length, names: noLimits.map(p => p.metadata.name) };
254
+ ```
230
255
 
231
256
  ---
232
257
 
233
- ## Skill: Long Investigation Hygiene (using `plan_step`)
258
+ ## Multi-Step Investigation Hygiene
234
259
 
235
- **Intent**: Keep multi-step debugging stable and reviewable.
260
+ For complex investigations spanning multiple steps, use `plan_step` to maintain clear progress tracking:
236
261
 
237
- **Template**:
238
262
  ```json
239
263
  {
240
264
  "tool": "plan_step",
@@ -246,18 +270,3 @@ Issue reported
246
270
  }
247
271
  }
248
272
  ```
249
-
250
- ---
251
-
252
- ## Skill: One-shot Code Mode Triage (Advanced)
253
-
254
- **Intent**: Use `run_code` for complex logic (e.g., "Find all pods without resource limits").
255
-
256
- **Example**:
257
- ```typescript
258
- const pods = await tools.kubernetes.list({ resourceType: 'pod' });
259
- const noLimits = pods.items.filter(p =>
260
- p.spec.containers.some(c => !c.resources?.limits)
261
- );
262
- return { count: noLimits.length, names: noLimits.map(p => p.metadata.name) };
263
- ```
@@ -0,0 +1,62 @@
1
+ import { KubernetesClient } from '../KubernetesClient.js';
2
+ import { HelmHook, HelmReleaseData } from '../../utils/HelmDataParser.js';
3
+ export interface HelmListReleasesOptions {
4
+ namespace?: string;
5
+ selector?: string;
6
+ statuses?: string[];
7
+ maxReleases?: number;
8
+ }
9
+ export interface HelmGetReleaseOptions {
10
+ releaseName: string;
11
+ namespace?: string;
12
+ revision?: number;
13
+ }
14
+ export interface HelmReleaseSummary {
15
+ name: string;
16
+ namespace: string;
17
+ revision: number;
18
+ updated: string;
19
+ status: string;
20
+ chart: string;
21
+ app_version: string;
22
+ }
23
+ export interface HelmReleaseHistoryEntry {
24
+ revision: number;
25
+ updated: string;
26
+ status: string;
27
+ chart: string;
28
+ app_version: string;
29
+ description: string;
30
+ }
31
+ export interface HelmReleaseRecord {
32
+ storageBackend: HelmStorageKind;
33
+ storageObjectName: string;
34
+ labels: Record<string, string>;
35
+ release: HelmReleaseData;
36
+ summary: HelmReleaseSummary;
37
+ }
38
+ type HelmStorageKind = 'secret' | 'configmap';
39
+ export declare class HelmReleaseOperations {
40
+ private readonly secretOps;
41
+ private readonly configMapOps;
42
+ constructor(client: KubernetesClient);
43
+ listReleases(options?: HelmListReleasesOptions): Promise<HelmReleaseSummary[]>;
44
+ getRelease(options: HelmGetReleaseOptions): Promise<HelmReleaseRecord>;
45
+ getReleaseHistory(options: HelmGetReleaseOptions & {
46
+ maxRevisions?: number;
47
+ }): Promise<HelmReleaseHistoryEntry[]>;
48
+ getReleaseValues(options: HelmGetReleaseOptions, allValues?: boolean): Promise<any>;
49
+ getReleaseManifest(options: HelmGetReleaseOptions): Promise<string>;
50
+ getReleaseNotes(options: HelmGetReleaseOptions): Promise<string>;
51
+ getReleaseHooks(options: HelmGetReleaseOptions): Promise<HelmHook[]>;
52
+ private buildLabelSelector;
53
+ private listStorageRefs;
54
+ private dedupeRefs;
55
+ private listSecretRefs;
56
+ private listConfigMapRefs;
57
+ private ensureRefHasData;
58
+ private parseReleaseData;
59
+ private toSummary;
60
+ }
61
+ export {};
62
+ //# sourceMappingURL=HelmReleaseOperations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelmReleaseOperations.d.ts","sourceRoot":"","sources":["../../../../src/kubernetes/resources/HelmReleaseOperations.ts"],"names":[],"mappings":"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