openpond 0.2.59 → 0.2.60

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 (365) hide show
  1. package/README.md +27 -0
  2. package/dist/app-server.d.ts +7 -0
  3. package/dist/app-server.js +1 -1
  4. package/dist/chunks/acp-ARBNMIPT.js +2 -0
  5. package/dist/chunks/acp-agent-53COYDHB.js +21 -0
  6. package/dist/chunks/{actions-command-JJ3CU7J6.js → actions-command-6YSZ7EJS.js} +1 -1
  7. package/dist/chunks/{app-layer-KAUZAHGE.js → app-layer-TVG7KTW6.js} +1 -1
  8. package/dist/chunks/{app-server-connected-apps-SXGZOUJJ.js → app-server-connected-apps-K62M6LCT.js} +1 -1
  9. package/dist/chunks/{app-server-evaluations-N4OMTPCI.js → app-server-evaluations-RM6WXX3H.js} +1 -1
  10. package/dist/chunks/app-server-harness-services-RLKMWOQ4.js +2 -0
  11. package/dist/chunks/app-server-runtime-OKMEHNEU.js +2 -0
  12. package/dist/chunks/apps-YWZL2H34.js +2 -0
  13. package/dist/chunks/{chunk-JUQMSHNR.js → chunk-23P2O7PH.js} +1 -1
  14. package/dist/chunks/{chunk-PF5R6CMP.js → chunk-2GICDASL.js} +1 -1
  15. package/dist/chunks/{chunk-6MI4KKWF.js → chunk-2ITZW2CN.js} +1 -1
  16. package/dist/chunks/chunk-2MMCZHKL.js +2 -0
  17. package/dist/chunks/{chunk-EOBHQ3JT.js → chunk-2PAJCXFC.js} +1 -1
  18. package/dist/chunks/{chunk-GYJQKCEO.js → chunk-2RNCXDJC.js} +1 -1
  19. package/dist/chunks/{chunk-APB2STJK.js → chunk-2SUMZ73C.js} +1 -1
  20. package/dist/chunks/{chunk-DZUN5YWB.js → chunk-3CWRTKHY.js} +1 -1
  21. package/dist/chunks/{chunk-TRQQNFMO.js → chunk-44LWH5U6.js} +1 -1
  22. package/dist/chunks/{chunk-BVQWVIGK.js → chunk-52KIORRX.js} +1 -1
  23. package/dist/chunks/{chunk-TG7P7BSV.js → chunk-5RHYSQZ5.js} +1 -1
  24. package/dist/chunks/{chunk-3QIB5FXI.js → chunk-5ZBLCWEJ.js} +1 -1
  25. package/dist/chunks/{chunk-25JDHAZ5.js → chunk-637UACKH.js} +1 -1
  26. package/dist/chunks/{chunk-VRODAXFS.js → chunk-655DQ6AX.js} +26 -26
  27. package/dist/chunks/{chunk-N4FFQPLR.js → chunk-6GWOVHIG.js} +1 -1
  28. package/dist/chunks/chunk-6HQB3MQO.js +2 -0
  29. package/dist/chunks/{chunk-GOPFFQZU.js → chunk-7LZISGTA.js} +2 -2
  30. package/dist/chunks/{chunk-MMQRHR3V.js → chunk-7RC5WPVT.js} +1 -1
  31. package/dist/chunks/{chunk-H6IW2R22.js → chunk-7YTHEMWI.js} +1 -1
  32. package/dist/chunks/{chunk-PCSIOUHF.js → chunk-A3L74U3W.js} +1 -1
  33. package/dist/chunks/{chunk-XMKCCLGB.js → chunk-A66CSUBJ.js} +1 -1
  34. package/dist/chunks/{chunk-OUVIWDL2.js → chunk-AGVOGPAZ.js} +1 -1
  35. package/dist/chunks/{chunk-U2MAPON2.js → chunk-AW5Q6NXT.js} +1 -1
  36. package/dist/chunks/{chunk-7AVNZF36.js → chunk-B46HZ3MX.js} +1 -1
  37. package/dist/chunks/{chunk-KGNCKIFP.js → chunk-BIPQCJ5V.js} +1 -1
  38. package/dist/chunks/{chunk-776WNDV2.js → chunk-BIQ33JV5.js} +1 -1
  39. package/dist/chunks/{chunk-JFXWI3EN.js → chunk-BK63OQRW.js} +1 -1
  40. package/dist/chunks/{chunk-BO5JZYWG.js → chunk-CFSIU6CW.js} +1 -1
  41. package/dist/chunks/{chunk-WC42WOLG.js → chunk-D3RRUWNN.js} +1 -1
  42. package/dist/chunks/{chunk-X4OSOOSU.js → chunk-D4UX2O45.js} +1 -1
  43. package/dist/chunks/{chunk-GJ2ZJFDD.js → chunk-DG4TYVPF.js} +1 -1
  44. package/dist/chunks/{chunk-QIKWJ2AA.js → chunk-DGIEXZJV.js} +1 -1
  45. package/dist/chunks/{chunk-JMBQYBPI.js → chunk-DIGX56JY.js} +1 -1
  46. package/dist/chunks/{chunk-4GPXTISD.js → chunk-DISNCX6R.js} +1 -1
  47. package/dist/chunks/{chunk-EWOSLZDX.js → chunk-DK7IKI7O.js} +1 -1
  48. package/dist/chunks/{chunk-74IIXVAE.js → chunk-DX7YEUNQ.js} +1 -1
  49. package/dist/chunks/{chunk-523TE4BI.js → chunk-E63VWAQA.js} +1 -1
  50. package/dist/chunks/{chunk-OLDK2LKJ.js → chunk-EL454L26.js} +1 -1
  51. package/dist/chunks/{chunk-WRI4XKSK.js → chunk-ENSB6ZTM.js} +1 -1
  52. package/dist/chunks/{chunk-EAPFMACH.js → chunk-ERJV5BMC.js} +1 -1
  53. package/dist/chunks/{chunk-RNIAFXMB.js → chunk-EXJGCNRS.js} +1 -1
  54. package/dist/chunks/chunk-F5KCCDQM.js +2 -0
  55. package/dist/chunks/{chunk-57TRXBLT.js → chunk-FSQWAANK.js} +1 -1
  56. package/dist/chunks/{chunk-BGJYITVI.js → chunk-G5B3PB5X.js} +1 -1
  57. package/dist/chunks/{chunk-ARLOVWQ3.js → chunk-GAWGIJQG.js} +1 -1
  58. package/dist/chunks/{chunk-ABZ2ZOLU.js → chunk-GGGF5NHJ.js} +1 -1
  59. package/dist/chunks/{chunk-4EDIRCD3.js → chunk-GOYBYYPQ.js} +1 -1
  60. package/dist/chunks/{chunk-H7ATCPPB.js → chunk-H3BSIAQO.js} +1 -1
  61. package/dist/chunks/{chunk-RBZH6A6M.js → chunk-HCEJAOIF.js} +1 -1
  62. package/dist/chunks/{chunk-OPNRWESL.js → chunk-IFQCOSU6.js} +1 -1
  63. package/dist/chunks/{chunk-VGRMAGOK.js → chunk-IJHZBHEK.js} +2 -2
  64. package/dist/chunks/{chunk-GUOLMLZN.js → chunk-ISFIDCIH.js} +1 -1
  65. package/dist/chunks/{chunk-PY6K2JRH.js → chunk-ITKTILKI.js} +1 -1
  66. package/dist/chunks/{chunk-3CDEBKSU.js → chunk-IUBARBGI.js} +1 -1
  67. package/dist/chunks/{chunk-2L5XWJJ5.js → chunk-J24I74EM.js} +1 -1
  68. package/dist/chunks/{chunk-IRV6GWGG.js → chunk-J7QGHA7G.js} +3 -3
  69. package/dist/chunks/{chunk-FAYASU7Z.js → chunk-JGWINTT5.js} +1 -1
  70. package/dist/chunks/{chunk-GL3NX3F3.js → chunk-JHEFWB6O.js} +1 -1
  71. package/dist/chunks/{chunk-V34H7Y2T.js → chunk-JHMS2WXM.js} +2 -2
  72. package/dist/chunks/{chunk-PSGGOZFM.js → chunk-JHR3LF2F.js} +1 -1
  73. package/dist/chunks/{chunk-O4VIXU7A.js → chunk-KGLJU66U.js} +3 -3
  74. package/dist/chunks/{chunk-XEOEKFG6.js → chunk-KJFRCVQC.js} +1 -1
  75. package/dist/chunks/chunk-KNO355LC.js +2 -0
  76. package/dist/chunks/{chunk-BQS7Z4AP.js → chunk-LD7PGREF.js} +2 -2
  77. package/dist/chunks/{chunk-MNC4YUDI.js → chunk-LHA7RQBA.js} +1 -1
  78. package/dist/chunks/{chunk-RZUEVS64.js → chunk-LO3O45IX.js} +1 -1
  79. package/dist/chunks/{chunk-TIHXUKFD.js → chunk-M2SKXY5C.js} +2 -2
  80. package/dist/chunks/{chunk-2IHO4GDJ.js → chunk-M3ZQDPRS.js} +1 -1
  81. package/dist/chunks/{chunk-DPHAN6N3.js → chunk-M4ZF44H5.js} +1 -1
  82. package/dist/chunks/{chunk-Y4OWBBDD.js → chunk-M55H7KVR.js} +1 -1
  83. package/dist/chunks/{chunk-NTB2O4RP.js → chunk-MGKMIRYG.js} +1 -1
  84. package/dist/chunks/{chunk-XJZSIXEO.js → chunk-MJGU2JJ2.js} +2 -2
  85. package/dist/chunks/{chunk-7K7O3CKY.js → chunk-MS37ISA4.js} +2 -2
  86. package/dist/chunks/{chunk-BRORSFJX.js → chunk-NCKXI2VB.js} +11 -11
  87. package/dist/chunks/chunk-NHUUCNAD.js +2 -0
  88. package/dist/chunks/{chunk-2WKUBGIF.js → chunk-O3VP46SE.js} +1 -1
  89. package/dist/chunks/{chunk-EUMXMT3S.js → chunk-O4FBOUNX.js} +1 -1
  90. package/dist/chunks/chunk-O6IFVTZT.js +9 -0
  91. package/dist/chunks/{chunk-ZH3K7LKQ.js → chunk-O7B44IYN.js} +1 -1
  92. package/dist/chunks/{chunk-ZAN4DYLH.js → chunk-OGMDEA3Y.js} +1 -1
  93. package/dist/chunks/{chunk-BL3YH2QU.js → chunk-OKBIWRHC.js} +1 -1
  94. package/dist/chunks/{chunk-FFRFSDBM.js → chunk-ON2RNOCG.js} +1 -1
  95. package/dist/chunks/{chunk-76M2MEHV.js → chunk-ONDCV5QC.js} +1 -1
  96. package/dist/chunks/{chunk-UCPGRPWY.js → chunk-OQ4VGCRG.js} +1 -1
  97. package/dist/chunks/{chunk-GVZLGS2U.js → chunk-OWK7HU5I.js} +1 -1
  98. package/dist/chunks/{chunk-JQKSXCAJ.js → chunk-OY5HC2P6.js} +1 -1
  99. package/dist/chunks/{chunk-T5AACNJI.js → chunk-P7HRF4FM.js} +1 -1
  100. package/dist/chunks/{chunk-7ED24PP6.js → chunk-PCNLC5H3.js} +1 -1
  101. package/dist/chunks/{chunk-ES2ISFJC.js → chunk-PF56N7ZY.js} +1 -1
  102. package/dist/chunks/{chunk-OX3XZKGK.js → chunk-PKALOVHC.js} +2 -2
  103. package/dist/chunks/{chunk-ZCHXGRRU.js → chunk-PR5TYTY4.js} +1 -1
  104. package/dist/chunks/{chunk-Q4TBTRIG.js → chunk-PWK5Z5S3.js} +1 -1
  105. package/dist/chunks/chunk-PXS4SVQG.js +16 -0
  106. package/dist/chunks/{chunk-AY64VY4E.js → chunk-QGOPYQW3.js} +1 -1
  107. package/dist/chunks/{chunk-LPWBIGKW.js → chunk-R7YEURUQ.js} +1 -1
  108. package/dist/chunks/{chunk-ACYFMLWG.js → chunk-RCA6NGVA.js} +2 -2
  109. package/dist/chunks/{chunk-DUURYZOI.js → chunk-RG3NH6YQ.js} +1 -1
  110. package/dist/chunks/{chunk-ATAOHSFR.js → chunk-RJIUOLWY.js} +1 -1
  111. package/dist/chunks/{chunk-37MWETFU.js → chunk-RXE3FYMJ.js} +1 -1
  112. package/dist/chunks/chunk-RYGWCN2R.js +2 -0
  113. package/dist/chunks/{chunk-VYLGI3IH.js → chunk-SFNCAPCJ.js} +1 -1
  114. package/dist/chunks/{chunk-Z4Z5UOZM.js → chunk-SG6JZ7HD.js} +1 -1
  115. package/dist/chunks/{chunk-IFDALGZE.js → chunk-SKRNWRKV.js} +5 -5
  116. package/dist/chunks/{chunk-ANFDRKUU.js → chunk-SLZH4Z6C.js} +1 -1
  117. package/dist/chunks/{chunk-WN3V6KDN.js → chunk-SPDSSMFD.js} +1 -1
  118. package/dist/chunks/{chunk-EQOV34UH.js → chunk-STWRTNRK.js} +1 -1
  119. package/dist/chunks/{chunk-XMWXH7TS.js → chunk-T5J7HIHR.js} +1 -1
  120. package/dist/chunks/{chunk-E72UU4VX.js → chunk-TBUAQWFS.js} +1 -1
  121. package/dist/chunks/{chunk-ZUJ3XUCP.js → chunk-TEPRCBDV.js} +1 -1
  122. package/dist/chunks/{chunk-2G4BEISF.js → chunk-TOFMA2L5.js} +2 -2
  123. package/dist/chunks/{chunk-TKLBP3MM.js → chunk-UFHLLSCE.js} +1 -1
  124. package/dist/chunks/{chunk-BE6SS65L.js → chunk-UJKQLO6B.js} +2 -2
  125. package/dist/chunks/{chunk-O3RF72BT.js → chunk-UZQNFTLR.js} +1 -1
  126. package/dist/chunks/{chunk-F74GBN6K.js → chunk-V2HMWCT6.js} +1 -1
  127. package/dist/chunks/{chunk-6ZFPQYHG.js → chunk-V4KT5FCJ.js} +1 -1
  128. package/dist/chunks/{chunk-TVQAPBLZ.js → chunk-VHSX3JPX.js} +1 -1
  129. package/dist/chunks/{chunk-22VMH6JV.js → chunk-W2SXOGTQ.js} +1 -1
  130. package/dist/chunks/{chunk-PH6IORGZ.js → chunk-WDEO44UN.js} +1 -1
  131. package/dist/chunks/{chunk-LNCHFVHT.js → chunk-WEHBK3MC.js} +1 -1
  132. package/dist/chunks/{chunk-KO3HNMLJ.js → chunk-WGX7WY4N.js} +1 -1
  133. package/dist/chunks/{chunk-CKMSBAI2.js → chunk-WHREO7A2.js} +1 -1
  134. package/dist/chunks/{chunk-N6ENLEMY.js → chunk-WS2ZZBAQ.js} +3 -3
  135. package/dist/chunks/{chunk-DIO5CB6U.js → chunk-WYZWDMMF.js} +1 -1
  136. package/dist/chunks/{chunk-MQULU465.js → chunk-XO3H32KX.js} +1 -1
  137. package/dist/chunks/{chunk-FKJHEZCW.js → chunk-XQBIHPPX.js} +1 -1
  138. package/dist/chunks/chunk-XRKFTPHD.js +2 -0
  139. package/dist/chunks/{chunk-YHHF4Q7Y.js → chunk-XSCIOQYE.js} +1 -1
  140. package/dist/chunks/{chunk-COHMDT7A.js → chunk-XTWEWYK7.js} +7 -7
  141. package/dist/chunks/{chunk-AQD7K4Z5.js → chunk-Y3GIM6WK.js} +1 -1
  142. package/dist/chunks/{chunk-74ZXXBGN.js → chunk-Y54RKLOI.js} +1 -1
  143. package/dist/chunks/{chunk-C37PUHA6.js → chunk-Y777GISF.js} +1 -1
  144. package/dist/chunks/{chunk-PFSMXKTI.js → chunk-YDU3S6UT.js} +1 -1
  145. package/dist/chunks/{chunk-UGL7WF3W.js → chunk-YOZIZYSC.js} +1 -1
  146. package/dist/chunks/{chunk-OSIO7PLX.js → chunk-YQKOB56U.js} +1 -1
  147. package/dist/chunks/chunk-YVNDDNMK.js +3 -0
  148. package/dist/chunks/{chunk-U5FKRYJO.js → chunk-ZAZKJJOT.js} +1 -1
  149. package/dist/chunks/{chunk-2RNQQNB7.js → chunk-ZR7LIMJS.js} +1 -1
  150. package/dist/chunks/{chunk-PQJTYOR2.js → chunk-ZTJOOY2F.js} +1 -1
  151. package/dist/chunks/{chunk-GPVCOEUH.js → chunk-ZTVXRZ6D.js} +1 -1
  152. package/dist/chunks/cli-CNYNXKGQ.js +2 -0
  153. package/dist/chunks/configuration-command-5K7EE2J5.js +2 -0
  154. package/dist/chunks/connected-app-executor-E25XCNAS.js +2 -0
  155. package/dist/chunks/connected-evidence-QNSO5BTF.js +2 -0
  156. package/dist/chunks/connection-Y2KCMBYD.js +2 -0
  157. package/dist/chunks/{continual-WFPIDWPH.js → continual-SOO3QBNQ.js} +1 -1
  158. package/dist/chunks/core-commands-ZTWPYAFQ.js +2 -0
  159. package/dist/chunks/datasets-XPUMWGOC.js +2 -0
  160. package/dist/chunks/desktop-test-HVSW4JHY.js +3 -0
  161. package/dist/chunks/dist-4N6AHWNN.js +2 -0
  162. package/dist/chunks/{dist-OMGUJYPD.js → dist-N6R6VNFD.js} +1 -1
  163. package/dist/chunks/{dist-OGLX76LL.js → dist-QN7WKZ2D.js} +1 -1
  164. package/dist/chunks/{enclave-QS4BUNDU.js → enclave-VURYNILU.js} +1 -1
  165. package/dist/chunks/evaluation-coordination-AOTFPVMS.js +2 -0
  166. package/dist/chunks/experiment-improvements-75CN3VI7.js +2 -0
  167. package/dist/chunks/experiments-AGAHM2AK.js +2 -0
  168. package/dist/chunks/{experiments-VFQGE4HC.js → experiments-DYSHYBGB.js} +1 -1
  169. package/dist/chunks/{extension-JCUA3RWV.js → extension-UT4CSDJF.js} +1 -1
  170. package/dist/chunks/help-KU52CFMW.js +8 -0
  171. package/dist/chunks/host-profile-evaluation-tools-LZDMQCMT.js +2 -0
  172. package/dist/chunks/host-profile-external-dataset-VK3NJHMC.js +2 -0
  173. package/dist/chunks/hosted-app-server-composition-P7V7K7CG.js +2 -0
  174. package/dist/chunks/{hosted-experiment-improvement-42YWXB3P.js → hosted-experiment-improvement-P433KDX2.js} +1 -1
  175. package/dist/chunks/hosted-harness-runtime-Y4DONWPC.js +2 -0
  176. package/dist/chunks/{hosted-profile-candidate-HVVC43XQ.js → hosted-profile-candidate-72MMPN6U.js} +1 -1
  177. package/dist/chunks/hosted-profile-compiler-RXHLK224.js +2 -0
  178. package/dist/chunks/hosted-profile-evaluation-control-LS4DCSDO.js +2 -0
  179. package/dist/chunks/{hosted-profile-evaluation-inspection-BUWLCKCD.js → hosted-profile-evaluation-inspection-3Q6EHO66.js} +1 -1
  180. package/dist/chunks/{hosted-profile-evaluation-preparation-3XLRR6UH.js → hosted-profile-evaluation-preparation-ZD27HNLF.js} +1 -1
  181. package/dist/chunks/{hosted-tasksets-THKM5QY5.js → hosted-tasksets-V2PQZJN4.js} +1 -1
  182. package/dist/chunks/human-review-4FJFINQX.js +2 -0
  183. package/dist/chunks/{import-CBDJ4DME.js → import-GBHSLA3G.js} +1 -1
  184. package/dist/chunks/{learning-ACEVFL5M.js → learning-U3FZL5YB.js} +1 -1
  185. package/dist/chunks/local-harness-improvement-runtime-UP2P7UT4.js +2 -0
  186. package/dist/chunks/local-harness-taskset-review-ZNOKSPJJ.js +2 -0
  187. package/dist/chunks/{local-scope-HVF2GZ5W.js → local-scope-62GWHDXS.js} +1 -1
  188. package/dist/chunks/{model-projects-QPO22JPA.js → model-projects-LQ4C6R3X.js} +1 -1
  189. package/dist/chunks/opchat-Q4PIWPYW.js +3 -0
  190. package/dist/chunks/organizations-TEH6HBQ3.js +2 -0
  191. package/dist/chunks/{profile-Y2MCSOUK.js → profile-SWPVCGTR.js} +1 -1
  192. package/dist/chunks/{profile-training-source-6GOT7AHM.js → profile-training-source-J73ZLNSC.js} +1 -1
  193. package/dist/chunks/project-action-payload-OU3ZPHW7.js +2 -0
  194. package/dist/chunks/project-agent-J7ILCRBS.js +2 -0
  195. package/dist/chunks/{published-experiment-source-5TMGLKDM.js → published-experiment-source-HVHKSYDL.js} +1 -1
  196. package/dist/chunks/refiner-profile-service-E7YU4E3N.js +2 -0
  197. package/dist/chunks/{runtime-QFXCXSVB.js → runtime-LIPHPKKJ.js} +2 -2
  198. package/dist/chunks/sandbox-command-G6KID3OP.js +2 -0
  199. package/dist/chunks/{sandbox-template-XWWPWWNR.js → sandbox-template-MZTMAUFS.js} +1 -1
  200. package/dist/chunks/saved-work-LOUWLF37.js +2 -0
  201. package/dist/chunks/{send-turn-SIXOZUVJ.js → send-turn-UEUEGY5W.js} +1 -1
  202. package/dist/chunks/{src-EZAKCCUV.js → src-7WMZOWZZ.js} +102 -95
  203. package/dist/chunks/{src-6SHCCYEN.js → src-MVAK6D6Y.js} +1 -1
  204. package/dist/chunks/standalone-experiment-turn-owner-YRKEOEJ2.js +2 -0
  205. package/dist/chunks/{store-continual-support-reviews-GDX6CSUU.js → store-continual-support-reviews-FJLLNKCY.js} +1 -1
  206. package/dist/chunks/{store-conversation-serving-W55XMDH4.js → store-conversation-serving-4KWR4IZY.js} +1 -1
  207. package/dist/chunks/{store-create-improve-A7E7CUPZ.js → store-create-improve-JWBJZRAU.js} +1 -1
  208. package/dist/chunks/{store-datasets-HKF3EO7B.js → store-datasets-4N2M6Y3K.js} +2 -2
  209. package/dist/chunks/{store-evaluation-results-645RFBGR.js → store-evaluation-results-OBM4623U.js} +1 -1
  210. package/dist/chunks/{store-harness-memory-VINCZ4GK.js → store-harness-memory-4HUEMRCD.js} +1 -1
  211. package/dist/chunks/{store-harness-refinement-candidates-EA5KFQPH.js → store-harness-refinement-candidates-NMRWMN23.js} +1 -1
  212. package/dist/chunks/store-harness-workspaces-BGONIQDY.js +2 -0
  213. package/dist/chunks/{store-human-review-F5KESW52.js → store-human-review-J75SIZAL.js} +1 -1
  214. package/dist/chunks/store-learned-preference-migration-validation-VLASM4CT.js +2 -0
  215. package/dist/chunks/store-learning-TUCQFBLT.js +2 -0
  216. package/dist/chunks/{store-learning-credentials-WZQJ4HPJ.js → store-learning-credentials-S4RF57NV.js} +1 -1
  217. package/dist/chunks/{store-local-experiments-HWQWNTIU.js → store-local-experiments-LULRLTII.js} +5 -5
  218. package/dist/chunks/{store-model-batch-review-TOCSDVAP.js → store-model-batch-review-SVL4MT6D.js} +1 -1
  219. package/dist/chunks/{store-model-configuration-6543ASY2.js → store-model-configuration-ZHDSM3XM.js} +2 -2
  220. package/dist/chunks/{store-preference-comparison-LV32MHVL.js → store-preference-comparison-YMMCKXS5.js} +1 -1
  221. package/dist/chunks/{store-schedules-VGTEQVKH.js → store-schedules-6Z4QS3NU.js} +1 -1
  222. package/dist/chunks/{store-sidebar-file-bookmarks-53B7QIGS.js → store-sidebar-file-bookmarks-MX6EP6OB.js} +2 -2
  223. package/dist/chunks/{store-sidebar-preferences-YXGEJVUO.js → store-sidebar-preferences-VYREPW26.js} +1 -1
  224. package/dist/chunks/{store-subagents-HRCAK7VZ.js → store-subagents-WGBCRALX.js} +1 -1
  225. package/dist/chunks/{store-task-inbox-WF74W4U2.js → store-task-inbox-43BNZSB7.js} +6 -6
  226. package/dist/chunks/{store-task-inventory-KHCTEZVK.js → store-task-inventory-AEW4POAJ.js} +2 -2
  227. package/dist/chunks/{store-taskset-drafts-3ACG5AVX.js → store-taskset-drafts-DKFO2CYB.js} +1 -1
  228. package/dist/chunks/{store-training-R46WOGXB.js → store-training-6PFFR6ST.js} +1 -1
  229. package/dist/chunks/{store-training-jobs-D4LECE7O.js → store-training-jobs-ANDEBQ67.js} +2 -2
  230. package/dist/chunks/{store-training-models-EQVNXOVB.js → store-training-models-OOI4ZJPX.js} +2 -2
  231. package/dist/chunks/{store-usage-IE2U2FD3.js → store-usage-U72RNW64.js} +1 -1
  232. package/dist/chunks/{store-work-evidence-QQDKM5AQ.js → store-work-evidence-NY5OBATB.js} +1 -1
  233. package/dist/chunks/{taskset-NR2X2UOK.js → taskset-SL3YOXW7.js} +1 -1
  234. package/dist/chunks/{taskset-packages-ONULEIVI.js → taskset-packages-3PCEYYDA.js} +1 -1
  235. package/dist/chunks/{teams-bot-CHUYMD6K.js → teams-bot-IDEF3BMI.js} +1 -1
  236. package/dist/chunks/{training-IDSGYGU2.js → training-57ISIC7U.js} +1 -1
  237. package/dist/chunks/web-search-222Y63QW.js +2 -0
  238. package/dist/chunks/{workspaces-2TJRDM5K.js → workspaces-5DF4H5EX.js} +1 -1
  239. package/dist/cli.js +1 -1
  240. package/dist/index.js +1 -1
  241. package/dist/sandbox-template/manifest.js +1 -1
  242. package/dist/web/assets/{App-CaRMZoxo.css → App-DbYvV_W6.css} +1 -1
  243. package/dist/web/assets/{App-pcwmC4IR.js → App-nzE7JU_O.js} +4 -4
  244. package/dist/web/assets/{AppDialog-CdHad7GT.js → AppDialog-VtNvqbDm.js} +1 -1
  245. package/dist/web/assets/{AppTerminalPanel-CrmoOgd4.js → AppTerminalPanel-BMfKdrrN.js} +2 -2
  246. package/dist/web/assets/{AppsView-0P6cBsD4.js → AppsView-CdWyrDEb.js} +1 -1
  247. package/dist/web/assets/{BrowserSidebar-Cb6edJw6.js → BrowserSidebar-CtOIciOa.js} +1 -1
  248. package/dist/web/assets/{CartesianChart-B2Sxi0lv.js → CartesianChart-u1lvLM30.js} +1 -1
  249. package/dist/web/assets/{CollaborationTabs-PP0AIXhb.js → CollaborationTabs-CaBfDYRW.js} +1 -1
  250. package/dist/web/assets/{CommandMenu-GfQIMe6W.js → CommandMenu-CFW3WJ11.js} +1 -1
  251. package/dist/web/assets/{CommunityView-V6KmMl5n.js → CommunityView-D2EjaeuH.js} +1 -1
  252. package/dist/web/assets/{ComposerCreateImproveStrip-oeVeyhPX.js → ComposerCreateImproveStrip-6wYSJdzv.js} +1 -1
  253. package/dist/web/assets/{ConversationImportsSettings-CuQcvVgE.js → ConversationImportsSettings-BJ4QhF7p.js} +1 -1
  254. package/dist/web/assets/{GetStartedView-2oZ068h_.js → GetStartedView-DBcOwIJn.js} +1 -1
  255. package/dist/web/assets/{HostedModelLearningReview-DLzak_Vf.js → HostedModelLearningReview-BNpK6_W9.js} +1 -1
  256. package/dist/web/assets/{HostedModelLearningSettings-Eca6Pd9R.js → HostedModelLearningSettings-SrsdeeoA.js} +1 -1
  257. package/dist/web/assets/{LabModelVersionDetailPage-DsBblnMp.js → LabModelVersionDetailPage-Cd6bRHt9.js} +1 -1
  258. package/dist/web/assets/{LabSkillSidebar-DDknttrB.js → LabSkillSidebar-CQfvel4w.js} +1 -1
  259. package/dist/web/assets/{LabsRoute-CgNiUHsy.js → LabsRoute-sXLJt1KR.js} +4 -4
  260. package/dist/web/assets/{MainChatThread-yCVg99LU.js → MainChatThread-dlDDK2JM.js} +2 -2
  261. package/dist/web/assets/{MainPane-C86le7UF.js → MainPane-DCz38-qy.js} +4 -4
  262. package/dist/web/assets/{MarkdownText-BBVriBCj.js → MarkdownText-Drjq6-JM.js} +1 -1
  263. package/dist/web/assets/{NativeSkillSidebar-D2uVZkqh.js → NativeSkillSidebar-jncZijt-.js} +1 -1
  264. package/dist/web/assets/{NewExperienceSwitcher-DuD6GScJ.js → NewExperienceSwitcher-DXKzoMaM.js} +1 -1
  265. package/dist/web/assets/{NewProjectDialog-B6XZkJrU.js → NewProjectDialog-DIyjAxJG.js} +1 -1
  266. package/dist/web/assets/{OutputsPage-PUlmcWjv.js → OutputsPage-Dy1cNr3n.js} +1 -1
  267. package/dist/web/assets/{ProjectsPage-DWBRmej6.js → ProjectsPage-D2EeybIv.js} +1 -1
  268. package/dist/web/assets/{RightChatPanelStack-HaCVep4t.js → RightChatPanelStack-4wUL-W9_.js} +1 -1
  269. package/dist/web/assets/{RightSidebarHomePanel-BUtdPb2L.js → RightSidebarHomePanel-Bd_AHUp8.js} +1 -1
  270. package/dist/web/assets/{ScheduledWorkPage-Dg9GkGrT.js → ScheduledWorkPage-BJkSzwz2.js} +1 -1
  271. package/dist/web/assets/{SettingsView-DtldfnV-.js → SettingsView-BhcP72KH.js} +3 -3
  272. package/dist/web/assets/{TeamChatView-C71JX4je.js → TeamChatView-CR0fdicZ.js} +1 -1
  273. package/dist/web/assets/{TerminalOverlay-B4F6Q36s.js → TerminalOverlay-DGrZRZ_3.js} +10 -10
  274. package/dist/web/assets/{TrainingCreationPanel-B9MxFzQx.js → TrainingCreationPanel-BsTG7aFS.js} +1 -1
  275. package/dist/web/assets/{TrainingDraftPanel-7C48sHfC.js → TrainingDraftPanel-ByErrht7.js} +1 -1
  276. package/dist/web/assets/{UsageSettingsSection-CC57FcUB.js → UsageSettingsSection-DeYTJbcM.js} +1 -1
  277. package/dist/web/assets/{WorkSidebarPanel-Cto1usLM.js → WorkSidebarPanel-DcNvEEoy.js} +1 -1
  278. package/dist/web/assets/{WorkspaceDiffPanel-CL7wi3kp.js → WorkspaceDiffPanel-CdPRcYWN.js} +3 -3
  279. package/dist/web/assets/{WorkspaceEnvironmentMenu-zdzSDofs.js → WorkspaceEnvironmentMenu-xUYg-iGn.js} +1 -1
  280. package/dist/web/assets/{WorkspaceGitDialogs-CZSmjnrc.js → WorkspaceGitDialogs-CBViLL3S.js} +1 -1
  281. package/dist/web/assets/{WorkspaceMonacoEditor-TrUDJMKb.js → WorkspaceMonacoEditor-frxie2_S.js} +3 -3
  282. package/dist/web/assets/{agent-connections-4Dza2mDg.js → agent-connections-D7ao-vbU.js} +1 -1
  283. package/dist/web/assets/{arrow-up-right-xKb5kWQJ.js → arrow-up-right-DCWPxdbD.js} +1 -1
  284. package/dist/web/assets/{chunk-P3BRSSRD-BsGTkgyC.js → chunk-P3BRSSRD-B5JXa0Nh.js} +1 -1
  285. package/dist/web/assets/{clipboard-BgjV3aCx.js → clipboard-B-GnMVLp.js} +1 -1
  286. package/dist/web/assets/{cloud-upload-Bw9XUsKQ.js → cloud-upload-DpaGFZ9J.js} +1 -1
  287. package/dist/web/assets/{cssMode-DxsFJGb-.js → cssMode-DJHE7R3W.js} +1 -1
  288. package/dist/web/assets/{folder-open-CbmUjIYS.js → folder-open-B-DFLDFH.js} +1 -1
  289. package/dist/web/assets/{folder-plus-slsst7Ct.js → folder-plus-CPXxPvSH.js} +1 -1
  290. package/dist/web/assets/{git-commit-horizontal-BIS-8MuS.js → git-commit-horizontal-DCTzcivA.js} +1 -1
  291. package/dist/web/assets/{htmlMode-BE4VOrZo.js → htmlMode-DxZVBAYd.js} +1 -1
  292. package/dist/web/assets/index-BojtIRzO.css +1 -0
  293. package/dist/web/assets/{index-DEg0S7Qk.js → index-Di1MU6Xr.js} +2 -2
  294. package/dist/web/assets/{info-5bL9xSSf.js → info-BMxsR_bn.js} +1 -1
  295. package/dist/web/assets/{jsonMode-CYimnBhD.js → jsonMode-CzWoMkpp.js} +1 -1
  296. package/dist/web/assets/{lspLanguageFeatures-CiFuk-P7.js → lspLanguageFeatures-15K7ND6Q.js} +1 -1
  297. package/dist/web/assets/{minimize-2-BGVWKvTg.js → minimize-2-DwUgqXoR.js} +1 -1
  298. package/dist/web/assets/{monaco.contribution-DkLVGT8N.js → monaco.contribution-BBLKjER5.js} +2 -2
  299. package/dist/web/assets/{monaco.contribution-BTY4dJ0f.js → monaco.contribution-DBjvSu8p.js} +2 -2
  300. package/dist/web/assets/{monaco.contribution-DUE3CQph.js → monaco.contribution-DUWvjhIG.js} +2 -2
  301. package/dist/web/assets/{monaco.contribution-C7sMrcos.js → monaco.contribution-w0zfkYLX.js} +2 -2
  302. package/dist/web/assets/{monitor-B5hx_tzp.js → monitor-Ihu5LVYx.js} +1 -1
  303. package/dist/web/assets/{play-pmSO95Qg.js → play-D_YGCdxU.js} +1 -1
  304. package/dist/web/assets/{python-CiZvL3LX.js → python-Q4OuoXYc.js} +1 -1
  305. package/dist/web/assets/{save-CvYL4DUg.js → save-DJYUOhtD.js} +1 -1
  306. package/dist/web/assets/{square-DT_uFOml.js → square-DXtoCBNw.js} +1 -1
  307. package/dist/web/assets/{toggleHighContrast-CrE1_HY0.js → toggleHighContrast-CaNeuWVE.js} +1 -1
  308. package/dist/web/assets/{tsMode-CI_PdZmj.js → tsMode-CJnQ2wmM.js} +1 -1
  309. package/dist/web/assets/{upload-PVi8vC3T.js → upload-fCP3_OEO.js} +1 -1
  310. package/dist/web/assets/{useLocalAgentSchedules-BHJNVf42.js → useLocalAgentSchedules-BFoH_gwZ.js} +1 -1
  311. package/dist/web/assets/{useProviderSettings-CU3zXyie.js → useProviderSettings-2eysgqiA.js} +1 -1
  312. package/dist/web/assets/{useSessionTurnCache-BE7cipLX.js → useSessionTurnCache-DLF5SPD-.js} +1 -1
  313. package/dist/web/assets/{wifi-off-7WiFuOhD.js → wifi-off-DZoiFrRz.js} +1 -1
  314. package/dist/web/assets/{workers-Cv8r4CvM.js → workers-D5nr74M-.js} +1 -1
  315. package/dist/web/assets/{yaml-Bj7mdkV2.js → yaml-CwsoTJmk.js} +1 -1
  316. package/dist/web/index.html +2 -2
  317. package/docs/command-reference.md +12 -0
  318. package/package.json +1 -1
  319. package/dist/chunks/app-server-harness-services-DDFUMNYC.js +0 -2
  320. package/dist/chunks/app-server-runtime-SVB6L26M.js +0 -2
  321. package/dist/chunks/apps-EZB56RHV.js +0 -2
  322. package/dist/chunks/chunk-7UH4YDA7.js +0 -3
  323. package/dist/chunks/chunk-CGWA54LE.js +0 -2
  324. package/dist/chunks/chunk-K44RHALX.js +0 -2
  325. package/dist/chunks/chunk-MFMYWZK2.js +0 -2
  326. package/dist/chunks/chunk-P2RSBSCT.js +0 -2
  327. package/dist/chunks/chunk-QDC4OW3S.js +0 -2
  328. package/dist/chunks/chunk-SF5HJ7PL.js +0 -16
  329. package/dist/chunks/chunk-YBT2NB32.js +0 -2
  330. package/dist/chunks/chunk-YCQSVHCD.js +0 -9
  331. package/dist/chunks/cli-5DFVQL5Y.js +0 -2
  332. package/dist/chunks/configuration-command-JS6U3RMC.js +0 -2
  333. package/dist/chunks/connected-app-executor-UBMGMV76.js +0 -2
  334. package/dist/chunks/connected-evidence-NLAIEVQ3.js +0 -2
  335. package/dist/chunks/connection-NZSD3U5O.js +0 -2
  336. package/dist/chunks/core-commands-U4IBRRY5.js +0 -2
  337. package/dist/chunks/datasets-UX47DTTB.js +0 -2
  338. package/dist/chunks/desktop-test-UUU7PD4P.js +0 -3
  339. package/dist/chunks/dist-W5MJYSPF.js +0 -2
  340. package/dist/chunks/evaluation-coordination-3YQN5JQW.js +0 -2
  341. package/dist/chunks/experiment-improvements-ZRVD2AGY.js +0 -2
  342. package/dist/chunks/experiments-JEB5A2N5.js +0 -2
  343. package/dist/chunks/help-KA4OINP5.js +0 -8
  344. package/dist/chunks/host-profile-evaluation-tools-2URLU5SG.js +0 -2
  345. package/dist/chunks/host-profile-external-dataset-B2AQNSDR.js +0 -2
  346. package/dist/chunks/hosted-app-server-composition-VJQ3FM4I.js +0 -2
  347. package/dist/chunks/hosted-harness-runtime-BM4WONJN.js +0 -2
  348. package/dist/chunks/hosted-profile-compiler-RKDWHYK3.js +0 -2
  349. package/dist/chunks/hosted-profile-evaluation-control-57V24UGU.js +0 -2
  350. package/dist/chunks/human-review-CSYAW4PC.js +0 -2
  351. package/dist/chunks/local-harness-improvement-runtime-3T6E7I5Q.js +0 -2
  352. package/dist/chunks/local-harness-taskset-review-LQPQBALH.js +0 -2
  353. package/dist/chunks/opchat-6ADSONAD.js +0 -3
  354. package/dist/chunks/organizations-GT24ZTCN.js +0 -2
  355. package/dist/chunks/project-action-payload-GHSLE7K3.js +0 -2
  356. package/dist/chunks/project-agent-YYSQIHVE.js +0 -2
  357. package/dist/chunks/refiner-profile-service-ZK7KAFP5.js +0 -2
  358. package/dist/chunks/sandbox-command-U6346TVJ.js +0 -2
  359. package/dist/chunks/saved-work-SWHZ4OLO.js +0 -2
  360. package/dist/chunks/standalone-experiment-turn-owner-LIAQWTGI.js +0 -2
  361. package/dist/chunks/store-harness-workspaces-XUM4Z66X.js +0 -2
  362. package/dist/chunks/store-learned-preference-migration-validation-V27XD4I7.js +0 -2
  363. package/dist/chunks/store-learning-WLG6KFIO.js +0 -2
  364. package/dist/chunks/web-search-BPON7H5N.js +0 -2
  365. package/dist/web/assets/index-erq7hUne.css +0 -1
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{Ab as Q,Bb as W,Cb as P,L as S,O as J,P as K,S as q,h as R,rb as z,sb as U,ub as F,zb as G}from"./chunk-ACYFMLWG.js";import{f as $,m as r}from"./chunk-KGNCKIFP.js";import{b as e}from"./chunk-ES2ISFJC.js";import{a as I}from"./chunk-FTQLQJQV.js";var X=e.object({schemaVersion:e.literal("openpond.humanResultView.v1"),executionId:e.string().min(1),executionHash:e.string().regex(/^[a-f0-9]{64}$/),selection:e.array(S).max(1e4),coverage:e.object({pending:e.number().int().nonnegative(),submitted:e.number().int().nonnegative(),accepted:e.number().int().nonnegative(),rejected:e.number().int().nonnegative(),cancelled:e.number().int().nonnegative()}).strict(),results:e.array(e.object({review:S,decision:S.nullable(),attemptIds:e.array(e.string().min(1)).min(1).max(2),mode:e.enum(["individual","pairwise"]),origin:e.enum(["hosted_retained","recorded_evidence","owner_attested_local","native_local"]),status:e.enum(["pending","submitted","accepted","rejected","cancelled"]),grader:S,answers:e.array(J).max(100)}).strict()).max(1e4)}).strict(),M=X.extend({contentHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict();function Y(o){let m=o.reviews.map(s=>{let i=K.parse(s),{contentHash:p,...f}=i;if(r(f)!==p||!i.evidence.attempts.some(v=>v.experimentId===o.executionId))throw new R("human_result_selection_mismatch",409);return i});if(new Set(m.map(s=>s.id)).size!==m.length)throw new R("human_result_duplicate_review",422);let n=m.map(s=>{let i=s.decisions.at(-1);return{review:{id:s.id,revision:s.revision,contentHash:s.contentHash},decision:i?{id:i.id,revision:i.revision,contentHash:i.contentHash}:null,attemptIds:s.evidence.attempts.map(p=>p.attemptId),mode:s.form.mode,origin:s.evidence.attempts.some(p=>p.localSource?.kind==="owner_attested_local")?"owner_attested_local":s.evidence.attempts.some(p=>p.localSource?.kind==="native_local")?"native_local":s.evidence.attempts.some(p=>p.recordedSource)?"recorded_evidence":"hosted_retained",status:s.status==="accepted"?"accepted":s.status==="rejected"?"rejected":s.status==="cancelled"?"cancelled":s.status==="submitted"?"submitted":"pending",grader:s.evidence.grader,answers:s.status==="accepted"&&i?.outcome==="accept"?i.answers:[]}}),y={pending:0,submitted:0,accepted:0,rejected:0,cancelled:0};for(let s of n)y[s.status]++;return M.parse(q(X.parse({schemaVersion:"openpond.humanResultView.v1",executionId:o.executionId,executionHash:o.executionHash,selection:n.map(s=>s.review),coverage:y,results:n})))}I(Y,"createHumanResultView");function Z(o,m){let n=K.parse(o),{contentHash:y,...s}=n,i=n.decisions.at(-1);if(y!==r(s)||y!==m.reviewHash||n.status!=="accepted"||!i||i.outcome!=="accept"||i.contentHash!==m.decisionHash)throw new R("human_accepted_revision_unavailable",409);let p=i.submissions.map(f=>{let v=n.submissions.find(w=>w.id===f.id&&w.contentHash===f.contentHash);if(!v||v.evidenceHash!==r(n.evidence)||v.formHash!==r(n.form))throw new R("human_accepted_lineage_invalid",409);return{id:v.id,revision:v.revision,contentHash:v.contentHash}});return{schemaVersion:"openpond.acceptedHumanEvidence.v1",scope:n.scope,projectId:n.projectId,review:{id:n.id,revision:n.revision,contentHash:y},sourceOrigins:n.evidence.attempts.map(f=>f.localSource?f.localSource.kind:f.recordedSource?"recorded_evidence":"hosted_retained"),decision:{id:i.id,revision:i.revision,contentHash:i.contentHash},submissions:p,evidence:n.evidence,answers:i.answers,...n.execution?.result?{execution:{id:n.execution.executionId,result:n.execution.result,configurationHash:n.execution.configurationHash}}:{},...i.taskProposalHash?{taskProposal:n.submissions.find(f=>f.taskProposal?.contentHash===i.taskProposalHash).taskProposal}:{}}}I(Z,"acceptedHumanEvidence");var T=e.string().regex(/^[a-f0-9]{64}$/),V=e.string().min(1).max(240),L={feedbackKey:V,criterionId:V},he=e.discriminatedUnion("kind",[e.object({...L,kind:e.literal("normalized_score"),minimum:e.number().finite(),maximum:e.number().finite(),passThreshold:e.number().min(0).max(1).optional()}).strict(),e.object({...L,kind:e.literal("boolean")}).strict(),e.object({...L,kind:e.literal("category")}).strict(),e.object({...L,kind:e.literal("preference_score"),tieScore:e.number().min(0).max(1).nullable()}).strict()]),ee=e.object({execution:$,resultHash:T,reviews:e.array(e.object({review:S,decision:S}).strict()).min(1).max(1e4)}).strict(),ie=e.object({rules:e.array(he).min(1).max(100),baseline:ee,candidate:ee}).strict().superRefine((o,m)=>{new Set(o.rules.map(n=>n.feedbackKey)).size!==o.rules.length&&m.addIssue({code:"custom",message:"Select each Human feedback key once."})}),ne=e.object({manifest:F,result:G}).strict(),te=e.object({id:V,manifestHash:T,resultHash:T}).strict(),ae=e.object({schemaVersion:e.literal("openpond.humanComparisonProjection.v1"),teamId:V,projectId:V,selections:ie,original:e.object({baseline:te,candidate:te}).strict(),humanResults:e.object({baseline:M,candidate:M}).strict(),baseline:ne,candidate:ne}).strict(),se=ae.extend({contentHash:T}).strict();function d(o){throw new R(o,409)}I(d,"fail");async function Ve(o){let m=ie.parse(o.selections);await o.authorize();let n={baseline:P(o.baseline),candidate:P(o.candidate)},y=new Set([m.baseline.execution.id,m.candidate.execution.id]);y.size!==2&&d("human_comparison_distinct_executions_required");let s=0;async function i(H){let l=n[H],j=m[H],_=l.manifest.lineage?.execution;l.manifest.lineage?.humanProjection&&d("human_comparison_recursive_projection"),(!_||r(_)!==r(j.execution)||l.manifest.teamId!==o.teamId)&&d("human_comparison_execution_changed");let E=[],A=new Map;for(let a of j.reviews){let t=await o.readReview(a.review);(t.scope!==o.teamId||t.projectId!==o.projectId||t.kind!=="grade"||t.revision!==a.review.revision||t.id!==a.review.id)&&d("human_comparison_review_scope_changed");let b=Z(t,{reviewHash:a.review.contentHash,decisionHash:a.decision.contentHash});s+=new TextEncoder().encode(JSON.stringify({answers:b.answers,form:t.form})).byteLength,s>4194304&&d("human_comparison_projection_too_large"),r(b.decision)!==r(a.decision)&&d("human_comparison_decision_changed"),t.evidence.attempts.some(k=>!y.has(k.experimentId))&&d("human_comparison_foreign_attempt");let u=t.evidence.attempts.filter(k=>k.experimentId===_.id);u.length!==1&&d("human_comparison_attempt_ambiguous");let c=u[0],g=await o.caseIdentity(c),h=l.result.cases.find(k=>z(k.identity)===z(g));(!h||g.caseId!==c.taskId||!h.traceRef||h.traceRef.contentHash!==c.trace?.contentHash||h.output===null)&&d("human_comparison_receipt_changed");let x=z(g)+":"+t.evidence.grader.id;A.has(x)&&d("human_comparison_duplicate_assessment"),A.set(x,{review:t,accepted:b,attempt:c}),E.push(t)}let D=Y({executionId:_.id,executionHash:_.contentHash,reviews:E});(D.contentHash!==j.resultHash||D.coverage.accepted!==E.length)&&d("human_comparison_result_changed");let N=new Map(m.rules.map(a=>[a.feedbackKey,a])),oe=l.manifest.evaluators.map(a=>{let t=N.get(a.feedbackKey);if(!t)return a;let b=E.filter(c=>c.evidence.grader.id===a.release.id&&String(c.evidence.grader.revision)===String(a.release.revision)&&c.evidence.grader.contentHash===a.release.contentHash).map(c=>c.form);(!b.length||new Set(b.map(r)).size!==1)&&d("human_comparison_form_changed");let u=b[0].criteria.find(c=>c.id===t.criterionId);return u||d("human_comparison_criterion_unavailable"),(t.kind==="normalized_score"&&(u.kind!=="score"||t.minimum!==u.minimum||t.maximum!==u.maximum||t.maximum<=t.minimum)||t.kind==="boolean"&&u.kind!=="boolean"||t.kind==="category"&&u.kind!=="category"||t.kind==="preference_score"&&(u.kind!=="preference"||b[0].mode!=="pairwise"))&&d("human_comparison_rule_changed"),{...a,output:t.kind==="boolean"?"boolean":t.kind==="category"?"category":"score",categories:u.kind==="category"?u.options:[],configurationHash:r({original:a.configurationHash,rule:t,formHash:r(b[0])})}});m.rules.some(a=>!l.manifest.evaluators.some(t=>t.feedbackKey===a.feedbackKey))&&d("human_comparison_grader_unavailable");let{contentHash:ce,...re}=l.manifest,C={originalManifest:{id:l.manifest.id,contentHash:l.manifest.contentHash},selectionHash:r(j),rulesHash:r(m.rules)},B=Q({...re,id:U(C.originalManifest,C.selectionHash,C.rulesHash),lineage:{...l.manifest.lineage,humanProjection:C},evaluators:oe}),de=l.result.cases.map(a=>{let t=a.feedback.map(u=>{let c=N.get(u.feedbackKey);if(!c)return u;let g=A.get(z(a.identity)+":"+u.evaluator.id);(!g||g.review.evidence.grader.contentHash!==u.evaluator.contentHash)&&d("human_comparison_assessment_missing");let h=g.accepted.answers.find(k=>k.criterionId===c.criterionId),x=null;if(h&&!h.abstain&&(c.kind==="normalized_score"&&typeof h.value=="number"&&(x=(h.value-c.minimum)/(c.maximum-c.minimum)),c.kind==="boolean"&&typeof h.value=="boolean"&&(x=h.value),c.kind==="category"&&typeof h.value=="string"&&(x=h.value),c.kind==="preference_score")){let k=g.review.evidence.attempts.findIndex(O=>O.experimentId===_.id&&O.attemptId===g.attempt.attemptId);x=h.value==="tie"?c.tieScore:h.value==="A"||h.value==="B"?h.value===(k===0?"A":"B")?1:0:null}return{...u,status:x===null?"unavailable":"scored",value:x,passed:x===null?null:c.kind==="boolean"?x:c.kind==="normalized_score"&&c.passThreshold!==void 0?Number(x)>=c.passThreshold:null,reasoning:h?.note??null,evidenceRefs:[{id:g.accepted.review.id,contentHash:g.accepted.review.contentHash,mediaType:"application/vnd.openpond.human-review+json",sizeBytes:null},{id:g.accepted.decision.id,contentHash:g.accepted.decision.contentHash,mediaType:"application/vnd.openpond.human-decision+json",sizeBytes:null}]}}),b=a.output!==null&&t.every(u=>u.status==="scored");return{...a,feedback:t,status:b?"completed":a.status,error:b?null:a.error}}),{contentHash:me,...ue}=l.result,le=W({...ue,manifest:{id:B.id,contentHash:B.contentHash},cases:de},B);for(let a of E){let t=await o.readReview({id:a.id,revision:a.revision,contentHash:a.contentHash});(t.contentHash!==a.contentHash||t.status!=="accepted")&&d("human_comparison_review_changed")}return await o.authorize(),{evidence:{manifest:B,result:le},humanResult:D}}I(i,"lane");let p=await i("baseline"),f=await i("candidate");for(let H of[...m.baseline.reviews,...m.candidate.reviews]){let l=await o.readReview(H.review);(l.contentHash!==H.review.contentHash||l.status!=="accepted"||l.decisions.at(-1)?.contentHash!==H.decision.contentHash)&&d("human_comparison_review_changed")}await o.authorize();let v={baseline:{id:n.baseline.manifest.id,manifestHash:n.baseline.manifest.contentHash,resultHash:n.baseline.result.contentHash},candidate:{id:n.candidate.manifest.id,manifestHash:n.candidate.manifest.contentHash,resultHash:n.candidate.result.contentHash}},w=ae.parse({schemaVersion:"openpond.humanComparisonProjection.v1",teamId:o.teamId,projectId:o.projectId,selections:m,original:v,humanResults:{baseline:p.humanResult,candidate:f.humanResult},baseline:p.evidence,candidate:f.evidence});return new TextEncoder().encode(JSON.stringify(w)).byteLength>8388608&&d("human_comparison_projection_too_large"),se.parse({...w,contentHash:r(w)})}I(Ve,"projectAcceptedHumanComparison");function Ce(o,m){let n=se.parse(o),{contentHash:y,...s}=n;y!==r(s)&&d("human_comparison_projection_invalid");for(let i of["baseline","candidate"]){let p=P(n[i]),f=p.manifest.lineage,v=f?.humanProjection,w=n.original[i],H=n.selections[i];(!f||!v||v.originalManifest.id!==w.id||v.originalManifest.contentHash!==w.manifestHash||v.selectionHash!==r(H)||v.rulesHash!==r(n.selections.rules)||r(f.execution)!==r(H.execution)||p.manifest.teamId!==n.teamId||n.humanResults[i].contentHash!==H.resultHash)&&d("human_comparison_projection_lineage_changed");let{contentHash:l,...j}=n.humanResults[i];if((r(j)!==l||j.executionId!==H.execution.id||j.executionHash!==H.execution.contentHash||r(j.selection)!==r(H.reviews.map(_=>_.review)))&&d("human_comparison_human_result_changed"),m){let _=P(m[i]);(_.manifest.lineage?.humanProjection||_.manifest.id!==w.id||_.manifest.contentHash!==w.manifestHash||_.result.contentHash!==w.resultHash||r(_.manifest.lineage?.execution)!==r(H.execution))&&d("human_comparison_original_changed")}}return n}I(Ce,"verifyHumanComparisonProjection");export{M as a,Y as b,ie as c,se as d,Ve as e,Ce as f};
@@ -1,9 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as Qe,b as Ye,c as Ze,d as et,e as tt}from"./chunk-3CDEBKSU.js";import{a as M,b as Ke,d as le}from"./chunk-DPHAN6N3.js";import{R as ut,a as ie,d as Je,e as Xe,g as rt,ga as ct,ha as dt,ia as ft,j as ot,k as at,v as it,w as ue,y as lt}from"./chunk-VRODAXFS.js";import{a as Ge}from"./chunk-LNCHFVHT.js";import{b as pt,c as mt}from"./chunk-4EDIRCD3.js";import{a as Ve}from"./chunk-IFDALGZE.js";import{a as D,b as ze}from"./chunk-EWOSLZDX.js";import{b as $e}from"./chunk-7AVNZF36.js";import{i as Ue}from"./chunk-N6ENLEMY.js";import{a as nt,b as st}from"./chunk-GW766ZSO.js";import{i as je,p as Fe}from"./chunk-GOPFFQZU.js";import{b as Be,d as E,g as G}from"./chunk-57TRXBLT.js";import{b as Le,d as De}from"./chunk-PH6IORGZ.js";import{k as We}from"./chunk-V34H7Y2T.js";import{s as L,u as B,v as ae,z as He}from"./chunk-FKJHEZCW.js";import{Q as qe,m as Ne}from"./chunk-2RNQQNB7.js";import{a as Me}from"./chunk-EUMXMT3S.js";import{a as Oe}from"./chunk-7ED24PP6.js";import{c as Ce}from"./chunk-L3KS6MOV.js";import{a as er}from"./chunk-JFXINDOQ.js";import{g as _e}from"./chunk-JFXWI3EN.js";import{_ as xe,ca as be,fa as Ie}from"./chunk-MNC4YUDI.js";import{F as Te}from"./chunk-Z4Z5UOZM.js";import{o as Ae}from"./chunk-H7IWJN7L.js";import{m as C}from"./chunk-KGNCKIFP.js";import{a as o,e as Zt}from"./chunk-FTQLQJQV.js";import{randomUUID as yr}from"node:crypto";import{mkdir as Pr}from"node:fs/promises";import q from"node:path";function gt(e){return async(t,r)=>{let n=await e?.(t,r)??null;if((t.metadata?.standaloneExperiment!==void 0||t.metadata?.localProfileExperiment!==void 0)&&!n)throw new Error("This native Experiment session has no active durable model-dispatch owner.");return n}}o(gt,"experimentSessionStreamResolver");var wt=Zt(er(),1);import{randomUUID as ce}from"node:crypto";var tr=15e3,rr=3e4;function Or(e){let t=new Set,r=null,n=null;async function p(a){if(!a.profileRef||!a.profileWorkflowId)throw new Error(a.profileMigrationError??`Chat Workflow ${a.id} has no Profile package.`);let u=await e.getSession(a.sessionId),i=await e.resolveProfileOwner(u,a.profileRef),d=await e.readProfilePackage(i.sourcePath,a.profileWorkflowId);return{...a,name:d.name,prompt:d.prompt}}o(p,"authoredWorkflow");async function h(){for(let a of await e.store.listChatWorkflows())if(!(a.profileRef&&a.profileWorkflowId))try{let u=await e.getSession(a.sessionId);if(!u.currentProfile)throw new Error("Original session has no explicit Profile owner.");let i=await e.resolveProfileOwner(u,u.currentProfile),d={...a,profileRef:i.ref,profileWorkflowId:a.profileWorkflowId??`chat-${a.id.toLowerCase()}`,profileMigrationError:null};await e.saveProfilePackage(i.sourcePath,d),await e.store.patchChatWorkflow(a.id,()=>d)}catch(u){let i=`Profile package migration unresolved: ${u instanceof Error?u.message:String(u)}`;await e.store.patchChatWorkflow(a.id,d=>({...d,profileMigrationError:i})),e.logger?.warn("chat workflow Profile migration unresolved",{workflowId:a.id,error:i})}}o(h,"migrateExistingWorkflows");async function w(a){let u=await e.getSession(a.sessionId),i=await e.resolveProfileOwner(u),d=E(),f=X(a.recurrence,new Date,0);if(!f.value)throw new Error(f.error??"This workflow has no future occurrence.");let k={id:ce(),sessionId:u.id,sessionTitle:u.title,sourceTurnId:a.sourceTurnId??null,name:a.name,prompt:a.prompt,profileRef:i.ref,profileWorkflowId:`chat-${ce()}`,recurrence:a.recurrence,enabled:!0,nextRunAt:f.value,lastRunAt:null,lastRunStatus:null,lastRunId:null,lastError:f.error,scheduledRunCount:0,createdAt:d,updatedAt:d};return await e.saveProfilePackage(i.sourcePath,k),e.store.upsertChatWorkflow(k)}o(w,"create");async function v(){if(e.isClosing())return;let a=await e.store.listDueChatWorkflows(E());for(let u of a)if(!t.has(u.id)){if(e.isSessionTurnActive(u.sessionId)){await e.store.patchChatWorkflow(u.id,i=>({...i,nextRunAt:new Date(Date.now()+rr).toISOString(),lastError:"Waiting for the attached chat to finish its current turn.",updatedAt:E()}));continue}await c(u,u.nextRunAt??E(),"schedule")}}o(v,"runTick");function l(){if(n)return n;let a=v().finally(()=>{n===a&&(n=null)});return n=a,a}o(l,"trackedTick");async function c(a,u,i){a=await p(a);let d=E(),f=e.store.home?await Ie(e.store.home):void 0,k={definitionSnapshot:structuredClone(a),...f?{configurationSnapshot:{effectiveRevision:f.effectiveRevision,sources:f.sources}}:{},id:ce(),workflowId:a.id,sessionId:a.sessionId,scheduledFor:u,trigger:i,status:"queued",turnId:null,error:null,createdAt:d,startedAt:null,completedAt:null,updatedAt:d},y=await e.store.insertChatWorkflowRun(k);return t.add(a.id),e.queue.enqueue({label:"chat-workflow-run",metadata:{workflowId:a.id,sessionId:a.sessionId,trigger:i,scheduledFor:u}},async()=>{try{await m(a,y)}finally{t.delete(a.id)}}),y}o(c,"enqueue");async function m(a,u){let i=E();await e.store.patchChatWorkflowRun(u.id,S=>({...S,status:"running",startedAt:i,updatedAt:i}));let d=null,f=null;try{d=await e.sendTurn(a.sessionId,{prompt:a.prompt,metadata:{interactionKind:"scheduled_workflow",chatWorkflowId:a.id,chatWorkflowName:a.name,chatWorkflowRunId:u.id,scheduledFor:u.scheduledFor}})}catch(S){f=S instanceof Error?S.message:String(S)}let k=E(),y=d?.status==="completed"?"succeeded":"failed";await e.store.patchChatWorkflowRun(u.id,S=>({...S,status:y,turnId:d?.id??null,error:f??d?.error??null,completedAt:k,updatedAt:k})),await e.store.patchChatWorkflow(a.id,S=>{let b=S.scheduledRunCount+(u.trigger==="schedule"?1:0),P=u.trigger==="manual"?{value:S.nextRunAt,error:null}:X(S.recurrence,new Date,b);return{...S,enabled:P.value?S.enabled:!1,nextRunAt:S.enabled?P.value:null,lastRunAt:k,lastRunStatus:y,lastRunId:u.id,lastError:P.error??f??d?.error??null,scheduledRunCount:b,updatedAt:k}})}return o(m,"execute"),{async start(){r||(await h(),l().catch(a=>e.logger?.warn("chat workflow tick failed",{error:String(a)})),r=setInterval(()=>{l().catch(a=>e.logger?.warn("chat workflow tick failed",{error:String(a)}))},e.tickMs??tr),r.unref?.())},async stop(){r&&clearInterval(r),r=null,await n?.catch(()=>{})},create:w,async list(a){let u=await e.store.listChatWorkflows({sessionId:a});return Promise.all(u.map(async i=>{try{return await p(i)}catch(d){return{...i,profileMigrationError:d instanceof Error?d.message:String(d)}}}))},listRuns:o(a=>e.store.listChatWorkflowRuns(a),"listRuns"),async patch(a,u){let i=await e.store.getChatWorkflow(a);if(!i)return null;let d=E();if("enabled"in u){let S=u.enabled?X(i.recurrence,new Date,i.scheduledRunCount):{value:null,error:null};return e.store.patchChatWorkflow(a,b=>({...b,enabled:u.enabled&&!!S.value,nextRunAt:u.enabled?S.value:null,lastError:S.error,updatedAt:d}))}let f=X(u.recurrence,new Date,0);if(!i.profileRef||!i.profileWorkflowId)throw new Error(`Chat Workflow ${a} has no resolved Profile owner; migrate it before editing.`);let k=await e.getSession(i.sessionId),y=await e.resolveProfileOwner(k,i.profileRef);return await e.saveProfilePackage(y.sourcePath,{...i,name:u.name,prompt:u.prompt}),e.store.patchChatWorkflow(a,S=>({...S,name:u.name,prompt:u.prompt,recurrence:u.recurrence,enabled:!!f.value,nextRunAt:f.value,lastError:f.error,scheduledRunCount:0,updatedAt:d}))},remove:o(a=>e.store.deleteChatWorkflow(a),"remove"),async runNow(a){let u=await e.store.getChatWorkflow(a);if(!u)throw new Error("Chat workflow not found.");if(e.isSessionTurnActive(u.sessionId))throw new Error("The attached chat is currently running a turn.");return c(u,E(),"manual")}}}o(Or,"createChatWorkflowLoop");var or={sunday:0,monday:1,tuesday:2,wednesday:3,thursday:4,friday:5,saturday:6};function X(e,t,r){try{return{value:de(e,t,r),error:null}}catch(n){return{value:null,error:n instanceof Error?n.message:String(n)}}}o(X,"safeNextOccurrence");function de(e,t,r){if(e.end.kind==="after_occurrences"&&r>=e.end.occurrences)return null;let n=ht(e.startDate,e.localTime,e.timeZone);if(e.kind==="once")return n.getTime()>t.getTime()?n.toISOString():null;let[p,h]=e.localTime.split(":").map(Number),w=e.kind==="daily"?`${h} ${p} * * *`:e.kind==="weekdays"?`${h} ${p} * * 1-5`:e.kind==="weekly"?`${h} ${p} * * ${(e.weekdays??[]).map(c=>or[c]).join(",")}`:`${h} ${p} ${e.dayOfMonth} * *`,v=new Date(Math.max(t.getTime(),n.getTime()-1e3)),l=wt.CronExpressionParser.parse(w,{currentDate:v,tz:e.timeZone}).next().toDate();if(e.end.kind==="on_date"){let c=ht(e.end.date,"23:59",e.timeZone);if(l.getTime()>c.getTime()+59999)return null}return l.toISOString()}o(de,"nextOccurrence");function ht(e,t,r){let[n,p,h]=e.split("-").map(Number),[w,v]=t.split(":").map(Number),l=Date.UTC(n,p-1,h,w,v),c=new Date(l);for(let m=0;m<3;m+=1){let a=new Intl.DateTimeFormat("en-CA",{timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).formatToParts(c),u=Object.fromEntries(a.map(f=>[f.type,f.value])),i=Date.UTC(Number(u.year),Number(u.month)-1,Number(u.day),Number(u.hour),Number(u.minute)),d=l-i;if(d===0)return c;c=new Date(c.getTime()+d)}return c}o(ht,"zonedLocalDateTime");function St(e){return Ae(e,t=>{let r=0,n=0;t.exec("BEGIN IMMEDIATE");try{for(let[p,h,w]of[["local_agent_schedule_runs","local_agent_schedules","scheduleId"],["chat_workflow_runs","chat_workflows","workflowId"]]){let v=t.prepare(`SELECT id, payload FROM ${p} WHERE status IN ('queued','running')`).all();for(let l of v){let c=JSON.parse(l.payload),m=new Date().toISOString(),a=typeof c.turnId=="string"?t.prepare("SELECT payload FROM turns WHERE id = ?").get(c.turnId):void 0,i=(a?JSON.parse(a.payload):null)?.status==="completed",d=i?"The previous scheduled turn completed before shutdown.":"OpenPond stopped before this scheduled run was settled. Its external outcome may be unknown. Review the run before retrying or enabling this schedule.",f=i?"succeeded":"failed";t.prepare(`UPDATE ${p} SET status=?, payload=?, updated_at=? WHERE id=?`).run(f,JSON.stringify({...c,status:f,error:i?null:d,completedAt:m,updatedAt:m}),m,l.id);let k=t.prepare(`SELECT payload FROM ${h} WHERE id = ?`).get(String(c[w]));if(k&&!i){let y=JSON.parse(k.payload);t.prepare(`UPDATE ${h} SET enabled=0, next_run_at=NULL, payload=?, updated_at=? WHERE id=?`).run(JSON.stringify({...y,enabled:!1,nextRunAt:null,lastRunStatus:f,lastRunId:l.id,lastError:d,updatedAt:m}),m,String(c[w]))}if(i&&k&&h==="chat_workflows"){let y=qe.parse(JSON.parse(k.payload)),S=y.scheduledRunCount+(c.trigger==="schedule"?1:0),b=c.trigger==="manual"?y.nextRunAt:de(y.recurrence,new Date(m),S),P=y.enabled&&b!==null;t.prepare("UPDATE chat_workflows SET enabled=?, next_run_at=?, payload=?, updated_at=? WHERE id=?").run(P?1:0,P?b:null,JSON.stringify({...y,enabled:P,nextRunAt:P?b:null,scheduledRunCount:S,lastRunStatus:f,lastRunId:l.id,lastRunAt:m,lastError:null,updatedAt:m}),m,y.id)}i?r+=1:n+=1}}return t.exec("COMMIT"),{recovered:r,needsReview:n}}catch(p){throw t.exec("ROLLBACK"),p}})}o(St,"reconcileInterruptedScheduledWork");async function vt(e,t){let r=nr(e);if(!r)return null;let n=await t.loadProfileState();return r==="help"?sr(n):ar(n)}o(vt,"runProfileSkillCommand");function nr(e){let t=/^\/skill(?:\s+([\s\S]*))?$/i.exec(e.trim());if(!t)return null;let r=t[1]?.trim().toLowerCase()??"";return!r||r==="list"?"list":r==="help"?"help":null}o(nr,"readOnlyProfileSkillAction");function sr(e){return{handled:!0,action:"help",profile:e,message:["Profile skills support:","- /skill list","- /skill create <what the skill should help with>","- /skill create <skill-name>: <what the skill should help with>","- /skill create --name <skill-name> <what the skill should help with>","- /skill edit <skill-name> <change request>","","Create and edit run as normal model turns with the bundled OpenPond Skill Authoring skill. Skills may include SKILL.md plus focused scripts, references, and assets. Use an Agent when the workflow needs code, actions, durable runtime behavior, setup, or Evals."].join(`
3
- `)}}o(sr,"profileSkillHelp");function ar(e){let t=e.skills.slice().sort((n,p)=>n.name.localeCompare(p.name));return{handled:!0,action:"list",message:t.length===0?"No profile skills found in the active profile.":[`Profile skills (${t.length}):`,...t.map(n=>{let p=n.validationStatus==="valid"?"valid":`invalid: ${n.validationMessages.join("; ")}`;return`- ${n.name} (${p}) ${n.path}`})].join(`
4
- `),skills:t,profile:e}}o(ar,"listProfileSkills");import{randomUUID as ir}from"node:crypto";function kt(e){return async function*({messages:t,signal:r}){for await(let n of e({model:Te,messages:t,requestId:`harness-continuous-review:${ir()}`,reasoningEffort:"medium",maxTokens:_e,signal:r}))n.type==="text_delta"&&n.text?yield{text:n.text}:n.type==="usage"&&(yield{usage:{promptTokens:n.usage.prompt_tokens??0,completionTokens:n.usage.completion_tokens??0,totalTokens:n.usage.total_tokens??0}})}}o(kt,"createLocalHarnessEvaluationReviewModelStream");import{promises as _t}from"node:fs";import N from"node:path";import{createHash as lr}from"node:crypto";import{access as ur,readFile as yt}from"node:fs/promises";import x from"node:path";import{fileURLToPath as cr}from"node:url";var Et=["openpond-skill-authoring","openpond-agent-authoring","openpond-refiner-authoring"],Pt={"openpond-skill-authoring":["references/skill-package-layout.md","references/copying-and-adaptation.md","references/validation-and-repair.md"],"openpond-agent-authoring":["references/profile-layout.md","references/action-and-chat-design.md","references/integrations-and-setup.md","references/validation-and-repair.md"],"openpond-refiner-authoring":["references/review-profile.md","references/core-boundary.md","references/validation-and-activation.md"]},Rt=x.dirname(cr(import.meta.url));function Tt(e){return Et.includes(e)}o(Tt,"isBundledAuthoringSkillName");async function At(e=process.cwd()){return Promise.all(Et.map(t=>Q(t,e)))}o(At,"loadBundledAuthoringSkills");async function Q(e,t=process.cwd()){let r=await It(e,t),n=await bt(e,t),p=Ne.find(h=>h.name===e);if(!p)throw new Error(`Built-in OpenPond authoring skill metadata not found: ${e}`);return{...p,path:x.join(r,"SKILL.md"),sourcePath:r,charCount:n.length,sourceHash:lr("sha256").update(n).digest("hex"),validationMessages:[...p.validationMessages],resourceFiles:[...p.resourceFiles]}}o(Q,"loadBundledAuthoringProfileSkill");async function xt(e,t=process.cwd()){let r=await Q(e,t),n=await bt(e,t);return{name:r.name,description:r.description,body:n,path:r.path,sourceHash:r.sourceHash,charCount:r.charCount,packagePath:r.sourcePath,resourceFiles:r.resourceFiles}}o(xt,"readBundledAuthoringProfileSkill");async function bt(e,t=process.cwd()){let r=await It(e,t),[n,...p]=await Promise.all([yt(x.join(r,"SKILL.md"),"utf8"),...Pt[e].map(h=>yt(x.join(r,h),"utf8"))]);return[n.trim(),...p.map((h,w)=>`
5
- ## Bundled reference: ${Pt[e][w]}
6
-
7
- ${h.trim()}`)].join(`
8
- `)}o(bt,"loadBundledAuthoringSkillBundle");async function It(e,t=process.cwd(),r=process.execPath){let n=[x.resolve(t,"apps","cli","skills",e),x.resolve(t,"dist","skills",e),x.resolve(x.dirname(r),"skills",e),x.resolve(Rt,"skills",e),x.resolve(Rt,"..","skills",e)];for(let p of n)if(await ur(x.join(p,"SKILL.md")).then(()=>!0,()=>!1))return p;throw new Error(`Bundled OpenPond authoring skill ${e} was not found. Checked: ${n.join(", ")}`)}o(It,"resolveBundledAuthoringSkillRoot");var Ct=24e3;function Ot(e){return[{name:"refiner_profile_inspect",description:"Inspect the separately versioned active Refiner Review Profile, its immutable release identity, and recent transitions. Use before editing Refiner behavior.",parameters:{type:"object",additionalProperties:!1,properties:{}},execute:o(async t=>I(t.callId,"refiner_profile_inspect",await(await import("./refiner-profile-service-ZK7KAFP5.js")).inspectRefinerProfile(e.storeDir)),"execute")},{name:"refiner_profile_update",description:"Validate and write a complete JSON Refiner Review Profile as a new immutable Refiner release. Activation is explicit; normal Harness refinement never calls this tool.",parameters:{type:"object",additionalProperties:!1,properties:{profile:{type:"object",additionalProperties:!1,properties:{schemaVersion:{type:"string",const:"openpond.refinerReviewProfile.v1"},id:{type:"string",minLength:1,maxLength:120},version:{type:"string",minLength:1,maxLength:120},name:{type:"string",minLength:1,maxLength:200},objective:{type:"string",minLength:1,maxLength:1e4},instructions:{type:"array",maxItems:100,items:{type:"object",additionalProperties:!1,properties:{id:{type:"string",minLength:1,maxLength:120},text:{type:"string",minLength:1,maxLength:1e4}},required:["id","text"]}},allowedProposalRoutes:{type:"array",items:{type:"string",enum:["memory","prompt","skill","agent"]},maxItems:4},allowedExternalRoutes:{type:"array",items:{type:"string",enum:["runtime","product","taskset","training"]},maxItems:4}},required:["schemaVersion","id","version","name","objective","instructions","allowedProposalRoutes","allowedExternalRoutes"]},activate:{type:"boolean"},reason:{type:"string",minLength:1,maxLength:1e4}},required:["profile","activate","reason"]},execute:o(async t=>{let r=await Q("openpond-refiner-authoring");return I(t.callId,"refiner_profile_update",await(await import("./refiner-profile-service-ZK7KAFP5.js")).updateRefinerProfile(e.storeDir,{profile:t.args.profile,activate:t.args.activate,reason:Y(t.args.reason,1e4),actor:`work:${t.session.id}`,authoringSkillHash:r.sourceHash}))},"execute")},{name:"memory_search",description:"Search bounded active Personal Harness memory without loading the full memory corpus into context. Returns ranked stable memory keys and excerpts.",parameters:{type:"object",additionalProperties:!1,properties:{query:{type:"string",minLength:1,maxLength:500},limit:{type:"integer",minimum:1,maximum:20}},required:["query"]},execute:o(async t=>{let r=await D(e.store,t.session.id);if(!r)throw new Error("No Local Harness is selected for this run.");let n=Y(t.args.query,500).toLowerCase(),p=[...new Set(n.split(/[^a-z0-9]+/).filter(l=>l.length>1))],h=typeof t.args.limit=="number"?Math.max(1,Math.min(20,Math.trunc(t.args.limit))):8,v=(await e.store.listHarnessMemories(r.workspace.id)).map(l=>{let c=`${l.key} ${l.tags.join(" ")} ${l.content}`.toLowerCase(),m=p.reduce((a,u)=>a+(c.includes(u)?1:0),0);return{entry:l,score:m}}).filter(({score:l})=>p.length===0||l>0).sort((l,c)=>c.score-l.score||c.entry.updatedAt.localeCompare(l.entry.updatedAt)).slice(0,h).map(({entry:l,score:c})=>({key:l.key,revision:l.revision,score:c,excerpt:l.content.slice(0,1e3),tags:l.tags,updatedAt:l.updatedAt}));return I(t.callId,"memory_search",{query:n,matches:v})},"execute")},{name:"memory_inspect",description:"Read one exact active Personal Harness memory entry returned by memory_search.",parameters:{type:"object",additionalProperties:!1,properties:{key:{type:"string",minLength:1,maxLength:120}},required:["key"]},execute:o(async t=>{let r=await D(e.store,t.session.id);if(!r)throw new Error("No Local Harness is selected for this run.");let n=Y(t.args.key,120).toLowerCase(),p=await e.store.getHarnessMemory(r.workspace.id,n);if(!p||p.status!=="active")throw new Error(`Harness memory does not exist: ${n}.`);return I(t.callId,"memory_inspect",p)},"execute")},{name:"context_read",description:"Read a bounded slice of the current Agent run's canonical host-owned turns or runtime events. This never exposes other conversations or the whole history corpus.",parameters:{type:"object",additionalProperties:!1,properties:{scope:{type:"string",enum:["turns","events"]},limit:{type:"integer",minimum:1,maximum:50}},required:["scope"]},execute:o(async t=>{let r=typeof t.args.limit=="number"?Math.max(1,Math.min(50,Math.trunc(t.args.limit))):12;if(t.args.scope==="turns"){let n=await e.store.turnsForSession(t.session.id,r);return I(t.callId,"context_read",{scope:"turns",values:n.map(p=>Ht(p,6e3))})}if(t.args.scope==="events"){let n=await e.store.runtimeEventsForSession(t.session.id,{limit:r});return I(t.callId,"context_read",{scope:"events",values:n.map(p=>Ht(p,6e3))})}throw new Error("context_read scope must be turns or events.")},"execute")},{name:"harness_inspect",description:"Inspect the immutable Harness release pinned to this Agent run. With no path, returns its release, overlay, and component catalog. With a policy-visible text path, returns bounded exact source content.",parameters:{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,description:"Optional exact Harness-relative source path from the returned catalog."}}},execute:o(async t=>{let r=await D(e.store,t.session.id);if(!r)throw new Error("No Local Harness release is selected for this run.");let n=await e.store.getHarnessRunOverlay(t.session.id),p=N.join(r.release.bundlePath,"source"),h=Oe.parse(JSON.parse(await _t.readFile(N.join(p,"harness.json"),"utf8"))),w=typeof t.args.path=="string"?t.args.path.trim().replaceAll("\\","/"):null,v=null;if(w){let l=h.files.find(m=>m.path===w);if(!l||l.visibility!=="policy")throw new Error(`Harness source is not policy-visible or declared: ${w}`);if(!l.mediaType.startsWith("text/")&&l.mediaType!=="application/json")throw new Error(`Harness source is not inspectable text: ${w}`);let c=await _t.readFile(dr(p,w),"utf8");v={path:w,content:c.slice(0,Ct),truncated:c.length>Ct}}return I(t.callId,"harness_inspect",{workspace:{id:r.workspace.id,name:r.workspace.name,revision:r.workspace.revision,channel:r.workspace.currentChannel},pinnedRelease:{id:r.release.harnessRelease.id,contentHash:r.release.harnessRelease.contentHash,sourceRevision:r.release.sourceRevision},overlay:n?{id:n.id,revision:n.revision,status:n.status,contentHash:n.contentHash}:null,components:h.files.filter(l=>l.visibility==="policy").map(l=>({kind:l.kind,path:l.path,portability:l.portability})),source:v})},"execute")},{name:"skill_inspect",description:"Read one exact textual Skill from the immutable Harness release pinned to this run. Use this before asking the Refiner to update an existing Skill.",parameters:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1,description:"Exact Skill name from harness_inspect."}},required:["name"]},execute:o(async t=>{let r=await D(e.store,t.session.id),n=typeof t.args.name=="string"?t.args.name.trim():"";if(!r?.skillRuntime.readSkill||!n)throw new Error("A valid Skill name and a selected Local Harness are required.");return I(t.callId,"skill_inspect",await r.skillRuntime.readSkill(n))},"execute")},{name:"refine_request",description:"Mark a concrete reusable lesson from the current turn for bounded Harness refinement at the next safe tool boundary. Immediate task recovery remains your responsibility. Do not call for one-off errors or transient facts.",parameters:{type:"object",additionalProperties:!1,properties:{summary:{type:"string",minLength:1,maxLength:2e3},suggestedRoute:{type:"string",enum:["runtime","memory","prompt","skill","agent","product","taskset","training"]}},required:["summary"]},execute:o(async t=>I(t.callId,"refine_request",{queuedAtBoundary:!0,summary:Y(t.args.summary,2e3),suggestedRoute:typeof t.args.suggestedRoute=="string"?t.args.suggestedRoute:null}),"execute")},{name:"refine_status",description:"Inspect bounded Refiner trigger, proposal, route, validation, and outcome status for this Agent run.",parameters:{type:"object",additionalProperties:!1,properties:{}},execute:o(async t=>{let r=await D(e.store,t.session.id);if(!r)throw new Error("No Local Harness is selected for this run.");let n=o(async i=>e.store.listHarnessImprovementArtifacts(r.workspace.id,i,200),"all"),p=(await n("trigger_decision")).filter(i=>i.schemaVersion==="openpond.refinementTriggerDecision.v1").filter(i=>i.runRef===t.session.id),h=new Set(p.map(i=>U(i))),w=o(i=>h.has(U(pe(i.trigger))),"relatedToTrigger"),v=(await n("route_decision")).filter(i=>i.schemaVersion==="openpond.improvementRouteDecision.v1").filter(w),l=(await n("refiner_outcome")).filter(i=>i.schemaVersion==="openpond.harnessRefinerOutcome.v1").filter(w),c=new Set(l.flatMap(i=>{let d=pe(i.proposal);return d.id&&d.contentHash?[U(d)]:[]})),m=(await n("proposal")).filter(i=>i.schemaVersion==="openpond.harnessImprovementProposal.v1").filter(i=>c.has(U(i))),a=o(i=>c.has(U(pe(i.proposal))),"relatedToProposal"),u=[{kind:"trigger_decision",values:p},{kind:"route_decision",values:v},{kind:"proposal",values:m},{kind:"targeted_validation",values:(await n("targeted_validation")).filter(a)},{kind:"apply_receipt",values:(await n("apply_receipt")).filter(a)},{kind:"refiner_outcome",values:l}];return I(t.callId,"refine_status",{runId:t.session.id,artifacts:u})},"execute")}]}o(Ot,"createLocalHarnessModelToolDefinitions");function U(e){return`${String(e.id??"")}:${String(e.contentHash??"")}`}o(U,"artifactRefKey");function pe(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}o(pe,"asRecord");function I(e,t,r){return{toolCallId:e,name:t,ok:!0,contentText:JSON.stringify(r),data:r}}o(I,"modelResult");function Y(e,t){if(typeof e!="string"||!e.trim())throw new Error("A non-empty refinement summary is required.");return e.trim().slice(0,t)}o(Y,"boundedText");function Ht(e,t){let r=JSON.stringify(e);return r.length<=t?e:{truncated:!0,json:r.slice(0,t)}}o(Ht,"boundedJson");function dr(e,t){let r=N.resolve(e),n=N.resolve(r,...t.split("/")),p=N.relative(r,n);if(!p||p.startsWith("..")||N.isAbsolute(p))throw new Error(`Harness source path escapes its release: ${t}`);return n}o(dr,"containedSourcePath");function Wt(){return{loadOpenPondProfileStateForRef:ae,executeProfileSkillCommand:o(({prompt:e,profileRef:t})=>vt(e,{loadProfileState:o(()=>ae(t),"loadProfileState")}),"executeProfileSkillCommand")}}o(Wt,"createProfileTurnDependencies");import{randomUUID as pr}from"node:crypto";import{setTimeout as mr}from"node:timers/promises";async function Lt(e,t){if(t.metadata?.titleSource||t.archived||t.hiddenFromDefaultSidebar)return t;let n=(await e.runtimeEventsForSession(t.id,{names:["session.title.updated"]})).at(-1)?.data,p=n?.session;if(n?.titleSource!=="fallback"||p?.title!==t.title)return t;let[h]=await e.runtimeEventsForSession(t.id,{names:["turn.started"],limit:1}),w=h?.turnId?await e.getTurn(h.turnId):null;return w?.prompt.trim()?await e.updateSession(t.id,v=>v.metadata?.titleSource||v.title!==t.title?v:{...v,metadata:{...v.metadata,titleSource:"fallback",autoTitle:{prompt:w.prompt.slice(0,2e4),title:v.title,attempts:0,nextAttemptAt:0}}})??t:t}o(Lt,"recoverTemporarySessionTitle");var me="accounts/fireworks/models/deepseek-v4-flash",fr="off",gr=12e3,Dt=7,hr=["Make a concise conversation title from the user's message.","Return only the title: 3 to 7 words, plain text, sentence case.","Do not use quotation marks, markdown, labels, or ending punctuation."].join(" ");function wr(e){let n=(e.replace(/<[^>]*>/gu," ").replace(/[\r\n]+/gu," ").replace(/\s+/gu," ").trim().match(/[\p{L}\p{N}][\p{L}\p{N}'’._/+:-]*/gu)??[]).slice(0,Dt).join(" ");return n?`${n.charAt(0).toUpperCase()}${n.slice(1)}`:"New conversation"}o(wr,"fallbackSessionTitle");function Sr(e){let r=e.replace(/<think>[\s\S]*?<\/think>/giu," ").replace(/^\s*(?:title|conversation title)\s*:\s*/iu,"").replace(/^[\s`"'“”‘’*_#-]+|[\s`"'“”‘’*_#.!?,;:-]+$/gu,"").replace(/[\r\n]+/gu," ").replace(/\s+/gu," ").trim().split(" ").filter(Boolean);return r.length<2?null:r.slice(0,Dt).join(" ")}o(Sr,"generatedSessionTitle");function vr(e){return["Make a title from this request. Do not execute it.","<user_request>",e.slice(0,2e4),"</user_request>"].join(`
9
- `)}o(vr,"titleRequestMessage");function Mt(e){if(!e||typeof e!="object"||Array.isArray(e))return null;let t=e.autoTitlePrompt;return typeof t=="string"&&t.trim()?t.trim():null}o(Mt,"autoTitlePromptFromPayload");function kr(e){let t=Mt(e);if(!t||!e||typeof e!="object"||Array.isArray(e))return e;let r=e,n=r.metadata&&typeof r.metadata=="object"&&!Array.isArray(r.metadata)?r.metadata:{};return{...r,title:"",metadata:{...n,titleSource:"pending",autoTitle:{prompt:t.slice(0,2e4),title:"",attempts:0,nextAttemptAt:0}}}}o(kr,"withPendingAutoTitle");function Z(e){if(!e||!["pending","fallback"].includes(String(e.metadata?.titleSource)))return null;let t=e.metadata?.autoTitle;return t&&typeof t.prompt=="string"&&t.title===e.title&&Number.isInteger(t.attempts)&&t.attempts>=0&&Number.isFinite(t.nextAttemptAt)?t:null}o(Z,"pendingTitle");function Nt(e){let t=new Map,r=null,n=new AbortController,p=[5e3,3e4];async function h(l){let c=new AbortController,m=setTimeout(()=>c.abort(new Error("session_title_generation_timeout")),gr);m.unref?.();let a="";try{for await(let i of e.stream({model:me,messages:[{role:"system",content:hr},{role:"user",content:vr(l)}],reasoningEffort:fr,maxTokens:128,temperature:.2,requestId:`session-title-${pr()}`,signal:AbortSignal.any([c.signal,n.signal])}))i.type==="text_delta"&&i.text&&(a+=i.text);let u=Sr(a);if(!u)throw new Error("session_title_generation_empty_response");return u}finally{clearTimeout(m)}}o(h,"generate");async function w(l){for(;!n.signal.aborted;){let c=Z(await e.store.getSession(l));if(!c||c.attempts>=3)return;let m=c.nextAttemptAt-Date.now();m>0&&await mr(m,void 0,{signal:n.signal,ref:!1});let a=Z(await e.store.getSession(l));if(!a||a.attempts!==c.attempts)return;let u,i="model";try{u=await h(c.prompt)}catch(k){if(n.signal.aborted)return;u=wr(c.prompt),i="fallback",e.logger.warn("session title generation used temporary title",{error:k instanceof Error?k.message:String(k),model:me,sessionId:l,attempt:c.attempts+1})}if(n.signal.aborted)return;let d=!1,f=await e.store.updateSession(l,k=>{let y=Z(k);return!y||y.attempts!==c.attempts||y.prompt!==c.prompt?k:(d=!0,{...k,title:u,metadata:{...k.metadata,titleSource:i,autoTitle:i==="model"?null:{...c,title:u,attempts:c.attempts+1,nextAttemptAt:Date.now()+(p[c.attempts]??0)}}})});if(!d||!f||(await e.appendRuntimeEvent(G({sessionId:l,name:"session.title.updated",source:"server",status:"completed",data:{session:f,model:me,titleSource:i}})),i==="model"))return}}o(w,"run");function v(l){if(n.signal.aborted)return Promise.resolve();let c=t.get(l);if(c)return c;let m=w(l).catch(a=>{n.signal.aborted||e.logger.warn("session title generation failed",{error:a instanceof Error?a.message:String(a),sessionId:l})}).finally(()=>t.delete(l));return t.set(l,m),m}return o(v,"schedule"),{wrapCreateSession(l){return this.recover().catch(c=>e.logger.warn("Session title recovery failed",{error:String(c)})),async c=>{let m=await l(kr(c));return Mt(c)&&v(m.id),m}},schedule:v,recover(){return r||(r=(async()=>{for(let l of await e.store.sessionShells()){if(n.signal.aborted)return;let c=await Lt(e.store,l);Z(c)&&v(l.id)}})().finally(()=>{r=null}),r)},async close(){n.abort(),await r?.catch(()=>{}),await Promise.allSettled(t.values())}}}o(Nt,"createSessionTitleService");var Rr=3,Er=["sqlite_store","runtime_event_bus","session_store","hosted_provider","web_search","connected_apps","workspace_tools","command_approvals","harness","refiner","agent_runtime","jsonl_transport"];async function fn(e={}){if(e.runtimeStorage)return(await import("./hosted-app-server-composition-VJQ3FM4I.js")).createHostedOwnedAppServer({...e,runtimeStorage:e.runtimeStorage});let t=q.resolve(e.storeDir??le());return Ke(t,()=>Tr({...e,storeDir:t}))}o(fn,"createOpenPondAppServer");async function Tr(e){let t=q.resolve(e.storeDir??le()),r=!!e.embedding;if(r&&!e.streamOpenPondHostedChatTurn)throw new Error("Embedded Work requires an explicit model-stream adapter.");let n=e.services??{},p=await $(n.webSearch,r,async()=>(await import("./web-search-BPON7H5N.js")).createWebSearchExecutorFromEnv()),h=await $(n.scheduling,r,async()=>(await import("./saved-work-SWHZ4OLO.js")).createHostedSavedWork),w=await $(n.connectedApps,r,async()=>{let[s,g]=await Promise.all([import("./connected-app-executor-UBMGMV76.js"),import("./app-server-connected-apps-SXGZOUJJ.js")]);return{execute:s.createCloudConnectedAppToolExecutor(),list:g.listAppServerIntegrationConnections}}),v=await $(n.tasksets,r,async()=>(await import("./hosted-tasksets-THKM5QY5.js")).executeHostedTasksetAction),l=n.backgroundReview??!r,c=!r&&!!v;await xe(t),l&&await(await import("./refiner-profile-service-ZK7KAFP5.js")).initializeRefinerProfile(t);let m=q.resolve(e.workspaceDir??process.cwd());await Pr(m,{recursive:!0});let a=e.version??Be,u=Fe(),i=Xe({channel:"app-server",logDir:q.join(t,"logs"),metadata:{version:a,runtimeVersion:u,placement:"hosted_work"}});M(()=>i.flush());let d=new Ve(t,{logger:i});M(()=>d.close()),await d.recentTurns(1);let f=d,k=o(async()=>(await be(t)).preferences,"loadRuntimePreferences"),y=St(t);(y.recovered||y.needsReview)&&i.warn("Scheduled work requires review after restart",y);let S=st(e.streamOpenPondHostedChatTurn??je,{enabled:nt()}),b=kt(S),{appendRuntimeEvent:P,closeEventSubscribers:qt,subscribeRuntimeEvents:jt}=lt({logger:i,store:f}),ee=ue({queueId:"turn-follow-up",logger:i}),fe=ue({queueId:"subagent",logger:i});if(e.harness&&e.profileSource)throw new Error("Configure either an explicit Harness source or Profile source for this app-server.");let A=null,z,te;if(e.experimentHarnessSource){if(!e.experimentPolicyClient||e.profileSource||e.harness||e.runtimeStorage)throw new Error("A published standalone Experiment source requires its isolated policy owner and local case store.");let s=e.experimentHarnessSource.sourcePackage;z=await(await import("./published-experiment-source-5TMGLKDM.js")).installPublishedExperimentSource({store:d,storeDir:t,ownerId:e.experimentHarnessSource.ownerId,sourcePackage:s,reference:{harnessRelease:{id:s.harnessRelease.id,contentHash:s.harnessRelease.contentHash},agentSnapshot:{id:s.agentSnapshot.id,contentHash:s.agentSnapshot.contentHash},sourcePackageHash:s.contentHash},createdAt:E()})}if(e.profileSource){let s=e.profileSource;if(!s.repositoryId.trim()||!s.profileId.trim()||!s.sourceRevision.trim())throw new Error("Explicit Profile source requires an identity and accepted revision.");let g=await He({repoPath:s.repoPath,profileId:s.profileId});if(g.mode!=="local"||!g.sourcePath||g.error||g.git?.isRepo&&(g.git.head!==s.sourceRevision||g.git.dirty))throw new Error("Explicit Profile source does not match its accepted revision.");A=await Qe({store:d,storeDir:t,workspaceId:`${Ye}${C({profileId:s.profileId,sourceRevision:s.sourceRevision}).slice(0,24)}`,ownerId:"desktop-personal",name:s.profileId,profile:g,sourceRevision:s.sourceRevision,repositoryId:s.repositoryId})}e.harness&&(await We({store:d,storeDir:t,sourceDir:e.harness.sourceDirectory,id:e.harness.workspaceId,name:e.harness.name,ownerId:"desktop-personal"}),await d.selectHarnessWorkspace({ownerKind:"personal",ownerId:"desktop-personal",workspaceId:e.harness.workspaceId,updatedAt:E()})),await Le({store:d,storeDir:t,loadProfileState:L,now:E}).catch(s=>{i.warn("app-server Harness initialization failed",{error:s})});let V=ot({appendRuntimeEvent:P,findLocalProject:o(s=>ut(d,s),"findLocalProject"),onRepositoryInstructionDiagnostic:o((s,g)=>{i.warn("repository instruction file skipped",{diagnostic:s,sessionId:g.id})},"onRepositoryInstructionDiagnostic")}),{createSession:j,getSession:H,updateSession:re,completeTurn:Ft,failTurn:Bt,interruptTurn:Ut}=dt({store:f,defaultSessionCwd:o(()=>m,"defaultSessionCwd"),appendRuntimeEvent:P,loadAppPreferences:k,loadLastUsedProfile:o(async()=>(await B()).lastUsed,"loadLastUsedProfile")}),ge=Nt({appendRuntimeEvent:P,store:f,logger:i,stream:S}),he=r?j:ge.wrapCreateSession(j),K=it({workspaceDir:m,logger:i,getSession:H,updateSession:re,appendRuntimeEvent:P,sandboxRequest:e.sandboxRequest??(r?async()=>{throw new Error("Sandbox execution is not configured in this app-server deployment.")}:void 0)}),$t=c?await(await import("./local-harness-taskset-review-LQPQBALH.js")).createLocalHarnessTasksetReviewControl({store:d,storeDir:t,evaluationRuntime:{streamOpenPondHostedChatTurn:S,workRuntime:{createSession:j,getSession:H,executeWorkspaceTool:K.executeWorkspaceTool,runtimeEventsForSession:o(s=>f.runtimeEventsForSession(s),"runtimeEventsForSession")},resolveReleasedHarness:o(async()=>{let s=await De(d);return s?{agentSnapshot:s.release.agentSnapshot,harnessRelease:s.release.harnessRelease,instructionContext:s.instructionContext}:null},"resolveReleasedHarness")}}):void 0,we=o(async s=>{await f.upsertApproval(s)},"upsertApproval"),Se=Ue({upsertApproval:we,appendRuntimeEvent:P}),zt=await $(n.projectActions,r,async()=>(await import("./project-action-payload-GHSLE7K3.js")).createProjectActionRunPayload({appendRuntimeEvent:P,resolveProjectRoot:o(async()=>null,"resolveProjectRoot")})),Vt=o(async s=>{try{await f.upsertModelUsageRecord(s)}catch(g){await P(xr(s,g)).catch(()=>{})}},"safeUpsertModelUsageRecord"),ve=l?(await import("./local-harness-improvement-runtime-3T6E7I5Q.js")).createLocalHarnessImprovementRuntime({store:d,storeDir:t,queue:ee,streamOpenPondHostedChatTurn:S,appendRuntimeEvent:P,upsertModelUsageRecord:Vt}):void 0;await ve?.reconcilePending();let oe=e.profileExternalDataset?await(A&&e.profileExternalDatasetClient?(await import("./host-profile-external-dataset-B2AQNSDR.js")).createHostProfileExternalDataset({value:e.profileExternalDataset,release:A,sourceRevision:e.profileSource.sourceRevision,client:e.profileExternalDatasetClient}):Promise.reject(new Error("External Dataset execution requires an explicit private Profile source owner."))):null,Kt=Je({deviceId:`evaluation-${C(t).slice(0,24)}`,storeDir:t,runtimeEventsForSession:o(s=>f.runtimeEventsForSession(s),"runtimeEventsForSession")}),_=A?(await import("./host-profile-evaluation-tools-2URLU5SG.js")).createHostProfileEvaluationTools({storeDir:t,release:A,getTurn:o(s=>f.getTurn(s),"getTurn"),getSession:H,saveOutput:Kt.saveOwnedOutputBytes,recordOutput:o(async(s,g,T)=>{await P({id:yr(),timestamp:new Date().toISOString(),name:"workspace_action_result",source:"server",sessionId:s,turnId:g,action:"work_output_save",status:"completed",output:`Saved ${T.outputRef.title} as immutable case output.`,data:T})},"recordOutput"),authorize:o(async s=>{if(oe){await oe.authorize(s);return}let g=await Pe();if(!g||g.ref.profileId!==e.profileSource?.profileId||g.sourceRevision!==e.profileSource?.sourceRevision)throw new Error("The released evaluation source authority changed.");let T=await d.getHarnessReleaseRecord(A.harnessRelease.contentHash);if(!T||T.harnessRelease.contentHash!==A.harnessRelease.contentHash)throw new Error("The isolated evaluation release is unavailable.")},"authorize")}):null,ke=e.embedding?ft(e.embedding,async(s,g)=>{let T=await f.getTurn(s);if(!T)throw new Error("Embedded turn is unavailable.");let O=await H(T.sessionId),F=O.metadata?.embeddingToolBindings,W=[...g].sort((J,Yt)=>J.name.localeCompare(Yt.name));if(F!==void 0&&C(F)!==C(W))throw new Error("Embedded tool bindings changed; start a new thread.");await re(O.id,{metadata:{...O.metadata,embeddingToolBindings:W}}),await f.updateTurn(s,J=>({...J,metadata:{...J.metadata,toolBindings:W}}))}):void 0,R=ct({executionHost:r?"embedded":"local",storageHome:t,workInputsForSession:e.workInputsForSession,finalizeWorkTurn:e.finalizeWorkTurn,isolatedProfileEvaluationForTurn:_?async s=>{if(s.metadata?.profileEvaluationRun===void 0)return!1;if(!_.ownsSession(s.id))throw new Error("A Profile evaluation target has no actual admitted case owner.");return!0}:void 0,executeProfileEvaluationAction:_?.executeAction,resolveModelTools:_?s=>_.ownsSession(s.session.id)?_.resolveTools(s):ke?.(s)??Promise.resolve([]):ke,...r?{hostedToolFlags:{toolMode:"native",nativeToolTransport:!0,nativeToolProviderDenylist:[],textToolFallback:!1}}:{},attachmentRootDir:q.join(t,"attachments"),store:f,inboxStore:d,createSession:j,upsertApproval:we,getSession:H,updateSession:re,completeTurn:Ft,failTurn:Bt,interruptTurn:Ut,defaultSessionCwd:o(()=>m,"defaultSessionCwd"),findOpenPondApp:o(async s=>Ar(s,m),"findOpenPondApp"),resolveSessionWorkspaceCwd:o(async s=>s.cwd?.trim()||m,"resolveSessionWorkspaceCwd"),ensureCodexRuntime:o(async()=>{throw new Error("The hosted app-server placement uses the OpenPond provider; Codex process hosting is not configured.")},"ensureCodexRuntime"),appendWorkspaceDiffEvent:K.appendWorkspaceDiffEvent,workspaceDiffBaseline:K.workspaceDiffBaseline,appendRuntimeEvent:P,processHarnessImprovementBoundary:ve,executeWorkspaceTool:K.executeWorkspaceTool,executeOpenPondCommand:Se.executeCommand,executeProjectAction:zt,executeDatasetBuilderAction:v,loadOpenPondProfileState:L,...Wt(),...r||n.profileActions===!1?{executeProfileSkillCommand:void 0}:{},loadOpenPondProfileLibrary:B,readOpenPondProfileSkill:Ce,loadSelectedHarnessRuntime:o(s=>tt(d,s),"loadSelectedHarnessRuntime"),ensureHarnessRunOverlay:o(s=>ze({store:d,...s}),"ensureHarnessRunOverlay"),harnessModelTools:Ot({store:d,storeDir:t}).filter(s=>l||!["refiner_profile_inspect","refiner_profile_update","refine_request","refine_status"].includes(s.name)),loadBuiltInOpenPondSkills:o(async()=>[await pt(),...await At()],"loadBuiltInOpenPondSkills"),readBuiltInOpenPondSkill:o(async s=>{if(s==="openpond-taskset-authoring")return mt();if(Tt(s))return xt(s);throw new Error(`Built-in OpenPond skill not found: ${s}`)},"readBuiltInOpenPondSkill"),executeWebSearch:p,createScheduledWork:h,executeConnectedAppTool:w?.execute,listIntegrationConnections:w?.list,loadPersonalizationSoul:o(async()=>(await rt(d,t)).soul,"loadPersonalizationSoul"),loadAppPreferences:k,maybeCreateScaffoldForTurn:V.maybeCreateScaffoldForTurn,hostedSystemPrompt:V.hostedSystemPrompt,appendAssistantText:V.appendAssistantText,appendHostedContextUsage:V.appendHostedContextUsage,streamOpenPondHostedChatTurn:S,turnFollowUpQueue:ee,resolveSessionModelStream:gt(async(s,g)=>await te?.resolveSessionModelStream(s,g)??await e.resolveSessionModelStream?.(s,g)??null),subagentQueue:fe,maxHostedWorkspaceToolRounds:e.experimentHarnessSource?(await import("./experiments-VFQGE4HC.js")).STANDALONE_EXPERIMENT_MAX_POLICY_CALLS:$e(e.maxHostedWorkspaceToolRounds),maxRepeatedInvalidToolRequests:Rr});M(()=>R.close()),await R.recoverPendingSubagentCompletions(),await R.recoverTaskInbox();async function Jt(s,g){let T=await R.resolveNativeAgentApproval(s,g);if(T)return T;let O=await Se.resolveApproval(s,g);if(O)return O;let F=await R.resolveCreateImproveApproval(s,g);if(F)return F;let W=await R.resolveSubagentPatchApplyApproval(s,g);if(W)return W;throw new Error(`Approval not found: ${s}`)}o(Jt,"resolveApproval");let ye=!1,Pe=o(async()=>{if(e.profileSource)return{ref:{source:"openpond_git",repositoryId:e.profileSource.repositoryId,profileId:e.profileSource.profileId},sourceRevision:e.profileSource.sourceRevision};let[s,g]=await Promise.all([B(),L()]);return s.lastUsed&&g.git?.head&&!g.git.dirty?{ref:s.lastUsed,sourceRevision:g.git.head}:null},"selectedEvaluationProfile"),Re=o(async()=>{if(e.profileSource&&A)return et({store:d,release:A,ref:{source:"openpond_git",repositoryId:e.profileSource.repositoryId,profileId:e.profileSource.profileId},sourceRevision:e.profileSource.sourceRevision});let[s,g]=await Promise.all([B(),L()]);if(!s.lastUsed)throw new Error("Select a Profile before loading its workflows.");return Ze({store:d,storeDir:t,ref:s.lastUsed,profile:g,reloadProfile:L})},"listProfileWorkflows");if(z){let s=z;te=(await import("./standalone-experiment-turn-owner-LIAQWTGI.js")).createStandaloneExperimentTurnOwner({store:d,createSession:j,sendTurn:R.sendTurn,interruptSessionTurn:R.interruptSessionTurn,authorizeWorkspace:o(async(g,T)=>{if(T.id!==s.workspace.id||C(T.ownerScope)!==C(s.workspace.ownerScope)||g.sourcePackageHash!==s.workspace.metadata.experimentSourcePackageHash||g.harnessRelease.id!==s.release.harnessRelease.id||g.harnessRelease.contentHash!==s.release.harnessRelease.contentHash)throw new Error("Standalone Experiment source differs from this execution owner's admitted closure.")},"authorizeWorkspace")})}let ne=ie(async()=>{let{createAppServerEvaluations:s}=await import("./app-server-evaluations-N4OMTPCI.js");return s({options:e,store:d,storeDir:t,explicitProfileRelease:A,externalDataset:oe,isolatedProfileTools:_,selectedEvaluationProfile:Pe,listProfileWorkflows:Re,createSessionWithAutoTitle:he,turnRunner:R,streamOpenPondHostedChatTurn:S,publishedExperimentSource:z,standaloneExperimentOwner:te})}),Gt=ne.methods(["listProfileEvaluations","executeProfileEvaluationCase","executeExperimentCase","cancelExperimentCase","executeProfileEvaluationRun","prepareProfileEvaluationRun","runPreparedProfileEvaluation","runProfileEvaluationSuite","compareProfileEvaluationRuns","buildProfileEvaluationReport"]);M(()=>ne.close());let se=ie(async()=>{let{createAppServerHarnessServices:s}=await import("./app-server-harness-services-DDFUMNYC.js");return s({store:d,storeDir:t,backgroundReview:l,harnessEvaluationEnabled:c,harnessEvaluationReviewStream:b,harnessTasksetReview:$t})}),Xt=se.methods(["inspectHarness","reviewHarnessProposal","reviewHarness","acceptHarnessEvaluationReview","materializeHarnessEvaluationTaskset","runHarnessEvaluationBaseline","validateHarness","updateHarnessBackgroundReview","diffHarness","rollbackHarness","inspectRefiner","updateRefiner","activateRefiner","rollbackRefiner"]);M(()=>se.close());let Qt=Ge({ports:at({placement:"hosted_work",connectedAppProviders:w?void 0:[],featureOverrides:{harnessBackgroundReview:l,harnessProposalReview:l,harnessReview:c,harnessEvaluationReview:c,harnessEvaluationReviewAcceptance:c,harnessEvaluationTasksetMaterialization:c,harnessEvaluationBaseline:c,refinerProfiles:l,immutableRefinerAdmission:l},createSession:he,getSession:H,turnsForSession:o(s=>f.turnsForSession(s,1e3),"turnsForSession"),runtimeEventsForSession:o(s=>f.runtimeEventsForSession(s),"runtimeEventsForSession"),sendTurn:R.sendTurn,steerSessionTurn:R.steerSessionTurn,readTaskInbox:R.readTaskInbox,queueTaskInput:R.queueTaskInput,updateTaskInput:R.updateTaskInput,isSessionTurnActive:R.isSessionTurnActive,waitForSessionTurnSettlement:R.waitForSessionTurnSettlement,interruptSessionTurn:R.interruptSessionTurn,resolveApproval:Jt,listProfileWorkflows:Re,loadProfileTrainingSource:o(async()=>{if(!e.profileSource||!A)throw new Error("An explicit published Profile is required for hosted training source export.");return(await import("./profile-training-source-6GOT7AHM.js")).profileTrainingSource({release:A,storeDir:t})},"loadProfileTrainingSource"),...Gt,...Xt,subscribeRuntimeEvents:jt,observeRuntimeOperation:o(s=>{i.info("agent runtime operation",s)},"observeRuntimeOperation")}),close:o(async()=>{ye||(ye=!0,await ge.close(),await Promise.all([ne.close(),se.close(),R.close()]),_?.close(),await Promise.all([ee.drain(),fe.drain()]),await qt(),await d.close(),await i.flush())},"close")}),Ee=Er.filter(s=>(s!=="web_search"||!!p)&&(s!=="connected_apps"||!!w)&&(s!=="refiner"||l));return i.info("app-server ready",{storePath:d.storePath,workspaceDir:m,composition:Ee}),{...Qt,storePath:d.storePath,workspaceDir:m,composition:Ee}}o(Tr,"createOwnedAppServer");function Ar(e,t){return{id:e||Me(t),name:q.basename(t)||"Sandbox workspace",description:null,visibility:"private",gitOwner:null,gitRepo:null,gitHost:null,defaultBranch:null,sandbox:!1,updatedAt:E(),latestDeployment:null}}o(Ar,"workspaceApp");function xr(e,t){return G({sessionId:e.sessionId??void 0,turnId:e.turnId??void 0,name:"diagnostic",source:"server",status:"failed",output:t instanceof Error?t.message:"Failed to persist model usage record.",data:{kind:"model_usage_record_failed",requestId:e.requestId,provider:e.provider,model:e.model}})}o(xr,"runtimeDiagnostic");async function $(e,t,r){if(e!==!1)return e!==void 0?e:t?void 0:r()}o($,"selectService");export{gt as a,Or as b,St as c,kt as d,Tt as e,At as f,xt as g,Ot as h,Wt as i,Nt as j,Er as k,fn as l};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{i as a,j as b,k as c}from"./chunk-IRV6GWGG.js";import"./chunk-NTB2O4RP.js";import"./chunk-ZAN4DYLH.js";import"./chunk-4GPXTISD.js";import"./chunk-OSIO7PLX.js";import"./chunk-DPHAN6N3.js";import"./chunk-LNCHFVHT.js";import"./chunk-GOPFFQZU.js";import"./chunk-57TRXBLT.js";import"./chunk-PH6IORGZ.js";import"./chunk-TG7P7BSV.js";import"./chunk-VGRMAGOK.js";import"./chunk-V34H7Y2T.js";import"./chunk-FKJHEZCW.js";import"./chunk-2RNQQNB7.js";import"./chunk-OQPJ7FJF.js";import"./chunk-EUMXMT3S.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-TKLBP3MM.js";import"./chunk-RBZH6A6M.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import"./chunk-RNIAFXMB.js";import"./chunk-2IHO4GDJ.js";import"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-BFKYRQMA.js";import"./chunk-RZUEVS64.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-H6IW2R22.js";import"./chunk-L3KS6MOV.js";import"./chunk-MQULU465.js";import"./chunk-JMBQYBPI.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as resolveWebLaunchMessages,c as runOpenPondAppServerCli,b as runOpenPondServerCli};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as f}from"./chunk-U2MAPON2.js";import"./chunk-7UH4YDA7.js";import"./chunk-3M53YXEI.js";import{H as J,W as N,X as q,_ as k,aa as A,b as d,ba as B,c as w,e as b,ea as H,fa as I,na as E,oa as M,p as C,pa as T,r as m,s as j,t as x,u as F,v,w as P}from"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import{d as O,f as S,h as g}from"./chunk-H7IWJN7L.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as l}from"./chunk-FTQLQJQV.js";import R from"node:path";import{readFile as p}from"node:fs/promises";var n=l((t,s)=>typeof t[s]=="string"?t[s]:void 0,"stringOption");function a(t){console.log(JSON.stringify(t,null,2))}l(a,"print");function U(t,s){let i=n(t,"keyPath");if(i){let r=JSON.parse(i);if(Array.isArray(r)&&r.length&&r.every(c=>typeof c=="string"&&c.length))return r;throw new f("--key-path must be a JSON array of key segments.")}if(!s)throw new f("Specify a setting key, or --key-path for keys containing dots.");return s.split(".")}l(U,"keyPath");async function G(t,s){let i=S({home:n(t,"home")}),r=s[0]??"get",c=g(i).config;if(r==="path"){console.log(c);return}if(r==="export"){let e=await T(i),o=n(t,"file");o?(await b(R.resolve(o),JSON.stringify(e,null,2),{privateParent:!1}),a({path:R.resolve(o),requiresRebinding:e.requiresRebinding})):a(e);return}if(r==="backup"||r==="restore"){let e=n(t,"file"),o=n(t,"keyFile");if(!e||!o)throw new f(`config ${r} requires --file <encrypted-backup> and --key-file <separate-32-byte-key-file>.`);let u=await p(o),y=u.length===32?u:Buffer.from(u.toString("utf8").trim(),"base64");try{a(r==="backup"?await E(i,e,y):await M(e,i,y))}finally{y.fill(0),u.fill(0)}return}if(r==="collect-orphans"){a(await N(i));return}if(r==="schema"){a(F());return}if(r==="migrate"){let e=n(t,"resolutionFile"),o=e?q.parse(JSON.parse(await p(e,"utf8"))):void 0;a(await k(i,{resolutions:o,sourceAppHome:n(t,"sourceAppHome"),sourceConfig:n(t,"sourceConfig"),sourceBrowserState:n(t,"sourceBrowserState"),dryRun:t.dryRun===!0||t.dryRun==="true"}));return}if(r==="recover"){let e=n(t,"revision");a(e?await x(i,e,n(t,"expectedRevision")??d(await w(c))):await A(i));return}if(r==="restart-migration"){a(await B(i));return}if(r==="effective"){a(await I(i,{projectRoot:n(t,"projectRoot"),accountId:n(t,"accountId")}));return}if(r==="trust"||r==="untrust"){let e=n(t,"projectRoot")??s[1];if(!e)throw new f("Specify the canonical project root with --project-root.");await H(i,e,n(t,"accountId")??"local",r==="trust"),a({root:e,trusted:r==="trust"});return}if(r==="revisions"){a(await m(i));return}if(r==="validate"){let e=n(t,"file")??c;C(await p(e,"utf8"),e,t.project===!0||t.project==="true"?"project":"user"),a({valid:!0,path:e});return}if(r==="replace"){let e=n(t,"file");if(!e)throw new f("config replace requires --file <validated-toml-file>.");a(await j(i,n(t,"expectedRevision")??d(await w(c)),await p(e,"utf8")));return}if(r==="doctor"){let e=await w(c),o=null;try{await v(i)}catch(u){o=O(u,c)}a({home:i,path:c,rawRevision:d(e),issue:o,recoverableRevisions:await m(i),migration:await w(R.join(g(i).runtime,"migration.json"))!==null}),o&&(process.exitCode=1);return}if(await k(i),r==="clear-cache"){await J(i),a({cleared:!0,path:g(i).cache});return}let h=await v(i);if(r==="get"){if(!s[1]&&!t.keyPath){a(h);return}let e=h.document;for(let o of U(t,s[1]))e=e&&typeof e=="object"?e[o]:void 0;a(e??null);return}if(r==="set"||r==="unset"){let e=U(t,s[1]),o;if(r==="set"){let u=n(t,"value")??s[2];if(u===void 0)throw new f("config set requires a value. Use JSON for arrays, tables, numbers and booleans.");try{o=JSON.parse(u)}catch{o=u}}a(await P(i,n(t,"expectedRevision")??h.rawRevision,[r==="set"?{op:"set",path:e,value:o}:{op:"unset",path:e}]));return}throw new f(`Unknown config command: ${r}`)}l(G,"runConfigurationCommand");export{G as runConfigurationCommand};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a,b,c}from"./chunk-PQJTYOR2.js";import"./chunk-GOPFFQZU.js";import"./chunk-2RNQQNB7.js";import"./chunk-OQPJ7FJF.js";import"./chunk-EUMXMT3S.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-TKLBP3MM.js";import"./chunk-RBZH6A6M.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-BFKYRQMA.js";import"./chunk-RZUEVS64.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-MQULU465.js";import"./chunk-JMBQYBPI.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-FWIPHEVA.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as DEFAULT_CONNECTED_APP_TOOL_PATH,b as createCloudConnectedAppToolExecutor,c as resolveCloudConnectedAppToolTarget};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as w,b as u}from"./chunk-YHHF4Q7Y.js";import"./chunk-GUOLMLZN.js";import"./chunk-JUQMSHNR.js";import"./chunk-NPOHW5OU.js";import"./chunk-U2MAPON2.js";import"./chunk-7UH4YDA7.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as o}from"./chunk-3M53YXEI.js";import"./chunk-OLDK2LKJ.js";import"./chunk-BT5YNE5U.js";import{o as m}from"./chunk-SF5HJ7PL.js";import"./chunk-FWIPHEVA.js";import"./chunk-WRI4XKSK.js";import"./chunk-GLUWATL5.js";import"./chunk-QDC4OW3S.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import{b as l}from"./chunk-ES2ISFJC.js";import{a as s}from"./chunk-FTQLQJQV.js";async function y(i,p){let[n,c]=p;if(!n||p.length>2)throw new Error("usage: connected-evidence <list|collection|recorded-list|recorded|import-receipt|summary|case|unmapped|capture|selection|publish|prepare-recorded|upload-part|preview|commit|set-collection> [id] --team <id> [--input-file <path>]");if(o(i,"project")&&!["list","recorded-list"].includes(n))throw new Error("--project filters list commands; other operations retain their exact Project in --input-file.");if(i.local===!0||i.local==="true")throw new Error("Connected evidence is retained by its hosted source owner; select --api-base-url for that owner.");if(c&&!["recorded","import-receipt"].includes(n))throw new Error("This operation does not accept a resource id.");let a=new m(await u(i)),t=AbortSignal.timeout(6e4),d={...o(i,"project")?{projectId:o(i,"project")}:{},...o(i,"cursor")?{cursor:o(i,"cursor")}:{},limit:Number(o(i,"limit")||20)},r=s(async()=>w(i),"input"),e;switch(n){case"list":e=await a.list(d,t);break;case"recorded-list":e=await a.listRecordedExecutions(d,t);break;case"collection":e=await a.collection(t);break;case"recorded":if(!c)throw new Error("Select a recorded execution id.");e=await a.recordedExecution(c,t);break;case"import-receipt":if(!c)throw new Error("Select the original import operation id.");e=await a.readImport(c,t);break;case"summary":e=await a.homeSummary(await r(),t);break;case"case":e=await a.read(await r(),t);break;case"unmapped":e=await a.unmappedEvents(await r(),t);break;case"capture":e=await a.capture(await r(),t);break;case"selection":e=await a.createSelection(await r(),t);break;case"publish":e=await a.publishDataset(await r(),t);break;case"prepare-recorded":e=await a.prepareRecorded(await r(),t);break;case"upload-part":e=await a.uploadPart(await r(),t);break;case"preview":e=await a.preview(await r(),t);break;case"commit":e=await a.commit(await r(),t);break;case"set-collection":e=await a.setCollection(l.object({paused:l.boolean()}).strict().parse(await r()).paused,t);break;default:throw new Error("Unknown connected evidence operation.")}console.log(JSON.stringify(e,null,2))}s(y,"runConnectedEvidenceCommand");export{y as runConnectedEvidenceCommand};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a,b,c,d}from"./chunk-BO5JZYWG.js";import"./chunk-DUURYZOI.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as EnclaveError,d as createEnclaveConnection,b as listUrlModels,c as resolveUrlModel};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p}from"./chunk-ARLOVWQ3.js";import"./chunk-GUOLMLZN.js";import"./chunk-JUQMSHNR.js";import"./chunk-U2MAPON2.js";import"./chunk-7UH4YDA7.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import"./chunk-3M53YXEI.js";import"./chunk-OLDK2LKJ.js";import"./chunk-BT5YNE5U.js";import"./chunk-SF5HJ7PL.js";import"./chunk-FWIPHEVA.js";import"./chunk-WRI4XKSK.js";import"./chunk-GLUWATL5.js";import"./chunk-QDC4OW3S.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{m as resolveGitBranch,f as runAccount,j as runBacktestRun,p as runCheckUpdate,k as runDeployWatch,g as runHealth,d as runLogin,o as runOpentool,e as runProfiles,l as runRepoCreate,n as runRepoPush,b as runTemplateBranches,a as runTemplateStatus,c as runTemplateUpdate,h as runToolList,i as runToolRun};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{d as C}from"./chunk-JQKSXCAJ.js";import"./chunk-GUOLMLZN.js";import{c as x}from"./chunk-JUQMSHNR.js";import"./chunk-U2MAPON2.js";import"./chunk-7UH4YDA7.js";import{c as T,f as j}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as p,f as R}from"./chunk-3M53YXEI.js";import"./chunk-MQULU465.js";import"./chunk-JMBQYBPI.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-OLDK2LKJ.js";import"./chunk-BT5YNE5U.js";import{a as I,e as E,f as H,g as q,h as w,i as W,j as U,k as $,l as P,m as O}from"./chunk-SF5HJ7PL.js";import"./chunk-FWIPHEVA.js";import{d as A}from"./chunk-WRI4XKSK.js";import"./chunk-GLUWATL5.js";import"./chunk-QDC4OW3S.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import{b as m}from"./chunk-ES2ISFJC.js";import{a as v}from"./chunk-FTQLQJQV.js";var y=m.enum(["create","save","publish","begin_version"]),z=m.object({operationId:m.string().trim().min(1).max(240),kind:y,requestHash:m.string().regex(/^[a-f0-9]{64}$/),receipt:w,base:w.nullable()}).strict().superRefine((c,r)=>{let{receipt:e,base:t,kind:a}=c;(t&&(t.teamId!==e.teamId||t.datasetId!==e.datasetId||t.revision+1!==e.revision)||!t&&e.revision!==1)&&r.addIssue({code:"custom",message:"Operation recovery history identity/revision mismatch."}),t&&((t.ownerScope??"workspace")!==(e.ownerScope??"workspace")||t.originProjectId!==e.originProjectId||t.workspace.draft.createdAt!==e.workspace.draft.createdAt)&&r.addIssue({code:"custom",message:"Operation recovery cannot change Dataset ownership or origin."});let s=t?e.workspace.draft.status==="published"?"publish":t.workspace.draft.status==="published"?"begin_version":"save":"create";a!==s&&r.addIssue({code:"custom",message:"Operation recovery kind differs from its retained lifecycle."})});var g=class{constructor(r){this.options=r;let e=new URL(r.baseUrl);if(!["http:","https:"].includes(e.protocol)||e.username||e.password||e.search||e.hash||!r.apiKey.trim()||!r.teamId.trim())throw new Error("A clean API origin and workspace credentials are required.");this.baseUrl=e.toString().replace(/\/+$/,"")}options;static{v(this,"OpenPondDatasetWorkspaceClient")}baseUrl;async list(r={}){let{signal:e,...t}=r,a=H.parse(t),s=new URLSearchParams(Object.entries(a).filter(([,o])=>o!==void 0).map(([o,d])=>[o,String(d)])),i=P.parse(await this.request(`?${s}`,"GET",void 0,e));if(i.teamId!==this.options.teamId||i.datasets.length>a.limit||new Set(i.datasets.map(o=>o.id)).size!==i.datasets.length)throw new Error("Dataset list workspace/page mismatch.");return i}async get(r,e){return this.readback(await this.request(`/${encodeURIComponent(r)}`,"GET",void 0,e),r)}async operationResult(r,e){let t=y.parse(e.kind),a=new URLSearchParams({kind:t,...e.datasetId?{datasetId:e.datasetId}:{}}),s=await this.request(`/operations/${encodeURIComponent(r)}?${a}`,"GET",void 0,e.signal,132*1024*1024);if(s===null)return null;let i=z.parse(s);if(this.readback(i.receipt,i.receipt.datasetId),i.base&&this.readback(i.base,i.receipt.datasetId),i.operationId!==r||i.kind!==t||e.datasetId&&i.receipt.datasetId!==e.datasetId||e.requestHash&&i.requestHash!==e.requestHash)throw new Error("Dataset operation recovery identity/request mismatch.");return i}async beginVersion(r,e,t){let a=U.parse(e),s=this.readback(await this.request(`/${encodeURIComponent(r)}/begin-version`,"POST",a,t),r);if(s.revision!==a.expectedRevision+1||s.workspace.draft.status!=="draft"||!s.publication||!s.workspace.draft.publishedTasksetRef)throw new Error("Editable version receipt mismatch.");return s}async versions(r,e={}){let t=new URLSearchParams(e.beforeRevision===void 0?{}:{beforeRevision:String(e.beforeRevision)}),a=$.parse(await this.request(`/${encodeURIComponent(r)}/versions?${t}`,"GET",void 0,e.signal));if(a.teamId!==this.options.teamId||a.datasetId!==r||a.items.some((s,i)=>i>0&&s.workspaceRevision>=a.items[i-1].workspaceRevision||e.beforeRevision!==void 0&&s.workspaceRevision>=e.beforeRevision))throw new Error("Dataset version history scope/order mismatch.");return a}async version(r,e,t){let a=this.readback(await this.request(`/${encodeURIComponent(r)}/versions/${e}`,"GET",void 0,t),r);if(a.revision!==e||a.workspace.draft.status!=="published")throw new Error("Dataset immutable version mismatch.");return a}async save(r,e){let t=q.parse(r),a=I(t.workspace);if(a.draft.profileId!==this.options.teamId||a.draft.revision!==t.expectedRevision+1)throw new Error("Dataset write scope or revision mismatch.");let s=this.readback(await this.request(`/${encodeURIComponent(a.draft.id)}`,"PUT",t,e),a.draft.id);if(t.originProjectId&&s.originProjectId!==t.originProjectId)throw new Error("Dataset origin Project mismatch.");if(t.ownerScope&&s.ownerScope!==t.ownerScope)throw new Error("Dataset owner scope mismatch.");if(s.workspace.contentHash!==a.contentHash)throw new Error("Dataset write receipt differs from the saved bytes.");return s}async validate(r,e,t){let a=O.parse(await this.request(`/${encodeURIComponent(r)}/validate`,"POST",{expectedRevision:e},t));if(a.teamId!==this.options.teamId||a.datasetId!==r||a.revision!==e)throw new Error("Dataset validation receipt mismatch.");return a}async publish(r,e,t){let a=W.parse(e),s=this.readback(await this.request(`/${encodeURIComponent(r)}/publish`,"POST",a,t),r);if(s.revision!==a.expectedRevision+1||s.workspace.draft.status!=="published"||s.publication?.packageHash!==a.packageHash)throw new Error("Dataset publication receipt mismatch.");return s}readback(r,e){let t=w.parse(r);if(I(t.workspace),t.datasetId!==e||t.teamId!==this.options.teamId)throw new Error("Dataset identity mismatch.");return t}async request(r,e,t,a,s){let i=await(this.options.fetch??fetch)(`${this.baseUrl}/v1/dataset-workspaces${r}`,{method:e,signal:a,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,"Content-Type":"application/json"},...t===void 0?{}:{body:JSON.stringify(t)}});if(!i.ok)throw new Error(`Dataset request failed (${i.status}).`);if(s!==void 0){if(!i.body)throw new Error("Dataset response is empty.");let o=i.body.getReader(),d=[],u=0;try{for(;;){let n=await o.read();if(n.done)break;if(u+=n.value.byteLength,u>s)throw new Error("Dataset recovery exceeds its bounded response.");d.push(n.value)}}finally{await o.cancel()}let h=new Uint8Array(u),l=0;for(let n of d)h.set(n,l),l+=n.length;return JSON.parse(new TextDecoder("utf-8",{fatal:!0}).decode(h))}return i.json()}};async function re(c,r){let[e,t]=r,a=p(c,"team"),s=T(c);if(!a||!s||!e||r.length>2||!["upload","read","list","validate","publish"].includes(e))throw new Error("usage: datasets <upload|read|list|validate|publish> [folder|id] --team <id> --api-base-url <origin> [--operation-id <id>] [--expected-revision <n>] [--publish] [--project <id>]");let i=await A(),o=new g({teamId:a,baseUrl:s,apiKey:await x(i,j(i))}),d=p(c,"operationId"),u;if(e==="list"){if(t)throw new Error("List does not accept a dataset id.");u=await o.list({cursor:p(c,"cursor")||void 0})}else{if(!t)throw new Error(`${e} requires a ${e==="upload"?"folder":"dataset id"}.`);if(e==="read")u=await o.get(t);else if(e==="upload"){if(!d||d.length>220)throw new Error("Upload requires a stable --operation-id of at most 220 characters. Reuse it after an uncertain response.");let h=p(c,"expectedRevision"),l=h?Number(h):0;if(!Number.isSafeInteger(l)||l<0)throw new Error("Expected revision must be a nonnegative integer.");let n=await C({directory:t,teamId:a,expectedRevision:l,datasetId:p(c,"datasetId")||void 0}),k=E({workspace:n.workspace,preparation:null,adapterId:"openpond-hosted-taskset-authoring-v1",now:n.workspace.draft.updatedAt}),f=await o.save({operationId:`${d}:save`,expectedRevision:l,workspace:n.workspace,...p(c,"project")?{originProjectId:p(c,"project")}:{}}),S=await o.get(f.datasetId);if(S.workspace.draft.status==="draft"){let D=await o.validate(f.datasetId,f.revision);if(D.workspaceHash!==n.workspace.contentHash||D.packageHash!==k.contentHash)throw new Error("Hosted validation differs from the captured folder bytes.")}else if(S.publication?.packageHash!==k.contentHash)throw new Error("This dataset was changed after the upload receipt. Read the current version before continuing.");let b=R(c.publish)?await o.publish(f.datasetId,{operationId:`${d}:publish`,expectedRevision:f.revision,workspaceHash:f.workspace.contentHash,packageHash:k.contentHash}):f;u={teamId:a,datasetId:b.datasetId,revision:b.revision,status:b.workspace.draft.status,operationId:d,capturedBytes:n.capturedBytes,sourceHash:n.sourceHash,sourceFiles:n.sourceFiles,workspaceHash:f.workspace.contentHash,packageHash:k.contentHash,publication:b.publication}}else{let h=Number(p(c,"expectedRevision"));if(!Number.isSafeInteger(h)||h<=0)throw new Error(`${e} requires --expected-revision with the retained dataset revision.`);if(e==="validate")u=await o.validate(t,h);else{if(!d)throw new Error("Publish requires a stable --operation-id.");let l=p(c,"workspaceHash"),n=p(c,"packageHash");if(!l||!n)throw new Error("Publish requires --workspace-hash and --package-hash from the retained validation receipt. Keep these pins and the operation id unchanged on retry.");u=await o.publish(t,{operationId:d,expectedRevision:h,workspaceHash:l,packageHash:n})}}}console.log(JSON.stringify(u,null,2))}v(re,"runDatasetsCommand");export{re as runDatasetsCommand};
@@ -1,3 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{u as f}from"./chunk-GUOLMLZN.js";import"./chunk-JUQMSHNR.js";import{a as c}from"./chunk-U2MAPON2.js";import"./chunk-7UH4YDA7.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as p,f as u}from"./chunk-3M53YXEI.js";import"./chunk-OLDK2LKJ.js";import"./chunk-BT5YNE5U.js";import"./chunk-SF5HJ7PL.js";import"./chunk-FWIPHEVA.js";import"./chunk-WRI4XKSK.js";import"./chunk-GLUWATL5.js";import"./chunk-QDC4OW3S.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as r}from"./chunk-FTQLQJQV.js";import d from"node:path";import{access as v}from"node:fs/promises";import{constants as C}from"node:fs";import{createRequire as P}from"node:module";var l=d.join("scripts","desktop-harness.ts");async function $(n,t){let o=await j({options:n,rest:t}),e=await f(o.command,o.args,{cwd:o.cwd,inherit:!0,timeoutMs:0});if(e.code!==0)throw new m(e.code)}r($,"runDesktopTestCommand");async function j(n){let t=n.options,o=n.rest,e=o[0];if(e!=="run"&&e!=="attach")throw new c(D());let a=o.slice(1);if(a.length===0)throw new c("usage: openpond desktop-test run <scenario...> [options]");let g=p(t,"cwd")||n.cwd||process.cwd(),w=await O(g),k=(n.env??process.env).OPENPOND_NODE_BINARY?.trim()||process.execPath,s=[P(import.meta.url).resolve("tsx/cli"),l,"run",...a],h=x(t,e);return h&&s.push(`--${h}`),i(s,"--app",t,"app"),i(s,"--server",t,"server"),i(s,"--token",t,"token"),i(s,"--token-file",t,"tokenFile"),i(s,"--devtools-port",t,"devtoolsPort"),i(s,"--artifacts-dir",t,"artifactsDir"),H(s,t),i(s,"--grep",t,"grep"),i(s,"--timeout-ms",t,"timeoutMs"),u(t.keepHome)&&s.push("--keep-home"),{command:k,args:s,cwd:w}}r(j,"buildDesktopHarnessInvocation");async function O(n){let t=d.resolve(n);for(;;){let o=d.join(t,l);if(await R(o))return t;let e=d.dirname(t);if(e===t)throw new c(`Could not find ${l}. Run this command from the OpenPond source checkout or pass --cwd <repo>.`);t=e}}r(O,"resolveDesktopHarnessRepoRoot");function x(n,t){let o=t==="attach"?"attach":null;for(let e of["isolated","attach","packaged","none"])if(u(n[e])){if(o&&o!==e)throw new c("Choose only one desktop harness launch mode: --isolated, --attach, --packaged, or --none.");o=e}return o}r(x,"resolveLaunchMode");function i(n,t,o,e){let a=p(o,e);a&&n.push(t,a)}r(i,"appendStringFlag");function H(n,t){let o=p(t,"json"),e=p(t,"jsonPath");if(o&&y(o))throw new c("harness --json requires a report path. Use --json <path> or --json-path <path>.");if(o&&e&&o!==e)throw new c("Use only one JSON report path: --json <path> or --json-path <path>.");let a=o||e;a&&n.push("--json",a)}r(H,"appendJsonFlag");function y(n){return/^(true|false|1|0|yes|no)$/i.test(n)}r(y,"isBooleanLiteral");async function R(n){try{return await v(n,C.R_OK),!0}catch{return!1}}r(R,"fileExists");function D(){return["usage: openpond desktop-test run <scenario...> [options]"," openpond desktop-test attach <scenario...> [options]","","Options include --isolated, --attach, --packaged, --none, --app <path>,","--server <url>, --token <token>, --token-file <path>, --devtools-port <port>, --artifacts-dir <path>,","--json <path>, --json-path <path>, --grep <pattern>, --timeout-ms <ms>,","--keep-home, and --cwd <repo>."].join(`
3
- `)}r(D,"desktopHarnessCliUsage");var m=class extends Error{static{r(this,"HarnessCommandFailedError")}exitCode;constructor(t){let o=typeof t=="number"&&t>0?t:1;super(`desktop harness failed with exit code ${o}`),this.name="HarnessCommandFailedError",this.exitCode=o}};export{j as buildDesktopHarnessInvocation,O as resolveDesktopHarnessRepoRoot,$ as runDesktopTestCommand};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{$,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-VGRMAGOK.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{l as AGENT_PROTOCOL_VERSION,m as AGENT_RPC_METHODS,$ as AcpClient,_ as AcpRpcError,Q as AgentCheckpointSchema,P as AgentEffectiveSurfaceSchema,i as AgentEventNameSchema,M as AgentHostStorageClient,t as AgentJsonRpcDispatcher,r as AgentProtocolEnvelopeSchema,u as AgentRpcClient,j as CanonicalAgentEventSchema,aa as ClaudeCliClient,v as ExperimentEnvironmentParamsSchema,I as HOST_STORAGE_CONTRACT_VERSION,y as HarnessReviewStorageParamsSchema,L as HostStorageCapabilitySchema,K as HostStorageRequestSchema,J as HostStorageScopeSchema,A as HostedOutputBeginParamsSchema,B as HostedOutputChunkParamsSchema,C as HostedOutputCompleteParamsSchema,z as HostedOutputIdentitySchema,E as HostedOutputSaveSandboxFileParamsSchema,F as HostedSandboxActionSchema,D as HostedSandboxOutputIdentitySchema,G as HostedSandboxRequestParamsSchema,H as HostedToolAuthorizationParamsSchema,s as InitializeParamsSchema,q as JsonRpcErrorSchema,o as JsonRpcNotificationSchema,n as JsonRpcRequestSchema,p as JsonRpcSuccessSchema,x as RefinerStorageActionSchema,w as TaskInboxStorageParamsSchema,Z as TaskSerialExecutor,Y as TaskSignals,f as agentCompactionDecision,k as canonicalEventHash,e as canonicalHash,d as canonicalJson,S as checkpointHash,O as createAgentRuntimeService,U as createAgentToolCatalog,W as createAgentToolCatalogProjection,R as effectiveSurfaceHash,V as executeAgentTool,X as executeProjectedAgentTool,T as materializeAgentPrompt,a as providerRoundSequence,g as runAgentCompaction,h as runAgentCompactionProgram,N as runAgentJsonlServer,c as runProviderRound,b as runProviderRoundLoop};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as p,b as v}from"./chunk-YHHF4Q7Y.js";import"./chunk-GUOLMLZN.js";import"./chunk-JUQMSHNR.js";import"./chunk-NPOHW5OU.js";import"./chunk-U2MAPON2.js";import"./chunk-7UH4YDA7.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as r}from"./chunk-3M53YXEI.js";import"./chunk-OLDK2LKJ.js";import"./chunk-BT5YNE5U.js";import{v as d,w as s,x as h,y as w}from"./chunk-SF5HJ7PL.js";import"./chunk-FWIPHEVA.js";import"./chunk-WRI4XKSK.js";import"./chunk-GLUWATL5.js";import"./chunk-QDC4OW3S.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as m}from"./chunk-FTQLQJQV.js";async function b(t,e,n){let[a,o]=n,i=r(e,"actor");if(!i||!a||n.length>2)throw new Error("Select --actor, --team and an evaluation command.");if(e.local!==!0&&e.local!=="true")throw new Error("These evaluation owners currently run through the authenticated native bridge. Select --local --server-url with its loopback origin.");let c={...await v(e),actorId:i,projectId:r(e,"project")||null},l=a==="request"?await p(e):a==="list"?t==="schedule"?{operation:a,...r(e,"cursor")?{cursor:r(e,"cursor")}:{},limit:Number(r(e,"limit")||50)}:{operation:a}:{operation:a,id:o};if((a==="request"||a==="list")&&o)throw new Error("This operation does not accept an additional resource id.");let u=AbortSignal.timeout(6e4),f=t==="schedule"?await new s(c).command(d.parse(l),u):await new w(c).command(h.parse(l),u);console.log(JSON.stringify(f,null,2))}m(b,"runEvaluationCoordinationCommand");export{b as runEvaluationCoordinationCommand};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as s,b as l}from"./chunk-YHHF4Q7Y.js";import"./chunk-GUOLMLZN.js";import"./chunk-JUQMSHNR.js";import"./chunk-NPOHW5OU.js";import"./chunk-U2MAPON2.js";import"./chunk-7UH4YDA7.js";import"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as e}from"./chunk-3M53YXEI.js";import"./chunk-OLDK2LKJ.js";import"./chunk-BT5YNE5U.js";import{t as m,u as c}from"./chunk-SF5HJ7PL.js";import"./chunk-FWIPHEVA.js";import"./chunk-WRI4XKSK.js";import"./chunk-GLUWATL5.js";import"./chunk-QDC4OW3S.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a}from"./chunk-FTQLQJQV.js";async function f(t,i){let[r,o]=i,n=e(t,"actor");if(!n||!r||i.length>2)throw new Error("usage: improve <list|read|instructions|request> [id] --team <id> --actor <owner-id> [--input-file <path>] [--local --server-url <loopback-origin>]");let u=m.parse(r==="request"?await s(t):r==="list"?{operation:r,limit:Number(e(t,"limit")||30),...e(t,"cursor")?{cursor:e(t,"cursor")}:{}}:{operation:r,id:o});if(r==="request"&&o||r==="list"&&o)throw new Error("This operation does not accept a candidate id.");let d=new c({...await l(t),actorId:n});console.log(JSON.stringify(await d.command(u,AbortSignal.timeout(6e4)),null,2))}a(f,"runExperimentImprovementsCommand");export{f as runExperimentImprovementsCommand};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import"./chunk-GUOLMLZN.js";import{c as X}from"./chunk-JUQMSHNR.js";import{a as ie,c as ae}from"./chunk-NPOHW5OU.js";import"./chunk-U2MAPON2.js";import"./chunk-7UH4YDA7.js";import{c as Z,f as ee}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as o}from"./chunk-3M53YXEI.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import{Aa as te,Ba as ne,Na as U,Oa as I,Pa as re,Qa as k,Va as j,ia as C}from"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-OLDK2LKJ.js";import"./chunk-BT5YNE5U.js";import{b as K,c as M,d as P,q as W,r as Y}from"./chunk-SF5HJ7PL.js";import"./chunk-FWIPHEVA.js";import{d as V}from"./chunk-WRI4XKSK.js";import{b as Q}from"./chunk-GLUWATL5.js";import"./chunk-QDC4OW3S.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import{Cb as B,Db as J,_a as F,jb as T,ub as D,zb as G}from"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import{m as H}from"./chunk-KGNCKIFP.js";import{b as e}from"./chunk-ES2ISFJC.js";import{a as x}from"./chunk-FTQLQJQV.js";import{readFile as N,stat as z}from"node:fs/promises";var w=e.string().trim().min(1).max(500),oe=e.string().regex(/^[a-f0-9]{64}$/),ue=e.object({schemaVersion:e.literal("openpond.experimentCaseInspection.v1"),teamId:w,executionId:w,manifestHash:oe,receiptId:w,taskId:w,seed:e.string().min(1),input:e.record(e.string(),e.unknown()).nullable(),output:e.unknown().nullable(),error:e.string().nullable(),events:e.array(e.record(e.string(),e.unknown())).max(25),nextEventCursor:w.nullable(),eventCount:e.number().int().nonnegative()}).strict(),fe=ue.extend({contentHash:oe}).strict(),v=class{constructor(s){this.options=s;let n=new URL(s.baseUrl);if(!["http:","https:"].includes(n.protocol)||n.username||n.password||n.search||n.hash||!s.apiKey.trim()||!s.teamId.trim())throw new Error("A clean API origin and workspace credentials are required.");this.baseUrl=n.toString().replace(/\/+$/,"")}options;static{x(this,"OpenPondExperimentInspectionClient")}baseUrl;async case(s,n,r={}){let b=new URLSearchParams(r.afterId?{afterId:w.parse(r.afterId)}:{}),h=await(this.options.fetch??fetch)(`${this.baseUrl}/v1/experiments/${encodeURIComponent(w.parse(s))}/cases/${encodeURIComponent(w.parse(n))}?${b}`,{signal:r.signal,redirect:"error",headers:{Authorization:`Bearer ${this.options.apiKey}`,"X-OpenPond-Team-Id":this.options.teamId,Accept:"application/json"}}),S=await h.json();if(!h.ok)throw new Error(e.object({message:e.string()}).parse(S).message);let a=fe.parse(S),{contentHash:l,...i}=a;if(H(i)!==l||a.teamId!==this.options.teamId||a.executionId!==s||a.receiptId!==n||r.manifestHash&&a.manifestHash!==r.manifestHash||a.events.length>a.eventCount)throw new Error("Case inspection differs from its requested workspace, execution or retained content.");return a}};import{readFile as Re,stat as He}from"node:fs/promises";var q=e.object({source:e.enum(["local","github","openpond_git"]),repositoryId:e.string().trim().min(1),profileId:e.string().trim().min(1)}),Ue=e.object({ref:q,revision:e.string().nullable(),sourceHash:e.string()});var m=e.string().trim().min(1).max(200),d=e.string().regex(/^[a-f0-9]{64}$/),ce=e.enum(["queued","running","cancelling","completed","failed","cancelled","interrupted"]),me=e.object({providerId:e.enum(["openpond","custom-openai-compatible","claude-code"]),modelId:e.string().trim().min(1).max(500),configurationHash:d,maxOutputTokens:e.number().int().positive().max(262144),temperature:e.number().min(0).max(2).optional(),topP:e.number().positive().max(1).optional(),messages:e.array(e.object({role:e.enum(["system","user","assistant"]),content:e.string().max(262144)}).strict()).max(200)}).strict(),Te=e.object({configuration:k,package:C}).strict(),De=e.object({configuration:k,expectedPackageHash:d.optional()}).strict(),Ge=e.object({schemaVersion:e.literal("openpond.localExperimentDefinition.v1"),location:e.literal("local"),id:m,teamId:m,ownerActorId:m,revision:e.number().int().positive(),configuration:k,model:me,packageHash:d,graders:e.array(I).min(1).max(100),availableGraders:e.array(I).min(1).max(1e3),createdAt:e.iso.datetime(),updatedAt:e.iso.datetime(),contentHash:d}).strict(),Be=e.object({operationId:m,definition:U}).strict(),Je=e.object({teamId:m,id:m}).strict(),Ke=e.object({teamId:m,projectId:m.optional(),status:ce.optional(),datasetHash:d.optional(),search:e.string().max(100).optional(),afterId:m.optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),O=e.object({schemaVersion:e.literal("openpond.localExperimentExecution.v1"),location:e.literal("local"),id:m,teamId:m,ownerActorId:m,operationId:m,definition:U,kind:e.enum(["target","scoring"]),executionHash:d,sourceExecution:e.object({id:m,executionHash:d}).strict().nullable(),packageHash:d,maximumCostUsd:e.number().finite().positive(),status:ce,createdAt:e.iso.datetime(),completedAt:e.iso.datetime().nullable(),counts:e.object({pending:e.number().int().nonnegative(),running:e.number().int().nonnegative(),completed:e.number().int().nonnegative(),failed:e.number().int().nonnegative(),cancelled:e.number().int().nonnegative(),unknown:e.number().int().nonnegative()}).strict(),usage:e.object({knownCostUsd:e.number().finite().nonnegative(),costUsd:e.number().finite().nonnegative().nullable(),heldUsd:e.number().finite().nonnegative(),uncertainRequests:e.number().int().nonnegative()}).strict(),cleanupComplete:e.boolean(),error:e.string().max(2e3).nullable()}).strict(),xe=O.omit({definition:!0});function _(t,s){t.kind==="scoring"!=(t.sourceExecution!==null)&&s.addIssue({code:"custom",message:"Only retained scoring passes name an original execution."}),["completed","failed","cancelled","interrupted"].includes(t.status)&&(!t.completedAt||t.counts.pending||t.counts.running)&&s.addIssue({code:"custom",message:"Terminal local execution requires complete population accounting."}),["completed","cancelled"].includes(t.status)&&!t.cleanupComplete&&s.addIssue({code:"custom",message:"Successful completion or cancellation requires confirmed local transport cleanup."}),t.usage.uncertainRequests>0&&t.usage.costUsd!==null&&s.addIssue({code:"custom",message:"Uncertain provider charges cannot claim a measured total."})}x(_,"validateLocalExecutionState");var Me=O.superRefine(_),y=xe.superRefine(_),he=e.object({configuration:j,package:C}).strict(),ge=e.object({configuration:j,expectedPackageHash:e.string().regex(/^[a-f0-9]{64}$/).optional()}).strict(),A=e.object({configuration:j,model:me,packageHash:e.string().regex(/^[a-f0-9]{64}$/),graders:e.array(I).min(1).max(100),availableGraders:e.array(I).min(1).max(1e3),retainedConfigurationHash:e.string().regex(/^[a-f0-9]{64}$/).optional(),configurationHash:e.string().regex(/^[a-f0-9]{64}$/)}).strict().superRefine((t,s)=>{let{configurationHash:n,...r}=t;H(r)!==n&&s.addIssue({code:"custom",message:"Local configuration snapshot bytes changed."})}),{definition:Ve,...Ee}=O.shape,L=e.object({...Ee,kind:e.literal("target"),...A.shape}).strict().superRefine((t,s)=>{let n={configuration:t.configuration,model:t.model,packageHash:t.packageHash,graders:t.graders,availableGraders:t.availableGraders,...t.retainedConfigurationHash?{retainedConfigurationHash:t.retainedConfigurationHash}:{},configurationHash:t.configurationHash};_(t,s),A.safeParse(n).success||s.addIssue({code:"custom",message:"Local Experiment configuration changed."}),(t.operationId!==t.configuration.operationId||t.teamId!==t.configuration.request.teamId||t.maximumCostUsd!==t.configuration.maximumCostUsd)&&s.addIssue({code:"custom",message:"Local Experiment differs from its sealed admission."})}),we=e.object({items:e.array(L).max(100),nextCursor:e.string().nullable()}).strict(),be=e.object({teamId:e.string().min(1).max(200),id:e.string().min(1).max(200),configurationHash:e.string().regex(/^[a-f0-9]{64}$/).optional()}).strict(),Se=e.object({operationId:m,execution:e.object({id:m,executionHash:d}).strict(),graderPackage:C,graders:e.array(re).min(1).max(100),maximumCostUsd:e.number().finite().positive().max(1e4)}).strict(),Qe=Se.omit({graderPackage:!0}),Ie=T,Le=e.object({sessionId:m,turnId:m,source:F,profileRef:q,admissionHash:d,modelConfigurationHash:d,traceHash:d,runtimeEventRefs:e.array(m).max(1e4),startedAt:e.iso.datetime(),completedAt:e.iso.datetime(),outputHash:d,partialOutputAvailable:e.boolean()}).strict(),le=e.object({receiptId:m,taskId:m,seed:e.string(),status:e.enum(["pending","running","completed","failed","cancelled","unknown"]),input:e.record(e.string(),e.unknown()),policyVisibleContext:e.record(e.string(),e.unknown()),output:e.string().nullable(),messages:e.array(e.unknown()).max(4002),grade:ne.nullable(),error:e.string().nullable(),native:Ie.optional(),profileNative:Le.optional(),externalProcess:te.optional()}).strict(),Xe=e.object({execution:e.union([L,y]),cases:e.array(le).max(1e4),contentHash:d}).strict(),ye=e.object({items:e.array(e.object({sequence:e.number().int().positive(),type:e.string().min(1),payload:e.unknown()}).strict()).max(500),nextCursor:e.number().int().positive().nullable()}).strict(),We=e.object({location:e.literal("local"),execution:e.union([L,y]),case:le,trace:ye}).strict(),Ye=e.object({items:e.array(y).max(100),nextCursor:m.nullable()}).strict(),Ze=e.object({execution:y,graders:e.array(I).min(1).max(100),graderPackageHash:d}).strict(),se=e.object({execution:y,manifest:D,result:G}).strict().superRefine((t,s)=>{try{if(B(t),t.manifest.id!==t.execution.id||t.manifest.teamId!==t.execution.teamId||t.manifest.lineage?.execution.id!==(t.execution.sourceExecution?.id??t.execution.id)||t.manifest.lineage.execution.contentHash!==(t.execution.sourceExecution?.executionHash??t.execution.executionHash)||t.manifest.lineage.scoringPassId!==(t.execution.kind==="scoring"?t.execution.id:null)||t.manifest.maximumCostUsd!==t.execution.maximumCostUsd)throw new Error("Portable evidence differs from its retained local execution.")}catch(n){s.addIssue({code:"custom",message:n instanceof Error?n.message:"Local portable evidence verification failed."})}}),pe=e.object({location:e.literal("local"),baseline:se,candidate:se}).strict();async function de(t,s){let[n,r,b]=s,h=o(t,"team");if(t.revision!==void 0)throw new Error("A local Experiment is one immutable run; read it by id rather than a saved configuration revision.");if(n!=="read"&&t.contentHash!==void 0)throw new Error("An exact configuration hash requires the local read action.");if(!h||!n||s.length>(n==="compare"?3:2))throw new Error("Local Experiments require an action and --team; use --server-url for an existing local server.");let S=o(t,"serverUrl")||process.env.OPENPOND_LOCAL_API_URL||ie,a=new URL(S);if(a.protocol!=="http:"||!["localhost","127.0.0.1"].includes(a.hostname)||a.username||a.password||a.search||a.hash||a.pathname!=="/")throw new Error("Local Experiments require an HTTP loopback server origin.");let l=await ae(a.origin);async function i(u,g){let c=await l(new URL("/v1/local-experiments",a),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:h,action:u,payload:g})}),p=await c.json();if(!c.ok)throw new Error(typeof p.error=="string"?p.error:`Local Experiment request failed (${c.status}).`);return p}x(i,"command");async function E(){let u=o(t,"inputFile");if(!u||(await He(u)).size>67108864)throw new Error("Provide a bounded --input-file with exact local configuration and retained package bytes.");return JSON.parse(await Re(u,"utf8"))}x(E,"input");let f;if(n==="prepare-harness"){if(r)throw new Error("Local Profile preparation accepts --input-file rather than an id.");f=await i("prepareHarness",await E())}else if(n==="run"){if(r)throw new Error("Local Run accepts reviewed configuration through --input-file rather than an id.");let u=await E();f=await i(u.package?"run":"runFromRelease",u)}else if(n==="list"){if(r)throw new Error("Local List does not accept an id.");let u=o(t,"status"),g=o(t,"limit"),c=o(t,"project"),p=o(t,"afterId"),R=o(t,"datasetHash"),$=o(t,"search");f=await i("list",{...u?{status:u}:{},...c?{projectId:c}:{},...R?{datasetHash:R}:{},...$?{search:$}:{},...p?{afterId:p}:{},...g?{limit:Number(g)}:{}})}else{if(!r)throw new Error(`${n} requires a local Experiment or scoring pass id.`);let u=o(t,"afterId"),g=o(t,"limit");if(n==="duplicate"){let c=o(t,"operationId");if(!c)throw new Error("Duplicate requires --operation-id for safe replay.");let p=L.parse(await i("read",{id:r})),R=P.parse({...p.configuration,operationId:c,request:{...p.configuration.request,operationId:c},sourceExperimentId:p.id});f=await i("runFromRelease",{configuration:R,expectedPackageHash:p.packageHash})}else if(n==="passes")f=await i("passes",{executionId:r,...u?{afterId:u}:{},...g?{limit:Number(g)}:{}});else if(n==="case"){let c=o(t,"receiptId"),p=o(t,"afterSequence");if(!c)throw new Error("Local case inspection requires --receipt-id from the retained execution.");f=await i("case",{id:r,receiptId:c,...p?{afterSequence:Number(p)}:{},...g?{limit:Number(g)}:{}})}else if(n==="score"){let c=await E();if(c.execution?.id!==r)throw new Error("Local scoring input belongs to a different retained execution.");f=await i("score",c)}else if(n==="compare"){if(!b)throw new Error("Local Compare requires baseline and candidate execution ids.");let c=pe.parse(await i("compare",{baselineId:r,candidateId:b}));f={...c,comparison:J(c.baseline,c.candidate)}}else if(n==="read"){let c=o(t,"contentHash");f=await i("read",{id:r,...c?{configurationHash:c}:{}})}else if(["status","cancel","result","pass"].includes(n))f=await i(n,{id:r});else if(n==="cancel-pass")f=await i("cancel",{id:r});else if(n==="pass-result")f=await i("result",{id:r});else throw new Error(`Local Experiment action is unavailable: ${n}`)}console.log(JSON.stringify(f,null,2))}x(de,"runLocalExperimentsCommand");async function Et(t,s){if(t.local===!0||t.local==="true")return de(t,s);if(t.revision!==void 0||t.contentHash!==void 0)throw new Error("Experiments retain their immutable configuration on the run; definition revisions are not selectable.");let[n,r]=s,b=o(t,"team");if(!b||!n||s.length>(n==="compare"?3:2))throw new Error("usage: experiments <prepare-harness|run|read|list|status|cancel|duplicate|score|passes|pass|cancel-pass|pass-result|result|compare|case> [id] [candidate-id] --team <id> [--input-file <path>] [--operation-id <id>]");let h=await V(),S={teamId:b,apiKey:await X(h,ee(h)),baseUrl:Z(t)??h.apiBaseUrl??Q},a=new Y(S),l;if(n==="prepare-harness"){let i=o(t,"inputFile");if(!i||r||(await z(i)).size>1048576)throw new Error("Harness preparation requires a bounded --input-file with its released target, model and ceiling.");l=await a.prepareHarness(M.parse(JSON.parse(await N(i,"utf8"))))}else if(n==="run"){let i=o(t,"inputFile");if(!i||r)throw new Error("Run requires --input-file with the reviewed configuration and stable operationId.");if((await z(i)).size>1048576)throw new Error("Experiment input exceeds one MiB.");l=await a.run(P.parse(JSON.parse(await N(i,"utf8"))))}else if(n==="list"){if(r)throw new Error("List does not accept an Experiment id.");let i=o(t,"limit");l=await a.list(K.parse({projectId:o(t,"project")||void 0,datasetHash:o(t,"datasetHash")||void 0,search:o(t,"search")||void 0,status:o(t,"status")||void 0,afterId:o(t,"afterId")||void 0,...i?{limit:Number(i)}:{}}))}else{if(!r)throw new Error(`${n} requires an id.`);if(n==="read")l=await a.get(r);else if(n==="status")l=await a.get(r);else if(n==="cancel")l=await a.cancel(r);else if(n==="duplicate"){let i=o(t,"operationId");if(!i)throw new Error("Duplicate requires a stable --operation-id for the new Experiment.");l=await a.duplicate(r,i)}else if(n==="score"){let i=o(t,"inputFile");if(!i||(await z(i)).size>1048576)throw new Error("Score requires --input-file containing an exact execution reference, grader releases and explicit ceiling, within one MiB.");let E=W.parse(JSON.parse(await N(i,"utf8")));if(E.execution.id!==r)throw new Error("Scoring input belongs to a different execution.");l=await a.score(E)}else if(n==="passes")l=await a.scoringPasses(r,{afterId:o(t,"afterId")||void 0});else if(n==="pass")l=await a.scoringPass(r);else if(n==="cancel-pass")l=await a.cancelScoringPass(r);else if(n==="pass-result")l=await a.scoringResult(r);else if(n==="result")l=await a.result(r);else if(n==="case"){let i=o(t,"receiptId");if(!i)throw new Error("Case inspection requires --receipt-id from the retained Experiment.");let E=await a.get(r);l=await new v(S).case(r,i,{manifestHash:E.manifest.contentHash,afterId:o(t,"afterId")||void 0})}else if(n==="compare"){if(!s[2])throw new Error("Compare requires a baseline and candidate execution id.");l=await a.compare(r,s[2])}else throw new Error(`Unknown Experiment action: ${n}`)}console.log(JSON.stringify(l,null,2))}x(Et,"runExperimentsCommand");export{Et as runExperimentsCommand};
@@ -1,8 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{d as r,f as i,k as p}from"./chunk-7UH4YDA7.js";import"./chunk-3M53YXEI.js";import{a as t}from"./chunk-FTQLQJQV.js";function d(){console.log(m())}t(d,"printHelp");function m(){let n=["OpenPond CLI","","Usage:"," openpond [--no-open] [--hostname HOST] [--port PORT]"," openpond <command> [options] [-- passthrough...]"," openpond --version","","Commands:"];for(let o of i()){let s=o.aliases?.length?` (aliases: ${o.aliases.join(", ")})`:"";n.push(` ${o.usage}${s}`);for(let e of o.usages??[])n.push(` ${e}`)}n.push("","Global options:");for(let[o,s]of Object.entries(r).sort(([e],[a])=>e.localeCompare(a))){let e=o.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`);n.push(s==="boolean"?` --${e}`:` --${e} <${s}>`)}return n.push("","Run `openpond <command> --help` for the selected command schema.","Arguments after `--` are passed through without option parsing."),n.join(`
3
- `)}t(m,"formatCliHelp");function l(){return["# OpenPond CLI command reference","","<!-- Generated by `pnpm --dir apps/cli docs:commands`; do not edit by hand. -->","","Parsing, aliases, command help, and this reference use the same authoritative registry.","",...i().map(o=>`## ${o.name}
4
-
5
- \`\`\`text
6
- ${p(o)}
7
- \`\`\``),""].join(`
8
- `)}t(l,"formatCliCommandReference");export{l as formatCliCommandReference,m as formatCliHelp,d as printHelp};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{b as a}from"./chunk-E72UU4VX.js";import"./chunk-PF5R6CMP.js";import"./chunk-FEAKTSRS.js";import"./chunk-2RNQQNB7.js";import"./chunk-OQPJ7FJF.js";import"./chunk-EUMXMT3S.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-TKLBP3MM.js";import"./chunk-RBZH6A6M.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-L3KS6MOV.js";import"./chunk-MQULU465.js";import"./chunk-JMBQYBPI.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as createHostProfileEvaluationTools};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a,b}from"./chunk-ZAN4DYLH.js";import"./chunk-OSIO7PLX.js";import"./chunk-V34H7Y2T.js";import"./chunk-FKJHEZCW.js";import"./chunk-7ED24PP6.js";import"./chunk-RNIAFXMB.js";import"./chunk-2IHO4GDJ.js";import"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-RZUEVS64.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-H6IW2R22.js";import"./chunk-L3KS6MOV.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{b as createHostProfileExternalDataset,a as readHostProfileExternalDataset};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{c as wt,d as vt,e as yt}from"./chunk-GYJQKCEO.js";import{b as gt,c as re,e as Rt}from"./chunk-NTB2O4RP.js";import{a as pt,b as ft}from"./chunk-E72UU4VX.js";import"./chunk-PF5R6CMP.js";import{b as ht}from"./chunk-ZAN4DYLH.js";import{a as ee,b as O,c as te}from"./chunk-4GPXTISD.js";import{a as St}from"./chunk-MFMYWZK2.js";import"./chunk-X4OSOOSU.js";import"./chunk-7K7O3CKY.js";import{b as De,c as Me,d as ze,f as Ne,h as $e}from"./chunk-K44RHALX.js";import{b as je}from"./chunk-EOBHQ3JT.js";import"./chunk-TRQQNFMO.js";import"./chunk-FEAKTSRS.js";import"./chunk-OSIO7PLX.js";import"./chunk-F74GBN6K.js";import"./chunk-P2RSBSCT.js";import"./chunk-I2NXNMRZ.js";import"./chunk-2L5XWJJ5.js";import{a as Je,b as Ze}from"./chunk-OPNRWESL.js";import{b as Ke,c as Qe}from"./chunk-ATAOHSFR.js";import{a as Y}from"./chunk-2WKUBGIF.js";import"./chunk-EQOV34UH.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-JQKSXCAJ.js";import{d as tt,e as st,ga as ct,ha as dt,ia as mt,j as ot,k as it,v as lt,w as X,y as ut}from"./chunk-VRODAXFS.js";import{a as rt}from"./chunk-LNCHFVHT.js";import"./chunk-BL3YH2QU.js";import"./chunk-UCPGRPWY.js";import{b as et}from"./chunk-7AVNZF36.js";import"./chunk-N6ENLEMY.js";import"./chunk-AN525SPP.js";import"./chunk-SYUKES6H.js";import"./chunk-FAYASU7Z.js";import{a as at,b as nt}from"./chunk-GW766ZSO.js";import{p as Ye}from"./chunk-GOPFFQZU.js";import"./chunk-O3RF72BT.js";import"./chunk-KVTBX2UP.js";import"./chunk-IZ6DLEVY.js";import"./chunk-MMQRHR3V.js";import"./chunk-PCSIOUHF.js";import"./chunk-7KWD2I6W.js";import"./chunk-GPVCOEUH.js";import"./chunk-N73MU2C3.js";import"./chunk-BQS7Z4AP.js";import"./chunk-XW6HGSIT.js";import{b as Xe}from"./chunk-57TRXBLT.js";import"./chunk-BE6SS65L.js";import"./chunk-DMFUEUAZ.js";import"./chunk-PSGGOZFM.js";import"./chunk-PH6IORGZ.js";import"./chunk-TG7P7BSV.js";import{F as qe,I as h,K as z,L as Be}from"./chunk-VGRMAGOK.js";import{g as Oe,m as _e}from"./chunk-V34H7Y2T.js";import"./chunk-FKJHEZCW.js";import{a as ge,j as We,k as Ve,t as Ge}from"./chunk-2RNQQNB7.js";import"./chunk-OQPJ7FJF.js";import{a as Fe,o as F,p as Ue,q as U,v as Le,y as Z}from"./chunk-EUMXMT3S.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-TKLBP3MM.js";import"./chunk-RBZH6A6M.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import{a as he}from"./chunk-RNIAFXMB.js";import{a as fe}from"./chunk-2IHO4GDJ.js";import"./chunk-KCJVFLBB.js";import{b as xe}from"./chunk-N4FFQPLR.js";import{a as ke,c as Ae}from"./chunk-AY64VY4E.js";import{a as de,h as Te}from"./chunk-GJ2ZJFDD.js";import"./chunk-BFKYRQMA.js";import"./chunk-RZUEVS64.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-H6IW2R22.js";import"./chunk-L3KS6MOV.js";import"./chunk-MQULU465.js";import"./chunk-JMBQYBPI.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-QDC4OW3S.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import{c as Ie}from"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import{Hb as Q,Ob as J,f as pe,m as Ce}from"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-MNC4YUDI.js";import{V as ce,X as be}from"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import{w as me}from"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import{l as q,m as g,n as M}from"./chunk-KGNCKIFP.js";import{b as n}from"./chunk-ES2ISFJC.js";import{a as r}from"./chunk-FTQLQJQV.js";import{randomUUID as Vt}from"node:crypto";import{promises as _}from"node:fs";import I from"node:path";function Pt(l){let e=new Map,t=new Map;async function o(s,d){let m=(t.get(s)??Promise.resolve()).catch(()=>{}).then(d);t.set(s,m);try{return await m}finally{t.get(s)===m&&t.delete(s)}}r(o,"serial");let a=r((s,d=18e4)=>l.request(z.parse({contractVersion:h,requestId:Vt(),operation:"profile-evaluations/sandbox",params:s}),d),"request");async function c(s,d,m,f){let y=q(f),v=`${d}/${m}/${y}`,b=e.get(s.sessionId)??new Set;if(!b.has(v)){if(f.length>1e7)throw new Error("The public case file exceeds its admitted bound.");for(let R=0;R===0||R<f.length;R+=98304)s.signal.throwIfAborted(),await a({sessionId:s.sessionId,turnId:s.turnId,action:"upload",area:d,path:m,sha256:y,sizeBytes:f.length,offset:R,contentsBase64:f.subarray(R,R+98304).toString("base64")},3e5);b.add(v),e.set(s.sessionId,b)}}r(c,"upload");async function u(s,d=""){let m=[];for(let f of await _.readdir(I.join(s,d),{withFileTypes:!0})){let y=I.posix.join(d,f.name);if(f.isSymbolicLink()){let v=await _.realpath(I.join(s,y));if(!v.startsWith(`${await _.realpath(s)}${I.sep}`)||(await _.stat(v)).isDirectory())throw new Error("The public Agent runtime symlink escapes its file closure.");m.push(y);continue}if(f.isDirectory()?m.push(...await u(s,y)):f.isFile()&&m.push(y),m.length>8192)throw new Error("The public Agent runtime exceeds the file limit.")}return m}return r(u,"runtimeFiles"),{execute:r(s=>o(s.sessionId,async()=>{s.signal.throwIfAborted();for(let[f,y]of Object.entries(s.publicHashes)){let v=await _.realpath(I.join(s.sourceRoot,f)),b=await _.realpath(s.sourceRoot);if(!v.startsWith(`${b}${I.sep}`))throw new Error("The public case file escaped its source root.");let R=await _.readFile(v);if(q(R)!==y)throw new Error("The public case file changed before upload.");await c(s,"policy",f,R)}if(s.runtimeRoot)for(let f of await u(s.runtimeRoot))await c(s,"runtime",f,await _.readFile(I.join(s.runtimeRoot,f)));let d=I.relative(s.sourceRoot,s.cwd??s.sourceRoot);if(d.startsWith("..")||I.isAbsolute(d))throw new Error("The command cwd escaped the admitted case.");let m=n.object({code:n.number().int().nullable(),stdout:n.string().max(75e4),stderr:n.string().max(75e4),timedOut:n.boolean(),stdoutTruncated:n.boolean(),stderrTruncated:n.boolean()}).parse(await a({sessionId:s.sessionId,turnId:s.turnId,action:"exec",command:s.command,stdin:s.stdin,cwd:d.split(I.sep).join("/"),timeoutMs:s.timeoutMs},s.timeoutMs+15e3));return s.signal.throwIfAborted(),m}),"execute"),readOutput:r(s=>o(s.sessionId,async()=>{let d=pt(s.path),m=[],f=null,y=null;for(let b=0;f===null||b<f;b+=98304){s.signal.throwIfAborted();let R=n.object({sizeBytes:n.number().int().min(1).max(1e7),sha256:n.string().regex(/^[a-f0-9]{64}$/),contentsBase64:n.string().max(131072)}).parse(await a({sessionId:s.sessionId,turnId:s.turnId,action:"read",path:d,offset:b},6e4));f??=R.sizeBytes,y??=R.sha256;let p=Buffer.from(R.contentsBase64,"base64");if(R.sizeBytes!==f||R.sha256!==y||p.length!==Math.min(98304,f-b)||p.toString("base64")!==R.contentsBase64)throw new Error("The confined output changed during readback.");m.push(p)}let v=Buffer.concat(m);if(q(v)!==y)throw new Error("The confined output differs from its saved byte identity.");return s.signal.throwIfAborted(),{bytes:v,title:d.split("/").at(-1)}}),"readOutput"),settle:r((s,d)=>o(s,async()=>{try{await a({sessionId:s,turnId:d,action:"stop"},6e4)}finally{e.delete(s)}}),"settle")}}r(Pt,"createHostedProfileCommandOwner");import{randomUUID as Lt}from"node:crypto";var j=98304;function Ht(l){let e=r((t,o)=>l.request(z.parse({contractVersion:h,requestId:Lt(),operation:t,params:o})),"request");return{persistence:{sourceTurnStartedAt:r(async()=>{throw new Error("The case owner must supply its actual turn start time.")},"sourceTurnStartedAt"),saveSandboxFile:r(async()=>{throw new Error("Isolated Profile outputs must be read by the confined case owner.")},"saveSandboxFile"),save:r(async({sessionId:t,turnId:o,identity:a,bytes:c})=>{let u=n.object({uploadId:n.string().min(1),maxChunkBytes:n.literal(j)}).parse(await e("output/begin",{sessionId:t,turnId:o,output:a}));for(let d=0;d<c.length;d+=j){let m=c.subarray(d,d+j);await e("output/chunk",{uploadId:u.uploadId,index:d/j,offset:d,sha256:q(m),contentsBase64:m.toString("base64")})}let{outputRef:s}=n.object({outputRef:Ge}).parse(await e("output/complete",{uploadId:u.uploadId}));if(s.location.kind!=="managed"||s.sha256!==a.sha256||s.sizeBytes!==c.length||s.sourceTaskId!==t||s.sourceTurnId!==o||s.id!==a.id||s.revision!==a.revision)throw new Error("The durable case output differs from its saved identity.");return{outputRef:s,artifact:{artifactRef:s.location.fileId,path:s.location.downloadPath,title:s.title,contentType:s.contentType,sizeBytes:s.sizeBytes}}},"save")},read:r(async(t,o)=>{if(t.location.kind!=="managed"||t.sizeBytes>1e7)throw new Error("Select a bounded managed case output.");let a=[];for(let u=0;u<t.sizeBytes;u+=j){o?.throwIfAborted();let s=n.object({offset:n.number().int(),contentsBase64:n.string().max(131072),sha256:n.string(),sizeBytes:n.number().int()}).parse(await e("output/readBytes",{sessionId:t.sourceTaskId,turnId:t.sourceTurnId,fileId:t.location.fileId,revision:t.revision,sha256:t.sha256,sizeBytes:t.sizeBytes,offset:u})),d=Buffer.from(s.contentsBase64,"base64");if(s.offset!==u||s.sha256!==t.sha256||s.sizeBytes!==t.sizeBytes||d.length!==Math.min(j,t.sizeBytes-u)||d.toString("base64")!==s.contentsBase64)throw new Error("The durable workbook byte range changed.");a.push(d)}o?.throwIfAborted();let c=Buffer.concat(a);if(q(c)!==t.sha256)throw new Error("The durable workbook differs from its sealed hash.");return c},"read")}}r(Ht,"createHostedProfileArtifactOwner");import{randomUUID as Gt}from"node:crypto";var $t=n.object({createdAt:n.string().datetime(),id:n.string().min(1)}).strict(),Kt=n.object({entries:n.array(n.unknown()).max(100),nextBefore:$t.nullable()}).strict(),se=class{constructor(e){this.client=e}client;static{r(this,"HostedProfileEvaluationStorage")}execute(e){return this.client.request({contractVersion:h,requestId:Gt(),operation:"profile-evaluations/execute",params:e})}async get(e,t,o){let a=await this.execute({action:"get",kind:e,id:t});if(a===null)return null;let c=o.parse(a);return M(c,`Hosted Profile evaluation ${e}`),c}async put(e,t,o,a,c){let u=o.parse(t);M(u,`Hosted Profile evaluation ${e}`);let s=o.parse(await this.execute({action:"put",kind:e,payload:u,profileKey:a,createdAt:c}));if(s.contentHash!==u.contentHash||g(s)!==g(u))throw new Error("Hosted Profile evaluation write returned different evidence.");return s}async page(e,t,o){let a=[],c=null;do{let u=Kt.parse(await this.execute({action:"page",kind:e,profileKey:g(F.parse(t)),before:c,limit:100}));if(u.nextBefore&&(u.entries.length===0||c&&(u.nextBefore.createdAt>c.createdAt||u.nextBefore.createdAt===c.createdAt&&u.nextBefore.id>=c.id)))throw new Error("Hosted Profile evaluation cursor did not advance.");for(let s of u.entries){let d=o.parse(s);M(d,`Hosted Profile evaluation ${e}`),a.push(d)}if(a.length>1e4)throw new Error("Hosted Profile evaluation history exceeds the bounded catalog limit.");c=u.nextBefore}while(c);return a}getProfileEvaluationGrade(e){return this.get("grade",e,me)}saveProfileEvaluationGrade(e){return this.put("grade",e,me,null,new Date().toISOString())}getProfileEvaluationReceipt(e){return this.get("receipt",e,pe)}saveProfileEvaluationReceipt(e){if(!Ce(e))throw new Error("Hosted Profile evaluation receipt is invalid.");return this.put("receipt",e,pe,null,e.completedAt)}getProfileEvaluationRun(e){return this.get("run",e,Y)}saveProfileEvaluationRun(e){return this.put("run",e,Y,g(F.parse(e.profileRef)),e.completedAt)}listProfileEvaluationRuns(e){return this.page("run",e,Y)}getProfileEvaluationComparison(e){return this.get("comparison",e,Q)}saveProfileEvaluationComparison(e,t){return this.put("comparison",t,Q,g(F.parse(e)),t.createdAt)}listProfileEvaluationComparisons(e){return this.page("comparison",e,Q)}getProfileEvaluationSuiteRun(e){return this.get("suite",e,J)}saveProfileEvaluationSuiteRun(e,t,o){if(g(t)!==o.catalogHash)throw new Error("Hosted Profile evaluation suite differs from its catalog.");return this.put("suite",o,J,g(F.parse(e)),o.createdAt)}listProfileEvaluationSuiteRuns(e){return this.page("suite",e,J)}};async function Et(l){let e=l.release;if(!e.hostExecution)throw new Error("Hosted evaluation requires explicit host execution attribution.");let t={hostConversationId:e.hostExecution.conversationId,hostTurnId:e.hostExecution.turnId},o={source:"openpond_git",profileId:e.profileId,repositoryId:e.repositoryId},a=r(async()=>({ref:o,sourceRevision:e.sourceRevision}),"selectedProfile"),c=r(()=>re(l.client,e),"selectedWorkflows"),u=new se(l.client),s=r(async p=>{if(g(p)!==g(e.harnessRelease))throw new Error("Evaluation requires the admitted Profile release.");let S=await O(l.client,p);if(!S)throw new Error("Admitted evaluation Profile is unavailable.");return S},"loadRuntime"),d=r(async p=>{if(g(p.ref)!==g(o)||p.sourceRevision!==e.sourceRevision)throw new Error("Evaluation requires the admitted Profile source.");return je({...p,runtime:await s(p.harnessRelease)})},"loadCatalog"),m=l.externalDataset?await ht({value:l.externalDataset,release:(await s(e.harnessRelease)).release,sourceRevision:e.sourceRevision,client:l.client}):null,f=r(async(p,S,x)=>{if(S!==e.profileId)throw new Error("Evaluation Taskset Profile differs from its admitted source.");let E=await Ne({definition:p,harnessRelease:x,runtime:await s(x)});if(!E)throw new Error("Evaluation Taskset is absent from the admitted Profile release.");return E},"loadTasksetPackage"),y=wt({resolveExternalDataset:m?.resolveExternalDataset,store:{runtimeEventsForTurn:r(p=>l.core.runtimeEventsForTurn(p),"runtimeEventsForTurn")},storeDir:l.storeDir,readManagedArtifact:l.readManagedArtifact,admitSession:l.admitSession,settleSession:l.settleSession,loadCatalog:d,loadTasksetPackage:f,selectedProfile:a,createSession:r(p=>{let S=Le.parse(p);return l.createSession({...S,metadata:{...S.metadata,...t}})},"createSession"),sendTurn:r((p,S)=>{let x=Z.parse(S);return l.sendTurn(p,{...x,metadata:{...x.metadata,...t}})},"sendTurn"),interruptSessionTurn:l.interruptSessionTurn}),v=$e({resolveExternalDataset:m?.resolveExternalDataset,sourceCandidate:m?.sourceCandidate,privateGradingPreflight:r(p=>Me(p,!1),"privateGradingPreflight"),loadCatalog:d,selectedWorkflows:c,loadTasksetPackage:f,placement:"remote",boundedWorkComputeAvailable:!0,modelConfigurationHash:r(async(p,S)=>{if(p.providerId!=="openpond"||!S.hostModelConfigurationHash)throw new Error("Hosted evaluation requires a host-admitted model configuration receipt.");return S.hostModelConfigurationHash},"modelConfigurationHash")}),b=vt({resolveExternalDataset:m?.resolveExternalDataset,store:u,loadCatalog:d,loadTasksetPackage:f,selectedProfile:a,executeCase:y,privateGrading:r((p,S,x)=>ze({manifest:p,packageValue:S,signal:x,executeSandboxVerifier:De(l.client),authorize:r(async()=>{let E=p.profileEvaluation;if(!E||E.profileId!==e.profileId||E.sourceRevision!==e.sourceRevision)throw new Error("The hosted private grading source changed.");if(E.externalDatasetBinding){if(!m)throw new Error("The frozen Dataset owner is unavailable.");await m.authorize({bindingHash:E.externalDatasetBinding.contentHash,manifestHash:p.contentHash})}let B=await d({ref:o,sourceRevision:e.sourceRevision,harnessRelease:E.harnessRelease});if(!E.externalDatasetBinding&&B.catalogHash!==E.catalogHash)throw new Error("The hosted private grading catalog changed.")},"authorize")}),"privateGrading")}),R={getProfileEvaluationRun:u.getProfileEvaluationRun.bind(u),getProfileEvaluationReceipt:u.getProfileEvaluationReceipt.bind(u),getProfileEvaluationGrade:u.getProfileEvaluationGrade.bind(u),getSession:l.core.getSession.bind(l.core),getTurn:l.core.getTurn.bind(l.core),runtimeEventsForTurn:l.core.runtimeEventsForTurn.bind(l.core),listModelUsageRecords:l.core.listModelUsageRecords.bind(l.core)};return{prepareProfileEvaluationRun:v,executeProfileEvaluationCase:y,executeProfileEvaluationRun:b,runPreparedProfileEvaluation:r(async p=>b(await v(p,{requireExpectedManifestHash:!0})),"runPreparedProfileEvaluation"),runProfileEvaluationSuite:yt({store:u,loadCatalog:d,selectedWorkflows:c,prepareRun:v,executeRun:b}),compareProfileEvaluationRuns:Je({store:u,selectedProfile:a}),buildProfileEvaluationReport:r(p=>Ze({store:u,profileRef:o,request:p}),"buildProfileEvaluationReport"),listProfileEvaluations:r(async p=>{if(p&&typeof p=="object"&&"runId"in p)return Qe({store:R,profileRef:o,...Ke.parse(p)});let[S,x,E,B]=await Promise.all([d({ref:o,sourceRevision:e.sourceRevision,harnessRelease:e.harnessRelease}),u.listProfileEvaluationRuns(o),u.listProfileEvaluationComparisons(o),u.listProfileEvaluationSuiteRuns(o)]);return{...S,runs:x,comparisons:E,suiteRuns:B}},"listProfileEvaluations")}}r(Et,"createHostedProfileEvaluationRuntime");import{mkdir as lr}from"node:fs/promises";import{randomUUID as Dt}from"node:crypto";import W from"node:path";import{randomUUID as bt}from"node:crypto";var Qt=n.object({revision:n.number().int().nonnegative(),payload:n.record(n.string(),n.unknown()).nullable()}).strict(),Jt=n.object({entries:n.array(n.unknown()).max(100),nextAfterId:n.string().min(1).nullable()}).strict(),oe=class{constructor(e){this.client=e}client;static{r(this,"HostedHarnessStateStorage")}async getPreference(e,t){return Qt.parse(await this.client.request({contractVersion:h,requestId:bt(),operation:"harness/state/read",params:{workspaceId:e,kind:t,afterId:null,limit:1}}))}async listCandidates(e){return(await this.readAll(e,"candidates")).map(t=>ke.parse(t))}async listCrossRunRequests(e){return(await this.readAll(e,"cross_run_requests")).map(t=>Ae.parse(t))}async readAll(e,t){let o=[],a=null;do{let c=Jt.parse(await this.client.request({contractVersion:h,requestId:bt(),operation:"harness/state/read",params:{workspaceId:e,kind:t,afterId:a,limit:Math.min(100,1001-o.length)}}));if(c.nextAfterId&&(c.entries.length===0||c.nextAfterId===a))throw new Error("Hosted Harness state cursor did not advance.");if(o.push(...c.entries),o.length>1e3)throw new Error("Hosted Harness state exceeds 1,000 entries.");a=c.nextAfterId}while(a);return o}};import{randomUUID as Zt}from"node:crypto";import{cp as Yt,mkdir as Xt,rm as er}from"node:fs/promises";import tr from"node:path";var we=n.object({schemaVersion:n.literal("openpond.harnessMemoryEntry.v1"),id:n.string(),workspaceId:n.string(),key:n.string(),content:n.string(),tags:n.array(n.string()),revision:n.number().int().positive(),status:n.enum(["active","deleted"]),sourceRunId:n.string().nullable(),sourceProposal:n.object({id:n.string(),contentHash:n.string()}).nullable(),createdAt:n.string().datetime(),updatedAt:n.string().datetime(),contentHash:n.string().regex(/^[a-f0-9]{64}$/)}).strict(),rr=n.object({createdAt:n.string().datetime(),id:n.string()}).strict(),Tt=n.object({entries:n.array(n.unknown()).max(100),nextBefore:rr.nullable()}).strict(),ve=n.object({workspace:de,receipt:Te}).strict(),ae=class{constructor(e,t){this.client=e;this.storeDir=t;this.usage=new Rt(e),this.overlay=new ee({request:r(async o=>o.operation==="harness/overlay/get"?this.request({action:"overlay_get",...o.params}):o.operation==="harness/overlay/freezeProposal"?this.request({action:"overlay_freeze",...o.params},o.requestId):e.request(o),"request")})}client;storeDir;static{r(this,"HostedHarnessReviewStorage")}harnessStoragePlacement="hosted";reviewSessionId=null;overlay;usage;request(e,t=Zt()){return this.client.request({contractVersion:h,requestId:t,operation:"harness/review/execute",params:e},e.action==="release_put"?6e4:15e3)}sessionId(){if(!this.reviewSessionId)throw new Error("Hosted review memory requires an admitted review session.");return this.reviewSessionId}async prepareReview(e){let t=await this.getSession(e.runRef);if(!t)throw new Error("Hosted review session is unavailable.");this.reviewSessionId=t.id;let o=await this.getHarnessRunOverlay(t.id);if(!o)throw new Error("Hosted review overlay is unavailable.");let a=await this.getHarnessWorkspace(o.workspace.workspaceId);if(!a?.currentChannel.release)throw new Error("Hosted review workspace release is unavailable.");let c=await this.getHarnessReleaseRecord(a.currentChannel.release.contentHash);if(!c||c.sourceRevision!==a.sourceRevision)throw new Error("Hosted review source binding changed.");let u=Oe(this.storeDir,a.id);await Xt(u.root,{recursive:!0,mode:448}),await er(u.source,{recursive:!0,force:!0}),await Yt(tr.join(c.bundlePath,"source"),u.source,{recursive:!0,force:!1,errorOnExist:!0});let s=await _e({workspaceId:a.id,sourceDir:u.source});if(s.sourceRevision!==a.sourceRevision||s.harnessRelease.contentHash!==c.harnessRelease.contentHash)throw new Error("Hosted review source cache differs from its immutable release.")}getHarnessWorkspace=r(async e=>de.nullable().parse(await this.request({action:"workspace_get",workspaceId:e})),"getHarnessWorkspace");getHarnessReleaseRecord=r(async e=>fe.nullable().parse(await this.request({action:"release_get",contentHash:e})),"getHarnessReleaseRecord");saveHarnessReleaseRecord=r(async e=>fe.parse(await this.request({action:"release_put",record:e},`review-release:${e.harnessRelease.contentHash}`)),"saveHarnessReleaseRecord");getHarnessRunOverlay=r(e=>this.overlay.getHarnessRunOverlay(e),"getHarnessRunOverlay");createHarnessRunOverlay=r(e=>this.overlay.createHarnessRunOverlay(e),"createHarnessRunOverlay");freezeHarnessRunOverlayWithProposalAtomically=r(e=>this.overlay.freezeHarnessRunOverlayWithProposalAtomically(e),"freezeHarnessRunOverlayWithProposalAtomically");getHarnessBackgroundReviewSettings=r(async e=>n.object({enabled:n.boolean(),updatedAt:n.string().datetime().nullable()}).strict().parse(await this.request({action:"background_get",workspaceId:e})),"getHarnessBackgroundReviewSettings");getHarnessMemory=r(async(e,t)=>we.nullable().parse(await this.request({action:"memory_get",workspaceId:e,sessionId:this.sessionId(),key:t})),"getHarnessMemory");listHarnessMemories=r(async(e,t={})=>{let o=n.object({entries:n.array(we).max(20),nextBefore:n.object({updatedAt:n.string().datetime(),key:n.string()}).nullable()}),a=[],c=null;do{let u=o.parse(await this.request({action:"memory_page",workspaceId:e,sessionId:this.sessionId(),before:c,limit:20,includeDeleted:t.includeDeleted??!1}));if(a.push(...u.entries),u.nextBefore&&(!u.entries.length||g(u.nextBefore)===g(c)))throw new Error("Hosted memory cursor did not advance.");c=u.nextBefore}while(c&&a.length<1e3);if(c)throw new Error("Hosted review memory exceeds its bounded window.");return a},"listHarnessMemories");writeHarnessMemory=r(async e=>we.parse(await this.request({action:"memory_write",sessionId:this.sessionId(),input:e},`review-memory:${g(e)}`)),"writeHarnessMemory");saveHarnessImprovementArtifact=r(async(e,t,o)=>{let a={action:"artifact_put",workspaceId:e,kind:t,artifact:o},c=(await import("./dist-W5MJYSPF.js")).HarnessReviewStorageParamsSchema.parse(a);return he[t].parse(await this.request(c,`review-artifact:${t}:${o.contentHash}`))},"saveHarnessImprovementArtifact");listHarnessImprovementArtifacts=r(async(e,t,o=100)=>{let a=[],c=null,u=Math.min(Math.max(1,Math.trunc(o)),1e3);do{let s=(await import("./dist-W5MJYSPF.js")).HarnessReviewStorageParamsSchema.parse({action:"artifact_page",workspaceId:e,kind:t,before:c,limit:Math.min(100,u-a.length)}),d=Tt.parse(await this.request(s));if(a.push(...d.entries),d.nextBefore&&(!d.entries.length||g(d.nextBefore)===g(c)))throw new Error("Hosted artifact cursor did not advance.");c=d.nextBefore}while(c&&a.length<u);return a.map(s=>he[t].parse(s))},"listHarnessImprovementArtifacts");listPendingHarnessRefinerTriggers=r(async()=>{let e=await import("./hosted-harness-runtime-BM4WONJN.js").then(a=>a.loadHostedHarnessRuntime(this.client));if(!e)return[];let t=[],o=null;do{let a=Tt.parse(await this.request({action:"pending_page",workspaceId:e.workspace.id,before:o,limit:100}));if(t.push(...a.entries.map(c=>({workspaceId:e.workspace.id,trigger:xe.parse(c)}))),a.nextBefore&&(!a.entries.length||g(a.nextBefore)===g(o)))throw new Error("Hosted pending-review cursor did not advance.");o=a.nextBefore}while(o&&t.length<1e3);if(o)throw new Error("Hosted pending reviews exceed the bounded recovery window.");return t},"listPendingHarnessRefinerTriggers");advanceHarnessWorkspaceAtomically=r(async e=>ve.parse(await this.client.request({contractVersion:h,requestId:e.receiptId,operation:"harness/workspace/transition",params:{action:"advance",...e}})),"advanceHarnessWorkspaceAtomically");advanceReviewedHarnessWorkspaceAtomically=r(async e=>ve.parse(await this.client.request({contractVersion:h,requestId:e.receiptId,operation:"harness/workspace/transition",params:{action:"reviewedAdvance",...e}})),"advanceReviewedHarnessWorkspaceAtomically");rollbackHarnessWorkspaceAtomically=r(async e=>ve.parse(await this.client.request({contractVersion:h,requestId:e.receiptId,operation:"harness/workspace/transition",params:{action:"rollback",...e}})),"rollbackHarnessWorkspaceAtomically");getSession=r(async e=>Ue.nullable().parse(await this.request({action:"session_get",sessionId:e})),"getSession");getTurn=r(async e=>U.nullable().parse(await this.request({action:"turn_get",turnId:e})),"getTurn");updateTurn=r(async(e,t)=>{let o=await this.getTurn(e);if(!o)return null;let a=U.parse(t(o)),{harnessSnapshot:c,...u}=o,{harnessSnapshot:s,...d}=a;if(!s||g(u)!==g(d))throw new Error("Hosted review may only restore a missing Harness snapshot.");return U.parse(await this.request({action:"snapshot_restore",turnId:e,expectedHash:g(o),snapshot:s}))},"updateTurn");turnsForSession=r(async(e,t=1e3)=>{let o=n.object({entries:n.array(U).max(100),nextBefore:n.number().int().positive().nullable()}),a=[],c=null,u=Math.min(Math.max(1,Math.trunc(t)),1e3);do{let s=o.parse(await this.request({action:"turn_page",sessionId:e,before:c,limit:Math.min(100,u-a.length)}));if(a.push(...s.entries),s.nextBefore&&(!s.entries.length||c!==null&&s.nextBefore>=c))throw new Error("Hosted review turn cursor did not advance.");c=s.nextBefore}while(c&&a.length<u);return a.reverse()},"turnsForSession");runtimeEventsForTurn=r(async(e,t={})=>{let o=n.object({entries:n.array(ge).max(100),nextAfterSequence:n.number().int().positive().nullable()}),a=[],c=0,u=Math.min(t.limit??1e4,1e4);do{let s=o.parse(await this.request({action:"event_page",turnId:e,afterSequence:c,names:[...t.names??[]],limit:Math.min(100,u-a.length)}));if(a.push(...s.entries),!s.nextAfterSequence)return a;if(!s.entries.length||s.nextAfterSequence<=c)throw new Error("Hosted review event cursor did not advance.");c=s.nextAfterSequence}while(a.length<u);return a},"runtimeEventsForTurn");listModelUsageRecords=r(e=>this.usage.listModelUsageRecords(e),"listModelUsageRecords");async appendRuntimeEvent(e){return ge.parse(await this.request({action:"event_append",event:e},`review-event:${e.id}`))}async upsertModelUsageRecord(e){await this.request({action:"usage_put",record:e},`review-usage:${g(e)}`)}};import{randomUUID as sr}from"node:crypto";async function xt(l,e){let t=Ie.parse(await l.request({contractVersion:h,requestId:sr(),operation:"refiner/execute",params:{action:{action:"active_release",workspaceId:e}}}));return M(t,"Hosted Refiner active release"),t}r(xt,"loadHostedRefinerRelease");import{randomUUID as or}from"node:crypto";var ar=n.object({personalizationSoul:n.string().max(8e3).optional(),userInstructions:n.string().max(64e3).optional(),preferences:ce.optional()}).strict(),nr=n.object({revision:n.number().int().positive(),settings:ar}).strict();async function ye(l){let e=await l.request({contractVersion:h,requestId:or(),operation:"settings/get",params:{}}),t=e===null?null:nr.parse(e);return{revision:t?.revision??null,personalizationSoul:t?.settings.personalizationSoul??be[0].content,userInstructions:t?.settings.userInstructions??"",preferences:t?.settings.preferences??ce.parse({})}}r(ye,"loadHostedRuntimeSettings");import{randomUUID as It}from"node:crypto";function kt(l){async function e(t){let o=await te(l,t);if(!o)throw new Error("No hosted Harness is selected for this run.");return o.workspace.id}return r(e,"workspaceId"),[{name:"memory_search",description:"Search bounded active memory for this selected Harness or Profile. Returns keys, revisions and short excerpts.",parameters:{type:"object",additionalProperties:!1,properties:{query:{type:"string",minLength:1,maxLength:500},limit:{type:"integer",minimum:1,maximum:20}},required:["query"]},execute:r(async t=>{let o=t.args.query;if(typeof o!="string"||!o.trim()||o.length>500)throw new Error("Memory query is invalid.");let a=t.args.limit===void 0?8:t.args.limit;if(typeof a!="number"||!Number.isInteger(a)||a<1||a>20)throw new Error("Memory search limit is invalid.");let c=await l.request({contractVersion:h,requestId:It(),operation:"harness/memory/search",params:{workspaceId:await e(t.session),query:o,limit:a}});return{toolCallId:t.callId,name:"memory_search",ok:!0,contentText:JSON.stringify(c),data:c}},"execute")},{name:"memory_inspect",description:"Read one exact active memory entry returned by memory_search.",parameters:{type:"object",additionalProperties:!1,properties:{key:{type:"string",minLength:1,maxLength:120}},required:["key"]},execute:r(async t=>{let o=t.args.key;if(typeof o!="string"||!/^[a-z0-9][a-z0-9-]{0,119}$/.test(o))throw new Error("Memory key is invalid.");let a=await l.request({contractVersion:h,requestId:It(),operation:"harness/memory/get",params:{workspaceId:await e(t.session),key:o}});if(!a||typeof a!="object"||Array.isArray(a)||a.status!=="active")throw new Error(`Harness memory does not exist: ${o}.`);return{toolCallId:t.callId,name:"memory_inspect",ok:!0,contentText:JSON.stringify(a),data:a}},"execute")}]}r(kt,"createHostedHarnessMemoryTools");import{randomUUID as At}from"node:crypto";function Ct(l){return[{name:"work_list_outputs",description:"List this conversation's published outputs from completed turns without starting sandbox compute. Use this before reading a previously saved file; returns exact file IDs and revisions. New workspace files are published after the current turn ends. Inspect those with workspace tools and finish the turn instead of polling this list.",parameters:{type:"object",additionalProperties:!1,properties:{}},execute:r(async e=>{let t=await l.request({contractVersion:h,requestId:At(),operation:"output/list",params:{}});return{toolCallId:e.callId,name:"work_list_outputs",ok:!0,contentText:JSON.stringify(t),data:t}},"execute")},{name:"work_read_output",description:"Read the actual saved text/Markdown or PDF text of a file returned by work_list_outputs, without starting sandbox compute. Prefer this for questions about saved outputs. Use workspace tools for edits, execution and unsaved files. PDF text extraction does not inspect images or page appearance.",parameters:{type:"object",additionalProperties:!1,properties:{fileId:{type:"string",minLength:1,maxLength:191},revision:{type:"integer",minimum:1},offset:{type:"integer",minimum:0,maximum:1e7},maxChars:{type:"integer",minimum:1,maximum:1e5},firstPage:{type:"integer",minimum:1,maximum:1e3},pageCount:{type:"integer",minimum:1,maximum:10}},required:["fileId","revision"]},execute:r(async e=>{let t=await l.request(z.parse({contractVersion:h,requestId:At(),operation:"output/read",params:e.args}),6e4);return{toolCallId:e.callId,name:"work_read_output",ok:!0,contentText:JSON.stringify(t),data:t}},"execute")}]}r(Ct,"createHostedWorkOutputTools");import{randomUUID as Ot}from"node:crypto";function _t(l,e){return{allowedTools:e,authorizeTool:r(async t=>{let o=await l.request({contractVersion:h,requestId:Ot(),operation:"embedding/authorize",params:{sessionId:t.session.id,turnId:t.turnId,name:t.name}});if(!o||typeof o!="object"||Array.isArray(o)||o.allowed!==!0)throw new Error("Hosted tool authorization denied.")},"authorizeTool")}}r(_t,"createHostedEmbeddingAdapter");function qt(l){return async e=>{let t=qe.parse(e);return l.request({contractVersion:h,requestId:Ot(),operation:"sandbox/request",params:{action:t}},e.type==="create"?3e5:e.type==="exec"?18e4:6e4)}}r(qt,"createHostedSandboxRequest");var ir=["sandbox/request","embedding/authorize","output/begin","output/chunk","output/complete","output/saveSandboxFile","output/list","output/read","settings/get","harness/get","harness/overlay/get","harness/overlay/put","harness/memory/get","harness/memory/list","harness/memory/search","harness/memory/write","harness/state/read","task-inbox/execute","create-improve/execute","approval/get","approval/upsert","usage/getByRequestId","usage/upsert","usage/page","session/count","session/get","session/page","session/put","turn/count","turn/wakeCount","turn/get","turn/put","turn/latest","turn/page","thread/turnPage","event/append","events/page","events/latestAssistantText"];function Bt(l){if(ir.some(e=>!l.operations.includes(e)))throw new Error("Hosted Postgres runtime capabilities are incomplete.");if(l.maxRequestBytes<256e3||l.maxInFlight<32||l.maxPageSize<200)throw new Error("Hosted Postgres runtime transport limits are incompatible.")}r(Bt,"assertHostedWorkCapabilities");var w=r(async()=>{throw new Error("This hosted control is not available until its Postgres repository is activated.")},"unavailable"),ur=We(),cr=Ve();async function _o(l){let e=l.runtimeStorage,t=l.hostStorageClient;if(e.kind!=="hosted_postgres"||!t||e.client!==t)throw new Error("Hosted storage selection mismatch.");if(l.embedding||l.sandboxRequest)throw new Error("Hosted Postgres tool and sandbox authority must come from the host transport.");if(!l.streamOpenPondHostedChatTurn)throw new Error("Hosted Postgres runtime requires a host-admitted model stream.");if(l.profileSource||l.harness)throw new Error("Hosted Postgres runtime accepts only host-admitted immutable sources.");if(l.services&&Object.values(l.services).some(i=>i!==!1&&i!==void 0))throw new Error("Hosted service adapters must be admitted by the Postgres composition.");let o=Be.parse(await t.request({contractVersion:h,requestId:Dt(),operation:"capabilities",params:{}}));Bt(o);let a=_t(t,o.allowedTools),c=qt(t),u=W.resolve(l.storeDir??process.cwd()),s=W.resolve(l.workspaceDir??process.cwd());await lr(s,{recursive:!0});let d=st({channel:"app-server",logDir:W.join(u,"logs"),metadata:{version:l.version??Xe,runtimeVersion:Ye(),placement:"hosted_work"}}),m=e.core,f=new ae(t,u),y=e.admittedProfileRelease?await gt(t,e.admittedProfileRelease):{profile:cr,profileLibrary:ur},{appendRuntimeEvent:v,closeEventSubscribers:b,subscribeRuntimeEvents:R}=ut({logger:d,assistantDeltaFlushMs:250,store:{appendRuntimeEvent:r(i=>["harness.refiner.queued","harness.refiner.started","harness.refiner.completed","harness.refiner.failed"].includes(i.name)?f.appendRuntimeEvent(i):m.appendRuntimeEvent(i),"appendRuntimeEvent"),runtimeEventPageRows:r(i=>m.runtimeEventPageRows(i),"runtimeEventPageRows")}}),p=X({queueId:"turn-follow-up",logger:d}),S=X({queueId:"subagent",logger:d}),x=nt(l.streamOpenPondHostedChatTurn,{enabled:at()}),E=X({queueId:"harness-refiner",logger:d,concurrency:1}),B=St({store:f,storeDir:u,queue:E,streamOpenPondHostedChatTurn:x,appendRuntimeEvent:v,upsertModelUsageRecord:r(i=>f.upsertModelUsageRecord(i),"upsertModelUsageRecord"),prepareReview:r(i=>f.prepareReview(i),"prepareReview"),loadActiveRefinerRelease:r(async()=>{let i=await O(t);if(!i)throw new Error("Hosted review has no admitted Harness workspace.");return xt(t,i.workspace.id)},"loadActiveRefinerRelease")}),Re=r(async()=>(await ye(t)).preferences,"preferences"),{createSession:ne,getSession:D,updateSession:ie,completeTurn:Mt,failTurn:zt,interruptTurn:jt}=dt({store:m,defaultSessionCwd:r(()=>s,"defaultSessionCwd"),appendRuntimeEvent:v,loadAppPreferences:Re,loadLastUsedProfile:r(async()=>y.profileLibrary.lastUsed,"loadLastUsedProfile")}),le=lt({workspaceDir:s,logger:d,getSession:D,updateSession:ie,appendRuntimeEvent:v,sandboxRequest:c,sandboxCreationMode:"hosted_worker"}),V=ot({appendRuntimeEvent:v,findLocalProject:r(async()=>null,"findLocalProject"),onRepositoryInstructionDiagnostic:r((i,P)=>d.warn("repository instruction file skipped",{diagnostic:i,sessionId:P.id}),"onRepositoryInstructionDiagnostic")}),Nt=new ee(t),L=new oe(t),Se=Ht(t),ue=Pt(t),G=e.admittedProfileRelease?.hostExecution?await O(t,e.admittedProfileRelease.harnessRelease):null;if(e.admittedProfileRelease?.hostExecution&&(!G||!o.operations.includes("output/readBytes")||!o.operations.includes("profile-evaluations/sandbox")||!o.operations.includes("profile-evaluations/grade")))throw new Error("Hosted evaluation requires its admitted release, managed artifact owner and private sandbox grader.");let Ft=tt({deviceId:"hosted-evaluation",storeDir:u,runtimeEventsForSession:r(i=>m.runtimeEventsForSession(i),"runtimeEventsForSession"),managedPersistence:{...Se.persistence,sourceTurnStartedAt:r(async(i,P)=>{let H=await m.getTurn(P);if(!H||H.sessionId!==i||!H.startedAt)throw new Error("The managed output has no actual started case turn.");return H.startedAt},"sourceTurnStartedAt")}}),k=G?ft({readOutput:ue.readOutput,executeCommand:ue.execute,settleRemote:ue.settle,runtimeNode:"node",runtimeAgentRoot:"/workspace/runtime",storeDir:u,release:G.release,getSession:D,getTurn:r(i=>m.getTurn(i),"getTurn"),saveOutput:Ft.saveOwnedOutputBytes,recordOutput:r(async(i,P,H)=>{await v({id:Dt(),timestamp:new Date().toISOString(),name:"workspace_action_result",source:"server",sessionId:i,turnId:P,action:"work_output_save",status:"completed",data:H})},"recordOutput"),authorize:r(async()=>{let i=await O(t,e.admittedProfileRelease.harnessRelease);if(!i||i.release.harnessRelease.contentHash!==G.release.harnessRelease.contentHash)throw new Error("The hosted isolated evaluation source authority changed.")},"authorize")}):null,Ut=mt(a,async(i,P)=>{let H=await m.getTurn(i);if(!H)throw new Error("Embedded turn is unavailable.");let C=await D(H.sessionId),$=C.metadata?.embeddingToolBindings,N=[...P].sort((K,Wt)=>K.name.localeCompare(Wt.name));if($!==void 0&&g($)!==g(N))throw new Error("Embedded tool bindings changed; start a new thread.");await ie(C.id,{metadata:{...C.metadata,embeddingToolBindings:N}}),await m.updateTurn(i,K=>({...K,metadata:{...K.metadata,toolBindings:N}}))}),T=ct({executionHost:"embedded",workInputsForSession:l.workInputsForSession,attachmentRootDir:W.join(u,"attachments"),isolatedProfileEvaluationForTurn:k?async i=>{if(i.metadata?.profileEvaluationRun===void 0)return!1;if(!k.ownsSession(i.id))throw new Error("The hosted evaluation has no actual isolated case owner.");return!0}:void 0,executeProfileEvaluationAction:k?.executeAction,resolveModelTools:r(i=>k?.ownsSession(i.session.id)?k.resolveTools(i):Ut(i),"resolveModelTools"),hostedToolFlags:{toolMode:"native",nativeToolTransport:!0,nativeToolProviderDenylist:[],textToolFallback:!1},store:m,inboxStore:e.inbox,createSession:ne,getSession:D,updateSession:ie,completeTurn:Mt,failTurn:zt,interruptTurn:jt,upsertApproval:r(i=>m.upsertApproval(i),"upsertApproval"),defaultSessionCwd:r(()=>s,"defaultSessionCwd"),findOpenPondApp:r(async i=>({id:i||Fe(s),name:W.basename(s)||"Workspace",description:null,visibility:"private",sandbox:!0}),"findOpenPondApp"),resolveSessionWorkspaceCwd:r(async i=>i.cwd?.trim()||s,"resolveSessionWorkspaceCwd"),ensureCodexRuntime:r(async()=>{throw new Error("Codex process hosting is unavailable.")},"ensureCodexRuntime"),appendWorkspaceDiffEvent:le.appendWorkspaceDiffEvent,workspaceDiffBaseline:le.workspaceDiffBaseline,appendRuntimeEvent:v,executeWorkspaceTool:le.executeWorkspaceTool,executeOpenPondCommand:r(async()=>{throw new Error("Hosted commands require durable authorization.")},"executeOpenPondCommand"),loadOpenPondProfileState:r(async()=>y.profile,"loadOpenPondProfileState"),loadOpenPondProfileLibrary:r(async()=>y.profileLibrary,"loadOpenPondProfileLibrary"),readOpenPondProfileSkill:w,loadSelectedHarnessRuntime:r(i=>{if(i.currentProfile&&(!e.admittedProfileRelease||i.currentProfile.repositoryId!==e.admittedProfileRelease.repositoryId||i.currentProfile.profileId!==e.admittedProfileRelease.profileId))throw new Error("Hosted Profile session lacks admitted immutable source.");return te(t,i)},"loadSelectedHarnessRuntime"),ensureHarnessRunOverlay:r(i=>Nt.ensureHarnessRunOverlay(i),"ensureHarnessRunOverlay"),processHarnessImprovementBoundary:B,harnessModelTools:[...kt(t),...Ct(t)],loadBuiltInOpenPondSkills:r(async()=>[],"loadBuiltInOpenPondSkills"),readBuiltInOpenPondSkill:w,loadPersonalizationSoul:r(async()=>(await ye(t)).personalizationSoul,"loadPersonalizationSoul"),loadAppPreferences:Re,maybeCreateScaffoldForTurn:V.maybeCreateScaffoldForTurn,hostedSystemPrompt:V.hostedSystemPrompt,appendAssistantText:V.appendAssistantText,appendHostedContextUsage:V.appendHostedContextUsage,streamOpenPondHostedChatTurn:x,turnFollowUpQueue:p,subagentQueue:S,maxHostedWorkspaceToolRounds:et(l.maxHostedWorkspaceToolRounds),maxRepeatedInvalidToolRequests:3});await T.recoverPendingSubagentCompletions(),await T.recoverTaskInbox();let Pe=!1,He=r(async(i,P)=>{if(Z.parse(P).attachments?.length&&!k?.ownsSession(i))throw new Error("Hosted attachments require managed-file admission.");let H=await D(i);if(H.currentProfile&&(!e.admittedProfileRelease||H.currentProfile.repositoryId!==e.admittedProfileRelease.repositoryId||H.currentProfile.profileId!==e.admittedProfileRelease.profileId))throw new Error("Hosted Profile session lacks admitted immutable source.");return Pe||(await B.reconcilePending(),await E.drain(),Pe=!0),T.sendTurn(i,P)},"sendTurn");if(l.profileExternalDataset&&!e.admittedProfileRelease?.hostExecution)throw new Error("External Dataset requires its admitted hosted evaluation.");let A=e.admittedProfileRelease?.hostExecution?await Et({client:t,core:m,release:e.admittedProfileRelease,storeDir:u,...l.profileExternalDataset?{externalDataset:l.profileExternalDataset}:{},readManagedArtifact:Se.read,admitSession:k.admitSession,settleSession:k.settleSession,createSession:ne,sendTurn:He,interruptSessionTurn:T.interruptSessionTurn}):null,Ee=!1;return{...rt({ports:it({bindHome:!1,placement:"hosted_work",connectedAppProviders:[],featureOverrides:{profileWorkflows:!!e.admittedProfileRelease,profileEvaluations:!!A,harnessProposalReview:!1,harnessEvaluationReview:!1,harnessEvaluationReviewAcceptance:!1,harnessEvaluationTasksetMaterialization:!1,harnessEvaluationBaseline:!1,harnessBackgroundReview:!1,harnessDiff:!1,harnessRollback:!1,harnessReview:!1,refinerProfiles:!1,immutableRefinerAdmission:!1},createSession:ne,getSession:D,turnsForSession:r(i=>m.turnsForSession(i,1e3),"turnsForSession"),runtimeEventsForSession:r(i=>m.runtimeEventsForSession(i,{excludeReasoningDeltas:!0}),"runtimeEventsForSession"),sendTurn:He,steerSessionTurn:T.steerSessionTurn,readTaskInbox:T.readTaskInbox,queueTaskInput:T.queueTaskInput,updateTaskInput:T.updateTaskInput,isSessionTurnActive:T.isSessionTurnActive,waitForSessionTurnSettlement:T.waitForSessionTurnSettlement,interruptSessionTurn:T.interruptSessionTurn,resolveApproval:r(async(i,P)=>{let H=await T.resolveCreateImproveApproval(i,P);if(H)return H;let C=await T.resolveSubagentPatchApplyApproval(i,P);if(C)return C;throw new Error(`Approval not found: ${i}`)},"resolveApproval"),listProfileWorkflows:e.admittedProfileRelease?()=>re(t,e.admittedProfileRelease):w,listProfileEvaluations:A?.listProfileEvaluations??w,loadProfileTrainingSource:w,prepareProfileEvaluationRun:A?.prepareProfileEvaluationRun??w,runPreparedProfileEvaluation:A?.runPreparedProfileEvaluation??w,runProfileEvaluationSuite:A?.runProfileEvaluationSuite??w,executeProfileEvaluationCase:A?.executeProfileEvaluationCase??w,executeProfileEvaluationRun:A?.executeProfileEvaluationRun??w,compareProfileEvaluationRuns:A?.compareProfileEvaluationRuns??w,buildProfileEvaluationReport:A?.buildProfileEvaluationReport??w,inspectHarness:r(async()=>{let i=await O(t);if(!i)return null;let P=i.workspace.id,[H,C,$,N]=await Promise.all([L.getPreference(P,"workspace_settings"),L.getPreference(P,"evaluation_review_settings"),L.listCandidates(P),L.listCrossRunRequests(P)]);return{workspace:i.workspace,release:i.release,backgroundReview:H,evaluationReview:C,refinementCandidates:$,crossRunRequests:N}},"inspectHarness"),reviewHarnessProposal:w,reviewHarness:w,acceptHarnessEvaluationReview:w,materializeHarnessEvaluationTaskset:w,runHarnessEvaluationBaseline:w,validateHarness:r(async()=>{let i=await O(t);return i?{valid:!0,workspaceId:i.workspace.id,harnessRelease:i.release.harnessRelease,agentSnapshot:i.release.agentSnapshot}:{valid:!1,reason:"No admitted hosted Harness release."}},"validateHarness"),updateHarnessBackgroundReview:w,diffHarness:w,rollbackHarness:w,inspectRefiner:w,updateRefiner:w,activateRefiner:w,rollbackRefiner:w,subscribeRuntimeEvents:R,observeRuntimeOperation:r(i=>d.info("agent runtime operation",i),"observeRuntimeOperation")}),close:r(async()=>{Ee||(Ee=!0,k?.close(),await T.close(),await Promise.all([p.drain(),S.drain(),E.drain()]),await b(),await d.flush())},"close")}),storePath:"hosted-postgres",workspaceDir:s,composition:["runtime_event_bus","session_store","hosted_provider","workspace_tools","command_approvals","harness","agent_runtime","jsonl_transport"]}}r(_o,"createHostedOwnedAppServer");export{_o as createHostedOwnedAppServer};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{b as a,c as b}from"./chunk-4GPXTISD.js";import"./chunk-PH6IORGZ.js";import"./chunk-TG7P7BSV.js";import"./chunk-VGRMAGOK.js";import"./chunk-V34H7Y2T.js";import"./chunk-FKJHEZCW.js";import"./chunk-2RNQQNB7.js";import"./chunk-OQPJ7FJF.js";import"./chunk-EUMXMT3S.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-TKLBP3MM.js";import"./chunk-RBZH6A6M.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import"./chunk-RNIAFXMB.js";import"./chunk-2IHO4GDJ.js";import"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-RZUEVS64.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-H6IW2R22.js";import"./chunk-L3KS6MOV.js";import"./chunk-MQULU465.js";import"./chunk-JMBQYBPI.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as loadHostedHarnessRuntime,b as loadHostedHarnessRuntimeForSession};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a,b,c,d}from"./chunk-XJZSIXEO.js";import"./chunk-V34H7Y2T.js";import"./chunk-FKJHEZCW.js";import"./chunk-7ED24PP6.js";import"./chunk-RNIAFXMB.js";import"./chunk-2IHO4GDJ.js";import"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-RZUEVS64.js";import"./chunk-H6IW2R22.js";import"./chunk-L3KS6MOV.js";import"./chunk-LPWBIGKW.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as compileHostedProfileRelease,b as runHostedProfileCompilerCli,c as runHostedProfileEvaluationCli,d as runHostedProfileInspectionCli};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as m,b as c}from"./chunk-OPNRWESL.js";import{a as l}from"./chunk-2WKUBGIF.js";import"./chunk-2RNQQNB7.js";import"./chunk-OQPJ7FJF.js";import{o as f}from"./chunk-EUMXMT3S.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-TKLBP3MM.js";import"./chunk-RBZH6A6M.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-MQULU465.js";import"./chunk-JMBQYBPI.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import{Hb as s,Ob as u}from"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import{n as t}from"./chunk-KGNCKIFP.js";import{b as n}from"./chunk-ES2ISFJC.js";import{a as i}from"./chunk-FTQLQJQV.js";var v=n.object({profileRef:f,sourceRevision:n.string().min(1),action:n.enum(["compare","report"]),request:n.unknown(),runs:n.array(l).max(1e4),comparisons:n.array(s).max(1e4),suiteRuns:n.array(u).max(1e4)}).strict();async function h(p){let o=v.parse(p);for(let e of[...o.runs,...o.comparisons,...o.suiteRuns])t(e,"Hosted evaluation evidence");let a={getProfileEvaluationRun:i(async e=>o.runs.find(r=>r.manifest.id===e)??null,"getProfileEvaluationRun"),getProfileEvaluationComparison:i(async e=>o.comparisons.find(r=>r.id===e)??null,"getProfileEvaluationComparison"),getProfileEvaluationSuiteRun:i(async e=>o.suiteRuns.find(r=>r.id===e)??null,"getProfileEvaluationSuiteRun"),saveProfileEvaluationComparison:i(async(e,r)=>r,"saveProfileEvaluationComparison")};return o.action==="compare"?m({store:a,selectedProfile:i(async()=>({ref:o.profileRef,sourceRevision:o.sourceRevision}),"selectedProfile")})(o.request):c({store:a,profileRef:o.profileRef,request:o.request})}i(h,"controlHostedProfileEvaluation");export{h as controlHostedProfileEvaluation};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import"./chunk-GUOLMLZN.js";import{c as I}from"./chunk-JUQMSHNR.js";import{a as E,c as S}from"./chunk-NPOHW5OU.js";import"./chunk-U2MAPON2.js";import"./chunk-7UH4YDA7.js";import{c as x,f as y}from"./chunk-BSHAIAXY.js";import"./chunk-XWPC3AN4.js";import{c as n}from"./chunk-3M53YXEI.js";import"./chunk-OLDK2LKJ.js";import"./chunk-BT5YNE5U.js";import{s as R}from"./chunk-SF5HJ7PL.js";import"./chunk-FWIPHEVA.js";import{d as g}from"./chunk-WRI4XKSK.js";import{b}from"./chunk-GLUWATL5.js";import"./chunk-QDC4OW3S.js";import"./chunk-ZZWAQBA2.js";import"./chunk-YR5ID2SS.js";import{a as v}from"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import{U as w,V as f,ca as p,da as h}from"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import{m as u}from"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import{a as m}from"./chunk-FTQLQJQV.js";import{readFile as A,stat as L}from"node:fs/promises";async function C(r,l){let[o,a]=l,i=n(r,"team"),q=r.local===!0||r.local==="true";if(!i||!o||l.length>2)throw new Error("usage: human-review <read|inbox|inspect|results|request> [id] --team <id> [--input-file <path>] [--local --server-url <loopback-origin>]");let t;if(o==="request"){let e=n(r,"inputFile");if(a||!e||(await L(e)).size>1048576)throw new Error("Request requires a bounded --input-file with exact scoped pins, revision and stable operationId for mutations.");if(t=p.parse(JSON.parse(await A(e,"utf8"))),t.scope!==i)throw new Error("Input belongs to another workspace.")}else if(o==="inbox"){if(a)throw new Error("Inbox does not accept an assignment id.");t=p.parse({endpoint:"inbox",scope:i,view:n(r,"view")||"mine",status:n(r,"status")||"active",limit:Number(n(r,"limit")||100),...n(r,"project")?{projectId:n(r,"project")}:{},...n(r,"afterId")?{afterId:n(r,"afterId")}:{}})}else{if(!a)throw new Error(`${o} requires an exact assignment or execution id.`);t=p.parse(o==="read"?{endpoint:"get",scope:i,id:a,...n(r,"revision")?{revision:Number(n(r,"revision"))}:{}}:o==="inspect"?{endpoint:"inspect",scope:i,id:a,...n(r,"slot")?{slot:Number(n(r,"slot"))}:{},...n(r,"afterId")?{afterId:n(r,"afterId")}:{}}:o==="results"?{endpoint:"results",scope:i,executionId:a}:{endpoint:o,scope:i,id:a})}let s;if(q){let e=new URL(n(r,"serverUrl")||E);if(e.protocol!=="http:"||!["localhost","127.0.0.1","[::1]"].includes(e.hostname)||e.username||e.password||e.search||e.hash||e.pathname!=="/")throw new Error("Local Human review requires an HTTP loopback server origin.");let c=await S(e.origin),d=await c(new URL("/v1/human-review?location=local",e),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t),redirect:"error",signal:AbortSignal.timeout(3e4)}),H=await U(d);if(s=JSON.parse(H),!d.ok)throw new Error(typeof s.error=="string"?s.error:`Local Human request failed (${d.status}).`)}else{let e=await g();s=await new R({scope:i,apiKey:await I(e,y(e)),baseUrl:x(r)??e.apiBaseUrl??b}).request(t,AbortSignal.timeout(3e4))}if(t.endpoint==="get"||t.endpoint==="command"){let e=w.parse(s),c=t.endpoint==="get"?t.id:t.command.id;if(e.id!==c||e.scope!==i)throw new Error("Review response differs from the requested identity.")}if(t.endpoint==="inbox"&&f.parse(s).items.some(c=>c.scope!==i||t.projectId&&c.projectId!==t.projectId))throw new Error("Inbox response differs from the requested scope.");if(t.endpoint==="inspect"&&h.parse(s).some(e=>e.reviewId!==t.id))throw new Error("Inspection response differs from the selected assignment.");if(t.endpoint==="results"){let e=v.parse(s),{contentHash:c,...d}=e;if(e.executionId!==t.executionId||u(d)!==c||t.selection!==void 0&&u(e.selection)!==u(t.selection))throw new Error("Result response differs from the selected execution or retained review revisions.")}console.log(JSON.stringify(s,null,2))}m(C,"runHumanReviewCommand");async function U(r){let l=r.body?.getReader();if(!l)throw new Error("Review response is unavailable.");let o=[],a=0;try{for(;;){let i=await l.read();if(i.done)break;if(a+=i.value.byteLength,a>8388608)throw new Error("Review response exceeds its bounded transport.");o.push(i.value)}}finally{await l.cancel(),l.releaseLock()}return Buffer.concat(o).toString("utf8")}m(U,"boundedResponse");export{C as runHumanReviewCommand};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a}from"./chunk-MFMYWZK2.js";import"./chunk-X4OSOOSU.js";import"./chunk-7K7O3CKY.js";import"./chunk-EQOV34UH.js";import"./chunk-IZ6DLEVY.js";import"./chunk-MMQRHR3V.js";import"./chunk-PCSIOUHF.js";import"./chunk-7KWD2I6W.js";import"./chunk-57TRXBLT.js";import"./chunk-TG7P7BSV.js";import"./chunk-V34H7Y2T.js";import"./chunk-FKJHEZCW.js";import"./chunk-2RNQQNB7.js";import"./chunk-OQPJ7FJF.js";import"./chunk-EUMXMT3S.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-TKLBP3MM.js";import"./chunk-RBZH6A6M.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import"./chunk-RNIAFXMB.js";import"./chunk-2IHO4GDJ.js";import"./chunk-KCJVFLBB.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-RZUEVS64.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-H6IW2R22.js";import"./chunk-L3KS6MOV.js";import"./chunk-MQULU465.js";import"./chunk-JMBQYBPI.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as createLocalHarnessImprovementRuntime};
@@ -1,2 +0,0 @@
1
- import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{i as a,j as b}from"./chunk-OX3XZKGK.js";import"./chunk-BRORSFJX.js";import"./chunk-2G4BEISF.js";import"./chunk-XVDFJ3ZF.js";import"./chunk-CKMSBAI2.js";import"./chunk-GVZLGS2U.js";import"./chunk-776WNDV2.js";import"./chunk-TRQQNFMO.js";import"./chunk-F74GBN6K.js";import"./chunk-I2NXNMRZ.js";import"./chunk-2L5XWJJ5.js";import"./chunk-SDO4FC4Q.js";import"./chunk-IR3YJWPW.js";import"./chunk-JQKSXCAJ.js";import"./chunk-4EDIRCD3.js";import"./chunk-N6ENLEMY.js";import"./chunk-AN525SPP.js";import"./chunk-SYUKES6H.js";import"./chunk-GOPFFQZU.js";import"./chunk-KVTBX2UP.js";import"./chunk-IZ6DLEVY.js";import"./chunk-PCSIOUHF.js";import"./chunk-7KWD2I6W.js";import"./chunk-BQS7Z4AP.js";import"./chunk-XW6HGSIT.js";import"./chunk-57TRXBLT.js";import"./chunk-FKJHEZCW.js";import"./chunk-2RNQQNB7.js";import"./chunk-OQPJ7FJF.js";import"./chunk-EUMXMT3S.js";import"./chunk-Q4TBTRIG.js";import"./chunk-T5AACNJI.js";import"./chunk-TKLBP3MM.js";import"./chunk-RBZH6A6M.js";import"./chunk-DIO5CB6U.js";import"./chunk-7ED24PP6.js";import"./chunk-N4FFQPLR.js";import"./chunk-AY64VY4E.js";import"./chunk-GJ2ZJFDD.js";import"./chunk-BFKYRQMA.js";import"./chunk-RZUEVS64.js";import"./chunk-3QIB5FXI.js";import"./chunk-6MI4KKWF.js";import"./chunk-DDMZSZFL.js";import"./chunk-W45RKGM6.js";import"./chunk-CGWA54LE.js";import"./chunk-KO3HNMLJ.js";import"./chunk-L3KS6MOV.js";import"./chunk-MQULU465.js";import"./chunk-JMBQYBPI.js";import"./chunk-LPWBIGKW.js";import"./chunk-DZUAT3TP.js";import"./chunk-H7ATCPPB.js";import"./chunk-25JDHAZ5.js";import"./chunk-XMKCCLGB.js";import"./chunk-WN3V6KDN.js";import"./chunk-523TE4BI.js";import"./chunk-ZCHXGRRU.js";import"./chunk-YR5ID2SS.js";import"./chunk-YBT2NB32.js";import"./chunk-74ZXXBGN.js";import"./chunk-APB2STJK.js";import"./chunk-Y4OWBBDD.js";import"./chunk-6ZFPQYHG.js";import"./chunk-JFXWI3EN.js";import"./chunk-6FA3GG5B.js";import"./chunk-MNC4YUDI.js";import"./chunk-Z4Z5UOZM.js";import"./chunk-FFRFSDBM.js";import"./chunk-H7IWJN7L.js";import"./chunk-VYLGI3IH.js";import"./chunk-ACYFMLWG.js";import"./chunk-TVQAPBLZ.js";import"./chunk-KGNCKIFP.js";import"./chunk-ES2ISFJC.js";import"./chunk-FTQLQJQV.js";export{a as createLocalHarnessTasksetReviewControl,b as runLocalHarnessEvaluationBaseline};