Implement Phase 3: dynamic graph builder, blueprint persistence, and CRUD API

- Add dynamic_graph_builder.py that constructs LangGraph graphs at runtime
  from frontend CouncilBlueprint JSON (no more hardcoded graphs in production)
- Add PostgreSQL persistence via SQLAlchemy async with Blueprint model
- Add blueprint CRUD endpoints (POST/GET/PUT/DELETE /api/councils/)
- Add POST /api/councils/{id}/run to execute blueprints dynamically
- Add Alembic migration infrastructure with initial blueprints table
- Add database.py with async engine and SQLite fallback for dev/test
- Fix missing typing-extensions and add aiosqlite dependency
- Add 42 new tests (80/80 total passing) covering dynamic graph building,
  blueprint service CRUD, and API integration

https://claude.ai/code/session_014yZUxrPsgZbvkebXbCXR4U
This commit is contained in:
Claude 2026-02-21 10:28:27 +00:00
parent 89ba3aacd4
commit 437db4ca68
No known key found for this signature in database
16 changed files with 1698 additions and 11 deletions

View file

@ -12,6 +12,7 @@ python-multipart>=0.0.9
# Database
asyncpg>=0.29.0
aiosqlite>=0.20.0
sqlalchemy[asyncio]>=2.0.0
alembic>=1.13.0
@ -26,6 +27,7 @@ tavily-python>=0.3.0
python-dotenv>=1.0.0
pydantic>=2.0.0
pydantic-settings>=2.0.0
typing-extensions>=4.5.0
# Linting and formatting
ruff>=0.4.0