feat(activity): shared session job registry with the scan as its first kind

The output scan now runs as the first kind of an in-memory JobRegistry
(py/api/jobs.py, replacing py/api/scan_job.py). Each job keeps exact
counters, at most 200 outcome rows per group and a log capped at 2,000
lines, with root-relative paths and public root labels only. New routes
list, inspect, follow (SSE) and cancel jobs and start the scan
(POST /prompt_manager/jobs/scan, 409 busy while another record-changing
job runs). The legacy /prompt_manager/scan routes attach to the same job
and stream unchanged payloads.
This commit is contained in:
Vito Sansevero
2026-10-21 07:13:44 -07:00
parent 762669758b
commit 89f3fa8aae
10 changed files with 1280 additions and 205 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
/**
* State of the output-image scan as seen by the dashboard.
*
* The scan runs on the server as a background job (see py/api/scan_job.py) and
* The scan runs on the server as a background job (see py/api/jobs.py) and
* reports progress over SSE. This module turns those events into a small
* immutable state object and answers the UI questions that depend on it:
* what dismissing the modal should do, what the minimized pill should say, and