diff --git a/AutoForge/.env.example b/.env.example similarity index 100% rename from AutoForge/.env.example rename to .env.example diff --git a/AutoForge/.gitignore b/.gitignore similarity index 100% rename from AutoForge/.gitignore rename to .gitignore diff --git a/AutoForge/GitHub.md b/AutoForge/GitHub.md deleted file mode 100644 index ba54445b9ead77cd66fd825fede40914b02ef13f..0000000000000000000000000000000000000000 --- a/AutoForge/GitHub.md +++ /dev/null @@ -1,212 +0,0 @@ -# AutoForge (AgentOS) - -AutoForge is an autonomous DAG-based code generation and verification platform. Users submit natural-language software tasks; the system plans, generates code, tests, analyzes, executes in Docker, verifies, and autonomously repairs failures — with full workflow history persisted in PostgreSQL. - -**Project Status:** Fully implemented MVP (Phases 1-20 completed). - -The system supports the full autonomous loop: -- Frontend React DAG visualization and event streaming -- Gemini 3.1 Pro LLM adapter for planning and code generation -- Docker Sandbox execution and verification -- Automated failure diagnosis and repair -- Full PostgreSQL state persistence and user isolation - -## Architecture - -```mermaid -flowchart TB - FE[Frontend] --> API[Backend API] - API --> ORCH[Workflow Orchestrator] - ORCH --> PLANNER[Planner LLM] - ORCH --> MEM[(PostgreSQL)] - PLANNER --> DAG[DAG Engine] - DAG --> CODE[Code Agent] - DAG --> TEST[Test Agent] - DAG --> ANALYSIS[Static Analysis] - CODE --> DOCKER[Docker Sandbox] - TEST --> DOCKER - ANALYSIS --> DOCKER - DOCKER --> VERIFY[Verification] -``` - -Phase 1 implements the **API**, **PostgreSQL memory layer**, **authentication**, **LLM provider abstraction**, and **workflow persistence**. - -## Repository Structure - -```text -AgentOS/ -├── backend/ # FastAPI application -│ ├── api/ # HTTP routes (auth, workflows, settings) -│ ├── agents/ # Agent modules (Phase 2+) -│ ├── orchestration/ # DAG engine (Phase 2+) -│ ├── execution/ # Docker sandbox (Phase 2+) -│ ├── analysis/ # Static analysis (Phase 2+) -│ ├── memory/ # Workflow repository -│ ├── llm/ # Provider abstraction -│ ├── db/ # Models and migrations -│ └── events/ # Event publisher -├── frontend/ # React + Vite web UI (Phase 5) -├── benchmark/ # Evaluation suite (Phase 5) -├── docker/ # Dockerfiles -├── tests/ # Backend tests -├── docker-compose.yml -└── .env.example -``` - -## Local Setup - -### Prerequisites - -- Docker and Docker Compose -- Python 3.12+ (for local development without Docker) - -### Quick Start (Docker) - -```bash -cp .env.example .env -docker compose up --build -d -``` - -### Hugging Face Space Deployment -For deploying AutoForge to a public Hugging Face Space, please refer to the [Hugging Face Deployment Guide](HUGGINGFACE_DEPLOYMENT.md). - -Services: - -| Service | URL | -|-----------|----------------------------| -| Frontend | http://localhost:5173 | -| Backend | http://localhost:8000 | -| API docs | http://localhost:8000/docs | -| PostgreSQL| localhost:5432 | - -Migrations run automatically when the backend container starts. - -### Local Development (without Docker backend) - -```bash -# Start PostgreSQL only -docker compose up -d postgres - -# Create virtual environment and install dependencies -python -m venv .venv -source .venv/bin/activate # Windows: .venv\Scripts\activate -pip install -r backend/requirements.txt - -# Copy and configure environment -cp .env.example .env - -# Run migrations -alembic upgrade head - -# Start API server -uvicorn backend.main:app --reload --port 8000 -``` - -### Frontend Development - -```bash -cd frontend -npm install -npm run dev -``` - -The Vite dev server runs at http://localhost:5173 and proxies `/api` requests to the backend at http://localhost:8000. - -For Docker (backend + frontend + PostgreSQL): - -```bash -docker compose up --build -``` - -## Environment Variables - -See [`.env.example`](.env.example). Key variables: - -| Variable | Description | -|----------------|------------------------------------------| -| `DATABASE_URL` | Async PostgreSQL connection string | -| `SECRET_KEY` | JWT signing secret | -| `ENCRYPTION_KEY` | Key material for API credential encryption | -| `MAX_RETRIES` | Max repair attempts (default: 4) | -| `DOCKER_HOST` | Docker socket for sandbox (later phases) | - -Never commit `.env` files with real secrets. - -## API Endpoints (Phase 1) - -| Method | Endpoint | Description | -|--------|---------------------------------|--------------------------| -| POST | `/auth/signup` | Create account | -| POST | `/auth/login` | Obtain JWT token | -| GET | `/auth/me` | Current user | -| POST | `/workflows` | Create workflow | -| GET | `/workflows` | List user workflows | -| GET | `/workflows/{workflow_id}` | Get workflow details | -| POST | `/workflows/{workflow_id}/start` | Plan, validate, and execute DAG | -| GET | `/workflows/{workflow_id}/tasks` | List workflow tasks | -| GET | `/workflows/{workflow_id}/events` | List workflow events (supports `after_id`) | -| GET | `/workflows/{workflow_id}/events/stream` | SSE live event stream | -| GET | `/workflows/{workflow_id}/attempts` | List repair/execution attempts | -| GET | `/settings/providers` | List LLM providers and models | -| POST | `/settings/api-credentials` | Store encrypted API key | -| GET | `/settings/api-credentials` | List credentials (redacted) | -| DELETE | `/settings/api-credentials/{id}` | Delete credential | -| GET | `/health` | Health + DB connectivity | - -## Database Schema - -PostgreSQL tables (Phase 1): - -- `users` — authentication -- `workflows` — workflow records with status and planner output -- `tasks` — DAG task nodes (schema ready; populated in Phase 2) -- `attempts` — generation/execution attempts -- `events` — workflow event stream -- `api_credentials` — encrypted user LLM API keys - -## LLM Provider Abstraction - -Providers implement: - -- `generate()` — text completion -- `generate_structured()` — JSON output -- `estimate_cost()` — token cost estimation - -Currently supported: **OpenAI** and **Gemini**. -The workflow engine resolves providers through `get_llm_provider()` — no provider-specific code in API routes. - -Users can securely enter their own API keys (OpenAI or Gemini) directly in the frontend Settings page. The keys are encrypted at rest in the database and automatically injected into the containerized runner during execution. - -## Running Tests - -```bash -# Ensure PostgreSQL is running -docker compose up -d postgres - -# Run migrations (if not already applied) -alembic upgrade head - -# Install dependencies and run tests -pip install -r backend/requirements.txt -pytest -v -``` - -Tests use a real PostgreSQL connection and truncate tables between test cases. - -## Security Considerations - -- Passwords stored as bcrypt hashes -- API keys encrypted at rest (Fernet-derived key from `ENCRYPTION_KEY`) -- JWT authentication on all workflow endpoints -- Users cannot access other users' workflows -- Generated code execution will run only inside Docker (Phase 2+) - -## Known Limitations - -- Docker sandbox requires Docker on the host for real code execution -- LLM calls require a valid API key (OpenAI supported) -- Benchmark runner not yet implemented - -## License - -See LICENSE (to be added). diff --git a/AutoForge/backend/agents/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/agents/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 00cbe60289215cf36c4d30a4a4a9fe3ef9259429..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/agents/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/agents/__pycache__/code_agent.cpython-312.pyc b/AutoForge/backend/agents/__pycache__/code_agent.cpython-312.pyc deleted file mode 100644 index d0041830b7a9f5d11afc47f1fd8fd575b5fdcb5d..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/agents/__pycache__/code_agent.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/agents/__pycache__/diagnosis_agent.cpython-312.pyc b/AutoForge/backend/agents/__pycache__/diagnosis_agent.cpython-312.pyc deleted file mode 100644 index 486ae90bb0f8fd51de960f09078bd91df19048e7..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/agents/__pycache__/diagnosis_agent.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/agents/__pycache__/planner.cpython-312.pyc b/AutoForge/backend/agents/__pycache__/planner.cpython-312.pyc deleted file mode 100644 index 54df862e4b33898bbc2ca65d643dc16947a7aca6..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/agents/__pycache__/planner.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/agents/__pycache__/repair_agent.cpython-312.pyc b/AutoForge/backend/agents/__pycache__/repair_agent.cpython-312.pyc deleted file mode 100644 index 05e9b125cd322372f62a7b6aef6c1dc08fa2ed4a..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/agents/__pycache__/repair_agent.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/agents/__pycache__/task_handlers.cpython-312.pyc b/AutoForge/backend/agents/__pycache__/task_handlers.cpython-312.pyc deleted file mode 100644 index 62a7fb5366e744144f3d49532660aa030448b5d0..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/agents/__pycache__/task_handlers.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/agents/__pycache__/test_agent.cpython-312-pytest-9.1.1.pyc b/AutoForge/backend/agents/__pycache__/test_agent.cpython-312-pytest-9.1.1.pyc deleted file mode 100644 index accd19eab1c7a220005bf7a4b81b446cfaa37013..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/agents/__pycache__/test_agent.cpython-312-pytest-9.1.1.pyc and /dev/null differ diff --git a/AutoForge/backend/agents/__pycache__/test_agent.cpython-312.pyc b/AutoForge/backend/agents/__pycache__/test_agent.cpython-312.pyc deleted file mode 100644 index 35fa0f441d170d9a8910bc51b7d1634690943ce4..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/agents/__pycache__/test_agent.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/analysis/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/analysis/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 6aab48c84aa66092e3041c5aed89d4f59d153d11..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/analysis/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/analysis/__pycache__/static_analyzer.cpython-312.pyc b/AutoForge/backend/analysis/__pycache__/static_analyzer.cpython-312.pyc deleted file mode 100644 index 942f2c38ada0e307ff077dd4bfb6a5da818b1798..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/analysis/__pycache__/static_analyzer.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/api/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/api/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 7bb133c74a03ff241c9da7fdb4dca0192a91f793..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/api/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/api/__pycache__/auth.cpython-312.pyc b/AutoForge/backend/api/__pycache__/auth.cpython-312.pyc deleted file mode 100644 index 7f75e3076bf68873630e7b878a38ccccde74eeda..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/api/__pycache__/auth.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/api/__pycache__/providers.cpython-312.pyc b/AutoForge/backend/api/__pycache__/providers.cpython-312.pyc deleted file mode 100644 index 7477fe2decd3f04a27755779105e3b84b1a1ac48..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/api/__pycache__/providers.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/api/__pycache__/schemas.cpython-312.pyc b/AutoForge/backend/api/__pycache__/schemas.cpython-312.pyc deleted file mode 100644 index 6807c9fadcfbd447d0f599a496dca6844b0735e4..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/api/__pycache__/schemas.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/api/__pycache__/settings.cpython-312.pyc b/AutoForge/backend/api/__pycache__/settings.cpython-312.pyc deleted file mode 100644 index 0f5b0187f0f9d8646c031d2dc0e807e845aa9411..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/api/__pycache__/settings.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/api/__pycache__/workflows.cpython-312.pyc b/AutoForge/backend/api/__pycache__/workflows.cpython-312.pyc deleted file mode 100644 index bd8a3f9bab4f12364f56fe3e93f16582c8d62268..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/api/__pycache__/workflows.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/core/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/core/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index eb4eeb5348b97e9297c6cbd99382a5d4ef0f2048..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/core/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/core/__pycache__/config.cpython-312.pyc b/AutoForge/backend/core/__pycache__/config.cpython-312.pyc deleted file mode 100644 index fe0f6025ac54d8a80ba3d36b5894a8a48ff1bf2b..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/core/__pycache__/config.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/core/__pycache__/dependencies.cpython-312.pyc b/AutoForge/backend/core/__pycache__/dependencies.cpython-312.pyc deleted file mode 100644 index 7d88d614eb0a5a88ee5ec111b25d493683432811..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/core/__pycache__/dependencies.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/core/__pycache__/encryption.cpython-312.pyc b/AutoForge/backend/core/__pycache__/encryption.cpython-312.pyc deleted file mode 100644 index a9121213c1ad052177363e906aae742014d7c825..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/core/__pycache__/encryption.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/core/__pycache__/security.cpython-312.pyc b/AutoForge/backend/core/__pycache__/security.cpython-312.pyc deleted file mode 100644 index e0d9ab7a63ebccc8f01e3e26ec90f743d7675ae4..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/core/__pycache__/security.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/db/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/db/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 848d4c749c068fb2711c2ff2d3f8cb3ac85e44df..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/db/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/db/__pycache__/session.cpython-312.pyc b/AutoForge/backend/db/__pycache__/session.cpython-312.pyc deleted file mode 100644 index 3436dc76a9d4ea835e126d59f56be7cd40fd6f9d..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/db/__pycache__/session.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/db/models/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/db/models/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 9e182a42d347f0358b1d2e9c32edb3b5cc83dcf7..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/db/models/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/events/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/events/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 54c6876785cee81d962c04910859ef835330b229..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/events/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/events/__pycache__/publisher.cpython-312.pyc b/AutoForge/backend/events/__pycache__/publisher.cpython-312.pyc deleted file mode 100644 index b97497ac3e58ac60909ae5c538988368fafe6fd5..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/events/__pycache__/publisher.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/execution/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/execution/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index d6af5dac213811c08deb8a3afc6b2edddf978262..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/execution/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/execution/__pycache__/docker_runner.cpython-312.pyc b/AutoForge/backend/execution/__pycache__/docker_runner.cpython-312.pyc deleted file mode 100644 index 9b6de935a94bae8cb48f32d4f10723c85c3bde40..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/execution/__pycache__/docker_runner.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/execution/__pycache__/result_parser.cpython-312.pyc b/AutoForge/backend/execution/__pycache__/result_parser.cpython-312.pyc deleted file mode 100644 index 18b4177224f54cd8f24e0d3a282addfea476722e..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/execution/__pycache__/result_parser.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/execution/__pycache__/sandbox.cpython-312.pyc b/AutoForge/backend/execution/__pycache__/sandbox.cpython-312.pyc deleted file mode 100644 index d682989bd4630f559281951c0bb26f26d1b234ef..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/execution/__pycache__/sandbox.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/execution/__pycache__/verification.cpython-312.pyc b/AutoForge/backend/execution/__pycache__/verification.cpython-312.pyc deleted file mode 100644 index 5b51e5f53d5d15da9f2fb4c8fb0b08e363565a0f..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/execution/__pycache__/verification.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/llm/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/llm/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index 39ea16b756a246c0663a5b70d09d0bf8415eb662..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/llm/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/llm/__pycache__/base.cpython-312.pyc b/AutoForge/backend/llm/__pycache__/base.cpython-312.pyc deleted file mode 100644 index e8875654598cbc3d2fc8db9c9cf1cdc9889222a8..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/llm/__pycache__/base.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/llm/__pycache__/types.cpython-312.pyc b/AutoForge/backend/llm/__pycache__/types.cpython-312.pyc deleted file mode 100644 index 715d326d0a4d000d094ae4cf0757944ce06922d6..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/llm/__pycache__/types.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/llm/providers/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/llm/providers/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index bba36585a4b37ac71b0ccadb57d2d84f2cbad25f..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/llm/providers/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/llm/providers/__pycache__/gemini_provider.cpython-312.pyc b/AutoForge/backend/llm/providers/__pycache__/gemini_provider.cpython-312.pyc deleted file mode 100644 index 75f78741e77071ea538bfe02c934ec2c726c1508..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/llm/providers/__pycache__/gemini_provider.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/llm/providers/__pycache__/mock_provider.cpython-312.pyc b/AutoForge/backend/llm/providers/__pycache__/mock_provider.cpython-312.pyc deleted file mode 100644 index 1e72747b5b9a262c49714ae70d579cd525c41668..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/llm/providers/__pycache__/mock_provider.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/llm/providers/__pycache__/openai_provider.cpython-312.pyc b/AutoForge/backend/llm/providers/__pycache__/openai_provider.cpython-312.pyc deleted file mode 100644 index d0aed7814169ccf2f4c391c2591b4b87ddaad5a2..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/llm/providers/__pycache__/openai_provider.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/memory/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/memory/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index f88c095a4691666dca501be2da7772bc80002833..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/memory/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/memory/__pycache__/attempt_repository.cpython-312.pyc b/AutoForge/backend/memory/__pycache__/attempt_repository.cpython-312.pyc deleted file mode 100644 index b5af0263bdf65ab51337ef08e2d4b09e4bd3ce17..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/memory/__pycache__/attempt_repository.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/memory/__pycache__/task_repository.cpython-312.pyc b/AutoForge/backend/memory/__pycache__/task_repository.cpython-312.pyc deleted file mode 100644 index bcc3dc91dc65b0ba1c0ab1e2ac9add74f3e52ae1..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/memory/__pycache__/task_repository.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/memory/__pycache__/workflow_repository.cpython-312.pyc b/AutoForge/backend/memory/__pycache__/workflow_repository.cpython-312.pyc deleted file mode 100644 index fdc0e7cc545a86db0d84ffde3d65e95fe4318851..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/memory/__pycache__/workflow_repository.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/__init__.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/__init__.cpython-312.pyc deleted file mode 100644 index c254e9e33723025cdbf3872b4a6d148e971b01bc..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/__init__.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/dag_engine.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/dag_engine.cpython-312.pyc deleted file mode 100644 index d52a5dcd33c96ec6f0b4e7f82ff0e8ecbc601904..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/dag_engine.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/dag_schema.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/dag_schema.cpython-312.pyc deleted file mode 100644 index 2b157d7e5ddbc17ee6ce469170d993402eb06920..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/dag_schema.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/dag_validator.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/dag_validator.cpython-312.pyc deleted file mode 100644 index 3598966c9d683e4c30d16ec2e52bd97fc7be0381..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/dag_validator.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/errors.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/errors.cpython-312.pyc deleted file mode 100644 index d5b8fbfe79695336311a12103cfca2ae056e84d2..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/errors.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/failure_classifier.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/failure_classifier.cpython-312.pyc deleted file mode 100644 index 0b6b5aba29f6456af7a90f26d0fca4f369b2a925..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/failure_classifier.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/recovery_runner.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/recovery_runner.cpython-312.pyc deleted file mode 100644 index a4c03abf42bc0ec71f3c07cbf8a241f1aa1cb0e9..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/recovery_runner.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/retry_manager.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/retry_manager.cpython-312.pyc deleted file mode 100644 index 27f9a95caf1d753743e2cb8a4338695f4f23a139..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/retry_manager.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/scheduler.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/scheduler.cpython-312.pyc deleted file mode 100644 index 823e7ceb10ec513c4ee4935c4d746e37a5f74632..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/scheduler.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/state_machine.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/state_machine.cpython-312.pyc deleted file mode 100644 index 09554626e52f0aba34a2a4e996c5559568a8debd..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/state_machine.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/task_context.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/task_context.cpython-312.pyc deleted file mode 100644 index 940944cf31ee4a8c0d2067446c565f6544aee021..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/task_context.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/backend/orchestration/__pycache__/workflow_runner.cpython-312.pyc b/AutoForge/backend/orchestration/__pycache__/workflow_runner.cpython-312.pyc deleted file mode 100644 index 58dbbc698d9da58d2b7fc50c2d390cd2d5536edb..0000000000000000000000000000000000000000 Binary files a/AutoForge/backend/orchestration/__pycache__/workflow_runner.cpython-312.pyc and /dev/null differ diff --git a/AutoForge/Dockerfile b/Dockerfile similarity index 100% rename from AutoForge/Dockerfile rename to Dockerfile diff --git a/AutoForge/HUGGINGFACE_DEPLOYMENT.md b/HUGGINGFACE_DEPLOYMENT.md similarity index 100% rename from AutoForge/HUGGINGFACE_DEPLOYMENT.md rename to HUGGINGFACE_DEPLOYMENT.md diff --git a/README.md b/README.md index b8c10a318ea475ef776f155d4bddaad1b2c11ebe..e87f25245bd877e935184d40ec1fa1eadb2b661f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,222 @@ --- title: AutoForge -emoji: 💻 +emoji: 🤖 colorFrom: blue colorTo: indigo sdk: docker pinned: false license: mit ---- \ No newline at end of file +--- + +# AutoForge (AgentOS) + +AutoForge is an autonomous DAG-based code generation and verification platform. Users submit natural-language software tasks; the system plans, generates code, tests, analyzes, executes in Docker, verifies, and autonomously repairs failures — with full workflow history persisted in PostgreSQL. + +**Project Status:** Fully implemented MVP (Phases 1-20 completed). + +The system supports the full autonomous loop: +- Frontend React DAG visualization and event streaming +- Gemini 3.1 Pro LLM adapter for planning and code generation +- Docker Sandbox execution and verification +- Automated failure diagnosis and repair +- Full PostgreSQL state persistence and user isolation + +## Architecture + +```mermaid +flowchart TB + FE[Frontend] --> API[Backend API] + API --> ORCH[Workflow Orchestrator] + ORCH --> PLANNER[Planner LLM] + ORCH --> MEM[(PostgreSQL)] + PLANNER --> DAG[DAG Engine] + DAG --> CODE[Code Agent] + DAG --> TEST[Test Agent] + DAG --> ANALYSIS[Static Analysis] + CODE --> DOCKER[Docker Sandbox] + TEST --> DOCKER + ANALYSIS --> DOCKER + DOCKER --> VERIFY[Verification] +``` + +Phase 1 implements the **API**, **PostgreSQL memory layer**, **authentication**, **LLM provider abstraction**, and **workflow persistence**. + +## Repository Structure + +```text +AgentOS/ +├── backend/ # FastAPI application +│ ├── api/ # HTTP routes (auth, workflows, settings) +│ ├── agents/ # Agent modules (Phase 2+) +│ ├── orchestration/ # DAG engine (Phase 2+) +│ ├── execution/ # Docker sandbox (Phase 2+) +│ ├── analysis/ # Static analysis (Phase 2+) +│ ├── memory/ # Workflow repository +│ ├── llm/ # Provider abstraction +│ ├── db/ # Models and migrations +│ └── events/ # Event publisher +├── frontend/ # React + Vite web UI (Phase 5) +├── benchmark/ # Evaluation suite (Phase 5) +├── docker/ # Dockerfiles +├── tests/ # Backend tests +├── docker-compose.yml +└── .env.example +``` + +## Local Setup + +### Prerequisites + +- Docker and Docker Compose +- Python 3.12+ (for local development without Docker) + +### Quick Start (Docker) + +```bash +cp .env.example .env +docker compose up --build -d +``` + +### Hugging Face Space Deployment +For deploying AutoForge to a public Hugging Face Space, please refer to the [Hugging Face Deployment Guide](HUGGINGFACE_DEPLOYMENT.md). + +Services: + +| Service | URL | +|-----------|----------------------------| +| Frontend | http://localhost:5173 | +| Backend | http://localhost:8000 | +| API docs | http://localhost:8000/docs | +| PostgreSQL| localhost:5432 | + +Migrations run automatically when the backend container starts. + +### Local Development (without Docker backend) + +```bash +# Start PostgreSQL only +docker compose up -d postgres + +# Create virtual environment and install dependencies +python -m venv .venv +source .venv/bin/activate # Windows: .venv\Scripts\activate +pip install -r backend/requirements.txt + +# Copy and configure environment +cp .env.example .env + +# Run migrations +alembic upgrade head + +# Start API server +uvicorn backend.main:app --reload --port 8000 +``` + +### Frontend Development + +```bash +cd frontend +npm install +npm run dev +``` + +The Vite dev server runs at http://localhost:5173 and proxies `/api` requests to the backend at http://localhost:8000. + +For Docker (backend + frontend + PostgreSQL): + +```bash +docker compose up --build +``` + +## Environment Variables + +See [`.env.example`](.env.example). Key variables: + +| Variable | Description | +|----------------|------------------------------------------| +| `DATABASE_URL` | Async PostgreSQL connection string | +| `SECRET_KEY` | JWT signing secret | +| `ENCRYPTION_KEY` | Key material for API credential encryption | +| `MAX_RETRIES` | Max repair attempts (default: 4) | +| `DOCKER_HOST` | Docker socket for sandbox (later phases) | + +Never commit `.env` files with real secrets. + +## API Endpoints (Phase 1) + +| Method | Endpoint | Description | +|--------|---------------------------------|--------------------------| +| POST | `/auth/signup` | Create account | +| POST | `/auth/login` | Obtain JWT token | +| GET | `/auth/me` | Current user | +| POST | `/workflows` | Create workflow | +| GET | `/workflows` | List user workflows | +| GET | `/workflows/{workflow_id}` | Get workflow details | +| POST | `/workflows/{workflow_id}/start` | Plan, validate, and execute DAG | +| GET | `/workflows/{workflow_id}/tasks` | List workflow tasks | +| GET | `/workflows/{workflow_id}/events` | List workflow events (supports `after_id`) | +| GET | `/workflows/{workflow_id}/events/stream` | SSE live event stream | +| GET | `/workflows/{workflow_id}/attempts` | List repair/execution attempts | +| GET | `/settings/providers` | List LLM providers and models | +| POST | `/settings/api-credentials` | Store encrypted API key | +| GET | `/settings/api-credentials` | List credentials (redacted) | +| DELETE | `/settings/api-credentials/{id}` | Delete credential | +| GET | `/health` | Health + DB connectivity | + +## Database Schema + +PostgreSQL tables (Phase 1): + +- `users` — authentication +- `workflows` — workflow records with status and planner output +- `tasks` — DAG task nodes (schema ready; populated in Phase 2) +- `attempts` — generation/execution attempts +- `events` — workflow event stream +- `api_credentials` — encrypted user LLM API keys + +## LLM Provider Abstraction + +Providers implement: + +- `generate()` — text completion +- `generate_structured()` — JSON output +- `estimate_cost()` — token cost estimation + +Currently supported: **OpenAI** and **Gemini**. +The workflow engine resolves providers through `get_llm_provider()` — no provider-specific code in API routes. + +Users can securely enter their own API keys (OpenAI or Gemini) directly in the frontend Settings page. The keys are encrypted at rest in the database and automatically injected into the containerized runner during execution. + +## Running Tests + +```bash +# Ensure PostgreSQL is running +docker compose up -d postgres + +# Run migrations (if not already applied) +alembic upgrade head + +# Install dependencies and run tests +pip install -r backend/requirements.txt +pytest -v +``` + +Tests use a real PostgreSQL connection and truncate tables between test cases. + +## Security Considerations + +- Passwords stored as bcrypt hashes +- API keys encrypted at rest (Fernet-derived key from `ENCRYPTION_KEY`) +- JWT authentication on all workflow endpoints +- Users cannot access other users' workflows +- Generated code execution will run only inside Docker (Phase 2+) + +## Known Limitations + +- Docker sandbox requires Docker on the host for real code execution +- LLM calls require a valid API key (OpenAI supported) +- Benchmark runner not yet implemented + +## License + +See LICENSE (to be added). diff --git a/AutoForge/backend/__init__.py b/backend/__init__.py similarity index 100% rename from AutoForge/backend/__init__.py rename to backend/__init__.py diff --git a/AutoForge/backend/agents/__init__.py b/backend/agents/__init__.py similarity index 100% rename from AutoForge/backend/agents/__init__.py rename to backend/agents/__init__.py diff --git a/AutoForge/backend/agents/code_agent.py b/backend/agents/code_agent.py similarity index 100% rename from AutoForge/backend/agents/code_agent.py rename to backend/agents/code_agent.py diff --git a/AutoForge/backend/agents/diagnosis_agent.py b/backend/agents/diagnosis_agent.py similarity index 100% rename from AutoForge/backend/agents/diagnosis_agent.py rename to backend/agents/diagnosis_agent.py diff --git a/AutoForge/backend/agents/planner.py b/backend/agents/planner.py similarity index 100% rename from AutoForge/backend/agents/planner.py rename to backend/agents/planner.py diff --git a/AutoForge/backend/agents/repair_agent.py b/backend/agents/repair_agent.py similarity index 100% rename from AutoForge/backend/agents/repair_agent.py rename to backend/agents/repair_agent.py diff --git a/AutoForge/backend/agents/task_handlers.py b/backend/agents/task_handlers.py similarity index 100% rename from AutoForge/backend/agents/task_handlers.py rename to backend/agents/task_handlers.py diff --git a/AutoForge/backend/agents/test_agent.py b/backend/agents/test_agent.py similarity index 100% rename from AutoForge/backend/agents/test_agent.py rename to backend/agents/test_agent.py diff --git a/AutoForge/backend/analysis/__init__.py b/backend/analysis/__init__.py similarity index 100% rename from AutoForge/backend/analysis/__init__.py rename to backend/analysis/__init__.py diff --git a/AutoForge/backend/analysis/static_analyzer.py b/backend/analysis/static_analyzer.py similarity index 100% rename from AutoForge/backend/analysis/static_analyzer.py rename to backend/analysis/static_analyzer.py diff --git a/AutoForge/backend/api/__init__.py b/backend/api/__init__.py similarity index 100% rename from AutoForge/backend/api/__init__.py rename to backend/api/__init__.py diff --git a/AutoForge/backend/api/auth.py b/backend/api/auth.py similarity index 100% rename from AutoForge/backend/api/auth.py rename to backend/api/auth.py diff --git a/AutoForge/backend/api/providers.py b/backend/api/providers.py similarity index 100% rename from AutoForge/backend/api/providers.py rename to backend/api/providers.py diff --git a/AutoForge/backend/api/schemas.py b/backend/api/schemas.py similarity index 100% rename from AutoForge/backend/api/schemas.py rename to backend/api/schemas.py diff --git a/AutoForge/backend/api/settings.py b/backend/api/settings.py similarity index 100% rename from AutoForge/backend/api/settings.py rename to backend/api/settings.py diff --git a/AutoForge/backend/api/workflows.py b/backend/api/workflows.py similarity index 100% rename from AutoForge/backend/api/workflows.py rename to backend/api/workflows.py diff --git a/AutoForge/backend/core/__init__.py b/backend/core/__init__.py similarity index 100% rename from AutoForge/backend/core/__init__.py rename to backend/core/__init__.py diff --git a/AutoForge/backend/core/config.py b/backend/core/config.py similarity index 100% rename from AutoForge/backend/core/config.py rename to backend/core/config.py diff --git a/AutoForge/backend/core/dependencies.py b/backend/core/dependencies.py similarity index 100% rename from AutoForge/backend/core/dependencies.py rename to backend/core/dependencies.py diff --git a/AutoForge/backend/core/encryption.py b/backend/core/encryption.py similarity index 100% rename from AutoForge/backend/core/encryption.py rename to backend/core/encryption.py diff --git a/AutoForge/backend/core/security.py b/backend/core/security.py similarity index 100% rename from AutoForge/backend/core/security.py rename to backend/core/security.py diff --git a/AutoForge/backend/db/__init__.py b/backend/db/__init__.py similarity index 100% rename from AutoForge/backend/db/__init__.py rename to backend/db/__init__.py diff --git a/AutoForge/backend/db/migrations/env.py b/backend/db/migrations/env.py similarity index 100% rename from AutoForge/backend/db/migrations/env.py rename to backend/db/migrations/env.py diff --git a/AutoForge/backend/db/migrations/versions/001_initial_schema.py b/backend/db/migrations/versions/001_initial_schema.py similarity index 100% rename from AutoForge/backend/db/migrations/versions/001_initial_schema.py rename to backend/db/migrations/versions/001_initial_schema.py diff --git a/AutoForge/backend/db/migrations/versions/__init__.py b/backend/db/migrations/versions/__init__.py similarity index 100% rename from AutoForge/backend/db/migrations/versions/__init__.py rename to backend/db/migrations/versions/__init__.py diff --git a/AutoForge/backend/db/models/__init__.py b/backend/db/models/__init__.py similarity index 100% rename from AutoForge/backend/db/models/__init__.py rename to backend/db/models/__init__.py diff --git a/AutoForge/backend/db/session.py b/backend/db/session.py similarity index 100% rename from AutoForge/backend/db/session.py rename to backend/db/session.py diff --git a/AutoForge/backend/events/__init__.py b/backend/events/__init__.py similarity index 100% rename from AutoForge/backend/events/__init__.py rename to backend/events/__init__.py diff --git a/AutoForge/backend/events/publisher.py b/backend/events/publisher.py similarity index 100% rename from AutoForge/backend/events/publisher.py rename to backend/events/publisher.py diff --git a/AutoForge/backend/execution/__init__.py b/backend/execution/__init__.py similarity index 100% rename from AutoForge/backend/execution/__init__.py rename to backend/execution/__init__.py diff --git a/AutoForge/backend/execution/docker_runner.py b/backend/execution/docker_runner.py similarity index 100% rename from AutoForge/backend/execution/docker_runner.py rename to backend/execution/docker_runner.py diff --git a/AutoForge/backend/execution/result_parser.py b/backend/execution/result_parser.py similarity index 100% rename from AutoForge/backend/execution/result_parser.py rename to backend/execution/result_parser.py diff --git a/AutoForge/backend/execution/sandbox.py b/backend/execution/sandbox.py similarity index 100% rename from AutoForge/backend/execution/sandbox.py rename to backend/execution/sandbox.py diff --git a/AutoForge/backend/execution/verification.py b/backend/execution/verification.py similarity index 100% rename from AutoForge/backend/execution/verification.py rename to backend/execution/verification.py diff --git a/AutoForge/backend/llm/__init__.py b/backend/llm/__init__.py similarity index 100% rename from AutoForge/backend/llm/__init__.py rename to backend/llm/__init__.py diff --git a/AutoForge/backend/llm/base.py b/backend/llm/base.py similarity index 100% rename from AutoForge/backend/llm/base.py rename to backend/llm/base.py diff --git a/AutoForge/backend/llm/providers/__init__.py b/backend/llm/providers/__init__.py similarity index 100% rename from AutoForge/backend/llm/providers/__init__.py rename to backend/llm/providers/__init__.py diff --git a/AutoForge/backend/llm/providers/gemini_provider.py b/backend/llm/providers/gemini_provider.py similarity index 100% rename from AutoForge/backend/llm/providers/gemini_provider.py rename to backend/llm/providers/gemini_provider.py diff --git a/AutoForge/backend/llm/providers/mock_provider.py b/backend/llm/providers/mock_provider.py similarity index 100% rename from AutoForge/backend/llm/providers/mock_provider.py rename to backend/llm/providers/mock_provider.py diff --git a/AutoForge/backend/llm/providers/openai_provider.py b/backend/llm/providers/openai_provider.py similarity index 100% rename from AutoForge/backend/llm/providers/openai_provider.py rename to backend/llm/providers/openai_provider.py diff --git a/AutoForge/backend/llm/types.py b/backend/llm/types.py similarity index 100% rename from AutoForge/backend/llm/types.py rename to backend/llm/types.py diff --git a/AutoForge/backend/main.py b/backend/main.py similarity index 100% rename from AutoForge/backend/main.py rename to backend/main.py diff --git a/AutoForge/backend/memory/__init__.py b/backend/memory/__init__.py similarity index 100% rename from AutoForge/backend/memory/__init__.py rename to backend/memory/__init__.py diff --git a/AutoForge/backend/memory/attempt_repository.py b/backend/memory/attempt_repository.py similarity index 100% rename from AutoForge/backend/memory/attempt_repository.py rename to backend/memory/attempt_repository.py diff --git a/AutoForge/backend/memory/task_repository.py b/backend/memory/task_repository.py similarity index 100% rename from AutoForge/backend/memory/task_repository.py rename to backend/memory/task_repository.py diff --git a/AutoForge/backend/memory/workflow_repository.py b/backend/memory/workflow_repository.py similarity index 100% rename from AutoForge/backend/memory/workflow_repository.py rename to backend/memory/workflow_repository.py diff --git a/AutoForge/backend/orchestration/__init__.py b/backend/orchestration/__init__.py similarity index 100% rename from AutoForge/backend/orchestration/__init__.py rename to backend/orchestration/__init__.py diff --git a/AutoForge/backend/orchestration/dag_engine.py b/backend/orchestration/dag_engine.py similarity index 100% rename from AutoForge/backend/orchestration/dag_engine.py rename to backend/orchestration/dag_engine.py diff --git a/AutoForge/backend/orchestration/dag_schema.py b/backend/orchestration/dag_schema.py similarity index 100% rename from AutoForge/backend/orchestration/dag_schema.py rename to backend/orchestration/dag_schema.py diff --git a/AutoForge/backend/orchestration/dag_validator.py b/backend/orchestration/dag_validator.py similarity index 100% rename from AutoForge/backend/orchestration/dag_validator.py rename to backend/orchestration/dag_validator.py diff --git a/AutoForge/backend/orchestration/errors.py b/backend/orchestration/errors.py similarity index 100% rename from AutoForge/backend/orchestration/errors.py rename to backend/orchestration/errors.py diff --git a/AutoForge/backend/orchestration/failure_classifier.py b/backend/orchestration/failure_classifier.py similarity index 100% rename from AutoForge/backend/orchestration/failure_classifier.py rename to backend/orchestration/failure_classifier.py diff --git a/AutoForge/backend/orchestration/recovery_runner.py b/backend/orchestration/recovery_runner.py similarity index 100% rename from AutoForge/backend/orchestration/recovery_runner.py rename to backend/orchestration/recovery_runner.py diff --git a/AutoForge/backend/orchestration/retry_manager.py b/backend/orchestration/retry_manager.py similarity index 100% rename from AutoForge/backend/orchestration/retry_manager.py rename to backend/orchestration/retry_manager.py diff --git a/AutoForge/backend/orchestration/scheduler.py b/backend/orchestration/scheduler.py similarity index 100% rename from AutoForge/backend/orchestration/scheduler.py rename to backend/orchestration/scheduler.py diff --git a/AutoForge/backend/orchestration/state_machine.py b/backend/orchestration/state_machine.py similarity index 100% rename from AutoForge/backend/orchestration/state_machine.py rename to backend/orchestration/state_machine.py diff --git a/AutoForge/backend/orchestration/task_context.py b/backend/orchestration/task_context.py similarity index 100% rename from AutoForge/backend/orchestration/task_context.py rename to backend/orchestration/task_context.py diff --git a/AutoForge/backend/orchestration/workflow_runner.py b/backend/orchestration/workflow_runner.py similarity index 100% rename from AutoForge/backend/orchestration/workflow_runner.py rename to backend/orchestration/workflow_runner.py diff --git a/AutoForge/backend/requirements.txt b/backend/requirements.txt similarity index 100% rename from AutoForge/backend/requirements.txt rename to backend/requirements.txt diff --git a/AutoForge/frontend/index.html b/frontend/index.html similarity index 100% rename from AutoForge/frontend/index.html rename to frontend/index.html diff --git a/AutoForge/frontend/package-lock.json b/frontend/package-lock.json similarity index 100% rename from AutoForge/frontend/package-lock.json rename to frontend/package-lock.json diff --git a/AutoForge/frontend/package.json b/frontend/package.json similarity index 100% rename from AutoForge/frontend/package.json rename to frontend/package.json diff --git a/AutoForge/frontend/src/App.tsx b/frontend/src/App.tsx similarity index 100% rename from AutoForge/frontend/src/App.tsx rename to frontend/src/App.tsx diff --git a/AutoForge/frontend/src/api/client.ts b/frontend/src/api/client.ts similarity index 100% rename from AutoForge/frontend/src/api/client.ts rename to frontend/src/api/client.ts diff --git a/AutoForge/frontend/src/components/AttemptsPanel.tsx b/frontend/src/components/AttemptsPanel.tsx similarity index 100% rename from AutoForge/frontend/src/components/AttemptsPanel.tsx rename to frontend/src/components/AttemptsPanel.tsx diff --git a/AutoForge/frontend/src/components/CodeViewer.tsx b/frontend/src/components/CodeViewer.tsx similarity index 100% rename from AutoForge/frontend/src/components/CodeViewer.tsx rename to frontend/src/components/CodeViewer.tsx diff --git a/AutoForge/frontend/src/components/ExecutionLogs.tsx b/frontend/src/components/ExecutionLogs.tsx similarity index 100% rename from AutoForge/frontend/src/components/ExecutionLogs.tsx rename to frontend/src/components/ExecutionLogs.tsx diff --git a/AutoForge/frontend/src/components/Layout.tsx b/frontend/src/components/Layout.tsx similarity index 100% rename from AutoForge/frontend/src/components/Layout.tsx rename to frontend/src/components/Layout.tsx diff --git a/AutoForge/frontend/src/components/TaskGraph.tsx b/frontend/src/components/TaskGraph.tsx similarity index 100% rename from AutoForge/frontend/src/components/TaskGraph.tsx rename to frontend/src/components/TaskGraph.tsx diff --git a/AutoForge/frontend/src/components/WorkflowTimeline.tsx b/frontend/src/components/WorkflowTimeline.tsx similarity index 100% rename from AutoForge/frontend/src/components/WorkflowTimeline.tsx rename to frontend/src/components/WorkflowTimeline.tsx diff --git a/AutoForge/frontend/src/context/AuthContext.tsx b/frontend/src/context/AuthContext.tsx similarity index 100% rename from AutoForge/frontend/src/context/AuthContext.tsx rename to frontend/src/context/AuthContext.tsx diff --git a/AutoForge/frontend/src/hooks/useWorkflowLive.ts b/frontend/src/hooks/useWorkflowLive.ts similarity index 100% rename from AutoForge/frontend/src/hooks/useWorkflowLive.ts rename to frontend/src/hooks/useWorkflowLive.ts diff --git a/AutoForge/frontend/src/index.css b/frontend/src/index.css similarity index 100% rename from AutoForge/frontend/src/index.css rename to frontend/src/index.css diff --git a/AutoForge/frontend/src/main.tsx b/frontend/src/main.tsx similarity index 100% rename from AutoForge/frontend/src/main.tsx rename to frontend/src/main.tsx diff --git a/AutoForge/frontend/src/pages/DashboardPage.tsx b/frontend/src/pages/DashboardPage.tsx similarity index 100% rename from AutoForge/frontend/src/pages/DashboardPage.tsx rename to frontend/src/pages/DashboardPage.tsx diff --git a/AutoForge/frontend/src/pages/LoginPage.tsx b/frontend/src/pages/LoginPage.tsx similarity index 100% rename from AutoForge/frontend/src/pages/LoginPage.tsx rename to frontend/src/pages/LoginPage.tsx diff --git a/AutoForge/frontend/src/pages/NewWorkflowPage.tsx b/frontend/src/pages/NewWorkflowPage.tsx similarity index 100% rename from AutoForge/frontend/src/pages/NewWorkflowPage.tsx rename to frontend/src/pages/NewWorkflowPage.tsx diff --git a/AutoForge/frontend/src/pages/SettingsPage.tsx b/frontend/src/pages/SettingsPage.tsx similarity index 100% rename from AutoForge/frontend/src/pages/SettingsPage.tsx rename to frontend/src/pages/SettingsPage.tsx diff --git a/AutoForge/frontend/src/pages/SignupPage.tsx b/frontend/src/pages/SignupPage.tsx similarity index 100% rename from AutoForge/frontend/src/pages/SignupPage.tsx rename to frontend/src/pages/SignupPage.tsx diff --git a/AutoForge/frontend/src/pages/WorkflowPage.tsx b/frontend/src/pages/WorkflowPage.tsx similarity index 100% rename from AutoForge/frontend/src/pages/WorkflowPage.tsx rename to frontend/src/pages/WorkflowPage.tsx diff --git a/AutoForge/frontend/src/types.ts b/frontend/src/types.ts similarity index 100% rename from AutoForge/frontend/src/types.ts rename to frontend/src/types.ts diff --git a/AutoForge/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts similarity index 100% rename from AutoForge/frontend/src/vite-env.d.ts rename to frontend/src/vite-env.d.ts diff --git a/AutoForge/frontend/tsconfig.json b/frontend/tsconfig.json similarity index 100% rename from AutoForge/frontend/tsconfig.json rename to frontend/tsconfig.json diff --git a/AutoForge/frontend/tsconfig.tsbuildinfo b/frontend/tsconfig.tsbuildinfo similarity index 100% rename from AutoForge/frontend/tsconfig.tsbuildinfo rename to frontend/tsconfig.tsbuildinfo diff --git a/AutoForge/frontend/vite.config.ts b/frontend/vite.config.ts similarity index 100% rename from AutoForge/frontend/vite.config.ts rename to frontend/vite.config.ts