devops-ai-agent 1.0.0__tar.gz

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 (56) hide show
  1. devops_ai_agent-1.0.0/.env.example +111 -0
  2. devops_ai_agent-1.0.0/LICENSE +21 -0
  3. devops_ai_agent-1.0.0/MANIFEST.in +10 -0
  4. devops_ai_agent-1.0.0/PKG-INFO +952 -0
  5. devops_ai_agent-1.0.0/README.md +857 -0
  6. devops_ai_agent-1.0.0/SECURITY_GUARANTEES.md +749 -0
  7. devops_ai_agent-1.0.0/agent/__init__.py +1 -0
  8. devops_ai_agent-1.0.0/agent/classifier.py +135 -0
  9. devops_ai_agent-1.0.0/agent/core.py +658 -0
  10. devops_ai_agent-1.0.0/agent/prompts.py +150 -0
  11. devops_ai_agent-1.0.0/api/__init__.py +1 -0
  12. devops_ai_agent-1.0.0/api/server.py +222 -0
  13. devops_ai_agent-1.0.0/collectors/__init__.py +0 -0
  14. devops_ai_agent-1.0.0/collectors/argocd.py +238 -0
  15. devops_ai_agent-1.0.0/collectors/aws.py +741 -0
  16. devops_ai_agent-1.0.0/collectors/azure.py +647 -0
  17. devops_ai_agent-1.0.0/collectors/azure_devops.py +94 -0
  18. devops_ai_agent-1.0.0/collectors/bamboo.py +98 -0
  19. devops_ai_agent-1.0.0/collectors/cloud_registry.py +103 -0
  20. devops_ai_agent-1.0.0/collectors/database_policy.py +72 -0
  21. devops_ai_agent-1.0.0/collectors/docker.py +7 -0
  22. devops_ai_agent-1.0.0/collectors/gcp.py +508 -0
  23. devops_ai_agent-1.0.0/collectors/github.py +81 -0
  24. devops_ai_agent-1.0.0/collectors/gitlab.py +81 -0
  25. devops_ai_agent-1.0.0/collectors/jenkins.py +110 -0
  26. devops_ai_agent-1.0.0/collectors/k8s.py +164 -0
  27. devops_ai_agent-1.0.0/collectors/security_scanner.py +343 -0
  28. devops_ai_agent-1.0.0/collectors/server.py +40 -0
  29. devops_ai_agent-1.0.0/collectors/server_enhanced.py +265 -0
  30. devops_ai_agent-1.0.0/devops_agent/__init__.py +3 -0
  31. devops_ai_agent-1.0.0/devops_agent/cli.py +64 -0
  32. devops_ai_agent-1.0.0/devops_ai_agent.egg-info/PKG-INFO +952 -0
  33. devops_ai_agent-1.0.0/devops_ai_agent.egg-info/SOURCES.txt +54 -0
  34. devops_ai_agent-1.0.0/devops_ai_agent.egg-info/dependency_links.txt +1 -0
  35. devops_ai_agent-1.0.0/devops_ai_agent.egg-info/entry_points.txt +2 -0
  36. devops_ai_agent-1.0.0/devops_ai_agent.egg-info/requires.txt +71 -0
  37. devops_ai_agent-1.0.0/devops_ai_agent.egg-info/top_level.txt +5 -0
  38. devops_ai_agent-1.0.0/k8s/deployment.yaml +52 -0
  39. devops_ai_agent-1.0.0/k8s/rbac.yaml +72 -0
  40. devops_ai_agent-1.0.0/k8s/service-configmap.yaml +35 -0
  41. devops_ai_agent-1.0.0/pyproject.toml +117 -0
  42. devops_ai_agent-1.0.0/requirements.txt +74 -0
  43. devops_ai_agent-1.0.0/setup.cfg +4 -0
  44. devops_ai_agent-1.0.0/tools/__init__.py +1 -0
  45. devops_ai_agent-1.0.0/tools/argocd_tools.py +111 -0
  46. devops_ai_agent-1.0.0/tools/cicd_tools.py +301 -0
  47. devops_ai_agent-1.0.0/tools/cloud_tools.py +337 -0
  48. devops_ai_agent-1.0.0/tools/documentation_generator.py +452 -0
  49. devops_ai_agent-1.0.0/tools/email_notifier.py +453 -0
  50. devops_ai_agent-1.0.0/tools/executor.py +142 -0
  51. devops_ai_agent-1.0.0/tools/fix_verifier.py +349 -0
  52. devops_ai_agent-1.0.0/tools/github_tools.py +107 -0
  53. devops_ai_agent-1.0.0/tools/k8s_tools.py +123 -0
  54. devops_ai_agent-1.0.0/tools/notify.py +133 -0
  55. devops_ai_agent-1.0.0/tools/safe_executor_enhanced.py +423 -0
  56. devops_ai_agent-1.0.0/usage-readme.md +1521 -0
@@ -0,0 +1,111 @@
1
+ # ============================================================
2
+ # DevOps AI Agent — Environment Configuration
3
+ # Copy to .env and fill in your values
4
+ # ============================================================
5
+
6
+ # --- REQUIRED ---
7
+ ANTHROPIC_API_KEY=sk-ant-...
8
+ SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
9
+ SLACK_APPROVAL_CHANNEL=#devops-approvals
10
+
11
+ # --- BEHAVIOR & SAFETY ---
12
+ # IMPORTANT: Read SECURITY_POLICY.md before changing these settings
13
+
14
+ # Set to "true" only after you trust the agent's decisions
15
+ # RECOMMENDED: Keep false - agent will send notifications for approval
16
+ AUTO_APPLY=false
17
+
18
+ # Max AI reasoning steps per incident (prevents runaway loops)
19
+ MAX_AGENT_STEPS=10
20
+
21
+ # Emergency stop - set to true to disable all agent operations
22
+ AGENT_EMERGENCY_STOP=false
23
+
24
+ # Require human Slack approval for these action types
25
+ REQUIRE_APPROVAL_FOR=rollback,scale_down,delete,exec
26
+
27
+ # DevSecOps Settings
28
+ ENABLE_SECURITY_SCANNING=true
29
+ ENABLE_COMPLIANCE_CHECKS=true
30
+ COMPLIANCE_FRAMEWORKS=CIS,SOC2
31
+
32
+ # Database collection (OPTIONAL — disabled by default for security / sensitive data)
33
+ # When false: no RDS, Cloud SQL, Azure SQL, DynamoDB, Cosmos DB, Redis/Memorystore diagnostics
34
+ # Agent can still fix connection pool timeouts, app restarts, and network issues without DB access
35
+ ENABLE_DATABASE_COLLECTION=false
36
+
37
+ # --- KUBERNETES ---
38
+ # Comma-separated namespaces the agent can act on
39
+ ALLOWED_NAMESPACES=default,staging
40
+ # Leave empty to use in-cluster config
41
+ KUBECONFIG=
42
+
43
+ # --- CI/CD PLATFORMS ---
44
+
45
+ # GitHub (existing)
46
+ GITHUB_TOKEN=ghp_...
47
+ GITHUB_ORG=your-org
48
+
49
+ # GitLab
50
+ GITLAB_TOKEN=glpat-...
51
+ GITLAB_URL=https://gitlab.com
52
+ # For self-hosted GitLab, set: GITLAB_URL=https://gitlab.yourcompany.com
53
+
54
+ # Jenkins
55
+ JENKINS_URL=https://jenkins.yourcompany.com
56
+ JENKINS_USERNAME=admin
57
+ JENKINS_API_TOKEN=...
58
+
59
+ # Bamboo
60
+ BAMBOO_URL=https://bamboo.yourcompany.com
61
+ BAMBOO_USERNAME=admin
62
+ BAMBOO_PASSWORD=...
63
+
64
+ # Azure DevOps
65
+ AZURE_DEVOPS_ORG=your-org
66
+ AZURE_DEVOPS_PAT=...
67
+
68
+ # --- ARGOCD ---
69
+ ARGOCD_SERVER_URL=https://argocd.yourcompany.com
70
+ ARGOCD_AUTH_TOKEN=...
71
+ # Get token with: argocd account generate-token
72
+
73
+ # --- CLOUD PROVIDERS ---
74
+
75
+ # AWS
76
+ AWS_REGION=us-east-1
77
+ # AWS credentials via environment (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
78
+ # or use IAM roles for production
79
+
80
+ # GCP
81
+ GCP_PROJECT_ID=your-project-id
82
+ # GCP credentials via GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
83
+ # or use service account attached to compute instance
84
+
85
+ # Azure
86
+ AZURE_SUBSCRIPTION_ID=...
87
+ AZURE_TENANT_ID=...
88
+ AZURE_CLIENT_ID=...
89
+ AZURE_CLIENT_SECRET=...
90
+ # or use managed identity in production
91
+
92
+ # --- NOTIFICATIONS ---
93
+
94
+ # Email Alerts (CRITICAL for dangerous operation notifications)
95
+ EMAIL_ENABLED=true
96
+ EMAIL_SMTP_HOST=smtp.gmail.com
97
+ EMAIL_SMTP_PORT=587
98
+ EMAIL_SMTP_USER=devops-agent@yourcompany.com
99
+ EMAIL_SMTP_PASSWORD=your-app-password
100
+ EMAIL_FROM=devops-agent@yourcompany.com
101
+ EMAIL_TO=sre-team@yourcompany.com,devops-lead@yourcompany.com
102
+ EMAIL_CC=security-team@yourcompany.com
103
+
104
+ # PagerDuty
105
+ PAGERDUTY_TOKEN=
106
+ PAGERDUTY_SERVICE_ID=
107
+
108
+ # --- SERVER (for webhook endpoint) ---
109
+ PORT=8000
110
+ LOG_LEVEL=INFO
111
+ WEBHOOK_SECRET=change-me-to-random-string
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DevOps AI Agent Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,10 @@
1
+ include README.md
2
+ include LICENSE
3
+ include usage-readme.md
4
+ include SECURITY_GUARANTEES.md
5
+ include requirements.txt
6
+ include .env.example
7
+ recursive-include k8s *.yaml
8
+ recursive-exclude tests *
9
+ recursive-exclude docs *
10
+ recursive-exclude .github *