feat: add authenticated artifact streaming and UI visual previews

This commit is contained in:
Space-Banane
2026-05-27 17:50:21 +02:00
parent 10355bf11a
commit 8fe6ad2d75
6 changed files with 184 additions and 57 deletions

View File

@@ -191,6 +191,13 @@ class JobManager:
def on_event(event: dict[str, Any]) -> None:
self._publish(job_id, event)
if event.get("event_type") == "job_started":
run_id = str(((event.get("payload") or {}).get("run_id") or "")).strip()
if run_id:
self.db.update_job(
job_id,
artifacts_dir=str((self.config.runs_dir / f"run_{run_id}").resolve()),
)
if event.get("event_type") == "usage_update":
usage = (event.get("payload") or {}).get("usage") or {}
self.db.update_job(