api/
FastAPI backend. Serves the built React bundle at / and the Marimo notebook at /notebook (when installed). All routers mounted under /api/*, plus a WebSocket at /ws/tasks/{task_id}.
Routers
Prefix |
Responsibility |
|---|---|
|
Scan, list protocols, list phases. |
|
Run, consensus, verify-key, auto-export. |
|
Hex, entropy, strings, structure overlay, VAS, module / process / connection / handle tables. |
|
|
|
Background-task status + cancellation. |
|
Multipart upload → MSL convert. |
|
File-browser — detects single-file / run-dir / dataset mode. |
|
Structure library + Kaitai import/export. |
|
Static check, pattern generate, export (YARA / JSON / Vol3). |
|
Incremental Welford consensus sessions. |
|
BYO-oracle registry (gated by |
|
Phase-25 pipeline orchestration. |
|
WebSocket progress stream (ring buffer + HTTP fallback). |
|
HTTP backfill endpoint registered by the same WS router; returns buffered events when the WebSocket ring has rolled past a client’s last-seen sequence. |
|
Top-level status probe reporting whether the Marimo notebook mount at |
Progress bus
Background tasks run in a shared ProcessPoolExecutor with an asyncio.Semaphore(1) gating outer runs. Progress events (stage_start, progress, stage_end, funnel, nsweep_point, oracle_tick, oracle_hit, artifact, done, error) flow through a ProgressBus with per-task 512-event ring buffers.
Persistence
Task records are atomically persisted to <task_root>/<id>/record.json; orphan RUNNING records are reset to FAILED on app restart.
Middleware
CORS —
CORSMiddlewarewithallow_origins=settings.cors_origins(default["http://localhost:5173"]).GZip —
GZipMiddlewarewithminimum_size=1000.No authentication; MemDiver is local-only.
OpenAPI
/docs (Swagger), /redoc (ReDoc), /openapi.json.