self-bench 0.3.5 → 0.3.8

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 (1198) hide show
  1. package/.dockerignore +11 -1
  2. package/Dockerfile +9 -9
  3. package/Dockerfile.sandbox +5 -4
  4. package/README.md +38 -21
  5. package/bun.lock +462 -95
  6. package/compose.yaml +64 -20
  7. package/dist/agent-feed.d.ts +8 -0
  8. package/dist/agent-feed.d.ts.map +1 -0
  9. package/dist/agent-feed.js +56 -0
  10. package/dist/agent-feed.js.map +1 -0
  11. package/dist/api/http.d.ts +18 -0
  12. package/dist/api/http.d.ts.map +1 -0
  13. package/dist/api/http.js +111 -0
  14. package/dist/api/http.js.map +1 -0
  15. package/dist/api/run-request.d.ts +37 -0
  16. package/dist/api/run-request.d.ts.map +1 -0
  17. package/dist/api/run-request.js +59 -0
  18. package/dist/api/run-request.js.map +1 -0
  19. package/dist/api/status.d.ts +4 -0
  20. package/dist/api/status.d.ts.map +1 -0
  21. package/dist/api/status.js +36 -0
  22. package/dist/api/status.js.map +1 -0
  23. package/dist/api/viewer-routes.d.ts +9 -0
  24. package/dist/api/viewer-routes.d.ts.map +1 -0
  25. package/dist/api/viewer-routes.js +98 -0
  26. package/dist/api/viewer-routes.js.map +1 -0
  27. package/dist/api-main.js +5 -1
  28. package/dist/api-main.js.map +1 -1
  29. package/dist/api.d.ts +7 -25
  30. package/dist/api.d.ts.map +1 -1
  31. package/dist/api.js +80 -148
  32. package/dist/api.js.map +1 -1
  33. package/dist/archive.d.ts +14 -0
  34. package/dist/archive.d.ts.map +1 -0
  35. package/dist/archive.js +114 -0
  36. package/dist/archive.js.map +1 -0
  37. package/dist/artifacts/common.d.ts +15 -0
  38. package/dist/artifacts/common.d.ts.map +1 -0
  39. package/dist/artifacts/common.js +58 -0
  40. package/dist/artifacts/common.js.map +1 -0
  41. package/dist/artifacts/gcs.d.ts +18 -0
  42. package/dist/artifacts/gcs.d.ts.map +1 -0
  43. package/dist/artifacts/gcs.js +178 -0
  44. package/dist/artifacts/gcs.js.map +1 -0
  45. package/dist/artifacts/local.d.ts +17 -0
  46. package/dist/artifacts/local.d.ts.map +1 -0
  47. package/dist/artifacts/local.js +205 -0
  48. package/dist/artifacts/local.js.map +1 -0
  49. package/dist/artifacts/types.d.ts +18 -0
  50. package/dist/artifacts/types.d.ts.map +1 -0
  51. package/dist/artifacts/types.js +2 -0
  52. package/dist/artifacts/types.js.map +1 -0
  53. package/dist/artifacts.d.ts +5 -28
  54. package/dist/artifacts.d.ts.map +1 -1
  55. package/dist/artifacts.js +5 -302
  56. package/dist/artifacts.js.map +1 -1
  57. package/dist/audit.d.ts.map +1 -1
  58. package/dist/audit.js +8 -2
  59. package/dist/audit.js.map +1 -1
  60. package/dist/auth/api-key-routes.d.ts +17 -0
  61. package/dist/auth/api-key-routes.d.ts.map +1 -0
  62. package/dist/auth/api-key-routes.js +57 -0
  63. package/dist/auth/api-key-routes.js.map +1 -0
  64. package/dist/auth/api-keys.d.ts +47 -0
  65. package/dist/auth/api-keys.d.ts.map +1 -0
  66. package/dist/auth/api-keys.js +102 -0
  67. package/dist/auth/api-keys.js.map +1 -0
  68. package/dist/auth/config.d.ts +17 -0
  69. package/dist/auth/config.d.ts.map +1 -0
  70. package/dist/auth/config.js +38 -0
  71. package/dist/auth/config.js.map +1 -0
  72. package/dist/auth/cookies.d.ts +12 -0
  73. package/dist/auth/cookies.d.ts.map +1 -0
  74. package/dist/auth/cookies.js +45 -0
  75. package/dist/auth/cookies.js.map +1 -0
  76. package/dist/auth/crypto.d.ts +19 -0
  77. package/dist/auth/crypto.d.ts.map +1 -0
  78. package/dist/auth/crypto.js +48 -0
  79. package/dist/auth/crypto.js.map +1 -0
  80. package/dist/auth/github.d.ts +37 -0
  81. package/dist/auth/github.d.ts.map +1 -0
  82. package/dist/auth/github.js +127 -0
  83. package/dist/auth/github.js.map +1 -0
  84. package/dist/auth/routes.d.ts +41 -0
  85. package/dist/auth/routes.d.ts.map +1 -0
  86. package/dist/auth/routes.js +153 -0
  87. package/dist/auth/routes.js.map +1 -0
  88. package/dist/auth/session-expired.d.ts +4 -0
  89. package/dist/auth/session-expired.d.ts.map +1 -0
  90. package/dist/auth/session-expired.js +17 -0
  91. package/dist/auth/session-expired.js.map +1 -0
  92. package/dist/auth/session.d.ts +23 -0
  93. package/dist/auth/session.d.ts.map +1 -0
  94. package/dist/auth/session.js +56 -0
  95. package/dist/auth/session.js.map +1 -0
  96. package/dist/auth/users.d.ts +49 -0
  97. package/dist/auth/users.d.ts.map +1 -0
  98. package/dist/auth/users.js +125 -0
  99. package/dist/auth/users.js.map +1 -0
  100. package/dist/build-metadata.js +1 -1
  101. package/dist/cli/api-client.d.ts +8 -0
  102. package/dist/cli/api-client.d.ts.map +1 -0
  103. package/dist/cli/api-client.js +71 -0
  104. package/dist/cli/api-client.js.map +1 -0
  105. package/dist/cli/associate.d.ts +2 -0
  106. package/dist/cli/associate.d.ts.map +1 -0
  107. package/dist/cli/associate.js +51 -0
  108. package/dist/cli/associate.js.map +1 -0
  109. package/dist/cli/help.d.ts +2 -0
  110. package/dist/cli/help.d.ts.map +1 -0
  111. package/dist/cli/help.js +52 -0
  112. package/dist/cli/help.js.map +1 -0
  113. package/dist/cli/main.d.ts +2 -0
  114. package/dist/cli/main.d.ts.map +1 -0
  115. package/dist/cli/main.js +55 -0
  116. package/dist/cli/main.js.map +1 -0
  117. package/dist/cli/replay.d.ts +3 -0
  118. package/dist/cli/replay.d.ts.map +1 -0
  119. package/dist/cli/replay.js +59 -0
  120. package/dist/cli/replay.js.map +1 -0
  121. package/dist/cli/repository.d.ts +6 -0
  122. package/dist/cli/repository.d.ts.map +1 -0
  123. package/dist/cli/repository.js +36 -0
  124. package/dist/cli/repository.js.map +1 -0
  125. package/dist/cli/run.d.ts +2 -0
  126. package/dist/cli/run.d.ts.map +1 -0
  127. package/dist/cli/run.js +93 -0
  128. package/dist/cli/run.js.map +1 -0
  129. package/dist/cli/stack-environment.d.ts +26 -0
  130. package/dist/cli/stack-environment.d.ts.map +1 -0
  131. package/dist/cli/stack-environment.js +86 -0
  132. package/dist/cli/stack-environment.js.map +1 -0
  133. package/dist/cli/stack.d.ts +6 -0
  134. package/dist/cli/stack.d.ts.map +1 -0
  135. package/dist/cli/stack.js +131 -0
  136. package/dist/cli/stack.js.map +1 -0
  137. package/dist/cli/values.d.ts +8 -0
  138. package/dist/cli/values.d.ts.map +1 -0
  139. package/dist/cli/values.js +30 -0
  140. package/dist/cli/values.js.map +1 -0
  141. package/dist/cli/view.d.ts +2 -0
  142. package/dist/cli/view.d.ts.map +1 -0
  143. package/dist/cli/view.js +40 -0
  144. package/dist/cli/view.js.map +1 -0
  145. package/dist/cli.js +2 -369
  146. package/dist/cli.js.map +1 -1
  147. package/dist/config.d.ts +16 -2
  148. package/dist/config.d.ts.map +1 -1
  149. package/dist/config.js +60 -22
  150. package/dist/config.js.map +1 -1
  151. package/dist/contracts/common.d.ts +22 -0
  152. package/dist/contracts/common.d.ts.map +1 -0
  153. package/dist/contracts/common.js +29 -0
  154. package/dist/contracts/common.js.map +1 -0
  155. package/dist/contracts/results.d.ts +66 -0
  156. package/dist/contracts/results.d.ts.map +1 -0
  157. package/dist/contracts/results.js +2 -0
  158. package/dist/contracts/results.js.map +1 -0
  159. package/dist/contracts/run.d.ts +145 -0
  160. package/dist/contracts/run.d.ts.map +1 -0
  161. package/dist/contracts/run.js +74 -0
  162. package/dist/contracts/run.js.map +1 -0
  163. package/dist/contracts/task.d.ts +232 -0
  164. package/dist/contracts/task.d.ts.map +1 -0
  165. package/dist/contracts/task.js +198 -0
  166. package/dist/contracts/task.js.map +1 -0
  167. package/dist/contracts/verify.d.ts +331 -0
  168. package/dist/contracts/verify.d.ts.map +1 -0
  169. package/dist/contracts/verify.js +84 -0
  170. package/dist/contracts/verify.js.map +1 -0
  171. package/dist/contracts.d.ts +5 -242
  172. package/dist/contracts.d.ts.map +1 -1
  173. package/dist/contracts.js +5 -127
  174. package/dist/contracts.js.map +1 -1
  175. package/dist/db/client.d.ts +12 -0
  176. package/dist/db/client.d.ts.map +1 -0
  177. package/dist/db/client.js +16 -0
  178. package/dist/db/client.js.map +1 -0
  179. package/dist/db/schema.d.ts +1256 -0
  180. package/dist/db/schema.d.ts.map +1 -0
  181. package/dist/db/schema.js +128 -0
  182. package/dist/db/schema.js.map +1 -0
  183. package/dist/environment.d.ts +9 -0
  184. package/dist/environment.d.ts.map +1 -0
  185. package/dist/environment.js +101 -0
  186. package/dist/environment.js.map +1 -0
  187. package/dist/evaluation/account.d.ts +30 -0
  188. package/dist/evaluation/account.d.ts.map +1 -0
  189. package/dist/evaluation/account.js +34 -0
  190. package/dist/evaluation/account.js.map +1 -0
  191. package/dist/evaluation/activities.d.ts +9 -0
  192. package/dist/evaluation/activities.d.ts.map +1 -0
  193. package/dist/evaluation/activities.js +40 -0
  194. package/dist/evaluation/activities.js.map +1 -0
  195. package/dist/evaluation/catalog-pricing.d.ts +3 -0
  196. package/dist/evaluation/catalog-pricing.d.ts.map +1 -0
  197. package/dist/evaluation/catalog-pricing.js +37 -0
  198. package/dist/evaluation/catalog-pricing.js.map +1 -0
  199. package/dist/evaluation/catalog.d.ts +17 -0
  200. package/dist/evaluation/catalog.d.ts.map +1 -0
  201. package/dist/evaluation/catalog.js +126 -0
  202. package/dist/evaluation/catalog.js.map +1 -0
  203. package/dist/evaluation/codex-login-process.d.ts +12 -0
  204. package/dist/evaluation/codex-login-process.d.ts.map +1 -0
  205. package/dist/evaluation/codex-login-process.js +121 -0
  206. package/dist/evaluation/codex-login-process.js.map +1 -0
  207. package/dist/evaluation/codex-login-routes.d.ts +5 -0
  208. package/dist/evaluation/codex-login-routes.d.ts.map +1 -0
  209. package/dist/evaluation/codex-login-routes.js +55 -0
  210. package/dist/evaluation/codex-login-routes.js.map +1 -0
  211. package/dist/evaluation/codex-login.d.ts +42 -0
  212. package/dist/evaluation/codex-login.d.ts.map +1 -0
  213. package/dist/evaluation/codex-login.js +143 -0
  214. package/dist/evaluation/codex-login.js.map +1 -0
  215. package/dist/evaluation/comparisons.d.ts +65 -0
  216. package/dist/evaluation/comparisons.d.ts.map +1 -0
  217. package/dist/evaluation/comparisons.js +161 -0
  218. package/dist/evaluation/comparisons.js.map +1 -0
  219. package/dist/evaluation/config.d.ts +43 -0
  220. package/dist/evaluation/config.d.ts.map +1 -0
  221. package/dist/evaluation/config.js +116 -0
  222. package/dist/evaluation/config.js.map +1 -0
  223. package/dist/evaluation/cost.d.ts +3 -0
  224. package/dist/evaluation/cost.d.ts.map +1 -0
  225. package/dist/evaluation/cost.js +95 -0
  226. package/dist/evaluation/cost.js.map +1 -0
  227. package/dist/evaluation/credential-execution.d.ts +10 -0
  228. package/dist/evaluation/credential-execution.d.ts.map +1 -0
  229. package/dist/evaluation/credential-execution.js +65 -0
  230. package/dist/evaluation/credential-execution.js.map +1 -0
  231. package/dist/evaluation/credentials.d.ts +40 -0
  232. package/dist/evaluation/credentials.d.ts.map +1 -0
  233. package/dist/evaluation/credentials.js +146 -0
  234. package/dist/evaluation/credentials.js.map +1 -0
  235. package/dist/evaluation/encrypted-records.d.ts +15 -0
  236. package/dist/evaluation/encrypted-records.d.ts.map +1 -0
  237. package/dist/evaluation/encrypted-records.js +57 -0
  238. package/dist/evaluation/encrypted-records.js.map +1 -0
  239. package/dist/evaluation/gateway-execution.d.ts +18 -0
  240. package/dist/evaluation/gateway-execution.d.ts.map +1 -0
  241. package/dist/evaluation/gateway-execution.js +38 -0
  242. package/dist/evaluation/gateway-execution.js.map +1 -0
  243. package/dist/evaluation/harbor-cost.d.ts +3 -0
  244. package/dist/evaluation/harbor-cost.d.ts.map +1 -0
  245. package/dist/evaluation/harbor-cost.js +39 -0
  246. package/dist/evaluation/harbor-cost.js.map +1 -0
  247. package/dist/evaluation/harbor_e2b.py +20 -0
  248. package/dist/evaluation/harbor_gateway.py +22 -0
  249. package/dist/evaluation/harnesses.d.ts +8 -0
  250. package/dist/evaluation/harnesses.d.ts.map +1 -0
  251. package/dist/evaluation/harnesses.js +10 -0
  252. package/dist/evaluation/harnesses.js.map +1 -0
  253. package/dist/evaluation/model-options.d.ts +9 -0
  254. package/dist/evaluation/model-options.d.ts.map +1 -0
  255. package/dist/evaluation/model-options.js +81 -0
  256. package/dist/evaluation/model-options.js.map +1 -0
  257. package/dist/evaluation/org-credential-routes.d.ts +5 -0
  258. package/dist/evaluation/org-credential-routes.d.ts.map +1 -0
  259. package/dist/evaluation/org-credential-routes.js +56 -0
  260. package/dist/evaluation/org-credential-routes.js.map +1 -0
  261. package/dist/evaluation/org-records.d.ts +4 -0
  262. package/dist/evaluation/org-records.d.ts.map +1 -0
  263. package/dist/evaluation/org-records.js +14 -0
  264. package/dist/evaluation/org-records.js.map +1 -0
  265. package/dist/evaluation/output.d.ts +9 -0
  266. package/dist/evaluation/output.d.ts.map +1 -0
  267. package/dist/evaluation/output.js +171 -0
  268. package/dist/evaluation/output.js.map +1 -0
  269. package/dist/evaluation/platform-routes.d.ts +5 -0
  270. package/dist/evaluation/platform-routes.d.ts.map +1 -0
  271. package/dist/evaluation/platform-routes.js +123 -0
  272. package/dist/evaluation/platform-routes.js.map +1 -0
  273. package/dist/evaluation/profile-routes.d.ts +16 -0
  274. package/dist/evaluation/profile-routes.d.ts.map +1 -0
  275. package/dist/evaluation/profile-routes.js +47 -0
  276. package/dist/evaluation/profile-routes.js.map +1 -0
  277. package/dist/evaluation/profiles.d.ts +48 -0
  278. package/dist/evaluation/profiles.d.ts.map +1 -0
  279. package/dist/evaluation/profiles.js +134 -0
  280. package/dist/evaluation/profiles.js.map +1 -0
  281. package/dist/evaluation/providers.d.ts +11 -0
  282. package/dist/evaluation/providers.d.ts.map +1 -0
  283. package/dist/evaluation/providers.js +30 -0
  284. package/dist/evaluation/providers.js.map +1 -0
  285. package/dist/evaluation/routes.d.ts +23 -0
  286. package/dist/evaluation/routes.d.ts.map +1 -0
  287. package/dist/evaluation/routes.js +212 -0
  288. package/dist/evaluation/routes.js.map +1 -0
  289. package/dist/evaluation/runner.d.ts +16 -0
  290. package/dist/evaluation/runner.d.ts.map +1 -0
  291. package/dist/evaluation/runner.js +241 -0
  292. package/dist/evaluation/runner.js.map +1 -0
  293. package/dist/evaluation/store.d.ts +8 -0
  294. package/dist/evaluation/store.d.ts.map +1 -0
  295. package/dist/evaluation/store.js +60 -0
  296. package/dist/evaluation/store.js.map +1 -0
  297. package/dist/evaluation/types.d.ts +98 -0
  298. package/dist/evaluation/types.d.ts.map +1 -0
  299. package/dist/evaluation/types.js +2 -0
  300. package/dist/evaluation/types.js.map +1 -0
  301. package/dist/evaluation/worker-main.d.ts +2 -0
  302. package/dist/evaluation/worker-main.d.ts.map +1 -0
  303. package/dist/evaluation/worker-main.js +26 -0
  304. package/dist/evaluation/worker-main.js.map +1 -0
  305. package/dist/evaluation/worker-records.d.ts +5 -0
  306. package/dist/evaluation/worker-records.d.ts.map +1 -0
  307. package/dist/evaluation/worker-records.js +11 -0
  308. package/dist/evaluation/worker-records.js.map +1 -0
  309. package/dist/evaluation/workflow.d.ts +3 -0
  310. package/dist/evaluation/workflow.d.ts.map +1 -0
  311. package/dist/evaluation/workflow.js +20 -0
  312. package/dist/evaluation/workflow.js.map +1 -0
  313. package/dist/execution-environment.d.ts +3 -0
  314. package/dist/execution-environment.d.ts.map +1 -0
  315. package/dist/execution-environment.js +9 -0
  316. package/dist/execution-environment.js.map +1 -0
  317. package/dist/extension-authoring.bundle.js +347 -0
  318. package/dist/extension-verifier.bundle.js +73 -0
  319. package/dist/extensions/authoring.d.ts.map +1 -1
  320. package/dist/extensions/authoring.js +70 -59
  321. package/dist/extensions/authoring.js.map +1 -1
  322. package/dist/extensions/discovery.d.ts.map +1 -1
  323. package/dist/extensions/discovery.js +12 -5
  324. package/dist/extensions/discovery.js.map +1 -1
  325. package/dist/extensions/shared/deliverable.d.ts +33 -0
  326. package/dist/extensions/shared/deliverable.d.ts.map +1 -0
  327. package/dist/extensions/shared/deliverable.js +123 -0
  328. package/dist/extensions/shared/deliverable.js.map +1 -0
  329. package/dist/extensions/shared/mailbox.d.ts +33 -0
  330. package/dist/extensions/shared/mailbox.d.ts.map +1 -0
  331. package/dist/extensions/shared/mailbox.js +102 -0
  332. package/dist/extensions/shared/mailbox.js.map +1 -0
  333. package/dist/extensions/shared/schemas.d.ts +90 -0
  334. package/dist/extensions/shared/schemas.d.ts.map +1 -0
  335. package/dist/extensions/shared/schemas.js +71 -0
  336. package/dist/extensions/shared/schemas.js.map +1 -0
  337. package/dist/extensions/shared/static-check.d.ts +38 -0
  338. package/dist/extensions/shared/static-check.d.ts.map +1 -0
  339. package/dist/extensions/shared/static-check.js +52 -0
  340. package/dist/extensions/shared/static-check.js.map +1 -0
  341. package/dist/extensions/verifier.d.ts +4 -0
  342. package/dist/extensions/verifier.d.ts.map +1 -0
  343. package/dist/extensions/verifier.js +70 -0
  344. package/dist/extensions/verifier.js.map +1 -0
  345. package/dist/github.d.ts +1 -1
  346. package/dist/github.d.ts.map +1 -1
  347. package/dist/github.js +3 -3
  348. package/dist/github.js.map +1 -1
  349. package/dist/harbor-environment.d.ts +13 -1
  350. package/dist/harbor-environment.d.ts.map +1 -1
  351. package/dist/harbor-environment.js +37 -4
  352. package/dist/harbor-environment.js.map +1 -1
  353. package/dist/harbor-results.d.ts +2 -0
  354. package/dist/harbor-results.d.ts.map +1 -1
  355. package/dist/harbor-results.js +2 -0
  356. package/dist/harbor-results.js.map +1 -1
  357. package/dist/harbor-task/compiler.d.ts +10 -0
  358. package/dist/harbor-task/compiler.d.ts.map +1 -0
  359. package/dist/harbor-task/compiler.js +174 -0
  360. package/dist/harbor-task/compiler.js.map +1 -0
  361. package/dist/harbor-task/constants.d.ts +3 -0
  362. package/dist/harbor-task/constants.d.ts.map +1 -0
  363. package/dist/harbor-task/constants.js +3 -0
  364. package/dist/harbor-task/constants.js.map +1 -0
  365. package/dist/harbor-task/dependencies.d.ts +3 -0
  366. package/dist/harbor-task/dependencies.d.ts.map +1 -0
  367. package/dist/harbor-task/dependencies.js +20 -0
  368. package/dist/harbor-task/dependencies.js.map +1 -0
  369. package/dist/harbor-task/paths.d.ts +6 -0
  370. package/dist/harbor-task/paths.d.ts.map +1 -0
  371. package/dist/harbor-task/paths.js +37 -0
  372. package/dist/harbor-task/paths.js.map +1 -0
  373. package/dist/harbor-task/render.d.ts +11 -0
  374. package/dist/harbor-task/render.d.ts.map +1 -0
  375. package/dist/harbor-task/render.js +194 -0
  376. package/dist/harbor-task/render.js.map +1 -0
  377. package/dist/harbor-task/runtime/command.sh +26 -0
  378. package/dist/harbor-task/runtime/junit.py +69 -0
  379. package/dist/harbor-task/runtime-assets.d.ts +2 -0
  380. package/dist/harbor-task/runtime-assets.d.ts.map +1 -0
  381. package/dist/harbor-task/runtime-assets.js +8 -0
  382. package/dist/harbor-task/runtime-assets.js.map +1 -0
  383. package/dist/harbor-task/test-patch.d.ts +4 -0
  384. package/dist/harbor-task/test-patch.d.ts.map +1 -0
  385. package/dist/harbor-task/test-patch.js +15 -0
  386. package/dist/harbor-task/test-patch.js.map +1 -0
  387. package/dist/harbor-task/verifier.d.ts +4 -0
  388. package/dist/harbor-task/verifier.d.ts.map +1 -0
  389. package/dist/harbor-task/verifier.js +105 -0
  390. package/dist/harbor-task/verifier.js.map +1 -0
  391. package/dist/harbor-task.d.ts +3 -11
  392. package/dist/harbor-task.d.ts.map +1 -1
  393. package/dist/harbor-task.js +2 -461
  394. package/dist/harbor-task.js.map +1 -1
  395. package/dist/log-excerpt.d.ts +15 -0
  396. package/dist/log-excerpt.d.ts.map +1 -0
  397. package/dist/log-excerpt.js +104 -0
  398. package/dist/log-excerpt.js.map +1 -0
  399. package/dist/patch-check.d.ts +26 -0
  400. package/dist/patch-check.d.ts.map +1 -0
  401. package/dist/patch-check.js +137 -0
  402. package/dist/patch-check.js.map +1 -0
  403. package/dist/pi-event-feed.d.ts +16 -0
  404. package/dist/pi-event-feed.d.ts.map +1 -0
  405. package/dist/pi-event-feed.js +86 -0
  406. package/dist/pi-event-feed.js.map +1 -0
  407. package/dist/pi-session.d.ts +32 -0
  408. package/dist/pi-session.d.ts.map +1 -0
  409. package/dist/pi-session.js +175 -0
  410. package/dist/pi-session.js.map +1 -0
  411. package/dist/process.d.ts +5 -0
  412. package/dist/process.d.ts.map +1 -1
  413. package/dist/process.js +31 -9
  414. package/dist/process.js.map +1 -1
  415. package/dist/project-paths.d.ts +2 -0
  416. package/dist/project-paths.d.ts.map +1 -0
  417. package/dist/project-paths.js +15 -0
  418. package/dist/project-paths.js.map +1 -0
  419. package/dist/provenance/github.d.ts +4 -0
  420. package/dist/provenance/github.d.ts.map +1 -0
  421. package/dist/provenance/github.js +65 -0
  422. package/dist/provenance/github.js.map +1 -0
  423. package/dist/provenance/local.d.ts +4 -0
  424. package/dist/provenance/local.d.ts.map +1 -0
  425. package/dist/provenance/local.js +82 -0
  426. package/dist/provenance/local.js.map +1 -0
  427. package/dist/provenance/redact.d.ts +2 -0
  428. package/dist/provenance/redact.d.ts.map +1 -0
  429. package/dist/provenance/redact.js +28 -0
  430. package/dist/provenance/redact.js.map +1 -0
  431. package/dist/provenance/selection.d.ts +4 -0
  432. package/dist/provenance/selection.d.ts.map +1 -0
  433. package/dist/provenance/selection.js +29 -0
  434. package/dist/provenance/selection.js.map +1 -0
  435. package/dist/provenance/session.d.ts +3 -0
  436. package/dist/provenance/session.d.ts.map +1 -0
  437. package/dist/provenance/session.js +214 -0
  438. package/dist/provenance/session.js.map +1 -0
  439. package/dist/provenance/shared.d.ts +7 -0
  440. package/dist/provenance/shared.d.ts.map +1 -0
  441. package/dist/provenance/shared.js +10 -0
  442. package/dist/provenance/shared.js.map +1 -0
  443. package/dist/provenance/types.d.ts +34 -0
  444. package/dist/provenance/types.d.ts.map +1 -0
  445. package/dist/provenance/types.js +22 -0
  446. package/dist/provenance/types.js.map +1 -0
  447. package/dist/provenance-associations/apply.d.ts +3 -0
  448. package/dist/provenance-associations/apply.d.ts.map +1 -0
  449. package/dist/provenance-associations/apply.js +66 -0
  450. package/dist/provenance-associations/apply.js.map +1 -0
  451. package/dist/provenance-associations/shared.d.ts +45 -0
  452. package/dist/provenance-associations/shared.d.ts.map +1 -0
  453. package/dist/provenance-associations/shared.js +42 -0
  454. package/dist/provenance-associations/shared.js.map +1 -0
  455. package/dist/provenance-associations.d.ts +22 -0
  456. package/dist/provenance-associations.d.ts.map +1 -0
  457. package/dist/provenance-associations.js +121 -0
  458. package/dist/provenance-associations.js.map +1 -0
  459. package/dist/provenance.d.ts +7 -20
  460. package/dist/provenance.d.ts.map +1 -1
  461. package/dist/provenance.js +6 -360
  462. package/dist/provenance.js.map +1 -1
  463. package/dist/providers.d.ts +25 -2
  464. package/dist/providers.d.ts.map +1 -1
  465. package/dist/providers.js +23 -2
  466. package/dist/providers.js.map +1 -1
  467. package/dist/repair.d.ts +1 -6
  468. package/dist/repair.d.ts.map +1 -1
  469. package/dist/repair.js +17 -27
  470. package/dist/repair.js.map +1 -1
  471. package/dist/review/assets/index-BHHztQ9x.js +1679 -0
  472. package/dist/review/assets/index-KQ1eFQ0t.css +1 -0
  473. package/dist/review/index.html +11 -8
  474. package/dist/runtime/command.sh +26 -0
  475. package/dist/runtime/junit.py +69 -0
  476. package/dist/sandbox/contracts.d.ts +76 -0
  477. package/dist/sandbox/contracts.d.ts.map +1 -0
  478. package/dist/sandbox/contracts.js +12 -0
  479. package/dist/sandbox/contracts.js.map +1 -0
  480. package/dist/sandbox/index.d.ts +5 -0
  481. package/dist/sandbox/index.d.ts.map +1 -0
  482. package/dist/sandbox/index.js +27 -0
  483. package/dist/sandbox/index.js.map +1 -0
  484. package/dist/sandbox/live.d.ts +18 -0
  485. package/dist/sandbox/live.d.ts.map +1 -0
  486. package/dist/sandbox/live.js +55 -0
  487. package/dist/sandbox/live.js.map +1 -0
  488. package/dist/sandbox/output-retry.d.ts +16 -0
  489. package/dist/sandbox/output-retry.d.ts.map +1 -0
  490. package/dist/sandbox/output-retry.js +36 -0
  491. package/dist/sandbox/output-retry.js.map +1 -0
  492. package/dist/sandbox/programs/author.d.ts +3 -0
  493. package/dist/sandbox/programs/author.d.ts.map +1 -0
  494. package/dist/sandbox/programs/author.js +27 -0
  495. package/dist/sandbox/programs/author.js.map +1 -0
  496. package/dist/sandbox/programs/check.d.ts +3 -0
  497. package/dist/sandbox/programs/check.d.ts.map +1 -0
  498. package/dist/sandbox/programs/check.js +76 -0
  499. package/dist/sandbox/programs/check.js.map +1 -0
  500. package/dist/sandbox/programs/prepare-task.d.ts +12 -0
  501. package/dist/sandbox/programs/prepare-task.d.ts.map +1 -0
  502. package/dist/sandbox/programs/prepare-task.js +32 -0
  503. package/dist/sandbox/programs/prepare-task.js.map +1 -0
  504. package/dist/sandbox/programs/verifier.d.ts +3 -0
  505. package/dist/sandbox/programs/verifier.d.ts.map +1 -0
  506. package/dist/sandbox/programs/verifier.js +9 -0
  507. package/dist/sandbox/programs/verifier.js.map +1 -0
  508. package/dist/sandbox/providers/docker/executor.d.ts +14 -0
  509. package/dist/sandbox/providers/docker/executor.d.ts.map +1 -0
  510. package/dist/sandbox/providers/docker/executor.js +153 -0
  511. package/dist/sandbox/providers/docker/executor.js.map +1 -0
  512. package/dist/sandbox/providers/e2b/bytes.d.ts +3 -0
  513. package/dist/sandbox/providers/e2b/bytes.d.ts.map +1 -0
  514. package/dist/sandbox/providers/e2b/bytes.js +8 -0
  515. package/dist/sandbox/providers/e2b/bytes.js.map +1 -0
  516. package/dist/sandbox/providers/e2b/cleanup.d.ts +8 -0
  517. package/dist/sandbox/providers/e2b/cleanup.d.ts.map +1 -0
  518. package/dist/sandbox/providers/e2b/cleanup.js +124 -0
  519. package/dist/sandbox/providers/e2b/cleanup.js.map +1 -0
  520. package/dist/sandbox/providers/e2b/command.d.ts +23 -0
  521. package/dist/sandbox/providers/e2b/command.d.ts.map +1 -0
  522. package/dist/sandbox/providers/e2b/command.js +160 -0
  523. package/dist/sandbox/providers/e2b/command.js.map +1 -0
  524. package/dist/sandbox/providers/e2b/config.d.ts +13 -0
  525. package/dist/sandbox/providers/e2b/config.d.ts.map +1 -0
  526. package/dist/sandbox/providers/e2b/config.js +2 -0
  527. package/dist/sandbox/providers/e2b/config.js.map +1 -0
  528. package/dist/sandbox/providers/e2b/executor.d.ts +15 -0
  529. package/dist/sandbox/providers/e2b/executor.d.ts.map +1 -0
  530. package/dist/sandbox/providers/e2b/executor.js +207 -0
  531. package/dist/sandbox/providers/e2b/executor.js.map +1 -0
  532. package/dist/sandbox/providers/e2b/lifecycle.d.ts +8 -0
  533. package/dist/sandbox/providers/e2b/lifecycle.d.ts.map +1 -0
  534. package/dist/sandbox/providers/e2b/lifecycle.js +37 -0
  535. package/dist/sandbox/providers/e2b/lifecycle.js.map +1 -0
  536. package/dist/sandbox/providers/e2b/outcome.d.ts +11 -0
  537. package/dist/sandbox/providers/e2b/outcome.d.ts.map +1 -0
  538. package/dist/sandbox/providers/e2b/outcome.js +72 -0
  539. package/dist/sandbox/providers/e2b/outcome.js.map +1 -0
  540. package/dist/sandbox/providers/e2b/stage-files.d.ts +10 -0
  541. package/dist/sandbox/providers/e2b/stage-files.d.ts.map +1 -0
  542. package/dist/sandbox/providers/e2b/stage-files.js +45 -0
  543. package/dist/sandbox/providers/e2b/stage-files.js.map +1 -0
  544. package/dist/sandbox/providers/e2b/startup.d.ts +10 -0
  545. package/dist/sandbox/providers/e2b/startup.d.ts.map +1 -0
  546. package/dist/sandbox/providers/e2b/startup.js +26 -0
  547. package/dist/sandbox/providers/e2b/startup.js.map +1 -0
  548. package/dist/sandbox/providers/e2b/types.d.ts +9 -0
  549. package/dist/sandbox/providers/e2b/types.d.ts.map +1 -0
  550. package/dist/sandbox/providers/e2b/types.js +2 -0
  551. package/dist/sandbox/providers/e2b/types.js.map +1 -0
  552. package/dist/sandbox/providers/e2b/validation.d.ts +14 -0
  553. package/dist/sandbox/providers/e2b/validation.d.ts.map +1 -0
  554. package/dist/sandbox/providers/e2b/validation.js +60 -0
  555. package/dist/sandbox/providers/e2b/validation.js.map +1 -0
  556. package/dist/sandbox/providers/modal/auth.d.ts +2 -0
  557. package/dist/sandbox/providers/modal/auth.d.ts.map +1 -0
  558. package/dist/sandbox/providers/modal/auth.js +9 -0
  559. package/dist/sandbox/providers/modal/auth.js.map +1 -0
  560. package/dist/sandbox/providers/modal/executor.d.ts +15 -0
  561. package/dist/sandbox/providers/modal/executor.d.ts.map +1 -0
  562. package/dist/sandbox/providers/modal/executor.js +207 -0
  563. package/dist/sandbox/providers/modal/executor.js.map +1 -0
  564. package/dist/sandbox/providers/modal/live.d.ts +7 -0
  565. package/dist/sandbox/providers/modal/live.d.ts.map +1 -0
  566. package/dist/sandbox/providers/modal/live.js +50 -0
  567. package/dist/sandbox/providers/modal/live.js.map +1 -0
  568. package/dist/sandbox/providers/vercel/command.d.ts +20 -0
  569. package/dist/sandbox/providers/vercel/command.d.ts.map +1 -0
  570. package/dist/sandbox/providers/vercel/command.js +126 -0
  571. package/dist/sandbox/providers/vercel/command.js.map +1 -0
  572. package/dist/sandbox/providers/vercel/executor.d.ts +13 -0
  573. package/dist/sandbox/providers/vercel/executor.d.ts.map +1 -0
  574. package/dist/sandbox/providers/vercel/executor.js +190 -0
  575. package/dist/sandbox/providers/vercel/executor.js.map +1 -0
  576. package/dist/sandbox/providers/vercel/fetch.d.ts +6 -0
  577. package/dist/sandbox/providers/vercel/fetch.d.ts.map +1 -0
  578. package/dist/sandbox/providers/vercel/fetch.js +39 -0
  579. package/dist/sandbox/providers/vercel/fetch.js.map +1 -0
  580. package/dist/sandbox/providers/vercel/lifecycle.d.ts +13 -0
  581. package/dist/sandbox/providers/vercel/lifecycle.d.ts.map +1 -0
  582. package/dist/sandbox/providers/vercel/lifecycle.js +140 -0
  583. package/dist/sandbox/providers/vercel/lifecycle.js.map +1 -0
  584. package/dist/sandbox/providers/vercel/validation.d.ts +11 -0
  585. package/dist/sandbox/providers/vercel/validation.d.ts.map +1 -0
  586. package/dist/sandbox/providers/vercel/validation.js +30 -0
  587. package/dist/sandbox/providers/vercel/validation.js.map +1 -0
  588. package/dist/sandbox/remote-files.d.ts +11 -0
  589. package/dist/sandbox/remote-files.d.ts.map +1 -0
  590. package/dist/sandbox/remote-files.js +41 -0
  591. package/dist/sandbox/remote-files.js.map +1 -0
  592. package/dist/sandbox/request-validation.d.ts +5 -0
  593. package/dist/sandbox/request-validation.d.ts.map +1 -0
  594. package/dist/sandbox/request-validation.js +43 -0
  595. package/dist/sandbox/request-validation.js.map +1 -0
  596. package/dist/sandbox/supervisor.d.ts +42 -0
  597. package/dist/sandbox/supervisor.d.ts.map +1 -0
  598. package/dist/sandbox/supervisor.js +126 -0
  599. package/dist/sandbox/supervisor.js.map +1 -0
  600. package/dist/sandbox/timeout.d.ts +16 -0
  601. package/dist/sandbox/timeout.d.ts.map +1 -0
  602. package/dist/sandbox/timeout.js +53 -0
  603. package/dist/sandbox/timeout.js.map +1 -0
  604. package/dist/sandbox-author.bundle.js +48 -14877
  605. package/dist/sandbox-check.bundle.js +20155 -0
  606. package/dist/sandbox-verifier.bundle.js +307 -0
  607. package/dist/setup/e2b/build.d.ts +24 -0
  608. package/dist/setup/e2b/build.d.ts.map +1 -0
  609. package/dist/setup/e2b/build.js +46 -0
  610. package/dist/setup/e2b/build.js.map +1 -0
  611. package/dist/setup/e2b/cli.d.ts +2 -0
  612. package/dist/setup/e2b/cli.d.ts.map +1 -0
  613. package/dist/setup/e2b/cli.js +51 -0
  614. package/dist/setup/e2b/cli.js.map +1 -0
  615. package/dist/setup/e2b/index.d.ts +5 -0
  616. package/dist/setup/e2b/index.d.ts.map +1 -0
  617. package/dist/setup/e2b/index.js +4 -0
  618. package/dist/setup/e2b/index.js.map +1 -0
  619. package/dist/setup/e2b/template.d.ts +4 -0
  620. package/dist/setup/e2b/template.d.ts.map +1 -0
  621. package/dist/setup/e2b/template.js +53 -0
  622. package/dist/setup/e2b/template.js.map +1 -0
  623. package/dist/setup/vercel/cli-helpers.d.ts +22 -0
  624. package/dist/setup/vercel/cli-helpers.d.ts.map +1 -0
  625. package/dist/setup/vercel/cli-helpers.js +87 -0
  626. package/dist/setup/vercel/cli-helpers.js.map +1 -0
  627. package/dist/setup/vercel/cli-runner.d.ts +14 -0
  628. package/dist/setup/vercel/cli-runner.d.ts.map +1 -0
  629. package/dist/setup/vercel/cli-runner.js +24 -0
  630. package/dist/setup/vercel/cli-runner.js.map +1 -0
  631. package/dist/setup/vercel/cli-types.d.ts +24 -0
  632. package/dist/setup/vercel/cli-types.d.ts.map +1 -0
  633. package/dist/setup/vercel/cli-types.js +18 -0
  634. package/dist/setup/vercel/cli-types.js.map +1 -0
  635. package/dist/setup/vercel/cli.d.ts +38 -0
  636. package/dist/setup/vercel/cli.d.ts.map +1 -0
  637. package/dist/setup/vercel/cli.js +193 -0
  638. package/dist/setup/vercel/cli.js.map +1 -0
  639. package/dist/setup/vercel/index.d.ts +4 -0
  640. package/dist/setup/vercel/index.d.ts.map +1 -0
  641. package/dist/setup/vercel/index.js +3 -0
  642. package/dist/setup/vercel/index.js.map +1 -0
  643. package/dist/setup/vercel/probe.d.ts +49 -0
  644. package/dist/setup/vercel/probe.d.ts.map +1 -0
  645. package/dist/setup/vercel/probe.js +151 -0
  646. package/dist/setup/vercel/probe.js.map +1 -0
  647. package/dist/setup/vercel/profile-files.d.ts +6 -0
  648. package/dist/setup/vercel/profile-files.d.ts.map +1 -0
  649. package/dist/setup/vercel/profile-files.js +100 -0
  650. package/dist/setup/vercel/profile-files.js.map +1 -0
  651. package/dist/setup/vercel/profile-schema.d.ts +48 -0
  652. package/dist/setup/vercel/profile-schema.d.ts.map +1 -0
  653. package/dist/setup/vercel/profile-schema.js +39 -0
  654. package/dist/setup/vercel/profile-schema.js.map +1 -0
  655. package/dist/setup/vercel/profile.d.ts +18 -0
  656. package/dist/setup/vercel/profile.d.ts.map +1 -0
  657. package/dist/setup/vercel/profile.js +118 -0
  658. package/dist/setup/vercel/profile.js.map +1 -0
  659. package/dist/setup/vercel/runtime-image.d.ts +51 -0
  660. package/dist/setup/vercel/runtime-image.d.ts.map +1 -0
  661. package/dist/setup/vercel/runtime-image.js +123 -0
  662. package/dist/setup/vercel/runtime-image.js.map +1 -0
  663. package/dist/setup/vercel/selection.d.ts +18 -0
  664. package/dist/setup/vercel/selection.d.ts.map +1 -0
  665. package/dist/setup/vercel/selection.js +113 -0
  666. package/dist/setup/vercel/selection.js.map +1 -0
  667. package/dist/setup/vercel/setup-types.d.ts +34 -0
  668. package/dist/setup/vercel/setup-types.d.ts.map +1 -0
  669. package/dist/setup/vercel/setup-types.js +2 -0
  670. package/dist/setup/vercel/setup-types.js.map +1 -0
  671. package/dist/setup/vercel/setup.d.ts +17 -0
  672. package/dist/setup/vercel/setup.d.ts.map +1 -0
  673. package/dist/setup/vercel/setup.js +172 -0
  674. package/dist/setup/vercel/setup.js.map +1 -0
  675. package/dist/site/batch-activity.d.ts +5 -0
  676. package/dist/site/batch-activity.d.ts.map +1 -0
  677. package/dist/site/batch-activity.js +31 -0
  678. package/dist/site/batch-activity.js.map +1 -0
  679. package/dist/site/batch-progress.d.ts +16 -0
  680. package/dist/site/batch-progress.d.ts.map +1 -0
  681. package/dist/site/batch-progress.js +52 -0
  682. package/dist/site/batch-progress.js.map +1 -0
  683. package/dist/site/batch-routes.d.ts +30 -0
  684. package/dist/site/batch-routes.d.ts.map +1 -0
  685. package/dist/site/batch-routes.js +117 -0
  686. package/dist/site/batch-routes.js.map +1 -0
  687. package/dist/site/batch-start.d.ts +60 -0
  688. package/dist/site/batch-start.d.ts.map +1 -0
  689. package/dist/site/batch-start.js +39 -0
  690. package/dist/site/batch-start.js.map +1 -0
  691. package/dist/site/connected-repos.d.ts +25 -0
  692. package/dist/site/connected-repos.d.ts.map +1 -0
  693. package/dist/site/connected-repos.js +109 -0
  694. package/dist/site/connected-repos.js.map +1 -0
  695. package/dist/site/evaluation-start.d.ts +4 -0
  696. package/dist/site/evaluation-start.d.ts.map +1 -0
  697. package/dist/site/evaluation-start.js +19 -0
  698. package/dist/site/evaluation-start.js.map +1 -0
  699. package/dist/site/generation-config.d.ts +4 -0
  700. package/dist/site/generation-config.d.ts.map +1 -0
  701. package/dist/site/generation-config.js +16 -0
  702. package/dist/site/generation-config.js.map +1 -0
  703. package/dist/site/generation-credentials.d.ts +6 -0
  704. package/dist/site/generation-credentials.d.ts.map +1 -0
  705. package/dist/site/generation-credentials.js +101 -0
  706. package/dist/site/generation-credentials.js.map +1 -0
  707. package/dist/site/generation-run.d.ts +6 -0
  708. package/dist/site/generation-run.d.ts.map +1 -0
  709. package/dist/site/generation-run.js +22 -0
  710. package/dist/site/generation-run.js.map +1 -0
  711. package/dist/site/generation-settings.d.ts +80 -0
  712. package/dist/site/generation-settings.d.ts.map +1 -0
  713. package/dist/site/generation-settings.js +84 -0
  714. package/dist/site/generation-settings.js.map +1 -0
  715. package/dist/site/generation-subscription.d.ts +3 -0
  716. package/dist/site/generation-subscription.d.ts.map +1 -0
  717. package/dist/site/generation-subscription.js +38 -0
  718. package/dist/site/generation-subscription.js.map +1 -0
  719. package/dist/site/github-repos.d.ts +35 -0
  720. package/dist/site/github-repos.d.ts.map +1 -0
  721. package/dist/site/github-repos.js +121 -0
  722. package/dist/site/github-repos.js.map +1 -0
  723. package/dist/site/pr-candidate.d.ts +26 -0
  724. package/dist/site/pr-candidate.d.ts.map +1 -0
  725. package/dist/site/pr-candidate.js +101 -0
  726. package/dist/site/pr-candidate.js.map +1 -0
  727. package/dist/site/pr-list.d.ts +13 -0
  728. package/dist/site/pr-list.d.ts.map +1 -0
  729. package/dist/site/pr-list.js +24 -0
  730. package/dist/site/pr-list.js.map +1 -0
  731. package/dist/site/pr-routes.d.ts +26 -0
  732. package/dist/site/pr-routes.d.ts.map +1 -0
  733. package/dist/site/pr-routes.js +139 -0
  734. package/dist/site/pr-routes.js.map +1 -0
  735. package/dist/site/repo-store.d.ts +40 -0
  736. package/dist/site/repo-store.d.ts.map +1 -0
  737. package/dist/site/repo-store.js +74 -0
  738. package/dist/site/repo-store.js.map +1 -0
  739. package/dist/site/run-store.d.ts +17 -0
  740. package/dist/site/run-store.d.ts.map +1 -0
  741. package/dist/site/run-store.js +42 -0
  742. package/dist/site/run-store.js.map +1 -0
  743. package/dist/site/runtime.d.ts +27 -0
  744. package/dist/site/runtime.d.ts.map +1 -0
  745. package/dist/site/runtime.js +97 -0
  746. package/dist/site/runtime.js.map +1 -0
  747. package/dist/site/task-deletion.d.ts +7 -0
  748. package/dist/site/task-deletion.d.ts.map +1 -0
  749. package/dist/site/task-deletion.js +29 -0
  750. package/dist/site/task-deletion.js.map +1 -0
  751. package/dist/site/task-start-reservation.d.ts +4 -0
  752. package/dist/site/task-start-reservation.d.ts.map +1 -0
  753. package/dist/site/task-start-reservation.js +18 -0
  754. package/dist/site/task-start-reservation.js.map +1 -0
  755. package/dist/site/task-start.d.ts +33 -0
  756. package/dist/site/task-start.d.ts.map +1 -0
  757. package/dist/site/task-start.js +50 -0
  758. package/dist/site/task-start.js.map +1 -0
  759. package/dist/site/task-status.d.ts +36 -0
  760. package/dist/site/task-status.d.ts.map +1 -0
  761. package/dist/site/task-status.js +113 -0
  762. package/dist/site/task-status.js.map +1 -0
  763. package/dist/site/task-store.d.ts +78 -0
  764. package/dist/site/task-store.d.ts.map +1 -0
  765. package/dist/site/task-store.js +186 -0
  766. package/dist/site/task-store.js.map +1 -0
  767. package/dist/site/task-sync.d.ts +30 -0
  768. package/dist/site/task-sync.d.ts.map +1 -0
  769. package/dist/site/task-sync.js +121 -0
  770. package/dist/site/task-sync.js.map +1 -0
  771. package/dist/site/tasks.d.ts +47 -0
  772. package/dist/site/tasks.d.ts.map +1 -0
  773. package/dist/site/tasks.js +164 -0
  774. package/dist/site/tasks.js.map +1 -0
  775. package/dist/site/temporal-status.d.ts +8 -0
  776. package/dist/site/temporal-status.d.ts.map +1 -0
  777. package/dist/site/temporal-status.js +41 -0
  778. package/dist/site/temporal-status.js.map +1 -0
  779. package/dist/site/tenant.d.ts +4 -0
  780. package/dist/site/tenant.d.ts.map +1 -0
  781. package/dist/site/tenant.js +6 -0
  782. package/dist/site/tenant.js.map +1 -0
  783. package/dist/static-check.d.ts +38 -0
  784. package/dist/static-check.d.ts.map +1 -0
  785. package/dist/static-check.js +131 -0
  786. package/dist/static-check.js.map +1 -0
  787. package/dist/submission-hash.d.ts +18 -0
  788. package/dist/submission-hash.d.ts.map +1 -0
  789. package/dist/submission-hash.js +16 -0
  790. package/dist/submission-hash.js.map +1 -0
  791. package/dist/subscription-auth.d.ts +0 -7
  792. package/dist/subscription-auth.d.ts.map +1 -1
  793. package/dist/subscription-auth.js +3 -23
  794. package/dist/subscription-auth.js.map +1 -1
  795. package/dist/temporal/activities/agent-feed.d.ts +5 -0
  796. package/dist/temporal/activities/agent-feed.d.ts.map +1 -0
  797. package/dist/temporal/activities/agent-feed.js +41 -0
  798. package/dist/temporal/activities/agent-feed.js.map +1 -0
  799. package/dist/temporal/activities/agent-scripts.d.ts +16 -0
  800. package/dist/temporal/activities/agent-scripts.d.ts.map +1 -0
  801. package/dist/temporal/activities/agent-scripts.js +162 -0
  802. package/dist/temporal/activities/agent-scripts.js.map +1 -0
  803. package/dist/temporal/activities/authoring-round.d.ts +13 -0
  804. package/dist/temporal/activities/authoring-round.d.ts.map +1 -0
  805. package/dist/temporal/activities/authoring-round.js +160 -0
  806. package/dist/temporal/activities/authoring-round.js.map +1 -0
  807. package/dist/temporal/activities/constants.d.ts +5 -0
  808. package/dist/temporal/activities/constants.d.ts.map +1 -0
  809. package/dist/temporal/activities/constants.js +5 -0
  810. package/dist/temporal/activities/constants.js.map +1 -0
  811. package/dist/temporal/activities/discovery.d.ts +17 -0
  812. package/dist/temporal/activities/discovery.d.ts.map +1 -0
  813. package/dist/temporal/activities/discovery.js +153 -0
  814. package/dist/temporal/activities/discovery.js.map +1 -0
  815. package/dist/temporal/activities/drafts.d.ts +15 -0
  816. package/dist/temporal/activities/drafts.d.ts.map +1 -0
  817. package/dist/temporal/activities/drafts.js +51 -0
  818. package/dist/temporal/activities/drafts.js.map +1 -0
  819. package/dist/temporal/activities/excluded-source-prs.d.ts +9 -0
  820. package/dist/temporal/activities/excluded-source-prs.d.ts.map +1 -0
  821. package/dist/temporal/activities/excluded-source-prs.js +132 -0
  822. package/dist/temporal/activities/excluded-source-prs.js.map +1 -0
  823. package/dist/temporal/activities/export.d.ts +38 -0
  824. package/dist/temporal/activities/export.d.ts.map +1 -0
  825. package/dist/temporal/activities/export.js +79 -0
  826. package/dist/temporal/activities/export.js.map +1 -0
  827. package/dist/temporal/activities/factory.d.ts +5 -0
  828. package/dist/temporal/activities/factory.d.ts.map +1 -0
  829. package/dist/temporal/activities/factory.js +26 -0
  830. package/dist/temporal/activities/factory.js.map +1 -0
  831. package/dist/temporal/activities/gate-logs.d.ts +20 -0
  832. package/dist/temporal/activities/gate-logs.d.ts.map +1 -0
  833. package/dist/temporal/activities/gate-logs.js +62 -0
  834. package/dist/temporal/activities/gate-logs.js.map +1 -0
  835. package/dist/temporal/activities/generation-runtime.d.ts +6 -0
  836. package/dist/temporal/activities/generation-runtime.d.ts.map +1 -0
  837. package/dist/temporal/activities/generation-runtime.js +56 -0
  838. package/dist/temporal/activities/generation-runtime.js.map +1 -0
  839. package/dist/temporal/activities/harbor.d.ts +11 -0
  840. package/dist/temporal/activities/harbor.d.ts.map +1 -0
  841. package/dist/temporal/activities/harbor.js +112 -0
  842. package/dist/temporal/activities/harbor.js.map +1 -0
  843. package/dist/temporal/activities/modal-build-log.d.ts +12 -0
  844. package/dist/temporal/activities/modal-build-log.d.ts.map +1 -0
  845. package/dist/temporal/activities/modal-build-log.js +57 -0
  846. package/dist/temporal/activities/modal-build-log.js.map +1 -0
  847. package/dist/temporal/activities/prompts-authoring.d.ts +6 -0
  848. package/dist/temporal/activities/prompts-authoring.d.ts.map +1 -0
  849. package/dist/temporal/activities/prompts-authoring.js +87 -0
  850. package/dist/temporal/activities/prompts-authoring.js.map +1 -0
  851. package/dist/temporal/activities/prompts-verifier.d.ts +17 -0
  852. package/dist/temporal/activities/prompts-verifier.d.ts.map +1 -0
  853. package/dist/temporal/activities/prompts-verifier.js +66 -0
  854. package/dist/temporal/activities/prompts-verifier.js.map +1 -0
  855. package/dist/temporal/activities/provenance.d.ts +4 -0
  856. package/dist/temporal/activities/provenance.d.ts.map +1 -0
  857. package/dist/temporal/activities/provenance.js +18 -0
  858. package/dist/temporal/activities/provenance.js.map +1 -0
  859. package/dist/temporal/activities/replay.d.ts +20 -0
  860. package/dist/temporal/activities/replay.d.ts.map +1 -0
  861. package/dist/temporal/activities/replay.js +135 -0
  862. package/dist/temporal/activities/replay.js.map +1 -0
  863. package/dist/temporal/activities/round-outcome.d.ts +63 -0
  864. package/dist/temporal/activities/round-outcome.d.ts.map +1 -0
  865. package/dist/temporal/activities/round-outcome.js +127 -0
  866. package/dist/temporal/activities/round-outcome.js.map +1 -0
  867. package/dist/temporal/activities/runtime.d.ts +38 -0
  868. package/dist/temporal/activities/runtime.d.ts.map +1 -0
  869. package/dist/temporal/activities/runtime.js +146 -0
  870. package/dist/temporal/activities/runtime.js.map +1 -0
  871. package/dist/temporal/activities/session-verify.d.ts +45 -0
  872. package/dist/temporal/activities/session-verify.d.ts.map +1 -0
  873. package/dist/temporal/activities/session-verify.js +91 -0
  874. package/dist/temporal/activities/session-verify.js.map +1 -0
  875. package/dist/temporal/activities/submissions.d.ts +9 -0
  876. package/dist/temporal/activities/submissions.d.ts.map +1 -0
  877. package/dist/temporal/activities/submissions.js +28 -0
  878. package/dist/temporal/activities/submissions.js.map +1 -0
  879. package/dist/temporal/activities/task-compiler.d.ts +21 -0
  880. package/dist/temporal/activities/task-compiler.d.ts.map +1 -0
  881. package/dist/temporal/activities/task-compiler.js +63 -0
  882. package/dist/temporal/activities/task-compiler.js.map +1 -0
  883. package/dist/temporal/activities/types.d.ts +57 -0
  884. package/dist/temporal/activities/types.d.ts.map +1 -0
  885. package/dist/temporal/activities/types.js +2 -0
  886. package/dist/temporal/activities/types.js.map +1 -0
  887. package/dist/temporal/activities/verifier-material.d.ts +18 -0
  888. package/dist/temporal/activities/verifier-material.d.ts.map +1 -0
  889. package/dist/temporal/activities/verifier-material.js +49 -0
  890. package/dist/temporal/activities/verifier-material.js.map +1 -0
  891. package/dist/temporal/activities/verifier-outcome.d.ts +19 -0
  892. package/dist/temporal/activities/verifier-outcome.d.ts.map +1 -0
  893. package/dist/temporal/activities/verifier-outcome.js +70 -0
  894. package/dist/temporal/activities/verifier-outcome.js.map +1 -0
  895. package/dist/temporal/activities/verifier-round.d.ts +8 -0
  896. package/dist/temporal/activities/verifier-round.d.ts.map +1 -0
  897. package/dist/temporal/activities/verifier-round.js +110 -0
  898. package/dist/temporal/activities/verifier-round.js.map +1 -0
  899. package/dist/temporal/activities/verify-harbor.d.ts +15 -0
  900. package/dist/temporal/activities/verify-harbor.d.ts.map +1 -0
  901. package/dist/temporal/activities/verify-harbor.js +193 -0
  902. package/dist/temporal/activities/verify-harbor.js.map +1 -0
  903. package/dist/temporal/activities/verify.d.ts +11 -0
  904. package/dist/temporal/activities/verify.d.ts.map +1 -0
  905. package/dist/temporal/activities/verify.js +151 -0
  906. package/dist/temporal/activities/verify.js.map +1 -0
  907. package/dist/temporal/activities.d.ts +3 -39
  908. package/dist/temporal/activities.d.ts.map +1 -1
  909. package/dist/temporal/activities.js +2 -839
  910. package/dist/temporal/activities.js.map +1 -1
  911. package/dist/temporal/connection.d.ts.map +1 -1
  912. package/dist/temporal/connection.js +3 -2
  913. package/dist/temporal/connection.js.map +1 -1
  914. package/dist/temporal/worker-main.js +19 -3
  915. package/dist/temporal/worker-main.js.map +1 -1
  916. package/dist/temporal/workflow/activity-proxies.d.ts +3 -0
  917. package/dist/temporal/workflow/activity-proxies.d.ts.map +1 -0
  918. package/dist/temporal/workflow/activity-proxies.js +45 -0
  919. package/dist/temporal/workflow/activity-proxies.js.map +1 -0
  920. package/dist/temporal/workflow/authoring-stage.d.ts +5 -0
  921. package/dist/temporal/workflow/authoring-stage.d.ts.map +1 -0
  922. package/dist/temporal/workflow/authoring-stage.js +64 -0
  923. package/dist/temporal/workflow/authoring-stage.js.map +1 -0
  924. package/dist/temporal/workflow/candidate-tracker.d.ts +28 -0
  925. package/dist/temporal/workflow/candidate-tracker.d.ts.map +1 -0
  926. package/dist/temporal/workflow/candidate-tracker.js +85 -0
  927. package/dist/temporal/workflow/candidate-tracker.js.map +1 -0
  928. package/dist/temporal/workflow/candidate.d.ts +6 -0
  929. package/dist/temporal/workflow/candidate.d.ts.map +1 -0
  930. package/dist/temporal/workflow/candidate.js +54 -0
  931. package/dist/temporal/workflow/candidate.js.map +1 -0
  932. package/dist/temporal/workflow/discovery.d.ts +19 -0
  933. package/dist/temporal/workflow/discovery.d.ts.map +1 -0
  934. package/dist/temporal/workflow/discovery.js +137 -0
  935. package/dist/temporal/workflow/discovery.js.map +1 -0
  936. package/dist/temporal/workflow/failures.d.ts +5 -0
  937. package/dist/temporal/workflow/failures.d.ts.map +1 -0
  938. package/dist/temporal/workflow/failures.js +28 -0
  939. package/dist/temporal/workflow/failures.js.map +1 -0
  940. package/dist/temporal/workflow/run.d.ts +5 -0
  941. package/dist/temporal/workflow/run.d.ts.map +1 -0
  942. package/dist/temporal/workflow/run.js +154 -0
  943. package/dist/temporal/workflow/run.js.map +1 -0
  944. package/dist/temporal/workflow/stage.d.ts +26 -0
  945. package/dist/temporal/workflow/stage.d.ts.map +1 -0
  946. package/dist/temporal/workflow/stage.js +16 -0
  947. package/dist/temporal/workflow/stage.js.map +1 -0
  948. package/dist/temporal/workflow/verification-stage.d.ts +11 -0
  949. package/dist/temporal/workflow/verification-stage.d.ts.map +1 -0
  950. package/dist/temporal/workflow/verification-stage.js +20 -0
  951. package/dist/temporal/workflow/verification-stage.js.map +1 -0
  952. package/dist/temporal/workflow.d.ts +13 -5
  953. package/dist/temporal/workflow.d.ts.map +1 -1
  954. package/dist/temporal/workflow.js +38 -420
  955. package/dist/temporal/workflow.js.map +1 -1
  956. package/dist/verifier-fix.d.ts +20 -0
  957. package/dist/verifier-fix.d.ts.map +1 -0
  958. package/dist/verifier-fix.js +62 -0
  959. package/dist/verifier-fix.js.map +1 -0
  960. package/dist/verify-report.d.ts +9 -0
  961. package/dist/verify-report.d.ts.map +1 -0
  962. package/dist/verify-report.js +135 -0
  963. package/dist/verify-report.js.map +1 -0
  964. package/dist/viewer/archived-keys.d.ts +9 -0
  965. package/dist/viewer/archived-keys.d.ts.map +1 -0
  966. package/dist/viewer/archived-keys.js +36 -0
  967. package/dist/viewer/archived-keys.js.map +1 -0
  968. package/dist/viewer/archived.d.ts +20 -0
  969. package/dist/viewer/archived.d.ts.map +1 -0
  970. package/dist/viewer/archived.js +238 -0
  971. package/dist/viewer/archived.js.map +1 -0
  972. package/dist/viewer/artifacts.d.ts +8 -0
  973. package/dist/viewer/artifacts.d.ts.map +1 -0
  974. package/dist/viewer/artifacts.js +96 -0
  975. package/dist/viewer/artifacts.js.map +1 -0
  976. package/dist/viewer/bundle.d.ts +9 -0
  977. package/dist/viewer/bundle.d.ts.map +1 -0
  978. package/dist/viewer/bundle.js +79 -0
  979. package/dist/viewer/bundle.js.map +1 -0
  980. package/dist/viewer/candidates.d.ts +9 -0
  981. package/dist/viewer/candidates.d.ts.map +1 -0
  982. package/dist/viewer/candidates.js +137 -0
  983. package/dist/viewer/candidates.js.map +1 -0
  984. package/dist/viewer/local-server.d.ts +11 -0
  985. package/dist/viewer/local-server.d.ts.map +1 -0
  986. package/dist/viewer/local-server.js +64 -0
  987. package/dist/viewer/local-server.js.map +1 -0
  988. package/dist/viewer/task-files.d.ts +10 -0
  989. package/dist/viewer/task-files.d.ts.map +1 -0
  990. package/dist/viewer/task-files.js +120 -0
  991. package/dist/viewer/task-files.js.map +1 -0
  992. package/dist/viewer/types.d.ts +78 -0
  993. package/dist/viewer/types.d.ts.map +1 -0
  994. package/dist/viewer/types.js +36 -0
  995. package/dist/viewer/types.js.map +1 -0
  996. package/docs/api.md +168 -0
  997. package/docs/evaluations.md +42 -15
  998. package/docs/operations.md +292 -30
  999. package/docs/solver-evaluations.md +63 -0
  1000. package/docs/task-construction.md +24 -12
  1001. package/drizzle/0000_glossy_johnny_blaze.sql +97 -0
  1002. package/drizzle/0001_evaluation_records.sql +5 -0
  1003. package/drizzle/0002_task_deletion.sql +1 -0
  1004. package/drizzle/0003_drop_repo_runs.sql +3 -0
  1005. package/drizzle/0004_preserve_batch_runs.sql +8 -0
  1006. package/drizzle/0005_api_keys.sql +15 -0
  1007. package/drizzle/meta/0000_snapshot.json +776 -0
  1008. package/drizzle/meta/0001_snapshot.json +807 -0
  1009. package/drizzle/meta/0002_snapshot.json +813 -0
  1010. package/drizzle/meta/0003_snapshot.json +726 -0
  1011. package/drizzle/meta/0004_snapshot.json +813 -0
  1012. package/drizzle/meta/0005_snapshot.json +919 -0
  1013. package/drizzle/meta/_journal.json +48 -0
  1014. package/package.json +43 -29
  1015. package/src/extensions/authoring.ts +83 -72
  1016. package/src/extensions/discovery.ts +14 -5
  1017. package/src/extensions/shared/deliverable.ts +153 -0
  1018. package/src/extensions/shared/mailbox.ts +128 -0
  1019. package/src/extensions/shared/schemas.ts +101 -0
  1020. package/src/extensions/shared/static-check.ts +103 -0
  1021. package/src/extensions/verifier.ts +88 -0
  1022. package/src/skills/selfbench/SKILL.md +71 -13
  1023. package/biome.json +0 -18
  1024. package/dist/agent-smoke-main.d.ts +0 -3
  1025. package/dist/agent-smoke-main.d.ts.map +0 -1
  1026. package/dist/agent-smoke-main.js +0 -55
  1027. package/dist/agent-smoke-main.js.map +0 -1
  1028. package/dist/agent-smoke.d.ts +0 -18
  1029. package/dist/agent-smoke.d.ts.map +0 -1
  1030. package/dist/agent-smoke.js +0 -103
  1031. package/dist/agent-smoke.js.map +0 -1
  1032. package/dist/codex-review.d.ts +0 -41
  1033. package/dist/codex-review.d.ts.map +0 -1
  1034. package/dist/codex-review.js +0 -193
  1035. package/dist/codex-review.js.map +0 -1
  1036. package/dist/docker-executor.d.ts +0 -11
  1037. package/dist/docker-executor.d.ts.map +0 -1
  1038. package/dist/docker-executor.js +0 -103
  1039. package/dist/docker-executor.js.map +0 -1
  1040. package/dist/eval-main.d.ts +0 -3
  1041. package/dist/eval-main.d.ts.map +0 -1
  1042. package/dist/eval-main.js +0 -81
  1043. package/dist/eval-main.js.map +0 -1
  1044. package/dist/evaluate.d.ts +0 -25
  1045. package/dist/evaluate.d.ts.map +0 -1
  1046. package/dist/evaluate.js +0 -214
  1047. package/dist/evaluate.js.map +0 -1
  1048. package/dist/modal-auth.d.ts +0 -2
  1049. package/dist/modal-auth.d.ts.map +0 -1
  1050. package/dist/modal-auth.js +0 -9
  1051. package/dist/modal-auth.js.map +0 -1
  1052. package/dist/modal-executor.d.ts +0 -12
  1053. package/dist/modal-executor.d.ts.map +0 -1
  1054. package/dist/modal-executor.js +0 -152
  1055. package/dist/modal-executor.js.map +0 -1
  1056. package/dist/reaudit-main.d.ts +0 -3
  1057. package/dist/reaudit-main.d.ts.map +0 -1
  1058. package/dist/reaudit-main.js +0 -158
  1059. package/dist/reaudit-main.js.map +0 -1
  1060. package/dist/repair-main.d.ts +0 -3
  1061. package/dist/repair-main.d.ts.map +0 -1
  1062. package/dist/repair-main.js +0 -171
  1063. package/dist/repair-main.js.map +0 -1
  1064. package/dist/review/assets/index-CZ3G759O.js +0 -1568
  1065. package/dist/review/assets/index-DgSLzX8l.css +0 -1
  1066. package/dist/sandbox-author.d.ts +0 -3
  1067. package/dist/sandbox-author.d.ts.map +0 -1
  1068. package/dist/sandbox-author.js +0 -17
  1069. package/dist/sandbox-author.js.map +0 -1
  1070. package/dist/sandbox-repair.bundle.js +0 -315
  1071. package/dist/sandbox-repair.d.ts +0 -3
  1072. package/dist/sandbox-repair.d.ts.map +0 -1
  1073. package/dist/sandbox-repair.js +0 -121
  1074. package/dist/sandbox-repair.js.map +0 -1
  1075. package/dist/sandbox-review.bundle.js +0 -14462
  1076. package/dist/sandbox-review.d.ts +0 -2
  1077. package/dist/sandbox-review.d.ts.map +0 -1
  1078. package/dist/sandbox-review.js +0 -18
  1079. package/dist/sandbox-review.js.map +0 -1
  1080. package/dist/sandbox-timeout.d.ts +0 -11
  1081. package/dist/sandbox-timeout.d.ts.map +0 -1
  1082. package/dist/sandbox-timeout.js +0 -41
  1083. package/dist/sandbox-timeout.js.map +0 -1
  1084. package/dist/sandbox-validation-repair.bundle.js +0 -14778
  1085. package/dist/sandbox-validation-repair.d.ts +0 -3
  1086. package/dist/sandbox-validation-repair.d.ts.map +0 -1
  1087. package/dist/sandbox-validation-repair.js +0 -136
  1088. package/dist/sandbox-validation-repair.js.map +0 -1
  1089. package/dist/sandbox.d.ts +0 -39
  1090. package/dist/sandbox.d.ts.map +0 -1
  1091. package/dist/sandbox.js +0 -15
  1092. package/dist/sandbox.js.map +0 -1
  1093. package/dist/validate-main.d.ts +0 -3
  1094. package/dist/validate-main.d.ts.map +0 -1
  1095. package/dist/validate-main.js +0 -143
  1096. package/dist/validate-main.js.map +0 -1
  1097. package/dist/validation-repair.d.ts +0 -10
  1098. package/dist/validation-repair.d.ts.map +0 -1
  1099. package/dist/validation-repair.js +0 -72
  1100. package/dist/validation-repair.js.map +0 -1
  1101. package/dist/vercel-cli.d.ts +0 -64
  1102. package/dist/vercel-cli.d.ts.map +0 -1
  1103. package/dist/vercel-cli.js +0 -303
  1104. package/dist/vercel-cli.js.map +0 -1
  1105. package/dist/vercel-command.d.ts +0 -14
  1106. package/dist/vercel-command.d.ts.map +0 -1
  1107. package/dist/vercel-command.js +0 -93
  1108. package/dist/vercel-command.js.map +0 -1
  1109. package/dist/vercel-executor.d.ts +0 -14
  1110. package/dist/vercel-executor.d.ts.map +0 -1
  1111. package/dist/vercel-executor.js +0 -356
  1112. package/dist/vercel-executor.js.map +0 -1
  1113. package/dist/vercel-fetch.d.ts +0 -6
  1114. package/dist/vercel-fetch.d.ts.map +0 -1
  1115. package/dist/vercel-fetch.js +0 -39
  1116. package/dist/vercel-fetch.js.map +0 -1
  1117. package/dist/vercel-profile.d.ts +0 -34
  1118. package/dist/vercel-profile.d.ts.map +0 -1
  1119. package/dist/vercel-profile.js +0 -244
  1120. package/dist/vercel-profile.js.map +0 -1
  1121. package/dist/vercel-runtime-image.d.ts +0 -51
  1122. package/dist/vercel-runtime-image.d.ts.map +0 -1
  1123. package/dist/vercel-runtime-image.js +0 -123
  1124. package/dist/vercel-runtime-image.js.map +0 -1
  1125. package/dist/vercel-setup-probe.d.ts +0 -49
  1126. package/dist/vercel-setup-probe.d.ts.map +0 -1
  1127. package/dist/vercel-setup-probe.js +0 -151
  1128. package/dist/vercel-setup-probe.js.map +0 -1
  1129. package/dist/vercel-setup.d.ts +0 -42
  1130. package/dist/vercel-setup.d.ts.map +0 -1
  1131. package/dist/vercel-setup.js +0 -280
  1132. package/dist/vercel-setup.js.map +0 -1
  1133. package/review/index.html +0 -14
  1134. package/review/src/App.tsx +0 -338
  1135. package/review/src/export-loader.test.ts +0 -57
  1136. package/review/src/export-loader.ts +0 -151
  1137. package/review/src/main.tsx +0 -15
  1138. package/review/src/styles.css +0 -162
  1139. package/review/src/types.ts +0 -47
  1140. package/review/tsconfig.json +0 -16
  1141. package/review/vite.config.ts +0 -20
  1142. package/scripts/verify-package.ts +0 -81
  1143. package/scripts/write-build-metadata.ts +0 -27
  1144. package/src/agent-smoke-main.ts +0 -64
  1145. package/src/agent-smoke.ts +0 -138
  1146. package/src/api-main.ts +0 -12
  1147. package/src/api.ts +0 -290
  1148. package/src/artifacts.ts +0 -357
  1149. package/src/audit.ts +0 -106
  1150. package/src/build-metadata.ts +0 -3
  1151. package/src/cli.ts +0 -420
  1152. package/src/codex-review.ts +0 -229
  1153. package/src/config.ts +0 -239
  1154. package/src/contracts.ts +0 -231
  1155. package/src/coupling.ts +0 -259
  1156. package/src/docker-executor.ts +0 -115
  1157. package/src/eval-main.ts +0 -93
  1158. package/src/evaluate.ts +0 -300
  1159. package/src/github.ts +0 -26
  1160. package/src/harbor-environment.ts +0 -17
  1161. package/src/harbor-results.ts +0 -144
  1162. package/src/harbor-task.ts +0 -528
  1163. package/src/hash.ts +0 -5
  1164. package/src/modal-auth.ts +0 -11
  1165. package/src/modal-executor.ts +0 -176
  1166. package/src/parallel.ts +0 -24
  1167. package/src/process.ts +0 -167
  1168. package/src/provenance.ts +0 -457
  1169. package/src/providers.ts +0 -22
  1170. package/src/reaudit-main.ts +0 -198
  1171. package/src/repair-main.ts +0 -209
  1172. package/src/repair.ts +0 -55
  1173. package/src/run-wait.ts +0 -40
  1174. package/src/sandbox-author.ts +0 -19
  1175. package/src/sandbox-repair.ts +0 -156
  1176. package/src/sandbox-review.ts +0 -19
  1177. package/src/sandbox-timeout.ts +0 -56
  1178. package/src/sandbox-validation-repair.ts +0 -177
  1179. package/src/sandbox.ts +0 -61
  1180. package/src/subscription-auth.ts +0 -80
  1181. package/src/temporal/activities.ts +0 -1247
  1182. package/src/temporal/connection.ts +0 -23
  1183. package/src/temporal/worker-main.ts +0 -28
  1184. package/src/temporal/workflow.ts +0 -519
  1185. package/src/terminal-prompts.ts +0 -197
  1186. package/src/terminal-reporter.ts +0 -126
  1187. package/src/validate-main.ts +0 -177
  1188. package/src/validation-repair.ts +0 -94
  1189. package/src/vercel-cli.ts +0 -403
  1190. package/src/vercel-command.ts +0 -127
  1191. package/src/vercel-executor.ts +0 -448
  1192. package/src/vercel-fetch.ts +0 -45
  1193. package/src/vercel-profile.ts +0 -319
  1194. package/src/vercel-runtime-image.ts +0 -204
  1195. package/src/vercel-setup-probe.ts +0 -229
  1196. package/src/vercel-setup.ts +0 -419
  1197. package/tsconfig.build.json +0 -13
  1198. package/tsconfig.json +0 -21
@@ -0,0 +1,60 @@
1
+ import { createHash } from "node:crypto";
2
+ export function evaluationPrefix(repoId, id = "") {
3
+ if (!Number.isSafeInteger(repoId) || repoId < 1 || (id && !/^[a-f0-9-]{36}$/.test(id)))
4
+ throw new Error("Invalid evaluation identity");
5
+ return `evaluations/repos/${repoId}/${id ? `${id}/` : ""}`;
6
+ }
7
+ export function initialEvaluation(input, modelLabel) {
8
+ const { tasks, ...metadata } = input;
9
+ return {
10
+ ...metadata,
11
+ revision: 0,
12
+ datasetKey: createHash("sha256")
13
+ .update(JSON.stringify(tasks
14
+ .map(({ runId, taskId, bundleKey }) => [runId, taskId, bundleKey])
15
+ .sort((left, right) => JSON.stringify(left).localeCompare(JSON.stringify(right)))))
16
+ .digest("hex"),
17
+ modelLabel,
18
+ status: "queued",
19
+ trials: tasks.flatMap((task) => input.harnesses.map((harness) => ({
20
+ taskId: task.taskId,
21
+ runId: task.runId,
22
+ harness,
23
+ status: "queued",
24
+ rewards: {},
25
+ log: "",
26
+ steps: [],
27
+ artifacts: [],
28
+ }))),
29
+ };
30
+ }
31
+ export async function saveEvaluation(store, run) {
32
+ run.revision += 1;
33
+ await store.put(`${evaluationPrefix(run.repoId, run.id)}snapshots/${String(run.revision).padStart(10, "0")}.json`, Buffer.from(JSON.stringify(run)), "application/json");
34
+ }
35
+ export async function getEvaluation(store, repoId, id) {
36
+ const entries = await store.list(`${evaluationPrefix(repoId, id)}snapshots`);
37
+ const latest = entries.sort((left, right) => right.key.localeCompare(left.key))[0];
38
+ const bytes = latest ? await store.getByKey(latest.key) : undefined;
39
+ return bytes ? JSON.parse(Buffer.from(bytes).toString("utf8")) : undefined;
40
+ }
41
+ export async function listEvaluations(store, repoId) {
42
+ const prefix = evaluationPrefix(repoId);
43
+ const entries = (await store.list(prefix.slice(0, -1))).filter((entry) => entry.key.startsWith(prefix));
44
+ const latest = new Map();
45
+ for (const entry of entries) {
46
+ if (!/\/snapshots\/\d{10}\.json$/.test(entry.key))
47
+ continue;
48
+ const id = entry.key.slice(prefix.length).split("/")[0];
49
+ if (id && entry.key > (latest.get(id) ?? ""))
50
+ latest.set(id, entry.key);
51
+ }
52
+ const runs = await Promise.all([...latest.values()].map(async (key) => {
53
+ const bytes = await store.getByKey(key);
54
+ return bytes ? JSON.parse(Buffer.from(bytes).toString("utf8")) : undefined;
55
+ }));
56
+ return runs
57
+ .filter((run) => !!run)
58
+ .sort((left, right) => right.createdAt.localeCompare(left.createdAt));
59
+ }
60
+ //# sourceMappingURL=store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/evaluation/store.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,98 @@
1
+ import type { Harness } from "./harnesses.js";
2
+ import type { ThinkingLevel } from "./model-options.js";
3
+ export type { Harness } from "./harnesses.js";
4
+ export type EvaluationSandbox = "docker" | "modal" | "e2b" | "daytona";
5
+ export interface EvaluationPricing {
6
+ maxInputTokens?: number;
7
+ input: number;
8
+ output: number;
9
+ cacheRead: number;
10
+ cacheWrite: number;
11
+ source: string;
12
+ asOf: string;
13
+ }
14
+ export interface EvaluationTask {
15
+ runId: string;
16
+ taskId: string;
17
+ bundleKey: string;
18
+ }
19
+ export interface EvaluationInput {
20
+ id: string;
21
+ repoId: number;
22
+ tenant: string;
23
+ startedBy: string;
24
+ createdAt: string;
25
+ model: string;
26
+ modelName: string;
27
+ thinking?: ThinkingLevel;
28
+ harnesses: Harness[];
29
+ sandbox: EvaluationSandbox;
30
+ tasks: EvaluationTask[];
31
+ pricing?: EvaluationPricing;
32
+ credentialOwnerId?: number;
33
+ credentialOrgId?: number;
34
+ comparisonId?: string;
35
+ credentials?: {
36
+ modelCredentialId: string;
37
+ sandboxCredentialId: string;
38
+ provider: "openai" | "anthropic" | "openrouter" | "custom";
39
+ };
40
+ }
41
+ export interface SolverStep {
42
+ id: string;
43
+ role: string;
44
+ text: string;
45
+ tools: {
46
+ id: string;
47
+ name: string;
48
+ input: string;
49
+ output: string;
50
+ }[];
51
+ }
52
+ export interface TokenUsage {
53
+ input: number;
54
+ output: number;
55
+ cacheRead: number;
56
+ cacheWrite: number;
57
+ }
58
+ export interface EvaluationTrial {
59
+ taskId: string;
60
+ runId: string;
61
+ harness: Harness;
62
+ status: "queued" | "running" | "completed" | "failed";
63
+ rewards: Record<string, number>;
64
+ error?: string;
65
+ log: string;
66
+ steps: SolverStep[];
67
+ artifacts: string[];
68
+ startedAt?: string;
69
+ finishedAt?: string;
70
+ modelVerified?: boolean;
71
+ apiCostUsd?: number;
72
+ tokenUsage?: TokenUsage;
73
+ costSource?: "harbor" | "reference-rates";
74
+ }
75
+ export interface EvaluationRun extends Omit<EvaluationInput, "tasks"> {
76
+ revision: number;
77
+ datasetKey?: string;
78
+ modelLabel: string;
79
+ status: "queued" | "running" | "completed" | "failed";
80
+ trials: EvaluationTrial[];
81
+ finishedAt?: string;
82
+ error?: string;
83
+ }
84
+ export interface EvaluationModel {
85
+ id: string;
86
+ label: string;
87
+ model: string;
88
+ harnesses: Harness[];
89
+ pricing?: EvaluationPricing;
90
+ sandbox?: EvaluationSandbox;
91
+ }
92
+ export interface EvaluationChoices {
93
+ models: EvaluationModel[];
94
+ sandboxes: EvaluationSandbox[];
95
+ harborVersion: string;
96
+ configurable?: boolean;
97
+ }
98
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/evaluation/types.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/evaluation/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=worker-main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-main.d.ts","sourceRoot":"","sources":["../../src/evaluation/worker-main.ts"],"names":[],"mappings":""}
@@ -0,0 +1,26 @@
1
+ import { fileURLToPath } from "node:url";
2
+ import { Worker } from "@temporalio/worker";
3
+ import { createArtifactStore } from "../artifacts.js";
4
+ import { loadConfig } from "../config.js";
5
+ import { connectTemporalWorker } from "../temporal/connection.js";
6
+ import { createEvaluationActivities } from "./activities.js";
7
+ import { openWorkerRecords } from "./worker-records.js";
8
+ const config = loadConfig();
9
+ const connection = await connectTemporalWorker(config.temporal);
10
+ const credentials = await openWorkerRecords();
11
+ const worker = await Worker.create({
12
+ connection,
13
+ namespace: config.temporal.namespace,
14
+ taskQueue: process.env.SELFBENCH_EVAL_TASK_QUEUE ?? "selfbench-evaluations",
15
+ workflowsPath: fileURLToPath(new URL("./workflow.js", import.meta.url)),
16
+ activities: createEvaluationActivities(createArtifactStore(config.artifact), credentials?.records),
17
+ maxConcurrentActivityTaskExecutions: 1,
18
+ });
19
+ console.log("Evaluation worker ready; waiting for explicit Run submissions");
20
+ try {
21
+ await worker.run();
22
+ }
23
+ finally {
24
+ await credentials?.close();
25
+ }
26
+ //# sourceMappingURL=worker-main.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-main.js","sourceRoot":"","sources":["../../src/evaluation/worker-main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;AAC5B,MAAM,UAAU,GAAG,MAAM,qBAAqB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAChE,MAAM,WAAW,GAAG,MAAM,iBAAiB,EAAE,CAAC;AAC9C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;IACjC,UAAU;IACV,SAAS,EAAE,MAAM,CAAC,QAAQ,CAAC,SAAS;IACpC,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,uBAAuB;IAC3E,aAAa,EAAE,aAAa,CAAC,IAAI,GAAG,CAAC,eAAe,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvE,UAAU,EAAE,0BAA0B,CACpC,mBAAmB,CAAC,MAAM,CAAC,QAAQ,CAAC,EACpC,WAAW,EAAE,OAAO,CACrB;IACD,mCAAmC,EAAE,CAAC;CACvC,CAAC,CAAC;AACH,OAAO,CAAC,GAAG,CAAC,+DAA+D,CAAC,CAAC;AAC7E,IAAI,CAAC;IACH,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC;AACrB,CAAC;QAAS,CAAC;IACT,MAAM,WAAW,EAAE,KAAK,EAAE,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare function openWorkerRecords(env?: NodeJS.ProcessEnv): Promise<{
2
+ records: import("./encrypted-records.js").EncryptedRecordStore;
3
+ close: () => Promise<void>;
4
+ } | undefined>;
5
+ //# sourceMappingURL=worker-records.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-records.d.ts","sourceRoot":"","sources":["../../src/evaluation/worker-records.ts"],"names":[],"mappings":"AAGA,wBAAsB,iBAAiB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB;;;eAM3E"}
@@ -0,0 +1,11 @@
1
+ import { openDatabase } from "../db/client.js";
2
+ import { createEncryptedRecords } from "./encrypted-records.js";
3
+ export async function openWorkerRecords(env = process.env) {
4
+ const key = env.SELFBENCH_EVAL_CREDENTIAL_KEY;
5
+ const url = env.SELFBENCH_DATABASE_URL;
6
+ if (!key || !url)
7
+ return undefined;
8
+ const connection = await openDatabase(url);
9
+ return { records: createEncryptedRecords(connection.db, key), close: () => connection.close() };
10
+ }
11
+ //# sourceMappingURL=worker-records.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker-records.js","sourceRoot":"","sources":["../../src/evaluation/worker-records.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC1E,MAAM,GAAG,GAAG,GAAG,CAAC,6BAA6B,CAAC;IAC9C,MAAM,GAAG,GAAG,GAAG,CAAC,sBAAsB,CAAC;IACvC,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG;QAAE,OAAO,SAAS,CAAC;IACnC,MAAM,UAAU,GAAG,MAAM,YAAY,CAAC,GAAG,CAAC,CAAC;IAC3C,OAAO,EAAE,OAAO,EAAE,sBAAsB,CAAC,UAAU,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,EAAE,CAAC;AAClG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { EvaluationInput } from "./types.js";
2
+ export declare function selfBenchEvaluationWorkflow(input: EvaluationInput): Promise<void>;
3
+ //# sourceMappingURL=workflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/evaluation/workflow.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAYlD,wBAAsB,2BAA2B,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAMvF"}
@@ -0,0 +1,20 @@
1
+ import { ActivityCancellationType, CancellationScope, proxyActivities } from "@temporalio/workflow";
2
+ const solver = proxyActivities({
3
+ startToCloseTimeout: "72 hours",
4
+ heartbeatTimeout: "2 minutes",
5
+ cancellationType: ActivityCancellationType.WAIT_CANCELLATION_COMPLETED,
6
+ retry: { maximumAttempts: 1 },
7
+ });
8
+ const finalizer = proxyActivities({
9
+ startToCloseTimeout: "1 minute",
10
+ retry: { maximumAttempts: 5 },
11
+ });
12
+ export async function selfBenchEvaluationWorkflow(input) {
13
+ try {
14
+ await solver.executeSolverEvaluation(input);
15
+ }
16
+ catch {
17
+ await CancellationScope.nonCancellable(() => finalizer.failSolverEvaluation(input));
18
+ }
19
+ }
20
+ //# sourceMappingURL=workflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../src/evaluation/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAIpG,MAAM,MAAM,GAAG,eAAe,CAAuB;IACnD,mBAAmB,EAAE,UAAU;IAC/B,gBAAgB,EAAE,WAAW;IAC7B,gBAAgB,EAAE,wBAAwB,CAAC,2BAA2B;IACtE,KAAK,EAAE,EAAE,eAAe,EAAE,CAAC,EAAE;CAC9B,CAAC,CAAC;AACH,MAAM,SAAS,GAAG,eAAe,CAAuB;IACtD,mBAAmB,EAAE,UAAU;IAC/B,KAAK,EAAE,EAAE,eAAe,EAAE,CAAC,EAAE;CAC9B,CAAC,CAAC;AACH,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,KAAsB;IACtE,IAAI,CAAC;QACH,MAAM,MAAM,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,iBAAiB,CAAC,cAAc,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC;IACtF,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare function executionEnvironment(): NodeJS.ProcessEnv;
2
+ export declare function withExecutionEnvironment<T>(environment: NodeJS.ProcessEnv, action: () => Promise<T>): Promise<T>;
3
+ //# sourceMappingURL=execution-environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-environment.d.ts","sourceRoot":"","sources":["../src/execution-environment.ts"],"names":[],"mappings":"AAGA,wBAAgB,oBAAoB,IAAI,MAAM,CAAC,UAAU,CAExD;AACD,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,WAAW,EAAE,MAAM,CAAC,UAAU,EAC9B,MAAM,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,cAGzB"}
@@ -0,0 +1,9 @@
1
+ import { AsyncLocalStorage } from "node:async_hooks";
2
+ const environments = new AsyncLocalStorage();
3
+ export function executionEnvironment() {
4
+ return environments.getStore() ?? process.env;
5
+ }
6
+ export function withExecutionEnvironment(environment, action) {
7
+ return environments.run(environment, action);
8
+ }
9
+ //# sourceMappingURL=execution-environment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-environment.js","sourceRoot":"","sources":["../src/execution-environment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,YAAY,GAAG,IAAI,iBAAiB,EAAqB,CAAC;AAChE,MAAM,UAAU,oBAAoB;IAClC,OAAO,YAAY,CAAC,QAAQ,EAAE,IAAI,OAAO,CAAC,GAAG,CAAC;AAChD,CAAC;AACD,MAAM,UAAU,wBAAwB,CACtC,WAA8B,EAC9B,MAAwB;IAExB,OAAO,YAAY,CAAC,GAAG,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC"}
@@ -0,0 +1,347 @@
1
+ // src/extensions/authoring.ts
2
+ import { cpSync, mkdirSync as mkdirSync2 } from "node:fs";
3
+ import { join as join4 } from "node:path";
4
+ import { Type as Type2 } from "@sinclair/typebox";
5
+
6
+ // src/extensions/shared/deliverable.ts
7
+ import { existsSync, readFileSync } from "node:fs";
8
+ import { join as join2 } from "node:path";
9
+
10
+ // src/extensions/shared/schemas.ts
11
+ import { Type } from "@sinclair/typebox";
12
+ var environmentVariableName = Type.String({ pattern: "^[A-Za-z_][A-Za-z0-9_]*$" });
13
+ var environmentVariables = Type.Record(environmentVariableName, Type.String());
14
+ var service = Type.Object({
15
+ name: Type.String({ pattern: "^[a-z][a-z0-9_-]*$" }),
16
+ image: Type.String({ minLength: 1 }),
17
+ environmentVariables,
18
+ command: Type.Optional(Type.Array(Type.String())),
19
+ healthcheck: Type.Object({
20
+ test: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
21
+ intervalSeconds: Type.Integer({ minimum: 1 }),
22
+ timeoutSeconds: Type.Integer({ minimum: 1 }),
23
+ retries: Type.Integer({ minimum: 1 }),
24
+ startPeriodSeconds: Type.Integer({ minimum: 0 })
25
+ }, { additionalProperties: false })
26
+ }, { additionalProperties: false });
27
+ var environmentContract = Type.Object({
28
+ schemaVersion: Type.Literal(1),
29
+ baseImage: Type.String({ minLength: 1 }),
30
+ rootSetupCommand: Type.String({ minLength: 1 }),
31
+ setupCommand: Type.String({ minLength: 1 }),
32
+ smokeCommand: Type.String({ minLength: 1 }),
33
+ environmentVariables,
34
+ services: Type.Array(service),
35
+ source: Type.Union([
36
+ Type.Literal("repository-dockerfile"),
37
+ Type.Literal("devcontainer"),
38
+ Type.Literal("ci-adapted"),
39
+ Type.Literal("generated")
40
+ ]),
41
+ evidence: Type.Array(Type.Object({ path: Type.String({ minLength: 1 }), reason: Type.String({ minLength: 1 }) }, { additionalProperties: false }), { minItems: 1 })
42
+ }, { additionalProperties: false });
43
+ var taskTimeouts = Type.Object({
44
+ setupSeconds: Type.Integer({ minimum: 1 }),
45
+ agentSeconds: Type.Integer({ minimum: 1 }),
46
+ testsSeconds: Type.Integer({ minimum: 1 })
47
+ }, { additionalProperties: false });
48
+ var taskResources = Type.Object({
49
+ cpus: Type.Number({ exclusiveMinimum: 0 }),
50
+ memoryMb: Type.Integer({ minimum: 1 }),
51
+ storageMb: Type.Integer({ minimum: 1 })
52
+ }, { additionalProperties: false });
53
+ var taskDefinition = Type.Object({
54
+ schemaVersion: Type.Literal(2),
55
+ difficulty: Type.Union([Type.Literal("easy"), Type.Literal("medium"), Type.Literal("hard")]),
56
+ taskId: Type.String({ pattern: "^[A-Za-z0-9][A-Za-z0-9._-]*$" }),
57
+ repo: Type.String({ minLength: 1 }),
58
+ baseCommit: Type.String({ pattern: "^[0-9a-fA-F]{40}$" }),
59
+ workdir: Type.String({ minLength: 1 }),
60
+ testCommand: Type.String({ minLength: 1 }),
61
+ failToPass: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
62
+ passToPass: Type.Array(Type.String({ minLength: 1 })),
63
+ testPaths: Type.Array(Type.String({ minLength: 1 }), { minItems: 1 }),
64
+ sourcePr: Type.Integer({ minimum: 1 }),
65
+ sourceUrl: Type.String({ minLength: 1 }),
66
+ prompt: Type.String({ minLength: 1 }),
67
+ timeouts: taskTimeouts,
68
+ resources: taskResources,
69
+ environment: environmentContract
70
+ }, { additionalProperties: false });
71
+
72
+ // src/extensions/shared/static-check.ts
73
+ import { spawnSync } from "node:child_process";
74
+ import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
75
+ import { tmpdir } from "node:os";
76
+ import { join } from "node:path";
77
+ function requiredEnvironment(name) {
78
+ const value = process.env[name];
79
+ if (!value) {
80
+ throw new Error(`${name} is not configured`);
81
+ }
82
+ return value;
83
+ }
84
+ function stageSubmission(definition, testPatch, goldPatch, prefix = "selfbench-submit-") {
85
+ const directory = mkdtempSync(join(tmpdir(), prefix));
86
+ const definitionJson = `${JSON.stringify(definition, null, 2)}
87
+ `;
88
+ writeFileSync(join(directory, "definition.json"), definitionJson);
89
+ writeFileSync(join(directory, "test.patch"), testPatch);
90
+ writeFileSync(join(directory, "gold.patch"), goldPatch);
91
+ return {
92
+ directory,
93
+ definitionJson,
94
+ dispose: () => rmSync(directory, { recursive: true, force: true })
95
+ };
96
+ }
97
+ function runStaticCheck(staging, extra = [], applyAgainst) {
98
+ const program = requiredEnvironment("SELFBENCH_CHECK_PROGRAM");
99
+ const repository = applyAgainst?.repository ?? process.env.SELFBENCH_REPO_DIRECTORY ?? "/work/repo";
100
+ const result = spawnSync(process.execPath, [
101
+ program,
102
+ join(staging, "definition.json"),
103
+ join(staging, "test.patch"),
104
+ join(staging, "gold.patch"),
105
+ process.env.SELFBENCH_RENDER_OUTPUT ?? "/work",
106
+ ...extra,
107
+ ...applyAgainst ? ["--repository", repository, "--base", applyAgainst.base] : []
108
+ ], { encoding: "utf8", maxBuffer: 64 * 1024 * 1024 });
109
+ if (result.status !== 0) {
110
+ throw new Error(`static check program failed: ${(result.stderr || result.stdout).slice(-4000)}`);
111
+ }
112
+ return JSON.parse(result.stdout);
113
+ }
114
+ function staticCheckFailure(verdict, subject) {
115
+ const lines = verdict.errors.map((error) => `- [${error.gate}] ${error.message}`).join(`
116
+ `);
117
+ const rendered = verdict.renderedDirectory ? `
118
+ The dry-rendered Harbor tree (as far as rendering succeeded) is under ${verdict.renderedDirectory}.` : "";
119
+ return failure(`The ${subject} failed the static check; nothing was recorded. Fix every item and try again:
120
+ ${lines}${rendered}`);
121
+ }
122
+ function failure(text) {
123
+ return { content: [{ type: "text", text }], details: {}, isError: true };
124
+ }
125
+
126
+ // src/extensions/shared/deliverable.ts
127
+ var TASK_DELIVERABLE_FILES = [
128
+ "definition.json",
129
+ "instruction.md",
130
+ "test.patch",
131
+ "gold.patch"
132
+ ];
133
+ function loadTaskDeliverable(root) {
134
+ const missing = TASK_DELIVERABLE_FILES.filter((name) => !existsSync(join2(root, name)));
135
+ if (missing.length > 0) {
136
+ return deliverableFailure(root, missing.map((name) => `${name} is missing`));
137
+ }
138
+ let definition;
139
+ try {
140
+ const parsed = JSON.parse(readFileSync(join2(root, "definition.json"), "utf8"));
141
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
142
+ throw new Error("must be a JSON object");
143
+ }
144
+ definition = parsed;
145
+ } catch (error) {
146
+ return deliverableFailure(root, [
147
+ `definition.json is not valid JSON: ${error instanceof Error ? error.message : String(error)}`
148
+ ]);
149
+ }
150
+ const instruction = readFileSync(join2(root, "instruction.md"), "utf8").trim();
151
+ const testPatch = readFileSync(join2(root, "test.patch"), "utf8");
152
+ const goldPatch = readFileSync(join2(root, "gold.patch"), "utf8");
153
+ const problems = [];
154
+ if (!instruction) {
155
+ problems.push("instruction.md is empty");
156
+ }
157
+ if (typeof definition.prompt === "string" && definition.prompt.trim() !== instruction) {
158
+ problems.push("definition.json prompt differs from instruction.md; remove prompt or make them identical");
159
+ }
160
+ if (!testPatch.trim()) {
161
+ problems.push("test.patch is empty");
162
+ }
163
+ if (!goldPatch.trim()) {
164
+ problems.push("gold.patch is empty");
165
+ }
166
+ if (problems.length > 0) {
167
+ return deliverableFailure(root, problems);
168
+ }
169
+ return { definition: { ...definition, prompt: instruction }, testPatch, goldPatch };
170
+ }
171
+ function deliverableFailure(root, problems) {
172
+ return failure(`The deliverable in ${root} is incomplete; nothing was recorded. Fix every item and call the tool again:
173
+ ${problems.map((problem) => `- [files] ${problem}`).join(`
174
+ `)}`);
175
+ }
176
+
177
+ // src/extensions/shared/mailbox.ts
178
+ import { createHash } from "node:crypto";
179
+ import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync2, renameSync, writeFileSync as writeFileSync2 } from "node:fs";
180
+ import { join as join3 } from "node:path";
181
+ var DEFAULT_MAILBOX = "/work/mailbox";
182
+ var DEFAULT_POLL_MS = 2000;
183
+ var DEFAULT_TIMEOUT_MS = 60 * 60 * 1000;
184
+ function payloadHash(payload) {
185
+ return createHash("sha256").update(`${JSON.stringify(payload.definition)}\x00${payload.testPatch}\x00${payload.goldPatch}`).digest("hex");
186
+ }
187
+
188
+ class VerifyClient {
189
+ #mailbox = process.env.SELFBENCH_MAILBOX ?? DEFAULT_MAILBOX;
190
+ #budget = Number(process.env.SELFBENCH_VERIFY_BUDGET ?? "0");
191
+ #pollMs = Number(process.env.SELFBENCH_VERIFY_POLL_MS ?? String(DEFAULT_POLL_MS));
192
+ #timeoutMs = Number(process.env.SELFBENCH_VERIFY_TIMEOUT_MS ?? String(DEFAULT_TIMEOUT_MS));
193
+ #used = 0;
194
+ #sequence = 0;
195
+ #lastGreenHash;
196
+ get remaining() {
197
+ return Math.max(0, this.#budget - this.#used);
198
+ }
199
+ verifiedGreen(payload) {
200
+ return this.#lastGreenHash !== undefined && this.#lastGreenHash === payloadHash(payload);
201
+ }
202
+ async verify(kind, payload) {
203
+ if (this.remaining === 0) {
204
+ return { kind: "exhausted" };
205
+ }
206
+ const requests = join3(this.#mailbox, "requests");
207
+ const responses = join3(this.#mailbox, "responses");
208
+ mkdirSync(requests, { recursive: true });
209
+ mkdirSync(responses, { recursive: true });
210
+ this.#sequence += 1;
211
+ const id = `${Date.now()}-${this.#sequence}`;
212
+ const request = join3(requests, `${id}.json`);
213
+ writeFileSync2(`${request}.tmp`, `${JSON.stringify({ id, kind, ...payload })}
214
+ `);
215
+ renameSync(`${request}.tmp`, request);
216
+ const response = join3(responses, `${id}.json`);
217
+ const deadline = Date.now() + this.#timeoutMs;
218
+ while (Date.now() < deadline) {
219
+ if (existsSync2(response)) {
220
+ let parsed;
221
+ try {
222
+ parsed = JSON.parse(readFileSync2(response, "utf8"));
223
+ } catch {
224
+ parsed = undefined;
225
+ }
226
+ if (parsed && typeof parsed === "object") {
227
+ return this.#record(parsed, payload);
228
+ }
229
+ }
230
+ await new Promise((resolve) => setTimeout(resolve, this.#pollMs));
231
+ }
232
+ this.#used += 1;
233
+ return {
234
+ kind: "error",
235
+ message: `verify timed out after ${Math.round(this.#timeoutMs / 60000)} minutes; the worker may still be building. ${this.remaining} verify call(s) remain.`
236
+ };
237
+ }
238
+ #record(response, payload) {
239
+ if (response.kind !== "report") {
240
+ return {
241
+ kind: "error",
242
+ message: typeof response.message === "string" ? response.message : "verify failed on the worker"
243
+ };
244
+ }
245
+ this.#used += 1;
246
+ const green = response.green === true;
247
+ if (green) {
248
+ this.#lastGreenHash = payloadHash(payload);
249
+ }
250
+ return {
251
+ kind: "report",
252
+ green,
253
+ summary: typeof response.summary === "string" ? response.summary : "",
254
+ rendered: typeof response.rendered === "string" ? response.rendered : "",
255
+ remaining: this.remaining
256
+ };
257
+ }
258
+ }
259
+ function verifyOutcomeText(outcome, submitTool) {
260
+ if (outcome.kind === "exhausted") {
261
+ return `No verify calls remain in this session. Call ${submitTool} with your best task or explain in your final message why it cannot be made fair.`;
262
+ }
263
+ if (outcome.kind === "error") {
264
+ return `verify could not complete: ${outcome.message}`;
265
+ }
266
+ const next = outcome.green ? `Call ${submitTool} with exactly this payload to record it; the worker will reuse this report.` : `Fix the red gates and call verify again, or ${submitTool} if you must (the worker verifies again and a round is spent if it fails).`;
267
+ return `${outcome.rendered.trim()}
268
+
269
+ verify result: green=${outcome.green}. ${outcome.remaining} verify call(s) remain in this session. ${next}`;
270
+ }
271
+
272
+ // src/extensions/authoring.ts
273
+ var noArguments = Type2.Object({}, { additionalProperties: false });
274
+ function applyTarget(definition) {
275
+ return { base: typeof definition.baseCommit === "string" ? definition.baseCommit : "HEAD" };
276
+ }
277
+ function authoringExtension(pi) {
278
+ const client = new VerifyClient;
279
+ const deliverable = () => process.env.SELFBENCH_DELIVERABLE ?? "/work/task";
280
+ pi.registerTool({
281
+ name: "verify",
282
+ label: "Verify SelfBench task",
283
+ description: "Takes no arguments. Reads the deliverable in /work/task (definition.json, instruction.md, test.patch, gold.patch), runs the static check, then the harness's real verification: trusted compile, audit, image build, smoke, nop, and oracle. Blocks until the report is back (can take up to an hour). Budget-limited per session; the result says how many calls remain.",
284
+ parameters: noArguments,
285
+ async execute() {
286
+ const loaded = loadTaskDeliverable(deliverable());
287
+ if ("isError" in loaded) {
288
+ return loaded;
289
+ }
290
+ const staging = stageSubmission(loaded.definition, loaded.testPatch, loaded.goldPatch, "selfbench-verify-");
291
+ try {
292
+ const verdict = runStaticCheck(staging.directory, [], applyTarget(loaded.definition));
293
+ if (!verdict.ok) {
294
+ return staticCheckFailure(verdict, "task");
295
+ }
296
+ } finally {
297
+ staging.dispose();
298
+ }
299
+ const outcome = await client.verify("task", loaded);
300
+ return {
301
+ content: [{ type: "text", text: verifyOutcomeText(outcome, "submit_task") }],
302
+ details: { kind: outcome.kind, remaining: client.remaining },
303
+ ...outcome.kind === "exhausted" ? { isError: true } : {}
304
+ };
305
+ }
306
+ });
307
+ pi.registerTool({
308
+ name: "submit_task",
309
+ label: "Submit SelfBench task",
310
+ description: "Takes no arguments. Reads the deliverable in /work/task, runs the static check, and records the task; a passing submission ends the session. Run verify first and submit only what verify reported green.",
311
+ parameters: noArguments,
312
+ async execute() {
313
+ const root = requiredEnvironment("SELFBENCH_TASK_OUTPUT");
314
+ const loaded = loadTaskDeliverable(deliverable());
315
+ if ("isError" in loaded) {
316
+ return loaded;
317
+ }
318
+ const taskId = String(loaded.definition.taskId ?? "");
319
+ const staging = stageSubmission(loaded.definition, loaded.testPatch, loaded.goldPatch);
320
+ try {
321
+ const verdict = runStaticCheck(staging.directory, [], applyTarget(loaded.definition));
322
+ if (!verdict.ok) {
323
+ return staticCheckFailure(verdict, "submission");
324
+ }
325
+ const directory = join4(root, taskId);
326
+ mkdirSync2(root, { recursive: true });
327
+ mkdirSync2(directory, { recursive: false });
328
+ cpSync(staging.directory, directory, { recursive: true });
329
+ const verified = client.verifiedGreen(loaded);
330
+ return {
331
+ content: [
332
+ {
333
+ type: "text",
334
+ text: `Submitted ${taskId}; the static check passed and the Harbor tree is dry-rendered under ${verdict.renderedDirectory ?? "/work/rendered"}. ${verified ? "This deliverable matches your last green verify, so the worker reuses that report." : "This deliverable was not verified green in this session, so the worker verifies it now and a round is spent if it fails."} Stop here and wait.`
335
+ }
336
+ ],
337
+ details: { taskId, verified }
338
+ };
339
+ } finally {
340
+ staging.dispose();
341
+ }
342
+ }
343
+ });
344
+ }
345
+ export {
346
+ authoringExtension as default
347
+ };