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
package/src/api.ts DELETED
@@ -1,290 +0,0 @@
1
- import { timingSafeEqual } from "node:crypto";
2
- import { readFile } from "node:fs/promises";
3
- import { createServer, type IncomingMessage, type ServerResponse } from "node:http";
4
- import { dirname, join } from "node:path";
5
- import { pipeline } from "node:stream/promises";
6
- import { fileURLToPath } from "node:url";
7
- import { Client } from "@temporalio/client";
8
- import { z } from "zod";
9
- import { createArtifactStore } from "./artifacts.js";
10
- import type { SelfBenchConfig } from "./config.js";
11
- import {
12
- artifactRefSchema,
13
- type RunPhase,
14
- type RunRequest,
15
- type RunStatus,
16
- repositoryRefSchema,
17
- runRequestSchema,
18
- } from "./contracts.js";
19
- import { connectTemporalClient } from "./temporal/connection.js";
20
- import { selfBenchRunWorkflow, statusQuery } from "./temporal/workflow.js";
21
-
22
- const submissionSchema = z.object({
23
- runId: z.string().regex(/^[a-z0-9][a-z0-9-]{2,62}$/),
24
- repository: repositoryRefSchema,
25
- provenance: artifactRefSchema,
26
- candidateCounts: z.object({
27
- easy: z.number().int().min(0).max(100),
28
- medium: z.number().int().min(0).max(100),
29
- hard: z.number().int().min(0).max(100),
30
- }),
31
- authoringModel: z.string().min(1).default("gpt-5.6-sol"),
32
- selfbenchCommit: z.string().regex(/^[0-9a-f]{40}$/i),
33
- });
34
-
35
- export async function startApi(config: SelfBenchConfig): Promise<() => Promise<void>> {
36
- const connection = await connectTemporalClient(config.temporal);
37
- const client = new Client({ connection, namespace: config.temporal.namespace });
38
- const artifacts = createArtifactStore(config.artifact);
39
- const server = createServer(async (request, response) => {
40
- try {
41
- const url = new URL(request.url ?? "/", `http://${request.headers.host ?? "localhost"}`);
42
- if (request.method === "GET" && url.pathname === "/healthz") {
43
- sendJson(response, 200, { ok: true });
44
- return;
45
- }
46
- if (
47
- request.method === "GET" &&
48
- (url.pathname === "/" || url.pathname.startsWith("/assets/"))
49
- ) {
50
- await sendReviewAsset(response, url.pathname);
51
- return;
52
- }
53
- if (!authorized(request, config.apiToken)) {
54
- sendJson(response, 401, { error: "unauthorized" });
55
- return;
56
- }
57
- if (request.method === "POST" && url.pathname === "/v1/provenance") {
58
- const runId = z
59
- .string()
60
- .regex(/^[a-z0-9][a-z0-9-]{2,62}$/)
61
- .parse(url.searchParams.get("runId"));
62
- const body = await readBody(request, 100 * 1024 * 1024);
63
- const reference = await artifacts.put(
64
- `runs/${runId}/input/provenance.jsonl`,
65
- body,
66
- "application/x-ndjson",
67
- );
68
- sendJson(response, 201, reference);
69
- return;
70
- }
71
- if (request.method === "POST" && url.pathname === "/v1/runs") {
72
- const workflowInput = buildRunRequest(
73
- config,
74
- JSON.parse((await readBody(request)).toString("utf8")),
75
- );
76
- await client.workflow.start(selfBenchRunWorkflow, {
77
- workflowId: workflowInput.runId,
78
- taskQueue: config.temporal.taskQueue,
79
- args: [workflowInput],
80
- workflowExecutionTimeout: "14 days",
81
- });
82
- sendJson(response, 202, { runId: workflowInput.runId });
83
- return;
84
- }
85
- const runMatch = /^\/v1\/runs\/([a-z0-9][a-z0-9-]{2,62})(?:\/(cancel|export))?$/.exec(
86
- url.pathname,
87
- );
88
- if (runMatch?.[1] && request.method === "GET" && runMatch[2] === "export") {
89
- const status = await queryStatus(client.workflow.getHandle(runMatch[1]));
90
- if (!("export" in status) || !status.export) {
91
- sendJson(response, 409, { error: "run export is not ready" });
92
- return;
93
- }
94
- const body = await artifacts.openRead(status.export);
95
- response.writeHead(200, {
96
- "content-type": status.export.contentType,
97
- "content-length": status.export.sizeBytes,
98
- "content-disposition": `attachment; filename="selfbench-${runMatch[1]}.tar.gz"`,
99
- "x-content-sha256": status.export.sha256,
100
- });
101
- await pipeline(body, response);
102
- return;
103
- }
104
- if (runMatch?.[1] && request.method === "GET" && !runMatch[2]) {
105
- const handle = client.workflow.getHandle(runMatch[1]);
106
- const status = await queryStatus(handle);
107
- sendJson(response, 200, status);
108
- return;
109
- }
110
- if (runMatch?.[1] && request.method === "POST" && runMatch[2] === "cancel") {
111
- await client.workflow.getHandle(runMatch[1]).cancel();
112
- sendJson(response, 202, { runId: runMatch[1], cancellationRequested: true });
113
- return;
114
- }
115
- if (request.method === "GET" && url.pathname === "/v1/runs") {
116
- const runs: unknown[] = [];
117
- for await (const execution of client.workflow.list({
118
- query: "WorkflowType = 'selfBenchRunWorkflow'",
119
- })) {
120
- runs.push({
121
- runId: execution.workflowId,
122
- status: execution.status.name,
123
- startedAt: execution.startTime.toISOString(),
124
- closedAt: execution.closeTime?.toISOString(),
125
- });
126
- }
127
- sendJson(response, 200, runs);
128
- return;
129
- }
130
- sendJson(response, 404, { error: "not found" });
131
- } catch (error) {
132
- if (response.headersSent) {
133
- response.destroy(error instanceof Error ? error : new Error(String(error)));
134
- return;
135
- }
136
- const message = error instanceof Error ? error.message : String(error);
137
- sendJson(response, error instanceof z.ZodError || error instanceof SyntaxError ? 400 : 500, {
138
- error: message,
139
- });
140
- }
141
- });
142
-
143
- await new Promise<void>((resolve, reject) => {
144
- server.once("error", reject);
145
- server.listen(config.apiPort, config.apiHost, resolve);
146
- });
147
- return async () => {
148
- await new Promise<void>((resolve, reject) =>
149
- server.close((error) => (error ? reject(error) : resolve())),
150
- );
151
- await connection.close();
152
- };
153
- }
154
-
155
- export function buildRunRequest(
156
- config: SelfBenchConfig,
157
- submission: z.input<typeof submissionSchema>,
158
- ): RunRequest {
159
- const parsed = submissionSchema.parse(submission);
160
- return runRequestSchema.parse({
161
- runId: parsed.runId,
162
- repository: parsed.repository,
163
- provenance: parsed.provenance,
164
- candidateCounts: parsed.candidateCounts,
165
- authoring: {
166
- provider: "openai-codex",
167
- model: parsed.authoringModel,
168
- reasoningEffort: "high",
169
- },
170
- version: {
171
- selfbenchCommit: config.buildCommit ?? parsed.selfbenchCommit,
172
- executionBackend: config.execution.kind,
173
- harborEnvironment: config.harborEnvironment,
174
- sandboxImage: config.execution.image,
175
- ...(config.execution.kind === "vercel"
176
- ? { sandboxTimeoutCapMs: config.execution.timeoutCapMs }
177
- : {}),
178
- schema: 1,
179
- },
180
- });
181
- }
182
-
183
- async function queryStatus(
184
- handle: ReturnType<Client["workflow"]["getHandle"]>,
185
- ): Promise<RunStatus | object> {
186
- try {
187
- const [status, description] = await Promise.all([handle.query(statusQuery), handle.describe()]);
188
- if (description.status.name === "RUNNING" || terminalRunPhase(status.phase)) {
189
- return status;
190
- }
191
- const phase = executionPhase(description.status.name);
192
- return {
193
- ...status,
194
- phase,
195
- ...(phase === "failed" && !status.error
196
- ? { error: `Temporal workflow ${description.status.name.toLowerCase()}` }
197
- : {}),
198
- };
199
- } catch {
200
- const description = await handle.describe();
201
- return {
202
- runId: description.workflowId,
203
- phase: executionPhase(description.status.name),
204
- };
205
- }
206
- }
207
-
208
- function terminalRunPhase(phase: RunPhase): boolean {
209
- return ["complete", "blocked", "failed", "cancelled"].includes(phase);
210
- }
211
-
212
- function executionPhase(status: string): RunPhase {
213
- switch (status) {
214
- case "COMPLETED":
215
- return "complete";
216
- case "CANCELED":
217
- return "cancelled";
218
- case "RUNNING":
219
- return "queued";
220
- default:
221
- return "failed";
222
- }
223
- }
224
-
225
- async function readBody(request: IncomingMessage, limit = 10 * 1024 * 1024): Promise<Buffer> {
226
- const chunks: Buffer[] = [];
227
- let size = 0;
228
- for await (const chunk of request) {
229
- const value = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
230
- size += value.byteLength;
231
- if (size > limit) {
232
- throw new Error(`request body exceeds ${limit} bytes`);
233
- }
234
- chunks.push(value);
235
- }
236
- return Buffer.concat(chunks);
237
- }
238
-
239
- function authorized(request: IncomingMessage, token: string | undefined): boolean {
240
- if (!token) {
241
- return true;
242
- }
243
- const supplied = request.headers.authorization?.replace(/^Bearer\s+/i, "");
244
- if (!supplied) {
245
- return false;
246
- }
247
- const expectedBuffer = Buffer.from(token);
248
- const suppliedBuffer = Buffer.from(supplied);
249
- return (
250
- expectedBuffer.length === suppliedBuffer.length &&
251
- timingSafeEqual(expectedBuffer, suppliedBuffer)
252
- );
253
- }
254
-
255
- async function sendReviewAsset(response: ServerResponse, pathname: string): Promise<void> {
256
- const relativePath = pathname === "/" ? "index.html" : pathname.slice(1);
257
- const root = join(dirname(fileURLToPath(import.meta.url)), "review");
258
- const path = join(root, relativePath);
259
- if (!path.startsWith(`${root}/`)) {
260
- sendJson(response, 400, { error: "invalid asset path" });
261
- return;
262
- }
263
- try {
264
- const body = await readFile(path);
265
- response.writeHead(200, {
266
- "content-type": contentType(path),
267
- "content-length": body.byteLength,
268
- "cache-control": pathname === "/" ? "no-cache" : "public, max-age=31536000, immutable",
269
- });
270
- response.end(body);
271
- } catch {
272
- sendJson(response, 404, { error: "asset not found" });
273
- }
274
- }
275
-
276
- function contentType(path: string): string {
277
- if (path.endsWith(".html")) return "text/html; charset=utf-8";
278
- if (path.endsWith(".css")) return "text/css; charset=utf-8";
279
- if (path.endsWith(".js")) return "text/javascript; charset=utf-8";
280
- return "application/octet-stream";
281
- }
282
-
283
- function sendJson(response: ServerResponse, status: number, value: unknown): void {
284
- const body = `${JSON.stringify(value, null, 2)}\n`;
285
- response.writeHead(status, {
286
- "content-type": "application/json; charset=utf-8",
287
- "content-length": Buffer.byteLength(body),
288
- });
289
- response.end(body);
290
- }
package/src/artifacts.ts DELETED
@@ -1,357 +0,0 @@
1
- import { createHash, randomUUID } from "node:crypto";
2
- import { createReadStream, createWriteStream } from "node:fs";
3
- import { link, mkdir, mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
4
- import { tmpdir } from "node:os";
5
- import { dirname, join, resolve, sep } from "node:path";
6
- import { Readable, Transform } from "node:stream";
7
- import { pipeline } from "node:stream/promises";
8
- import { Storage } from "@google-cloud/storage";
9
- import type { SelfBenchConfig } from "./config.js";
10
- import type { ArtifactRef } from "./contracts.js";
11
- import { sha256 } from "./hash.js";
12
-
13
- export interface ArtifactStore {
14
- put(key: string, value: Uint8Array, contentType: string): Promise<ArtifactRef>;
15
- putFile(key: string, sourcePath: string, contentType: string): Promise<ArtifactRef>;
16
- get(reference: ArtifactRef): Promise<Uint8Array>;
17
- openRead(reference: ArtifactRef): Promise<Readable>;
18
- getByKey(key: string): Promise<Uint8Array | undefined>;
19
- }
20
-
21
- export function createArtifactStore(config: SelfBenchConfig["artifact"]): ArtifactStore {
22
- return config.kind === "gcs"
23
- ? new GcsArtifactStore(config.bucket, config.prefix)
24
- : new LocalArtifactStore(config.directory);
25
- }
26
-
27
- export class LocalArtifactStore implements ArtifactStore {
28
- readonly #root: string;
29
-
30
- constructor(root: string) {
31
- this.#root = resolve(root);
32
- }
33
-
34
- async put(key: string, value: Uint8Array, contentType: string): Promise<ArtifactRef> {
35
- const path = this.#pathFor(key);
36
- await mkdir(dirname(path), { recursive: true });
37
- const digest = sha256(value);
38
- try {
39
- await writeFile(path, value, { flag: "wx" });
40
- } catch (error) {
41
- const existing = await fileDigest(path).catch(() => undefined);
42
- if (!existing || existing.sha256 !== digest || existing.sizeBytes !== value.byteLength) {
43
- throw error;
44
- }
45
- }
46
- return {
47
- uri: `file://${path}`,
48
- sha256: digest,
49
- sizeBytes: value.byteLength,
50
- contentType,
51
- };
52
- }
53
-
54
- async putFile(key: string, sourcePath: string, contentType: string): Promise<ArtifactRef> {
55
- const path = this.#pathFor(key);
56
- await mkdir(dirname(path), { recursive: true });
57
- const temporaryPath = `${path}.${randomUUID()}.tmp`;
58
- try {
59
- const digest = await copyWithDigest(sourcePath, temporaryPath);
60
- try {
61
- await link(temporaryPath, path);
62
- } catch (error) {
63
- if (!hasCode(error, "EEXIST")) {
64
- throw error;
65
- }
66
- const existing = await fileDigest(path).catch(() => undefined);
67
- if (
68
- !existing ||
69
- existing.sha256 !== digest.sha256 ||
70
- existing.sizeBytes !== digest.sizeBytes
71
- ) {
72
- throw new Error(`artifact already exists with different contents: file://${path}`);
73
- }
74
- }
75
- return {
76
- uri: `file://${path}`,
77
- ...digest,
78
- contentType,
79
- };
80
- } finally {
81
- await rm(temporaryPath, { force: true });
82
- }
83
- }
84
-
85
- async get(reference: ArtifactRef): Promise<Uint8Array> {
86
- const url = new URL(reference.uri);
87
- if (url.protocol !== "file:") {
88
- throw new Error(`local artifact store cannot read ${reference.uri}`);
89
- }
90
- const path = resolve(decodeURIComponent(url.pathname));
91
- this.#assertInsideRoot(path);
92
- const value = await readFile(path);
93
- verifyArtifact(reference, value);
94
- return value;
95
- }
96
-
97
- async openRead(reference: ArtifactRef): Promise<Readable> {
98
- const path = this.#pathForReference(reference);
99
- if ((await stat(path)).size !== reference.sizeBytes) {
100
- throw new Error(`artifact integrity check failed: ${reference.uri}`);
101
- }
102
- return verifiedArtifactReadStream(reference, createReadStream(path));
103
- }
104
-
105
- async getByKey(key: string): Promise<Uint8Array | undefined> {
106
- try {
107
- return await readFile(this.#pathFor(key));
108
- } catch (error) {
109
- if (isNotFound(error)) {
110
- return undefined;
111
- }
112
- throw error;
113
- }
114
- }
115
-
116
- #pathForReference(reference: ArtifactRef): string {
117
- const url = new URL(reference.uri);
118
- if (url.protocol !== "file:") {
119
- throw new Error(`local artifact store cannot read ${reference.uri}`);
120
- }
121
- const path = resolve(decodeURIComponent(url.pathname));
122
- this.#assertInsideRoot(path);
123
- return path;
124
- }
125
-
126
- #pathFor(key: string): string {
127
- if (!key || key.startsWith("/") || key.split("/").some((part) => part === "..")) {
128
- throw new Error(`unsafe artifact key: ${key}`);
129
- }
130
- const path = resolve(this.#root, key);
131
- this.#assertInsideRoot(path);
132
- return path;
133
- }
134
-
135
- #assertInsideRoot(path: string): void {
136
- if (path !== this.#root && !path.startsWith(`${this.#root}${sep}`)) {
137
- throw new Error(`artifact path escapes root: ${path}`);
138
- }
139
- }
140
- }
141
-
142
- export class GcsArtifactStore implements ArtifactStore {
143
- readonly #storage = new Storage();
144
- readonly #bucket: string;
145
- readonly #prefix: string;
146
-
147
- constructor(bucket: string, prefix: string) {
148
- this.#bucket = bucket;
149
- this.#prefix = prefix.replace(/^\/+|\/+$/g, "");
150
- }
151
-
152
- async put(key: string, value: Uint8Array, contentType: string): Promise<ArtifactRef> {
153
- const object = this.#objectFor(key);
154
- const digest = sha256(value);
155
- const file = this.#storage.bucket(this.#bucket).file(object);
156
- try {
157
- await file.save(value, {
158
- resumable: false,
159
- preconditionOpts: { ifGenerationMatch: 0 },
160
- metadata: {
161
- contentType,
162
- metadata: { sha256: digest },
163
- },
164
- });
165
- } catch (error) {
166
- const [exists] = await file.exists();
167
- if (!exists) {
168
- throw error;
169
- }
170
- const [metadata] = await file.getMetadata();
171
- if (metadata.metadata?.sha256 !== digest) {
172
- throw new Error(
173
- `artifact already exists with different contents: gs://${this.#bucket}/${object}`,
174
- );
175
- }
176
- }
177
- return {
178
- uri: `gs://${this.#bucket}/${object}`,
179
- sha256: digest,
180
- sizeBytes: value.byteLength,
181
- contentType,
182
- };
183
- }
184
-
185
- async putFile(key: string, sourcePath: string, contentType: string): Promise<ArtifactRef> {
186
- const object = this.#objectFor(key);
187
- const bucket = this.#storage.bucket(this.#bucket);
188
- const file = bucket.file(object);
189
- const snapshotDirectory = await mkdtemp(join(tmpdir(), "selfbench-artifact-"));
190
- const snapshotPath = join(snapshotDirectory, "upload");
191
- try {
192
- const digest = await copyWithDigest(sourcePath, snapshotPath);
193
- try {
194
- await bucket.upload(snapshotPath, {
195
- destination: object,
196
- resumable: true,
197
- preconditionOpts: { ifGenerationMatch: 0 },
198
- metadata: {
199
- contentType,
200
- metadata: { sha256: digest.sha256 },
201
- },
202
- });
203
- } catch (error) {
204
- const [exists] = await file.exists();
205
- if (!exists) {
206
- throw error;
207
- }
208
- const [metadata] = await file.getMetadata();
209
- if (
210
- metadata.metadata?.sha256 !== digest.sha256 ||
211
- Number(metadata.size) !== digest.sizeBytes
212
- ) {
213
- throw new Error(
214
- `artifact already exists with different contents: gs://${this.#bucket}/${object}`,
215
- );
216
- }
217
- }
218
- return {
219
- uri: `gs://${this.#bucket}/${object}`,
220
- ...digest,
221
- contentType,
222
- };
223
- } finally {
224
- await rm(snapshotDirectory, { recursive: true, force: true });
225
- }
226
- }
227
-
228
- async get(reference: ArtifactRef): Promise<Uint8Array> {
229
- const match = /^gs:\/\/([^/]+)\/(.+)$/.exec(reference.uri);
230
- if (!match) {
231
- throw new Error(`GCS artifact store cannot read ${reference.uri}`);
232
- }
233
- const [, bucket, object] = match;
234
- if (bucket !== this.#bucket || !object) {
235
- throw new Error(`artifact is outside configured bucket: ${reference.uri}`);
236
- }
237
- if (this.#prefix && object !== this.#prefix && !object.startsWith(`${this.#prefix}/`)) {
238
- throw new Error(`artifact is outside configured bucket: ${reference.uri}`);
239
- }
240
- const [value] = await this.#storage.bucket(bucket).file(object).download();
241
- verifyArtifact(reference, value);
242
- return value;
243
- }
244
-
245
- async openRead(reference: ArtifactRef): Promise<Readable> {
246
- const file = this.#fileForReference(reference);
247
- const [metadata] = await file.getMetadata();
248
- if (
249
- Number(metadata.size) !== reference.sizeBytes ||
250
- metadata.metadata?.sha256 !== reference.sha256
251
- ) {
252
- throw new Error(`artifact integrity check failed: ${reference.uri}`);
253
- }
254
- return verifiedArtifactReadStream(reference, file.createReadStream());
255
- }
256
-
257
- async getByKey(key: string): Promise<Uint8Array | undefined> {
258
- const file = this.#storage.bucket(this.#bucket).file(this.#objectFor(key));
259
- const [exists] = await file.exists();
260
- if (!exists) {
261
- return undefined;
262
- }
263
- const [value] = await file.download();
264
- return value;
265
- }
266
-
267
- #fileForReference(reference: ArtifactRef) {
268
- const match = /^gs:\/\/([^/]+)\/(.+)$/.exec(reference.uri);
269
- if (!match) {
270
- throw new Error(`GCS artifact store cannot read ${reference.uri}`);
271
- }
272
- const [, bucket, object] = match;
273
- if (bucket !== this.#bucket || !object) {
274
- throw new Error(`artifact is outside configured bucket: ${reference.uri}`);
275
- }
276
- if (this.#prefix && object !== this.#prefix && !object.startsWith(`${this.#prefix}/`)) {
277
- throw new Error(`artifact is outside configured bucket: ${reference.uri}`);
278
- }
279
- return this.#storage.bucket(bucket).file(object);
280
- }
281
-
282
- #objectFor(key: string): string {
283
- if (!key || key.startsWith("/") || key.split("/").some((part) => part === "..")) {
284
- throw new Error(`unsafe artifact key: ${key}`);
285
- }
286
- return this.#prefix ? `${this.#prefix}/${key}` : key;
287
- }
288
- }
289
-
290
- export function verifiedArtifactReadStream(reference: ArtifactRef, input: Readable): Readable {
291
- return Readable.from(
292
- (async function* () {
293
- const hash = createHash("sha256");
294
- let sizeBytes = 0;
295
- for await (const chunk of input) {
296
- const bytes = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
297
- hash.update(bytes);
298
- sizeBytes += bytes.byteLength;
299
- yield bytes;
300
- }
301
- if (sizeBytes !== reference.sizeBytes || hash.digest("hex") !== reference.sha256) {
302
- throw new Error(`artifact integrity check failed: ${reference.uri}`);
303
- }
304
- })(),
305
- );
306
- }
307
-
308
- async function copyWithDigest(
309
- sourcePath: string,
310
- destinationPath: string,
311
- ): Promise<{ sha256: string; sizeBytes: number }> {
312
- const hash = createHash("sha256");
313
- let sizeBytes = 0;
314
- const hasher = new Transform({
315
- transform(chunk: Buffer, _encoding, callback) {
316
- hash.update(chunk);
317
- sizeBytes += chunk.byteLength;
318
- callback(undefined, chunk);
319
- },
320
- });
321
- await pipeline(
322
- createReadStream(sourcePath),
323
- hasher,
324
- createWriteStream(destinationPath, { flags: "wx" }),
325
- );
326
- return { sha256: hash.digest("hex"), sizeBytes };
327
- }
328
-
329
- async function fileDigest(path: string): Promise<{ sha256: string; sizeBytes: number }> {
330
- const hash = createHash("sha256");
331
- let sizeBytes = 0;
332
- for await (const chunk of createReadStream(path)) {
333
- const bytes = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
334
- hash.update(bytes);
335
- sizeBytes += bytes.byteLength;
336
- }
337
- return { sha256: hash.digest("hex"), sizeBytes };
338
- }
339
-
340
- function hasCode(error: unknown, code: string): boolean {
341
- return (
342
- typeof error === "object" &&
343
- error !== null &&
344
- "code" in error &&
345
- (error as { code?: unknown }).code === code
346
- );
347
- }
348
-
349
- function isNotFound(error: unknown): boolean {
350
- return hasCode(error, "ENOENT");
351
- }
352
-
353
- function verifyArtifact(reference: ArtifactRef, value: Uint8Array): void {
354
- if (value.byteLength !== reference.sizeBytes || sha256(value) !== reference.sha256) {
355
- throw new Error(`artifact integrity check failed: ${reference.uri}`);
356
- }
357
- }