Implements build_app() with REST endpoints (/api/state, /api/games,
/api/settings, /api/new-game, /api/agent-binding), WebSocket /ws for
realtime events, and custom JSON-RPC MCP transport at /mcp/{side}
supporting initialize, tools/list, and tools/call with proper
content-wrapping and isError flag. Static UI mount guarded by
PUBLIC_DIR existence check. All 5 e2e tests pass.
16 lines
277 B
Python
16 lines
277 B
Python
from __future__ import annotations
|
|
|
|
import uvicorn
|
|
|
|
from ai_chess.app import build_app
|
|
from ai_chess.state import state
|
|
|
|
|
|
def main() -> None:
|
|
app = build_app(state)
|
|
uvicorn.run(app, host="127.0.0.1", port=7833, log_level="info")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|