agent-hitch 0.2.6 → 0.2.7

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 (386) hide show
  1. package/README.md +14 -1
  2. package/dist/scripts/canary-buildkit-secrets.js +166 -0
  3. package/dist/scripts/canary-buildkit-secrets.js.map +1 -0
  4. package/dist/scripts/canary-collision-domains.js +77 -0
  5. package/dist/scripts/canary-collision-domains.js.map +1 -0
  6. package/dist/scripts/canary-docker-image-observation.js +181 -0
  7. package/dist/scripts/canary-docker-image-observation.js.map +1 -0
  8. package/dist/scripts/canary-gpu-hardware.js +95 -0
  9. package/dist/scripts/canary-gpu-hardware.js.map +1 -0
  10. package/dist/scripts/canary-harbor-load.js +365 -0
  11. package/dist/scripts/canary-harbor-load.js.map +1 -0
  12. package/dist/scripts/canary-packaged-harness.js +75 -0
  13. package/dist/scripts/canary-packaged-harness.js.map +1 -0
  14. package/dist/scripts/canary-resource-load.js +188 -0
  15. package/dist/scripts/canary-resource-load.js.map +1 -0
  16. package/dist/scripts/check-architecture.js +8 -4
  17. package/dist/scripts/check-architecture.js.map +1 -1
  18. package/dist/scripts/docker-reaper-crash-child.js +21 -0
  19. package/dist/scripts/docker-reaper-crash-child.js.map +1 -0
  20. package/dist/src/adapters/catalog.js +1 -0
  21. package/dist/src/adapters/catalog.js.map +1 -1
  22. package/dist/src/adapters/discovery.js +1 -1
  23. package/dist/src/adapters/discovery.js.map +1 -1
  24. package/dist/src/adapters/providers/claude.js +6 -0
  25. package/dist/src/adapters/providers/claude.js.map +1 -1
  26. package/dist/src/adapters/providers/codex.js +6 -0
  27. package/dist/src/adapters/providers/codex.js.map +1 -1
  28. package/dist/src/adapters/providers/deepseek.js +6 -0
  29. package/dist/src/adapters/providers/deepseek.js.map +1 -1
  30. package/dist/src/adapters/providers/opencode.js +6 -0
  31. package/dist/src/adapters/providers/opencode.js.map +1 -1
  32. package/dist/src/adapters/providers/pi.js +6 -0
  33. package/dist/src/adapters/providers/pi.js.map +1 -1
  34. package/dist/src/artifacts/index.js +1 -0
  35. package/dist/src/artifacts/index.js.map +1 -1
  36. package/dist/src/backends/harbor/backend.js +53 -103
  37. package/dist/src/backends/harbor/backend.js.map +1 -1
  38. package/dist/src/backends/harbor/environment-config.js +92 -0
  39. package/dist/src/backends/harbor/environment-config.js.map +1 -0
  40. package/dist/src/backends/harbor/index.js +5 -1
  41. package/dist/src/backends/harbor/index.js.map +1 -1
  42. package/dist/src/backends/harbor/model-proxy-config.js +23 -0
  43. package/dist/src/backends/harbor/model-proxy-config.js.map +1 -0
  44. package/dist/src/backends/harbor/process.js +177 -0
  45. package/dist/src/backends/harbor/process.js.map +1 -0
  46. package/dist/src/backends/harbor/runtime-toolchain.js +30 -0
  47. package/dist/src/backends/harbor/runtime-toolchain.js.map +1 -0
  48. package/dist/src/backends/harbor/supervisor.js +74 -0
  49. package/dist/src/backends/harbor/supervisor.js.map +1 -0
  50. package/dist/src/backends/harbor/task-resources.js +206 -0
  51. package/dist/src/backends/harbor/task-resources.js.map +1 -0
  52. package/dist/src/backends/harbor/tools.js +6 -29
  53. package/dist/src/backends/harbor/tools.js.map +1 -1
  54. package/dist/src/backends/index.js +4 -1
  55. package/dist/src/backends/index.js.map +1 -1
  56. package/dist/src/cli/commands/daemon.js +135 -8
  57. package/dist/src/cli/commands/daemon.js.map +1 -1
  58. package/dist/src/cli/commands/eval.js +214 -4
  59. package/dist/src/cli/commands/eval.js.map +1 -1
  60. package/dist/src/cli/commands/images.js +40 -0
  61. package/dist/src/cli/commands/images.js.map +1 -0
  62. package/dist/src/cli/commands/run.js +6 -3
  63. package/dist/src/cli/commands/run.js.map +1 -1
  64. package/dist/src/cli/commands/runs.js +25 -3
  65. package/dist/src/cli/commands/runs.js.map +1 -1
  66. package/dist/src/cli/commands/worker.js +79 -0
  67. package/dist/src/cli/commands/worker.js.map +1 -0
  68. package/dist/src/cli/main.js +4 -0
  69. package/dist/src/cli/main.js.map +1 -1
  70. package/dist/src/cli/output.js +71 -3
  71. package/dist/src/cli/output.js.map +1 -1
  72. package/dist/src/control-plane/build-admission.js +69 -0
  73. package/dist/src/control-plane/build-admission.js.map +1 -0
  74. package/dist/src/control-plane/build-records.js +6 -0
  75. package/dist/src/control-plane/build-records.js.map +1 -0
  76. package/dist/src/control-plane/collisions.js +40 -0
  77. package/dist/src/control-plane/collisions.js.map +1 -0
  78. package/dist/src/control-plane/eval-control-state.js +22 -0
  79. package/dist/src/control-plane/eval-control-state.js.map +1 -0
  80. package/dist/src/control-plane/eval-control-work.js +39 -0
  81. package/dist/src/control-plane/eval-control-work.js.map +1 -0
  82. package/dist/src/control-plane/eval-image-resolution.js +52 -0
  83. package/dist/src/control-plane/eval-image-resolution.js.map +1 -0
  84. package/dist/src/control-plane/eval-image-services.js +30 -0
  85. package/dist/src/control-plane/eval-image-services.js.map +1 -0
  86. package/dist/src/control-plane/eval-records.js +252 -0
  87. package/dist/src/control-plane/eval-records.js.map +1 -0
  88. package/dist/src/control-plane/eval-recovery.js +181 -0
  89. package/dist/src/control-plane/eval-recovery.js.map +1 -0
  90. package/dist/src/control-plane/eval-scheduler.js +447 -0
  91. package/dist/src/control-plane/eval-scheduler.js.map +1 -0
  92. package/dist/src/control-plane/index.js +20 -0
  93. package/dist/src/control-plane/index.js.map +1 -0
  94. package/dist/src/control-plane/local-worker.js +49 -0
  95. package/dist/src/control-plane/local-worker.js.map +1 -0
  96. package/dist/src/control-plane/model-capture-planning.js +12 -0
  97. package/dist/src/control-plane/model-capture-planning.js.map +1 -0
  98. package/dist/src/control-plane/remote-result-transport.js +172 -0
  99. package/dist/src/control-plane/remote-result-transport.js.map +1 -0
  100. package/dist/src/control-plane/remote-work-coordinator.js +332 -0
  101. package/dist/src/control-plane/remote-work-coordinator.js.map +1 -0
  102. package/dist/src/control-plane/remote-work-inputs.js +266 -0
  103. package/dist/src/control-plane/remote-work-inputs.js.map +1 -0
  104. package/dist/src/control-plane/remote-work-recovery.js +181 -0
  105. package/dist/src/control-plane/remote-work-recovery.js.map +1 -0
  106. package/dist/src/control-plane/remote-worker-artifacts.js +135 -0
  107. package/dist/src/control-plane/remote-worker-artifacts.js.map +1 -0
  108. package/dist/src/control-plane/remote-worker-client.js +202 -0
  109. package/dist/src/control-plane/remote-worker-client.js.map +1 -0
  110. package/dist/src/control-plane/remote-worker-configuration.js +34 -0
  111. package/dist/src/control-plane/remote-worker-configuration.js.map +1 -0
  112. package/dist/src/control-plane/remote-worker-credentials.js +58 -0
  113. package/dist/src/control-plane/remote-worker-credentials.js.map +1 -0
  114. package/dist/src/control-plane/remote-worker-protocol.js +510 -0
  115. package/dist/src/control-plane/remote-worker-protocol.js.map +1 -0
  116. package/dist/src/control-plane/remote-worker-runner.js +214 -0
  117. package/dist/src/control-plane/remote-worker-runner.js.map +1 -0
  118. package/dist/src/control-plane/remote-workers.js +377 -0
  119. package/dist/src/control-plane/remote-workers.js.map +1 -0
  120. package/dist/src/control-plane/rerun-scheduler.js +411 -0
  121. package/dist/src/control-plane/rerun-scheduler.js.map +1 -0
  122. package/dist/src/control-plane/rerun-submission.js +56 -0
  123. package/dist/src/control-plane/rerun-submission.js.map +1 -0
  124. package/dist/src/control-plane/resources.js +182 -0
  125. package/dist/src/control-plane/resources.js.map +1 -0
  126. package/dist/src/control-plane/scheduler-eval-entry.js +32 -0
  127. package/dist/src/control-plane/scheduler-eval-entry.js.map +1 -0
  128. package/dist/src/control-plane/synthetic-result.js +21 -0
  129. package/dist/src/control-plane/synthetic-result.js.map +1 -0
  130. package/dist/src/control-plane/work-admission.js +21 -0
  131. package/dist/src/control-plane/work-admission.js.map +1 -0
  132. package/dist/src/control-plane/work-dispatcher.js +229 -0
  133. package/dist/src/control-plane/work-dispatcher.js.map +1 -0
  134. package/dist/src/controller-runtime/hash.js +12 -1
  135. package/dist/src/controller-runtime/hash.js.map +1 -1
  136. package/dist/src/controller-runtime/index.js +1 -1
  137. package/dist/src/controller-runtime/index.js.map +1 -1
  138. package/dist/src/controller-runtime/store.js +15 -6
  139. package/dist/src/controller-runtime/store.js.map +1 -1
  140. package/dist/src/daemon/client.js.map +1 -1
  141. package/dist/src/daemon/event-stream.js +46 -0
  142. package/dist/src/daemon/event-stream.js.map +1 -0
  143. package/dist/src/daemon/health.js +66 -0
  144. package/dist/src/daemon/health.js.map +1 -0
  145. package/dist/src/daemon/launcher.js +28 -1
  146. package/dist/src/daemon/launcher.js.map +1 -1
  147. package/dist/src/daemon/logging.js +23 -0
  148. package/dist/src/daemon/logging.js.map +1 -0
  149. package/dist/src/daemon/scheduler.js +26 -5
  150. package/dist/src/daemon/scheduler.js.map +1 -1
  151. package/dist/src/daemon/server.js +255 -98
  152. package/dist/src/daemon/server.js.map +1 -1
  153. package/dist/src/daemon/telemetry.js +163 -0
  154. package/dist/src/daemon/telemetry.js.map +1 -0
  155. package/dist/src/daemon/worker-routes.js +219 -0
  156. package/dist/src/daemon/worker-routes.js.map +1 -0
  157. package/dist/src/domain/bundles.js +2 -0
  158. package/dist/src/domain/bundles.js.map +1 -0
  159. package/dist/src/domain/control-plane.js +2 -0
  160. package/dist/src/domain/control-plane.js.map +1 -0
  161. package/dist/src/domain/execution-evidence.js +2 -0
  162. package/dist/src/domain/execution-evidence.js.map +1 -0
  163. package/dist/src/domain/execution-plan.js +2 -0
  164. package/dist/src/domain/execution-plan.js.map +1 -0
  165. package/dist/src/domain/images.js +2 -0
  166. package/dist/src/domain/images.js.map +1 -0
  167. package/dist/src/domain/index.js +9 -0
  168. package/dist/src/domain/index.js.map +1 -1
  169. package/dist/src/domain/interactions.js +2 -0
  170. package/dist/src/domain/interactions.js.map +1 -0
  171. package/dist/src/domain/providers.js +2 -0
  172. package/dist/src/domain/providers.js.map +1 -0
  173. package/dist/src/domain/resources.js +2 -0
  174. package/dist/src/domain/resources.js.map +1 -0
  175. package/dist/src/domain/workers.js +2 -0
  176. package/dist/src/domain/workers.js.map +1 -0
  177. package/dist/src/evals/collect-only-rerun.js +182 -0
  178. package/dist/src/evals/collect-only-rerun.js.map +1 -0
  179. package/dist/src/evals/directory.js +30 -0
  180. package/dist/src/evals/directory.js.map +1 -0
  181. package/dist/src/evals/docker-engine-stats.js +89 -0
  182. package/dist/src/evals/docker-engine-stats.js.map +1 -0
  183. package/dist/src/evals/docker-ownership.js +51 -0
  184. package/dist/src/evals/docker-ownership.js.map +1 -0
  185. package/dist/src/evals/docker-reaper.js +144 -0
  186. package/dist/src/evals/docker-reaper.js.map +1 -0
  187. package/dist/src/evals/docker-resource-observer.js +207 -0
  188. package/dist/src/evals/docker-resource-observer.js.map +1 -0
  189. package/dist/src/evals/environment-image-planning.js +164 -0
  190. package/dist/src/evals/environment-image-planning.js.map +1 -0
  191. package/dist/src/evals/eval-artifact-planning.js +56 -0
  192. package/dist/src/evals/eval-artifact-planning.js.map +1 -0
  193. package/dist/src/evals/eval-finalization.js +10 -0
  194. package/dist/src/evals/eval-finalization.js.map +1 -0
  195. package/dist/src/evals/eval-lifecycle-events.js +16 -0
  196. package/dist/src/evals/eval-lifecycle-events.js.map +1 -0
  197. package/dist/src/evals/events.js +53 -5
  198. package/dist/src/evals/events.js.map +1 -1
  199. package/dist/src/evals/execution-evidence.js +116 -0
  200. package/dist/src/evals/execution-evidence.js.map +1 -0
  201. package/dist/src/evals/execution-leases.js +342 -0
  202. package/dist/src/evals/execution-leases.js.map +1 -0
  203. package/dist/src/evals/execution-plan-artifacts.js +72 -0
  204. package/dist/src/evals/execution-plan-artifacts.js.map +1 -0
  205. package/dist/src/evals/execution-plan-images.js +69 -0
  206. package/dist/src/evals/execution-plan-images.js.map +1 -0
  207. package/dist/src/evals/execution-plan-resources.js +174 -0
  208. package/dist/src/evals/execution-plan-resources.js.map +1 -0
  209. package/dist/src/evals/execution-plan.js +415 -0
  210. package/dist/src/evals/execution-plan.js.map +1 -0
  211. package/dist/src/evals/harbor-artifact-builder-image.js +99 -0
  212. package/dist/src/evals/harbor-artifact-builder-image.js.map +1 -0
  213. package/dist/src/evals/harbor-artifact-builder.js +354 -0
  214. package/dist/src/evals/harbor-artifact-builder.js.map +1 -0
  215. package/dist/src/evals/harbor-bridge-error.js +18 -3
  216. package/dist/src/evals/harbor-bridge-error.js.map +1 -1
  217. package/dist/src/evals/harbor-phase-timings.js +60 -0
  218. package/dist/src/evals/harbor-phase-timings.js.map +1 -0
  219. package/dist/src/evals/index.js +25 -2
  220. package/dist/src/evals/index.js.map +1 -1
  221. package/dist/src/evals/infrastructure-retry.js +100 -63
  222. package/dist/src/evals/infrastructure-retry.js.map +1 -1
  223. package/dist/src/evals/interaction-capture-import.js +49 -0
  224. package/dist/src/evals/interaction-capture-import.js.map +1 -0
  225. package/dist/src/evals/local-docker-provider.js +372 -0
  226. package/dist/src/evals/local-docker-provider.js.map +1 -0
  227. package/dist/src/evals/local-eval-planning.js +80 -0
  228. package/dist/src/evals/local-eval-planning.js.map +1 -0
  229. package/dist/src/evals/model-capture-plan.js +22 -0
  230. package/dist/src/evals/model-capture-plan.js.map +1 -0
  231. package/dist/src/evals/model-capture-runtime.js +114 -0
  232. package/dist/src/evals/model-capture-runtime.js.map +1 -0
  233. package/dist/src/evals/model-proxy-runtime-state.js +53 -0
  234. package/dist/src/evals/model-proxy-runtime-state.js.map +1 -0
  235. package/dist/src/evals/planned-execution-support.js +54 -0
  236. package/dist/src/evals/planned-execution-support.js.map +1 -0
  237. package/dist/src/evals/planned-execution.js +461 -0
  238. package/dist/src/evals/planned-execution.js.map +1 -0
  239. package/dist/src/evals/planned-remote-execution.js +40 -0
  240. package/dist/src/evals/planned-remote-execution.js.map +1 -0
  241. package/dist/src/evals/planned-retry-lifecycle.js +186 -0
  242. package/dist/src/evals/planned-retry-lifecycle.js.map +1 -0
  243. package/dist/src/evals/prepared-harness.js +76 -0
  244. package/dist/src/evals/prepared-harness.js.map +1 -0
  245. package/dist/src/evals/progress.js +4 -4
  246. package/dist/src/evals/progress.js.map +1 -1
  247. package/dist/src/evals/records.js +20 -3
  248. package/dist/src/evals/records.js.map +1 -1
  249. package/dist/src/evals/recovery.js +192 -0
  250. package/dist/src/evals/recovery.js.map +1 -0
  251. package/dist/src/evals/remote-infrastructure-retry.js +99 -0
  252. package/dist/src/evals/remote-infrastructure-retry.js.map +1 -0
  253. package/dist/src/evals/rerun-inputs.js +89 -0
  254. package/dist/src/evals/rerun-inputs.js.map +1 -0
  255. package/dist/src/evals/rerun-slots.js +4 -3
  256. package/dist/src/evals/rerun-slots.js.map +1 -1
  257. package/dist/src/evals/rerun-types.js +49 -0
  258. package/dist/src/evals/rerun-types.js.map +1 -0
  259. package/dist/src/evals/rerun.js +113 -75
  260. package/dist/src/evals/rerun.js.map +1 -1
  261. package/dist/src/evals/result-helpers.js +65 -0
  262. package/dist/src/evals/result-helpers.js.map +1 -0
  263. package/dist/src/evals/resume-state.js +36 -0
  264. package/dist/src/evals/resume-state.js.map +1 -0
  265. package/dist/src/evals/service-types.js +2 -0
  266. package/dist/src/evals/service-types.js.map +1 -0
  267. package/dist/src/evals/service.js +292 -257
  268. package/dist/src/evals/service.js.map +1 -1
  269. package/dist/src/evals/task-resources.js +209 -0
  270. package/dist/src/evals/task-resources.js.map +1 -0
  271. package/dist/src/evals/trial-environment-evidence.js +87 -0
  272. package/dist/src/evals/trial-environment-evidence.js.map +1 -0
  273. package/dist/src/evals/trial-execution-evidence.js +13 -0
  274. package/dist/src/evals/trial-execution-evidence.js.map +1 -0
  275. package/dist/src/evals/trial-import-identity.js +31 -0
  276. package/dist/src/evals/trial-import-identity.js.map +1 -0
  277. package/dist/src/evals/trial-import.js +143 -145
  278. package/dist/src/evals/trial-import.js.map +1 -1
  279. package/dist/src/evals/trial-publication-recovery.js +104 -0
  280. package/dist/src/evals/trial-publication-recovery.js.map +1 -0
  281. package/dist/src/evals/trial-publication.js +25 -0
  282. package/dist/src/evals/trial-publication.js.map +1 -0
  283. package/dist/src/evals/work-item-artifacts.js +23 -0
  284. package/dist/src/evals/work-item-artifacts.js.map +1 -0
  285. package/dist/src/foundation/config.js +17 -0
  286. package/dist/src/foundation/config.js.map +1 -1
  287. package/dist/src/foundation/credential-redaction.js +137 -0
  288. package/dist/src/foundation/credential-redaction.js.map +1 -0
  289. package/dist/src/foundation/environment-image-references.js +59 -0
  290. package/dist/src/foundation/environment-image-references.js.map +1 -0
  291. package/dist/src/foundation/executable.js +45 -5
  292. package/dist/src/foundation/executable.js.map +1 -1
  293. package/dist/src/foundation/index.js +5 -2
  294. package/dist/src/foundation/index.js.map +1 -1
  295. package/dist/src/foundation/process-identity.js +69 -0
  296. package/dist/src/foundation/process-identity.js.map +1 -0
  297. package/dist/src/images/context.js +47 -0
  298. package/dist/src/images/context.js.map +1 -0
  299. package/dist/src/images/docker-buildkit.js +137 -0
  300. package/dist/src/images/docker-buildkit.js.map +1 -0
  301. package/dist/src/images/dockerfile.js +67 -0
  302. package/dist/src/images/dockerfile.js.map +1 -0
  303. package/dist/src/images/gc.js +261 -0
  304. package/dist/src/images/gc.js.map +1 -0
  305. package/dist/src/images/index.js +10 -0
  306. package/dist/src/images/index.js.map +1 -0
  307. package/dist/src/images/manifest.js +109 -0
  308. package/dist/src/images/manifest.js.map +1 -0
  309. package/dist/src/images/ownership.js +5 -0
  310. package/dist/src/images/ownership.js.map +1 -0
  311. package/dist/src/images/records.js +32 -0
  312. package/dist/src/images/records.js.map +1 -0
  313. package/dist/src/images/registry.js +154 -0
  314. package/dist/src/images/registry.js.map +1 -0
  315. package/dist/src/images/service.js +224 -0
  316. package/dist/src/images/service.js.map +1 -0
  317. package/dist/src/model-access/capture.js +255 -0
  318. package/dist/src/model-access/capture.js.map +1 -0
  319. package/dist/src/model-access/index.js +5 -0
  320. package/dist/src/model-access/index.js.map +1 -0
  321. package/dist/src/model-access/policy.js +49 -0
  322. package/dist/src/model-access/policy.js.map +1 -0
  323. package/dist/src/model-access/proxy.js +336 -0
  324. package/dist/src/model-access/proxy.js.map +1 -0
  325. package/dist/src/model-access/records.js +167 -0
  326. package/dist/src/model-access/records.js.map +1 -0
  327. package/dist/src/runs/bundle.js +450 -0
  328. package/dist/src/runs/bundle.js.map +1 -0
  329. package/dist/src/runs/events.js +12 -1
  330. package/dist/src/runs/events.js.map +1 -1
  331. package/dist/src/runs/executor.js +24 -17
  332. package/dist/src/runs/executor.js.map +1 -1
  333. package/dist/src/runs/index.js +3 -1
  334. package/dist/src/runs/index.js.map +1 -1
  335. package/dist/src/runs/manifest.js +5 -5
  336. package/dist/src/runs/manifest.js.map +1 -1
  337. package/dist/src/runs/request.js +6 -1
  338. package/dist/src/runs/request.js.map +1 -1
  339. package/dist/src/runs/training-candidate.js +161 -0
  340. package/dist/src/runs/training-candidate.js.map +1 -0
  341. package/dist/src/trajectories/provider-capture.js +15 -24
  342. package/dist/src/trajectories/provider-capture.js.map +1 -1
  343. package/dist/src/trajectories/providers/deepseek.js +3 -3
  344. package/dist/src/trajectories/providers/deepseek.js.map +1 -1
  345. package/dist/src/workers/index.js +3 -0
  346. package/dist/src/workers/index.js.map +1 -0
  347. package/dist/src/workers/remote-harbor-work-spec.js +97 -0
  348. package/dist/src/workers/remote-harbor-work-spec.js.map +1 -0
  349. package/dist/src/workers/remote-harbor-worker.js +220 -0
  350. package/dist/src/workers/remote-harbor-worker.js.map +1 -0
  351. package/docs/schemas/environment-build-index.schema.json +13 -0
  352. package/docs/schemas/environment-build-record.schema.json +25 -0
  353. package/docs/schemas/environment-image-manifest.schema.json +62 -0
  354. package/docs/schemas/eval-control.schema.json +36 -0
  355. package/docs/schemas/eval-execution-plan.schema.json +216 -0
  356. package/docs/schemas/eval-rerun-result.schema.json +53 -0
  357. package/docs/schemas/eval-rerun-state.schema.json +61 -0
  358. package/docs/schemas/eval-rerun-submission.schema.json +58 -0
  359. package/docs/schemas/eval-result.schema.json +34 -1
  360. package/docs/schemas/eval-submission-input.schema.json +14 -0
  361. package/docs/schemas/eval-submission.schema.json +68 -0
  362. package/docs/schemas/eval-trial-publication.schema.json +39 -0
  363. package/docs/schemas/execution-evidence.schema.json +96 -0
  364. package/docs/schemas/execution-lease.schema.json +50 -0
  365. package/docs/schemas/execution-provider-status.schema.json +65 -0
  366. package/docs/schemas/execution-worker.schema.json +53 -0
  367. package/docs/schemas/harbor-process-exit.schema.json +14 -0
  368. package/docs/schemas/interaction-capture-ref.schema.json +45 -0
  369. package/docs/schemas/local-provider-execution.schema.json +33 -0
  370. package/docs/schemas/model-interaction.schema.json +41 -0
  371. package/docs/schemas/remote-result-envelope.schema.json +32 -0
  372. package/docs/schemas/remote-tree-envelope.schema.json +25 -0
  373. package/docs/schemas/remote-work-offer.schema.json +58 -0
  374. package/docs/schemas/remote-work-receipt.schema.json +50 -0
  375. package/docs/schemas/remote-worker-artifact.schema.json +17 -0
  376. package/docs/schemas/remote-worker-event.schema.json +18 -0
  377. package/docs/schemas/remote-worker-heartbeat.schema.json +37 -0
  378. package/docs/schemas/remote-worker-registration.schema.json +52 -0
  379. package/docs/schemas/result-bundle-index.schema.json +133 -0
  380. package/docs/schemas/run-environment-images.schema.json +39 -0
  381. package/docs/schemas/training-data-candidate.schema.json +46 -0
  382. package/integrations/harbor/hitch_harbor_agent.py +171 -539
  383. package/integrations/harbor/hitch_harbor_environment.py +331 -0
  384. package/integrations/harbor/hitch_harbor_task_resources.py +275 -0
  385. package/integrations/harbor/hitch_harbor_verifier.py +23 -0
  386. package/package.json +14 -1
@@ -0,0 +1,39 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/eval-trial-publication.schema.json",
4
+ "title": "Hitch Eval Trial Publication v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "eval_id", "mode", "trial", "created_at"],
8
+ "properties": {
9
+ "schema_version": { "const": "1" },
10
+ "eval_id": { "type": "string", "pattern": "^eval_[a-f0-9]{32}$" },
11
+ "mode": { "enum": ["settle", "replace-invalid"] },
12
+ "trial": {
13
+ "type": "object",
14
+ "additionalProperties": false,
15
+ "required": ["trial_id", "run_id", "task_id", "attempt", "observation_status"],
16
+ "properties": {
17
+ "trial_id": { "type": "string", "minLength": 1 },
18
+ "run_id": { "type": "string", "pattern": "^run_[a-f0-9]{32}$" },
19
+ "task_id": { "type": "string", "minLength": 1 },
20
+ "attempt": { "type": "integer", "minimum": 1 },
21
+ "observation_status": { "enum": ["valid", "invalid"] },
22
+ "reward": { "type": "number" },
23
+ "verifier_result_ref": { "type": "string", "minLength": 1 },
24
+ "invalid_reason": { "type": "string", "minLength": 1 }
25
+ },
26
+ "allOf": [
27
+ {
28
+ "if": { "properties": { "observation_status": { "const": "valid" } } },
29
+ "then": { "required": ["reward"] }
30
+ },
31
+ {
32
+ "if": { "properties": { "observation_status": { "const": "invalid" } } },
33
+ "then": { "required": ["invalid_reason"] }
34
+ }
35
+ ]
36
+ },
37
+ "created_at": { "type": "string", "format": "date-time" }
38
+ }
39
+ }
@@ -0,0 +1,96 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/execution-evidence.schema.json",
4
+ "title": "Hitch execution evidence V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version", "provider", "worker_id", "collision_domain_id", "eval_id", "work_id",
9
+ "lease_id", "lease_epoch", "task_id", "reservation", "enforced", "observed"
10
+ ],
11
+ "properties": {
12
+ "schema_version": { "const": "1" },
13
+ "provider": { "type": "string", "minLength": 1, "maxLength": 4096 },
14
+ "worker_id": { "type": "string", "minLength": 1, "maxLength": 4096 },
15
+ "collision_domain_id": { "type": "string", "minLength": 1, "maxLength": 4096 },
16
+ "eval_id": { "type": "string", "pattern": "^eval_[a-f0-9]{32}$" },
17
+ "work_id": { "type": "string", "pattern": "^work_[a-f0-9]{32}$" },
18
+ "lease_id": { "type": "string", "pattern": "^lease_[a-f0-9]{32}$" },
19
+ "lease_epoch": { "type": "integer", "minimum": 1 },
20
+ "task_id": { "type": "string", "minLength": 1, "maxLength": 4096 },
21
+ "reservation": { "$ref": "#/$defs/resources" },
22
+ "enforced": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["main_limits", "sidecar_limits"],
26
+ "properties": {
27
+ "main_limits": { "$ref": "#/$defs/resources" },
28
+ "sidecar_limits": {
29
+ "type": "object",
30
+ "additionalProperties": {
31
+ "type": "object",
32
+ "additionalProperties": false,
33
+ "required": ["cpu_millis", "memory_bytes"],
34
+ "properties": {
35
+ "cpu_millis": { "type": "integer", "minimum": 1 },
36
+ "memory_bytes": { "type": "integer", "minimum": 1 },
37
+ "gpu_count": { "type": "integer", "minimum": 1 }
38
+ }
39
+ }
40
+ }
41
+ }
42
+ },
43
+ "observed": {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["status", "started_at", "collected_at", "sample_count", "containers", "unavailable_fields", "issues"],
47
+ "properties": {
48
+ "status": { "enum": ["partial", "unavailable"] },
49
+ "started_at": { "type": "string", "format": "date-time" },
50
+ "collected_at": { "type": "string", "format": "date-time" },
51
+ "sample_count": { "type": "integer", "minimum": 0 },
52
+ "containers": { "type": "array", "maxItems": 256, "items": { "$ref": "#/$defs/container" } },
53
+ "unavailable_fields": {
54
+ "type": "array",
55
+ "items": { "enum": ["cpu_time_ns", "peak_memory_bytes", "exit_status", "image_identity"] },
56
+ "uniqueItems": true
57
+ },
58
+ "issues": { "type": "array", "maxItems": 32, "items": { "type": "string", "minLength": 1, "maxLength": 512 } }
59
+ }
60
+ }
61
+ },
62
+ "$defs": {
63
+ "resources": {
64
+ "type": "object",
65
+ "additionalProperties": false,
66
+ "required": ["cpu_millis", "memory_bytes", "container_slots", "build_slots"],
67
+ "properties": {
68
+ "cpu_millis": { "type": "integer", "minimum": 0 },
69
+ "memory_bytes": { "type": "integer", "minimum": 0 },
70
+ "container_slots": { "type": "integer", "minimum": 0 },
71
+ "build_slots": { "type": "integer", "minimum": 0 },
72
+ "gpu_count": { "type": "integer", "minimum": 0 },
73
+ "ephemeral_disk_bytes": { "type": "integer", "minimum": 0 }
74
+ }
75
+ },
76
+ "container": {
77
+ "type": "object",
78
+ "additionalProperties": false,
79
+ "required": ["container_id", "first_observed_at", "last_observed_at"],
80
+ "properties": {
81
+ "container_id": { "type": "string", "pattern": "^[a-f0-9]{12,64}$" },
82
+ "name": { "type": "string", "minLength": 1, "maxLength": 256 },
83
+ "image_reference": { "type": "string", "minLength": 1, "maxLength": 1024 },
84
+ "image_config_digest": { "$ref": "#/$defs/sha256" },
85
+ "first_observed_at": { "type": "string", "format": "date-time" },
86
+ "last_observed_at": { "type": "string", "format": "date-time" },
87
+ "peak_memory_bytes": { "type": "integer", "minimum": 0 },
88
+ "cpu_time_ns": { "type": "integer", "minimum": 0 },
89
+ "oom_killed": { "type": "boolean" },
90
+ "exit_code": { "type": "integer", "minimum": 0, "maximum": 255 },
91
+ "exit_reason": { "type": "string", "minLength": 1, "maxLength": 512 }
92
+ }
93
+ },
94
+ "sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
95
+ }
96
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/execution-lease.schema.json",
4
+ "title": "Hitch execution lease V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version", "lease_id", "work_id", "eval_id", "worker_id", "provider", "collision_domain_id",
9
+ "reservation", "state", "epoch", "issued_at", "expires_at"
10
+ ],
11
+ "properties": {
12
+ "schema_version": { "const": "1" },
13
+ "lease_id": { "type": "string", "pattern": "^lease_[a-f0-9]{32}$" },
14
+ "work_id": { "type": "string", "pattern": "^work_[a-f0-9]{32}$" },
15
+ "eval_id": { "type": "string", "pattern": "^eval_[a-f0-9]{32}$" },
16
+ "worker_id": { "type": "string", "minLength": 1 },
17
+ "provider": { "type": "string", "minLength": 1 },
18
+ "collision_domain_id": { "type": "string", "minLength": 1 },
19
+ "parent_allocation_id": { "type": "string", "pattern": "^allocation_[a-f0-9]{32}$" },
20
+ "reservation": { "$ref": "#/$defs/resources" },
21
+ "state": { "enum": ["offered", "accepted", "running", "releasing", "released", "expired", "lost"] },
22
+ "epoch": { "type": "integer", "minimum": 1 },
23
+ "resource_epochs": {
24
+ "type": "array",
25
+ "minItems": 1,
26
+ "uniqueItems": true,
27
+ "items": { "type": "integer", "minimum": 1 }
28
+ },
29
+ "issued_at": { "type": "string", "format": "date-time" },
30
+ "accepted_at": { "type": "string", "format": "date-time" },
31
+ "heartbeat_at": { "type": "string", "format": "date-time" },
32
+ "expires_at": { "type": "string", "format": "date-time" },
33
+ "terminal_at": { "type": "string", "format": "date-time" }
34
+ },
35
+ "$defs": {
36
+ "resources": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["cpu_millis", "memory_bytes", "container_slots", "build_slots"],
40
+ "properties": {
41
+ "cpu_millis": { "type": "integer", "minimum": 0 },
42
+ "memory_bytes": { "type": "integer", "minimum": 0 },
43
+ "container_slots": { "type": "integer", "minimum": 0 },
44
+ "build_slots": { "type": "integer", "minimum": 0 },
45
+ "gpu_count": { "type": "integer", "minimum": 0 },
46
+ "ephemeral_disk_bytes": { "type": "integer", "minimum": 0 }
47
+ }
48
+ }
49
+ }
50
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/execution-provider-status.schema.json",
4
+ "title": "Hitch execution provider status V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "provider", "worker_id", "collision_domain_id", "health", "platforms", "backends", "features", "capacity", "heartbeat_at"],
8
+ "properties": {
9
+ "schema_version": { "const": "1" },
10
+ "provider": { "type": "string", "minLength": 1 },
11
+ "worker_id": { "type": "string", "minLength": 1 },
12
+ "collision_domain_id": { "type": "string", "minLength": 1 },
13
+ "health": { "enum": ["healthy", "degraded", "unavailable"] },
14
+ "platforms": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } },
15
+ "backends": {
16
+ "type": "array",
17
+ "items": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": ["id", "version"],
21
+ "properties": {
22
+ "id": { "type": "string", "minLength": 1 },
23
+ "version": { "type": "string", "minLength": 1 }
24
+ }
25
+ }
26
+ },
27
+ "features": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "required": ["docker", "buildkit", "model_proxy", "isolated_same_task_attempts"],
31
+ "properties": {
32
+ "docker": { "type": "boolean" },
33
+ "buildkit": { "type": "boolean" },
34
+ "model_proxy": { "type": "boolean" },
35
+ "isolated_same_task_attempts": { "type": "boolean" }
36
+ }
37
+ },
38
+ "capacity": {
39
+ "type": "object",
40
+ "additionalProperties": false,
41
+ "required": ["total", "allocatable", "allocated"],
42
+ "properties": {
43
+ "total": { "$ref": "#/$defs/resources" },
44
+ "allocatable": { "$ref": "#/$defs/resources" },
45
+ "allocated": { "$ref": "#/$defs/resources" }
46
+ }
47
+ },
48
+ "heartbeat_at": { "type": "string", "format": "date-time" }
49
+ },
50
+ "$defs": {
51
+ "resources": {
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "required": ["cpu_millis", "memory_bytes", "container_slots", "build_slots"],
55
+ "properties": {
56
+ "cpu_millis": { "type": "integer", "minimum": 0 },
57
+ "memory_bytes": { "type": "integer", "minimum": 0 },
58
+ "container_slots": { "type": "integer", "minimum": 0 },
59
+ "build_slots": { "type": "integer", "minimum": 0 },
60
+ "gpu_count": { "type": "integer", "minimum": 0 },
61
+ "ephemeral_disk_bytes": { "type": "integer", "minimum": 0 }
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/execution-worker.schema.json",
4
+ "title": "Hitch execution worker V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "worker_id", "provider", "status", "collision_domain_id", "capabilities", "capacity"],
8
+ "properties": {
9
+ "schema_version": { "const": "1" },
10
+ "worker_id": { "type": "string", "minLength": 1 },
11
+ "provider": { "type": "string", "minLength": 1 },
12
+ "status": { "enum": ["ready", "draining", "offline"] },
13
+ "collision_domain_id": { "type": "string", "minLength": 1 },
14
+ "capabilities": {
15
+ "type": "object",
16
+ "additionalProperties": false,
17
+ "required": ["backends", "platforms", "task_membership", "isolated_same_task_attempts", "remote"],
18
+ "properties": {
19
+ "backends": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
20
+ "platforms": { "type": "array", "items": { "type": "string", "minLength": 1 }, "uniqueItems": true },
21
+ "task_membership": { "type": "array", "items": { "enum": ["known", "opaque"] }, "uniqueItems": true },
22
+ "isolated_same_task_attempts": { "type": "boolean" },
23
+ "remote": { "type": "boolean" }
24
+ }
25
+ },
26
+ "capacity": {
27
+ "type": "object",
28
+ "additionalProperties": false,
29
+ "required": ["total", "reserved_for_system", "allocatable", "allocated"],
30
+ "properties": {
31
+ "total": { "$ref": "#/$defs/resources" },
32
+ "reserved_for_system": { "$ref": "#/$defs/resources" },
33
+ "allocatable": { "$ref": "#/$defs/resources" },
34
+ "allocated": { "$ref": "#/$defs/resources" }
35
+ }
36
+ }
37
+ },
38
+ "$defs": {
39
+ "resources": {
40
+ "type": "object",
41
+ "additionalProperties": false,
42
+ "required": ["cpu_millis", "memory_bytes", "container_slots", "build_slots"],
43
+ "properties": {
44
+ "cpu_millis": { "type": "integer", "minimum": 0 },
45
+ "memory_bytes": { "type": "integer", "minimum": 0 },
46
+ "container_slots": { "type": "integer", "minimum": 0 },
47
+ "build_slots": { "type": "integer", "minimum": 0 },
48
+ "gpu_count": { "type": "integer", "minimum": 0 },
49
+ "ephemeral_disk_bytes": { "type": "integer", "minimum": 0 }
50
+ }
51
+ }
52
+ }
53
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/harbor-process-exit.schema.json",
4
+ "title": "Hitch supervised Harbor process exit V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "process_exit_code", "signal", "completed_at"],
8
+ "properties": {
9
+ "schema_version": { "const": "1" },
10
+ "process_exit_code": { "type": ["integer", "null"] },
11
+ "signal": { "type": ["string", "null"] },
12
+ "completed_at": { "type": "string", "format": "date-time" }
13
+ }
14
+ }
@@ -0,0 +1,45 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/interaction-capture-ref.schema.json",
4
+ "title": "Hitch interaction capture reference V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version", "run_id", "mode", "required", "topology", "completeness", "interaction_count",
9
+ "interactions_ref", "redaction"
10
+ ],
11
+ "properties": {
12
+ "schema_version": { "const": "1" },
13
+ "run_id": { "type": "string", "pattern": "^run_[a-f0-9]{32}$" },
14
+ "mode": { "enum": ["proxy", "hybrid"] },
15
+ "required": { "type": "boolean" },
16
+ "topology": { "enum": ["host-side", "in-sandbox"] },
17
+ "completeness": { "enum": ["complete", "partial", "none"] },
18
+ "interaction_count": { "type": "integer", "minimum": 0 },
19
+ "interactions_ref": { "$ref": "#/$defs/relativePath" },
20
+ "redaction": {
21
+ "type": "object",
22
+ "additionalProperties": false,
23
+ "required": ["policy", "status", "rules"],
24
+ "properties": {
25
+ "policy": { "type": "string", "minLength": 1, "maxLength": 256 },
26
+ "status": { "enum": ["applied", "not-needed", "failed"] },
27
+ "rules": {
28
+ "type": "array",
29
+ "items": {
30
+ "type": "object",
31
+ "additionalProperties": false,
32
+ "required": ["rule_id", "count"],
33
+ "properties": {
34
+ "rule_id": { "type": "string", "minLength": 1 },
35
+ "count": { "type": "integer", "minimum": 1 }
36
+ }
37
+ }
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "$defs": {
43
+ "relativePath": { "type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$" }
44
+ }
45
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/local-provider-execution.schema.json",
4
+ "title": "Hitch local Docker provider execution record V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "provider", "worker_id", "eval_id", "work_id", "lease_id", "lease_epoch", "backend_directory", "process", "state", "started_at"],
8
+ "properties": {
9
+ "schema_version": { "const": "1" },
10
+ "provider": { "const": "local-docker" },
11
+ "worker_id": { "type": "string", "minLength": 1 },
12
+ "eval_id": { "type": "string", "pattern": "^eval_[a-f0-9]{32}$" },
13
+ "work_id": { "type": "string", "pattern": "^work_[a-f0-9]{32}$" },
14
+ "lease_id": { "type": "string", "pattern": "^lease_[a-f0-9]{32}$" },
15
+ "lease_epoch": { "type": "integer", "minimum": 1 },
16
+ "backend_directory": { "type": "string", "minLength": 1, "maxLength": 4096, "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*\\\\)[^/]+(?:/[^/]+)*$" },
17
+ "process": {
18
+ "type": "object",
19
+ "additionalProperties": false,
20
+ "required": ["pid", "start_identity", "observed_at"],
21
+ "properties": {
22
+ "pid": { "type": "integer", "minimum": 1 },
23
+ "start_identity": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
24
+ "observed_at": { "type": "string", "format": "date-time" }
25
+ }
26
+ },
27
+ "state": { "enum": ["running", "terminal", "released"] },
28
+ "started_at": { "type": "string", "format": "date-time" },
29
+ "completed_at": { "type": "string", "format": "date-time" },
30
+ "process_exit_code": { "type": ["integer", "null"] },
31
+ "signal": { "type": ["string", "null"] }
32
+ }
33
+ }
@@ -0,0 +1,41 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/model-interaction.schema.json",
4
+ "title": "Hitch model interaction V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "interaction_id", "run_id", "sequence", "requested_model", "endpoint_identity", "started_at", "status"],
8
+ "properties": {
9
+ "schema_version": { "const": "1" },
10
+ "interaction_id": { "type": "string", "pattern": "^interaction_[a-f0-9]{32}$" },
11
+ "run_id": { "type": "string", "pattern": "^run_[a-f0-9]{32}$" },
12
+ "eval_id": { "type": "string", "minLength": 1 },
13
+ "trial_id": { "type": "string", "minLength": 1 },
14
+ "sequence": { "type": "integer", "minimum": 1 },
15
+ "requested_model": { "type": "string" },
16
+ "effective_model": { "type": "string", "minLength": 1 },
17
+ "endpoint_identity": { "$ref": "#/$defs/sha256" },
18
+ "started_at": { "type": "string", "format": "date-time" },
19
+ "completed_at": { "type": "string", "format": "date-time" },
20
+ "latency_ms": { "type": "integer", "minimum": 0 },
21
+ "status": { "enum": ["succeeded", "failed", "cancelled"] },
22
+ "http_status": { "type": "integer", "minimum": 100, "maximum": 599 },
23
+ "retry_of": { "type": "string", "pattern": "^interaction_[a-f0-9]{32}$" },
24
+ "usage": { "type": "object", "additionalProperties": { "type": "number", "minimum": 0 } },
25
+ "request_ref": { "$ref": "#/$defs/relativePath" },
26
+ "response_ref": { "$ref": "#/$defs/relativePath" },
27
+ "error": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "required": ["code", "message"],
31
+ "properties": {
32
+ "code": { "type": "string", "minLength": 1, "maxLength": 256 },
33
+ "message": { "type": "string", "minLength": 1, "maxLength": 4096 }
34
+ }
35
+ }
36
+ },
37
+ "$defs": {
38
+ "sha256": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
39
+ "relativePath": { "type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$" }
40
+ }
41
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/remote-result-envelope.schema.json",
4
+ "title": "Hitch remote result envelope V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "eval_id", "work_id", "lease_id", "lease_epoch", "trial", "files"],
8
+ "properties": {
9
+ "schema_version": { "const": "1" },
10
+ "eval_id": { "type": "string", "pattern": "^eval_[a-f0-9]{32}$" },
11
+ "work_id": { "type": "string", "pattern": "^work_[a-f0-9]{32}$" },
12
+ "lease_id": { "type": "string", "pattern": "^lease_[a-f0-9]{32}$" },
13
+ "lease_epoch": { "type": "integer", "minimum": 1 },
14
+ "trial": { "type": "object" },
15
+ "files": {
16
+ "type": "array",
17
+ "minItems": 1,
18
+ "maxItems": 100000,
19
+ "items": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": ["path", "size", "sha256", "content_base64"],
23
+ "properties": {
24
+ "path": { "type": "string", "minLength": 1 },
25
+ "size": { "type": "integer", "minimum": 0, "maximum": 134217728 },
26
+ "sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
27
+ "content_base64": { "type": "string", "contentEncoding": "base64" }
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/remote-tree-envelope.schema.json",
4
+ "title": "Hitch remote tree envelope V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "files"],
8
+ "properties": {
9
+ "schema_version": { "const": "1" },
10
+ "files": {
11
+ "type": "array", "minItems": 1, "maxItems": 100000,
12
+ "items": {
13
+ "type": "object", "additionalProperties": false,
14
+ "required": ["path", "mode", "size", "sha256", "content_base64"],
15
+ "properties": {
16
+ "path": { "type": "string", "minLength": 1 },
17
+ "mode": { "enum": [420, 493] },
18
+ "size": { "type": "integer", "minimum": 0, "maximum": 268435456 },
19
+ "sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
20
+ "content_base64": { "type": "string", "contentEncoding": "base64" }
21
+ }
22
+ }
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,58 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/remote-work-offer.schema.json",
4
+ "title": "Hitch remote work offer V1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": ["schema_version", "offer_id", "nonce", "generation", "worker_id", "lease", "work", "state", "issued_at", "expires_at"],
8
+ "properties": {
9
+ "schema_version": { "const": "1" },
10
+ "offer_id": { "type": "string", "pattern": "^offer_[a-f0-9]{32}$" },
11
+ "nonce": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
12
+ "generation": { "type": "integer", "minimum": 1 },
13
+ "worker_id": { "type": "string", "pattern": "^worker_[a-z0-9][a-z0-9_-]{0,62}$" },
14
+ "lease": { "$ref": "execution-lease.schema.json" },
15
+ "work": { "$ref": "eval-execution-plan.schema.json#/properties/work_items/items" },
16
+ "inputs": {
17
+ "type": "array", "minItems": 1, "maxItems": 4,
18
+ "items": { "$ref": "#/$defs/inputRef" }
19
+ },
20
+ "state": { "enum": ["offered", "accepted", "rejected", "cancel-requested", "completed", "release-requested", "released", "expired"] },
21
+ "issued_at": { "type": "string", "format": "date-time" },
22
+ "expires_at": { "type": "string", "format": "date-time" },
23
+ "accepted_at": { "type": "string", "format": "date-time" },
24
+ "completed_at": { "type": "string", "format": "date-time" },
25
+ "released_at": { "type": "string", "format": "date-time" },
26
+ "rejection_code": { "type": "string", "minLength": 1 },
27
+ "accept_receipt_digest": { "$ref": "#/$defs/sha256" },
28
+ "terminal_receipt_digest": { "$ref": "#/$defs/sha256" },
29
+ "release_receipt_digest": { "$ref": "#/$defs/sha256" },
30
+ "terminal": {
31
+ "type": "object", "additionalProperties": false, "required": ["status", "artifacts", "sent_at"],
32
+ "properties": {
33
+ "status": { "enum": ["succeeded", "failed", "cancelled"] },
34
+ "artifacts": { "type": "array", "items": { "$ref": "#/$defs/artifactRef" } },
35
+ "sent_at": { "type": "string", "format": "date-time" }
36
+ }
37
+ }
38
+ },
39
+ "$defs": {
40
+ "sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" },
41
+ "artifactRef": {
42
+ "type": "object", "additionalProperties": false, "required": ["kind", "digest", "size"],
43
+ "properties": {
44
+ "kind": { "enum": ["result-bundle", "diagnostic"] }, "digest": { "$ref": "#/$defs/sha256" },
45
+ "size": { "type": "integer", "minimum": 0, "maximum": 536870912 }
46
+ }
47
+ },
48
+ "inputRef": {
49
+ "type": "object", "additionalProperties": false, "required": ["kind", "format", "digest", "size"],
50
+ "properties": {
51
+ "kind": { "enum": ["work-spec", "harness-artifact", "controller-runtime", "task-input"] },
52
+ "format": { "enum": ["json", "hitch-tree-v1"] },
53
+ "digest": { "$ref": "#/$defs/sha256" },
54
+ "size": { "type": "integer", "minimum": 1, "maximum": 268435456 }
55
+ }
56
+ }
57
+ }
58
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://agent-hitch.local/schemas/remote-work-receipt.schema.json",
4
+ "title": "Hitch remote work receipt V1",
5
+ "oneOf": [
6
+ {
7
+ "type": "object", "additionalProperties": false,
8
+ "required": ["schema_version", "offer_id", "nonce", "generation", "accepted", "sent_at"],
9
+ "properties": {
10
+ "schema_version": { "const": "1" }, "offer_id": { "$ref": "#/$defs/offerId" }, "nonce": { "$ref": "#/$defs/nonce" },
11
+ "generation": { "type": "integer", "minimum": 1 }, "accepted": { "type": "boolean" },
12
+ "rejection_code": { "type": "string", "minLength": 1 }, "sent_at": { "type": "string", "format": "date-time" }
13
+ }
14
+ },
15
+ {
16
+ "type": "object", "additionalProperties": false,
17
+ "required": ["schema_version", "offer_id", "nonce", "generation", "lease_id", "epoch", "status", "artifacts", "sent_at"],
18
+ "properties": {
19
+ "schema_version": { "const": "1" }, "offer_id": { "$ref": "#/$defs/offerId" }, "nonce": { "$ref": "#/$defs/nonce" },
20
+ "generation": { "type": "integer", "minimum": 1 }, "lease_id": { "$ref": "#/$defs/leaseId" }, "epoch": { "type": "integer", "minimum": 1 },
21
+ "status": { "enum": ["succeeded", "failed", "cancelled"] },
22
+ "artifacts": {
23
+ "type": "array", "items": {
24
+ "type": "object", "additionalProperties": false, "required": ["kind", "digest", "size"],
25
+ "properties": {
26
+ "kind": { "enum": ["result-bundle", "diagnostic"] }, "digest": { "$ref": "#/$defs/sha256" },
27
+ "size": { "type": "integer", "minimum": 0, "maximum": 536870912 }
28
+ }
29
+ }
30
+ },
31
+ "sent_at": { "type": "string", "format": "date-time" }
32
+ }
33
+ },
34
+ {
35
+ "type": "object", "additionalProperties": false,
36
+ "required": ["schema_version", "offer_id", "nonce", "generation", "lease_id", "epoch", "sent_at"],
37
+ "properties": {
38
+ "schema_version": { "const": "1" }, "offer_id": { "$ref": "#/$defs/offerId" }, "nonce": { "$ref": "#/$defs/nonce" },
39
+ "generation": { "type": "integer", "minimum": 1 }, "lease_id": { "$ref": "#/$defs/leaseId" },
40
+ "epoch": { "type": "integer", "minimum": 1 }, "sent_at": { "type": "string", "format": "date-time" }
41
+ }
42
+ }
43
+ ],
44
+ "$defs": {
45
+ "offerId": { "type": "string", "pattern": "^offer_[a-f0-9]{32}$" },
46
+ "leaseId": { "type": "string", "pattern": "^lease_[a-f0-9]{32}$" },
47
+ "nonce": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
48
+ "sha256": { "type": "string", "pattern": "^sha256:[a-f0-9]{64}$" }
49
+ }
50
+ }