nullius-eval 0.1.0__py3-none-any.whl

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 (291) hide show
  1. _nullius_app/.env.example +55 -0
  2. _nullius_app/app.py +96 -0
  3. _nullius_app/requirements.txt +1 -0
  4. _nullius_app/static/brand/README.md +20 -0
  5. _nullius_app/static/brand/docker.svg +1 -0
  6. _nullius_app/static/brand/favicon.svg +1 -0
  7. _nullius_app/static/brand/huggingface.svg +37 -0
  8. _nullius_app/static/brand/mark-dark.svg +1 -0
  9. _nullius_app/static/brand/marks.svg +34 -0
  10. _nullius_app/static/brand/tokens.json +51 -0
  11. _nullius_app/static/brand/typesafe.png +0 -0
  12. _nullius_app/static/brand/wordmark-dark.svg +1 -0
  13. _nullius_app/static/builder/command-builder-core.js +763 -0
  14. _nullius_app/static/builder/command-builder.css +248 -0
  15. _nullius_app/static/builder/command-builder.js +997 -0
  16. _nullius_app/static/builder/model-picker.js +113 -0
  17. _nullius_app/static/catalogue/add.js +46 -0
  18. _nullius_app/static/catalogue/agents/README.md +19 -0
  19. _nullius_app/static/catalogue/agents/goose.svg +1 -0
  20. _nullius_app/static/catalogue/agents/jiuwenswarm.svg +33 -0
  21. _nullius_app/static/catalogue/agents/marks.json +8 -0
  22. _nullius_app/static/catalogue/agents/mini-swe-agent.svg +7 -0
  23. _nullius_app/static/catalogue/agents/opencode.svg +7 -0
  24. _nullius_app/static/catalogue/catalogue.css +436 -0
  25. _nullius_app/static/catalogue/catalogue.js +87 -0
  26. _nullius_app/static/catalogue/marks.svg +29 -0
  27. _nullius_app/static/catalogue/new.js +78 -0
  28. _nullius_app/static/catalogue/versions.js +27 -0
  29. _nullius_app/static/compare/comparison.css +117 -0
  30. _nullius_app/static/controls.js +117 -0
  31. _nullius_app/static/disclosures.js +70 -0
  32. _nullius_app/static/fonts/0569c822cab6c510.ttf +0 -0
  33. _nullius_app/static/fonts/DMSans-Medium.woff2 +0 -0
  34. _nullius_app/static/fonts/DMSans-Regular.woff2 +0 -0
  35. _nullius_app/static/fonts/IBMPlexMono-Medium.woff2 +0 -0
  36. _nullius_app/static/fonts/IBMPlexMono-Regular.woff2 +0 -0
  37. _nullius_app/static/fonts/InstrumentSerif-Italic.woff2 +0 -0
  38. _nullius_app/static/fonts/InstrumentSerif-Regular.woff2 +0 -0
  39. _nullius_app/static/fonts/README.md +11 -0
  40. _nullius_app/static/fonts/c1e7453ea26a1d1e.ttf +0 -0
  41. _nullius_app/static/fonts/dmsans-OFL.txt +93 -0
  42. _nullius_app/static/fonts/ibmplexmono-OFL.txt +93 -0
  43. _nullius_app/static/fonts/instrumentserif-OFL.txt +93 -0
  44. _nullius_app/static/fonts.css +49 -0
  45. _nullius_app/static/notifications.js +49 -0
  46. _nullius_app/static/onboarding.css +78 -0
  47. _nullius_app/static/onboarding.js +158 -0
  48. _nullius_app/static/runs/board.css +358 -0
  49. _nullius_app/static/runs/board.js +127 -0
  50. _nullius_app/static/runs/launches.css +88 -0
  51. _nullius_app/static/runs/live-board.css +186 -0
  52. _nullius_app/static/runs/live-board.js +394 -0
  53. _nullius_app/static/runs/path-suggestions.js +119 -0
  54. _nullius_app/static/runs/start.css +38 -0
  55. _nullius_app/static/settings/autosave.js +162 -0
  56. _nullius_app/static/settings/custom-keys.js +100 -0
  57. _nullius_app/static/settings/data-providers.js +88 -0
  58. _nullius_app/static/settings/judges.js +61 -0
  59. _nullius_app/static/settings/modal.css +32 -0
  60. _nullius_app/static/settings/modal.js +91 -0
  61. _nullius_app/static/settings/navigation.js +55 -0
  62. _nullius_app/static/settings/prices.js +68 -0
  63. _nullius_app/static/settings/providers.js +134 -0
  64. _nullius_app/static/settings/sandbox.js +20 -0
  65. _nullius_app/static/settings/settings.css +288 -0
  66. _nullius_app/static/style.css +1752 -0
  67. _nullius_app/static/traces/conversation.css +49 -0
  68. _nullius_app/static/traces/conversation.js +215 -0
  69. _nullius_app/templates/agents/entry.html +145 -0
  70. _nullius_app/templates/agents/kits.html +55 -0
  71. _nullius_app/templates/agents/standard.html +58 -0
  72. _nullius_app/templates/base.html +479 -0
  73. _nullius_app/templates/builder/new_run.html +55 -0
  74. _nullius_app/templates/catalogue/add_dialog.html +32 -0
  75. _nullius_app/templates/catalogue/benchmark.html +270 -0
  76. _nullius_app/templates/catalogue/benchmarks.html +91 -0
  77. _nullius_app/templates/catalogue/new.html +141 -0
  78. _nullius_app/templates/catalogue/use_bundle.html +11 -0
  79. _nullius_app/templates/compare/_detail.html +37 -0
  80. _nullius_app/templates/compare/compare.html +298 -0
  81. _nullius_app/templates/compare/compare_picker.html +51 -0
  82. _nullius_app/templates/compare/compare_task.html +329 -0
  83. _nullius_app/templates/runs/_execution.html +131 -0
  84. _nullius_app/templates/runs/_runtime.html +5 -0
  85. _nullius_app/templates/runs/ascii-mark.html +485 -0
  86. _nullius_app/templates/runs/feasibility.html +127 -0
  87. _nullius_app/templates/runs/index.html +609 -0
  88. _nullius_app/templates/runs/job.html +460 -0
  89. _nullius_app/templates/runs/preparing.html +14 -0
  90. _nullius_app/templates/runs/reconcile.html +124 -0
  91. _nullius_app/templates/runs/setup.html +272 -0
  92. _nullius_app/templates/runs/start.html +51 -0
  93. _nullius_app/templates/settings/custom_keys.html +82 -0
  94. _nullius_app/templates/settings/data_providers.html +27 -0
  95. _nullius_app/templates/settings/settings.html +564 -0
  96. _nullius_app/templates/traces/_charts.html +165 -0
  97. _nullius_app/templates/traces/_conversation.html +37 -0
  98. _nullius_app/templates/traces/_judgement.html +72 -0
  99. _nullius_app/templates/traces/artifact.html +15 -0
  100. _nullius_app/templates/traces/trial.html +838 -0
  101. _nullius_app/templates/workspaces/workspaces.html +54 -0
  102. _nullius_app/web/__init__.py +1 -0
  103. _nullius_app/web/agents.py +230 -0
  104. _nullius_app/web/builder.py +406 -0
  105. _nullius_app/web/catalogue.py +370 -0
  106. _nullius_app/web/compare.py +489 -0
  107. _nullius_app/web/core.py +17 -0
  108. _nullius_app/web/execute.py +223 -0
  109. _nullius_app/web/feasibility.py +60 -0
  110. _nullius_app/web/filters.py +231 -0
  111. _nullius_app/web/judge.py +623 -0
  112. _nullius_app/web/judge_tasks.py +33 -0
  113. _nullius_app/web/onboarding.py +20 -0
  114. _nullius_app/web/reconcile.py +47 -0
  115. _nullius_app/web/runs.py +464 -0
  116. _nullius_app/web/settings.py +324 -0
  117. _nullius_app/web/shared.py +507 -0
  118. _nullius_app/web/traces.py +306 -0
  119. _nullius_app/web/workspaces.py +84 -0
  120. nullius/__init__.py +32 -0
  121. nullius/__main__.py +5 -0
  122. nullius/catalogue/__init__.py +0 -0
  123. nullius/catalogue/agents/codex/agent.json +222 -0
  124. nullius/catalogue/agents/codex/config.toml +25 -0
  125. nullius/catalogue/agents/goose/agent.json +131 -0
  126. nullius/catalogue/agents/goose/config.yaml +20 -0
  127. nullius/catalogue/agents/jiuwenswarm/agent.json +197 -0
  128. nullius/catalogue/agents/jiuwenswarm/agent.py +355 -0
  129. nullius/catalogue/agents/mini-swe-agent/agent.json +68 -0
  130. nullius/catalogue/agents/mini-swe-agent/run.py +37 -0
  131. nullius/catalogue/agents/opencode/agent.json +135 -0
  132. nullius/catalogue/agents/opencode/opencode.json +32 -0
  133. nullius/catalogue/agents/reference/agent.json +89 -0
  134. nullius/catalogue/agents/reference/agent.py +209 -0
  135. nullius/catalogue/agents/terminus-2/agent.json +64 -0
  136. nullius/catalogue/agents/terminus-2/run.py +139 -0
  137. nullius/catalogue/benchmarks/gaia/benchmark.json +72 -0
  138. nullius/catalogue/benchmarks/gaia/data-source.json +29 -0
  139. nullius/catalogue/benchmarks/gaia/driver.py +188 -0
  140. nullius/catalogue/benchmarks/gaia/env/data.Dockerfile +1 -0
  141. nullius/catalogue/benchmarks/gaia/standard.json +278 -0
  142. nullius/catalogue/benchmarks/gaia/upstream-settings.json +275 -0
  143. nullius/catalogue/benchmarks/gsm8k/benchmark.json +34 -0
  144. nullius/catalogue/benchmarks/gsm8k/driver.py +101 -0
  145. nullius/catalogue/benchmarks/gsm8k/standard.json +124 -0
  146. nullius/catalogue/benchmarks/gsm8k/upstream-settings.json +86 -0
  147. nullius/catalogue/benchmarks/humaneval/benchmark.json +36 -0
  148. nullius/catalogue/benchmarks/humaneval/driver.py +243 -0
  149. nullius/catalogue/benchmarks/humaneval/standard.json +115 -0
  150. nullius/catalogue/benchmarks/humaneval/upstream-settings.json +72 -0
  151. nullius/catalogue/benchmarks/locomo/benchmark.json +43 -0
  152. nullius/catalogue/benchmarks/locomo/driver.py +270 -0
  153. nullius/catalogue/benchmarks/locomo/standard.json +265 -0
  154. nullius/catalogue/benchmarks/locomo/upstream-settings.json +112 -0
  155. nullius/catalogue/benchmarks/longmemeval/benchmark.json +65 -0
  156. nullius/catalogue/benchmarks/longmemeval/driver.py +379 -0
  157. nullius/catalogue/benchmarks/longmemeval/standard.json +733 -0
  158. nullius/catalogue/benchmarks/longmemeval/upstream-settings.json +76 -0
  159. nullius/catalogue/benchmarks/swe-bench-verified/benchmark.json +87 -0
  160. nullius/catalogue/benchmarks/swe-bench-verified/driver.py +116 -0
  161. nullius/catalogue/benchmarks/swe-bench-verified/images.json +502 -0
  162. nullius/catalogue/benchmarks/swe-bench-verified/standard.json +108 -0
  163. nullius/catalogue/benchmarks/swe-bench-verified/upstream-settings.json +32 -0
  164. nullius/catalogue/benchmarks/tau3-bench/benchmark.json +49 -0
  165. nullius/catalogue/benchmarks/tau3-bench/driver.py +608 -0
  166. nullius/catalogue/benchmarks/tau3-bench/mcp_server.py +114 -0
  167. nullius/catalogue/benchmarks/tau3-bench/search_relay.py +19 -0
  168. nullius/catalogue/benchmarks/tau3-bench/standard.json +547 -0
  169. nullius/catalogue/benchmarks/tau3-bench/upstream-settings.json +639 -0
  170. nullius/catalogue/benchmarks/terminal-bench/benchmark.json +69 -0
  171. nullius/catalogue/benchmarks/terminal-bench/driver.py +267 -0
  172. nullius/catalogue/benchmarks/terminal-bench/standard.json +166 -0
  173. nullius/catalogue/benchmarks/terminal-bench/upstream-settings.json +36 -0
  174. nullius/catalogue/capabilities/keyword-memory/capability.json +33 -0
  175. nullius/catalogue/capabilities/keyword-memory/capability.py +55 -0
  176. nullius/catalogue/capabilities/mem0/capability.json +135 -0
  177. nullius/catalogue/capabilities/mem0/capability.py +173 -0
  178. nullius/catalogue/catalog.py +426 -0
  179. nullius/catalogue/citation.py +116 -0
  180. nullius/catalogue/harbor_entry.py +367 -0
  181. nullius/catalogue/sources.py +107 -0
  182. nullius/catalogue/storage.py +125 -0
  183. nullius/cli.py +85 -0
  184. nullius/compare/__init__.py +0 -0
  185. nullius/compare/cli.py +265 -0
  186. nullius/compare/comparison.py +184 -0
  187. nullius/execution.py +1653 -0
  188. nullius/gitrefs.py +128 -0
  189. nullius/harbor/__init__.py +0 -0
  190. nullius/harbor/feed.py +228 -0
  191. nullius/harbor/source.py +582 -0
  192. nullius/hosts.py +368 -0
  193. nullius/importers/__init__.py +140 -0
  194. nullius/importers/atif.py +387 -0
  195. nullius/importers/cli.py +135 -0
  196. nullius/importers/otel.py +274 -0
  197. nullius/judge/__init__.py +14 -0
  198. nullius/judge/batch.py +122 -0
  199. nullius/judge/client.py +433 -0
  200. nullius/judge/floors.json +86 -0
  201. nullius/judge/lanes.py +89 -0
  202. nullius/judge/questions.py +309 -0
  203. nullius/judge/reconcile.py +176 -0
  204. nullius/judge/state.py +224 -0
  205. nullius/judge/store.py +167 -0
  206. nullius/migrate.py +268 -0
  207. nullius/onboarding.py +116 -0
  208. nullius/paths.py +89 -0
  209. nullius/prerequisites.py +129 -0
  210. nullius/prices.py +283 -0
  211. nullius/progress.py +294 -0
  212. nullius/providers.py +335 -0
  213. nullius/recipes/__init__.py +0 -0
  214. nullius/recipes/launch.py +78 -0
  215. nullius/redact.py +72 -0
  216. nullius/runs/__init__.py +0 -0
  217. nullius/runs/artifacts.py +67 -0
  218. nullius/runs/classify.py +216 -0
  219. nullius/runs/cli.py +316 -0
  220. nullius/runs/feasibility.py +442 -0
  221. nullius/runs/launches.py +149 -0
  222. nullius/runs/live.py +715 -0
  223. nullius/runs/parse.py +1016 -0
  224. nullius/runs/verifier.py +241 -0
  225. nullius/sandbox.py +109 -0
  226. nullius/secrets.py +218 -0
  227. nullius/settings.py +544 -0
  228. nullius/standard/__init__.py +15 -0
  229. nullius/standard/acp.py +305 -0
  230. nullius/standard/cancellation.py +19 -0
  231. nullius/standard/cli.py +703 -0
  232. nullius/standard/conform.py +149 -0
  233. nullius/standard/container.py +1870 -0
  234. nullius/standard/definitions.py +1651 -0
  235. nullius/standard/egress.py +192 -0
  236. nullius/standard/fidelity.py +256 -0
  237. nullius/standard/forward.py +139 -0
  238. nullius/standard/hostreq.py +105 -0
  239. nullius/standard/howto.py +220 -0
  240. nullius/standard/install.py +428 -0
  241. nullius/standard/job.py +551 -0
  242. nullius/standard/jsonl.py +129 -0
  243. nullius/standard/kits/agent-conversation-v1/driver.py +27 -0
  244. nullius/standard/kits/agent-conversation-v1/standard.json +26 -0
  245. nullius/standard/kits/agent-search-v1/driver.py +171 -0
  246. nullius/standard/kits/agent-search-v1/standard.json +99 -0
  247. nullius/standard/kits/agent-task-v1/driver.py +25 -0
  248. nullius/standard/kits/agent-task-v1/standard.json +100 -0
  249. nullius/standard/kits/agent-tools-v1/driver.py +206 -0
  250. nullius/standard/kits/agent-tools-v1/mcp_kit.py +209 -0
  251. nullius/standard/kits/agent-tools-v1/standard.json +119 -0
  252. nullius/standard/kits/agent-workspace-v1/driver.py +65 -0
  253. nullius/standard/kits/agent-workspace-v1/standard.json +95 -0
  254. nullius/standard/kits/cap-memory-v1/driver.py +39 -0
  255. nullius/standard/kits/cap-memory-v1/standard.json +91 -0
  256. nullius/standard/ledger.py +326 -0
  257. nullius/standard/match.py +66 -0
  258. nullius/standard/mcp_bridge.py +62 -0
  259. nullius/standard/mcp_machine.py +193 -0
  260. nullius/standard/merge.py +239 -0
  261. nullius/standard/names.py +37 -0
  262. nullius/standard/network_requirements.py +44 -0
  263. nullius/standard/pace.py +53 -0
  264. nullius/standard/payload.py +278 -0
  265. nullius/standard/pins.py +130 -0
  266. nullius/standard/ports.py +70 -0
  267. nullius/standard/prove.py +373 -0
  268. nullius/standard/recipe.py +746 -0
  269. nullius/standard/relay.py +785 -0
  270. nullius/standard/run.py +1781 -0
  271. nullius/standard/setup_container.py +208 -0
  272. nullius/standard/shard.py +71 -0
  273. nullius/standard/web_services.py +30 -0
  274. nullius/traces/__init__.py +0 -0
  275. nullius/traces/behavior.py +131 -0
  276. nullius/traces/charts.py +898 -0
  277. nullius/traces/conversation.py +159 -0
  278. nullius/traces/otel.py +608 -0
  279. nullius/traces/trace.py +1477 -0
  280. nullius/traces/trajectory.py +586 -0
  281. nullius/workspace.py +417 -0
  282. nullius/workspace_cli.py +119 -0
  283. nullius_eval-0.1.0.dist-info/METADATA +93 -0
  284. nullius_eval-0.1.0.dist-info/RECORD +291 -0
  285. nullius_eval-0.1.0.dist-info/WHEEL +5 -0
  286. nullius_eval-0.1.0.dist-info/entry_points.txt +2 -0
  287. nullius_eval-0.1.0.dist-info/licenses/LICENSE +202 -0
  288. nullius_eval-0.1.0.dist-info/licenses/app/static/fonts/dmsans-OFL.txt +93 -0
  289. nullius_eval-0.1.0.dist-info/licenses/app/static/fonts/ibmplexmono-OFL.txt +93 -0
  290. nullius_eval-0.1.0.dist-info/licenses/app/static/fonts/instrumentserif-OFL.txt +93 -0
  291. nullius_eval-0.1.0.dist-info/top_level.txt +2 -0
@@ -0,0 +1,479 @@
1
+ {% macro agent_mark(kind, key, label, css='agent-logo') -%}
2
+ {% set source = agent_marks.get(key.split('@')[0]) if kind == 'agent' else none %}
3
+ {% if source and '#' in source %}<svg class="{{ css }}" aria-hidden="true"><use href="{{ url_for('static', filename=source.split('#')[0]) }}#{{ source.split('#')[1] }}"/></svg>
4
+ {% elif source %}<img class="{{ css }}" src="{{ url_for('static', filename=source) }}" alt="" aria-hidden="true">
5
+ {% else %}{{ label[:1] }}{% endif %}
6
+ {%- endmacro %}
7
+ <!doctype html>
8
+ <html lang="en">
9
+ <head>
10
+ <meta charset="utf-8">
11
+ <meta name="viewport" content="width=device-width, initial-scale=1">
12
+ <meta name="nullius-interface" content="{{ interface_id() }}">
13
+ <title>{% block title %}Nullius{% endblock %}</title>
14
+ <link rel="icon" type="image/svg+xml" href="{{ url_for('static', filename='brand/favicon.svg') }}">
15
+ <script>
16
+ // Runs before first paint so the page never flashes the wrong theme or
17
+ // the wrong rail width. Stored choices win; otherwise follow the OS.
18
+ (() => {
19
+ let saved, rail;
20
+ try { saved = localStorage.getItem('theme'); rail = localStorage.getItem('rail'); } catch {}
21
+ const palettes = ['charcoal', 'graphite', 'midnight'];
22
+ let dark;
23
+ try { dark = localStorage.getItem('dark-palette'); } catch {}
24
+ if (!palettes.includes(dark)) dark = 'charcoal';
25
+ const explicitDark = palettes.includes(saved) || saved === 'dark';
26
+ document.documentElement.dataset.theme = saved === 'light' ? 'light' : explicitDark ? 'dark' : matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
27
+ document.documentElement.dataset.palette = palettes.includes(saved) ? saved : dark;
28
+ document.documentElement.dataset.rail = rail === 'collapsed' ? 'collapsed' : 'open';
29
+ })();
30
+ </script>
31
+ <link rel="stylesheet" href="{{ url_for('static', filename='fonts.css') }}">
32
+ <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
33
+ <link rel="stylesheet" href="{{ url_for('static', filename='onboarding.css') }}">
34
+ <link rel="stylesheet" href="{{ url_for('static', filename='settings/modal.css') }}">
35
+ {% block head %}{% endblock %}
36
+ </head>
37
+ <body{% if embedded %} class="settings-embedded"{% endif %}>
38
+ <script src="{{ url_for('static', filename='notifications.js') }}"></script>
39
+ <a class="skip-link" href="#main-content">Skip to content</a>
40
+ {# ---- icons: one symbol each, referenced by <use>. Hand-drawn on a 24-grid,
41
+ stroke only, so they take the item's colour and weight. ---- #}
42
+ <svg width="0" height="0" style="position:absolute" aria-hidden="true">
43
+ <defs>
44
+ <symbol id="i-runs" viewBox="0 0 24 24"><path d="M9 6h12M9 12h12M9 18h12"/><circle cx="4" cy="6" r="1.2"/><circle cx="4" cy="12" r="1.2"/><circle cx="4" cy="18" r="1.2"/></symbol>
45
+ <symbol id="i-compare" viewBox="0 0 24 24"><rect x="3" y="4" width="7.5" height="16" rx="1.5"/><rect x="13.5" y="4" width="7.5" height="16" rx="1.5"/><path d="M6.75 9v6M17.25 9v6"/></symbol>
46
+ <symbol id="i-import" viewBox="0 0 24 24"><path d="M12 4v11M7 10l5 5 5-5M4 20h16"/></symbol>
47
+ <symbol id="i-newrun" viewBox="0 0 24 24"><path d="M4 17l6-5-6-5M12 19h8"/></symbol>
48
+ <symbol id="i-ws" viewBox="0 0 24 24"><path d="M3 8a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"/></symbol>
49
+ <symbol id="i-dollar" viewBox="0 0 24 24"><path d="M12 3v18M16.5 7.5C15.9 6 14.2 5 12 5c-2.5 0-4.5 1.3-4.5 3.3 0 4.4 9 2.4 9 6.9 0 2-2 3.3-4.5 3.3-2.2 0-3.9-1-4.5-2.5"/></symbol>
50
+ <symbol id="i-refresh" viewBox="0 0 24 24"><path d="M20 12a8 8 0 1 1-2.7-6M20 4v5h-5"/></symbol>
51
+ <symbol id="i-close" viewBox="0 0 24 24"><path d="M9 7l-5 5 5 5M4 12h12M18 5v14"/></symbol>
52
+ <symbol id="i-plus" viewBox="0 0 24 24"><path d="M12 5v14M5 12h14"/></symbol>
53
+ <symbol id="i-chev" viewBox="0 0 24 24"><path d="M8 10l4 4 4-4"/></symbol>
54
+ <symbol id="i-collapse" viewBox="0 0 24 24"><path d="M11 17l-5-5 5-5M18 17l-5-5 5-5"/></symbol>
55
+ <symbol id="i-expand" viewBox="0 0 24 24"><path d="M13 7l5 5-5 5M6 7l5 5-5 5"/></symbol>
56
+ <symbol id="i-x" viewBox="0 0 24 24"><path d="M6 6l12 12M6 18L18 6"/></symbol>
57
+ <symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4.5"/><path d="M12 2v2.5M12 19.5V22M2 12h2.5M19.5 12H22M4.9 4.9l1.8 1.8M17.3 17.3l1.8 1.8M4.9 19.1l1.8-1.8M17.3 6.7l1.8-1.8"/></symbol>
58
+ <symbol id="i-moon" viewBox="0 0 24 24"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></symbol>
59
+ <symbol id="i-check" viewBox="0 0 24 24"><path d="M5 12l5 5L20 7"/></symbol>
60
+ <symbol id="i-agent" viewBox="0 0 24 24"><rect x="5" y="8" width="14" height="11" rx="2.5"/><path d="M12 4v4M9.5 13h.01M14.5 13h.01M9.5 16.5h5"/></symbol>
61
+ <symbol id="i-capability" viewBox="0 0 24 24"><path d="M9 3v5M15 3v5M6 8h12v3a6 6 0 0 1-12 0zM12 17v4"/></symbol>
62
+ <symbol id="i-kit" viewBox="0 0 24 24"><rect x="5" y="4" width="14" height="17" rx="2"/><rect x="9" y="2" width="6" height="4" rx="1"/><path d="m8 13 3 3 5-6"/></symbol>
63
+ <symbol id="i-bench" viewBox="0 0 24 24"><path d="M5 21V4M5 4h13l-3 4 3 4H5"/></symbol>
64
+ <symbol id="i-search" viewBox="0 0 24 24"><circle cx="10" cy="10" r="6"/><path d="m15 15 5 5"/></symbol>
65
+ <symbol id="i-gear" viewBox="0 0 24 24"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/></symbol>
66
+ </defs>
67
+ </svg>
68
+
69
+ <div class="shell">
70
+ {% set ep = request.endpoint or '' %}
71
+ {# The rail: brand, the open workspace as a switcher, the pages in groups,
72
+ and the controls at the foot. Collapses to icons (Ctrl/⌘ B); every item
73
+ keeps its name as a tooltip, so nothing is lost, only width. #}
74
+ <aside class="side" id="side">
75
+ <div class="side-top">
76
+ <a class="brand" href="{{ url_for('home') }}" aria-label="Nullius home">
77
+ <span class="brand-mark" aria-hidden="true"></span><span class="brand-word" aria-hidden="true"></span>
78
+ </a>
79
+ <button class="rail-toggle" id="rail-toggle" type="button" aria-label="Collapse the sidebar" aria-controls="side-nav" aria-expanded="true">
80
+ <svg class="ic ic-collapse"><use href="#i-collapse"/></svg>
81
+ <svg class="ic ic-expand"><use href="#i-expand"/></svg>
82
+ </button>
83
+ <button class="icon-btn only-mobile" id="rail-close" type="button" aria-label="Close the menu">
84
+ <svg class="ic"><use href="#i-x"/></svg>
85
+ </button>
86
+ </div>
87
+
88
+ <div class="ws-switch" id="ws-switch">
89
+ {% if workspace %}
90
+ <button class="ws-btn" type="button" id="ws-btn" aria-haspopup="menu" aria-expanded="false" aria-controls="ws-pop"
91
+ aria-label="Workspace: {{ workspace.label }}"
92
+ data-label="{{ workspace.label }}">
93
+ <span class="ws-avatar" style="--hue:{{ ws_hue(workspace.name) }}">{{ workspace.label[:2]|upper }}</span>
94
+ <span class="ws-text"><span class="ws-caption">Workspace</span><span class="ws-label">{{ workspace.label }}</span></span>
95
+ <svg class="ic ws-chev"><use href="#i-chev"/></svg>
96
+ </button>
97
+ {% else %}
98
+ <button class="ws-btn ws-none" type="button" id="ws-btn" aria-haspopup="menu" aria-expanded="false" aria-controls="ws-pop"
99
+ aria-label="Choose a workspace" data-label="Open a workspace">
100
+ <span class="ws-avatar ws-avatar-empty"><svg class="ic"><use href="#i-plus"/></svg></span>
101
+ <span class="ws-text"><span class="ws-caption">Workspace</span><span class="ws-label">Open a workspace</span></span>
102
+ <svg class="ic ws-chev"><use href="#i-chev"/></svg>
103
+ </button>
104
+ {% endif %}
105
+ <div class="ws-pop" id="ws-pop" role="menu" aria-label="Workspaces" hidden>
106
+ {% if workspace %}
107
+ <div class="pop-head">Workspace</div>
108
+ <form method="post" action="{{ url_for('workspace_refresh') }}"><input type="hidden" name="csrf" value="{{ csrf_token() }}"><button class="pop-item" type="submit" role="menuitem"><svg class="ic"><use href="#i-refresh"/></svg>Refresh runs</button></form>
109
+ <form method="post" action="{{ url_for('change_source') }}"><input type="hidden" name="csrf" value="{{ csrf_token() }}"><button class="pop-item" type="submit" role="menuitem"><svg class="ic"><use href="#i-close"/></svg>Close</button></form>
110
+ <div class="pop-sep"></div>
111
+ {% endif %}
112
+ <div class="pop-head">Switch to</div>
113
+ {% for ws in workspaces if not (workspace and ws.name == workspace.name) %}
114
+ <form method="post" action="{{ url_for('workspace_open', name=ws.name) }}"><input type="hidden" name="csrf" value="{{ csrf_token() }}"><button class="pop-item" type="submit" role="menuitem"><span class="ws-avatar sm" style="--hue:{{ ws_hue(ws.name) }}">{{ ws.label[:2]|upper }}</span><span class="pop-text"><span>{{ ws.label }}</span><span class="pop-sub mono">{{ ws.name }}</span></span></button></form>
115
+ {% else %}
116
+ <div class="pop-empty">{% if workspace %}No other workspace yet.{% else %}No workspace yet.{% endif %}</div>
117
+ {% endfor %}
118
+ <div class="pop-sep"></div>
119
+ <a class="pop-item" role="menuitem" href="{{ url_for('import_page', new=1) }}"><svg class="ic"><use href="#i-plus"/></svg>New workspace</a>
120
+ <a class="pop-item" role="menuitem" href="{{ url_for('workspaces_page') }}"><svg class="ic"><use href="#i-ws"/></svg>All workspaces</a>
121
+ </div>
122
+ </div>
123
+
124
+ <nav class="nav" id="side-nav" aria-label="Pages">
125
+ {# First steps: shown by onboarding.js once the first-open question is answered; opens the checklist #}
126
+ <div class="onb-rail" id="onb-rail" hidden>
127
+ <button class="nav-item" id="onb-open" type="button" data-label="First steps" aria-controls="onb-panel" aria-expanded="false"><svg class="ic"><use href="#i-check"/></svg><span class="lbl">First steps</span><span class="onb-count"></span></button>
128
+ <button class="onb-x" type="button" data-onb="dismiss" aria-label="Remove First steps"><svg class="ic"><use href="#i-x"/></svg></button>
129
+ </div>
130
+ <div class="nav-group">
131
+ <div class="nav-label">Analyse</div>
132
+ <a class="nav-item {{ 'on' if ep in ('index', 'job', 'trial', 'save_trace') }}" href="{{ url_for('index') }}" data-label="Runs" aria-label="Runs"><svg class="ic"><use href="#i-runs"/></svg><span class="lbl">Runs</span></a>
133
+ <a class="nav-item {{ 'on' if ep in ('compare', 'compare_task', 'compare_picker') }}" href="{{ url_for('compare') }}" data-label="Compare" aria-label="Compare"><svg class="ic"><use href="#i-compare"/></svg><span class="lbl">Compare</span></a>
134
+ </div>
135
+ <div class="nav-group">
136
+ <div class="nav-label">Run</div>
137
+ <a class="nav-item {{ 'on' if ep.startswith('new_run') }}" href="{{ url_for('new_run') }}" data-label="Run builder" aria-label="Run builder"><svg class="ic"><use href="#i-newrun"/></svg><span class="lbl">Run builder</span></a>
138
+ </div>
139
+ <div class="nav-group">
140
+ <div class="nav-label">Catalogue</div>
141
+ {# The benchmarks as leaves, alphabetical, each opening its own page. #}
142
+ {% set tree_open = ep in ('benchmarks_page', 'benchmark_page') %}
143
+ <div class="nav-tree{{ '' if tree_open else ' folded' }}" data-tree="nav-bench">
144
+ <div class="nav-row">
145
+ <a class="nav-item {{ 'on' if ep in ('benchmarks_page', 'benchmark_page') }}" href="{{ url_for('benchmarks_page') }}" data-label="Benchmarks" aria-label="Benchmarks"><svg class="ic"><use href="#i-bench"/></svg><span class="lbl">Benchmarks</span></a>
146
+ <button class="tree-caret" type="button" aria-expanded="{{ 'true' if tree_open else 'false' }}" aria-label="{{ 'Fold' if tree_open else 'Unfold' }} the benchmark list"><svg class="ic"><use href="#i-chev"/></svg></button>
147
+ </div>
148
+ <div class="tree-kids"{% if not tree_open %} hidden{% endif %}>
149
+ {% for b in (nav_catalog.listed_benchmarks if nav_catalog else []) %}
150
+ <a class="tree-item leaf st-{{ b.origin }}{{ ' on' if ep == 'benchmark_page' and request.view_args.get('key') == b.key }}" href="{{ url_for('benchmark_page', key=b.key) }}">
151
+ <span class="leaf-dot"></span><span class="lbl">{{ b.title }}</span>
152
+ </a>
153
+ {% endfor %}
154
+ </div>
155
+ </div>
156
+ {% for kind, label, list_ep, entry_ep, icon in [('agent', 'Agents', 'agents_page', 'agent_page', 'agent'), ('capability', 'Capabilities', 'features_page', 'feature_page', 'capability')] %}
157
+ {% set tree_open = ep in (list_ep, entry_ep) %}
158
+ <div class="nav-tree{{ '' if tree_open else ' folded' }}" data-tree="nav-{{ kind }}">
159
+ <div class="nav-row">
160
+ <a class="nav-item {{ 'on' if ep in (list_ep, entry_ep) }}" href="{{ url_for(list_ep) }}" data-label="{{ label }}" aria-label="{{ label }}"><svg class="ic"><use href="#i-{{ icon }}"/></svg><span class="lbl">{{ label }}</span></a>
161
+ <button class="tree-caret" type="button" aria-expanded="{{ 'true' if tree_open else 'false' }}" aria-label="{{ 'Fold' if tree_open else 'Unfold' }} the {{ label|lower }} list"><svg class="ic"><use href="#i-chev"/></svg></button>
162
+ </div>
163
+ <div class="tree-kids"{% if not tree_open %} hidden{% endif %}>
164
+ {% for item in nav_definitions[kind] %}
165
+ <a class="tree-item leaf{{ ' on' if ep == entry_ep and request.view_args.get('key') == item.key }}" href="{{ url_for(entry_ep, key=item.key) }}">
166
+ {% if kind == 'agent' and agent_marks.get(item.key) %}{{ agent_mark(kind, item.key, item.label, 'agent-logo nav-agent-logo') }}{% else %}<span class="leaf-dot"></span>{% endif %}<span class="lbl">{{ item.label }}</span>
167
+ </a>
168
+ {% endfor %}
169
+ </div>
170
+ </div>
171
+ {% endfor %}
172
+ {% set tree_open = ep in ('kits_page', 'kit_page') %}
173
+ <div class="nav-tree{{ '' if tree_open else ' folded' }}" data-tree="nav-kits">
174
+ <div class="nav-row">
175
+ <a class="nav-item {{ 'on' if ep in ('kits_page', 'kit_page') }}" href="{{ url_for('kits_page') }}" data-label="Kits" aria-label="Kits"><svg class="ic"><use href="#i-kit"/></svg><span class="lbl">Kits</span></a>
176
+ <button class="tree-caret" type="button" aria-expanded="{{ 'true' if tree_open else 'false' }}" aria-label="{{ 'Fold' if tree_open else 'Unfold' }} the kits list"><svg class="ic"><use href="#i-chev"/></svg></button>
177
+ </div>
178
+ <div class="tree-kids"{% if not tree_open %} hidden{% endif %}>
179
+ {% for item in nav_kits %}<a class="tree-item leaf{{ ' on' if ep == 'kit_page' and request.view_args.get('key') == item.key }}" href="{{ url_for('kit_page', key=item.key) }}"><span class="leaf-dot"></span><span class="lbl">{{ item.label }}</span></a>{% endfor %}
180
+ </div>
181
+ </div>
182
+ </div>
183
+ <div class="nav-group">
184
+ <div class="nav-label">Manage</div>
185
+ {# A tree: every workspace as a folder, the open one expanded to its
186
+ runs. Clicking a closed one switches; the caret folds the tree and
187
+ the fold is remembered. #}
188
+ <div class="nav-tree folded" data-tree="nav-ws">
189
+ <div class="nav-row">
190
+ <a class="nav-item {{ 'on' if ep.startswith('workspace') }}" href="{{ url_for('workspaces_page') }}" data-label="Workspaces" aria-label="Workspaces"><svg class="ic"><use href="#i-ws"/></svg><span class="lbl">Workspaces</span></a>
191
+ <button class="tree-caret" type="button" aria-expanded="false"
192
+ aria-label="Fold the workspace list"><svg class="ic"><use href="#i-chev"/></svg></button>
193
+ </div>
194
+ <div class="tree-kids" hidden>
195
+ {% for ws in workspaces %}
196
+ {% set cur = workspace and ws.name == workspace.name %}
197
+ {% if cur %}
198
+ <a class="tree-item ws-item cur {{ 'on' if ep in ('index',) }}" href="{{ url_for('index') }}">
199
+ <span class="ws-avatar sm" style="--hue:{{ ws_hue(ws.name) }}">{{ ws.label[:2]|upper }}</span>
200
+ <span class="lbl">{{ ws.label }}</span><svg class="ic tree-check"><use href="#i-check"/></svg>
201
+ </a>
202
+ <div class="tree-runs">
203
+ {% for r in nav_runs %}
204
+ <a class="tree-item run-item {{ 'on' if (ep in ('job', 'trial', 'save_trace') and request.view_args.get('job_id') == r.job_id) }}"
205
+ href="{{ url_for('job', job_id=r.job_id) }}">
206
+ <span class="tree-guide"></span><span class="lbl mono">{{ r.job_id }}</span><span class="tree-n">{{ r.n_trials }}</span>
207
+ </a>
208
+ {% else %}
209
+ <span class="tree-item run-item faint"><span class="tree-guide"></span><span class="lbl">no runs read yet</span></span>
210
+ {% endfor %}
211
+ </div>
212
+ {% else %}
213
+ <form method="post" action="{{ url_for('workspace_open', name=ws.name) }}" class="tree-form"><input type="hidden" name="csrf" value="{{ csrf_token() }}">
214
+ <button class="tree-item ws-item" type="submit">
215
+ <span class="ws-avatar sm" style="--hue:{{ ws_hue(ws.name) }}">{{ ws.label[:2]|upper }}</span>
216
+ <span class="lbl">{{ ws.label }}</span>
217
+ </button>
218
+ </form>
219
+ {% endif %}
220
+ {% endfor %}
221
+ <a class="tree-item ws-item add" href="{{ url_for('import_page', new=1) }}">
222
+ <span class="ws-avatar sm ws-avatar-empty"><svg class="ic"><use href="#i-plus"/></svg></span><span class="lbl">New workspace</span>
223
+ </a>
224
+ </div>
225
+ </div>
226
+ <a class="nav-item {{ 'on' if ep.startswith('settings') }}" href="{{ url_for('settings_page') }}" data-label="Settings" aria-label="Settings"><svg class="ic"><use href="#i-gear"/></svg><span class="lbl">Settings</span></a>
227
+ </div>
228
+ </nav>
229
+
230
+ </aside>
231
+
232
+ <div class="content">
233
+ <header class="topbar">
234
+ <button class="icon-btn only-mobile" id="rail-open" type="button" aria-label="Open the menu" title="Menu" aria-controls="side" aria-expanded="false">
235
+ <svg class="ic"><use href="#i-runs"/></svg>
236
+ </button>
237
+ <span class="crumb">{% block crumb %}{% endblock %}</span>
238
+ <span class="header-spacer"></span>
239
+ </header>
240
+ <main id="main-content" tabindex="-1">
241
+ {% if record_workspace and (not workspace or record_workspace.name != workspace.name) %}
242
+ <p class="record-workspace">Source workspace: <strong>{{ record_workspace.label }}</strong> <span class="mono faint">{{ record_workspace.name }}</span></p>
243
+ {% endif %}
244
+ {% block body %}{% endblock %}
245
+ </main>
246
+ </div>
247
+ <div class="scrim" id="scrim" hidden></div>
248
+ </div>
249
+ <script src="{{ url_for('static', filename='disclosures.js') }}"></script>
250
+ <script>
251
+ (() => {
252
+ const root = document.documentElement;
253
+ const readPreference = (key) => { try { return localStorage.getItem(key); } catch { return null; } };
254
+ const remember = (key, value) => { try { localStorage.setItem(key, value); } catch {} };
255
+ const systemTheme = matchMedia('(prefers-color-scheme: light)');
256
+ const darkPalettes = ['charcoal', 'graphite', 'midnight'];
257
+ const preferredDark = () => darkPalettes.includes(readPreference('dark-palette')) ? readPreference('dark-palette') : 'charcoal';
258
+ function applyTheme(preference, save = false) {
259
+ if (preference === 'dark') preference = preferredDark();
260
+ if (!['light', 'system', null, ...darkPalettes].includes(preference)) return;
261
+ if (save) {
262
+ remember('theme', preference);
263
+ if (darkPalettes.includes(preference)) remember('dark-palette', preference);
264
+ }
265
+ root.dataset.theme = preference === 'light' ? 'light' : darkPalettes.includes(preference) ? 'dark' : systemTheme.matches ? 'light' : 'dark';
266
+ root.dataset.palette = darkPalettes.includes(preference) ? preference : preferredDark();
267
+ document.dispatchEvent(new Event('nullius-theme-updated'));
268
+ }
269
+ document.addEventListener('nullius-theme-change', event => applyTheme(event.detail, true));
270
+ window.addEventListener('storage', event => {
271
+ if (['theme', 'dark-palette', null].includes(event.key)) applyTheme(readPreference('theme'));
272
+ });
273
+ systemTheme.addEventListener('change', () => {
274
+ if (![...darkPalettes, 'light', 'dark'].includes(readPreference('theme'))) applyTheme('system');
275
+ });
276
+
277
+ // The rail: collapse to icons, remembered; Ctrl/⌘ B toggles it.
278
+ // Accessible names remain available when the rail is collapsed.
279
+ const railToggle = document.getElementById('rail-toggle');
280
+ const setRail = (state, save = true) => {
281
+ root.dataset.rail = state;
282
+ if (save) remember('rail', state);
283
+ railToggle?.setAttribute('aria-label',
284
+ state === 'collapsed' ? 'Expand the sidebar' : 'Collapse the sidebar');
285
+ railToggle?.setAttribute('aria-expanded', String(state !== 'collapsed'));
286
+ };
287
+ setRail(root.dataset.rail, false);
288
+ railToggle?.addEventListener('click', () =>
289
+ setRail(root.dataset.rail === 'collapsed' ? 'open' : 'collapsed'));
290
+ document.addEventListener('keydown', (e) => {
291
+ if (railToggle && !matchMedia('(max-width: 900px)').matches
292
+ && (e.ctrlKey || e.metaKey) && !e.shiftKey && !e.altKey && e.key.toLowerCase() === 'b'
293
+ && !/^(input|textarea|select)$/i.test(document.activeElement?.tagName || '')
294
+ && !document.activeElement?.isContentEditable) {
295
+ e.preventDefault();
296
+ setRail(root.dataset.rail === 'collapsed' ? 'open' : 'collapsed');
297
+ }
298
+ });
299
+
300
+ // Active catalogue trees arrive open from the server to avoid a first-paint jump;
301
+ // a fold or unfold lasts until the next page.
302
+ document.querySelectorAll('[data-tree]').forEach(tree => {
303
+ const caret = tree.querySelector('.tree-caret'), kids = tree.querySelector('.tree-kids');
304
+ const label = caret.getAttribute('aria-label').replace(/^(Fold|Unfold) /, '');
305
+ const set = (open, animate = true) => {
306
+ if (animate) NulliusDisclosure.setHidden(kids, open);
307
+ else { kids.hidden = !open; kids.inert = !open; }
308
+ caret.setAttribute('aria-expanded', String(open));
309
+ caret.setAttribute('aria-label', `${open ? 'Fold' : 'Unfold'} ${label}`);
310
+ tree.classList.toggle('folded', !open);
311
+ };
312
+ set(!!tree.querySelector('.nav-item.on, .tree-item.on'), false);
313
+ caret.addEventListener('click', () => set(caret.getAttribute('aria-expanded') !== 'true'));
314
+ });
315
+ // A leaf that points at the card on screen is the current one.
316
+ const markLeaf = () => {
317
+ const here = location.pathname, hash = location.hash.slice(1);
318
+ document.querySelectorAll('.tree-item.leaf').forEach(a => {
319
+ const url = new URL(a.href);
320
+ a.classList.toggle('on', url.pathname === here && url.hash.slice(1) === hash);
321
+ });
322
+ };
323
+ markLeaf();
324
+ addEventListener('hashchange', markLeaf);
325
+ document.querySelectorAll('.nav-item[data-label]').forEach(a => a.setAttribute('aria-label', a.dataset.label));
326
+ document.querySelectorAll('.nav-item.on, .tree-item.on').forEach(a =>
327
+ a.setAttribute('aria-current', new URL(a.href).pathname === location.pathname ? 'page' : 'location'));
328
+
329
+ // The workspace switcher: a popover, closed by a click outside or Escape.
330
+ const wsBtn = document.getElementById('ws-btn');
331
+ const wsPop = document.getElementById('ws-pop');
332
+ const closePop = (restoreFocus = false) => {
333
+ if (wsPop && !wsPop.hidden) {
334
+ wsPop.hidden = true;
335
+ wsBtn?.setAttribute('aria-expanded', 'false');
336
+ if (restoreFocus) wsBtn?.focus({ preventScroll: true });
337
+ }
338
+ };
339
+ if (wsBtn && wsPop) {
340
+ const menuItems = () => [...wsPop.querySelectorAll('[role="menuitem"]')];
341
+ const openPop = (last = false) => {
342
+ wsPop.hidden = false;
343
+ wsBtn.setAttribute('aria-expanded', 'true');
344
+ const items = menuItems();
345
+ items[last ? items.length - 1 : 0]?.focus({ preventScroll: true });
346
+ };
347
+ wsBtn.addEventListener('click', (e) => {
348
+ e.stopPropagation();
349
+ if (wsPop.hidden) openPop(); else closePop();
350
+ });
351
+ wsBtn.addEventListener('keydown', e => {
352
+ if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
353
+ e.preventDefault();
354
+ openPop(e.key === 'ArrowUp');
355
+ }
356
+ });
357
+ wsPop.addEventListener('keydown', e => {
358
+ const items = menuItems(), current = items.indexOf(document.activeElement);
359
+ if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(e.key)) {
360
+ e.preventDefault();
361
+ const next = e.key === 'Home' ? 0 : e.key === 'End' ? items.length - 1
362
+ : (current + (e.key === 'ArrowDown' ? 1 : -1) + items.length) % items.length;
363
+ items[next]?.focus();
364
+ }
365
+ if (e.key === 'Escape') { e.preventDefault(); e.stopPropagation(); closePop(true); }
366
+ });
367
+ document.addEventListener('click', (e) => { if (!wsPop.contains(e.target)) closePop(); });
368
+ document.addEventListener('focusin', e => {
369
+ if (e.target !== wsBtn && !wsPop.contains(e.target)) closePop();
370
+ });
371
+ document.addEventListener('keydown', e => {
372
+ if (e.key === 'Escape' && !wsPop.hidden) {
373
+ e.preventDefault(); e.stopImmediatePropagation(); closePop(true);
374
+ }
375
+ });
376
+ }
377
+
378
+ // Small screens: the rail is a drawer behind a menu button.
379
+ const side = document.getElementById('side'), scrim = document.getElementById('scrim');
380
+ const railOpen = document.getElementById('rail-open'), content = document.querySelector('.content');
381
+ const mobile = matchMedia('(max-width: 900px)');
382
+ const openDrawer = (on, restoreFocus = true) => {
383
+ if (!side || !scrim) return;
384
+ closePop();
385
+ side.classList.toggle('drawer-open', on);
386
+ scrim.hidden = !on;
387
+ content.inert = on;
388
+ side.inert = mobile.matches && !on;
389
+ document.body.classList.toggle('drawer-active', on);
390
+ railOpen?.setAttribute('aria-expanded', String(on));
391
+ if (on) side.querySelector('a, button')?.focus();
392
+ else if (restoreFocus) railOpen?.focus();
393
+ };
394
+ if (side) side.inert = mobile.matches;
395
+ railOpen?.addEventListener('click', () => openDrawer(true));
396
+ document.getElementById('rail-close')?.addEventListener('click', () => openDrawer(false));
397
+ scrim?.addEventListener('click', () => openDrawer(false));
398
+ mobile.addEventListener('change', () => openDrawer(false, false));
399
+ document.addEventListener('keydown', e => {
400
+ if (!side?.classList.contains('drawer-open')) return;
401
+ if (e.key === 'Escape') { e.preventDefault(); openDrawer(false); }
402
+ if (e.key === 'Tab') {
403
+ const items = [...side.querySelectorAll('a, button')].filter(item => item.getClientRects().length && !item.disabled);
404
+ const first = items[0], last = items[items.length - 1];
405
+ if (e.shiftKey && document.activeElement === first) { e.preventDefault(); last?.focus(); }
406
+ else if (!e.shiftKey && document.activeElement === last) { e.preventDefault(); first?.focus(); }
407
+ }
408
+ });
409
+
410
+ // One handler for every [data-copy] button: put the text on the
411
+ // clipboard and confirm inline. The execCommand fallback covers
412
+ // non-secure origins, where navigator.clipboard is undefined.
413
+ document.addEventListener('click', async (e) => {
414
+ const btn = e.target.closest('[data-copy]');
415
+ if (!btn) return;
416
+ const text = btn.dataset.copy;
417
+ try {
418
+ await navigator.clipboard.writeText(text);
419
+ } catch {
420
+ const ta = document.createElement('textarea');
421
+ ta.value = text;
422
+ document.body.appendChild(ta);
423
+ ta.select();
424
+ document.execCommand('copy');
425
+ ta.remove();
426
+ }
427
+ const label = btn.textContent;
428
+ btn.textContent = 'copied ✓';
429
+ setTimeout(() => { btn.textContent = label; }, 1200);
430
+ });
431
+ })();
432
+ </script>
433
+ {% block scripts %}{% endblock %}
434
+ {#- The tour's stops: each page's own address and the rail item that names it; the last is the checklist. #}
435
+ {% set onb_tour = [
436
+ {'url': url_for('index'), 'sel': '.nav-item[href="' ~ url_for('index') ~ '"]', 'k': 'Runs', 'h': 'Every run you made or brought in',
437
+ 'p': "Each job, its solve rate and what failed. Open one to watch its trials live, then any trial's trace."},
438
+ {'url': url_for('benchmarks_page'), 'sel': '.nav-item[href="' ~ url_for('benchmarks_page') ~ '"]', 'k': 'Benchmarks', 'h': 'The catalogue',
439
+ 'p': 'What can be run, each benchmark with what runs it and how it is scored. One of your own is added here too.'},
440
+ {'url': url_for('new_run'), 'sel': '.nav-item[href="' ~ url_for('new_run') ~ '"]', 'k': 'Run builder', 'h': 'Build a run, step by step',
441
+ 'p': 'Benchmark, agents, model, where it runs. Review shows the exact script, and Run starts it.'},
442
+ {'url': url_for('compare'), 'sel': '.nav-item[href="' ~ url_for('compare') ~ '"]', 'k': 'Compare', 'h': 'Runs side by side, on the same tasks',
443
+ 'p': "Matched task by task, so a difference is the agent's and not a different set of tasks."},
444
+ {'url': url_for('settings_page'), 'sel': '.nav-item[href="' ~ url_for('settings_page') ~ '"]', 'k': 'Settings', 'h': 'Keys, hosts and judges',
445
+ 'p': 'Model providers, the machines that run benchmarks, and the two judges. Keys stay in a file on this machine.'},
446
+ {'url': url_for('settings_page'), 'sel': '#onb-panel', 'k': 'First steps', 'h': 'What is left to do',
447
+ 'p': 'Click a step: Nullius opens its page and points at what to do next. Hide it any time; it stays in the rail.'},
448
+ ] %}
449
+ {% if not embedded %}
450
+ <script src="{{ url_for('static', filename='onboarding.js') }}" data-state="{{ url_for('onboarding_state') }}" data-tour="{{ onb_tour|tojson|forceescape }}"></script>
451
+ {% endif %}
452
+ {#- Every notice a page is sent (Flask's flash) is a toast at the bottom left, as the builder's: it goes after a
453
+ few seconds - an error after twice as many - its bar counting them, paused while pointed at, or on its ×. #}
454
+ {% set notices = get_flashed_messages(with_categories=true) %}
455
+ {% if notices %}
456
+ <div class="toasts" role="status" aria-live="polite">
457
+ {% for category, message in notices %}<div class="toast {{ 'bad' if category == 'error' else 'ok' }}"><span class="toast-text">{{ message }}</span><button type="button" class="toast-close" aria-label="Dismiss">×</button><span class="toast-bar" aria-hidden="true"></span></div>{% endfor %}
458
+ </div>
459
+ <script>
460
+ document.querySelectorAll('.toast').forEach(t => {
461
+ const gone = () => { t.remove(); document.querySelector('.toasts:empty')?.remove(); };
462
+ t.querySelector('.toast-close').addEventListener('click', gone);
463
+ t.querySelector('.toast-bar').addEventListener('animationend', gone);
464
+ });
465
+ </script>
466
+ {% endif %}
467
+ <script src="{{ url_for('static', filename='controls.js') }}"></script>
468
+ {% if not embedded %}
469
+ <dialog id="settings-modal" class="settings-modal" aria-labelledby="settings-modal-title">
470
+ <header class="settings-modal-head">
471
+ <h2 id="settings-modal-title" tabindex="-1" autofocus>Settings</h2>
472
+ <button type="button" class="icon-btn" data-settings-close aria-label="Close Settings">×</button>
473
+ </header>
474
+ <iframe aria-label="Settings" id="settings-frame"></iframe>
475
+ </dialog>
476
+ <script src="{{ url_for('static', filename='settings/modal.js') }}"></script>
477
+ {% endif %}
478
+ </body>
479
+ </html>
@@ -0,0 +1,55 @@
1
+ {% extends "base.html" %}
2
+ {% block title %}Run builder — Nullius{% endblock %}
3
+ {% block crumb %}/ run builder{% endblock %}
4
+ {% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='builder/command-builder.css') }}">{% endblock %}
5
+ {% block body %}
6
+ <div id="nullius-builder" data-agent-marks="{{ agent_marks|tojson|forceescape }}">
7
+ <header class="nb-heading">
8
+ <div><h1>Set up the next experiment.</h1><p>Choose what to test. Keep every setting explicit.</p></div>
9
+ <div class="nb-headingactions">
10
+ <button class="nb-button" id="nb-saved-toggle" aria-haspopup="dialog" aria-controls="nb-saved">Saved recipes</button>
11
+ <button class="nb-button" id="nb-import">Import recipe</button>
12
+ <button class="nb-button" id="nb-save">Save recipe</button>
13
+ <button class="nb-button" id="nb-startover" title="Forget the recipe on this page and start from the defaults">Start over</button>
14
+ <input type="file" accept=".json,application/json" id="nb-import-file" hidden aria-label="Import a recipe JSON file">
15
+ </div>
16
+ </header>
17
+ {#- a message is a toast at the bottom left: it goes after a few seconds, its bar counting them, or on its ×.
18
+ A popover, so it shows above the Saved recipes dialog too -#}
19
+ <div id="nb-status" class="nb-toast" role="status" aria-live="polite" popover="manual"><span class="nb-toast-text"></span><button type="button" class="nb-toast-close" aria-label="Dismiss">×</button><span class="nb-toast-bar" aria-hidden="true"></span></div>
20
+ <dialog id="nb-saved" class="nb-dialog nb-saved" aria-labelledby="nb-saved-title">
21
+ <div class="nb-dialoghead"><h2 id="nb-saved-title">Saved recipes</h2><button type="button" class="nb-dialogclose" id="nb-saved-close" aria-label="Close">×</button></div>
22
+ <div id="nb-saved-list"></div>
23
+ </dialog>
24
+ <dialog id="nb-save-dialog" class="nb-dialog" aria-labelledby="nb-save-title">
25
+ <form id="nb-save-form">
26
+ <div class="nb-kicker">Your experiment</div>
27
+ <h2 id="nb-save-title">Give this recipe a name.</h2>
28
+ <p class="nb-note">A name you will recognise in your saved recipes.</p>
29
+ <label class="nb-field" for="nb-recipe-title">Recipe name
30
+ <input id="nb-recipe-title" type="text" required maxlength="80" autocomplete="off" placeholder="driver vs reference">
31
+ </label>
32
+ <p class="nb-note" id="nb-save-message" aria-live="polite"></p>
33
+ <div class="nb-dialogactions"><button class="nb-button" id="nb-save-cancel" type="button">Cancel</button><button class="nb-button nb-primary" id="nb-save-submit" type="submit">Save recipe</button></div>
34
+ </form>
35
+ </dialog>
36
+ <nav class="nb-steps" aria-label="Recipe sections"></nav>
37
+ <div class="nb-layout">
38
+ <section class="nb-editor" aria-label="Recipe configuration">
39
+ <div id="nb-form"></div>
40
+ <footer class="nb-bottom"><span></span><div><button class="nb-button" id="nb-back">Back</button> <button class="nb-button nb-primary" id="nb-next">Dataset →</button></div></footer>
41
+ </section>
42
+
43
+ </div>
44
+ <datalist id="nb-models">{% for model in builder_data.models %}<option value="{{ model }}"></option>{% endfor %}</datalist>
45
+ <datalist id="nb-paths">{% for path in builder_data.seenLocal %}<option value="{{ path }}"></option>{% endfor %}</datalist>
46
+ <datalist id="nb-registry">{% for dataset in builder_data.datasets if dataset.registry %}<option value="{{ dataset.registry }}">{{ dataset.title }}</option>{% endfor %}{% for name in builder_data.seenRegistry %}<option value="{{ name }}"></option>{% endfor %}</datalist>
47
+ <noscript><p class="nb-notice">Enable JavaScript to build a recipe. Nothing runs from this page.</p></noscript>
48
+ </div>
49
+ <script id="nb-schema" type="application/json">{{ builder_data|tojson }}</script>
50
+ {% endblock %}
51
+ {% block scripts %}
52
+ <script src="{{ url_for('static', filename='builder/command-builder-core.js') }}"></script>
53
+ <script src="{{ url_for('static', filename='builder/command-builder.js') }}"></script>
54
+ <script src="{{ url_for('static', filename='builder/model-picker.js') }}"></script>
55
+ {% endblock %}
@@ -0,0 +1,32 @@
1
+ {#- The Add dialog of the Benchmarks, Agents and Capabilities pages: two ways in, as tabs. With an assistant: a
2
+ prompt for any coding assistant, built from three fields (howto.prompt, filled by catalogue/add.js); by
3
+ hand: what the caller puts in. docs/standard.md, "Import by hand" and "With an assistant". -#}
4
+ {% macro add_dialog(a, prompts, kind) -%}
5
+ <dialog class="std-how" id="std-how" aria-labelledby="std-how-h">
6
+ <div class="std-how-head"><h2 id="std-how-h">Add to catalogue</h2><button type="button" class="std-how-x" id="std-how-close" aria-label="Close"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 3.5l9 9M12.5 3.5l-9 9"/></svg></button></div>
7
+ <div class="std-how-tabs" role="tablist" aria-label="How to add {{ a }}">
8
+ <button type="button" role="tab" id="std-tab-assist" aria-controls="std-pane-assist" aria-selected="true">With an assistant</button>
9
+ <button type="button" role="tab" id="std-tab-hand" aria-controls="std-pane-hand" aria-selected="false" tabindex="-1">By hand</button>
10
+ </div>
11
+
12
+ <section id="std-pane-assist" role="tabpanel" aria-labelledby="std-tab-assist" class="std-pane">
13
+ <p>Say what to add. Paste the prompt below into your coding assistant (Claude Code, Codex, Cursor…). It includes your catalogue's location.</p>
14
+ <div class="std-add-fields">
15
+ <label for="std-add-kind">Add<select id="std-add-kind">{% for key in prompts %}<option value="{{ key }}"{% if key == kind %} selected{% endif %}>{{ key|capitalize }}</option>{% endfor %}</select></label>
16
+ <label for="std-add-name">Name<input type="text" id="std-add-name" autocomplete="off" required></label>
17
+ <label for="std-add-source" class="wide">Source <small>a link: its git repository, its Hugging Face page, its package, or any other</small><input type="text" id="std-add-source" autocomplete="off" spellcheck="false" required></label>
18
+ <label for="std-add-remark" class="wide">Remark <small>optional: anything the assistant should know; it reads what it is from the source</small><textarea id="std-add-remark" rows="3"></textarea></label>
19
+ </div>
20
+ <div class="std-code std-prompt">
21
+ <div class="std-code-head"><span>prompt</span><button type="button" class="std-copy" id="std-add-copy" disabled>Copy</button></div>
22
+ <pre><code id="std-add-prompt" aria-live="polite"></code></pre>
23
+ </div>
24
+ {% for key, prompt in prompts.items() %}<template data-add-kind="{{ key }}">{{ prompt }}</template>{% endfor %}
25
+ <p class="std-add-hint" id="std-add-hint">Fill in the name and the source to copy it.</p>
26
+ </section>
27
+
28
+ <section id="std-pane-hand" role="tabpanel" aria-labelledby="std-tab-hand" class="std-pane" hidden>
29
+ {{ caller() }}
30
+ </section>
31
+ </dialog>
32
+ {%- endmacro %}