"""HTML / CSS / JS blob for the 4-panel live dashboard embedded in the Gradio Space. Kept out of ``app.py`` so the Python file stays focused on the Gradio wiring. The panels are driven from four hidden ``gr.JSON`` components (one per panel) whose values mutate as Python generators yield. JavaScript polls the JSON state in the DOM via a ``MutationObserver`` and re-renders each panel from the delta. Every selector here is namespaced under ``#gf-dashboard`` so the paste of ``dashboard/style.css`` cannot clobber Gradio's own styling. """ from __future__ import annotations DASHBOARD_HTML = r"""

Live pipeline

4 panels · real-time

Streaming tokens with probe risk · repo scan progress · ranked leads · hand-off to pwnkit. Every panel is backed by real data from this Space.

probe stream idle scan idle pwnkit idle

Live token stream Gemma 4 · linear probe layer 17

Type a prompt above and click Generate with probe. Tokens stream here, colored by per-token probe risk (safe · elevated · high).
0
tokens
0%
peak
0%
mean
0%
max-pool
top cwe

Repo scan gemmaforge.events/v1

0
files
0
chunks
0
leads
0s
elapsed
Run a scan above — per-file progress streams here.

Top leads rolling, sorted by confidence

#confcwefile:linespreview
No leads yet.

Pwnkit hand-off downstream agent, live stderr

0
leads queued
0
tool calls
0
findings
Run the Tier 2 pwnkit accordion below to populate this panel.
Each line above is a real pwnkit stderr line parsed live. save_finding rows are green.
""" def initial_stream_state() -> dict: return { "active": False, "reset": True, "seq": 0, "tokens": [], "stats": {"n": 0, "peak": 0.0, "mean": 0.0, "maxpool": 0.0, "top_cwe": None}, } def initial_scan_state() -> dict: return { "active": False, "counters": {"files": 0, "chunks": 0, "leads": 0, "elapsed": 0.0}, "file_order": [], "files": {}, "leads": [], } def initial_pwnkit_state() -> dict: return { "active": False, "reset": True, "counts": {"queued": 0, "tools": 0, "findings": 0}, "log": [], }