realism-bench 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +75 -2
  2. package/bin/realism-bench.js +76 -0
  3. package/package.json +34 -4
  4. package/tasks/_starter-scene/index.html +27 -0
  5. package/tasks/_starter-scene/package-lock.json +844 -0
  6. package/tasks/_starter-scene/package.json +16 -0
  7. package/tasks/_starter-scene/rail.json +19 -0
  8. package/tasks/_starter-scene/realism.json +7 -0
  9. package/tasks/_starter-scene/serve.mjs +45 -0
  10. package/tasks/_starter-scene/src/main.js +116 -0
  11. package/tasks/_starter-scene/src/realism/contract.js +240 -0
  12. package/tasks/_starter-scene/src/realism/prng.js +18 -0
  13. package/tasks/_starter-scene/src/realism/rail.js +76 -0
  14. package/tasks/_starter-scene/vite.config.js +12 -0
  15. package/tasks/dusk-regatta/PROMPT.md +20 -0
  16. package/tasks/dusk-regatta/rail.json +6600 -0
  17. package/tasks/dusk-regatta/rubric.md +7 -0
  18. package/tasks/dusk-regatta/task.json +36 -0
  19. package/tasks/last-call/PROMPT.md +31 -0
  20. package/tasks/last-call/rail.json +21774 -0
  21. package/tasks/last-call/rubric.md +7 -0
  22. package/tasks/last-call/task.json +42 -0
  23. package/tasks/r-glass-counter/PROMPT.md +19 -0
  24. package/tasks/r-glass-counter/rail.json +6096 -0
  25. package/tasks/r-glass-counter/rubric.md +7 -0
  26. package/tasks/r-glass-counter/task.json +42 -0
  27. package/tasks/r-rain-window/PROMPT.md +23 -0
  28. package/tasks/r-rain-window/rail.json +6096 -0
  29. package/tasks/r-rain-window/rubric.md +7 -0
  30. package/tasks/r-rain-window/task.json +42 -0
  31. package/tasks/r-wet-lot/PROMPT.md +18 -0
  32. package/tasks/r-wet-lot/rail.json +6083 -0
  33. package/tasks/r-wet-lot/rubric.md +7 -0
  34. package/tasks/r-wet-lot/task.json +41 -0
package/README.md CHANGED
@@ -1,3 +1,76 @@
1
- # Temporary Holding Version
1
+ # Realism-Bench v1.0
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **Zero-Asset Procedural Reality Benchmark for AI Coding Agents.**
4
+
5
+ Can an AI coding agent (`harness + model + effort`) write pure procedural WebGL2/WebGPU graphics code (pinned `three@0.187.0` + custom GLSL/WGSL) that a human cannot distinguish from **real camera footage** — with zero generative images, zero external textures, zero downloaded 3D meshes, zero fonts, and verified causal physics?
6
+
7
+ Real camera takes compete in the same blind arena, encoded through the exact same BT.709 H.264 pipeline.
8
+
9
+ ---
10
+
11
+ ## Quick Start
12
+
13
+ ```bash
14
+ # Zero-install via npm (prebuilt native Go binary for Linux & macOS)
15
+ npx realism-bench
16
+ ```
17
+
18
+ Or build from source:
19
+
20
+ ```bash
21
+ cd web && npm install && npm run build && cd ..
22
+ go build -o bin/realism-bench ./cmd/realism-bench
23
+ ./bin/realism-bench
24
+ ```
25
+
26
+ ---
27
+
28
+ ## v1.0 Scene Ladder (Immutable Suite `1.0`)
29
+
30
+ | Tier | Scene ID | Duration / FPS | Focus |
31
+ |---|---|---|---|
32
+ | **Tier R · Reality-Anchored** | `r-rain-window` | 10s @ 30fps | Gravity-driven raindrops, red `OPEN` `'E'` reflection, optical rack focus |
33
+ | **Tier R · Reality-Anchored** | `r-glass-counter` | 10s @ 30fps | Macro brushed steel, double-refraction whiskey + melting ice, steam, wicking napkin |
34
+ | **Tier R · Reality-Anchored** | `r-wet-lot` | 10s @ 30fps | Midnight rain lot, thin-film oil puddles, volumetric headlights, exhaust |
35
+ | **Tier C · Cinema** | `dusk-regatta` | 16s @ 24fps | Chase-boat telephoto sloop crossing an arriving golden-dusk squall line |
36
+ | **Tier C · Cinema (Boss)** | `last-call` | 45s @ 24fps | Unbroken 3-act diner-to-lot oner ending on rusted bicycle + drenched pelican |
37
+
38
+ ---
39
+
40
+ ## CLI Commands
41
+
42
+ ```bash
43
+ # Interactive wizard (pick v1.0 scene -> detected harness -> model/effort -> run live)
44
+ realism-bench
45
+
46
+ # Authoring tools for coding agents inside any scene workspace
47
+ realism-bench shot --t 5.0 --offrail left # render single PNG + console/shader telemetry
48
+ realism-bench check # run full Zero-Asset + tile determinism + counterfactual gate
49
+
50
+ # Run non-interactively (stages pinned three@0.187.0 starter + rail.json in ~/.realism-bench/runs/)
51
+ realism-bench run r-rain-window --harness agy --model gemini-3-pro --effort high --yolo
52
+ realism-bench run last-call --harness custom --cmd 'my-agent --prompt {prompt}'
53
+
54
+ # Re-evaluate, capture deterministic frame-by-frame BT.709 showcase.mp4 + segments + separate FPS pass
55
+ realism-bench eval <run-id>
56
+
57
+ # Launch local Reality Test (/), Blind A/B Arena (/arena), Leaderboard (/leaderboard), Protocol (/methodology)
58
+ realism-bench view
59
+
60
+ # Submit evaluated run + media to Realism-Bench server
61
+ realism-bench login --user <handle> --cloud https://realism.automagik.si
62
+ realism-bench submit <run-id>
63
+
64
+ # Host the public/private Realism-Bench server (exact same binary & embedded React UI)
65
+ realism-bench serve --addr 0.0.0.0:8080 --token "$REALISM_BENCH_SUBMIT_TOKEN"
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Core Protocol Guarantees
71
+
72
+ 1. **Zero-Asset Allowlist:** Only `three@0.187.0` at runtime; asset-embedding addons (`SMAAPass`, `SMAANode`, `Bayer`, `loaders/`, `objects/`) are explicitly banned; strict literal budgets on opaque strings & numeric arrays; runtime JS & CDP network hooks fail on any image/font/media decode or non-loopback network fetch.
73
+ 2. **Locked Camera Rail + 4-Probe Tile Determinism:** Every scene ships a dense 1-key-per-frame `rail.json` verified against `40×40` tile MAE across forward/reverse seek order, fresh reload, hidden eval seed sensitivity, and live-vs-seek parity.
74
+ 3. **Counterfactual Causality & 4-Angle Off-Rail Proof:** Scenes must respond causally to `openSignE` interventions (`1 → 0`) and pass mandatory `setCamera()` captures from `left`, `right`, `high`, and `reverse` at every checkpoint.
75
+ 4. **Hardware-Fair Capture vs Real-Time Badge:** `showcase.mp4` and Arena segments are captured frame-by-frame via deterministic `seek(i / fps)` into identical BT.709 H.264 (`crf 16`, muted) so slow GPUs or offline path-tracers can compete fairly on visual realism. Uncapped wall-clock FPS is measured in a separate pass on verified hardware GPU (voided on SwiftShader/llvmpipe) and shown as an independent `Real-Time ✓` vs `Offline` badge.
76
+ 5. **Immutable Suite Versioning:** Every run, vote, and leaderboard row is stamped with `(suite_version, task_version, protocol_version)` so future `v2.0+` scenes never mutate `v1.0` results.
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+
4
+ const { spawn } = require("child_process");
5
+ const fs = require("fs");
6
+ const path = require("path");
7
+
8
+ const PLATFORM_PACKAGES = {
9
+ "linux-x64": "realism-bench-linux-x64",
10
+ "linux-arm64": "realism-bench-linux-arm64",
11
+ "darwin-arm64": "realism-bench-darwin-arm64",
12
+ "darwin-x64": "realism-bench-darwin-x64",
13
+ };
14
+
15
+ function resolveBinary() {
16
+ if (process.env.REALISM_BENCH_BINARY_PATH) {
17
+ return process.env.REALISM_BENCH_BINARY_PATH;
18
+ }
19
+
20
+ const key = `${process.platform}-${process.arch}`;
21
+ const pkg = PLATFORM_PACKAGES[key];
22
+ if (!pkg) {
23
+ console.error(
24
+ `realism-bench: unsupported platform ${key}.\n` +
25
+ `Supported platforms: ${Object.keys(PLATFORM_PACKAGES).join(", ")}.\n` +
26
+ `You can still build from source with Go: go build -o bin/realism-bench ./cmd/realism-bench`
27
+ );
28
+ process.exit(1);
29
+ }
30
+
31
+ try {
32
+ return require.resolve(`${pkg}/bin/realism-bench`);
33
+ } catch (err) {
34
+ console.error(
35
+ `realism-bench: could not locate native binary package "${pkg}" for ${key}.\n` +
36
+ `If you installed with --no-optional, reinstall with optional dependencies enabled.\n` +
37
+ `Details: ${err.message}`
38
+ );
39
+ process.exit(1);
40
+ }
41
+ }
42
+
43
+ const binPath = resolveBinary();
44
+ const env = { ...process.env };
45
+
46
+ if (!env.REALISM_BENCH_TASKS_DIR) {
47
+ const bundledTasks = path.join(__dirname, "..", "tasks");
48
+ if (fs.existsSync(bundledTasks)) {
49
+ env.REALISM_BENCH_TASKS_DIR = bundledTasks;
50
+ }
51
+ }
52
+
53
+ const child = spawn(binPath, process.argv.slice(2), {
54
+ stdio: "inherit",
55
+ env,
56
+ });
57
+
58
+ process.on("SIGINT", () => {});
59
+ process.on("SIGTERM", () => {
60
+ if (!child.killed) {
61
+ child.kill("SIGTERM");
62
+ }
63
+ });
64
+
65
+ child.on("error", (err) => {
66
+ console.error(`realism-bench: failed to launch ${binPath}: ${err.message}`);
67
+ process.exit(1);
68
+ });
69
+
70
+ child.on("exit", (code, signal) => {
71
+ if (signal) {
72
+ const sigNum = { SIGHUP: 1, SIGINT: 2, SIGQUIT: 3, SIGTERM: 15 }[signal] || 1;
73
+ process.exit(128 + sigNum);
74
+ }
75
+ process.exit(code ?? 0);
76
+ });
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "realism-bench",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Realism-Bench v1.0 — Zero-Asset Procedural Reality Benchmark CLI, Anti-Cheat Gate, and Blind Reality Test Arena.",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "realism-bench": "bin/realism-bench.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "tasks/",
12
+ "README.md"
13
+ ],
14
+ "keywords": [
15
+ "benchmark",
16
+ "realism",
17
+ "procedural-graphics",
18
+ "threejs",
19
+ "webgl",
20
+ "webgpu",
21
+ "ai",
22
+ "coding-agents",
23
+ "eval",
24
+ "arena",
25
+ "cli"
26
+ ],
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
30
+ "optionalDependencies": {
31
+ "realism-bench-linux-x64": "1.0.0",
32
+ "realism-bench-linux-arm64": "1.0.0",
33
+ "realism-bench-darwin-arm64": "1.0.0",
34
+ "realism-bench-darwin-x64": "1.0.0"
35
+ }
36
+ }
@@ -0,0 +1,27 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Realism-Bench Scene</title>
7
+ <style>
8
+ html, body {
9
+ margin: 0;
10
+ padding: 0;
11
+ width: 100%;
12
+ height: 100%;
13
+ overflow: hidden;
14
+ background: #000;
15
+ }
16
+ canvas {
17
+ display: block;
18
+ width: 100vw;
19
+ height: 100vh;
20
+ }
21
+ </style>
22
+ </head>
23
+ <body>
24
+ <canvas id="scene"></canvas>
25
+ <script type="module" src="./src/main.js"></script>
26
+ </body>
27
+ </html>