forked from cleveragents/cleveragents-core
e13308b322
Implement the server application module (ADR-048) with: - FastAPI application factory (app.py) exposing the A2A JSON-RPC 2.0 endpoint as the sole client-facing interface. Routes: POST /a2a (JSON-RPC dispatch), GET /.well-known/agent.json (Agent Card), and GET /health (container orchestration). - RemoteGraph adapter (remote_graph.py) for invoking actor graphs via LangGraph Platform. Each actor graph deploys as a separate RemoteGraph enabling independent scaling. Includes health tracking, invocation counting, and a RemoteGraphRegistry for managing multiple graph deployments. - Database configuration (database.py) supporting PostgreSQL for production and SQLite for development. Config-driven via CLEVERAGENTS_DATABASE_URL and CLEVERAGENTS_SERVER_ENV environment variables with validated Pydantic settings model. - Docker deployment (docker/Dockerfile + docker-compose.yml) with multi-stage build, non-root user, health checks, and PostgreSQL service. - FastAPI dependency added to pyproject.toml. - 26 Behave BDD scenarios covering app factory, A2A dispatch, Agent Card, health endpoint, RemoteGraph config/adapter/registry, and database configuration. - 10 Robot Framework integration tests with helper script verifying end-to-end server functionality. ISSUES CLOSED: #693