diff --git a/.gitignore b/.gitignore index 76c01ae3..2fe23ecc 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ .z3-trace .pitboss .node_modules-target +node_modules diff --git a/assets/screenshots/cli-scan.gif b/assets/screenshots/cli-scan.gif new file mode 100644 index 00000000..7d3af3ab Binary files /dev/null and b/assets/screenshots/cli-scan.gif differ diff --git a/assets/screenshots/cli-scan_raw.gif b/assets/screenshots/cli-scan_raw.gif new file mode 100644 index 00000000..12030add Binary files /dev/null and b/assets/screenshots/cli-scan_raw.gif differ diff --git a/assets/screenshots/cli-scan_raw.png b/assets/screenshots/cli-scan_raw.png new file mode 100644 index 00000000..ef68b052 Binary files /dev/null and b/assets/screenshots/cli-scan_raw.png differ diff --git a/assets/screenshots/demo.gif b/assets/screenshots/demo.gif index 0c6ea09f..90dcdaac 100644 Binary files a/assets/screenshots/demo.gif and b/assets/screenshots/demo.gif differ diff --git a/assets/screenshots/demo_raw.gif b/assets/screenshots/demo_raw.gif new file mode 100644 index 00000000..27fcfa47 Binary files /dev/null and b/assets/screenshots/demo_raw.gif differ diff --git a/assets/screenshots/docs/cli-configshow_raw.png b/assets/screenshots/docs/cli-configshow_raw.png new file mode 100644 index 00000000..e6f378ed Binary files /dev/null and b/assets/screenshots/docs/cli-configshow_raw.png differ diff --git a/assets/screenshots/docs/cli-explain-engine_raw.png b/assets/screenshots/docs/cli-explain-engine_raw.png new file mode 100644 index 00000000..13eeee69 Binary files /dev/null and b/assets/screenshots/docs/cli-explain-engine_raw.png differ diff --git a/assets/screenshots/docs/cli-failon_raw.png b/assets/screenshots/docs/cli-failon_raw.png new file mode 100644 index 00000000..ef68b052 Binary files /dev/null and b/assets/screenshots/docs/cli-failon_raw.png differ diff --git a/assets/screenshots/docs/cli-idxstatus.png b/assets/screenshots/docs/cli-idxstatus.png index a548b773..54630758 100644 Binary files a/assets/screenshots/docs/cli-idxstatus.png and b/assets/screenshots/docs/cli-idxstatus.png differ diff --git a/assets/screenshots/docs/cli-idxstatus_raw.png b/assets/screenshots/docs/cli-idxstatus_raw.png new file mode 100644 index 00000000..9dc03154 Binary files /dev/null and b/assets/screenshots/docs/cli-idxstatus_raw.png differ diff --git a/assets/screenshots/docs/serve-config.png b/assets/screenshots/docs/serve-config.png index 2ccd2447..ca68319c 100644 Binary files a/assets/screenshots/docs/serve-config.png and b/assets/screenshots/docs/serve-config.png differ diff --git a/assets/screenshots/docs/serve-config_raw.png b/assets/screenshots/docs/serve-config_raw.png new file mode 100644 index 00000000..159b00ee Binary files /dev/null and b/assets/screenshots/docs/serve-config_raw.png differ diff --git a/assets/screenshots/docs/serve-explorer.png b/assets/screenshots/docs/serve-explorer.png index 11c1d7ac..f5494b23 100644 Binary files a/assets/screenshots/docs/serve-explorer.png and b/assets/screenshots/docs/serve-explorer.png differ diff --git a/assets/screenshots/docs/serve-explorer_raw.png b/assets/screenshots/docs/serve-explorer_raw.png new file mode 100644 index 00000000..d2c6658c Binary files /dev/null and b/assets/screenshots/docs/serve-explorer_raw.png differ diff --git a/assets/screenshots/docs/serve-finding-detail.png b/assets/screenshots/docs/serve-finding-detail.png index 297f42b4..a5ca2fb1 100644 Binary files a/assets/screenshots/docs/serve-finding-detail.png and b/assets/screenshots/docs/serve-finding-detail.png differ diff --git a/assets/screenshots/docs/serve-finding-detail_raw.png b/assets/screenshots/docs/serve-finding-detail_raw.png new file mode 100644 index 00000000..c3a896db Binary files /dev/null and b/assets/screenshots/docs/serve-finding-detail_raw.png differ diff --git a/assets/screenshots/docs/serve-findings-list.png b/assets/screenshots/docs/serve-findings-list.png index 2fa5ceb1..882fdfb6 100644 Binary files a/assets/screenshots/docs/serve-findings-list.png and b/assets/screenshots/docs/serve-findings-list.png differ diff --git a/assets/screenshots/docs/serve-findings-list_raw.png b/assets/screenshots/docs/serve-findings-list_raw.png new file mode 100644 index 00000000..1c7d771a Binary files /dev/null and b/assets/screenshots/docs/serve-findings-list_raw.png differ diff --git a/assets/screenshots/docs/serve-overview.png b/assets/screenshots/docs/serve-overview.png index e978649a..7d0c161e 100644 Binary files a/assets/screenshots/docs/serve-overview.png and b/assets/screenshots/docs/serve-overview.png differ diff --git a/assets/screenshots/docs/serve-overview_raw.png b/assets/screenshots/docs/serve-overview_raw.png new file mode 100644 index 00000000..5447a5a5 Binary files /dev/null and b/assets/screenshots/docs/serve-overview_raw.png differ diff --git a/assets/screenshots/docs/serve-rules.png b/assets/screenshots/docs/serve-rules.png index 03559acd..1f32a4be 100644 Binary files a/assets/screenshots/docs/serve-rules.png and b/assets/screenshots/docs/serve-rules.png differ diff --git a/assets/screenshots/docs/serve-rules_raw.png b/assets/screenshots/docs/serve-rules_raw.png new file mode 100644 index 00000000..9f248c78 Binary files /dev/null and b/assets/screenshots/docs/serve-rules_raw.png differ diff --git a/assets/screenshots/docs/serve-scan-detail.png b/assets/screenshots/docs/serve-scan-detail.png index affb7d29..312a7f36 100644 Binary files a/assets/screenshots/docs/serve-scan-detail.png and b/assets/screenshots/docs/serve-scan-detail.png differ diff --git a/assets/screenshots/docs/serve-scan-detail_raw.png b/assets/screenshots/docs/serve-scan-detail_raw.png new file mode 100644 index 00000000..9531a857 Binary files /dev/null and b/assets/screenshots/docs/serve-scan-detail_raw.png differ diff --git a/assets/screenshots/docs/serve-scans.png b/assets/screenshots/docs/serve-scans.png index c045766d..7b73c602 100644 Binary files a/assets/screenshots/docs/serve-scans.png and b/assets/screenshots/docs/serve-scans.png differ diff --git a/assets/screenshots/docs/serve-scans_raw.png b/assets/screenshots/docs/serve-scans_raw.png new file mode 100644 index 00000000..9d48ff22 Binary files /dev/null and b/assets/screenshots/docs/serve-scans_raw.png differ diff --git a/assets/screenshots/docs/serve-triage.png b/assets/screenshots/docs/serve-triage.png index 643061fe..c40dfa8c 100644 Binary files a/assets/screenshots/docs/serve-triage.png and b/assets/screenshots/docs/serve-triage.png differ diff --git a/assets/screenshots/docs/serve-triage_raw.png b/assets/screenshots/docs/serve-triage_raw.png new file mode 100644 index 00000000..ce266957 Binary files /dev/null and b/assets/screenshots/docs/serve-triage_raw.png differ diff --git a/assets/screenshots/overview.png b/assets/screenshots/overview.png index e978649a..7d0c161e 100644 Binary files a/assets/screenshots/overview.png and b/assets/screenshots/overview.png differ diff --git a/scripts/capture-screenshots.mjs b/scripts/capture-screenshots.mjs old mode 100644 new mode 100755 index df901f48..77731cc2 --- a/scripts/capture-screenshots.mjs +++ b/scripts/capture-screenshots.mjs @@ -37,8 +37,12 @@ * node scripts/capture-screenshots.mjs --all # both, in one orchestrated run * * Output (under assets/screenshots/): - * demo.gif (~25–30s walkthrough) + * demo.gif (~25–30s serve walkthrough) + * demo_raw.gif (unframed source — saved before compositing) + * cli-scan.gif (~15s CLI scan walkthrough — requires vhs on PATH) + * cli-scan_raw.gif (unframed source) * overview.png (mirror of docs/serve-overview.png; used by README) + * *_raw.png / *_raw.gif (unframed originals for every captured asset) * docs/serve-overview.png (overview after scan #2 — trend going down) * docs/serve-findings-list.png (post-scan-#1 list with multiple highs) * docs/serve-finding-detail.png (5-hop taint flow visualizer) @@ -58,7 +62,7 @@ import { unlinkSync, writeFileSync, } from 'node:fs'; -import { join } from 'node:path'; +import { extname, join } from 'node:path'; import process from 'node:process'; const URL_BASE = process.env.NYX_URL || 'http://127.0.0.1:9876'; @@ -412,6 +416,8 @@ async function convertWebmToGif(webm, gifOut) { // the framer never resamples the captured text. const CLI_RENDERER = '/Users/elipeter/nyx/scripts/render-cli.py'; +const VHS_BIN = process.env.VHS_BIN || 'vhs'; +const CLI_GIF = join(OUT_DIR, 'cli-scan.gif'); function renderCli(shellCommand, outFile) { execFileSync( @@ -449,9 +455,46 @@ function stageDemoConfigHome() { writeFileSync(join(cfgDir, 'nyx.local'), DEMO_NYX_LOCAL); } +function captureCliGif() { + console.error('[cli-gif/setup] writing v1 demo'); + writeDemo('v1'); + + const tapePath = '/tmp/nyx-cli-scan.tape'; + const innerGif = '/tmp/nyx-cli-scan.gif'; + + // VHS tape: terminal set to exact inner dimensions so frame-screenshots.py + // fixed-mode doesn't need to resample — 1600x992 matches INNER_W x INNER_H. + const tape = [ + `Output "${innerGif}"`, + '', + 'Set Shell "bash"', + 'Set FontSize 22', + 'Set Width 1600', + 'Set Height 992', + 'Set Framerate 15', + 'Env CLICOLOR_FORCE "1"', + '', + 'Sleep 500ms', + `Type "${NYX_BIN} scan ${SCAN_ROOT}"`, + 'Sleep 300ms', + 'Enter', + 'Sleep 12s', + 'Sleep 3s', + ].join('\n'); + + writeFileSync(tapePath, tape); + console.error('[cli-gif] recording with vhs'); + execFileSync(VHS_BIN, [tapePath], { stdio: 'inherit' }); + copyFileSync(innerGif, CLI_GIF); + console.error(`[cli-gif] wrote ${CLI_GIF}`); +} + function captureCli() { - // Re-stage v1 so cli-scan output shows the richer set of findings - // (the previous --stills phase patched the demo to v2). + captureCliGif(); + + // Re-stage v1 so static cli-scan output shows the richer set of findings + // (captureCliGif already wrote v1; this is a safety re-stage in case + // the previous --stills phase patched the demo to v2). console.error('[cli/setup] writing v1 demo'); writeDemo('v1'); @@ -514,12 +557,23 @@ const CLI_PNGS = [ 'docs/cli-configshow.png', ]; +function saveRawCopies(paths) { + for (const p of paths) { + if (!existsSync(p)) continue; + const ext = extname(p); + const rawPath = p.slice(0, p.length - ext.length) + '_raw' + ext; + copyFileSync(p, rawPath); + console.error(`[raw] ${rawPath}`); + } +} + function applyFrames(captured, { natural = false } = {}) { // Frame only paths captured this run. Re-framing a previously- // framed PNG would treat the framed result as the next inner // content and produce a frame inside a frame. const paths = captured.filter((p) => existsSync(p)); if (paths.length === 0) return; + saveRawCopies(paths); const label = natural ? 'natural-size' : 'fixed'; console.error(`[frame] applying purple gradient frame (${label}) to ${paths.length} files`); const args = natural ? ['--natural', ...paths] : paths; @@ -623,6 +677,7 @@ async function main() { const fixed = []; if (wantStills) fixed.push(...STILLS_PNGS.map((p) => join(OUT_DIR, p))); if (wantGif) fixed.push(join(OUT_DIR, 'demo.gif')); + if (wantCli) fixed.push(CLI_GIF); if (fixed.length) applyFrames(fixed, { natural: false }); if (wantCli) {