@citeark/agent 0.3.20

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 (347) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +128 -0
  3. package/data/dataset-source-registry.v1.json +300 -0
  4. package/dist/arkgraph/boot.js +6 -0
  5. package/dist/arkgraph/index.html +1 -0
  6. package/dist/arkgraph/viewer.css +1 -0
  7. package/dist/arkgraph/viewer.en.css +1 -0
  8. package/dist/arkgraph/viewer.en.js +49 -0
  9. package/dist/arkgraph/viewer.en.js.LEGAL.txt +56 -0
  10. package/dist/arkgraph/viewer.js +49 -0
  11. package/dist/arkgraph/viewer.js.LEGAL.txt +56 -0
  12. package/docker/claude-code/Dockerfile +97 -0
  13. package/docker/claude-code/codex-pro-relay.mjs +466 -0
  14. package/docker/claude-code/runtime-contract-check.mjs +79 -0
  15. package/docs/arkgraph-reading.md +79 -0
  16. package/docs/configuration.md +100 -0
  17. package/docs/integration.md +92 -0
  18. package/docs/maturity-plan.md +27 -0
  19. package/docs/npm-release.md +44 -0
  20. package/docs/paper-reading.md +40 -0
  21. package/docs/research-plan-granularity.md +27 -0
  22. package/docs/terminal.md +49 -0
  23. package/examples/toy-evaluation/compile-task.json +27 -0
  24. package/examples/toy-evaluation/paper.md +5 -0
  25. package/examples/toy-evaluation/repository/README.md +9 -0
  26. package/examples/toy-evaluation/repository/checkpoint.json +4 -0
  27. package/examples/toy-evaluation/repository/evaluate.py +17 -0
  28. package/examples/toy-evaluation/task.json +81 -0
  29. package/package.json +59 -0
  30. package/prompts/compile-research.md +58 -0
  31. package/prompts/execute-contract.md +72 -0
  32. package/prompts/execute-workspace-simple.md +51 -0
  33. package/prompts/execute-workspace.md +34 -0
  34. package/prompts/prepare-reproduction.md +82 -0
  35. package/prompts/repair-research.md +45 -0
  36. package/protocol/CAP.md +129 -0
  37. package/protocol/LICENSE +12 -0
  38. package/protocol/MAPPINGS.md +72 -0
  39. package/protocol/README.md +38 -0
  40. package/protocol/conformance-v2.0-alpha.1.json +36 -0
  41. package/protocol/examples/arkgraph/checkpoint-evaluation.json +309 -0
  42. package/protocol/examples/arkgraph/fixtures.mjs +49 -0
  43. package/protocol/examples/arkgraph/paper-free.json +291 -0
  44. package/protocol/examples/arkgraph/partial-failure.json +344 -0
  45. package/protocol/examples/arkgraph/training-evaluation.json +443 -0
  46. package/protocol/profiles/agent-trace.md +16 -0
  47. package/protocol/profiles/computational-run.md +16 -0
  48. package/protocol/profiles/core.md +15 -0
  49. package/protocol/profiles/public-bundle.md +18 -0
  50. package/protocol/profiles/reproduction.md +29 -0
  51. package/protocol/profiles/research-compilation.md +44 -0
  52. package/protocol/profiles/research-plan.md +39 -0
  53. package/protocol/profiles/restricted-evidence.md +15 -0
  54. package/runtime/bootstrap-autodl-runtime.sh +314 -0
  55. package/runtime/create-runtime-venv.sh +41 -0
  56. package/runtime/install-local-cpu-runtime.sh +23 -0
  57. package/runtime/install-scientific-runtime.sh +153 -0
  58. package/runtime/mineru/parse.py +62 -0
  59. package/runtime/mineru/requirements.txt +4 -0
  60. package/runtime/requirements-baseline.txt +38 -0
  61. package/schemas/cap/v2/activity.schema.json +47 -0
  62. package/schemas/cap/v2/agent.schema.json +32 -0
  63. package/schemas/cap/v2/assertion.schema.json +110 -0
  64. package/schemas/cap/v2/descriptor.schema.json +243 -0
  65. package/schemas/cap/v2/entity.schema.json +64 -0
  66. package/schemas/cap/v2/manifest.schema.json +67 -0
  67. package/schemas/cap/v2/relation.schema.json +82 -0
  68. package/schemas/compute-catalog.schema.json +63 -0
  69. package/schemas/compute-decision.schema.json +27 -0
  70. package/schemas/execution-contract.schema.json +1024 -0
  71. package/schemas/research-card.schema.json +30 -0
  72. package/schemas/research-inventory-draft.schema.json +366 -0
  73. package/schemas/research.schema.json +1044 -0
  74. package/schemas/result.schema.json +173 -0
  75. package/schemas/verification-policy.schema.json +47 -0
  76. package/schemas/verified-conclusion.schema.json +58 -0
  77. package/schemas/workspace-summary.schema.json +24 -0
  78. package/scripts/build-arkgraph-view.mjs +12 -0
  79. package/scripts/check-execution-feasibility.mjs +24 -0
  80. package/scripts/check-syntax.mjs +15 -0
  81. package/scripts/deterministic-asset-preparation.py +438 -0
  82. package/scripts/package-cap.mjs +23 -0
  83. package/scripts/package-local-agent.mjs +23 -0
  84. package/scripts/preview-arkgraph.mjs +25 -0
  85. package/scripts/replay-research-compiler-candidate.mjs +134 -0
  86. package/scripts/review-compiler-sources.mjs +44 -0
  87. package/scripts/run-asset-preparation.sh +17 -0
  88. package/scripts/run-research-plan.mjs +98 -0
  89. package/scripts/validate-asset-preparation.py +290 -0
  90. package/scripts/verify-local-runtime.mjs +57 -0
  91. package/scripts/verify-npm-package.mjs +57 -0
  92. package/src/adapters/paper2agent.mjs +107 -0
  93. package/src/assets/cache.mjs +159 -0
  94. package/src/assets/compute.mjs +98 -0
  95. package/src/assets/executor.mjs +145 -0
  96. package/src/assets/lifecycle.mjs +213 -0
  97. package/src/assets/manifest.mjs +242 -0
  98. package/src/assets/opportunistic-preparation.mjs +81 -0
  99. package/src/assets/plan.mjs +411 -0
  100. package/src/assets/prompts.mjs +29 -0
  101. package/src/assets/public-asset-probe.mjs +525 -0
  102. package/src/assets/qualification.mjs +119 -0
  103. package/src/assets/readiness.mjs +130 -0
  104. package/src/assets/reproduction-admission.mjs +355 -0
  105. package/src/assets/requirements.mjs +152 -0
  106. package/src/assets/source-grounding.mjs +341 -0
  107. package/src/assets/source-policy.mjs +118 -0
  108. package/src/autodl/client.mjs +260 -0
  109. package/src/autodl/ssh.mjs +380 -0
  110. package/src/autodl/tools.mjs +129 -0
  111. package/src/cap/redaction.mjs +38 -0
  112. package/src/cap/v2/archive.mjs +152 -0
  113. package/src/cap/v2/attestation.mjs +204 -0
  114. package/src/cap/v2/canonical-json.mjs +114 -0
  115. package/src/cap/v2/compilation-artifact.mjs +240 -0
  116. package/src/cap/v2/core.mjs +282 -0
  117. package/src/cap/v2/measurement-assessment-records.mjs +23 -0
  118. package/src/cap/v2/pipeline-artifact.mjs +922 -0
  119. package/src/cap/v2/read.mjs +41 -0
  120. package/src/cap/v2/reassessment-artifact.mjs +383 -0
  121. package/src/cap/v2/research-artifact.mjs +231 -0
  122. package/src/cap/v2/research-map-records.mjs +46 -0
  123. package/src/cap/v2/research-object-records.mjs +163 -0
  124. package/src/cap/v2/research-records.mjs +187 -0
  125. package/src/cap/v2/verify.mjs +642 -0
  126. package/src/cli.mjs +1146 -0
  127. package/src/compute/autodl-pro-compiler.mjs +347 -0
  128. package/src/compute/autodl-pro-executor.mjs +459 -0
  129. package/src/compute/autodl-pro-job.mjs +843 -0
  130. package/src/compute/autodl-pro-network.mjs +295 -0
  131. package/src/compute/autodl-pro-remote.mjs +810 -0
  132. package/src/compute/autodl-pro-staging.mjs +117 -0
  133. package/src/compute/campaign.mjs +110 -0
  134. package/src/compute/catalog.mjs +123 -0
  135. package/src/compute/checkpoint-protocol.mjs +154 -0
  136. package/src/compute/codex-account-lock.mjs +111 -0
  137. package/src/compute/codex-account-session.mjs +107 -0
  138. package/src/compute/compiler-profile.mjs +38 -0
  139. package/src/compute/compiler-router.mjs +23 -0
  140. package/src/compute/coordinator-recovery.mjs +210 -0
  141. package/src/compute/executor-router.mjs +29 -0
  142. package/src/compute/gcp-batch-compiler.mjs +685 -0
  143. package/src/compute/gcp-batch-executor.mjs +1215 -0
  144. package/src/compute/gcp-batch-failure.mjs +92 -0
  145. package/src/compute/gcp-batch-job.mjs +527 -0
  146. package/src/compute/gcp-batch-lifecycle.mjs +81 -0
  147. package/src/compute/gcp-checkpoint-worker.mjs +1633 -0
  148. package/src/compute/local-codex-compiler.mjs +52 -0
  149. package/src/compute/measurement-hardware.mjs +128 -0
  150. package/src/compute/remote-attempt.mjs +226 -0
  151. package/src/compute/requirements.mjs +124 -0
  152. package/src/compute/research-phases.mjs +48 -0
  153. package/src/compute/scheduler.mjs +452 -0
  154. package/src/compute/shared-workloads.mjs +26 -0
  155. package/src/compute/stage-archive.mjs +79 -0
  156. package/src/contracts/campaign-contract.mjs +52 -0
  157. package/src/contracts/execution-contract.mjs +819 -0
  158. package/src/contracts/execution-mode.mjs +19 -0
  159. package/src/contracts/execution-timeouts.mjs +45 -0
  160. package/src/contracts/execution-workload.mjs +68 -0
  161. package/src/contracts/preflight-schema.mjs +25 -0
  162. package/src/contracts/public-contract.mjs +63 -0
  163. package/src/contracts/subject-tags.mjs +31 -0
  164. package/src/dashboard/data.mjs +898 -0
  165. package/src/dashboard/server.mjs +79 -0
  166. package/src/dashboard/static/dashboard.css +366 -0
  167. package/src/dashboard/static/dashboard.js +560 -0
  168. package/src/dashboard/static/index.html +85 -0
  169. package/src/deployment/community-policy.mjs +9 -0
  170. package/src/deployment/environment.mjs +112 -0
  171. package/src/deployment/guided.mjs +98 -0
  172. package/src/deployment/handoff.mjs +102 -0
  173. package/src/deployment/local-contract.mjs +31 -0
  174. package/src/deployment/local.mjs +100 -0
  175. package/src/deployment/prepare.mjs +46 -0
  176. package/src/deployment/recipe.mjs +108 -0
  177. package/src/deployment/supplement.mjs +51 -0
  178. package/src/deployment/terminal.mjs +43 -0
  179. package/src/diagnosis/renderer.mjs +75 -0
  180. package/src/diagnosis/target-failure.mjs +46 -0
  181. package/src/evidence/parser-registry.mjs +54 -0
  182. package/src/evidence/parsers/fasttext-classification.mjs +82 -0
  183. package/src/evidence/parsers/json-scalar.mjs +96 -0
  184. package/src/evidence/parsers/simcse-senteval.mjs +104 -0
  185. package/src/evidence/parsers/starspace-classification.mjs +78 -0
  186. package/src/evidence/registry.mjs +147 -0
  187. package/src/execution/runner-audit.mjs +473 -0
  188. package/src/gcp/auth.mjs +106 -0
  189. package/src/gcp/batch-client.mjs +120 -0
  190. package/src/gcp/resource-discovery.mjs +177 -0
  191. package/src/gcp/rest.mjs +82 -0
  192. package/src/gcp/secret-manager.mjs +34 -0
  193. package/src/gcp/signed-url.mjs +133 -0
  194. package/src/gcp/storage.mjs +220 -0
  195. package/src/graph/command.mjs +41 -0
  196. package/src/graph/execution.mjs +97 -0
  197. package/src/graph/model.mjs +37 -0
  198. package/src/graph/presentation.mjs +110 -0
  199. package/src/graph/query.mjs +159 -0
  200. package/src/graph/research-relations.mjs +69 -0
  201. package/src/graph/source-page.mjs +12 -0
  202. package/src/graph/source-preview.mjs +34 -0
  203. package/src/graph/validate.mjs +76 -0
  204. package/src/job.mjs +496 -0
  205. package/src/network/autodl-routing-proxy.mjs +462 -0
  206. package/src/network/egress-proxy.mjs +158 -0
  207. package/src/observability/event-contract.mjs +230 -0
  208. package/src/observability/pipeline-monitor.mjs +166 -0
  209. package/src/pipeline/orchestrator.mjs +1281 -0
  210. package/src/pipeline/recovery-error.mjs +11 -0
  211. package/src/pipeline/replay.mjs +304 -0
  212. package/src/pipeline/shared-execution.mjs +115 -0
  213. package/src/pipeline/stage-checkpoint.mjs +86 -0
  214. package/src/pipeline/stage-recovery.mjs +101 -0
  215. package/src/pipeline/targets.mjs +110 -0
  216. package/src/process.mjs +143 -0
  217. package/src/protocol.mjs +312 -0
  218. package/src/provider/codex-account.mjs +44 -0
  219. package/src/provider/codex-completion.mjs +49 -0
  220. package/src/provider/completion.mjs +292 -0
  221. package/src/provider/model-client.mjs +44 -0
  222. package/src/provider/model-route.mjs +29 -0
  223. package/src/provider/openrouter-readiness.mjs +189 -0
  224. package/src/provider/reader-bridge.mjs +35 -0
  225. package/src/provider/relay.mjs +263 -0
  226. package/src/provider/runtime-auth.mjs +40 -0
  227. package/src/public/cap.d.mts +90 -0
  228. package/src/public/cap.mjs +12 -0
  229. package/src/public/contracts.d.mts +2 -0
  230. package/src/public/host.mjs +171 -0
  231. package/src/public/operations.d.mts +11 -0
  232. package/src/public/presentation.d.mts +4 -0
  233. package/src/records/views.mjs +26 -0
  234. package/src/remote/command.mjs +178 -0
  235. package/src/remote/ssh.mjs +59 -0
  236. package/src/repository-origin.mjs +81 -0
  237. package/src/reproduction/evidence-feedback.mjs +96 -0
  238. package/src/reproduction/incomplete-initialization.mjs +25 -0
  239. package/src/reproduction/lifecycle.mjs +253 -0
  240. package/src/reproduction/plan.mjs +132 -0
  241. package/src/reproduction/prompts.mjs +70 -0
  242. package/src/reproduction/runner.mjs +188 -0
  243. package/src/reproduction/summary.mjs +130 -0
  244. package/src/reproduction/workspace-mode.mjs +7 -0
  245. package/src/research/automatic-admission.mjs +156 -0
  246. package/src/research/compiler-coverage.mjs +85 -0
  247. package/src/research/compiler-failure.mjs +24 -0
  248. package/src/research/compiler-normalization-guards.mjs +112 -0
  249. package/src/research/compiler-repair.mjs +3 -0
  250. package/src/research/compiler.mjs +853 -0
  251. package/src/research/continuation-selection.mjs +26 -0
  252. package/src/research/execution-graph-context.mjs +43 -0
  253. package/src/research/experiment-importance.mjs +15 -0
  254. package/src/research/inventory-handoff.mjs +104 -0
  255. package/src/research/inventory-revisions.mjs +32 -0
  256. package/src/research/mineru-local.mjs +73 -0
  257. package/src/research/paper-command.mjs +19 -0
  258. package/src/research/paper-markdown.mjs +180 -0
  259. package/src/research/paper-source-map.mjs +69 -0
  260. package/src/research/planning-policy.mjs +88 -0
  261. package/src/research/reference-materials.mjs +11 -0
  262. package/src/research/reproduction-scope.mjs +30 -0
  263. package/src/research/research-map.mjs +94 -0
  264. package/src/research/research-objects.mjs +88 -0
  265. package/src/research/source-discovery.mjs +646 -0
  266. package/src/research/source-observations.mjs +75 -0
  267. package/src/research/source-review-cli-mcp.mjs +26 -0
  268. package/src/research/source-review-input.mjs +209 -0
  269. package/src/research/source-review-local-codex.mjs +36 -0
  270. package/src/research/source-review-model.mjs +70 -0
  271. package/src/research/source-review.mjs +173 -0
  272. package/src/research/structure.mjs +3163 -0
  273. package/src/research-card/renderer.mjs +277 -0
  274. package/src/research-card/verified-conclusion.mjs +143 -0
  275. package/src/results/output-registry.mjs +183 -0
  276. package/src/runtime/claude-code.mjs +52 -0
  277. package/src/runtime/codex-capacity-retry.mjs +87 -0
  278. package/src/runtime/codex.mjs +64 -0
  279. package/src/runtime/config.mjs +157 -0
  280. package/src/runtime/final-output.mjs +40 -0
  281. package/src/runtime/index.mjs +21 -0
  282. package/src/runtime/local-codex.mjs +74 -0
  283. package/src/runtime/opencode.mjs +95 -0
  284. package/src/runtime/prompt.mjs +13 -0
  285. package/src/sandbox/docker.mjs +363 -0
  286. package/src/settings/command.mjs +297 -0
  287. package/src/settings/store.mjs +119 -0
  288. package/src/telemetry/pricing.mjs +68 -0
  289. package/src/telemetry/usage.mjs +265 -0
  290. package/src/terminal/events.mjs +97 -0
  291. package/src/terminal/input.mjs +40 -0
  292. package/src/terminal/plain.mjs +40 -0
  293. package/src/terminal/remote-stream.mjs +22 -0
  294. package/src/terminal/screen.mjs +214 -0
  295. package/src/terminal/transcript.mjs +69 -0
  296. package/src/util.mjs +107 -0
  297. package/src/verification/ai-assessor.mjs +534 -0
  298. package/src/verification/claim-evaluator.mjs +242 -0
  299. package/src/verification/evidence-context.mjs +165 -0
  300. package/src/verification/evidence-reader.mjs +95 -0
  301. package/src/verification/integrity.mjs +570 -0
  302. package/src/verification/tolerance.mjs +32 -0
  303. package/src/workloads/cpu-research-preparation.mjs +56 -0
  304. package/src/workloads/definition.mjs +74 -0
  305. package/src/workloads/phase-aware-reproduction.mjs +46 -0
  306. package/src/workloads/reproduction.mjs +85 -0
  307. package/src/workspace/command.mjs +242 -0
  308. package/src/workspace/control.mjs +49 -0
  309. package/src/workspace/entry.mjs +28 -0
  310. package/src/workspace/input.mjs +93 -0
  311. package/src/workspace/interactive.mjs +94 -0
  312. package/src/workspace/jobs.mjs +418 -0
  313. package/src/workspace/session.mjs +97 -0
  314. package/src/workspace/worker.mjs +137 -0
  315. package/ui/arkgraph/ambient-motion.mjs +10 -0
  316. package/ui/arkgraph/app.jsx +153 -0
  317. package/ui/arkgraph/boot.js +6 -0
  318. package/ui/arkgraph/camera-motion.mjs +20 -0
  319. package/ui/arkgraph/context-reveal.mjs +39 -0
  320. package/ui/arkgraph/details.css +3 -0
  321. package/ui/arkgraph/entry.jsx +28 -0
  322. package/ui/arkgraph/experiment-curves.mjs +17 -0
  323. package/ui/arkgraph/experiment-selection.mjs +15 -0
  324. package/ui/arkgraph/experiment-style.css +26 -0
  325. package/ui/arkgraph/experiment-ui.jsx +32 -0
  326. package/ui/arkgraph/frame.html +1 -0
  327. package/ui/arkgraph/graph-gestures.mjs +62 -0
  328. package/ui/arkgraph/label-layout.mjs +57 -0
  329. package/ui/arkgraph/locales/en.json +229 -0
  330. package/ui/arkgraph/locales/source-types.json +15 -0
  331. package/ui/arkgraph/localization-build.mjs +27 -0
  332. package/ui/arkgraph/material-build.mjs +23 -0
  333. package/ui/arkgraph/material-colors.mjs +39 -0
  334. package/ui/arkgraph/material-style.css +15 -0
  335. package/ui/arkgraph/open-graph.jsx +326 -0
  336. package/ui/arkgraph/outline.jsx +49 -0
  337. package/ui/arkgraph/package-lock.json +888 -0
  338. package/ui/arkgraph/package.json +17 -0
  339. package/ui/arkgraph/reading-layout.mjs +130 -0
  340. package/ui/arkgraph/reading-presentation.mjs +73 -0
  341. package/ui/arkgraph/record-detail.css +51 -0
  342. package/ui/arkgraph/record-details.jsx +29 -0
  343. package/ui/arkgraph/research-types.mjs +31 -0
  344. package/ui/arkgraph/selection-mark.jsx +6 -0
  345. package/ui/arkgraph/soft-spine.mjs +26 -0
  346. package/ui/arkgraph/steering-style.css +187 -0
  347. package/ui/arkgraph/style.css +272 -0
@@ -0,0 +1,1024 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://citeark.com/schemas/agent/execution-contract-1.0.json",
4
+ "title": "CiteArk blind execution contract",
5
+ "type": "object",
6
+ "required": [
7
+ "schemaVersion",
8
+ "kind",
9
+ "name",
10
+ "research",
11
+ "paper",
12
+ "repository",
13
+ "claim",
14
+ "measurements",
15
+ "protocol",
16
+ "reproductionLevel",
17
+ "contractDigest"
18
+ ],
19
+ "properties": {
20
+ "reproductionScope": {
21
+ "enum": [
22
+ "low",
23
+ "medium",
24
+ "high"
25
+ ],
26
+ "description": "Requested verification work scope; not scientific support, fidelity or budget."
27
+ },
28
+ "researchGraph": {
29
+ "type": "object",
30
+ "required": [
31
+ "objects",
32
+ "steps",
33
+ "inputIds"
34
+ ],
35
+ "description": "Fixed scientific object/step context; prospective specifications are not execution evidence.",
36
+ "properties": {
37
+ "objects": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object",
41
+ "required": [
42
+ "id",
43
+ "role",
44
+ "title"
45
+ ]
46
+ }
47
+ },
48
+ "steps": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "object",
52
+ "required": [
53
+ "id",
54
+ "title",
55
+ "kind",
56
+ "inputIds",
57
+ "outputIds"
58
+ ]
59
+ }
60
+ },
61
+ "inputIds": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "string"
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "schemaVersion": {
70
+ "const": "1.0"
71
+ },
72
+ "kind": {
73
+ "const": "citeark.execution-contract"
74
+ },
75
+ "name": {
76
+ "type": "string",
77
+ "minLength": 1
78
+ },
79
+ "research": {
80
+ "type": "object",
81
+ "required": [
82
+ "workId",
83
+ "claimId",
84
+ "claimVersionId",
85
+ "experimentId",
86
+ "experimentVersionId",
87
+ "measurementIds"
88
+ ],
89
+ "properties": {
90
+ "workId": {
91
+ "type": "string",
92
+ "minLength": 1
93
+ },
94
+ "claimId": {
95
+ "type": "string",
96
+ "minLength": 1
97
+ },
98
+ "claimVersionId": {
99
+ "type": "string",
100
+ "pattern": "^sha256:[0-9a-f]{64}$"
101
+ },
102
+ "experimentId": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ },
106
+ "experimentVersionId": {
107
+ "type": "string",
108
+ "pattern": "^sha256:[0-9a-f]{64}$"
109
+ },
110
+ "measurementIds": {
111
+ "type": "array",
112
+ "minItems": 1,
113
+ "uniqueItems": true,
114
+ "items": {
115
+ "type": "string",
116
+ "minLength": 1
117
+ }
118
+ },
119
+ "claimMeasurementIds": {
120
+ "description": "All paper-side measurement ids belonging to the claim, including measurements not covered by this execution.",
121
+ "type": "array",
122
+ "minItems": 1,
123
+ "uniqueItems": true,
124
+ "items": {
125
+ "type": "string",
126
+ "minLength": 1
127
+ }
128
+ },
129
+ "claimCoverage": {
130
+ "description": "Whether this execution covers every paper-side measurement in the claim or only a disclosed subset.",
131
+ "enum": [
132
+ "complete",
133
+ "partial"
134
+ ]
135
+ },
136
+ "uncoveredMeasurementIds": {
137
+ "type": "array",
138
+ "minItems": 1,
139
+ "uniqueItems": true,
140
+ "items": {
141
+ "type": "string",
142
+ "minLength": 1
143
+ }
144
+ }
145
+ }
146
+ },
147
+ "paper": {
148
+ "type": "object",
149
+ "required": [
150
+ "title",
151
+ "url"
152
+ ],
153
+ "properties": {
154
+ "title": {
155
+ "type": "string",
156
+ "minLength": 1
157
+ },
158
+ "url": {
159
+ "type": "string",
160
+ "minLength": 1
161
+ }
162
+ }
163
+ },
164
+ "repository": {
165
+ "type": "object",
166
+ "required": [
167
+ "url",
168
+ "commit"
169
+ ],
170
+ "properties": {
171
+ "implementationOrigin": {
172
+ "enum": [
173
+ "official",
174
+ "citeark_reconstruction"
175
+ ]
176
+ },
177
+ "url": {
178
+ "type": "string",
179
+ "minLength": 1
180
+ },
181
+ "commit": {
182
+ "type": "string",
183
+ "minLength": 1
184
+ }
185
+ }
186
+ },
187
+ "claim": {
188
+ "type": "object",
189
+ "required": [
190
+ "text",
191
+ "source"
192
+ ],
193
+ "properties": {
194
+ "text": {
195
+ "type": "string",
196
+ "minLength": 1
197
+ },
198
+ "source": {
199
+ "type": "string",
200
+ "minLength": 1
201
+ }
202
+ }
203
+ },
204
+ "workspacePlan": {
205
+ "description": "Enables a revisable research workspace. Original claim goals and resource limits remain attached to this contract; execution records identify the actual plan revision.",
206
+ "type": "object",
207
+ "required": [
208
+ "version",
209
+ "measurements"
210
+ ],
211
+ "properties": {
212
+ "version": {
213
+ "enum": [
214
+ 1,
215
+ 2
216
+ ]
217
+ },
218
+ "sourceInventory": {
219
+ "description": "Source context for interpretation, including qualitative findings and ambiguities. It is not observed evidence and does not extend assigned execution scope.",
220
+ "type": "object",
221
+ "required": [
222
+ "digest",
223
+ "view",
224
+ "sources",
225
+ "claims"
226
+ ],
227
+ "properties": {
228
+ "digest": {
229
+ "type": "string",
230
+ "pattern": "^sha256:[0-9a-f]{64}$"
231
+ },
232
+ "view": {
233
+ "const": "source-context"
234
+ },
235
+ "sources": {
236
+ "type": "array"
237
+ },
238
+ "claims": {
239
+ "type": "array",
240
+ "items": {
241
+ "type": "object",
242
+ "required": [
243
+ "id",
244
+ "reportedMeasurements"
245
+ ],
246
+ "properties": {
247
+ "reportedMeasurements": {
248
+ "type": "array",
249
+ "items": {
250
+ "type": "object",
251
+ "not": {
252
+ "anyOf": [
253
+ {
254
+ "required": [
255
+ "value"
256
+ ]
257
+ },
258
+ {
259
+ "required": [
260
+ "reportedValue"
261
+ ]
262
+ },
263
+ {
264
+ "required": [
265
+ "verificationTolerance"
266
+ ]
267
+ }
268
+ ]
269
+ }
270
+ }
271
+ },
272
+ "id": {
273
+ "type": "string",
274
+ "minLength": 1
275
+ }
276
+ }
277
+ }
278
+ }
279
+ }
280
+ },
281
+ "measurements": {
282
+ "type": "array",
283
+ "minItems": 1,
284
+ "items": {
285
+ "type": "object",
286
+ "required": [
287
+ "measurementId",
288
+ "metric",
289
+ "unit"
290
+ ],
291
+ "not": {
292
+ "anyOf": [
293
+ {
294
+ "required": [
295
+ "reportedValue"
296
+ ]
297
+ },
298
+ {
299
+ "required": [
300
+ "value"
301
+ ]
302
+ }
303
+ ]
304
+ },
305
+ "properties": {
306
+ "measurementId": {
307
+ "type": "string",
308
+ "minLength": 1
309
+ },
310
+ "metric": {
311
+ "type": "string",
312
+ "minLength": 1
313
+ },
314
+ "unit": {
315
+ "type": "string",
316
+ "minLength": 1
317
+ },
318
+ "dimensions": {
319
+ "type": "object"
320
+ },
321
+ "aggregation": {
322
+ "type": "string"
323
+ }
324
+ }
325
+ }
326
+ }
327
+ }
328
+ },
329
+ "measurements": {
330
+ "type": "array",
331
+ "minItems": 1,
332
+ "items": {
333
+ "type": "object",
334
+ "required": [
335
+ "measurementId",
336
+ "metric",
337
+ "unit",
338
+ "parser"
339
+ ],
340
+ "not": {
341
+ "required": [
342
+ "reportedValue"
343
+ ]
344
+ },
345
+ "properties": {
346
+ "measurementId": {
347
+ "type": "string",
348
+ "minLength": 1
349
+ },
350
+ "metric": {
351
+ "type": "string",
352
+ "minLength": 1
353
+ },
354
+ "unit": {
355
+ "type": "string",
356
+ "minLength": 1
357
+ },
358
+ "dimensions": {
359
+ "description": "Blind scientific scope that the execution must preserve, such as dataset, split, model variant, seed schedule, hardware, or repetition count.",
360
+ "type": "object"
361
+ },
362
+ "aggregation": {
363
+ "description": "Blind aggregation rule required for the measurement, such as a mean over repeated seeds or tasks.",
364
+ "type": "string",
365
+ "minLength": 1
366
+ },
367
+ "parser": {
368
+ "type": "object",
369
+ "required": [
370
+ "id",
371
+ "version",
372
+ "evidencePath"
373
+ ],
374
+ "properties": {
375
+ "id": {
376
+ "type": "string"
377
+ },
378
+ "version": {
379
+ "type": "string"
380
+ },
381
+ "evidencePath": {
382
+ "type": "string",
383
+ "minLength": 1,
384
+ "pattern": "^(?!/)(?!\\.\\.(?:/|$))(?!.*\\/\\.\\.(?:/|$))[^\\\\]+$"
385
+ },
386
+ "config": {
387
+ "type": "object"
388
+ }
389
+ }
390
+ }
391
+ }
392
+ }
393
+ },
394
+ "protocol": {
395
+ "type": "object",
396
+ "required": [
397
+ "entrypoint",
398
+ "requiredCommandFragments"
399
+ ],
400
+ "properties": {
401
+ "workload": {
402
+ "description": "Complete scientific execution units, grouped by materially different cost or method; probes must execute full units on the allocated device.",
403
+ "type": "object",
404
+ "additionalProperties": false,
405
+ "required": [
406
+ "unit",
407
+ "groups"
408
+ ],
409
+ "properties": {
410
+ "unit": {
411
+ "type": "string",
412
+ "minLength": 1
413
+ },
414
+ "groups": {
415
+ "type": "array",
416
+ "minItems": 1,
417
+ "items": {
418
+ "type": "object",
419
+ "additionalProperties": false,
420
+ "required": [
421
+ "id",
422
+ "units",
423
+ "description"
424
+ ],
425
+ "properties": {
426
+ "id": {
427
+ "type": "string",
428
+ "minLength": 1
429
+ },
430
+ "units": {
431
+ "type": "integer",
432
+ "minimum": 1
433
+ },
434
+ "description": {
435
+ "type": "string",
436
+ "minLength": 1
437
+ }
438
+ }
439
+ }
440
+ }
441
+ }
442
+ },
443
+ "executionMode": {
444
+ "enum": [
445
+ "agent_planned",
446
+ "fixed_entrypoint"
447
+ ]
448
+ },
449
+ "objective": {
450
+ "type": "string",
451
+ "minLength": 1
452
+ },
453
+ "entrypoint": {
454
+ "type": "string",
455
+ "minLength": 1
456
+ },
457
+ "requiredCommandFragments": {
458
+ "type": "array",
459
+ "items": {
460
+ "type": "string",
461
+ "minLength": 1
462
+ }
463
+ },
464
+ "allowedChangePaths": {
465
+ "type": "array",
466
+ "items": {
467
+ "type": "string"
468
+ }
469
+ },
470
+ "instructions": {
471
+ "type": "string"
472
+ },
473
+ "preflight": {
474
+ "type": "object",
475
+ "additionalProperties": false,
476
+ "required": [
477
+ "schemaVersion",
478
+ "source",
479
+ "maxMinutes",
480
+ "evidencePath",
481
+ "checks",
482
+ "assets"
483
+ ],
484
+ "properties": {
485
+ "schemaVersion": {
486
+ "enum": [
487
+ "0.1",
488
+ "0.2",
489
+ "0.3"
490
+ ]
491
+ },
492
+ "source": {
493
+ "enum": [
494
+ "declared",
495
+ "defaulted"
496
+ ]
497
+ },
498
+ "maxMinutes": {
499
+ "type": "number",
500
+ "minimum": 1,
501
+ "maximum": 240
502
+ },
503
+ "evidencePath": {
504
+ "type": "string",
505
+ "minLength": 1,
506
+ "pattern": "^(?!/)(?!\\.\\.(?:/|$))(?!.*\\/\\.\\.(?:/|$))[^\\\\]+$"
507
+ },
508
+ "checks": {
509
+ "type": "array",
510
+ "minItems": 1,
511
+ "items": {
512
+ "type": "object",
513
+ "additionalProperties": false,
514
+ "required": [
515
+ "id",
516
+ "kind",
517
+ "successCriterion"
518
+ ],
519
+ "properties": {
520
+ "id": {
521
+ "type": "string",
522
+ "minLength": 1
523
+ },
524
+ "kind": {
525
+ "enum": [
526
+ "runtime",
527
+ "dependencies",
528
+ "dataset_loader",
529
+ "assets",
530
+ "entrypoint",
531
+ "parser",
532
+ "smoke_test",
533
+ "duration"
534
+ ]
535
+ },
536
+ "command": {
537
+ "type": "string",
538
+ "minLength": 1
539
+ },
540
+ "successCriterion": {
541
+ "type": "string",
542
+ "minLength": 1
543
+ }
544
+ }
545
+ }
546
+ },
547
+ "assets": {
548
+ "type": "array",
549
+ "items": {
550
+ "type": "object",
551
+ "additionalProperties": false,
552
+ "required": [
553
+ "id",
554
+ "kind",
555
+ "identity",
556
+ "availability",
557
+ "required",
558
+ "verification"
559
+ ],
560
+ "properties": {
561
+ "id": {
562
+ "type": "string",
563
+ "minLength": 1
564
+ },
565
+ "kind": {
566
+ "enum": [
567
+ "dataset",
568
+ "checkpoint",
569
+ "model",
570
+ "repository",
571
+ "other"
572
+ ]
573
+ },
574
+ "identity": {
575
+ "type": "string",
576
+ "minLength": 1
577
+ },
578
+ "availability": {
579
+ "enum": [
580
+ "bundled",
581
+ "public_verified",
582
+ "public_unverified",
583
+ "private",
584
+ "unknown"
585
+ ]
586
+ },
587
+ "required": {
588
+ "type": "boolean"
589
+ },
590
+ "verification": {
591
+ "type": "string",
592
+ "minLength": 1
593
+ },
594
+ "scientificRole": {
595
+ "enum": [
596
+ "execution_required",
597
+ "identity_only",
598
+ "provenance_only",
599
+ "optional"
600
+ ]
601
+ },
602
+ "acquisition": {
603
+ "$ref": "#/$defs/assetAcquisition"
604
+ },
605
+ "sourceEvidence": {
606
+ "type": "array",
607
+ "items": {
608
+ "$ref": "#/$defs/assetSourceEvidence"
609
+ }
610
+ },
611
+ "sourceUrls": {
612
+ "type": "array",
613
+ "minItems": 1,
614
+ "uniqueItems": true,
615
+ "items": {
616
+ "type": "string",
617
+ "format": "uri",
618
+ "pattern": "^https?://"
619
+ }
620
+ },
621
+ "registryDatasetId": {
622
+ "type": "string",
623
+ "minLength": 1
624
+ }
625
+ }
626
+ }
627
+ },
628
+ "requirements": {
629
+ "description": "Complete eight-row scientific material inventory. Required for newly compiled preflight 0.3 plans.",
630
+ "type": "array",
631
+ "minItems": 8,
632
+ "maxItems": 8,
633
+ "items": {
634
+ "$ref": "#/$defs/assetRequirement"
635
+ }
636
+ }
637
+ }
638
+ }
639
+ }
640
+ },
641
+ "requiredReproductionScope": {
642
+ "enum": [
643
+ "low",
644
+ "medium",
645
+ "high"
646
+ ]
647
+ },
648
+ "reproductionLevel": {
649
+ "enum": [
650
+ "directional",
651
+ "official-checkpoint",
652
+ "full-training",
653
+ "artifact-evaluation",
654
+ "experiment-rerun",
655
+ "workflow-rebuild"
656
+ ]
657
+ },
658
+ "reconstructionFidelity": {
659
+ "enum": [
660
+ "exact",
661
+ "faithful",
662
+ "approximate",
663
+ "proxy"
664
+ ]
665
+ },
666
+ "computeRequirement": {
667
+ "$ref": "#/$defs/computeRequirement"
668
+ },
669
+ "agent": {
670
+ "type": "object",
671
+ "properties": {
672
+ "runtime": {
673
+ "type": [
674
+ "string",
675
+ "null"
676
+ ]
677
+ },
678
+ "model": {
679
+ "type": [
680
+ "string",
681
+ "null"
682
+ ]
683
+ },
684
+ "subagentModel": {
685
+ "type": [
686
+ "string",
687
+ "null"
688
+ ]
689
+ },
690
+ "autoCompactWindow": {
691
+ "type": "integer",
692
+ "minimum": 1
693
+ },
694
+ "effort": {
695
+ "type": "string"
696
+ },
697
+ "reasoningMode": {
698
+ "enum": [
699
+ "standard",
700
+ "pro"
701
+ ]
702
+ },
703
+ "maxTurns": {
704
+ "type": "integer",
705
+ "minimum": 1
706
+ },
707
+ "maxBudgetUsd": {
708
+ "type": "number",
709
+ "exclusiveMinimum": 0
710
+ },
711
+ "budgetCaps": {
712
+ "description": "Hard per-contract ceilings that deployment-level Agent presets cannot raise.",
713
+ "type": "object",
714
+ "additionalProperties": false,
715
+ "required": [
716
+ "maxTurns",
717
+ "maxBudgetUsd"
718
+ ],
719
+ "properties": {
720
+ "maxTurns": {
721
+ "type": "integer",
722
+ "minimum": 1
723
+ },
724
+ "maxBudgetUsd": {
725
+ "type": "number",
726
+ "exclusiveMinimum": 0
727
+ }
728
+ }
729
+ },
730
+ "validationRetries": {
731
+ "type": "integer",
732
+ "minimum": 0
733
+ }
734
+ }
735
+ },
736
+ "environment": {
737
+ "type": "object",
738
+ "required": [
739
+ "image",
740
+ "timeoutMinutes",
741
+ "cpus",
742
+ "memoryGb",
743
+ "shmGb",
744
+ "gpu",
745
+ "networkAccess"
746
+ ],
747
+ "properties": {
748
+ "image": {
749
+ "type": "string",
750
+ "minLength": 1
751
+ },
752
+ "timeoutMinutes": {
753
+ "type": "number",
754
+ "exclusiveMinimum": 0
755
+ },
756
+ "cpus": {
757
+ "type": "number",
758
+ "exclusiveMinimum": 0
759
+ },
760
+ "memoryGb": {
761
+ "type": "number",
762
+ "exclusiveMinimum": 0
763
+ },
764
+ "shmGb": {
765
+ "type": "number",
766
+ "exclusiveMinimum": 0
767
+ },
768
+ "gpu": {
769
+ "enum": [
770
+ "none",
771
+ "all"
772
+ ]
773
+ },
774
+ "networkAccess": {
775
+ "const": true
776
+ }
777
+ }
778
+ },
779
+ "contractDigest": {
780
+ "type": "string",
781
+ "pattern": "^sha256:[0-9a-f]{64}$"
782
+ }
783
+ },
784
+ "not": {
785
+ "required": [
786
+ "target"
787
+ ]
788
+ },
789
+ "$defs": {
790
+ "assetRequirement": {
791
+ "type": "object",
792
+ "additionalProperties": false,
793
+ "required": [
794
+ "kind",
795
+ "required",
796
+ "reason",
797
+ "assetIds",
798
+ "checkIds",
799
+ "repository"
800
+ ],
801
+ "properties": {
802
+ "kind": {
803
+ "enum": [
804
+ "author_code",
805
+ "model",
806
+ "tokenizer",
807
+ "training_data",
808
+ "evaluation_data",
809
+ "evaluator",
810
+ "configuration",
811
+ "dependencies"
812
+ ]
813
+ },
814
+ "required": {
815
+ "type": "boolean"
816
+ },
817
+ "reason": {
818
+ "type": "string",
819
+ "minLength": 1
820
+ },
821
+ "assetIds": {
822
+ "type": "array",
823
+ "uniqueItems": true,
824
+ "items": {
825
+ "type": "string",
826
+ "minLength": 1
827
+ }
828
+ },
829
+ "checkIds": {
830
+ "type": "array",
831
+ "uniqueItems": true,
832
+ "items": {
833
+ "type": "string",
834
+ "minLength": 1
835
+ }
836
+ },
837
+ "repository": {
838
+ "type": "boolean"
839
+ }
840
+ }
841
+ },
842
+ "assetAcquisition": {
843
+ "type": "object",
844
+ "additionalProperties": false,
845
+ "required": [
846
+ "mode"
847
+ ],
848
+ "properties": {
849
+ "mode": {
850
+ "enum": [
851
+ "auto",
852
+ "metadata",
853
+ "selective",
854
+ "full",
855
+ "stream"
856
+ ]
857
+ },
858
+ "revision": {
859
+ "type": "string",
860
+ "minLength": 1
861
+ },
862
+ "requiredPaths": {
863
+ "type": "array",
864
+ "description": "Backward-compatible selective prefetch hints. Entries may describe alternative formats; an unmatched entry does not block the reproduction Agent.",
865
+ "uniqueItems": true,
866
+ "items": {
867
+ "type": "string",
868
+ "minLength": 1
869
+ }
870
+ },
871
+ "excludedPaths": {
872
+ "type": "array",
873
+ "uniqueItems": true,
874
+ "items": {
875
+ "type": "string",
876
+ "minLength": 1
877
+ }
878
+ },
879
+ "expectedDownloadBytes": {
880
+ "type": "integer",
881
+ "minimum": 0
882
+ },
883
+ "expectedExpandedBytes": {
884
+ "type": "integer",
885
+ "minimum": 0
886
+ },
887
+ "maximumDownloadBytes": {
888
+ "type": "integer",
889
+ "minimum": 1
890
+ },
891
+ "maximumExpandedBytes": {
892
+ "type": "integer",
893
+ "minimum": 1
894
+ },
895
+ "supportsStreaming": {
896
+ "type": "boolean"
897
+ }
898
+ }
899
+ },
900
+ "assetSourceEvidence": {
901
+ "type": "object",
902
+ "additionalProperties": false,
903
+ "required": [
904
+ "source",
905
+ "locator"
906
+ ],
907
+ "properties": {
908
+ "source": {
909
+ "enum": [
910
+ "paper",
911
+ "repository",
912
+ "dataset_registry"
913
+ ]
914
+ },
915
+ "locator": {
916
+ "type": "string",
917
+ "minLength": 1
918
+ },
919
+ "path": {
920
+ "type": "string",
921
+ "minLength": 1
922
+ },
923
+ "commit": {
924
+ "type": "string",
925
+ "minLength": 1
926
+ }
927
+ }
928
+ },
929
+ "computeRequirement": {
930
+ "type": "object",
931
+ "required": [
932
+ "schemaVersion",
933
+ "source",
934
+ "classification",
935
+ "accelerator",
936
+ "cpuCores",
937
+ "memoryGb",
938
+ "gpuCount",
939
+ "cpuFallbackAllowed",
940
+ "estimatedDurationMinutes",
941
+ "rationale"
942
+ ],
943
+ "properties": {
944
+ "schemaVersion": {
945
+ "const": "0.1"
946
+ },
947
+ "source": {
948
+ "enum": [
949
+ "research-declared",
950
+ "research-derived"
951
+ ]
952
+ },
953
+ "classification": {
954
+ "enum": [
955
+ "cpu-only",
956
+ "gpu-optional",
957
+ "gpu-required"
958
+ ]
959
+ },
960
+ "accelerator": {
961
+ "enum": [
962
+ "none",
963
+ "optional",
964
+ "required"
965
+ ]
966
+ },
967
+ "cpuCores": {
968
+ "type": "number",
969
+ "exclusiveMinimum": 0
970
+ },
971
+ "memoryGb": {
972
+ "type": "number",
973
+ "exclusiveMinimum": 0
974
+ },
975
+ "gpuCount": {
976
+ "type": "number",
977
+ "exclusiveMinimum": 0
978
+ },
979
+ "minVramGb": {
980
+ "type": [
981
+ "number",
982
+ "null"
983
+ ],
984
+ "exclusiveMinimum": 0
985
+ },
986
+ "preferredGpuTypes": {
987
+ "type": "array",
988
+ "items": {
989
+ "type": "string"
990
+ }
991
+ },
992
+ "cpuFallbackAllowed": {
993
+ "type": "boolean"
994
+ },
995
+ "preemptionSafe": {
996
+ "type": "boolean"
997
+ },
998
+ "estimatedDurationMinutes": {
999
+ "type": "object",
1000
+ "properties": {
1001
+ "cpu": {
1002
+ "type": [
1003
+ "number",
1004
+ "null"
1005
+ ],
1006
+ "exclusiveMinimum": 0
1007
+ },
1008
+ "gpu": {
1009
+ "type": [
1010
+ "number",
1011
+ "null"
1012
+ ],
1013
+ "exclusiveMinimum": 0
1014
+ }
1015
+ }
1016
+ },
1017
+ "rationale": {
1018
+ "type": "string",
1019
+ "minLength": 1
1020
+ }
1021
+ }
1022
+ }
1023
+ }
1024
+ }