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,124 @@
1
+ {% extends "base.html" %}
2
+ {% block title %}Classifier vs judge · {{ job.job_id }} — Nullius{% endblock %}
3
+ {% block crumb %}/ <a href="{{ url_for('job', job_id=job.job_id) }}">{{ job.job_id }}</a> / classifier vs judge{% endblock %}
4
+ {% block head %}
5
+ <style>
6
+ .rec-counts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 18px; font-size: 13px; }
7
+ .rec-counts .fk { color: var(--text-dim); font-size: 10px; letter-spacing: .7px; text-transform: uppercase; display: block; margin-bottom: 4px; }
8
+ .rec-threshold { display: inline-flex; gap: 8px; align-items: center; }
9
+ .rec-threshold input { width: 5em; }
10
+ .rec-section h2 { margin: 22px 0 8px; }
11
+ .rec-section p.faint { margin: 0 0 8px; }
12
+ .rec-compatible { color: var(--text-dim); }
13
+ .rec-suggest { font-style: italic; }
14
+ details.rec-fold summary { cursor: pointer; }
15
+ </style>
16
+ {% endblock %}
17
+ {% block body %}
18
+ <header class="run-header">
19
+ <div class="page-title"><h1>Classifier vs judge <span class="badge">experimental</span></h1><span class="mono">{{ job.job_id }}</span></div>
20
+ <p class="subtitle" id="reconcile-meaning">
21
+ The <strong>recorded outcome</strong> is the classifier's deterministic reading of the exception, verifier and patch; the judge's
22
+ <span class="mono">failure_cause</span> is its reading of the transcript. Where they <strong>disagree</strong> is listed first. The recorded outcome never changes.
23
+ </p>
24
+ </header>
25
+
26
+ {% if not view.applies %}
27
+ <div class="alert warn" id="reconcile-not-applicable">This is a control run ({{ job.agent_label }}): its outcomes are a check on the tasks and the verifier, not an agent's attempt, so a failure cause over its transcript has nothing to reconcile with.</div>
28
+ {% else %}
29
+ {% set c = view.counts %}
30
+ <div class="rec-counts" id="reconcile-counts" aria-label="What was compared">
31
+ <div><span class="fk">Trials</span><span data-count="trials">{{ c.trials }}</span></div>
32
+ <div><span class="fk">Asked failure cause</span><span data-count="asked">{{ c.asked }}</span> <span class="faint">(unresolved; a resolved trial is not asked)</span></div>
33
+ <div><span class="fk">Judged</span><span data-count="judged">{{ c.judged }}</span>{% if c.unjudged %} <span class="faint">· <span data-count="unjudged">{{ c.unjudged }}</span> not judged</span>{% endif %}</div>
34
+ <div><span class="fk">Comparable</span><span data-count="comparable">{{ c.comparable }}</span></div>
35
+ <div><span class="fk">Agree</span><span data-count="agree">{{ c.agree }}</span></div>
36
+ <div><span class="fk">Disagree</span><span data-count="disagree">{{ c.disagree }}</span></div>
37
+ <div><span class="fk">Suggested</span><span data-count="suggested">{{ c.suggested }}</span></div>
38
+ <div><span class="fk">Below threshold</span><span data-count="gated">{{ c.gated }}</span></div>
39
+ <div><span class="fk">Not comparable</span><span data-count="not_comparable">{{ c.not_comparable }}</span></div>
40
+ <div><span class="fk">Confidence threshold</span>
41
+ <form method="get" class="rec-threshold" id="reconcile-threshold"><input type="number" name="threshold" min="0" max="1" step="0.05" value="{{ '%.2f'|format(view.threshold) }}" aria-label="Confidence threshold"><button class="btn sm ghost" type="submit">Apply</button>{% if view.threshold != default_threshold %}<a class="small faint" href="{{ url_for('reconcile_page', job_id=job.job_id) }}">default {{ '%.2f'|format(default_threshold) }}</a>{% endif %}</form>
42
+ <span class="faint small">the judge's own confidence on the pick; a disagreement below it is listed as noise, not as a finding</span></div>
43
+ </div>
44
+
45
+ {% macro rows_table(rows, id, with_suggests=False) %}
46
+ <div class="table-wrap" role="region" tabindex="0">
47
+ <table class="grid" id="{{ id }}">
48
+ <thead><tr>
49
+ <th>Trial</th><th>Recorded outcome</th><th title="The failure_cause options this outcome does not contradict">Compatible with</th>
50
+ <th>Judge's pick</th><th title="The confidence the judge returned with the pick">Confidence</th><th title="The probability the judge put on the pick">p(pick)</th>
51
+ {% if with_suggests %}<th>Suggests <span class="badge">experimental</span></th>{% endif %}
52
+ </tr></thead>
53
+ <tbody>
54
+ {% for r in rows %}
55
+ <tr data-trial="{{ r.trial_name }}" data-status="{{ r.status }}" data-outcome="{{ r.outcome }}" data-choice="{{ r.choice or '' }}">
56
+ <td><a class="mono" href="{{ url_for('trial', job_id=job.job_id, trial_name=r.trial_name) }}">{{ r.task }}</a></td>
57
+ <td><span class="tag oc-{{ r.outcome }}">{{ r.outcome_label }}</span></td>
58
+ <td class="rec-compatible mono small">{{ r.compatible|join(' · ') if r.compatible else '—' }}</td>
59
+ <td>{% if r.choice %}<strong class="mono">{{ r.choice }}</strong>{% if r.version and r.version != QUESTIONS_VERSION %} <span class="badge" title="Judged under an earlier question vocabulary">{{ r.version }}</span>{% endif %}{% else %}<span class="faint">not judged</span>{% endif %}</td>
60
+ <td class="mono small">{% if r.confidence is not none %}{{ '%.0f'|format(r.confidence * 100) }}%{% else %}—{% endif %}</td>
61
+ <td class="mono small">{% if r.p is not none %}{{ '%.0f'|format(r.p * 100) }}%{% else %}—{% endif %}</td>
62
+ {% if with_suggests %}<td class="rec-suggest">{% if r.suggests %}{% for s in r.suggests %}<span class="tag oc-{{ s }}">{{ C_LABELS[s] }}</span>{% if not loop.last %} or {% endif %}{% endfor %}{% if r.likely %} <span class="mono small" title="likely_outcome: the judge's own pick over the classifier's labels, {{ '%.0f'|format((r.likely_p or 0) * 100) }}% with confidence {{ '%.0f'|format((r.likely_confidence or 0) * 100) }}%; experimental, never the recorded outcome">direct {{ '%.0f'|format((r.likely_p or 0) * 100) }}%</span>{% endif %} <span class="faint small">— a suggestion from the transcript; the recorded outcome stays {{ r.outcome_label }}</span>{% else %}—{% endif %}</td>{% endif %}
63
+ </tr>
64
+ {% endfor %}
65
+ </tbody>
66
+ </table>
67
+ </div>
68
+ {% endmacro %}
69
+
70
+ <section class="rec-section" id="reconcile-disagree">
71
+ <h2>Disagreements <span class="mono small">{{ c.disagree }}</span></h2>
72
+ <p class="faint">The judge's pick is not one the recorded outcome allows. Strongest first: by the judge's confidence, then the probability on the pick.</p>
73
+ {% if view.rows.disagree %}{{ rows_table(view.rows.disagree, 'reconcile-disagreements') }}{% else %}<p class="footnote">None above the threshold.</p>{% endif %}
74
+ </section>
75
+
76
+ {% if view.rows.other %}
77
+ <section class="rec-section" id="reconcile-other">
78
+ <h2>Cause outside the list <span class="mono small">{{ c.other }}</span></h2>
79
+ <p class="faint">The judge chose <span class="mono">other</span>: a cause none of its options describes. Not a claim about which option the classifier should have used, so listed apart from the disagreements.</p>
80
+ {{ rows_table(view.rows.other, 'reconcile-others') }}
81
+ </section>
82
+ {% endif %}
83
+
84
+ {% if view.rows.suggestion %}
85
+ <section class="rec-section" id="reconcile-suggestions">
86
+ <h2>Suggestions for unknown outcomes <span class="mono small">{{ c.suggested }}</span> <span class="badge">experimental</span></h2>
87
+ <p class="faint">The classifier could not place these trials. The judge's pick names the outcome labels it is compatible with — a place to look, never a reclassification: the recorded outcome stays <span class="tag oc-unknown">{{ C_LABELS.unknown }}</span>.</p>
88
+ {{ rows_table(view.rows.suggestion, 'reconcile-suggested', with_suggests=True) }}
89
+ </section>
90
+ {% endif %}
91
+
92
+ <section class="rec-section" id="reconcile-agree">
93
+ <details class="rec-fold"><summary>Agreements <span class="mono small">{{ c.agree }}</span> — the pick is one the outcome allows</summary>
94
+ {% if view.rows.agree %}{{ rows_table(view.rows.agree, 'reconcile-agreements') }}{% else %}<p class="footnote">None.</p>{% endif %}
95
+ </details>
96
+ </section>
97
+
98
+ <section class="rec-section" id="reconcile-gated">
99
+ <details class="rec-fold"><summary>Below the confidence threshold <span class="mono small">{{ c.gated }}</span> — judged, but at a confidence under {{ '%.2f'|format(view.threshold) }}; listed here rather than dropped</summary>
100
+ {% if view.rows.gated %}{{ rows_table(view.rows.gated, 'reconcile-gated-rows', with_suggests=True) }}{% else %}<p class="footnote">None.</p>{% endif %}
101
+ </details>
102
+ </section>
103
+
104
+ <section class="rec-section" id="reconcile-not-comparable">
105
+ <details class="rec-fold"><summary>Not comparable <span class="mono small">{{ c.not_comparable }}</span> — the recorded outcome makes no claim a failure cause could contradict, and the pick suggests no label</summary>
106
+ {% if view.rows.not_comparable %}{{ rows_table(view.rows.not_comparable, 'reconcile-not-comparable-rows') }}{% else %}<p class="footnote">None.</p>{% endif %}
107
+ </details>
108
+ </section>
109
+
110
+ <section class="rec-section" id="reconcile-not-judged">
111
+ <details class="rec-fold"><summary>Not judged <span class="mono small">{{ view.rows.not_judged|length }}</span> — no failure cause stored (resolved trials are never asked one)</summary>
112
+ {% if view.rows.not_judged %}{{ rows_table(view.rows.not_judged, 'reconcile-not-judged-rows') }}{% else %}<p class="footnote">None.</p>{% endif %}
113
+ </details>
114
+ </section>
115
+
116
+ <h2>How the two vocabularies meet</h2>
117
+ <div class="glossary">
118
+ <p class="faint">The classifier's labels and the judge's options are not the same list, so a trial <em>agrees</em> when the pick is one its outcome does not contradict. A label with several compatible options is one the classifier cannot split further; a label with none is not comparable.</p>
119
+ <dl class="cols" id="reconcile-table">
120
+ {% for k in C_ORDER %}<div><dt><span class="tag oc-{{ k }}">{{ C_LABELS[k] }}</span></dt><dd class="mono small">{{ COMPATIBLE[k]|join(' · ') if COMPATIBLE[k] else 'no correspondence — not comparable' }}</dd></div>{% endfor %}
121
+ </dl>
122
+ </div>
123
+ {% endif %}
124
+ {% endblock %}
@@ -0,0 +1,272 @@
1
+ {% extends "base.html" %}
2
+ {% block title %}{{ 'New workspace' if mode == 'new' else 'Import runs' }} — Nullius{% endblock %}
3
+ {% block crumb %}/ {{ 'new workspace' if mode == 'new' else 'import' }}{% endblock %}
4
+ {% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='catalogue/catalogue.css') }}">{% endblock %}
5
+ {% block body %}
6
+ <div class="setup-wrap import-setup">
7
+ {% if mode == 'add' %}
8
+ <h1>Add runs to {{ workspace.label }}</h1>
9
+ <p class="subtitle">Harbor{% if IMPORTERS %}, {{ IMPORTERS|join(' and ') }}{% endif %} output, recognised by shape.</p>
10
+ {% elif mode == 'new' %}
11
+ <h1>New workspace</h1>
12
+ <p class="subtitle">Point it at run folders on this machine, or drop them here.</p>
13
+ {% else %}
14
+ <h1>Import runs</h1>
15
+ <p class="subtitle">Point it at run folders on this machine, or drop them here.</p>
16
+ {% endif %}
17
+
18
+ <div class="setup-card">
19
+ {# a notice of this request is the base layout's, as a toast; this card says only when there is none #}
20
+ {% set flashes = get_flashed_messages(with_categories=true) %}
21
+ {% if not flashes and scanned %}
22
+ <div class="alert warn">Nothing job-shaped under the scanned path.</div>
23
+ {% endif %}
24
+
25
+ <!-- novalidate: `required` stays for assistive tech, but we render the
26
+ message ourselves instead of the browser's native bubble. -->
27
+ <form method="post" action="{{ url_for('use_path') }}" id="pathform" novalidate><input type="hidden" name="csrf" value="{{ csrf_token() }}">
28
+ <input type="hidden" name="new" id="ws-new" value="{{ '1' if mode == 'new' else '0' }}">
29
+ {% if mode != 'add' %}
30
+ <label class="field-label" for="ws-name">Workspace name</label>
31
+ <input type="text" name="name" id="ws-name" placeholder="optional — two random words otherwise" autocomplete="off" spellcheck="false" style="margin-bottom:1rem">
32
+ {% endif %}
33
+ <label class="field-label" for="path">Run folders</label>
34
+ <div id="path-list" data-suggestions-url="{{ url_for('folder_suggestions') }}">
35
+ <div class="path-row">
36
+ <input type="text" name="path" id="path" placeholder="/path/to/jobs — or a pattern: …/jobs_*, …/**/jobs"
37
+ required autofocus autocomplete="off" spellcheck="false"
38
+ aria-describedby="path-error">
39
+ <button type="button" class="row-x" aria-label="Remove this path" hidden>×</button>
40
+ <button type="button" class="add-btn" title="Add another path"
41
+ aria-label="Add another path">+</button>
42
+ </div>
43
+ </div>
44
+ <p class="field-error" id="path-error" role="alert" hidden></p>
45
+ </form>
46
+
47
+ <div class="divider">or</div>
48
+
49
+ <form method="post" action="{{ url_for('upload') }}" enctype="multipart/form-data" id="up"><input type="hidden" name="csrf" value="{{ csrf_token() }}">
50
+ <label class="drop" id="drop">
51
+ <input type="file" id="picker" name="files" webkitdirectory directory multiple hidden>
52
+ <div><strong>Drop folders here</strong> or click to browse</div>
53
+ </label>
54
+ </form>
55
+ <ul class="staged" id="staged"></ul>
56
+
57
+ <div class="path-actions submit-row">
58
+ <button class="btn primary" type="button" id="parse-btn" data-label="{{ 'Add runs' if mode == 'add' else 'Open workspace' }}">{{ 'Add runs' if mode == 'add' else 'Open workspace' }}</button>
59
+ <button class="btn ghost sm" type="button" id="clear-staged" hidden>Clear folders</button>
60
+ <span class="footnote" id="status"></span>
61
+ </div>
62
+ </div>
63
+
64
+ <div class="import-next"><span>No run yet?</span><a href="{{ url_for('new_run') }}">Build one <span aria-hidden="true">→</span></a></div>
65
+ </div>
66
+
67
+ <div id="path-suggestions" class="ui-select-menu path-suggestions" role="listbox" aria-label="Folders" hidden></div>
68
+ <script src="{{ url_for('static', filename='runs/path-suggestions.js') }}" defer></script>
69
+ <script>
70
+ const drop = document.getElementById('drop');
71
+ const picker = document.getElementById('picker');
72
+ const status = document.getElementById('status');
73
+
74
+ /* ---- repeatable path rows: × on every row but the only one, + on the last ---- */
75
+ const pathList = document.getElementById('path-list');
76
+
77
+ pathList.addEventListener('click', e => {
78
+ if (e.target.matches('.add-btn')) {
79
+ const row = pathList.firstElementChild.cloneNode(true);
80
+ const field = row.querySelector('input');
81
+ field.value = '';
82
+ field.removeAttribute('id'); // ids must stay unique
83
+ field.removeAttribute('required'); // only the first row is mandatory
84
+ field.removeAttribute('autofocus');
85
+ field.setAttribute('aria-label', 'Additional path');
86
+ pathList.appendChild(row);
87
+ field.focus();
88
+ syncRowButtons();
89
+ } else if (e.target.matches('.row-x')) {
90
+ e.target.closest('.path-row').remove();
91
+ syncRowButtons();
92
+ }
93
+ });
94
+
95
+ function syncRowButtons() {
96
+ const rows = [...pathList.children];
97
+ rows.forEach((row, i) => {
98
+ row.querySelector('.row-x').hidden = rows.length === 1;
99
+ row.querySelector('.add-btn').hidden = i !== rows.length - 1;
100
+ });
101
+ }
102
+ syncRowButtons();
103
+
104
+ // --- path field validation, in-page rather than the native bubble ---
105
+ const pathForm = document.getElementById('pathform');
106
+ const pathInput = document.getElementById('path');
107
+ const pathError = document.getElementById('path-error');
108
+
109
+ function fieldError(msg) {
110
+ pathError.textContent = msg;
111
+ pathError.hidden = false;
112
+ pathInput.classList.add('invalid');
113
+ pathInput.setAttribute('aria-invalid', 'true');
114
+ pathInput.focus();
115
+ }
116
+ function clearFieldError() {
117
+ if (pathError.hidden) return;
118
+ pathError.hidden = true;
119
+ pathInput.classList.remove('invalid');
120
+ pathInput.removeAttribute('aria-invalid');
121
+ }
122
+ pathInput.addEventListener('input', clearFieldError);
123
+
124
+ // Server-side messages are dismissible; they also clear once you retype.
125
+ document.querySelectorAll('.alert').forEach(alert => {
126
+ const x = document.createElement('button');
127
+ x.type = 'button';
128
+ x.className = 'alert-x';
129
+ x.setAttribute('aria-label', 'Dismiss');
130
+ x.addEventListener('click', () => alert.remove());
131
+ alert.appendChild(x);
132
+ });
133
+ pathInput.addEventListener('input', () =>
134
+ document.querySelectorAll('.alert.error').forEach(a => a.remove()), { once: true });
135
+
136
+ // dragenter/dragleave fire again for every descendant the cursor crosses, so a
137
+ // plain add/remove pair flickers. Count depth instead and clear on drop.
138
+ let depth = 0;
139
+ drop.addEventListener('dragenter', ev => {
140
+ ev.preventDefault();
141
+ if (++depth === 1) drop.classList.add('over');
142
+ });
143
+ drop.addEventListener('dragover', ev => ev.preventDefault());
144
+ drop.addEventListener('dragleave', ev => {
145
+ ev.preventDefault();
146
+ if (--depth <= 0) { depth = 0; drop.classList.remove('over'); }
147
+ });
148
+
149
+ // A file dropped anywhere else would otherwise navigate the tab to that file.
150
+ ['dragover', 'drop'].forEach(e =>
151
+ document.addEventListener(e, ev => ev.preventDefault()));
152
+
153
+ drop.addEventListener('drop', async ev => {
154
+ ev.preventDefault();
155
+ depth = 0;
156
+ drop.classList.remove('over');
157
+ const items = [...ev.dataTransfer.items].map(i => i.webkitGetAsEntry()).filter(Boolean);
158
+ status.textContent = 'Reading folders…';
159
+ for (const entry of items) {
160
+ const files = [];
161
+ await walk(entry, files);
162
+ if (files.length) stage(entry.name, files);
163
+ }
164
+ status.textContent = '';
165
+ });
166
+
167
+ // Recurse a dropped directory, tagging each file with its relative path.
168
+ function walk(entry, out, prefix = '') {
169
+ return new Promise(resolve => {
170
+ if (entry.isFile) {
171
+ entry.file(f => { out.push([f, prefix + entry.name]); resolve(); });
172
+ } else if (entry.isDirectory) {
173
+ const reader = entry.createReader();
174
+ const readAll = () => reader.readEntries(async batch => {
175
+ if (!batch.length) return resolve();
176
+ for (const e of batch) await walk(e, out, prefix + entry.name + '/');
177
+ readAll();
178
+ });
179
+ readAll();
180
+ } else resolve();
181
+ });
182
+ }
183
+
184
+ /* ---- staging: collect folders, upload only on demand ---- */
185
+ const stagedList = document.getElementById('staged');
186
+ const parseBtn = document.getElementById('parse-btn');
187
+ const clearBtn = document.getElementById('clear-staged');
188
+ let staged = []; // [{ name, files: [[File, relativePath], …] }]
189
+
190
+ // The picker hands back a flat FileList; group it by its top-level folder so
191
+ // selecting several folders in a row stages them separately.
192
+ picker.addEventListener('change', () => {
193
+ const groups = new Map();
194
+ for (const f of picker.files) {
195
+ const rel = f.webkitRelativePath || f.name;
196
+ const top = rel.split('/')[0];
197
+ if (!groups.has(top)) groups.set(top, []);
198
+ groups.get(top).push([f, rel]);
199
+ }
200
+ groups.forEach((files, name) => stage(name, files));
201
+ picker.value = ''; // let the same folder be re-picked later
202
+ });
203
+
204
+ function stage(name, files) {
205
+ if (staged.some(s => s.name === name)) {
206
+ status.textContent = `“${name}” is already staged.`;
207
+ return;
208
+ }
209
+ status.textContent = '';
210
+ staged.push({ name, files });
211
+ renderStaged();
212
+ }
213
+
214
+ function renderStaged() {
215
+ stagedList.innerHTML = '';
216
+ staged.forEach((s, i) => {
217
+ const li = document.createElement('li');
218
+ li.innerHTML = `<span class="staged-name mono"></span>
219
+ <span class="staged-count faint"></span>
220
+ <button type="button" class="row-x" aria-label="Remove">×</button>`;
221
+ li.querySelector('.staged-name').textContent = s.name;
222
+ li.querySelector('.staged-count').textContent =
223
+ `${s.files.length} file${s.files.length === 1 ? '' : 's'}`;
224
+ li.querySelector('.row-x').addEventListener('click', () => {
225
+ staged.splice(i, 1);
226
+ renderStaged();
227
+ });
228
+ stagedList.appendChild(li);
229
+ });
230
+ clearBtn.hidden = staged.length === 0;
231
+ const total = staged.reduce((n, s) => n + s.files.length, 0);
232
+ parseBtn.textContent = staged.length
233
+ ? `Upload ${staged.length} folder${staged.length === 1 ? '' : 's'} (${total} files)`
234
+ : parseBtn.dataset.label;
235
+ }
236
+
237
+ clearBtn.addEventListener('click', () => {
238
+ staged = [];
239
+ status.textContent = '';
240
+ renderStaged();
241
+ });
242
+
243
+ const typedPaths = () =>
244
+ [...pathList.querySelectorAll('input[name=path]')].map(i => i.value.trim()).filter(Boolean);
245
+
246
+ /* One button for the whole card: uploads staged folders when there are any,
247
+ carrying typed paths along; otherwise just submits the paths. */
248
+ parseBtn.addEventListener('click', async () => {
249
+ const paths = typedPaths();
250
+ if (!staged.length) {
251
+ if (!paths.length) return fieldError('Enter a path, or add a folder below.');
252
+ return pathForm.submit();
253
+ }
254
+ const fd = new FormData();
255
+ let total = 0;
256
+ for (const s of staged) {
257
+ for (const [f, path] of s.files) { fd.append('files', f, path); total++; }
258
+ }
259
+ paths.forEach(p => fd.append('path', p));
260
+ const nameField = document.getElementById('ws-name');
261
+ fd.append('name', nameField ? nameField.value.trim() : '');
262
+ fd.append('new', document.getElementById('ws-new').value);
263
+ fd.append('csrf', '{{ csrf_token() }}');
264
+ parseBtn.disabled = true;
265
+ status.textContent = `Uploading ${total} files…`;
266
+ const res = await nulliusFetch('{{ url_for("upload") }}', { method: 'POST', body: fd });
267
+ if (res.redirected) location.href = res.url;
268
+ else document.open(), document.write(await res.text()), document.close();
269
+ });
270
+ renderStaged();
271
+ </script>
272
+ {% endblock %}
@@ -0,0 +1,51 @@
1
+ {% extends "base.html" %}
2
+ {% block title %}Runs — Nullius{% endblock %}
3
+ {% block crumb %}/ runs{% endblock %}
4
+ {% block head %}<link rel="stylesheet" href="{{ url_for('static', filename='runs/start.css') }}">{% endblock %}
5
+ {% block body %}
6
+ {# No workspace open: the two ways to have runs - start one, or bring the ones
7
+ made elsewhere - then the workspaces already here, and the mark last. #}
8
+ <div class="start">
9
+ <header class="start-head">
10
+ <div class="start-title"><h1>Runs</h1><span class="start-count">0 runs</span></div>
11
+ <p>Your next experiment starts here.</p>
12
+ </header>
13
+
14
+ <div class="start-ways">
15
+ <section class="start-card" aria-labelledby="start-build">
16
+ <span class="start-ic" aria-hidden="true"><svg class="ic"><use href="#i-newrun"/></svg></span>
17
+ <h2 class="start-t" id="start-build">Build a run</h2>
18
+ <p class="start-d">Choose a benchmark, an agent and a model. Follow the results here.</p>
19
+ <a class="start-action start-primary" href="{{ url_for('new_run') }}">Open run builder <span aria-hidden="true">→</span></a>
20
+ </section>
21
+ <section class="start-card" aria-labelledby="start-bring">
22
+ <span class="start-ic" aria-hidden="true"><svg class="ic"><use href="#i-import"/></svg></span>
23
+ <h2 class="start-t" id="start-bring">Import results</h2>
24
+ <p class="start-d">Bring in ATIF trajectories or OpenTelemetry exports.</p>
25
+ <a class="start-action" href="{{ url_for('import_page', new=1) }}">Choose files or folder <span aria-hidden="true">↗</span></a>
26
+ </section>
27
+ </div>
28
+
29
+ {% if workspaces %}
30
+ <section class="start-ws" aria-labelledby="start-ws-title">
31
+ <h2 id="start-ws-title">Or open a workspace</h2>
32
+ <ul>
33
+ {% for ws in workspaces[:6] %}
34
+ <li><form method="post" action="{{ url_for('workspace_open', name=ws.name) }}"><input type="hidden" name="csrf" value="{{ csrf_token() }}">
35
+ <button class="start-ws-row" type="submit">
36
+ <span class="ws-avatar" style="--hue:{{ ws_hue(ws.name) }}">{{ ws.label[:2]|upper }}</span>
37
+ <span class="start-ws-text"><span>{{ ws.label }}</span><small>{{ ws.n_cached }} run{{ '' if ws.n_cached == 1 else 's' }} · {{ ws.roots|length }} folder{{ '' if ws.roots|length == 1 else 's' }}{% if ws.opened %} · opened {{ ws.opened[:10] }}{% endif %}</small></span>
38
+ <span class="start-go">Open →</span>
39
+ </button>
40
+ </form></li>
41
+ {% endfor %}
42
+ </ul>
43
+ {% if workspaces|length > 6 %}<a class="start-all" href="{{ url_for('workspaces_page') }}">All {{ workspaces|length }} workspaces →</a>{% endif %}
44
+ </section>
45
+ {% endif %}
46
+
47
+ <div class="start-signature" aria-hidden="true">
48
+ {% include 'runs/ascii-mark.html' %}
49
+ </div>
50
+ </div>
51
+ {% endblock %}
@@ -0,0 +1,82 @@
1
+ {% macro key_summary(name, state, editor) %}
2
+ <div class="st-key-summary">
3
+ <span class="st-key-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><circle cx="8" cy="9" r="4"/><path d="m11 12 8 8 3-3-2-2-2 2-2-2 2-2-3-3"/></svg></span>
4
+ <div class="st-key-copy"><h3>{{ name }}</h3></div>
5
+ <span class="st-key-state" data-key-state="{{ state }}">{{ {'saved': 'Saved', 'missing': 'Not set', 'expired': 'Expired'}[state] }}</span>
6
+ <button type="button" class="btn sm ghost st-key-edit" data-key-edit data-key-label="{{ 'View' if not writable else 'Set up' if state == 'missing' else 'Edit' }}" aria-expanded="true" aria-controls="{{ editor }}" hidden>{{ 'View' if not writable else 'Set up' if state == 'missing' else 'Edit' }}</button>
7
+ </div>
8
+ {% endmacro %}
9
+ <section class="st-section" id="custom-keys" aria-labelledby="custom-keys-h">
10
+ <div class="st-section-head">
11
+ <div class="st-key-heading"><h2 id="custom-keys-h">Custom keys</h2>{% if writable %}<button type="button" class="btn sm ghost" data-key-add aria-controls="custom-key-new" aria-expanded="false" hidden><span aria-hidden="true">+</span> Add key</button>{% endif %}</div>
12
+ <p>Credentials for your agents and benchmarks.</p>
13
+ </div>
14
+ {% for b in benchmark_access %}
15
+ <div class="st-key-group" id="access-{{ b.key }}">
16
+ <h3 class="st-key-group-title">{{ b.title }}</h3>
17
+ {% for s in b.needs %}
18
+ {% set field_id = 'access-' ~ b.key ~ '-' ~ s.name %}
19
+ <article class="st-key-card" data-key-card="{{ field_id }}" data-key-kind="benchmark">
20
+ {{ key_summary(s.name, 'expired' if s.status.expired else 'saved' if s.status.set else 'missing', field_id ~ '-editor') }}
21
+ <div class="st-key-editor" id="{{ field_id }}-editor" data-key-editor>
22
+ {% if s.summary %}<p class="st-note">{{ s.summary }}</p>{% endif %}
23
+ {% if s.status.filename %}<p class="st-note">{{ s.status.filename }}</p>{% endif %}
24
+ {% if s.status.expires %}<p class="st-note">{{ 'Expired' if s.status.expired else 'Expires' }} {{ s.status.expires }}</p>{% endif %}
25
+ {% if writable %}
26
+ <div class="st-key-field">
27
+ <label for="{{ field_id }}">{{ {'value': 'Access key', 'file': 'Licence file', 'server': 'Server address'}[s.kind] }}</label>
28
+ <div class="st-key-inputrow">
29
+ {% if s.kind == 'file' %}<input id="{{ field_id }}" type="file" name="file" form="{{ field_id }}-set" required aria-label="{{ s.name }}: the licence file">
30
+ {% else %}<input class="st-input" id="{{ field_id }}" name="value" form="{{ field_id }}-set" type="password" required autocomplete="off" data-1p-ignore data-lpignore="true" spellcheck="false" aria-label="{{ s.name }}" placeholder="{{ 'host:port' if s.kind == 'server' else 'Enter a new key' if s.status.set else 'Paste your key' }}">{% endif %}
31
+ <button class="btn sm" type="submit" form="{{ field_id }}-set">Save</button>
32
+ </div>
33
+ </div>
34
+ {% if s.kind != 'value' or s.status.set or s.movable %}
35
+ <div class="st-key-footer">
36
+ {% if s.kind != 'value' %}<details class="st-key-expiry"><summary>Expiry</summary><label for="{{ field_id }}-expires">Expires on <span class="st-about">(optional)</span></label><input class="st-input" id="{{ field_id }}-expires" name="expires" form="{{ field_id }}-set" type="date"></details>{% endif %}
37
+ <div class="st-key-actions">
38
+ {% for action, label, show in [('delete', 'Remove', s.status.set), ('move', 'Move from saved settings', s.movable)] %}{% if show %}
39
+ <button class="btn sm ghost" type="submit" form="{{ field_id }}-{{ action }}">{{ label }}</button>
40
+ {% endif %}{% endfor %}
41
+ </div>
42
+ </div>
43
+ {% endif %}
44
+ {% endif %}
45
+ </div>
46
+ </article>
47
+ {% endfor %}
48
+ </div>
49
+ {% endfor %}
50
+ <p class="st-about" data-keys-empty{% if benchmark_access or agent_keys %} hidden{% endif %}>No custom keys yet.</p>
51
+ <div id="AGENT_KEYS">
52
+ {% for name in agent_keys %}{% if by.get(name) %}
53
+ {% set r = by[name] %}
54
+ <article class="st-key-card" data-key-card="agent-{{ name }}" data-key-kind="agent">
55
+ {{ key_summary(name, 'saved' if r.source != 'unset' else 'missing', 'agent-' ~ name ~ '-editor') }}
56
+ <div class="st-key-editor" id="agent-{{ name }}-editor" data-key-editor>
57
+ <article class="st-field st-key-field" id="{{ name }}" data-source="{{ r.source }}" data-secret="yes">
58
+ {% if writable %}
59
+ <label for="value-{{ name }}">Access key</label>
60
+ <input class="st-input" id="value-{{ name }}" name="value:{{ name }}" type="password" aria-label="New value for {{ name }}" autocomplete="off" data-1p-ignore data-lpignore="true" spellcheck="false">
61
+ <input type="hidden" name="clear:{{ name }}" value="">
62
+ {% if r.source != 'unset' %}<div class="st-key-actions"><button type="button" class="btn sm ghost" data-unset="{{ name }}">Remove key</button></div>{% endif %}
63
+ {% endif %}
64
+ {% if r.source == 'environment' %}<p class="st-note">Also set in the process environment. A replacement applies after restarting the app.</p>{% endif %}
65
+ {% if r.shadowed %}<p class="st-note">The file holds a different value, shadowed by the environment.</p>{% endif %}
66
+ {% if r.advice %}<p class="st-note">{{ r.advice }}</p>{% endif %}
67
+ </article>
68
+ </div>
69
+ </article>
70
+ {% endif %}{% endfor %}
71
+ {% if writable %}
72
+ <div class="st-key-card st-key-new" id="custom-key-new" data-key-new>
73
+ <h3>Add a key</h3>
74
+ <div class="st-key-new-fields">
75
+ <div class="st-key-field"><label for="agent-key-name">Name</label><input class="st-input" id="agent-key-name" name="agent_key_name" type="text" spellcheck="false" autocomplete="off" pattern="[A-Za-z_][A-Za-z0-9_]*"></div>
76
+ <div class="st-key-field"><label for="agent-key-value">Key</label><input class="st-input" id="agent-key-value" name="agent_key_value" type="password" autocomplete="off" data-1p-ignore data-lpignore="true" spellcheck="false"></div>
77
+ </div>
78
+ <div class="st-key-actions"><button type="button" class="btn sm ghost" data-key-new-cancel hidden>Cancel</button><button type="button" class="btn sm" data-key-new-save hidden>Add key</button></div>
79
+ </div>
80
+ {% endif %}
81
+ </div>
82
+ </section>
@@ -0,0 +1,27 @@
1
+ <section class="st-section" id="data-providers" aria-labelledby="data-providers-h" data-state="{{ url_for('settings_data_providers') }}"{% if writable %} data-csrf="{{ csrf }}" data-huggingface="{{ url_for('settings_huggingface') }}" data-dockerhub="{{ url_for('settings_sandbox_login') }}" data-dockerhub-remove="{{ url_for('settings_sandbox_logout') }}"{% endif %}>
2
+ <div class="st-section-head"><div class="st-provider-heading"><h2 id="data-providers-h">Data providers</h2>{% if writable %}<button type="button" class="btn sm ghost" data-data-add hidden><span aria-hidden="true">+</span> Add</button>{% endif %}</div></div>
3
+ <p class="bad" data-data-error role="status" hidden></p>
4
+ <button type="button" class="btn ghost st-provider-back" data-data-back hidden>← Data providers</button>
5
+ <p class="st-about" data-data-empty hidden>No providers added yet.</p>
6
+ {% macro logo(key) %}{% if key == 'huggingface' %}<img class="st-logo" src="{{ url_for('static', filename='brand/huggingface.svg') }}" alt="" width="28" height="28">{% else %}<img class="st-logo" src="{{ url_for('static', filename='brand/docker.svg') }}" alt="" width="28" height="28">{% endif %}{% endmacro %}
7
+ <div class="st-provider-catalogue" data-data-catalogue hidden>
8
+ <h3>Add a provider</h3>
9
+ <label class="st-search"><svg class="ic" aria-hidden="true"><use href="#i-search"/></svg><input type="search" data-data-search placeholder="Search data providers…" aria-label="Search data providers" autocomplete="off"></label>
10
+ <div class="st-provider-grid">{% for key, name in [('huggingface', 'Hugging Face'), ('dockerhub', 'Docker Hub')] %}<button type="button" class="st-provider-choice" data-data-select="{{ key }}" data-name="{{ name }}">{{ logo(key) }}<span>{{ name }}</span></button>{% endfor %}</div>
11
+ <p class="st-about" data-data-no-results hidden>No providers found.</p>
12
+ </div>
13
+ {% for key, name in [('huggingface', 'Hugging Face'), ('dockerhub', 'Docker Hub')] %}
14
+ <div class="st-card" data-data-card="{{ key }}" hidden>
15
+ <div class="st-provider-summary">{{ logo(key) }}<div><h3>{{ name }}</h3><p class="st-about" data-data-account></p></div><button type="button" class="btn sm ghost" data-data-edit>{{ 'Edit' if writable else 'View' }}</button></div>
16
+ <div data-data-fields hidden>
17
+ {% if writable %}
18
+ <form class="st-sandbox-rows" data-data-form autocomplete="off">
19
+ {% if key == 'dockerhub' %}<div class="st-row"><label class="st-row-label" for="data-dockerhub-user">Username</label><div class="st-row-value"><input class="st-input" id="data-dockerhub-user" name="username" type="text" autocomplete="off" spellcheck="false" required></div></div>{% endif %}
20
+ <div class="st-row"><label class="st-row-label" for="data-{{ key }}-token">Access token</label><div class="st-row-value"><input class="st-input" id="data-{{ key }}-token" name="token" type="password" autocomplete="off" data-1p-ignore data-lpignore="true" spellcheck="false" required></div></div>
21
+ <div class="st-row"><span class="st-row-label"></span><span class="st-row-value st-value"><button type="submit" class="btn sm">Save</button><button type="button" class="btn sm ghost" data-data-remove hidden>Remove</button></span></div>
22
+ </form>
23
+ {% endif %}
24
+ </div>
25
+ </div>
26
+ {% endfor %}
27
+ </section>