reeval 0.18.0 → 0.20.0

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 (380) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +5 -5
  3. package/dist/{adapter-CptK032x.js → adapter-C60z3wLq.js} +5 -4
  4. package/dist/adapter-C60z3wLq.js.map +1 -0
  5. package/dist/{agent-B63OzUX9.js → agent-BmsMXZXx.js} +30 -10
  6. package/dist/{agent-B63OzUX9.js.map → agent-BmsMXZXx.js.map} +1 -1
  7. package/dist/agents-DXuFxtGC.js +1151 -0
  8. package/dist/agents-DXuFxtGC.js.map +1 -0
  9. package/dist/{app-files-sgqwfjtn.js → app-files-DT5mJyV4.js} +3 -3
  10. package/dist/app-files-DT5mJyV4.js.map +1 -0
  11. package/dist/assemble-CE4pHKIa.js +1 -0
  12. package/dist/{assemble-Me7Whp-y.js → assemble-DM2PNU4R.js} +152 -129
  13. package/dist/assemble-DM2PNU4R.js.map +1 -0
  14. package/dist/{attempt-Dp7Wtm8M.js → attempt-CAdlwlNu.js} +2 -2
  15. package/dist/{attempt-Dp7Wtm8M.js.map → attempt-CAdlwlNu.js.map} +1 -1
  16. package/dist/{attempt-host-Cik0SoIn.js → attempt-host-7VviAJrl.js} +6 -6
  17. package/dist/{attempt-host-Cik0SoIn.js.map → attempt-host-7VviAJrl.js.map} +1 -1
  18. package/dist/boat-BjLqFJIZ.js +108 -0
  19. package/dist/boat-BjLqFJIZ.js.map +1 -0
  20. package/dist/boat-DSNgZt-t.js +322 -0
  21. package/dist/boat-DSNgZt-t.js.map +1 -0
  22. package/dist/bridge/index.mjs +401 -79
  23. package/dist/capture-BzotD2hs.js +1 -0
  24. package/dist/{capture-C3RmjPph.js → capture-Ccf0Hmyx.js} +27 -25
  25. package/dist/capture-Ccf0Hmyx.js.map +1 -0
  26. package/dist/cases-Dy0mifal.js +1 -0
  27. package/dist/cases-z9E6DCd5.js +639 -0
  28. package/dist/cases-z9E6DCd5.js.map +1 -0
  29. package/dist/{cli-BBOlXKPG.js → cli-DTuLSlmW.js} +442 -707
  30. package/dist/cli-DTuLSlmW.js.map +1 -0
  31. package/dist/{cli-spec-DZ0bnP0_.js → cli-spec-Dsr79Qy1.js} +38 -11
  32. package/dist/cli-spec-Dsr79Qy1.js.map +1 -0
  33. package/dist/cli.js +2 -2
  34. package/dist/{client-tZ2WBDxf.js → client-KM4C5r5_.js} +93 -3
  35. package/dist/client-KM4C5r5_.js.map +1 -0
  36. package/dist/{command-DhiwsZl1.js → command-C2C7P5qo.js} +9 -9
  37. package/dist/{command-DhiwsZl1.js.map → command-C2C7P5qo.js.map} +1 -1
  38. package/dist/{command-CFQ9c1hk.js → command-D8oMB2fa.js} +16 -16
  39. package/dist/command-D8oMB2fa.js.map +1 -0
  40. package/dist/{command-fO0BFsTq.js → command-DSL7I-SI.js} +37 -37
  41. package/dist/command-DSL7I-SI.js.map +1 -0
  42. package/dist/{command-qGS802uX.js → command-Ff0T-1Hi.js} +21 -80
  43. package/dist/command-Ff0T-1Hi.js.map +1 -0
  44. package/dist/{commands-xYTMNTPv.js → commands-Bk9NG1s_.js} +1 -1
  45. package/dist/{commands-CC60TOT5.js → commands-xAOi_VEk.js} +186 -85
  46. package/dist/commands-xAOi_VEk.js.map +1 -0
  47. package/dist/{config-C2UtS9vy.js → config-SvK8pjEK.js} +261 -1708
  48. package/dist/config-SvK8pjEK.js.map +1 -0
  49. package/dist/{context-BajfiH0S.js → context-BdgCao9Q.js} +3 -2
  50. package/dist/context-BdgCao9Q.js.map +1 -0
  51. package/dist/{cost-BuVDamui.js → cost-BdRgySQl.js} +2 -2
  52. package/dist/{cost-BuVDamui.js.map → cost-BdRgySQl.js.map} +1 -1
  53. package/dist/cost-Cr26Alhq.js +1 -0
  54. package/dist/{cursor-catalog-BTK_apL-.js → cursor-catalog-DEzan4IT.js} +3 -3
  55. package/dist/{cursor-catalog-BTK_apL-.js.map → cursor-catalog-DEzan4IT.js.map} +1 -1
  56. package/dist/{db-C5SZ0510.js → db-BzOJ4Js4.js} +130 -84
  57. package/dist/db-BzOJ4Js4.js.map +1 -0
  58. package/dist/db-CQRZ3URX.js +2 -0
  59. package/dist/debug-CF4p4Lp_.js +1 -0
  60. package/dist/{debug-B5jDImcW.js → debug-CIXzB4wK.js} +2 -2
  61. package/dist/{debug-B5jDImcW.js.map → debug-CIXzB4wK.js.map} +1 -1
  62. package/dist/{default-effort-FEidNAIi.js → default-effort-BBDPbJ4D.js} +1 -1
  63. package/dist/{default-effort-BVmx7r7L.js → default-effort-BDKIxJyC.js} +4 -4
  64. package/dist/{default-effort-BVmx7r7L.js.map → default-effort-BDKIxJyC.js.map} +1 -1
  65. package/dist/{dist-ByYk_wAs.js → dist-Db7ifchA.js} +37 -8
  66. package/dist/dist-Db7ifchA.js.map +1 -0
  67. package/dist/{docker-BlSopHpZ.js → docker--mukta3L.js} +1 -1
  68. package/dist/{docker-B2F8-PGC.js → docker-DFrjoNs-.js} +3 -3
  69. package/dist/{docker-B2F8-PGC.js.map → docker-DFrjoNs-.js.map} +1 -1
  70. package/dist/{docker-Dto8ROCq.js → docker-DG_uFgn2.js} +109 -77
  71. package/dist/docker-DG_uFgn2.js.map +1 -0
  72. package/dist/{doctor-BcvfKpBX.js → doctor-DWK4ttex.js} +84 -27
  73. package/dist/doctor-DWK4ttex.js.map +1 -0
  74. package/dist/{environment-CC1RV21n.js → environment-cPMCOk-h.js} +79 -39
  75. package/dist/environment-cPMCOk-h.js.map +1 -0
  76. package/dist/{errors-BQV__TzH.js → errors-BZgLSZtV.js} +2 -2
  77. package/dist/{errors-BQV__TzH.js.map → errors-BZgLSZtV.js.map} +1 -1
  78. package/dist/{eval-source-CzxdgFBW.js → eval-source-C9b1h8L6.js} +10 -10
  79. package/dist/{eval-source-CzxdgFBW.js.map → eval-source-C9b1h8L6.js.map} +1 -1
  80. package/dist/{evaluate-NTNJ8T9H.js → evaluate-B12Tosvq.js} +377 -142
  81. package/dist/evaluate-B12Tosvq.js.map +1 -0
  82. package/dist/{evaluate-DToSB2bt.d.ts → evaluate-COdzf7Hl.d.ts} +17 -26
  83. package/dist/{files-aAzoGNCB.js → files-BOBdC0uI.js} +5 -5
  84. package/dist/{files-aAzoGNCB.js.map → files-BOBdC0uI.js.map} +1 -1
  85. package/dist/files-C1Rk9FYA.js +1 -0
  86. package/dist/files-DMQ9-Vv5.js +1 -0
  87. package/dist/{files-BGlHnC46.js → files-DgXyaAg6.js} +2 -2
  88. package/dist/{files-BGlHnC46.js.map → files-DgXyaAg6.js.map} +1 -1
  89. package/dist/files-Di0xDbCc.js +1 -0
  90. package/dist/{files-p-uTdOjA.js → files-DlQshsks.js} +3 -2
  91. package/dist/files-DlQshsks.js.map +1 -0
  92. package/dist/{files-DsXULUi5.js → files-F5EG0WPT.js} +5 -5
  93. package/dist/{files-DsXULUi5.js.map → files-F5EG0WPT.js.map} +1 -1
  94. package/dist/files-G5jf8wBp.js +1 -0
  95. package/dist/{files-CZXrkPja.js → files-s28a6czq.js} +54 -13
  96. package/dist/{files-CZXrkPja.js.map → files-s28a6czq.js.map} +1 -1
  97. package/dist/files-tiNWe8Ih.js +64 -0
  98. package/dist/files-tiNWe8Ih.js.map +1 -0
  99. package/dist/gate-CgYdaprG.js +49 -0
  100. package/dist/gate-CgYdaprG.js.map +1 -0
  101. package/dist/gateway.d.ts +1 -1
  102. package/dist/{git-C1MB5bjr.js → git-BpoqEgDV.js} +2 -2
  103. package/dist/{git-C1MB5bjr.js.map → git-BpoqEgDV.js.map} +1 -1
  104. package/dist/{harness-DGsRZDSo.js → harness-C2berMiM.js} +3 -3
  105. package/dist/{harness-DGsRZDSo.js.map → harness-C2berMiM.js.map} +1 -1
  106. package/dist/{harness-DYSC4zMh.js → harness-DXv2gnaT.js} +4 -2
  107. package/dist/harness-DXv2gnaT.js.map +1 -0
  108. package/dist/harness.d.ts +1 -1
  109. package/dist/harness.js +1 -1
  110. package/dist/{ids-DuK6xl4w.js → ids-C_advdJA.js} +3 -8
  111. package/dist/ids-C_advdJA.js.map +1 -0
  112. package/dist/{images-CNayXCp2.js → images-D2jFze2v.js} +98 -10
  113. package/dist/images-D2jFze2v.js.map +1 -0
  114. package/dist/index.d.ts +23 -3
  115. package/dist/index.js +5 -5
  116. package/dist/{init-D5HtmyMI.js → init-Bi1Q3lRi.js} +7 -6
  117. package/dist/init-Bi1Q3lRi.js.map +1 -0
  118. package/dist/init-CUw65o36.js +1 -0
  119. package/dist/{ink-list-Ca-5dunO.js → ink-list-BpfidQ1h.js} +121 -31
  120. package/dist/ink-list-BpfidQ1h.js.map +1 -0
  121. package/dist/{invocations-DrGXF9dT.js → invocations-CxGNOlh0.js} +3 -3
  122. package/dist/{invocations-DrGXF9dT.js.map → invocations-CxGNOlh0.js.map} +1 -1
  123. package/dist/judge-COMXT1Hx.js +230 -0
  124. package/dist/judge-COMXT1Hx.js.map +1 -0
  125. package/dist/judge.d.ts +1 -1
  126. package/dist/judge.js +1 -1
  127. package/dist/{judgments-m-mb0zv8.js → judgments-CzgpsTqv.js} +2 -2
  128. package/dist/{judgments-m-mb0zv8.js.map → judgments-CzgpsTqv.js.map} +1 -1
  129. package/dist/kinds-Bh2I35id.js +698 -0
  130. package/dist/kinds-Bh2I35id.js.map +1 -0
  131. package/dist/{summary-Uzc9osfV.js → layout-Cm85tQYk.js} +39 -150
  132. package/dist/layout-Cm85tQYk.js.map +1 -0
  133. package/dist/list-DuThsE28.js +1348 -0
  134. package/dist/list-DuThsE28.js.map +1 -0
  135. package/dist/{live-B71o2TkX.js → live-CgYbO4Te.js} +6 -4
  136. package/dist/{live-B71o2TkX.js.map → live-CgYbO4Te.js.map} +1 -1
  137. package/dist/{live-uRURFDMZ.js → live-DL0se4Zd.js} +7 -7
  138. package/dist/{live-uRURFDMZ.js.map → live-DL0se4Zd.js.map} +1 -1
  139. package/dist/live-DZLmj0iG.js +1 -0
  140. package/dist/{matchers-Cs8aDqdU.js → matchers-CXLn-1jm.js} +3 -2
  141. package/dist/{matchers-Cs8aDqdU.js.map → matchers-CXLn-1jm.js.map} +1 -1
  142. package/dist/{model-CXVVB4RK.js → model-CkNVAxob.js} +1 -1
  143. package/dist/model-Cv4GuTsZ.js +1 -0
  144. package/dist/{model-1L19Zukh.js → model-CwwkrCb7.js} +5 -5
  145. package/dist/{model-1L19Zukh.js.map → model-CwwkrCb7.js.map} +1 -1
  146. package/dist/{model-Ce9l9_rF.js → model-V3mMXp6x.js} +203 -313
  147. package/dist/model-V3mMXp6x.js.map +1 -0
  148. package/dist/{model-BxBWFOZn.js → model-cgt5uvu8.js} +5 -5
  149. package/dist/{model-BxBWFOZn.js.map → model-cgt5uvu8.js.map} +1 -1
  150. package/dist/{node-DhIRSrrK.js → node-D7pAU--0.js} +14 -10
  151. package/dist/node-D7pAU--0.js.map +1 -0
  152. package/dist/{opencode-providers-Co7plCea.js → opencode-providers-BGiXt8_B.js} +104 -35
  153. package/dist/opencode-providers-BGiXt8_B.js.map +1 -0
  154. package/dist/{openrouter-models-DNvLRYM7.js → openrouter-models-Cw1z8-sq.js} +2 -2
  155. package/dist/{openrouter-models-DNvLRYM7.js.map → openrouter-models-Cw1z8-sq.js.map} +1 -1
  156. package/dist/options-DPUmk7v_.js +1 -0
  157. package/dist/{gate-Cp_pQoEe.js → pairs-BGb134Vu.js} +2 -48
  158. package/dist/pairs-BGb134Vu.js.map +1 -0
  159. package/dist/{patch-ug5HpMOj.js → patch-DAi1nCuH.js} +2 -2
  160. package/dist/{patch-ug5HpMOj.js.map → patch-DAi1nCuH.js.map} +1 -1
  161. package/dist/plain-BYUf_fUV.js +267 -0
  162. package/dist/plain-BYUf_fUV.js.map +1 -0
  163. package/dist/{plan-DqnzfDH1.js → plan-CsPilzpk.js} +110 -39
  164. package/dist/plan-CsPilzpk.js.map +1 -0
  165. package/dist/{plugins-B2KQ0y3P.js → plugins-BfnhazOv.js} +10 -267
  166. package/dist/plugins-BfnhazOv.js.map +1 -0
  167. package/dist/{preflight-DyzmvK7i.js → preflight-BixaE4BA.js} +16 -9
  168. package/dist/preflight-BixaE4BA.js.map +1 -0
  169. package/dist/preflight-Bn3ianye.js +1 -0
  170. package/dist/{preflight-DVXEvzFU.js → preflight-D1C-iH0U.js} +1 -1
  171. package/dist/preflight-GkpgrBxP.js +68 -0
  172. package/dist/preflight-GkpgrBxP.js.map +1 -0
  173. package/dist/{prepare-BcSRa7-3.js → prepare-C--rM_wO.js} +2 -2
  174. package/dist/{prepare-21WMQZyt.js → prepare-DQEDXoDp.js} +9 -9
  175. package/dist/{prepare-21WMQZyt.js.map → prepare-DQEDXoDp.js.map} +1 -1
  176. package/dist/{prices-DYJA0tJN.js → prices-5m3SzMZ3.js} +2 -2
  177. package/dist/{prices-DYJA0tJN.js.map → prices-5m3SzMZ3.js.map} +1 -1
  178. package/dist/{provenance-iRxjp4Pu.js → provenance-BXyYwUC8.js} +4 -3
  179. package/dist/provenance-BXyYwUC8.js.map +1 -0
  180. package/dist/provider-BnUoz4KB.js +1 -0
  181. package/dist/{provider-DZd8t_XW.js → provider-BxzZq3Th.js} +2 -2
  182. package/dist/{provider-DZd8t_XW.js.map → provider-BxzZq3Th.js.map} +1 -1
  183. package/dist/{providers-vXMXuwn-.js → providers-1p4HKYIp.js} +152 -9
  184. package/dist/providers-1p4HKYIp.js.map +1 -0
  185. package/dist/providers-B-ijCktf.js +1 -0
  186. package/dist/query-BYhyf0LR.js +1 -0
  187. package/dist/{query-BhaKQ07P.js → query-DhhU9ADI.js} +2 -2
  188. package/dist/{query-BhaKQ07P.js.map → query-DhhU9ADI.js.map} +1 -1
  189. package/dist/{questions-BzdLdV3C.js → questions-CMAq4pr8.js} +9 -9
  190. package/dist/{questions-BzdLdV3C.js.map → questions-CMAq4pr8.js.map} +1 -1
  191. package/dist/{record-DhzwkSXc.js → record-6IUzwP9K.js} +5 -3
  192. package/dist/record-6IUzwP9K.js.map +1 -0
  193. package/dist/{remarks-CauU408t.js → remarks-BNABzemt.js} +115 -35
  194. package/dist/remarks-BNABzemt.js.map +1 -0
  195. package/dist/{remarks-NMgPd30U.js → remarks-DPCONFxZ.js} +71 -50
  196. package/dist/remarks-DPCONFxZ.js.map +1 -0
  197. package/dist/{remote-Dwy3fyo3.js → remote-U7fNt0UP.js} +6 -6
  198. package/dist/{remote-Dwy3fyo3.js.map → remote-U7fNt0UP.js.map} +1 -1
  199. package/dist/resolve-C14Pmtej.js +1 -0
  200. package/dist/{resolve-B1zMnPwK.js → resolve-Cx3a9UQ2.js} +10 -9
  201. package/dist/resolve-Cx3a9UQ2.js.map +1 -0
  202. package/dist/{results-CfC0id_u.js → results-CQKXmHym.js} +6 -6
  203. package/dist/{results-CfC0id_u.js.map → results-CQKXmHym.js.map} +1 -1
  204. package/dist/{resume-Dkhrpjow.js → resume-POpZa1ge.js} +169 -27
  205. package/dist/resume-POpZa1ge.js.map +1 -0
  206. package/dist/retry-CmG809Mp.js +105 -0
  207. package/dist/retry-CmG809Mp.js.map +1 -0
  208. package/dist/{runtime-DcvQcr36.js → runtime-Xm9oeC7o.js} +26 -7
  209. package/dist/runtime-Xm9oeC7o.js.map +1 -0
  210. package/dist/sandbox/boat.d.ts +26 -0
  211. package/dist/sandbox/boat.js +37 -0
  212. package/dist/sandbox/boat.js.map +1 -0
  213. package/dist/{sandbox-8zCrtuCf.js → sandbox-DrlL4yqb.js} +31 -3
  214. package/dist/sandbox-DrlL4yqb.js.map +1 -0
  215. package/dist/sandbox.d.ts +20 -2
  216. package/dist/sandbox.js +1 -1
  217. package/dist/{server-Dplq8g0r.js → server-C00zd6zl.js} +9 -9
  218. package/dist/{server-Dplq8g0r.js.map → server-C00zd6zl.js.map} +1 -1
  219. package/dist/server-C1UJcpUh.js +1 -0
  220. package/dist/{shared-ogqPJ0uo.js → shared-Cfi45Bvy.js} +9 -2
  221. package/dist/shared-Cfi45Bvy.js.map +1 -0
  222. package/dist/slug-IHh3f770.js +136 -0
  223. package/dist/slug-IHh3f770.js.map +1 -0
  224. package/dist/{source-NWHqn5-o.js → source-DDgr48Gn.js} +2 -2
  225. package/dist/{source-NWHqn5-o.js.map → source-DDgr48Gn.js.map} +1 -1
  226. package/dist/source-DJHmQv_j.js +1 -0
  227. package/dist/src-1dBuXzs4.js +3 -0
  228. package/dist/{src-CUpoVVb8.js → src-BKpioayC.js} +2 -2
  229. package/dist/{src-B-L8O1Ld.js → src-BNQznj4z.js} +2 -2
  230. package/dist/{src-B-L8O1Ld.js.map → src-BNQznj4z.js.map} +1 -1
  231. package/dist/src-BY1cCaoJ.js +2 -0
  232. package/dist/src-BbZYaQ8b.js +2 -0
  233. package/dist/src-CDFH2vVN.js +2 -0
  234. package/dist/src-CMW5R9Q0.js +1 -0
  235. package/dist/{src-BQXdf-Gw.js → src-CV_7DkPa.js} +47 -45
  236. package/dist/{src-BQXdf-Gw.js.map → src-CV_7DkPa.js.map} +1 -1
  237. package/dist/{src-KlDOGD0B.js → src-Cb2MWozp.js} +3 -1
  238. package/dist/{src-KlDOGD0B.js.map → src-Cb2MWozp.js.map} +1 -1
  239. package/dist/{src-B9oE_mNS.js → src-CrV2WA2i.js} +2 -2
  240. package/dist/src-CsFaawcZ.js +2 -0
  241. package/dist/{src-HTG2SoNz.js → src-DAzaCTcN.js} +2 -2
  242. package/dist/{src-HTG2SoNz.js.map → src-DAzaCTcN.js.map} +1 -1
  243. package/dist/{src-uluei5nU.js → src-DvGns8cz.js} +2 -2
  244. package/dist/{src-uluei5nU.js.map → src-DvGns8cz.js.map} +1 -1
  245. package/dist/{src-B_igzM1O.js → src-Dw79VLa3.js} +3 -1
  246. package/dist/{src-B_igzM1O.js.map → src-Dw79VLa3.js.map} +1 -1
  247. package/dist/{src-D5t4OiRt.js → src-KxS91P7L.js} +3 -1
  248. package/dist/{src-D5t4OiRt.js.map → src-KxS91P7L.js.map} +1 -1
  249. package/dist/{src-BvM0jWuZ.js → src-YvblOrBU.js} +2 -2
  250. package/dist/{src-BvM0jWuZ.js.map → src-YvblOrBU.js.map} +1 -1
  251. package/dist/src-wKwznPgt.js +2 -0
  252. package/dist/{src-BQ6BiXoc.js → src-y0nOeRRE.js} +610 -72
  253. package/dist/src-y0nOeRRE.js.map +1 -0
  254. package/dist/{state-DDCGUhva.js → state-328JpnHA.js} +17 -17
  255. package/dist/{state-DDCGUhva.js.map → state-328JpnHA.js.map} +1 -1
  256. package/dist/state-Ca55Gk_O.js +1 -0
  257. package/dist/suite-CKBa6MKt.js +2 -0
  258. package/dist/{suite-M8_7xio7.js → suite-COglUhPd.js} +70 -92
  259. package/dist/suite-COglUhPd.js.map +1 -0
  260. package/dist/summary-DDy9DfyJ.js +148 -0
  261. package/dist/summary-DDy9DfyJ.js.map +1 -0
  262. package/dist/tart-cli-C-GsbVsQ.js +1 -0
  263. package/dist/tart-cli-CU0nFS-L.js +55 -0
  264. package/dist/tart-cli-CU0nFS-L.js.map +1 -0
  265. package/dist/tart-dWoJvWHc.js +586 -0
  266. package/dist/tart-dWoJvWHc.js.map +1 -0
  267. package/dist/tart-images-DZ_Mbh-g.js +233 -0
  268. package/dist/tart-images-DZ_Mbh-g.js.map +1 -0
  269. package/dist/tart-ref-7Qv3cm3B.js +1 -0
  270. package/dist/tart-ref-DYZijjrU.js +55 -0
  271. package/dist/tart-ref-DYZijjrU.js.map +1 -0
  272. package/dist/testing.d.ts +2 -2
  273. package/dist/testing.js +4 -4
  274. package/dist/trace-Dx2NBE1O.js +311 -0
  275. package/dist/trace-Dx2NBE1O.js.map +1 -0
  276. package/dist/traits-DKnYkqeK.js +66 -0
  277. package/dist/traits-DKnYkqeK.js.map +1 -0
  278. package/dist/{transcript-Cg4SeqRX.js → transcript-CCf07UmU.js} +2 -2
  279. package/dist/{transcript-Cg4SeqRX.js.map → transcript-CCf07UmU.js.map} +1 -1
  280. package/dist/{types-C4OkYhZg.js → types-C2mLpph3.js} +3 -2
  281. package/dist/types-C2mLpph3.js.map +1 -0
  282. package/dist/{types-DGvexkcp.d.ts → types-DBwFsGem.d.ts} +352 -76
  283. package/dist/{judge-DYOF69Oe.js → vercel-CGlSBv63.js} +3 -229
  284. package/dist/vercel-CGlSBv63.js.map +1 -0
  285. package/dist/{vertex-BLQMayc1.js → vertex-Eb2wqahk.js} +2 -2
  286. package/dist/{vertex-BLQMayc1.js.map → vertex-Eb2wqahk.js.map} +1 -1
  287. package/dist/vertex-O88TCwgY.js +1 -0
  288. package/dist/view/index.d.ts +101 -58
  289. package/dist/view/index.js +9 -8
  290. package/dist/views-B0Yt_Q1S.js +2 -0
  291. package/dist/{views-BISrsIjw.js → views-BROacjBv.js} +7 -6
  292. package/dist/views-BROacjBv.js.map +1 -0
  293. package/dist/{worker-entry-DJD_nHkS.js → worker-entry-Smb4bNDc.js} +11 -8
  294. package/dist/{worker-entry-DJD_nHkS.js.map → worker-entry-Smb4bNDc.js.map} +1 -1
  295. package/dist/workspace-C0dDP75l.js +1 -0
  296. package/dist/{workspace-BO1VhUR9.js → workspace-DNDTEk8v.js} +6 -6
  297. package/dist/{workspace-BO1VhUR9.js.map → workspace-DNDTEk8v.js.map} +1 -1
  298. package/package.json +24 -11
  299. package/skills/eval-rubric/SKILL.md +15 -7
  300. package/dist/adapter-CptK032x.js.map +0 -1
  301. package/dist/app-files-sgqwfjtn.js.map +0 -1
  302. package/dist/assemble-CxBHkavM.js +0 -1
  303. package/dist/assemble-Me7Whp-y.js.map +0 -1
  304. package/dist/capture-C3RmjPph.js.map +0 -1
  305. package/dist/capture-YPwxp_iK.js +0 -1
  306. package/dist/cli-BBOlXKPG.js.map +0 -1
  307. package/dist/cli-spec-DZ0bnP0_.js.map +0 -1
  308. package/dist/client-tZ2WBDxf.js.map +0 -1
  309. package/dist/command-CFQ9c1hk.js.map +0 -1
  310. package/dist/command-fO0BFsTq.js.map +0 -1
  311. package/dist/command-qGS802uX.js.map +0 -1
  312. package/dist/commands-CC60TOT5.js.map +0 -1
  313. package/dist/config-C2UtS9vy.js.map +0 -1
  314. package/dist/context-BajfiH0S.js.map +0 -1
  315. package/dist/contrasts-BjOg7wyr.js +0 -101
  316. package/dist/contrasts-BjOg7wyr.js.map +0 -1
  317. package/dist/cost-BJU0MAji.js +0 -1
  318. package/dist/db-C5SZ0510.js.map +0 -1
  319. package/dist/db-puzLzX4k.js +0 -2
  320. package/dist/debug-BnXV7JbX.js +0 -1
  321. package/dist/dist-ByYk_wAs.js.map +0 -1
  322. package/dist/docker-Dto8ROCq.js.map +0 -1
  323. package/dist/doctor-BcvfKpBX.js.map +0 -1
  324. package/dist/environment-CC1RV21n.js.map +0 -1
  325. package/dist/evaluate-NTNJ8T9H.js.map +0 -1
  326. package/dist/files-COW5JBJM.js +0 -1
  327. package/dist/files-DFtuRQJx.js +0 -1
  328. package/dist/files-oOYNR7ZH.js +0 -1
  329. package/dist/files-p-uTdOjA.js.map +0 -1
  330. package/dist/gate-Cp_pQoEe.js.map +0 -1
  331. package/dist/harness-DYSC4zMh.js.map +0 -1
  332. package/dist/ids-DuK6xl4w.js.map +0 -1
  333. package/dist/images-CNayXCp2.js.map +0 -1
  334. package/dist/init-8o6W3_fn.js +0 -1
  335. package/dist/init-D5HtmyMI.js.map +0 -1
  336. package/dist/ink-list-Ca-5dunO.js.map +0 -1
  337. package/dist/judge-DYOF69Oe.js.map +0 -1
  338. package/dist/list-CM_YSJXq.js +0 -374
  339. package/dist/list-CM_YSJXq.js.map +0 -1
  340. package/dist/live-DQc8jr6o.js +0 -1
  341. package/dist/model-Ce9l9_rF.js.map +0 -1
  342. package/dist/model-Cxzo4cjw.js +0 -1
  343. package/dist/node-DhIRSrrK.js.map +0 -1
  344. package/dist/opencode-providers-Co7plCea.js.map +0 -1
  345. package/dist/plan-DqnzfDH1.js.map +0 -1
  346. package/dist/plugins-B2KQ0y3P.js.map +0 -1
  347. package/dist/preflight-DyzmvK7i.js.map +0 -1
  348. package/dist/provenance-iRxjp4Pu.js.map +0 -1
  349. package/dist/provider-DCdTHQpk.js +0 -1
  350. package/dist/providers-D0ob_tra.js +0 -1
  351. package/dist/providers-vXMXuwn-.js.map +0 -1
  352. package/dist/query-CvgUsvep.js +0 -1
  353. package/dist/record-DhzwkSXc.js.map +0 -1
  354. package/dist/remarks-CauU408t.js.map +0 -1
  355. package/dist/remarks-NMgPd30U.js.map +0 -1
  356. package/dist/resolve-B1zMnPwK.js.map +0 -1
  357. package/dist/resolve-BIIeVT12.js +0 -1
  358. package/dist/resume-Dkhrpjow.js.map +0 -1
  359. package/dist/runtime-DcvQcr36.js.map +0 -1
  360. package/dist/sandbox-8zCrtuCf.js.map +0 -1
  361. package/dist/server-0tuj8VSa.js +0 -1
  362. package/dist/shared-ogqPJ0uo.js.map +0 -1
  363. package/dist/source-llwLewOU.js +0 -1
  364. package/dist/src-BQ6BiXoc.js.map +0 -1
  365. package/dist/src-BXnv0ViU.js +0 -2
  366. package/dist/src-BiS8YNN_.js +0 -3
  367. package/dist/src-BkH4GOxu.js +0 -1
  368. package/dist/src-C-tH5ebd.js +0 -2
  369. package/dist/src-Cg1bFs9g.js +0 -2
  370. package/dist/src-DV_UorZv.js +0 -2
  371. package/dist/src-XxUpr2sa.js +0 -2
  372. package/dist/state-DZbAO95a.js +0 -1
  373. package/dist/suite-M8_7xio7.js.map +0 -1
  374. package/dist/suite-u2KJnGpY.js +0 -2
  375. package/dist/summary-Uzc9osfV.js.map +0 -1
  376. package/dist/types-C4OkYhZg.js.map +0 -1
  377. package/dist/vertex-h_peaZTN.js +0 -1
  378. package/dist/views-BISrsIjw.js.map +0 -1
  379. package/dist/views-Bfab8fM9.js +0 -2
  380. package/dist/workspace-B8EOCuxl.js +0 -1
@@ -803,8 +803,8 @@ const HARNESS_PACKAGES = {
803
803
  },
804
804
  "claude-code": {
805
805
  name: "@ai-sdk/harness-claude-code",
806
- version: "1.0.171",
807
- patch: "8cc1b324"
806
+ version: "1.0.176",
807
+ patch: "8c0f3055"
808
808
  },
809
809
  antigravity: {
810
810
  name: "@reeval/harness-antigravity",
@@ -812,11 +812,11 @@ const HARNESS_PACKAGES = {
812
812
  },
813
813
  opencode: {
814
814
  name: "@reeval/harness-opencode",
815
- version: "0.2.13"
815
+ version: "0.2.16"
816
816
  },
817
817
  goose: {
818
818
  name: "@reeval/harness-goose",
819
- version: "0.1.10"
819
+ version: "0.1.12"
820
820
  },
821
821
  pi: {
822
822
  name: "@reeval/harness-pi",
@@ -828,11 +828,11 @@ const HARNESS_PACKAGES = {
828
828
  },
829
829
  fx: {
830
830
  name: "@reeval/harness-fx",
831
- version: "0.1.5"
831
+ version: "0.1.7"
832
832
  },
833
833
  "grok-build": {
834
834
  name: "@reeval/harness-grok-build",
835
- version: "0.1.8"
835
+ version: "0.1.10"
836
836
  }
837
837
  };
838
838
  /** Every harness with an image, in {@link HARNESS_PACKAGES} order. */
@@ -3113,8 +3113,129 @@ function createEgressProxy(options) {
3113
3113
  }
3114
3114
  };
3115
3115
  }
3116
+ // ../sandbox-docker/src/egress/transport.ts
3117
+ /** Runs `command` in the sandbox to its end. */
3118
+ async function execRun(transport, command, options) {
3119
+ if (transport.run) return transport.run(command, options);
3120
+ const [bin = "", ...args] = transport.argv(command);
3121
+ const startedAt = Date.now();
3122
+ try {
3123
+ const r = await run(bin, args, {
3124
+ ...options,
3125
+ env: transport.env,
3126
+ binary: true
3127
+ });
3128
+ transport.trace?.([bin, ...args], startedAt, {
3129
+ ...r,
3130
+ stdin: options.input.length
3131
+ });
3132
+ return r;
3133
+ } catch (error) {
3134
+ transport.trace?.([bin, ...args], startedAt, { error });
3135
+ throw error;
3136
+ }
3137
+ }
3138
+ /** Starts `command` in the sandbox and leaves it running, its stdio piped. */
3139
+ function execSpawn(transport, command) {
3140
+ const argv = transport.argv(command);
3141
+ const [bin = "", ...args] = argv;
3142
+ const startedAt = Date.now();
3143
+ const child = spawn(bin, args, {
3144
+ stdio: "pipe",
3145
+ detached: true,
3146
+ env: {
3147
+ ...process.env,
3148
+ ...transport.env
3149
+ }
3150
+ });
3151
+ let stderr = "";
3152
+ child.stderr.on("data", (d) => {
3153
+ stderr += d;
3154
+ });
3155
+ child.once("close", (code) => transport.trace?.(argv, startedAt, {
3156
+ exitCode: code,
3157
+ stderr
3158
+ }));
3159
+ return child;
3160
+ }
3161
+ /**
3162
+ * The host argv that runs `remote`, one shell command line, on `target`. ssh joins its remote
3163
+ * arguments into one line for the login shell, so the caller quotes it. No user config applies.
3164
+ */
3165
+ function sshArgv(target, remote) {
3166
+ const shared = target.controlPath && process.platform !== "win32" ? [
3167
+ "-o",
3168
+ "ControlMaster=auto",
3169
+ "-o",
3170
+ `ControlPath=${target.controlPath}`,
3171
+ "-o",
3172
+ "ControlPersist=300"
3173
+ ] : [];
3174
+ return [
3175
+ "ssh",
3176
+ "-T",
3177
+ "-F",
3178
+ "none",
3179
+ "-i",
3180
+ target.identityFile,
3181
+ "-p",
3182
+ String(target.port),
3183
+ "-o",
3184
+ "BatchMode=yes",
3185
+ "-o",
3186
+ "IdentitiesOnly=yes",
3187
+ "-o",
3188
+ "StrictHostKeyChecking=yes",
3189
+ "-o",
3190
+ `UserKnownHostsFile=${target.knownHostsFile}`,
3191
+ "-o",
3192
+ "GlobalKnownHostsFile=none",
3193
+ "-o",
3194
+ `HostKeyAlias=${target.hostKeyAlias}`,
3195
+ "-o",
3196
+ "ConnectTimeout=20",
3197
+ "-o",
3198
+ "ServerAliveInterval=15",
3199
+ "-o",
3200
+ "ServerAliveCountMax=4",
3201
+ "-o",
3202
+ "LogLevel=ERROR",
3203
+ ...shared,
3204
+ `${target.user}@${target.host}`,
3205
+ remote
3206
+ ];
3207
+ }
3208
+ /** `ssh -T` into a VM, as root through `sudo -n`, with sudo's own `secure_path`. */
3209
+ function sshTransport(target) {
3210
+ return {
3211
+ argv: (command) => sshArgv(target, `sudo -n -- ${command.map(shellQuote).join(" ")}`),
3212
+ trace: (argv, startedAt, end) => traceDocker(argv.slice(1), startedAt, end, "ssh")
3213
+ };
3214
+ }
3215
+ /** `docker exec` (or `podman exec`) into a running container, as root. */
3216
+ function containerTransport(containerId, engine) {
3217
+ const { bin } = engineSpec(engine);
3218
+ const exec = (command) => [
3219
+ "exec",
3220
+ "--interactive",
3221
+ "--user",
3222
+ "0:0",
3223
+ containerId,
3224
+ ...command
3225
+ ];
3226
+ return {
3227
+ argv: (command) => [bin, ...exec(command)],
3228
+ env: engineEnv(engine),
3229
+ run: (command, { input, signal }) => docker(exec(command), {
3230
+ input,
3231
+ signal,
3232
+ engine
3233
+ }),
3234
+ trace: (argv, startedAt, end) => traceDocker(argv.slice(1), startedAt, end, bin)
3235
+ };
3236
+ }
3116
3237
  // ../sandbox-docker/src/egress/gateway.ts
3117
- /** Where the forwarder listens inside the container; every exec gets it as its HTTP(S) proxy. */
3238
+ /** Where the forwarder listens inside the sandbox; every exec gets it as its HTTP(S) proxy. */
3118
3239
  const PROXY_PORT = 43128;
3119
3240
  /** The gateway's CA certificate in the container. The private key never leaves the host. */
3120
3241
  const CA_PATH = "/usr/local/share/ca-certificates/reeval-egress.crt";
@@ -3123,59 +3244,69 @@ const CA_BUNDLE = "/etc/ssl/certs/ca-certificates.crt";
3123
3244
  const BUNDLED = "reeval:ca-bundle";
3124
3245
  const READY_TIMEOUT_MS = 15e3;
3125
3246
  /**
3126
- * The gateway's side of the container runs as root, whoever the sandbox runs as: the sandbox user
3127
- * can't signal, trace or replace the forwarder, or change the CA it installed.
3247
+ * Where a forwarder a transport could orphan records its pid, one file per gateway: `ps` can't
3248
+ * find it by its command line, which Linux cuts short of a long script.
3249
+ */
3250
+ const PID_FILE = "/tmp/reeval-egress-forwarder";
3251
+ /** How long `close()` waits for the sandbox to stop a forwarder a transport could orphan. */
3252
+ const CLOSE_TIMEOUT_MS = 1e4;
3253
+ /** Runs the forwarder; under a transport that orphans it, as the shell that wrote its pid file. */
3254
+ function forwarderCommand(transport, tag) {
3255
+ const node = [
3256
+ "node",
3257
+ "-e",
3258
+ forwarderScript(PROXY_PORT)
3259
+ ];
3260
+ if (!transport.orphans) return node;
3261
+ return [
3262
+ "sh",
3263
+ "-c",
3264
+ `echo $$ > ${PID_FILE}-${tag}.pid && exec "$@"`,
3265
+ "sh",
3266
+ ...node
3267
+ ];
3268
+ }
3269
+ /**
3270
+ * Kills the forwarders whose pid files match `glob`, and removes the files. A pid is killed only
3271
+ * while it's still a `node -e`: a forwarder that exited on its own leaves its file, and its pid
3272
+ * may since be another process's.
3128
3273
  */
3129
- const AS_ROOT = ["--user", "0:0"];
3130
- const installCa = (containerId, cert, signal, engine) => docker([
3131
- "exec",
3132
- "--interactive",
3133
- ...AS_ROOT,
3134
- containerId,
3274
+ const killForwarders = (transport, glob, signal) => execRun(transport, [
3275
+ "sh",
3276
+ "-c",
3277
+ `for f in ${PID_FILE}-${glob}.pid; do [ -f "$f" ] || continue; p=$(cat "$f"); rm -f "$f"
3278
+ case $p in ''|0|1|*[!0-9]*) continue ;; esac
3279
+ case $(ps -p "$p" -o command= 2>/dev/null) in *'node -e'*) kill -9 "$p" 2>/dev/null ;; esac
3280
+ done; true`
3281
+ ], {
3282
+ input: "",
3283
+ signal
3284
+ }).then(() => {}, () => {});
3285
+ const installCa = (transport, cert, signal) => execRun(transport, [
3135
3286
  "sh",
3136
3287
  "-c",
3137
3288
  `umask 022 && mkdir -p "$(dirname ${CA_PATH})" && cat > ${CA_PATH} && { command -v update-ca-certificates >/dev/null && update-ca-certificates >/dev/null 2>&1 && grep -q "$(sed -n 2p ${CA_PATH})" ${CA_BUNDLE} && echo ${BUNDLED}; true; }`
3138
3289
  ], {
3139
3290
  input: cert,
3140
- signal,
3141
- engine
3291
+ signal
3142
3292
  });
3143
3293
  /**
3144
- * Starts the egress gateway for one container: a forwarder inside it, tunneled over one
3145
- * `docker exec -i`, and the proxy in this process, which holds the real credentials.
3294
+ * Starts the egress gateway for one sandbox: a forwarder inside it, tunneled over one process
3295
+ * `transport` starts there, and the proxy in this process, which holds the real credentials.
3146
3296
  */
3147
- async function startGateway(containerId, options, signal, engine) {
3297
+ async function startGateway(transport, options, signal) {
3148
3298
  const ca = createCertificateAuthority();
3149
- const installed = await installCa(containerId, ca.cert, signal, engine);
3299
+ const installed = await installCa(transport, ca.cert, signal);
3150
3300
  if (installed.exitCode !== 0) throw new Error(`couldn't install the gateway CA: ${installed.stderr.trim()}`);
3151
3301
  const bundled = installed.stdout.toString("utf8").includes(BUNDLED);
3302
+ if (transport.orphans) await killForwarders(transport, "*", signal);
3303
+ signal?.throwIfAborted();
3304
+ const tag = randomBytes(6).toString("hex");
3152
3305
  const proxy = createEgressProxy({
3153
3306
  ...options,
3154
3307
  ca
3155
3308
  });
3156
- const args = [
3157
- "exec",
3158
- "--interactive",
3159
- ...AS_ROOT,
3160
- containerId,
3161
- "node",
3162
- "-e",
3163
- forwarderScript(PROXY_PORT)
3164
- ];
3165
- const startedAt = Date.now();
3166
- const { bin } = engineSpec(engine);
3167
- const child = spawn(bin, args, {
3168
- stdio: "pipe",
3169
- detached: true,
3170
- env: {
3171
- ...process.env,
3172
- ...engineEnv(engine)
3173
- }
3174
- });
3175
- child.once("close", (code) => traceDocker(args, startedAt, {
3176
- exitCode: code,
3177
- stderr
3178
- }, bin));
3309
+ const child = execSpawn(transport, forwarderCommand(transport, tag));
3179
3310
  let stderr = "";
3180
3311
  child.stderr.on("data", (d) => {
3181
3312
  stderr += d;
@@ -3213,7 +3344,7 @@ async function startGateway(containerId, options, signal, engine) {
3213
3344
  const listeners = /* @__PURE__ */ new Map();
3214
3345
  const tunnels = /* @__PURE__ */ new Set();
3215
3346
  let stopped;
3216
- /** Stops on its own: nothing reaches the container any more, so connections are refused. */
3347
+ /** Stops on its own: nothing reaches the sandbox any more, so connections are refused. */
3217
3348
  const stop = (reason) => {
3218
3349
  const asked = closed;
3219
3350
  closed = true;
@@ -3228,17 +3359,21 @@ async function startGateway(containerId, options, signal, engine) {
3228
3359
  const timer = setTimeout(() => ready.reject(/* @__PURE__ */ new Error(`the forwarder didn't start within ${READY_TIMEOUT_MS / 1e3}s`)), READY_TIMEOUT_MS);
3229
3360
  const onAbort = () => ready.reject(signal?.reason);
3230
3361
  signal?.addEventListener("abort", onAbort, { once: true });
3362
+ let teardown;
3231
3363
  const close = () => {
3364
+ if (teardown) return teardown;
3232
3365
  closed = true;
3233
3366
  child.kill("SIGKILL");
3234
3367
  mux.destroy();
3235
3368
  proxy.close();
3236
3369
  for (const l of listeners.values()) l.then((s) => s.close());
3370
+ teardown = transport.orphans ? killForwarders(transport, tag, AbortSignal.timeout(CLOSE_TIMEOUT_MS)) : Promise.resolve();
3371
+ return teardown;
3237
3372
  };
3238
3373
  try {
3239
3374
  await ready.promise;
3240
3375
  } catch (error) {
3241
- close();
3376
+ await close();
3242
3377
  throw error;
3243
3378
  } finally {
3244
3379
  clearTimeout(timer);
@@ -3415,16 +3550,82 @@ var EgressUnavailableError = class extends Error {
3415
3550
  }
3416
3551
  };
3417
3552
  /** Root's PATH in a privileged exec: none of the sandbox user's own `bin` directories. */
3418
- const SYSTEM_PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
3553
+ const SYSTEM_PATH$1 = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
3419
3554
  /** Set on every exec, so a kill can find the command's whole process tree in the container. */
3420
- const EXEC_MARKER = "REEVAL_EXEC_ID";
3555
+ const EXEC_MARKER$1 = "REEVAL_EXEC_ID";
3421
3556
  /**
3422
3557
  * Every exec that can create a file starts with this. An exec'd process inherits the umask of the
3423
3558
  * engine's shim, not the container's: since Docker 29.6 that's 0000 wherever dockerd starts
3424
3559
  * containerd itself (Docker-in-Docker, rootless, OrbStack), which makes homes, the workspace and
3425
3560
  * everything an agent writes world-writable, and tools such as fx and OpenSSH refuse them.
3426
3561
  */
3427
- const EXEC_UMASK = "umask 022";
3562
+ const EXEC_UMASK$1 = "umask 022";
3563
+ /** The exit code of the path scripts below when the path doesn't exist. */
3564
+ const MISSING = 3;
3565
+ /**
3566
+ * POSIX `sh` and `stat -L -c` (coreutils and BusyBox both have it), for any image an eval brings;
3567
+ * macOS's BSD `stat` takes `-f %z` instead.
3568
+ */
3569
+ const STAT = `[ -e "$1" ] || exit ${MISSING}
3570
+ if [ -d "$1" ]; then t=directory; elif [ -f "$1" ]; then t=file; else t=other; fi
3571
+ s=$(stat -L -c %s -- "$1" 2>/dev/null || stat -L -f %z -- "$1") || exit 1
3572
+ printf '%s %s' "$t" "$s"`;
3573
+ /**
3574
+ * One `<type>\\t<name>` per entry, NUL-separated, since a name can hold a newline. An unreadable
3575
+ * directory's glob matches nothing, so it's refused rather than listed as empty.
3576
+ */
3577
+ const LIST = `[ -e "$1" ] || exit ${MISSING}
3578
+ [ -d "$1" ] || { echo "not a directory" >&2; exit 1; }
3579
+ ls -a -- "$1" > /dev/null || exit 1
3580
+ for f in "$1"/* "$1"/.*; do
3581
+ n=\${f##*/}
3582
+ [ "$n" = . ] || [ "$n" = .. ] && continue
3583
+ [ -e "$f" ] || [ -L "$f" ] || continue
3584
+ if [ -L "$f" ]; then t=symlink; elif [ -d "$f" ]; then t=directory; elif [ -f "$f" ]; then t=file; else t=other; fi
3585
+ printf '%s\\t%s\\0' "$t" "$n"
3586
+ done`;
3587
+ const DELETE = `[ -e "$1" ] || [ -L "$1" ] || exit ${MISSING}
3588
+ [ -d "$1" ] && [ ! -L "$1" ] && { echo "is a directory" >&2; exit 1; }
3589
+ rm -f -- "$1"`;
3590
+ /**
3591
+ * A session's `stat`, `listDirectory` and `deleteFile` from one way to run the path scripts: each
3592
+ * gets `null` when the script exits {@link MISSING} (no such path), and any other failure rejects
3593
+ * with its stderr. A relative path is under `root`.
3594
+ */
3595
+ function pathOperations(exec, root = SANDBOX_ROOT) {
3596
+ const onPath = async (script, o) => {
3597
+ const path = posix.resolve(root, o.path);
3598
+ const r = await exec(script, path, o.abortSignal);
3599
+ if (r.exitCode === MISSING) return null;
3600
+ if (r.exitCode !== 0) throw new Error(`${path}: ${r.stderr.trim() || `exit ${r.exitCode}`}`);
3601
+ return r.stdout;
3602
+ };
3603
+ return {
3604
+ async stat(o) {
3605
+ const out = await onPath(STAT, o);
3606
+ if (out === null) return null;
3607
+ const [type, size] = out.trim().split(" ");
3608
+ return {
3609
+ type,
3610
+ size: Number(size)
3611
+ };
3612
+ },
3613
+ async listDirectory(o) {
3614
+ const out = await onPath(LIST, o);
3615
+ if (out === null) return null;
3616
+ return out.split("\0").filter(Boolean).map((line) => {
3617
+ const tab = line.indexOf(" ");
3618
+ return {
3619
+ type: line.slice(0, tab),
3620
+ name: line.slice(tab + 1)
3621
+ };
3622
+ });
3623
+ },
3624
+ async deleteFile(o) {
3625
+ return await onPath(DELETE, o) !== null;
3626
+ }
3627
+ };
3628
+ }
3428
3629
  /**
3429
3630
  * The container's cgroup counts every process the kernel killed at its memory limit: cgroup v2's
3430
3631
  * `memory.events` and v1's `memory.oom_control` both have an `oom_kill` line. Without either,
@@ -3535,7 +3736,7 @@ async function createDockerSession(options) {
3535
3736
  "/bin/sh",
3536
3737
  "-c",
3537
3738
  [
3538
- EXEC_UMASK,
3739
+ EXEC_UMASK$1,
3539
3740
  ...options.root ? [] : [`{ id -u ${SANDBOX_USER} >/dev/null 2>&1 || { echo ${NO_USER}; exit 1; }; }`],
3540
3741
  ...spec.createsWorkdir ? [] : [`mkdir -p ${SANDBOX_ROOT}`],
3541
3742
  `mkdir -p ${SANDBOX_STATE} && chown 0:0 ${SANDBOX_STATE} && chmod 700 ${SANDBOX_STATE}`
@@ -3584,10 +3785,10 @@ async function createDockerSession(options) {
3584
3785
  const { policy = { mode: "allow-all" }, direct: _, ...rest } = egressOptions;
3585
3786
  try {
3586
3787
  await attach(policy);
3587
- gateway = await startGateway(id, {
3788
+ gateway = await startGateway(containerTransport(id, engine), {
3588
3789
  ...rest,
3589
3790
  policy
3590
- }, signal, engine);
3791
+ }, signal);
3591
3792
  egress = { active: true };
3592
3793
  } catch (error) {
3593
3794
  if (signal?.aborted || !direct(policy)) {
@@ -3614,12 +3815,12 @@ async function createDockerSession(options) {
3614
3815
  "--workdir",
3615
3816
  cwd ? posix.resolve(SANDBOX_ROOT, cwd) : SANDBOX_ROOT,
3616
3817
  "--env",
3617
- `${EXEC_MARKER}=${marker}`,
3818
+ `${EXEC_MARKER$1}=${marker}`,
3618
3819
  ...Object.keys(env ?? {}).flatMap((k) => ["--env", k]),
3619
3820
  id,
3620
3821
  "bash",
3621
3822
  "-c",
3622
- `${EXEC_UMASK}; ${command}`
3823
+ `${EXEC_UMASK$1}; ${command}`
3623
3824
  ];
3624
3825
  const nextMarker = () => `${id.slice(0, 12)}-${++execs}`;
3625
3826
  /**
@@ -3632,12 +3833,12 @@ async function createDockerSession(options) {
3632
3833
  "--user",
3633
3834
  "0:0",
3634
3835
  "--env",
3635
- `PATH=${SYSTEM_PATH}`
3836
+ `PATH=${SYSTEM_PATH$1}`
3636
3837
  ] : user,
3637
3838
  id,
3638
3839
  "/bin/sh",
3639
3840
  "-c",
3640
- `for e in /proc/[0-9]*/environ; do grep -qsxzF ${shellQuote(`${EXEC_MARKER}=${marker}`)} "$e" && kill -9 "$(basename "$(dirname "$e")")" 2>/dev/null; done; true`
3841
+ `for e in /proc/[0-9]*/environ; do grep -qsxzF ${shellQuote(`${EXEC_MARKER$1}=${marker}`)} "$e" && kill -9 "$(basename "$(dirname "$e")")" 2>/dev/null; done; true`
3641
3842
  ], { engine }).then(() => {}, () => {});
3642
3843
  const run = async (o) => {
3643
3844
  const env = envFor(o.env);
@@ -3667,13 +3868,13 @@ async function createDockerSession(options) {
3667
3868
  "--workdir",
3668
3869
  SANDBOX_STATE,
3669
3870
  "--env",
3670
- `${EXEC_MARKER}=${marker}`,
3871
+ `${EXEC_MARKER$1}=${marker}`,
3671
3872
  "--env",
3672
- `PATH=${SYSTEM_PATH}`,
3873
+ `PATH=${SYSTEM_PATH$1}`,
3673
3874
  id,
3674
3875
  "/bin/sh",
3675
3876
  "-c",
3676
- `${EXEC_UMASK}; ${o.command}`
3877
+ `${EXEC_UMASK$1}; ${o.command}`
3677
3878
  ];
3678
3879
  try {
3679
3880
  const r = await docker(args, {
@@ -3704,9 +3905,29 @@ async function createDockerSession(options) {
3704
3905
  });
3705
3906
  return r.exitCode === 0 ? new Uint8Array(r.stdout) : null;
3706
3907
  };
3908
+ const paths = pathOperations(async (script, path, abortSignal) => {
3909
+ const r = await docker([
3910
+ "exec",
3911
+ ...user,
3912
+ id,
3913
+ "sh",
3914
+ "-c",
3915
+ script,
3916
+ "sh",
3917
+ path
3918
+ ], {
3919
+ signal: abortSignal,
3920
+ engine
3921
+ });
3922
+ return {
3923
+ exitCode: r.exitCode,
3924
+ stdout: r.stdout.toString("utf8"),
3925
+ stderr: r.stderr
3926
+ };
3927
+ });
3707
3928
  const writeBinaryFile = async (o) => {
3708
3929
  const path = posix.resolve(SANDBOX_ROOT, o.path);
3709
- const make = `${EXEC_UMASK} && mkdir -p ${shellQuote(posix.dirname(path))}`;
3930
+ const make = `${EXEC_UMASK$1} && mkdir -p ${shellQuote(posix.dirname(path))}`;
3710
3931
  if (o.content.byteLength === 0) {
3711
3932
  await dockerOk([
3712
3933
  "exec",
@@ -3821,6 +4042,7 @@ async function createDockerSession(options) {
3821
4042
  if (o.startLine === void 0 && o.endLine === void 0) return text;
3822
4043
  return text.split("\n").slice((o.startLine ?? 1) - 1, o.endLine).join("\n");
3823
4044
  },
4045
+ ...paths,
3824
4046
  writeBinaryFile,
3825
4047
  writeTextFile: (o) => writeBinaryFile({
3826
4048
  ...o,
@@ -3857,7 +4079,7 @@ async function createDockerSession(options) {
3857
4079
  destroy: remove,
3858
4080
  restricted: () => {
3859
4081
  const { description, readFile, readBinaryFile, readTextFile, writeFile } = session;
3860
- const { writeBinaryFile, writeTextFile, spawn, run } = session;
4082
+ const { writeBinaryFile, writeTextFile, stat, listDirectory, deleteFile, spawn, run } = session;
3861
4083
  return {
3862
4084
  description,
3863
4085
  readFile,
@@ -3866,6 +4088,9 @@ async function createDockerSession(options) {
3866
4088
  writeFile,
3867
4089
  writeBinaryFile,
3868
4090
  writeTextFile,
4091
+ stat,
4092
+ listDirectory,
4093
+ deleteFile,
3869
4094
  spawn,
3870
4095
  run
3871
4096
  };
@@ -3920,22 +4145,22 @@ const BOOTSTRAPS = {
3920
4145
  name: "Cursor",
3921
4146
  cli: "@cursor/sdk",
3922
4147
  version: `node -p "'@cursor/sdk ' + require(process.env.HOME + '/.ai-sdk-harness/.harness-bootstrap/cursor-sdk/node_modules/@cursor/sdk/package.json').version"`,
3923
- adapter: async () => (await import("./src-BXnv0ViU.js")).createCursorSdk()
4148
+ adapter: async () => (await import("./src-CsFaawcZ.js")).createCursorSdk()
3924
4149
  },
3925
4150
  "claude-code": {
3926
4151
  name: "Claude Code",
3927
4152
  cli: "claude",
3928
- adapter: async () => (await import("./dist-ByYk_wAs.js")).createClaudeCode()
4153
+ adapter: async () => (await import("./dist-Db7ifchA.js")).createClaudeCode()
3929
4154
  },
3930
4155
  antigravity: {
3931
4156
  name: "Antigravity",
3932
4157
  cli: "agy",
3933
- adapter: async () => (await import("./src-XxUpr2sa.js")).createAntigravity()
4158
+ adapter: async () => (await import("./src-BbZYaQ8b.js")).createAntigravity()
3934
4159
  },
3935
4160
  opencode: {
3936
4161
  name: "OpenCode",
3937
4162
  cli: "opencode",
3938
- adapter: async () => (await import("./src-BiS8YNN_.js")).createOpenCode({
4163
+ adapter: async () => (await import("./src-1dBuXzs4.js")).createOpenCode({
3939
4164
  auth: { GOOGLE_GENERATIVE_AI_API_KEY: "unused" },
3940
4165
  model: "google/unused"
3941
4166
  })
@@ -3943,7 +4168,7 @@ const BOOTSTRAPS = {
3943
4168
  goose: {
3944
4169
  name: "Goose",
3945
4170
  cli: "goose",
3946
- adapter: async () => (await import("./src-C-tH5ebd.js")).createGoose({
4171
+ adapter: async () => (await import("./src-BY1cCaoJ.js")).createGoose({
3947
4172
  auth: { GOOGLE_API_KEY: "unused" },
3948
4173
  model: "unused"
3949
4174
  })
@@ -3951,17 +4176,17 @@ const BOOTSTRAPS = {
3951
4176
  pi: {
3952
4177
  name: "pi",
3953
4178
  cli: "pi",
3954
- adapter: async () => (await import("./src-B9oE_mNS.js")).createPi({ auth: { GEMINI_API_KEY: "unused" } })
4179
+ adapter: async () => (await import("./src-CrV2WA2i.js")).createPi({ auth: { GEMINI_API_KEY: "unused" } })
3955
4180
  },
3956
4181
  codex: {
3957
4182
  name: "Codex",
3958
4183
  cli: "codex",
3959
- adapter: async () => (await import("./src-Cg1bFs9g.js")).createCodex({ auth: { OPENAI_API_KEY: "unused" } })
4184
+ adapter: async () => (await import("./src-CDFH2vVN.js")).createCodex({ auth: { OPENAI_API_KEY: "unused" } })
3960
4185
  },
3961
4186
  fx: {
3962
4187
  name: "fx",
3963
4188
  cli: "fx",
3964
- adapter: async () => (await import("./src-DV_UorZv.js")).createFx({
4189
+ adapter: async () => (await import("./src-wKwznPgt.js")).createFx({
3965
4190
  auth: { AI_GATEWAY_API_KEY: "unused" },
3966
4191
  model: "unused/unused"
3967
4192
  })
@@ -3969,7 +4194,7 @@ const BOOTSTRAPS = {
3969
4194
  "grok-build": {
3970
4195
  name: "Grok Build",
3971
4196
  cli: "grok",
3972
- adapter: async () => (await import("./src-CUpoVVb8.js")).createGrokBuild({
4197
+ adapter: async () => (await import("./src-BKpioayC.js")).createGrokBuild({
3973
4198
  auth: { XAI_API_KEY: "unused" },
3974
4199
  model: "unused"
3975
4200
  })
@@ -4561,6 +4786,319 @@ async function buildDockerfile(dockerfile, options) {
4561
4786
  * and logs when it answers `initialize` (see its header). It runs in any sandbox with `node`.
4562
4787
  */
4563
4788
  const MCP_TIMER = fileURLToPath(ownFileURL("bin/mcp-timer.cjs"));
4564
- export { isBakedHarness as $, placeholder as A, BASE_IMAGE as B, EgressUnavailableError as C, dockerSeccompFile as Ct, dockerSandboxProvider as D, createDockerSession as E, HARNESS_HOSTS as F, SANDBOX_HOME as G, DEFAULT_IMAGE as H, PACKAGE_HOSTS as I, SANDBOX_USER as J, SANDBOX_ROOT as K, defaultAllowedHosts as L, matches as M, onEndpoint as N, CA_PATH as O, DOCKER_EGRESS as P, imageFor as Q, hostAllowed as R, DEFAULT_LIMITS as S, ENGINES as St, ROOT_CAPABILITIES as T, normalizeImageId as Tt, HARNESS_PACKAGES as U, BRIDGE_PORT as V, LABEL as W, adapterVersion as X, WORKSPACE_DIR as Y, harnessLabel as Z, pluginLayerTag as _, causeLine as _t, bakedAdapter as a, dockerOk as at, sourceTreeHash as b, parseBuildOutput as bt, buildInstallLayer as c, imageTags as ct, dockerfileTag as d, OPAQUE_OUTPUT as dt, contextFiles as et, harnessImageFor as f, onDockerCommand as ft, pluginBuildKey as g, RETRY_DELAYS as gt, pluginBuildDir as h, ImageBuildError as ht, REEVAL_BASE_ARG as i, dockerCapacity as it, applyTransformations as j, PROXY_PORT as k, buildPluginLayer as l, isRegistryDigest as lt, installScript as m, shellQuote as mt, DOCKER_CONTEXT as n, docker as nt, buildDockerfile as o, dockerState as ot, installLayerTag as p, run as pt, SANDBOX_STATE as q, PLUGIN_BUILDS_DIR as r, dockerAvailable as rt, buildImage as s, imageInfo as st, MCP_TIMER as t, dockerignoreMatcher as tt, contextHash as u, removeContainerDetached as ut, pruneImages as v, failureCause as vt, PRIVILEGED_CAPABILITIES as w, engineSpec as wt, usesReevalBase as x, retryTransient as xt, resolveFrom as y, isTransient as yt, BAKED_HARNESSES as z };
4789
+ // ../sandbox-docker/src/ssh-session.ts
4790
+ const SYSTEM_PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
4791
+ const EXEC_MARKER = "REEVAL_EXEC_ID";
4792
+ const EXEC_UMASK = "umask 022";
4793
+ /** ssh's own exit status: it couldn't connect, or the connection dropped. */
4794
+ const SSH_FAILED = 255;
4795
+ /** `NAME=value\0` for each variable, as the remote reader takes them on stdin. */
4796
+ const envStream = (env) => Object.entries(env).map(([k, v]) => `${k}=${v}\0`).join("");
4797
+ /**
4798
+ * Runs `$2` with bash in `$1` as the sandbox user, after exporting the variables stdin carries.
4799
+ * The command itself gets no stdin, as a `docker exec` without `--interactive` would.
4800
+ */
4801
+ const READER = `${EXEC_UMASK}; while IFS= read -r -d "" kv; do export "$kv"; done; cd -- "$1" || exit 1; exec bash -c "$2" </dev/null`;
4802
+ /**
4803
+ * A harness sandbox session on a Linux VM reached over SSH: the login user has passwordless `sudo`,
4804
+ * and the agent, setup steps and checks run as {@link SANDBOX_USER}, a user made here with no
4805
+ * `sudo` and none of the login user's groups or variables. Ports are reached through the egress
4806
+ * gateway's tunnel, so the session always asks for the gateway.
4807
+ */
4808
+ async function createSshSession(options) {
4809
+ const { target, abortSignal: signal } = options;
4810
+ const baseEnv = {
4811
+ PATH: [
4812
+ `${SANDBOX_HOME}/.local/bin`,
4813
+ ...options.path ?? [],
4814
+ SYSTEM_PATH
4815
+ ].join(":"),
4816
+ HOME: SANDBOX_HOME,
4817
+ USER: SANDBOX_USER,
4818
+ LOGNAME: SANDBOX_USER,
4819
+ SHELL: "/bin/bash",
4820
+ LANG: "C.UTF-8"
4821
+ };
4822
+ const userEnv = {
4823
+ NPM_CONFIG_UPDATE_NOTIFIER: "false",
4824
+ NPM_CONFIG_PREFIX: `${SANDBOX_HOME}/.local`,
4825
+ ...options.env
4826
+ };
4827
+ const ssh = async (remote, input = "", abort = signal) => {
4828
+ const [bin = "ssh", ...args] = sshArgv(target, remote);
4829
+ const startedAt = Date.now();
4830
+ try {
4831
+ const r = await run(bin, args, {
4832
+ input,
4833
+ signal: abort,
4834
+ binary: true
4835
+ });
4836
+ traceDocker(args, startedAt, {
4837
+ ...r,
4838
+ stdin: input.length
4839
+ }, "ssh");
4840
+ return r;
4841
+ } catch (error) {
4842
+ traceDocker(args, startedAt, { error }, "ssh");
4843
+ throw error;
4844
+ }
4845
+ };
4846
+ const asUser = (cwd, command) => `sudo -n -H -u ${SANDBOX_USER} -- env -i ${Object.entries(baseEnv).map(([k, v]) => shellQuote(`${k}=${v}`)).join(" ")} bash -c ${shellQuote(READER)} bash ${shellQuote(cwd)} ${shellQuote(command)}`;
4847
+ const asRoot = (command, marker) => `sudo -n -- env -i PATH=${SYSTEM_PATH} HOME=/root${marker ? ` ${EXEC_MARKER}=${marker}` : ""} /bin/sh -c ${shellQuote(`cd ${SANDBOX_STATE} || exit 1; ${EXEC_UMASK}; ${command}`)}`;
4848
+ const closeConnection = async () => {
4849
+ if (!target.controlPath || process.platform === "win32") return;
4850
+ const [bin = "ssh", ...args] = sshArgv(target, "");
4851
+ await run(bin, [
4852
+ "-O",
4853
+ "exit",
4854
+ ...args.slice(0, -1)
4855
+ ]).catch(() => {});
4856
+ };
4857
+ let gateway;
4858
+ let destroyed;
4859
+ const destroy = () => {
4860
+ destroyed ??= (async () => {
4861
+ gateway?.close();
4862
+ await closeConnection();
4863
+ await options.onDestroy?.();
4864
+ })();
4865
+ return destroyed;
4866
+ };
4867
+ const fail = async (error) => {
4868
+ await destroy().catch(() => {});
4869
+ throw signal?.aborted ? signal.reason : error;
4870
+ };
4871
+ const setup = [
4872
+ EXEC_UMASK,
4873
+ `id -u ${SANDBOX_USER} >/dev/null 2>&1 || useradd --create-home --shell /bin/bash --user-group ${SANDBOX_USER}`,
4874
+ `mkdir -p ${SANDBOX_ROOT} && chown ${SANDBOX_USER}:${SANDBOX_USER} ${SANDBOX_ROOT}`,
4875
+ `mkdir -p ${SANDBOX_STATE} && chown 0:0 ${SANDBOX_STATE} && chmod 700 ${SANDBOX_STATE}`,
4876
+ ...options.prepare ? [options.prepare] : []
4877
+ ].join(" && ");
4878
+ const deadline = Date.now() + (options.connectTimeoutMs ?? 6e4);
4879
+ for (let wait = 500;; wait = Math.min(wait * 2, 5e3)) {
4880
+ const made = await ssh(`sudo -n -- /bin/sh -c ${shellQuote(setup)}`).catch(fail);
4881
+ if (made.exitCode === 0) break;
4882
+ if (made.exitCode !== SSH_FAILED || Date.now() + wait > deadline) {
4883
+ const why = made.stderr.trim() || made.stdout.toString("utf8").trim();
4884
+ return fail(/* @__PURE__ */ new Error(`Couldn't set up ${options.description}: ${why.slice(-500)}`));
4885
+ }
4886
+ await new Promise((resolve) => setTimeout(resolve, wait));
4887
+ if (signal?.aborted) return fail(signal.reason);
4888
+ }
4889
+ const egressOptions = options.egress === true ? {} : options.egress || void 0;
4890
+ let egress;
4891
+ if (egressOptions) {
4892
+ const { policy = { mode: "allow-all" }, ...rest } = egressOptions;
4893
+ try {
4894
+ gateway = await startGateway(sshTransport(target), {
4895
+ ...rest,
4896
+ policy
4897
+ }, signal);
4898
+ egress = { active: true };
4899
+ } catch (error) {
4900
+ if (signal?.aborted || isRestricted(policy)) {
4901
+ await destroy().catch(() => {});
4902
+ if (signal?.aborted) throw signal.reason;
4903
+ throw new EgressUnavailableError(error.message);
4904
+ }
4905
+ egress = {
4906
+ active: false,
4907
+ reason: error.message
4908
+ };
4909
+ }
4910
+ }
4911
+ const envFor = (env) => ({
4912
+ ...userEnv,
4913
+ ...gateway ? gateway.env : {},
4914
+ ...env
4915
+ });
4916
+ let execs = 0;
4917
+ const nextMarker = () => `${target.hostKeyAlias}-${++execs}`;
4918
+ const cwdOf = (cwd) => cwd ? posix.resolve(SANDBOX_ROOT, cwd) : SANDBOX_ROOT;
4919
+ /** Killing the host's ssh leaves the command running in the VM, so kill what has its marker. */
4920
+ const killExec = (marker) => ssh(asRoot(`for e in /proc/[0-9]*/environ; do grep -qsxzF ${shellQuote(`${EXEC_MARKER}=${marker}`)} "$e" && kill -9 "$(basename "$(dirname "$e")")" 2>/dev/null; done; true`), "", void 0).then(() => {}, () => {});
4921
+ const run$1 = async (o) => {
4922
+ const marker = nextMarker();
4923
+ const env = {
4924
+ ...envFor(o.env),
4925
+ [EXEC_MARKER]: marker
4926
+ };
4927
+ try {
4928
+ const r = await ssh(asUser(cwdOf(o.workingDirectory), o.command), envStream(env), o.abortSignal);
4929
+ return {
4930
+ exitCode: r.exitCode,
4931
+ stdout: r.stdout.toString("utf8"),
4932
+ stderr: r.stderr
4933
+ };
4934
+ } catch (error) {
4935
+ if (o.abortSignal?.aborted) await killExec(marker);
4936
+ throw error;
4937
+ }
4938
+ };
4939
+ const runPrivileged = async (o) => {
4940
+ const marker = nextMarker();
4941
+ try {
4942
+ const r = await ssh(asRoot(o.command, marker), "", o.abortSignal);
4943
+ return {
4944
+ exitCode: r.exitCode,
4945
+ stdout: r.stdout.toString("utf8"),
4946
+ stderr: r.stderr
4947
+ };
4948
+ } catch (error) {
4949
+ if (o.abortSignal?.aborted) await killExec(marker);
4950
+ throw error;
4951
+ }
4952
+ };
4953
+ const asUserDirect = (command) => `sudo -n -u ${SANDBOX_USER} -- ${command}`;
4954
+ const readBinaryFile = async (o) => {
4955
+ const r = await ssh(asUserDirect(`cat -- ${shellQuote(posix.resolve(SANDBOX_ROOT, o.path))}`), "", o.abortSignal);
4956
+ return r.exitCode === 0 ? new Uint8Array(r.stdout) : null;
4957
+ };
4958
+ const writeBinaryFile = async (o) => {
4959
+ const path = posix.resolve(SANDBOX_ROOT, o.path);
4960
+ const script = `${EXEC_UMASK} && mkdir -p ${shellQuote(posix.dirname(path))} && cat > ${shellQuote(path)}`;
4961
+ const r = await ssh(asUserDirect(`sh -c ${shellQuote(script)}`), o.content, o.abortSignal);
4962
+ if (r.exitCode !== 0) throw new Error(`Couldn't write ${path} in ${options.description}: ${r.stderr.trim()}`);
4963
+ };
4964
+ const paths = pathOperations(async (script, path, abortSignal) => {
4965
+ const r = await ssh(asUserDirect(`sh -c ${shellQuote(script)} sh ${shellQuote(path)}`), "", abortSignal);
4966
+ return {
4967
+ exitCode: r.exitCode,
4968
+ stdout: r.stdout.toString("utf8"),
4969
+ stderr: r.stderr
4970
+ };
4971
+ });
4972
+ const brokering = gateway ? {
4973
+ async setNetworkPolicy(policy) {
4974
+ gateway?.setPolicy(policy);
4975
+ },
4976
+ async addRequestTransformations(rules) {
4977
+ gateway?.addTransformations(rules);
4978
+ },
4979
+ async setRequestTransformations(rules) {
4980
+ gateway?.setTransformations(rules);
4981
+ }
4982
+ } : {};
4983
+ const substituting = gateway ? {
4984
+ async setSubstitutions(subs) {
4985
+ gateway?.setSubstitutions(subs);
4986
+ },
4987
+ traffic: () => gateway.traffic()
4988
+ } : {};
4989
+ const session = {
4990
+ id: target.hostKeyAlias,
4991
+ description: options.description,
4992
+ defaultWorkingDirectory: SANDBOX_ROOT,
4993
+ ports: [BRIDGE_PORT],
4994
+ get egress() {
4995
+ if (egress?.active && gateway?.stopped) return {
4996
+ active: false,
4997
+ reason: gateway.stopped
4998
+ };
4999
+ return egress;
5000
+ },
5001
+ ...brokering,
5002
+ ...substituting,
5003
+ oomKills: async () => null,
5004
+ run: run$1,
5005
+ runPrivileged,
5006
+ spawn: (async (o) => {
5007
+ if (o.stdin) throw new Error(`A process in ${options.description} has no writable stdin`);
5008
+ const marker = nextMarker();
5009
+ const env = {
5010
+ ...envFor(o.env),
5011
+ [EXEC_MARKER]: marker
5012
+ };
5013
+ const [bin = "ssh", ...args] = sshArgv(target, asUser(cwdOf(o.workingDirectory), o.command));
5014
+ const startedAt = Date.now();
5015
+ const child = spawn(bin, args, {
5016
+ stdio: [
5017
+ "pipe",
5018
+ "pipe",
5019
+ "pipe"
5020
+ ],
5021
+ detached: true
5022
+ });
5023
+ child.stdin.on("error", () => {});
5024
+ child.stdin.end(envStream(env));
5025
+ const exited = new Promise((resolve) => child.on("close", (code) => {
5026
+ traceDocker(args, startedAt, {
5027
+ exitCode: code,
5028
+ stdout: "<streamed>"
5029
+ }, "ssh");
5030
+ resolve({ exitCode: code ?? 1 });
5031
+ }));
5032
+ const kill = async () => {
5033
+ child.kill("SIGKILL");
5034
+ await killExec(marker);
5035
+ };
5036
+ o.abortSignal?.addEventListener("abort", () => void kill(), { once: true });
5037
+ return {
5038
+ pid: child.pid,
5039
+ stdout: Readable.toWeb(child.stdout),
5040
+ stderr: Readable.toWeb(child.stderr),
5041
+ wait: () => exited,
5042
+ kill
5043
+ };
5044
+ }),
5045
+ readBinaryFile,
5046
+ async readFile(o) {
5047
+ const bytes = await readBinaryFile(o);
5048
+ return bytes === null ? null : Readable.toWeb(Readable.from([bytes]));
5049
+ },
5050
+ async readTextFile(o) {
5051
+ const bytes = await readBinaryFile(o);
5052
+ if (bytes === null) return null;
5053
+ const text = Buffer.from(bytes).toString("utf8");
5054
+ if (o.startLine === void 0 && o.endLine === void 0) return text;
5055
+ return text.split("\n").slice((o.startLine ?? 1) - 1, o.endLine).join("\n");
5056
+ },
5057
+ ...paths,
5058
+ writeBinaryFile,
5059
+ writeTextFile: (o) => writeBinaryFile({
5060
+ ...o,
5061
+ content: Buffer.from(o.content, "utf8")
5062
+ }),
5063
+ async writeFile(o) {
5064
+ const chunks = [];
5065
+ for await (const chunk of o.content) chunks.push(chunk);
5066
+ await writeBinaryFile({
5067
+ ...o,
5068
+ content: Buffer.concat(chunks)
5069
+ });
5070
+ },
5071
+ async getPortEndpoint({ port, protocol = "ws" }) {
5072
+ const scheme = protocol === "ws" ? "ws" : "http";
5073
+ if (!gateway || gateway.stopped) throw new Error(`Port ${port} of ${options.description} isn't reachable: the egress gateway ${gateway?.stopped ? `stopped: ${gateway.stopped}` : "isn't running"}`);
5074
+ return { url: await gateway.portUrl(port, scheme) };
5075
+ },
5076
+ async getPortUrl(o) {
5077
+ return (await session.getPortEndpoint(o)).url;
5078
+ },
5079
+ stop: destroy,
5080
+ destroy,
5081
+ restricted: () => {
5082
+ const { description, readFile, readBinaryFile, readTextFile, writeFile } = session;
5083
+ const { writeBinaryFile, writeTextFile, stat, listDirectory, deleteFile, spawn, run } = session;
5084
+ return {
5085
+ description,
5086
+ readFile,
5087
+ readBinaryFile,
5088
+ readTextFile,
5089
+ writeFile,
5090
+ writeBinaryFile,
5091
+ writeTextFile,
5092
+ stat,
5093
+ listDirectory,
5094
+ deleteFile,
5095
+ spawn,
5096
+ run
5097
+ };
5098
+ }
5099
+ };
5100
+ return session;
5101
+ }
5102
+ export { SANDBOX_USER as $, CA_PATH as A, engineSpec as At, HARNESS_HOSTS as B, DEFAULT_LIMITS as C, causeLine as Ct, createDockerSession as D, retryTransient as Dt, ROOT_CAPABILITIES as E, parseBuildOutput as Et, placeholder as F, BASE_IMAGE as G, defaultAllowedHosts as H, applyTransformations as I, HARNESS_PACKAGES as J, BRIDGE_PORT as K, matches as L, startGateway as M, sshArgv as N, dockerSandboxProvider as O, ENGINES as Ot, sshTransport as P, SANDBOX_STATE as Q, onEndpoint as R, usesReevalBase as S, RETRY_DELAYS as St, PRIVILEGED_CAPABILITIES as T, isTransient as Tt, hostAllowed as U, PACKAGE_HOSTS as V, BAKED_HARNESSES as W, SANDBOX_HOME as X, LABEL as Y, SANDBOX_ROOT as Z, pluginBuildKey as _, onDockerCommand as _t, REEVAL_BASE_ARG as a, contextFiles as at, resolveFrom as b, shellQuote as bt, buildImage as c, dockerAvailable as ct, contextHash as d, dockerState as dt, WORKSPACE_DIR as et, dockerfileTag as f, imageInfo as ft, pluginBuildDir as g, OPAQUE_OUTPUT as gt, installScript as h, removeContainerDetached as ht, PLUGIN_BUILDS_DIR as i, isBakedHarness as it, PROXY_PORT as j, normalizeImageId as jt, pathOperations as k, dockerSeccompFile as kt, buildInstallLayer as l, dockerCapacity as lt, installLayerTag as m, isRegistryDigest as mt, MCP_TIMER as n, harnessLabel as nt, bakedAdapter as o, dockerignoreMatcher as ot, harnessImageFor as p, imageTags as pt, DEFAULT_IMAGE as q, DOCKER_CONTEXT as r, imageFor as rt, buildDockerfile as s, docker as st, createSshSession as t, adapterVersion as tt, buildPluginLayer as u, dockerOk as ut, pluginLayerTag as v, traceDocker as vt, EgressUnavailableError as w, failureCause as wt, sourceTreeHash as x, ImageBuildError as xt, pruneImages as y, run as yt, DOCKER_EGRESS as z };
4565
5103
 
4566
- //# sourceMappingURL=src-BQ6BiXoc.js.map
5104
+ //# sourceMappingURL=src-y0nOeRRE.js.map