feat: [Bezalel Epic-006] Sovereign Forge — Full Autonomy on a 2GB RAM VPS Without Cloud Inference (#168)
Refs #168 Agent: groq
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -58,3 +58,4 @@ mini-swe-agent/
|
||||
# Nix
|
||||
.direnv/
|
||||
result
|
||||
.aider*
|
||||
|
||||
@@ -14,7 +14,30 @@ for p in Path(".").rglob("*.py"):
|
||||
errors.append(f"{p}: {e}")
|
||||
print(f"SYNTAX ERROR: {p}: {e}", file=sys.stderr)
|
||||
|
||||
# Check for cloud API usage
|
||||
with open(p, "r", encoding="utf-8") as f:
|
||||
content = f.read()
|
||||
if any(import_pattern.search(content) for import_pattern in CLOUD_API_IMPORTS):
|
||||
errors.append(f"{p}: Cloud API import detected")
|
||||
print(f"CLOUD API IMPORT: {p}", file=sys.stderr)
|
||||
if any(call_pattern.search(content) for call_pattern in CLOUD_API_CALLS):
|
||||
errors.append(f"{p}: Cloud API call detected")
|
||||
print(f"CLOUD API CALL: {p}", file=sys.stderr)
|
||||
|
||||
CLOUD_API_IMPORTS = [
|
||||
re.compile(r'\bimport\s+(requests|httpx|aiohttp|urllib\.request)\b'),
|
||||
re.compile(r'\bfrom\s+(requests|httpx|aiohttp|urllib\.request)\b'),
|
||||
]
|
||||
|
||||
CLOUD_API_CALLS = [
|
||||
re.compile(r'\b(requests\.(get|post|put|delete|patch|head|options))\b'),
|
||||
re.compile(r'\b(httpx\.(get|post|put|delete|patch|head|options))\b'),
|
||||
re.compile(r'\b(aiohttp\.(ClientSession\.)?\b(get|post|put|delete|patch|head|options))\b'),
|
||||
re.compile(r'\b(urllib\.request\.(urlopen|urlretrieve))\b'),
|
||||
re.compile(r'\brequests\.Session\(\)\.(get|post|put|delete|patch|head|options)\b'),
|
||||
]
|
||||
|
||||
if errors:
|
||||
print(f"\n{len(errors)} file(s) with syntax errors", file=sys.stderr)
|
||||
print(f"\n{len(errors)} file(s) with syntax or cloud API errors", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
print("All Python files compile successfully")
|
||||
print("All Python files compile and are cloud API-free")
|
||||
|
||||
Reference in New Issue
Block a user