@techwavedev/agi-agent-kit 1.1.7 → 1.2.1
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.
Potentially problematic release.
This version of @techwavedev/agi-agent-kit might be problematic. Click here for more details.
- package/CHANGELOG.md +82 -1
- package/README.md +190 -12
- package/bin/init.js +30 -2
- package/package.json +6 -3
- package/templates/base/AGENTS.md +54 -23
- package/templates/base/README.md +325 -0
- package/templates/base/directives/memory_integration.md +95 -0
- package/templates/base/execution/memory_manager.py +309 -0
- package/templates/base/execution/session_boot.py +218 -0
- package/templates/base/execution/session_init.py +320 -0
- package/templates/base/skill-creator/SKILL_skillcreator.md +23 -36
- package/templates/base/skill-creator/scripts/init_skill.py +18 -135
- package/templates/skills/ec/README.md +31 -0
- package/templates/skills/ec/aws/SKILL.md +1020 -0
- package/templates/skills/ec/aws/defaults.yaml +13 -0
- package/templates/skills/ec/aws/references/common_patterns.md +80 -0
- package/templates/skills/ec/aws/references/mcp_servers.md +98 -0
- package/templates/skills/ec/aws-terraform/SKILL.md +349 -0
- package/templates/skills/ec/aws-terraform/references/best_practices.md +394 -0
- package/templates/skills/ec/aws-terraform/references/checkov_reference.md +337 -0
- package/templates/skills/ec/aws-terraform/scripts/configure_mcp.py +150 -0
- package/templates/skills/ec/confluent-kafka/SKILL.md +655 -0
- package/templates/skills/ec/confluent-kafka/references/ansible_playbooks.md +792 -0
- package/templates/skills/ec/confluent-kafka/references/ec_deployment.md +579 -0
- package/templates/skills/ec/confluent-kafka/references/kraft_migration.md +490 -0
- package/templates/skills/ec/confluent-kafka/references/troubleshooting.md +778 -0
- package/templates/skills/ec/confluent-kafka/references/upgrade_7x_to_8x.md +488 -0
- package/templates/skills/ec/confluent-kafka/scripts/kafka_health_check.py +435 -0
- package/templates/skills/ec/confluent-kafka/scripts/upgrade_preflight.py +568 -0
- package/templates/skills/ec/confluent-kafka/scripts/validate_config.py +455 -0
- package/templates/skills/ec/consul/SKILL.md +427 -0
- package/templates/skills/ec/consul/references/acl_setup.md +168 -0
- package/templates/skills/ec/consul/references/ha_config.md +196 -0
- package/templates/skills/ec/consul/references/troubleshooting.md +267 -0
- package/templates/skills/ec/consul/references/upgrades.md +213 -0
- package/templates/skills/ec/consul/scripts/consul_health_report.py +530 -0
- package/templates/skills/ec/consul/scripts/consul_status.py +264 -0
- package/templates/skills/ec/consul/scripts/generate_values.py +170 -0
- package/templates/skills/ec/documentation/SKILL.md +351 -0
- package/templates/skills/ec/documentation/references/best_practices.md +201 -0
- package/templates/skills/ec/documentation/scripts/analyze_code.py +307 -0
- package/templates/skills/ec/documentation/scripts/detect_changes.py +460 -0
- package/templates/skills/ec/documentation/scripts/generate_changelog.py +312 -0
- package/templates/skills/ec/documentation/scripts/sync_docs.py +272 -0
- package/templates/skills/ec/documentation/scripts/update_skill_docs.py +366 -0
- package/templates/skills/ec/gitlab/SKILL.md +529 -0
- package/templates/skills/ec/gitlab/references/agent_installation.md +416 -0
- package/templates/skills/ec/gitlab/references/api_reference.md +508 -0
- package/templates/skills/ec/gitlab/references/gitops_flux.md +465 -0
- package/templates/skills/ec/gitlab/references/troubleshooting.md +518 -0
- package/templates/skills/ec/gitlab/scripts/generate_agent_values.py +329 -0
- package/templates/skills/ec/gitlab/scripts/gitlab_agent_status.py +414 -0
- package/templates/skills/ec/jira/SKILL.md +484 -0
- package/templates/skills/ec/jira/references/jql_reference.md +148 -0
- package/templates/skills/ec/jira/scripts/add_comment.py +91 -0
- package/templates/skills/ec/jira/scripts/bulk_log_work.py +124 -0
- package/templates/skills/ec/jira/scripts/create_ticket.py +162 -0
- package/templates/skills/ec/jira/scripts/get_ticket.py +191 -0
- package/templates/skills/ec/jira/scripts/jira_client.py +383 -0
- package/templates/skills/ec/jira/scripts/log_work.py +154 -0
- package/templates/skills/ec/jira/scripts/search_tickets.py +104 -0
- package/templates/skills/ec/jira/scripts/update_comment.py +67 -0
- package/templates/skills/ec/jira/scripts/update_ticket.py +161 -0
- package/templates/skills/ec/karpenter/SKILL.md +301 -0
- package/templates/skills/ec/karpenter/references/ec2nodeclasses.md +421 -0
- package/templates/skills/ec/karpenter/references/migration.md +396 -0
- package/templates/skills/ec/karpenter/references/nodepools.md +400 -0
- package/templates/skills/ec/karpenter/references/troubleshooting.md +359 -0
- package/templates/skills/ec/karpenter/scripts/generate_ec2nodeclass.py +187 -0
- package/templates/skills/ec/karpenter/scripts/generate_nodepool.py +245 -0
- package/templates/skills/ec/karpenter/scripts/karpenter_status.py +359 -0
- package/templates/skills/ec/opensearch/SKILL.md +720 -0
- package/templates/skills/ec/opensearch/references/ml_neural_search.md +576 -0
- package/templates/skills/ec/opensearch/references/operator.md +532 -0
- package/templates/skills/ec/opensearch/references/query_dsl.md +532 -0
- package/templates/skills/ec/opensearch/scripts/configure_mcp.py +148 -0
- package/templates/skills/ec/victoriametrics/SKILL.md +598 -0
- package/templates/skills/ec/victoriametrics/references/kubernetes.md +531 -0
- package/templates/skills/ec/victoriametrics/references/prometheus_migration.md +333 -0
- package/templates/skills/ec/victoriametrics/references/troubleshooting.md +442 -0
- package/templates/skills/knowledge/SKILLS_CATALOG.md +274 -4
- package/templates/skills/knowledge/intelligent-routing/SKILL.md +237 -164
- package/templates/skills/knowledge/parallel-agents/SKILL.md +345 -73
- package/templates/skills/knowledge/plugin-discovery/SKILL.md +582 -0
- package/templates/skills/knowledge/plugin-discovery/scripts/platform_setup.py +1083 -0
- package/templates/skills/knowledge/design-md/README.md +0 -34
- package/templates/skills/knowledge/design-md/SKILL.md +0 -193
- package/templates/skills/knowledge/design-md/examples/DESIGN.md +0 -154
- package/templates/skills/knowledge/notebooklm-mcp/SKILL.md +0 -71
- package/templates/skills/knowledge/notebooklm-mcp/assets/example_asset.txt +0 -24
- package/templates/skills/knowledge/notebooklm-mcp/references/api_reference.md +0 -34
- package/templates/skills/knowledge/notebooklm-mcp/scripts/example.py +0 -19
- package/templates/skills/knowledge/react-components/README.md +0 -36
- package/templates/skills/knowledge/react-components/SKILL.md +0 -53
- package/templates/skills/knowledge/react-components/examples/gold-standard-card.tsx +0 -80
- package/templates/skills/knowledge/react-components/package-lock.json +0 -231
- package/templates/skills/knowledge/react-components/package.json +0 -16
- package/templates/skills/knowledge/react-components/resources/architecture-checklist.md +0 -15
- package/templates/skills/knowledge/react-components/resources/component-template.tsx +0 -37
- package/templates/skills/knowledge/react-components/resources/stitch-api-reference.md +0 -14
- package/templates/skills/knowledge/react-components/resources/style-guide.json +0 -27
- package/templates/skills/knowledge/react-components/scripts/fetch-stitch.sh +0 -30
- package/templates/skills/knowledge/react-components/scripts/validate.js +0 -68
- package/templates/skills/knowledge/self-update/SKILL.md +0 -60
- package/templates/skills/knowledge/self-update/scripts/update_kit.py +0 -103
- package/templates/skills/knowledge/stitch-loop/README.md +0 -54
- package/templates/skills/knowledge/stitch-loop/SKILL.md +0 -235
- package/templates/skills/knowledge/stitch-loop/examples/SITE.md +0 -73
- package/templates/skills/knowledge/stitch-loop/examples/next-prompt.md +0 -25
- package/templates/skills/knowledge/stitch-loop/resources/baton-schema.md +0 -61
- package/templates/skills/knowledge/stitch-loop/resources/site-template.md +0 -104
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Script: generate_agent_values.py
|
|
4
|
+
Purpose: Generate Helm values file for GitLab agent installation
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
python generate_agent_values.py \
|
|
8
|
+
--gitlab-url https://gitlab.example.com \
|
|
9
|
+
--agent-name eks-nonprod-agent \
|
|
10
|
+
--output agent-values.yaml
|
|
11
|
+
|
|
12
|
+
python generate_agent_values.py \
|
|
13
|
+
--gitlab-url https://gitlab.example.com \
|
|
14
|
+
--agent-name eks-prod-agent \
|
|
15
|
+
--production \
|
|
16
|
+
--ca-cert ./gitlab-ca.pem \
|
|
17
|
+
--output prod-agent-values.yaml
|
|
18
|
+
|
|
19
|
+
Arguments:
|
|
20
|
+
--gitlab-url GitLab instance URL (required)
|
|
21
|
+
--agent-name Name of the agent (required)
|
|
22
|
+
--output, -o Output file path (default: agent-values.yaml)
|
|
23
|
+
--production Enable production settings (HA, resource limits)
|
|
24
|
+
--ca-cert Path to CA certificate for self-signed GitLab
|
|
25
|
+
--replicas Number of replicas (default: 1, 2 for production)
|
|
26
|
+
--version Agent version tag (e.g., v17.6.0)
|
|
27
|
+
--token Agent token (will prompt if not provided)
|
|
28
|
+
|
|
29
|
+
Exit Codes:
|
|
30
|
+
0 - Success
|
|
31
|
+
1 - Invalid arguments
|
|
32
|
+
2 - File error
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
import argparse
|
|
36
|
+
import os
|
|
37
|
+
import sys
|
|
38
|
+
from pathlib import Path
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def generate_values(
|
|
42
|
+
gitlab_url: str,
|
|
43
|
+
agent_name: str,
|
|
44
|
+
production: bool = False,
|
|
45
|
+
ca_cert: str = None,
|
|
46
|
+
replicas: int = None,
|
|
47
|
+
version: str = None,
|
|
48
|
+
token: str = None
|
|
49
|
+
) -> str:
|
|
50
|
+
"""Generate Helm values YAML content"""
|
|
51
|
+
|
|
52
|
+
# Ensure URL has proper format
|
|
53
|
+
if not gitlab_url.startswith("http"):
|
|
54
|
+
gitlab_url = f"https://{gitlab_url}"
|
|
55
|
+
|
|
56
|
+
# Build KAS address
|
|
57
|
+
kas_address = f"wss://{gitlab_url.replace('https://', '').replace('http://', '')}/-/kubernetes-agent/"
|
|
58
|
+
|
|
59
|
+
# Determine replica count
|
|
60
|
+
if replicas is None:
|
|
61
|
+
replicas = 2 if production else 1
|
|
62
|
+
|
|
63
|
+
lines = [
|
|
64
|
+
f"# GitLab Agent Helm Values",
|
|
65
|
+
f"# Agent: {agent_name}",
|
|
66
|
+
f"# GitLab: {gitlab_url}",
|
|
67
|
+
f"# Generated for: {'production' if production else 'non-production'}",
|
|
68
|
+
f"",
|
|
69
|
+
]
|
|
70
|
+
|
|
71
|
+
# Replica count
|
|
72
|
+
lines.append(f"replicaCount: {replicas}")
|
|
73
|
+
lines.append("")
|
|
74
|
+
|
|
75
|
+
# Image configuration
|
|
76
|
+
if version:
|
|
77
|
+
lines.extend([
|
|
78
|
+
"image:",
|
|
79
|
+
" repository: registry.gitlab.com/gitlab-org/cluster-integration/gitlab-agent/agentk",
|
|
80
|
+
f" tag: \"{version}\"",
|
|
81
|
+
" pullPolicy: IfNotPresent",
|
|
82
|
+
"",
|
|
83
|
+
])
|
|
84
|
+
|
|
85
|
+
# Config section
|
|
86
|
+
lines.append("config:")
|
|
87
|
+
if token:
|
|
88
|
+
lines.append(f" token: \"{token}\"")
|
|
89
|
+
else:
|
|
90
|
+
lines.append(" token: \"\" # Set via --set config.token=<token>")
|
|
91
|
+
lines.append(f" kasAddress: \"{kas_address}\"")
|
|
92
|
+
|
|
93
|
+
# CA certificate reference
|
|
94
|
+
if ca_cert:
|
|
95
|
+
lines.append(" # CA certificate for self-signed GitLab")
|
|
96
|
+
lines.append(" # Install with: --set-file config.kasCaCert=./gitlab-ca.pem")
|
|
97
|
+
lines.append(" kasCaCert: \"\" # Populated by --set-file")
|
|
98
|
+
|
|
99
|
+
lines.extend([
|
|
100
|
+
" observability:",
|
|
101
|
+
" logging:",
|
|
102
|
+
f" level: {'warn' if production else 'info'}",
|
|
103
|
+
"",
|
|
104
|
+
])
|
|
105
|
+
|
|
106
|
+
# RBAC configuration
|
|
107
|
+
lines.extend([
|
|
108
|
+
"rbac:",
|
|
109
|
+
" create: true",
|
|
110
|
+
])
|
|
111
|
+
if production:
|
|
112
|
+
lines.append(" # Use pre-created role with minimal permissions")
|
|
113
|
+
lines.append(" # useExistingRole: gitlab-agent-role")
|
|
114
|
+
lines.append("")
|
|
115
|
+
|
|
116
|
+
# Service account
|
|
117
|
+
lines.extend([
|
|
118
|
+
"serviceAccount:",
|
|
119
|
+
" create: true",
|
|
120
|
+
f" name: \"gitlab-agent-{agent_name}\"",
|
|
121
|
+
" annotations: {}",
|
|
122
|
+
"",
|
|
123
|
+
])
|
|
124
|
+
|
|
125
|
+
# Resources
|
|
126
|
+
if production:
|
|
127
|
+
lines.extend([
|
|
128
|
+
"resources:",
|
|
129
|
+
" requests:",
|
|
130
|
+
" cpu: 100m",
|
|
131
|
+
" memory: 128Mi",
|
|
132
|
+
" limits:",
|
|
133
|
+
" cpu: 500m",
|
|
134
|
+
" memory: 256Mi",
|
|
135
|
+
"",
|
|
136
|
+
])
|
|
137
|
+
else:
|
|
138
|
+
lines.extend([
|
|
139
|
+
"resources:",
|
|
140
|
+
" requests:",
|
|
141
|
+
" cpu: 50m",
|
|
142
|
+
" memory: 64Mi",
|
|
143
|
+
" limits:",
|
|
144
|
+
" cpu: 200m",
|
|
145
|
+
" memory: 128Mi",
|
|
146
|
+
"",
|
|
147
|
+
])
|
|
148
|
+
|
|
149
|
+
# Pod Disruption Budget (production only)
|
|
150
|
+
if production:
|
|
151
|
+
lines.extend([
|
|
152
|
+
"podDisruptionBudget:",
|
|
153
|
+
" enabled: true",
|
|
154
|
+
" minAvailable: 1",
|
|
155
|
+
"",
|
|
156
|
+
])
|
|
157
|
+
|
|
158
|
+
# Affinity (production only)
|
|
159
|
+
if production and replicas > 1:
|
|
160
|
+
lines.extend([
|
|
161
|
+
"affinity:",
|
|
162
|
+
" podAntiAffinity:",
|
|
163
|
+
" preferredDuringSchedulingIgnoredDuringExecution:",
|
|
164
|
+
" - weight: 100",
|
|
165
|
+
" podAffinityTerm:",
|
|
166
|
+
" labelSelector:",
|
|
167
|
+
" matchLabels:",
|
|
168
|
+
" app.kubernetes.io/name: gitlab-agent",
|
|
169
|
+
" topologyKey: topology.kubernetes.io/zone",
|
|
170
|
+
"",
|
|
171
|
+
])
|
|
172
|
+
|
|
173
|
+
# Node selector (example)
|
|
174
|
+
lines.extend([
|
|
175
|
+
"nodeSelector: {}",
|
|
176
|
+
" # kubernetes.io/os: linux",
|
|
177
|
+
"",
|
|
178
|
+
])
|
|
179
|
+
|
|
180
|
+
# Tolerations (example)
|
|
181
|
+
lines.extend([
|
|
182
|
+
"tolerations: []",
|
|
183
|
+
" # - key: \"dedicated\"",
|
|
184
|
+
" # operator: \"Equal\"",
|
|
185
|
+
" # value: \"gitlab\"",
|
|
186
|
+
" # effect: \"NoSchedule\"",
|
|
187
|
+
"",
|
|
188
|
+
])
|
|
189
|
+
|
|
190
|
+
# Additional env vars (example)
|
|
191
|
+
lines.extend([
|
|
192
|
+
"extraEnv: []",
|
|
193
|
+
" # - name: HTTPS_PROXY",
|
|
194
|
+
" # value: \"http://proxy.example.com:8080\"",
|
|
195
|
+
"",
|
|
196
|
+
])
|
|
197
|
+
|
|
198
|
+
return "\n".join(lines)
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
def generate_install_command(
|
|
202
|
+
agent_name: str,
|
|
203
|
+
values_file: str,
|
|
204
|
+
ca_cert: str = None,
|
|
205
|
+
namespace: str = "gitlab-agent"
|
|
206
|
+
) -> str:
|
|
207
|
+
"""Generate the Helm install command"""
|
|
208
|
+
|
|
209
|
+
lines = [
|
|
210
|
+
"# Installation command:",
|
|
211
|
+
"#",
|
|
212
|
+
"# helm repo add gitlab https://charts.gitlab.io",
|
|
213
|
+
"# helm repo update",
|
|
214
|
+
"#",
|
|
215
|
+
]
|
|
216
|
+
|
|
217
|
+
cmd = f"# helm upgrade --install gitlab-agent gitlab/gitlab-agent \\\n"
|
|
218
|
+
cmd += f"# --namespace {namespace} \\\n"
|
|
219
|
+
cmd += f"# --create-namespace \\\n"
|
|
220
|
+
cmd += f"# -f {values_file} \\\n"
|
|
221
|
+
cmd += f"# --set config.token=\"<YOUR_AGENT_TOKEN>\""
|
|
222
|
+
|
|
223
|
+
if ca_cert:
|
|
224
|
+
cmd += f" \\\n# --set-file config.kasCaCert={ca_cert}"
|
|
225
|
+
|
|
226
|
+
lines.append(cmd)
|
|
227
|
+
lines.append("")
|
|
228
|
+
|
|
229
|
+
return "\n".join(lines)
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
def main():
|
|
233
|
+
parser = argparse.ArgumentParser(
|
|
234
|
+
description="Generate Helm values file for GitLab agent installation",
|
|
235
|
+
formatter_class=argparse.RawDescriptionHelpFormatter
|
|
236
|
+
)
|
|
237
|
+
parser.add_argument(
|
|
238
|
+
"--gitlab-url",
|
|
239
|
+
required=True,
|
|
240
|
+
help="GitLab instance URL"
|
|
241
|
+
)
|
|
242
|
+
parser.add_argument(
|
|
243
|
+
"--agent-name",
|
|
244
|
+
required=True,
|
|
245
|
+
help="Name of the agent"
|
|
246
|
+
)
|
|
247
|
+
parser.add_argument(
|
|
248
|
+
"--output", "-o",
|
|
249
|
+
default="agent-values.yaml",
|
|
250
|
+
help="Output file path (default: agent-values.yaml)"
|
|
251
|
+
)
|
|
252
|
+
parser.add_argument(
|
|
253
|
+
"--production",
|
|
254
|
+
action="store_true",
|
|
255
|
+
help="Enable production settings (HA, resource limits)"
|
|
256
|
+
)
|
|
257
|
+
parser.add_argument(
|
|
258
|
+
"--ca-cert",
|
|
259
|
+
help="Path to CA certificate for self-signed GitLab"
|
|
260
|
+
)
|
|
261
|
+
parser.add_argument(
|
|
262
|
+
"--replicas",
|
|
263
|
+
type=int,
|
|
264
|
+
help="Number of replicas"
|
|
265
|
+
)
|
|
266
|
+
parser.add_argument(
|
|
267
|
+
"--version",
|
|
268
|
+
help="Agent version tag (e.g., v17.6.0)"
|
|
269
|
+
)
|
|
270
|
+
parser.add_argument(
|
|
271
|
+
"--token",
|
|
272
|
+
help="Agent token (will be included in values file)"
|
|
273
|
+
)
|
|
274
|
+
|
|
275
|
+
args = parser.parse_args()
|
|
276
|
+
|
|
277
|
+
# Validate CA cert file if provided
|
|
278
|
+
if args.ca_cert and not Path(args.ca_cert).exists():
|
|
279
|
+
print(f"Warning: CA certificate file not found: {args.ca_cert}")
|
|
280
|
+
print("The path will be included in the output, but verify it exists before installation.")
|
|
281
|
+
|
|
282
|
+
# Generate values
|
|
283
|
+
values_content = generate_values(
|
|
284
|
+
gitlab_url=args.gitlab_url,
|
|
285
|
+
agent_name=args.agent_name,
|
|
286
|
+
production=args.production,
|
|
287
|
+
ca_cert=args.ca_cert,
|
|
288
|
+
replicas=args.replicas,
|
|
289
|
+
version=args.version,
|
|
290
|
+
token=args.token
|
|
291
|
+
)
|
|
292
|
+
|
|
293
|
+
# Generate install command
|
|
294
|
+
install_cmd = generate_install_command(
|
|
295
|
+
agent_name=args.agent_name,
|
|
296
|
+
values_file=args.output,
|
|
297
|
+
ca_cert=args.ca_cert
|
|
298
|
+
)
|
|
299
|
+
|
|
300
|
+
# Combine content
|
|
301
|
+
full_content = install_cmd + values_content
|
|
302
|
+
|
|
303
|
+
# Write to file
|
|
304
|
+
try:
|
|
305
|
+
output_path = Path(args.output)
|
|
306
|
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
|
307
|
+
|
|
308
|
+
with open(output_path, "w") as f:
|
|
309
|
+
f.write(full_content)
|
|
310
|
+
|
|
311
|
+
print(f"✅ Generated values file: {output_path}")
|
|
312
|
+
print("")
|
|
313
|
+
print("Next steps:")
|
|
314
|
+
print(f" 1. Review and customize: {output_path}")
|
|
315
|
+
print(f" 2. Register agent in GitLab (UI or API)")
|
|
316
|
+
print(f" 3. Create agent token and save it")
|
|
317
|
+
if args.ca_cert:
|
|
318
|
+
print(f" 4. Ensure CA cert exists: {args.ca_cert}")
|
|
319
|
+
print(f" 5. Run Helm install command (shown at top of values file)")
|
|
320
|
+
|
|
321
|
+
sys.exit(0)
|
|
322
|
+
|
|
323
|
+
except IOError as e:
|
|
324
|
+
print(f"Error writing file: {e}")
|
|
325
|
+
sys.exit(2)
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
if __name__ == "__main__":
|
|
329
|
+
main()
|