A local-only web app that archives accepted Gray Swan Arena submission exports.
Drop any mix of .json and .zip files; the vault parses, dedupes and sorts
them into Competition → Wave → Scenario → Model, shows each accepted payload
next to the benign task the agent was given, and exports either a black/red PDF
report or a re-importable JSON bundle.
Payloads are bounty-confidential. Nothing leaves the browser — see
NETWORK.md, which is verified by an automated check rather than
just asserted here.
npm install
npm run dev # http://localhost:5173
To build and serve the static SPA:
npm run build
npm run preview # http://localhost:4173
The build in build/ is plain static files — host it anywhere, or open it
through any local static server.
npm test # 141 unit tests: parser, zip, stats, charts, bundle, PDF
npm run check # svelte-check, TypeScript strict
npm run smoke # 53 end-to-end checks in a real browser
npm test covers everything that can be checked without a browser, including
real PDF generation against the fixture.
npm run smoke needs npm run preview running in another terminal. It drives
headless Edge or Chrome over the DevTools protocol: it feedsfixtures/*.json into the app's actual file input, then verifies the dashboard,
the detail views, dedupe, IndexedDB persistence across a reload, the JSON
round-trip, the PDF (including that it rendered in the Web Worker), and that the
app issues no network requests after load. Override the browser withBROWSER=/path/to/chrome.
src/
lib/
config.ts every tunable pattern: wave regex, slot separator,
prose fields, placeholder pattern, dedupe key
profile.ts researcher profile for the PDF cover, photo encoding
competitions.ts competition list, creating one, moving a wave (pure)
types.ts Submission, PayloadSlot, VaultBundle, ...
parse/
detect.ts arena-submission | vault-bundle | unknown
slots.ts title -> injection slots, prose extraction
arenaChat.ts raw export -> Submission
zip.ts recursive unzip -> JSON documents
import.ts dedupe + bundle expansion (pure)
store/
persist.ts IndexedDB via idb-keyval
vault.svelte.ts reactive vault, re-derived from raw
ui.svelte.ts filter, overlays, toasts
stats.ts tree, counts, matrix, filtering
charts/
svg.ts hand-written SVG builders (UI + PDF)
Bar / Heatmap / Timeline.svelte
export/
bundle.ts gsa-vault/1 export/import
pdfDoc.ts pdfmake document definition (pure, testable)
pdfRender.ts two-pass render driver
pdf.worker.ts runs it off the main thread
pdf.ts public entry, worker + main-thread fallback
fonts.generated.ts embedded JetBrains Mono (npm run fonts)
routes/
+page.svelte dashboard + submission list
s/[id]/+page.svelte submission detail
scripts/
build-fonts.mjs TTF -> base64 module, with a glyph-coverage check
smoke.mjs browser end-to-end checks
fixtures/
submission-ipi-black-2026-*.json
Everything is re-derived from raw. A submission's stored form is only the
verbatim export plus the fields a user can set (sourceFile,importedAt, an optional assigned competition, plus the wave overrides and
competition renames keyed separately). Both IndexedDB and the JSON bundle store
exactly that shape, so a reload, a bundle re-import and a parser improvement all
flow through one code path and cannot disagree.
Nothing reactive may cross a clone boundary. Both postMessage (to the PDF
worker) and IDBObjectStore.put run the structured-clone algorithm, which
throws DataCloneError on Svelte's $state proxies — quietly, in the IndexedDB
case, because the in-memory value is already right and only a reload reveals the
loss. The store funnels every write through snapshot() ($state.snapshot), andexport/pdf.ts rebuilds its input as plain data. Two browser checks guard this:
profile and rename survive a reload, and nothing failed to persist.
The PDF is laid out twice. pdfmake renders headers and footers before it
reports which pages each node ended up on, so a single pass cannot label a page
with the competition it belongs to. The first pass runs with the charts blanked
(same dimensions, far cheaper) purely to collect that mapping; the second uses
it for the per-page footer and the (cont.) header on pages that continue a
group.
src/lib/export/fonts.generated.ts is committed. Rebuild it after changing the
font source:
npm run fonts
It verifies that every glyph the report needs (· — → × … curly
quotes) exists in both faces and fails loudly otherwise.
Each of these is a deliberate decision, not an oversight.
kind is not just arena-chat. The fixture iskind: "arena-submission". Both are accepted, plus a lenient shape match (amessages array) so a slightly-off export is archivedfixtures/ (it names WB2S1 / "Emerald Grasshopper Ultra" / slots 1 and 5).WB2S4 / "Cancel TargetB2, eight slots with 1 and 4 filled.\{\{[a-z_.]+\}\} misses the fixture's own {{wb2s4_target_order}}.createdAt has a fallback chain. arena-submission exports have nocreatedAt, so it falls back to submittedAt, then the first messageexportedAt — otherwise the timeline and sort order break.status and judge are preserved in raw but never shown or counted.Printer.resolveUrls rewrites every descriptor value as a URL) and<text>; the alternative was chart labels silently vanishing.store/vault.svelte.ts, not store/vault.ts. Svelte 5.svelte.ts extension.waveOverrides in the PRD's own data model, so a per-submission override hasGSA VAULT · <competition> · page n/N) only makes sense if pages belong tobrowse open the same2/8 SLOTS USED) and aheaderRows: 1 is also how the PRD's packing rule isAsked for after the fact, so the PRD says nothing about them.
Indirect Prompt Injection - Black.pdf) — and the scenario table moved toprofile button and stored locally: the vault makes nointo picker sets the activechallenge in the file), the home pageall · file by challenge is thefilter.competition, so theclear all keeps it,new competition… (in the picker, or at the foot of the sidebar) creates acustom- slugmove button. The sidebar always listspdf and json open a dialogevery competition, and — when a wave,filtered / all toggle.gsa-vault/1 gained four optional fields — competitionNames,profile, competitions (empty competitions, carried by a whole-vaultcompetition. All optional, so a bundle written