Commit Graph

31 Commits

Author SHA1 Message Date
7393c4f856 FIX(app): add bash tools to agents
- Add execute_bash tool to Orchestrator for direct command execution
- Add execute_bash tool to Review agent for running tests/linters
- Fix Dockerfile to copy agents/ and tools/ directories
- Add PERMISSIONS.md documenting agent write access

Fixes ModuleNotFoundError: No module named 'agents'
2025-12-24 13:01:51 +09:00
89c616bca5 REFACTOR(app): change ai model to iterative
- Change AI model configuration
- Switch to iterative approach
2025-12-24 12:55:23 +09:00
482eee9e8d REFACTOR(app): remove legacy MCP tools
- Remove 1200+ lines of legacy code
- Keep only bash_command, read_file, write_file
2025-12-24 02:04:35 +09:00
86b640967d REFACTOR(app): simplify tool architecture
MAJOR SIMPLIFICATION:
- Removed 20+ specialized MCP tools
- Added 3 universal tools: bash_command, read_file, write_file
- All agents now use the same tools (behavior controlled by prompts)

Changes:
1. Added universal_tools (bash-centric approach):
   - bash_command: Execute any bash command (kubectl, git, npm, python, etc.)
   - read_file: Read files (convenience wrapper)
   - write_file: Write files (convenience wrapper)

2. All agents now use universal_tools:
   - orchestrator (Claude)
   - backend_developer (Groq)
   - frontend_developer (Groq)
   - sre_specialist (Groq)
   - yaml_manager (Groq)

3. Updated orchestrator prompt:
   - Focus on bash_command usage
   - Clear examples of bash commands
   - Simpler, more powerful approach

4. Legacy tools kept for backward compatibility:
   - Old specialized tools still available but not recommended
   - Use bash_command instead

Benefits:
- Extreme simplicity: 3 tools vs 20+
- Complete autonomy: Agents can do anything via bash
- Maintainable: No need to add new tools, just use bash
2025-12-24 01:59:18 +09:00
b33b9f17ec FIX(app): add projects path to prompt
Updated orchestrator prompt to include:
- Explicit /app/projects/ path information
- List of available repositories (11 repos)
- Instruction to use /app/projects when user asks about Projects folder
- Added git_read_file and git_show_file_changes to tool documentation

This fixes the issue where orchestrator tried to access 'Projects' instead of '/app/projects'.
2025-12-24 01:45:13 +09:00
9b18bb888b FEAT(app): enable read-only file access
- Add read_only_tools collection
- Bind read-only tools to all agents
2025-12-24 01:42:51 +09:00
5f19d59d35 FIX(config): add git safe.directory config
- Add git config for safe.directory
- Fix exit status 128 on mounted repos
2025-12-24 01:35:38 +09:00
5a43963971 FEAT(app): mount host Projects directory
- Add hostPath volume mount in deployment
- Enable direct access to Gitea repos
2025-12-24 01:34:08 +09:00
d93c64045a FEAT(ci): add ArgoCD auto-deployment
- Add auto-clone on pod startup
- Integrate with ArgoCD for deployment
2025-12-24 01:15:47 +09:00
b27a1346b1 FEAT(k8s): add YAML manager agent
Major additions:
- New Groq agent: YAML Manager
  - Generates Kubernetes YAML files (Deployment, Service, Ingress)
  - Organizes YAMLs in folder structure by application
  - Applies YAMLs directly to cluster using Python K8s client
  - Shows Git file changes in UI with diff display

- YAML Management MCP Tools:
  - yaml_create_deployment: Create Deployment YAML
  - yaml_create_service: Create Service YAML
  - yaml_create_ingress: Create Ingress YAML with TLS
  - yaml_apply_to_cluster: Apply YAMLs to K8s cluster
  - git_show_file_changes: Display Git changes in UI

- RBAC Permissions:
  - mas-writer ClusterRole: Write permissions for Groq agents
  - Create/update/delete permissions for core K8s resources
  - Namespace and ArgoCD Application management
  - mas ServiceAccount has both read (viewer) and write (writer) roles

- UI Updates:
  - Added YAML Manager to agent list
  - Updated agent icons and names (Qwen → Groq)
  - Display file changes with syntax highlighting

- Workflow Integration:
  - YAML Manager node in LangGraph workflow
  - Orchestrator routes YAML/K8s keywords to YAML Manager
  - Tool binding for YAML-specific operations

Dependencies:
- Added PyYAML==6.0.2 for YAML generation
2025-12-24 01:02:27 +09:00
6f984e5b6f REFACTOR(app): use native Python clients
Major changes:
- Kubernetes tools: Replace subprocess kubectl calls with kubernetes-client library
  - Supports in-cluster config for pod execution
  - Fallback to local kubeconfig for development
  - All k8s tools (nodes, pods, deployments, logs, describe) now use Python API

- PostgreSQL tools: Replace kubectl exec psql with direct psycopg2 connection
  - Connect via Kubernetes service DNS
  - Support for environment-based configuration
  - Improved error handling with proper pgcode/pgerror

- Prometheus tools: Replace kubectl exec wget with direct HTTP requests
  - Use requests library to query Prometheus API
  - Connect via Kubernetes service DNS
  - Configurable via PROMETHEUS_URL env var

- Deployment updates: Add explicit PostgreSQL connection env vars
  - POSTGRES_HOST, POSTGRES_PORT, POSTGRES_USER
  - Already had POSTGRES_PASSWORD from secret

Benefits:
- No longer requires kubectl binary in container
- Faster execution (no subprocess overhead)
- Better error handling and type safety
- Works seamlessly in Kubernetes pods with RBAC
2025-12-24 00:47:35 +09:00
7197e94baf FIX(k8s): add serviceaccount.yaml to kustomization
- Include serviceaccount.yaml in kustomization
- Fix resource deployment
2025-12-24 00:29:25 +09:00
6196393eb2 FEAT(app): add rbac and kubectl for mcp tools
- ServiceAccount for mas pod
- ClusterRole with read-only permissions
- ClusterRoleBinding
- kubectl installed in Docker image
- Now mas can query Kubernetes API!
2025-12-24 00:29:14 +09:00
e8dbec804b FEAT(app): add MCP tools for server access
- Add MCP tools for real server interaction
- Enable K8s and database access
2025-12-24 00:28:53 +09:00
9a21bf49a0 PERF(app): add prompt anti-hallucination
Orchestrator and SRE agents now:
- Don't guess cluster-specific information
- Explicitly state when real verification is needed
- Provide general best practices only
2025-12-24 00:23:21 +09:00
ec69173903 CHORE(deps): upgrade to Claude Sonnet 4.5
- Update to claude-sonnet-4-5 model
- Use latest Claude model
2025-12-24 00:14:52 +09:00
469a5a2bbc FIX(app): use claude-3-5-sonnet-latest model
- Update model to claude-3-5-sonnet-latest
- Use latest available Claude model
2025-12-24 00:14:27 +09:00
68b9858c50 FIX(app): use POSTGRES_PASSWORD from Vault
- Change PASSWORD to POSTGRES_PASSWORD
- Use correct Vault key name
2025-12-24 00:12:46 +09:00
0a6e40b947 FIX(app): correct Claude model version
- Update model version string
- Use latest stable version
2025-12-24 00:09:19 +09:00
86e71e42d9 FIX(k8s): correct PostgreSQL secret name
- Change postgresql-password to postgresql-root-password
- Fix secret reference
2025-12-24 00:08:35 +09:00
6cee617072 FIX(db): use existing user and database
- Created mas database in PostgreSQL
- Changed from mas_user to bluemayne (existing user)
- Use postgresql-password secret (root password)
- Add CHAINLIT_DATABASE_URL for Chainlit compatibility
- Improved error handling in chainlit_app.py
2025-12-24 00:02:03 +09:00
8e736323aa CHORE(deps): upgrade Chainlit to >=2.0.0
- Upgrade Chainlit version
- Fix Pydantic compatibility
2025-12-23 23:50:38 +09:00
902028a233 FIX(deps): constrain Pydantic version
- Constrain pydantic<2.10
- Fix Chainlit 1.3.1 compatibility
2025-12-23 23:43:31 +09:00
69d38ea6e7 REFACTOR(k8s): remove ingress.yaml
- Remove ingress from mas project
- Ingress managed in cluster-infrastructure
2025-12-23 23:42:36 +09:00
12fd9d52d9 FIX(config): fix Chainlit config dir
- Create /root/.chainlit directory in Dockerfile to prevent FileExistsError
- Reduce replicas from 2 to 1 to conserve resources
- Lower CPU request from 500m to 100m (insufficient CPU on nodes)
- Lower memory request from 512Mi to 256Mi
- Remove health check probes (Chainlit doesn't have /health endpoint)
2025-12-23 23:38:16 +09:00
599a24792f REFACTOR(app): switch to Gitea registry
- Update image from harbor to gitea0213.kro.kr
- Add imagePullPolicy: Always
2025-12-23 23:19:08 +09:00
09be71cf76 CHORE(config): remove unused API keys
- Remove OpenAI and Google API keys
- Use only Anthropic and Groq
2025-12-23 22:53:14 +09:00
9d3a7656d4 REFACTOR(k8s): reorganize to base/overlays pattern
- Add k8s/base/ with deployment and service
- Add k8s/overlays/prod/ with environment config
2025-12-23 22:49:06 +09:00
9eec298fb3 FEAT(k8s): add ArgoCD configuration
- Add ArgoCD application configuration
- Reorganize k8s manifests
2025-12-23 22:46:52 +09:00
e54811c09b REFACTOR(k8s): move secrets to Vault
- Migrate secrets to HashiCorp Vault
- Use ExternalSecrets operator
2025-12-23 22:42:05 +09:00
346b0c79ef INIT(app): initial setup
- Initialize project structure
- Add base application files
2025-12-23 22:31:45 +09:00