-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdependency_agent.py
More file actions
18 lines (16 loc) · 939 Bytes
/
Copy pathdependency_agent.py
File metadata and controls
18 lines (16 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from typing import Dict, Any
from .base_agent import BaseAgent
class DependencyAgent(BaseAgent):
def __init__(self, provider: str = "openai", **kwargs):
super().__init__(provider=provider, **kwargs)
self.name = "DependencyAgent"
def run(self, context: Dict[str, Any]) -> Dict[str, Any]:
build_files = context.get("scan", {}).get("metadata", {}).get("build_files", [])
suggestions = []
if not build_files:
suggestions.append("Add a dependency manifest (requirements.txt, package.json, etc.)")
else:
suggestions.append("Review and update outdated dependencies")
suggestions.append("Use a dependency lock file (poetry.lock, yarn.lock, Cargo.lock)")
suggestions.append("Add Dependabot or Renovate for automated updates")
return {"suggestions": suggestions, "confidence": 0.7, "summary": "Dependency recommendations"}