@vfarcic/dot-ai 0.178.0 → 0.180.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 (38) hide show
  1. package/dist/core/generic-session-manager.d.ts +5 -0
  2. package/dist/core/generic-session-manager.d.ts.map +1 -1
  3. package/dist/core/generic-session-manager.js +8 -1
  4. package/dist/core/mermaid-tools.d.ts +27 -0
  5. package/dist/core/mermaid-tools.d.ts.map +1 -0
  6. package/dist/core/mermaid-tools.js +115 -0
  7. package/dist/core/providers/vercel-provider.d.ts.map +1 -1
  8. package/dist/core/providers/vercel-provider.js +14 -13
  9. package/dist/core/visualization.d.ts +77 -0
  10. package/dist/core/visualization.d.ts.map +1 -0
  11. package/dist/core/visualization.js +80 -0
  12. package/dist/interfaces/rest-api.d.ts +19 -2
  13. package/dist/interfaces/rest-api.d.ts.map +1 -1
  14. package/dist/interfaces/rest-api.js +120 -47
  15. package/dist/tools/generate-manifests.d.ts.map +1 -1
  16. package/dist/tools/generate-manifests.js +93 -23
  17. package/dist/tools/operate-analysis.d.ts.map +1 -1
  18. package/dist/tools/operate-analysis.js +5 -0
  19. package/dist/tools/operate.d.ts +4 -1
  20. package/dist/tools/operate.d.ts.map +1 -1
  21. package/dist/tools/operate.js +9 -1
  22. package/dist/tools/organizational-data.d.ts +1 -1
  23. package/dist/tools/query.d.ts +2 -1
  24. package/dist/tools/query.d.ts.map +1 -1
  25. package/dist/tools/query.js +4 -15
  26. package/dist/tools/recommend.d.ts +22 -0
  27. package/dist/tools/recommend.d.ts.map +1 -1
  28. package/dist/tools/recommend.js +41 -16
  29. package/dist/tools/remediate.d.ts +3 -1
  30. package/dist/tools/remediate.d.ts.map +1 -1
  31. package/dist/tools/remediate.js +31 -12
  32. package/dist/tools/version.d.ts +16 -0
  33. package/dist/tools/version.d.ts.map +1 -1
  34. package/dist/tools/version.js +55 -29
  35. package/package.json +2 -1
  36. package/prompts/visualize.md +86 -0
  37. package/scripts/dot-ai.nu +43 -5
  38. package/prompts/visualize-query.md +0 -113
package/scripts/dot-ai.nu CHANGED
@@ -6,7 +6,7 @@
6
6
  # > main apply dot-ai-controller
7
7
  # > main apply dot-ai-controller --controller-version 0.17.0
8
8
  def "main apply dot-ai-controller" [
9
- --controller-version = "0.37.0"
9
+ --controller-version = "0.39.0"
10
10
  ] {
11
11
 
12
12
  (
@@ -16,7 +16,38 @@ def "main apply dot-ai-controller" [
16
16
  --wait
17
17
  )
18
18
 
19
+ # Create CapabilityScanConfig for autonomous capability discovery
20
+ "apiVersion: dot-ai.devopstoolkit.live/v1alpha1
21
+ kind: CapabilityScanConfig
22
+ metadata:
23
+ name: default-scan
24
+ namespace: dot-ai
25
+ spec:
26
+ mcp:
27
+ endpoint: http://dot-ai-mcp.dot-ai.svc.cluster.local:3456/api/v1/tools/manageOrgData
28
+ authSecretRef:
29
+ name: dot-ai-secrets
30
+ key: auth-token
31
+ " | kubectl apply --filename -
32
+
33
+ # Create ResourceSyncConfig for semantic search across cluster resources
34
+ "apiVersion: dot-ai.devopstoolkit.live/v1alpha1
35
+ kind: ResourceSyncConfig
36
+ metadata:
37
+ name: default-sync
38
+ namespace: dot-ai
39
+ spec:
40
+ mcpEndpoint: http://dot-ai-mcp.dot-ai.svc.cluster.local:3456/api/v1/resources/sync
41
+ mcpAuthSecretRef:
42
+ name: dot-ai-secrets
43
+ key: auth-token
44
+ debounceWindowSeconds: 10
45
+ resyncIntervalMinutes: 60
46
+ " | kubectl apply --filename -
47
+
19
48
  print $"DevOps AI Controller (ansi yellow_bold)($controller_version)(ansi reset) installed in (ansi yellow_bold)dot-ai(ansi reset) namespace"
49
+ print $"CapabilityScanConfig created for autonomous capability discovery"
50
+ print $"ResourceSyncConfig created for semantic search across cluster resources"
20
51
 
21
52
  }
22
53
 
@@ -29,13 +60,14 @@ def "main apply dot-ai-controller" [
29
60
  def "main apply dot-ai" [
30
61
  --anthropic-api-key = "",
31
62
  --openai-api-key = "",
63
+ --auth-token = "my-secret-token",
32
64
  --provider = "anthropic",
33
65
  --model = "claude-haiku-4-5-20251001",
34
66
  --ingress-enabled = true,
35
67
  --ingress-class = "nginx",
36
68
  --host = "dot-ai.127.0.0.1.nip.io",
37
- --version = "0.171.0",
38
- --controller-version = "0.37.0",
69
+ --version = "0.179.0",
70
+ --controller-version = "0.39.0",
39
71
  --enable-tracing = false
40
72
  ] {
41
73
 
@@ -64,13 +96,13 @@ def "main apply dot-ai" [
64
96
  []
65
97
  }
66
98
 
67
- main apply dot-ai-controller --controller-version $controller_version
68
-
99
+ # Install MCP first (creates service and secrets needed by controller's CapabilityScanConfig)
69
100
  (
70
101
  helm upgrade --install dot-ai-mcp
71
102
  $"oci://ghcr.io/vfarcic/dot-ai/charts/dot-ai:($version)"
72
103
  --set $"secrets.anthropic.apiKey=($anthropic_key)"
73
104
  --set $"secrets.openai.apiKey=($openai_key)"
105
+ --set $"secrets.auth.token=($auth_token)"
74
106
  --set $"ai.provider=($provider)"
75
107
  --set $"ai.model=($model)"
76
108
  --set $"ingress.enabled=($ingress_enabled)"
@@ -82,8 +114,14 @@ def "main apply dot-ai" [
82
114
  --wait
83
115
  )
84
116
 
117
+ # Install controller after MCP (CapabilityScanConfig references MCP service and secrets)
118
+ main apply dot-ai-controller --controller-version $controller_version
119
+
85
120
  print $"DevOps AI Toolkit is available at (ansi yellow_bold)http://($host)(ansi reset)"
86
121
 
122
+ # Update .env with auth token for MCP clients
123
+ $"DOT_AI_AUTH_TOKEN=($auth_token)\n" | save --force .env
124
+
87
125
  if $enable_tracing {
88
126
  print $"Tracing enabled: Traces will be sent to (ansi yellow_bold)Jaeger in observability namespace(ansi reset)"
89
127
  }
@@ -1,113 +0,0 @@
1
- # Query Visualization Generator
2
-
3
- You are a Kubernetes cluster visualization expert. Analyze the query results and generate visualizations that reveal relationships and patterns in the data.
4
-
5
- ## User Query
6
-
7
- {{{intent}}}
8
-
9
- ## Query Results
10
-
11
- {{{toolCallsData}}}
12
-
13
- ## Your Task
14
-
15
- Thoroughly analyze the query results and surface everything valuable you can find. This includes but is not limited to:
16
- - Relationships between resources
17
- - Resource status and health
18
- - Patterns and architectural insights
19
- - Anything else worth knowing about these resources
20
-
21
- If the provided data isn't sufficient for deep analysis, use the available tools to gather additional information. Don't limit yourself to what's already in the context - investigate further if it would produce more valuable insights.
22
-
23
- ## Analysis Approach
24
-
25
- Include both obvious and non-obvious findings:
26
-
27
- ### Level 1: Obvious Relationships (include these)
28
- - `metadata.ownerReferences` links
29
- - Label selectors matching labels
30
- - Explicit name references in spec fields
31
-
32
- ### Level 2: Deep Analysis (this is where you add unique value)
33
- Go beyond the obvious. Analyze the data thoroughly. Here are some examples - but don't limit yourself to these:
34
-
35
- - Inferred dependencies from env vars, config names, port numbers, mount paths
36
- - Architectural patterns like sidecars, init containers, deployment strategies
37
- - Potential issues: missing limits, no health checks, security concerns, single points of failure
38
- - Implicit relationships from naming patterns, shared labels, operator conventions
39
- - Capacity and scaling considerations
40
-
41
- These are just examples. Analyze EVERYTHING in the data - annotations, labels, all spec fields, status conditions, anything. Surface whatever is valuable. The non-obvious insights are what make this worthwhile.
42
-
43
- Do NOT assume what resources exist. Analyze only what's in the data.
44
-
45
- ## Output Format
46
-
47
- Respond with ONLY a JSON object (no markdown code fences, no extra text):
48
-
49
- {
50
- "title": "Descriptive title based on what was found",
51
- "visualizations": [...],
52
- "insights": [...]
53
- }
54
-
55
- ## Visualization Types
56
-
57
- Generate as many or as few visualizations as add value. You can:
58
- - Include multiple visualizations of the same type (e.g., several mermaid diagrams for different aspects)
59
- - Skip any type entirely if it doesn't add value for this data
60
- - Use whatever combination best represents what you found
61
-
62
- Each visualization:
63
-
64
- ```
65
- {
66
- "id": "unique-id",
67
- "label": "Tab Label",
68
- "type": "mermaid" | "table" | "cards" | "code",
69
- "content": <type-specific-content>
70
- }
71
- ```
72
-
73
- ### mermaid
74
- For showing relationships between resources.
75
- - `content`: Valid Mermaid diagram string
76
- - Use `graph TD` or `graph LR` depending on relationship type
77
- - Use subgraphs to group by namespace or logical grouping
78
- - Arrows: `-->` for ownership/direct, `-.->` for inferred/indirect
79
- - Keep readable - summarize similar resources rather than showing every instance
80
-
81
- ### table
82
- For listing resources with their properties.
83
- - `content`: `{ "headers": ["Col1", "Col2"], "rows": [["val1", "val2"]] }`
84
- - Choose columns relevant to the resource types present
85
- - Include status/condition information when available
86
-
87
- ### cards
88
- For highlighting individual resources with status.
89
- - `content`: `[{ "id": "unique", "title": "Name", "description": "Status info", "tags": ["tag1"] }]`
90
- - Use for resources where individual status matters
91
- - Tags should reflect actual state from the data
92
-
93
- ### code
94
- For showing raw data or configurations.
95
- - `content`: `{ "language": "yaml" | "json", "code": "..." }`
96
- - Use sparingly - only when raw output adds value
97
-
98
- ## Insights
99
-
100
- Generate insights that add value beyond what someone could see by just reading the raw data. Prioritize non-obvious findings over summaries of what's there.
101
-
102
- Each insight should:
103
- - Reference specific resource names from the data
104
- - Explain WHY it matters, not just WHAT you found
105
- - Be actionable when highlighting issues
106
-
107
- ## Rules
108
-
109
- 1. **Data-driven only** - Generate visualizations based on actual resources present
110
- 2. **Skip empty visualizations** - Don't include a topology diagram if there are no relationships
111
- 3. **Valid output** - Ensure Mermaid syntax is correct and JSON is valid
112
- 4. **Resource-agnostic** - Handle any Kubernetes resource type (core, CRDs, operators)
113
- 5. **JSON only** - No markdown fences, no explanations outside the JSON structure