Add web management front end (served by the supervisor)

Single-page UI styled after simplex-manager/web/index.html (palette, header,
section-tabs, cards). Talks to the supervisor over REST (control) + WebSocket
(/events live stream):
- Profiles tab: create cli/directory/broadcast, list with status, stop
- Console tab: send raw chat commands to a cli profile, see the response
- Events tab: live event feed from all profiles

server.py serves webui/index.html at /. Validated end to end with curl:
GET / , GET /profiles, start-cli, cmd /user (activeUser), stop.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jon
2026-06-04 12:45:49 +01:00
parent 38ff96c576
commit d6041c1048
2 changed files with 308 additions and 1 deletions

View File

@@ -9,15 +9,23 @@ This process sits between the website and the SimpleX binaries; it is the only
thing that touches the binaries. Run: uvicorn supervisor.server:app
"""
import asyncio
import contextlib
from pathlib import Path
from fastapi import FastAPI, WebSocket, WebSocketDisconnect
from fastapi.responses import FileResponse
from .supervisor import Supervisor
app = FastAPI(title="SimpleX Orchestrate")
WEBUI = Path(__file__).resolve().parent.parent / "webui" / "index.html"
@app.get("/")
async def index() -> FileResponse:
return FileResponse(WEBUI)
_browser_clients: set[WebSocket] = set()