Implement Phase 4: tools, God Mode, and missing features
Backend: - Add Tavily web search tool wrapper (tools/web_search.py) - Add PDF reader + ChromaDB vector store tool (tools/pdf_reader.py) - Bind tools to LLM calls via .bind_tools() in dynamic_graph_builder - Implement God Mode using LangGraph interrupt_before + MemorySaver - Add approve/reject/modify API endpoints for God Mode - Add PDF upload endpoint with ingestion pipeline - Add persistent run history (CouncilRun model + run_service + API) - Add Alembic migration for council_runs table - Enhance WebSocket to emit run_paused and run_resumed events - Add tests for tools, God Mode, and run history Frontend: - Add God Mode approval UI (GodModePanel component) - Add Auto-Pilot / God Mode toggle in Konferenzzimmer - Add functional PDF upload handler - Add Conditional Edge editor (EdgeSettingsPanel component) - Add edge click selection in ArchitectCanvas - Update Zustand store with edge selection and update actions - Update types for God Mode, execution modes, and WS events - Update API client with God Mode, PDF upload, and blueprint run endpoints - Update WebSocket hook for paused/resumed events - Add Vitest config and frontend tests (store, parser, types, API) https://claude.ai/code/session_017U6idFgaqnYTXzPxA7mxMv
This commit is contained in:
parent
c6d0c4a636
commit
001649a364
31 changed files with 2502 additions and 81 deletions
|
|
@ -5,16 +5,21 @@ Start the server:
|
|||
uvicorn main:app --reload --port 8000
|
||||
|
||||
API Overview:
|
||||
POST /api/councils/ — Create a blueprint
|
||||
GET /api/councils/ — List all blueprints
|
||||
GET /api/councils/{id} — Get specific blueprint
|
||||
PUT /api/councils/{id} — Update a blueprint
|
||||
DELETE /api/councils/{id} — Delete a blueprint
|
||||
POST /api/councils/run — Start a run (Phase 1 hard-coded graph)
|
||||
POST /api/councils/{id}/run — Start a run from a blueprint (Phase 3)
|
||||
GET /api/councils/run/{run_id} — Poll run status/result
|
||||
GET /api/health — Health check
|
||||
WS /ws/council/{run_id} — Real-time agent status events
|
||||
POST /api/councils/ — Create a blueprint
|
||||
GET /api/councils/ — List all blueprints
|
||||
GET /api/councils/{id} — Get specific blueprint
|
||||
PUT /api/councils/{id} — Update a blueprint
|
||||
DELETE /api/councils/{id} — Delete a blueprint
|
||||
POST /api/councils/run — Start a run (Phase 1)
|
||||
POST /api/councils/{id}/run — Start a run from a blueprint
|
||||
GET /api/councils/run/{run_id} — Poll run status/result
|
||||
POST /api/councils/run/{run_id}/approve — God Mode: approve/reject/modify
|
||||
GET /api/councils/run/{run_id}/state — God Mode: paused state
|
||||
POST /api/councils/upload-pdf — Upload PDF for ingestion
|
||||
GET /api/runs/ — List run history
|
||||
GET /api/runs/{run_id} — Get historical run detail
|
||||
GET /api/health — Health check
|
||||
WS /ws/council/{run_id} — Real-time agent status events
|
||||
"""
|
||||
|
||||
from contextlib import asynccontextmanager
|
||||
|
|
@ -23,6 +28,7 @@ from fastapi.middleware.cors import CORSMiddleware
|
|||
|
||||
from api.routes import router
|
||||
from api.blueprint_routes import blueprint_router
|
||||
from api.run_history_routes import run_history_router
|
||||
from api.websocket import ws_router
|
||||
from database import init_db, close_db
|
||||
|
||||
|
|
@ -45,7 +51,7 @@ app = FastAPI(
|
|||
"Orchestrates LangGraph council runs and streams real-time agent "
|
||||
"status via WebSockets."
|
||||
),
|
||||
version="0.2.0",
|
||||
version="0.3.0",
|
||||
lifespan=lifespan,
|
||||
)
|
||||
|
||||
|
|
@ -61,6 +67,7 @@ app.add_middleware(
|
|||
# Mount REST routes under /api prefix
|
||||
app.include_router(router, prefix="/api")
|
||||
app.include_router(blueprint_router, prefix="/api")
|
||||
app.include_router(run_history_router, prefix="/api")
|
||||
|
||||
# Mount WebSocket routes (no prefix — path is /ws/council/{run_id})
|
||||
app.include_router(ws_router)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue