openpond 0.2.67 → 0.2.69

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 (573) hide show
  1. package/dist/app-server.d.ts +668 -1
  2. package/dist/app-server.js +1 -1
  3. package/dist/chunks/account-context-V3KLSNKS.js +12 -0
  4. package/dist/chunks/{acp-NASAJV5E.js → acp-ER6CUXG2.js} +1 -1
  5. package/dist/chunks/{acp-agent-C3CRF6DT.js → acp-agent-AYJ5RPVF.js} +1 -1
  6. package/dist/chunks/actions-command-BBUS3HDK.js +2 -0
  7. package/dist/chunks/{app-layer-XIEZ6ALX.js → app-layer-JCEWGUDH.js} +1 -1
  8. package/dist/chunks/{app-server-connected-apps-IB6M35NS.js → app-server-connected-apps-ILXBFD3S.js} +1 -1
  9. package/dist/chunks/app-server-evaluations-RRLYWLPK.js +2 -0
  10. package/dist/chunks/app-server-harness-services-XXM336NU.js +2 -0
  11. package/dist/chunks/app-server-runtime-43MCH5SY.js +2 -0
  12. package/dist/chunks/apps-VNFGMQFG.js +2 -0
  13. package/dist/chunks/{chunk-W3ZILZUL.js → chunk-22RLEU3Q.js} +1 -1
  14. package/dist/chunks/chunk-2PXKSAG6.js +2 -0
  15. package/dist/chunks/{chunk-XEU4J4GJ.js → chunk-2TGHZXJE.js} +2 -2
  16. package/dist/chunks/{chunk-AXO6OHJB.js → chunk-3A2Y7UK3.js} +1 -1
  17. package/dist/chunks/chunk-3Z4VM2LF.js +4 -0
  18. package/dist/chunks/{chunk-V3T2OJBZ.js → chunk-4BUM6JEC.js} +2 -2
  19. package/dist/chunks/chunk-4G3GTEVS.js +23 -0
  20. package/dist/chunks/{chunk-43QYVOYA.js → chunk-4KNPCJR4.js} +1 -1
  21. package/dist/chunks/chunk-4KTGYHCE.js +2 -0
  22. package/dist/chunks/chunk-4PUOWSDE.js +13 -0
  23. package/dist/chunks/chunk-55YD4UTW.js +2 -0
  24. package/dist/chunks/chunk-5G7BQAUA.js +2 -0
  25. package/dist/chunks/chunk-65FJWWXG.js +2 -0
  26. package/dist/chunks/{chunk-4EZI4KCT.js → chunk-65WRWLUD.js} +1 -1
  27. package/dist/chunks/chunk-6D3FI2XT.js +2 -0
  28. package/dist/chunks/chunk-7EQLW2KM.js +12 -0
  29. package/dist/chunks/{chunk-5TPYBXWM.js → chunk-7NCM6GBN.js} +1 -1
  30. package/dist/chunks/chunk-7OFD6TFD.js +2 -0
  31. package/dist/chunks/chunk-7OKZCJHS.js +3 -0
  32. package/dist/chunks/{chunk-ADOCQA4D.js → chunk-7PKDJHT6.js} +1 -1
  33. package/dist/chunks/chunk-7RJOCGQ6.js +2 -0
  34. package/dist/chunks/{chunk-YR5URT73.js → chunk-7RSQOC5M.js} +3 -3
  35. package/dist/chunks/{chunk-FVK4W27G.js → chunk-AFH462DO.js} +1 -1
  36. package/dist/chunks/{chunk-GUG2SWRZ.js → chunk-AFKFN25T.js} +1 -1
  37. package/dist/chunks/chunk-AFYYIJ6K.js +2 -0
  38. package/dist/chunks/{chunk-U3MVH2YT.js → chunk-APKXXAUF.js} +1 -1
  39. package/dist/chunks/chunk-AQUZCWM3.js +2 -0
  40. package/dist/chunks/chunk-AUO5DCEU.js +2 -0
  41. package/dist/chunks/chunk-AYOMVI7J.js +2 -0
  42. package/dist/chunks/{chunk-RWRKUO5D.js → chunk-B66QCXH2.js} +1 -1
  43. package/dist/chunks/chunk-BDZDWHBJ.js +6 -0
  44. package/dist/chunks/chunk-BU6MW65V.js +10 -0
  45. package/dist/chunks/{chunk-P6NQYXN6.js → chunk-CCZ276IA.js} +1 -1
  46. package/dist/chunks/{chunk-YONDU5TN.js → chunk-CIZI6Z7D.js} +1 -1
  47. package/dist/chunks/{chunk-ATFV2NA4.js → chunk-CO23RRN7.js} +1 -1
  48. package/dist/chunks/{chunk-QAFXQHHG.js → chunk-D6L6UNUQ.js} +2 -2
  49. package/dist/chunks/chunk-DDOIPTOM.js +2 -0
  50. package/dist/chunks/{chunk-CSU7RDA5.js → chunk-DKOVZ6R2.js} +3 -3
  51. package/dist/chunks/chunk-DRLP7GIU.js +2 -0
  52. package/dist/chunks/{chunk-XDFXKRTI.js → chunk-DWF3FCY4.js} +1 -1
  53. package/dist/chunks/chunk-DXJC3QW7.js +2 -0
  54. package/dist/chunks/{chunk-IDILAYCW.js → chunk-E2JB5OCO.js} +1 -1
  55. package/dist/chunks/{chunk-GI7LTJV3.js → chunk-EDYCSW22.js} +1 -1
  56. package/dist/chunks/{chunk-4JYTFEND.js → chunk-EFP75UEX.js} +1 -1
  57. package/dist/chunks/{chunk-CX7HKSQ4.js → chunk-EGP6DF34.js} +2 -2
  58. package/dist/chunks/{chunk-D5OFN47Z.js → chunk-ESYPMD7Q.js} +1 -1
  59. package/dist/chunks/{chunk-36FNNR5N.js → chunk-EWDDDHJN.js} +1 -1
  60. package/dist/chunks/{chunk-PWKJ5KLZ.js → chunk-EXYSD45J.js} +1 -1
  61. package/dist/chunks/{chunk-R6VI7MX5.js → chunk-EYTTZ5H4.js} +1 -1
  62. package/dist/chunks/{chunk-WD6ANOLL.js → chunk-FNGZ4UDZ.js} +1 -1
  63. package/dist/chunks/{chunk-YKTJPCYZ.js → chunk-G4FRBT7G.js} +4 -4
  64. package/dist/chunks/{chunk-JFZ6USNQ.js → chunk-G7X73SBG.js} +1 -1
  65. package/dist/chunks/{chunk-ULJZ7NUF.js → chunk-GY7YSD6J.js} +1 -1
  66. package/dist/chunks/{chunk-CWAQOFLP.js → chunk-GYYJ47GX.js} +1 -1
  67. package/dist/chunks/chunk-HG2YFMVU.js +4 -0
  68. package/dist/chunks/{chunk-YQBL5P6R.js → chunk-HKVFU3B3.js} +1 -1
  69. package/dist/chunks/{chunk-VEXJV5H5.js → chunk-IIT66347.js} +4 -4
  70. package/dist/chunks/{chunk-B2K5WQZE.js → chunk-IO5DZUKL.js} +1 -1
  71. package/dist/chunks/chunk-J256AEEE.js +2 -0
  72. package/dist/chunks/{chunk-CRDKBFRN.js → chunk-JEMECEQH.js} +1 -1
  73. package/dist/chunks/{chunk-YMCF5GR2.js → chunk-JQOVC35K.js} +1 -1
  74. package/dist/chunks/{chunk-6LFTQBXP.js → chunk-JT5YQ52I.js} +1 -1
  75. package/dist/chunks/chunk-JVMSN7LH.js +2 -0
  76. package/dist/chunks/{chunk-HORMGT2Q.js → chunk-JXYJQT5Q.js} +1 -1
  77. package/dist/chunks/{chunk-WDKZMXIU.js → chunk-K7KBFM2T.js} +1 -1
  78. package/dist/chunks/{chunk-UBTP3QWI.js → chunk-KCLMA2IH.js} +1 -1
  79. package/dist/chunks/chunk-KDER7R45.js +2 -0
  80. package/dist/chunks/{chunk-R6MMWEH4.js → chunk-KP2MYTP5.js} +1 -1
  81. package/dist/chunks/{chunk-TV2LE2BD.js → chunk-KU4TPDPH.js} +2 -2
  82. package/dist/chunks/{chunk-WJSJXK2N.js → chunk-KUE46HTH.js} +1 -1
  83. package/dist/chunks/chunk-LSKMALD6.js +161 -0
  84. package/dist/chunks/chunk-LVXL7T5O.js +2 -0
  85. package/dist/chunks/{chunk-TSQ2I6XV.js → chunk-M4A7G4S5.js} +2 -2
  86. package/dist/chunks/{chunk-MX7KV5DA.js → chunk-M4ZHFDRJ.js} +1 -1
  87. package/dist/chunks/chunk-M5X7XKXY.js +12 -0
  88. package/dist/chunks/{chunk-XT5WUQGT.js → chunk-MIFVX5PK.js} +1 -1
  89. package/dist/chunks/{chunk-4VZJQRQI.js → chunk-MOXIGLN2.js} +1 -1
  90. package/dist/chunks/{chunk-UKSSFB4Q.js → chunk-N5EAVX4G.js} +1 -1
  91. package/dist/chunks/{chunk-4B7EGNYX.js → chunk-NMMHXYDJ.js} +1 -1
  92. package/dist/chunks/{chunk-EBOTNBUS.js → chunk-NRYC4NH6.js} +1 -1
  93. package/dist/chunks/chunk-NSSZ2ZIU.js +2 -0
  94. package/dist/chunks/chunk-NW6WGGSL.js +2 -0
  95. package/dist/chunks/{chunk-7P5SH3CI.js → chunk-NZDLL6JN.js} +1 -1
  96. package/dist/chunks/{chunk-4TTXNVCE.js → chunk-OFJPOTES.js} +1 -1
  97. package/dist/chunks/chunk-OUJ63LMU.js +2 -0
  98. package/dist/chunks/{chunk-SD2XDZQW.js → chunk-P4QM63L3.js} +1 -1
  99. package/dist/chunks/chunk-PACLKDTN.js +2 -0
  100. package/dist/chunks/{chunk-VPAEFG7X.js → chunk-PAYFJHPO.js} +1 -1
  101. package/dist/chunks/{chunk-OPTJYDZN.js → chunk-PHZZBXDO.js} +1 -1
  102. package/dist/chunks/{chunk-HPTEJBP4.js → chunk-PKJHN666.js} +1 -1
  103. package/dist/chunks/{chunk-HNDAGZCF.js → chunk-PLROXHG2.js} +1 -1
  104. package/dist/chunks/{chunk-UNE52L3Y.js → chunk-PNPV2LDE.js} +1 -1
  105. package/dist/chunks/{chunk-2RSGVLZT.js → chunk-PSY6IRJE.js} +8 -8
  106. package/dist/chunks/{chunk-SVNEPXU3.js → chunk-Q73RKX7I.js} +1 -1
  107. package/dist/chunks/{chunk-IF5A3XWP.js → chunk-Q7FBVLLB.js} +1 -1
  108. package/dist/chunks/{chunk-V5AOM5MZ.js → chunk-Q7P34B2O.js} +1 -1
  109. package/dist/chunks/{chunk-375PADDM.js → chunk-QLGP2OAQ.js} +1 -1
  110. package/dist/chunks/{chunk-QQLS5FB7.js → chunk-QUNQM2E3.js} +1 -1
  111. package/dist/chunks/chunk-R2FYCJL6.js +2 -0
  112. package/dist/chunks/{chunk-6HQUIKC5.js → chunk-R4EEGWXB.js} +1 -1
  113. package/dist/chunks/chunk-R6I623SZ.js +11 -0
  114. package/dist/chunks/chunk-RCQYEHHD.js +2 -0
  115. package/dist/chunks/{chunk-26ID6A5C.js → chunk-RCRZXHAI.js} +1 -1
  116. package/dist/chunks/{chunk-TGULVWPV.js → chunk-RFQD6B44.js} +1 -1
  117. package/dist/chunks/{chunk-3WJQ4IGK.js → chunk-RPM4FDRX.js} +1 -1
  118. package/dist/chunks/{chunk-MCBRB5D6.js → chunk-RY46UPBO.js} +4 -4
  119. package/dist/chunks/{chunk-K3LS5SK7.js → chunk-SDHG6CKU.js} +1 -1
  120. package/dist/chunks/{chunk-XKZ4PFMQ.js → chunk-SO4GMSNP.js} +1 -1
  121. package/dist/chunks/{chunk-O6ZYDHEJ.js → chunk-SSHE6B7Z.js} +1 -1
  122. package/dist/chunks/{chunk-SH7POUVX.js → chunk-SV7ZBEK2.js} +6 -6
  123. package/dist/chunks/{chunk-SODAOLAP.js → chunk-TB5P3FWM.js} +1 -1
  124. package/dist/chunks/{chunk-BJXPQIVD.js → chunk-U7D6Q744.js} +1 -1
  125. package/dist/chunks/chunk-U7X5ZLAL.js +2 -0
  126. package/dist/chunks/{chunk-N54CPLVD.js → chunk-UANH7U3Y.js} +1 -1
  127. package/dist/chunks/{chunk-BUZ7CBJC.js → chunk-UGFSAG4U.js} +1 -1
  128. package/dist/chunks/chunk-ULTV6INR.js +2 -0
  129. package/dist/chunks/{chunk-V3ILZQER.js → chunk-UMAVVMXL.js} +7 -7
  130. package/dist/chunks/chunk-V24VHT76.js +2 -0
  131. package/dist/chunks/chunk-VEBW7NKD.js +2 -0
  132. package/dist/chunks/chunk-VJR2GNRY.js +2 -0
  133. package/dist/chunks/{chunk-JD76ANPN.js → chunk-VJYOKU3C.js} +1 -1
  134. package/dist/chunks/{chunk-H2XG5N7D.js → chunk-VWWKWYSQ.js} +1 -1
  135. package/dist/chunks/chunk-WCNPGKST.js +2 -0
  136. package/dist/chunks/chunk-WD4KAKEX.js +2 -0
  137. package/dist/chunks/chunk-WGQ3FMRF.js +2 -0
  138. package/dist/chunks/{chunk-6C3CXME7.js → chunk-WNXUSELC.js} +1 -1
  139. package/dist/chunks/{chunk-RS526BG7.js → chunk-WZ35ICTE.js} +3 -3
  140. package/dist/chunks/chunk-XHACK2KR.js +2 -0
  141. package/dist/chunks/chunk-XOPHFUUY.js +2 -0
  142. package/dist/chunks/{chunk-ZVMQLIRA.js → chunk-XT4CSKHM.js} +1 -1
  143. package/dist/chunks/{chunk-KQD36SBJ.js → chunk-XY7HFXLH.js} +1 -1
  144. package/dist/chunks/{chunk-UXO33ST5.js → chunk-XYZV3FKD.js} +1 -1
  145. package/dist/chunks/{chunk-GC6RJBRZ.js → chunk-Y2WNZWT2.js} +1 -1
  146. package/dist/chunks/chunk-Y4I6CFZJ.js +2 -0
  147. package/dist/chunks/chunk-YDZBX4XQ.js +2 -0
  148. package/dist/chunks/chunk-YI6ME6PU.js +22 -0
  149. package/dist/chunks/{chunk-H42UW6IF.js → chunk-YXMYK5P7.js} +1 -1
  150. package/dist/chunks/{chunk-QFL2VQKX.js → chunk-Z33RVGP6.js} +1 -1
  151. package/dist/chunks/chunk-Z5CQXPIS.js +6 -0
  152. package/dist/chunks/{chunk-OY4B7Y3T.js → chunk-ZDEIVUUI.js} +1 -1
  153. package/dist/chunks/{chunk-XGJG2ZKE.js → chunk-ZIQJDTQB.js} +1 -1
  154. package/dist/chunks/{chunk-IR2Y2VQY.js → chunk-ZYLLPRPU.js} +1 -1
  155. package/dist/chunks/cli-R7TAP6Z2.js +2 -0
  156. package/dist/chunks/{command-NWOZXU57.js → command-LNOVZQSK.js} +3 -3
  157. package/dist/chunks/{configuration-command-ZEIBQKB3.js → configuration-command-C3QBDFND.js} +1 -1
  158. package/dist/chunks/connected-app-executor-LAEAQUJS.js +2 -0
  159. package/dist/chunks/connected-evidence-VKY6O2JW.js +2 -0
  160. package/dist/chunks/{connected-starting-assets-66Y46ZPM.js → connected-starting-assets-5LAJ7CZY.js} +1 -1
  161. package/dist/chunks/{connection-GDWPMHPC.js → connection-VMBXW5PD.js} +1 -1
  162. package/dist/chunks/{continual-TNPTWTKK.js → continual-FVOLGGOE.js} +1 -1
  163. package/dist/chunks/core-commands-5TNBVR72.js +2 -0
  164. package/dist/chunks/dataset-preparation-authoring-UUYFWWCT.js +4 -0
  165. package/dist/chunks/datasets-BIDZJYDC.js +2 -0
  166. package/dist/chunks/desktop-test-BY2MS3UL.js +3 -0
  167. package/dist/chunks/dist-2MKJC6HN.js +2 -0
  168. package/dist/chunks/{dist-GR56E3QK.js → dist-DKE7RJZN.js} +1 -1
  169. package/dist/chunks/evaluation-coordination-FXB4DXZA.js +2 -0
  170. package/dist/chunks/experiment-improvements-JPDLKZXD.js +2 -0
  171. package/dist/chunks/experiments-IEN7RXLX.js +2 -0
  172. package/dist/chunks/experiments-signal-L32D36NH.js +2 -0
  173. package/dist/chunks/{extension-UH34ZF7N.js → extension-3EKIT6BB.js} +1 -1
  174. package/dist/chunks/{help-O53DTZGN.js → help-PLQJOP4P.js} +1 -1
  175. package/dist/chunks/host-profile-evaluation-tools-UF4ATIUF.js +2 -0
  176. package/dist/chunks/host-profile-external-dataset-KSEPXY2S.js +2 -0
  177. package/dist/chunks/hosted-app-server-composition-GZES7QXJ.js +2 -0
  178. package/dist/chunks/hosted-experiment-improvement-VG2WE7XZ.js +3 -0
  179. package/dist/chunks/hosted-harness-runtime-MMTLCL23.js +2 -0
  180. package/dist/chunks/hosted-profile-candidate-PTGQLPZO.js +3 -0
  181. package/dist/chunks/hosted-profile-compiler-FS5R6CHJ.js +2 -0
  182. package/dist/chunks/hosted-profile-evaluation-control-UUEZEMXU.js +2 -0
  183. package/dist/chunks/hosted-profile-evaluation-inspection-4F7OEF4T.js +3 -0
  184. package/dist/chunks/hosted-profile-evaluation-preparation-LIJJZDHQ.js +3 -0
  185. package/dist/chunks/hosted-tasksets-V24IBVJX.js +2 -0
  186. package/dist/chunks/human-review-6V6EMNVN.js +2 -0
  187. package/dist/chunks/{import-OBAKUJPM.js → import-SI24Z7EF.js} +2 -2
  188. package/dist/chunks/{learning-CRR6NRPN.js → learning-LAXMGWSQ.js} +1 -1
  189. package/dist/chunks/learning-Y3UKNUGE.js +2 -0
  190. package/dist/chunks/local-harness-improvement-runtime-3YJQRYXC.js +2 -0
  191. package/dist/chunks/local-harness-taskset-review-XQHQ6JCR.js +2 -0
  192. package/dist/chunks/{model-projects-HP4DELCP.js → model-projects-6YWVD2TS.js} +1 -1
  193. package/dist/chunks/opchat-SV67HVMX.js +3 -0
  194. package/dist/chunks/opchat-bounded-chat-KLMIYSZZ.js +2 -0
  195. package/dist/chunks/organizations-OZZFX7RG.js +2 -0
  196. package/dist/chunks/{profile-3WZJ65CT.js → profile-TD5U3INY.js} +1 -1
  197. package/dist/chunks/project-action-payload-TK6G4VMC.js +2 -0
  198. package/dist/chunks/project-agent-FFXPNXCO.js +2 -0
  199. package/dist/chunks/published-experiment-source-SDXUVPE7.js +2 -0
  200. package/dist/chunks/refiner-profile-service-56VYLZQJ.js +2 -0
  201. package/dist/chunks/{runtime-XP4DEGR3.js → runtime-Q7JUJO4D.js} +2 -2
  202. package/dist/chunks/sandbox-command-4BCUDAED.js +2 -0
  203. package/dist/chunks/{sandbox-template-YFMHEMUQ.js → sandbox-template-GOY7QQUY.js} +1 -1
  204. package/dist/chunks/saved-work-M6PUHKCC.js +2 -0
  205. package/dist/chunks/{send-turn-D3GTSSHI.js → send-turn-YLY3YNEQ.js} +1 -1
  206. package/dist/chunks/setup-RMZ2BHLM.js +2 -0
  207. package/dist/chunks/{src-GQPWOPYA.js → src-C3ZUESMK.js} +1 -1
  208. package/dist/chunks/src-MT4B43TD.js +424 -0
  209. package/dist/chunks/standalone-experiment-turn-owner-TW5MTWIO.js +2 -0
  210. package/dist/chunks/store-chat-resources-IRHBW2EC.js +2 -0
  211. package/dist/chunks/{store-continual-support-reviews-VVRQO2JK.js → store-continual-support-reviews-3KK42L4I.js} +1 -1
  212. package/dist/chunks/store-conversation-serving-IVURK52V.js +2 -0
  213. package/dist/chunks/{store-create-improve-2XI36AET.js → store-create-improve-UTCLBXF2.js} +1 -1
  214. package/dist/chunks/{store-datasets-UFY422NG.js → store-datasets-4AQOVAQY.js} +1 -1
  215. package/dist/chunks/store-evaluation-results-PK2P3IMH.js +7 -0
  216. package/dist/chunks/{store-harness-workspaces-SGUEYDO2.js → store-harness-workspaces-YEXB4IRV.js} +1 -1
  217. package/dist/chunks/store-human-review-O4BVHP25.js +7 -0
  218. package/dist/chunks/store-learned-preference-migration-validation-44SVX6YB.js +2 -0
  219. package/dist/chunks/{store-learning-BFOT4QVT.js → store-learning-SIUQIY5C.js} +1 -1
  220. package/dist/chunks/{store-learning-credentials-DYTMWQTC.js → store-learning-credentials-BUHR7SN6.js} +1 -1
  221. package/dist/chunks/store-local-experiments-BHVTKPPE.js +97 -0
  222. package/dist/chunks/store-model-batch-review-RVAYUVK2.js +2 -0
  223. package/dist/chunks/{store-model-configuration-NJFWSYSA.js → store-model-configuration-6L3OYXF4.js} +1 -1
  224. package/dist/chunks/store-model-project-preparation-AAEKCF6V.js +2 -0
  225. package/dist/chunks/store-modification-recordings-LCPK6K2T.js +9 -0
  226. package/dist/chunks/{store-preference-comparison-MZAYONCK.js → store-preference-comparison-5YVIQNVB.js} +1 -1
  227. package/dist/chunks/{store-sidebar-file-bookmarks-J3JEVAYR.js → store-sidebar-file-bookmarks-WLMYDA4E.js} +1 -1
  228. package/dist/chunks/{store-sidebar-preferences-2JHTFXJK.js → store-sidebar-preferences-AFMYIDWT.js} +1 -1
  229. package/dist/chunks/{store-subagents-PUBQVWSU.js → store-subagents-KFPVSTRO.js} +1 -1
  230. package/dist/chunks/{store-task-inbox-3BREANOX.js → store-task-inbox-L6IQTY26.js} +1 -1
  231. package/dist/chunks/{store-task-inventory-5HRZCDUT.js → store-task-inventory-QWS2C656.js} +1 -1
  232. package/dist/chunks/store-taskset-drafts-FRFL6ITK.js +9 -0
  233. package/dist/chunks/{store-training-S3FXWLT6.js → store-training-FYXZU2FE.js} +1 -1
  234. package/dist/chunks/{store-training-jobs-2LCXPA7G.js → store-training-jobs-3N3VKPIY.js} +1 -1
  235. package/dist/chunks/{store-training-models-7AMKS7ZW.js → store-training-models-VOFVGPZR.js} +1 -1
  236. package/dist/chunks/{taskset-PLKWRT4X.js → taskset-UDDLFYKV.js} +1 -1
  237. package/dist/chunks/taskset-catalog-RZYEBCRQ.js +2 -0
  238. package/dist/chunks/taskset-packages-T6B6HYKZ.js +2 -0
  239. package/dist/chunks/taskset-packages-WMG5DUBN.js +2 -0
  240. package/dist/chunks/{teams-bot-VQXUA7U4.js → teams-bot-YCUTDDDC.js} +1 -1
  241. package/dist/chunks/tool-learning-ZQ6NSJ5K.js +2 -0
  242. package/dist/chunks/training-5NT2YB2L.js +2 -0
  243. package/dist/chunks/training-5UMT45UL.js +2 -0
  244. package/dist/chunks/training-UY6KRG4M.js +2 -0
  245. package/dist/chunks/{training-error-LQKCOQDJ.js → training-error-WF463UNZ.js} +1 -1
  246. package/dist/chunks/{training-hardware-ESXRWUIK.js → training-hardware-UWQCRDMV.js} +1 -1
  247. package/dist/chunks/training-hosted-CKSDRVL6.js +2 -0
  248. package/dist/chunks/training-hosted-alphaedit-HSMRDJTD.js +2 -0
  249. package/dist/chunks/training-hosted-decision-7JALOU6O.js +2 -0
  250. package/dist/chunks/training-hosted-engram-SXO75MFG.js +2 -0
  251. package/dist/chunks/{training-hosted-learning-WQ2IP5FP.js → training-hosted-learning-E2N32YU5.js} +1 -1
  252. package/dist/chunks/training-hosted-modification-comparison-TXFDJFTG.js +2 -0
  253. package/dist/chunks/training-hosted-neuron-training-J42WK4EH.js +2 -0
  254. package/dist/chunks/training-hosted-serving-report-BAEABGJH.js +2 -0
  255. package/dist/chunks/training-hosted-steering-T556BUBG.js +2 -0
  256. package/dist/chunks/training-model-start-P3PXDWNT.js +2 -0
  257. package/dist/chunks/web-search-ZEKJHZW4.js +2 -0
  258. package/dist/chunks/{workspaces-MCS2AQX6.js → workspaces-EK62ANTB.js} +1 -1
  259. package/dist/cli.js +1 -1
  260. package/dist/index.js +1 -1
  261. package/dist/sandbox/runtime-handle.d.ts +3 -5
  262. package/dist/sandbox/sandbox-instance-client.d.ts +11 -5
  263. package/dist/sandbox/types/billing.d.ts +140 -6
  264. package/dist/sandbox/types/io.d.ts +3 -0
  265. package/dist/sandbox/types/responses.d.ts +11 -1
  266. package/dist/sandbox/types/snapshots.d.ts +52 -3
  267. package/dist/sandbox-template/manifest.js +1 -1
  268. package/dist/skills/manifest.json +3 -3
  269. package/dist/skills/openpond-cli/references/experiments-and-training.md +461 -1
  270. package/dist/web/assets/App-CCuh99JW.js +54 -0
  271. package/dist/web/assets/{AppDialog-BvskhHE9.js → AppDialog-CxjDHVk9.js} +1 -1
  272. package/dist/web/assets/AppTerminalPanel-CKJIVpKa.js +2 -0
  273. package/dist/web/assets/{AppToastContext-D2788RqX.js → AppToastContext-EpiT1dHs.js} +1 -1
  274. package/dist/web/assets/AppsView-BsMyPX_3.js +1 -0
  275. package/dist/web/assets/{AttachmentTypeIcon-DVluUHuc.js → AttachmentTypeIcon-BXvZy5gB.js} +1 -1
  276. package/dist/web/assets/BrowserSidebar-BIIV4aq4.js +1 -0
  277. package/dist/web/assets/{CartesianChart-DdBZ69lI.js → CartesianChart-brqLBqnF.js} +1 -1
  278. package/dist/web/assets/ChatTimelineEntry-CwZbn16X.js +8 -0
  279. package/dist/web/assets/{CollaborationTabs-ba6WupeJ.js → CollaborationTabs-BU4uc4tZ.js} +1 -1
  280. package/dist/web/assets/{CommandMenu-D7wTaEgl.js → CommandMenu-DkWpXR55.js} +1 -1
  281. package/dist/web/assets/CommunityView-CsSxJZGn.js +1 -0
  282. package/dist/web/assets/{ComposerAttachments-aO90qXYz.js → ComposerAttachments-BdJGCYzI.js} +1 -1
  283. package/dist/web/assets/{ComposerCreateImproveStrip-BPUJBSyS.js → ComposerCreateImproveStrip-CWy0j1vv.js} +1 -1
  284. package/dist/web/assets/{ConversationImportsSettings-Bo836wKJ.js → ConversationImportsSettings-DCmiakbZ.js} +1 -1
  285. package/dist/web/assets/DatasetReviewImport-DEnF_pGu.js +1 -0
  286. package/dist/web/assets/ExperimentTrainingDataWorkspace-WhwQ0QBi.js +2 -0
  287. package/dist/web/assets/{FilePagePreview-C6wIp6uX.js → FilePagePreview-BRhhz99q.js} +2 -2
  288. package/dist/web/assets/{GetStartedView-CxMv8q-h.js → GetStartedView-CLVD-qEi.js} +1 -1
  289. package/dist/web/assets/{GettingStartedDialog-CEb0cS-o.js → GettingStartedDialog-CMxaAMg-.js} +1 -1
  290. package/dist/web/assets/HostedModelLearningReview-Cn-j-rDo.js +1 -0
  291. package/dist/web/assets/HostedModelLearningSettings-VNBvf38S.js +1 -0
  292. package/dist/web/assets/{HtmlVisual-CCuUkYT8.js → HtmlVisual-D5y2WG9L.js} +10 -10
  293. package/dist/web/assets/LabModelVersionDetailPage-BxRmYD6h.js +1 -0
  294. package/dist/web/assets/{TrainingRunLineage-PXzWR65d.css → LabModelWorkspace-DOrgCk9Z.css} +1 -1
  295. package/dist/web/assets/LabModelWorkspace-u2Ulm_z4.js +1 -0
  296. package/dist/web/assets/{LabSkillSidebar-CFROlATQ.js → LabSkillSidebar-C7IceJTJ.js} +1 -1
  297. package/dist/web/assets/LabsRoute-C9Y0GU34.css +1 -0
  298. package/dist/web/assets/LabsRoute-CbztQaEf.js +74 -0
  299. package/dist/web/assets/LearningBatchesPage-B1NZTBSv.css +1 -0
  300. package/dist/web/assets/LearningBatchesPage-CJqgZNvM.js +26 -0
  301. package/dist/web/assets/MainChatThread-DNMfrrRq.js +2 -0
  302. package/dist/web/assets/{MainPane-BOWkynGB.css → MainPane-BZlNLfTM.css} +1 -1
  303. package/dist/web/assets/MainPane-CQQxSDPS.js +13 -0
  304. package/dist/web/assets/ModelProjectPageHeader-Dge19aE1.js +1 -0
  305. package/dist/web/assets/NativeSetupTerminal-D4JnbpyD.js +2 -0
  306. package/dist/web/assets/{NativeSkillSidebar-MAJWS4mL.js → NativeSkillSidebar-Jzx1BeKV.js} +1 -1
  307. package/dist/web/assets/{NewProjectDialog-MQiUBVx3.js → NewProjectDialog-DcnGzEd9.js} +1 -1
  308. package/dist/web/assets/{OutputsPage-DpF-aRTu.js → OutputsPage-Cmk15Vt_.js} +1 -1
  309. package/dist/web/assets/{PageChrome-8gH2hyDb.js → PageChrome-Cz_fCqtn.js} +1 -1
  310. package/dist/web/assets/{ProjectsPage-BQ98oGyu.js → ProjectsPage-BZ3Eo3Mz.js} +1 -1
  311. package/dist/web/assets/RightChatPanelStack-C6H2vU9N.js +1 -0
  312. package/dist/web/assets/RightSidebarHomePanel-BfMMVkM1.js +1 -0
  313. package/dist/web/assets/{ScheduledWorkPage-CGCqZz_H.js → ScheduledWorkPage-CAkSwM0T.js} +1 -1
  314. package/dist/web/assets/{SettingsView-CqpMFLxy.js → SettingsView-DvQXGw3_.js} +3 -3
  315. package/dist/web/assets/{TasksetDraftEditorPrimitives-DJvIvzBb.js → TasksetDraftEditorPrimitives-JuU1k8vr.js} +1 -1
  316. package/dist/web/assets/TeamChatView-DmHjr8W9.js +1 -0
  317. package/dist/web/assets/{TerminalOverlay-D--M876l.js → TerminalOverlay-DlaM9d8F.js} +1 -1
  318. package/dist/web/assets/{TrainingCreationPanel-DDUoHQHU.js → TrainingCreationPanel-ClpylNsr.js} +1 -1
  319. package/dist/web/assets/{TrainingDraftPanel-CwLXn3Z7.js → TrainingDraftPanel-6tH2xSDj.js} +1 -1
  320. package/dist/web/assets/{UsageSettingsSection-CGwPregx.js → UsageSettingsSection-CzDqxOYM.js} +2 -2
  321. package/dist/web/assets/WorkSidebarPanel-CY-AHZ4-.js +1 -0
  322. package/dist/web/assets/WorkspaceDiffPanel-B4e0lyF7.js +11 -0
  323. package/dist/web/assets/WorkspaceEnvironmentMenu-D01ZkZZF.js +35 -0
  324. package/dist/web/assets/{WorkspaceFileLocation-D-ctFM4d.js → WorkspaceFileLocation-C5s_njZb.js} +1 -1
  325. package/dist/web/assets/{WorkspaceGitDialogs-CQ28j3R7.js → WorkspaceGitDialogs-DjPZ6KIh.js} +1 -1
  326. package/dist/web/assets/{WorkspaceMonacoEditor-BrZs6-EW.js → WorkspaceMonacoEditor-CC4sfOiU.js} +3 -3
  327. package/dist/web/assets/{WorkspacePdfPreview-CU6PSjjN.js → WorkspacePdfPreview-vszQqFa4.js} +2 -2
  328. package/dist/web/assets/{WorkspacePresentationPreview-IjXVXpIy.js → WorkspacePresentationPreview-DQTvhaRD.js} +1 -1
  329. package/dist/web/assets/api-client-DJRVOFzS.js +1 -0
  330. package/dist/web/assets/{app-models-CKXrDTEU.js → app-models-BUdzQbXo.js} +1 -1
  331. package/dist/web/assets/bot-Doyx3T4j.js +1 -0
  332. package/dist/web/assets/{browser-sidebar-links-D9v2cyJa.js → browser-sidebar-links-PVPCrsDJ.js} +1 -1
  333. package/dist/web/assets/chat-resources-Beh5lB36.js +1 -0
  334. package/dist/web/assets/chevron-down-DX1hzujj.js +1 -0
  335. package/dist/web/assets/chevron-right-DHN0y3KC.js +1 -0
  336. package/dist/web/assets/chevron-up-_QrW88NF.js +1 -0
  337. package/dist/web/assets/{chunk-TLSP5JKG-BrrVo5rJ.js → chunk-3BYFS4RO-ztZjcMmt.js} +1 -1
  338. package/dist/web/assets/chunk-AG6UJ3DI-D9KZjTYP.js +1 -0
  339. package/dist/web/assets/chunk-C3TS766N-ppRhs95p.js +1 -0
  340. package/dist/web/assets/chunk-GCUWJUUM-Dy6oUNJ6.js +9 -0
  341. package/dist/web/assets/chunk-GS5HEE4M-C0RLeIsy.js +1 -0
  342. package/dist/web/assets/{chunk-H3JZ3P5T-CzpTARDY.js → chunk-H3JZ3P5T-DolwEJXo.js} +2 -2
  343. package/dist/web/assets/chunk-Q4RGCEOI-Cr-dg4Nk.js +1 -0
  344. package/dist/web/assets/client-DwZ92xtu.js +1 -0
  345. package/dist/web/assets/{client-choice-storage-DUWsS4X0.js → client-choice-storage-DitqKiIT.js} +1 -1
  346. package/dist/web/assets/cloud-upload-HdzNTgr2.js +1 -0
  347. package/dist/web/assets/common-BWVSBnpX.js +1 -0
  348. package/dist/web/assets/copy-DTQhoBNg.js +1 -0
  349. package/dist/web/assets/create-pipeline-DsZzNkt9.js +1 -0
  350. package/dist/web/assets/{cssMode-SclUkqPt.js → cssMode-BRTtfXxU.js} +1 -1
  351. package/dist/web/assets/dataset-workspaces-BTPi71mz.js +1 -0
  352. package/dist/web/assets/external-link-H1629UU6.js +1 -0
  353. package/dist/web/assets/folder-open-CAGdWOrr.js +1 -0
  354. package/dist/web/assets/folder-plus-C14cs2mE.js +1 -0
  355. package/dist/web/assets/git-commit-horizontal-DFUfuVvF.js +1 -0
  356. package/dist/web/assets/{htmlMode-X3mQtOeh.js → htmlMode-BVaCcL76.js} +1 -1
  357. package/dist/web/assets/icons-Bk2b68aC.js +1 -0
  358. package/dist/web/assets/image-0DPVY6Ev.js +1 -0
  359. package/dist/web/assets/{index-LXNhSUEL.js → index-B6XX_0h3.js} +2 -2
  360. package/dist/web/assets/info-C8b_tafZ.js +1 -0
  361. package/dist/web/assets/{intake-contracts-wCkD2ErR.js → intake-contracts-B8JZKYwb.js} +1 -1
  362. package/dist/web/assets/{jsonMode-BoKiIdHd.js → jsonMode-BCKKQmmV.js} +1 -1
  363. package/dist/web/assets/loader-circle-y-SSPwpk.js +1 -0
  364. package/dist/web/assets/{lspLanguageFeatures-CO2mzpy1.js → lspLanguageFeatures-DozmNUOx.js} +1 -1
  365. package/dist/web/assets/maximize-2-CByk9-zN.js +1 -0
  366. package/dist/web/assets/message-square-C889vRqm.js +1 -0
  367. package/dist/web/assets/{monaco.contribution-wacA5FjV.js → monaco.contribution-B9q6qbbo.js} +2 -2
  368. package/dist/web/assets/{monaco.contribution-CVe3mWSY.js → monaco.contribution-BITdsRbn.js} +2 -2
  369. package/dist/web/assets/{monaco.contribution-hrusiaZi.js → monaco.contribution-BqA-XZ44.js} +2 -2
  370. package/dist/web/assets/{monaco.contribution-C7CAQIKF.js → monaco.contribution-DxAV1oS5.js} +2 -2
  371. package/dist/web/assets/monitor-BtxlcLuI.js +1 -0
  372. package/dist/web/assets/paperclip-BeIdaspf.js +1 -0
  373. package/dist/web/assets/{pdf-Ct3M2mVw.js → pdf-perlzwEB.js} +1 -1
  374. package/dist/web/assets/play-CHXXdkuO.js +1 -0
  375. package/dist/web/assets/plus-DFFWjhPw.js +1 -0
  376. package/dist/web/assets/{ponder-desktop-D-zB6X4L.js → ponder-desktop-Ca-9KggQ.js} +1 -1
  377. package/dist/web/assets/presentation-0bzvu6_u.js +1 -0
  378. package/dist/web/assets/{profile-ref-CCxrOCio.js → profile-ref-D8lxL7dW.js} +1 -1
  379. package/dist/web/assets/{python-C0-pUUAU.js → python-B9hOnkOI.js} +1 -1
  380. package/dist/web/assets/refresh-cw-D61-Ozk3.js +1 -0
  381. package/dist/web/assets/{requests-DjSt-duM.js → requests-DmeUYik4.js} +1 -1
  382. package/dist/web/assets/reward-checks-DJJZYgf8.js +7 -0
  383. package/dist/web/assets/save-iEMNZoPe.js +1 -0
  384. package/dist/web/assets/schemas-Brv9Vmnk.js +64 -0
  385. package/dist/web/assets/settings-BC-bzgk6.js +21 -0
  386. package/dist/web/assets/settings-lists-C84qxFmP.js +5 -0
  387. package/dist/web/assets/square-BE_4JMR3.js +1 -0
  388. package/dist/web/assets/square-terminal-Djpzo2Qs.js +1 -0
  389. package/dist/web/assets/{submit-issue-command-Gk3RKrY-.js → submit-issue-command-HfKzyxg5.js} +1 -1
  390. package/dist/web/assets/{toggleHighContrast-BnYUBgZB.js → toggleHighContrast-ClsXu39R.js} +1 -1
  391. package/dist/web/assets/training-DWfghwfZ.js +1 -0
  392. package/dist/web/assets/{training-model-data-CxR3xpmK.js → training-model-data-CIysl8wH.js} +4 -4
  393. package/dist/web/assets/{tsMode-BVNyOY8h.js → tsMode-nbmaMc-D.js} +1 -1
  394. package/dist/web/assets/upload-C6ug8RD-.js +1 -0
  395. package/dist/web/assets/{useAccountSettings-4_XfwJQi.js → useAccountSettings-Dr9h4Qz_.js} +1 -1
  396. package/dist/web/assets/{useAgentInventory-CVuamyT3.js → useAgentInventory-ByCk2JAv.js} +1 -1
  397. package/dist/web/assets/useChatContextSelection-C0eMm2g6.js +1 -0
  398. package/dist/web/assets/{useLocalAgentSchedules-CmwN4ohy.js → useLocalAgentSchedules-Do0y_leJ.js} +1 -1
  399. package/dist/web/assets/useQuery-D2MQ7e5U.js +1 -0
  400. package/dist/web/assets/wifi-off-Dr-CapyW.js +1 -0
  401. package/dist/web/assets/work-outputs-D_8TovAK.js +1 -0
  402. package/dist/web/assets/{workers-CjtQ2aBD.js → workers-DKvM2NdM.js} +1 -1
  403. package/dist/web/assets/x-Jx2jlP9u.js +1 -0
  404. package/dist/web/assets/{yaml-N1KUjBZ8.js → yaml-C02vq4ar.js} +1 -1
  405. package/dist/web/index.html +1 -1
  406. package/docs/command-reference.md +104 -3
  407. package/package.json +1 -1
  408. package/dist/chunks/account-context-TIJOM22A.js +0 -12
  409. package/dist/chunks/actions-command-BYPLSGZL.js +0 -2
  410. package/dist/chunks/app-server-evaluations-5YZUFXQ2.js +0 -2
  411. package/dist/chunks/app-server-harness-services-N5F5QVZI.js +0 -2
  412. package/dist/chunks/app-server-runtime-HJ2N57DL.js +0 -2
  413. package/dist/chunks/apps-WJTW64NW.js +0 -2
  414. package/dist/chunks/chunk-263WS3TB.js +0 -2
  415. package/dist/chunks/chunk-27JGS3KB.js +0 -12
  416. package/dist/chunks/chunk-2UZHLO2V.js +0 -23
  417. package/dist/chunks/chunk-2W22IXHB.js +0 -2
  418. package/dist/chunks/chunk-46RMTR2Z.js +0 -2
  419. package/dist/chunks/chunk-4JJ4RYIB.js +0 -6
  420. package/dist/chunks/chunk-4NN5OLKW.js +0 -161
  421. package/dist/chunks/chunk-543QHE3D.js +0 -2
  422. package/dist/chunks/chunk-5QOFUGYQ.js +0 -2
  423. package/dist/chunks/chunk-5ZNE43XC.js +0 -10
  424. package/dist/chunks/chunk-6IS5OLI5.js +0 -2
  425. package/dist/chunks/chunk-7HAGSE7L.js +0 -2
  426. package/dist/chunks/chunk-AXYAEWWA.js +0 -2
  427. package/dist/chunks/chunk-B7XJBP4U.js +0 -2
  428. package/dist/chunks/chunk-BBIA24GD.js +0 -10
  429. package/dist/chunks/chunk-CJDGLPNX.js +0 -4
  430. package/dist/chunks/chunk-DAEUVT2I.js +0 -6
  431. package/dist/chunks/chunk-FCXDPVGJ.js +0 -3
  432. package/dist/chunks/chunk-FE2ENE3U.js +0 -2
  433. package/dist/chunks/chunk-H6EUFJJK.js +0 -2
  434. package/dist/chunks/chunk-IOSBGCRT.js +0 -2
  435. package/dist/chunks/chunk-IXZ5ZGIL.js +0 -12
  436. package/dist/chunks/chunk-K6DB5QWG.js +0 -2
  437. package/dist/chunks/chunk-LI56PPCN.js +0 -2
  438. package/dist/chunks/chunk-OE2OOWEQ.js +0 -2
  439. package/dist/chunks/chunk-OYIFH2OM.js +0 -2
  440. package/dist/chunks/chunk-QOUOU7FE.js +0 -22
  441. package/dist/chunks/chunk-R5GRESW3.js +0 -2
  442. package/dist/chunks/chunk-TERKCK4I.js +0 -2
  443. package/dist/chunks/chunk-TS5HNRZB.js +0 -2
  444. package/dist/chunks/chunk-V3KEG6MI.js +0 -2
  445. package/dist/chunks/chunk-WGISITX6.js +0 -4
  446. package/dist/chunks/chunk-XD4ZIQZ2.js +0 -2
  447. package/dist/chunks/chunk-XHU4BZQY.js +0 -13
  448. package/dist/chunks/chunk-ZWEY66RT.js +0 -2
  449. package/dist/chunks/cli-HV32F7HD.js +0 -2
  450. package/dist/chunks/connected-app-executor-DFHWNMRM.js +0 -2
  451. package/dist/chunks/connected-evidence-WOM6N5HO.js +0 -2
  452. package/dist/chunks/core-commands-GWRHH53F.js +0 -2
  453. package/dist/chunks/dataset-preparation-authoring-WJ2XEUO7.js +0 -4
  454. package/dist/chunks/datasets-XIMF54QN.js +0 -2
  455. package/dist/chunks/desktop-test-HF42V2EP.js +0 -3
  456. package/dist/chunks/dist-T6ES2TSM.js +0 -2
  457. package/dist/chunks/evaluation-coordination-WZT6FDMS.js +0 -2
  458. package/dist/chunks/experiment-improvements-H35VS6XZ.js +0 -2
  459. package/dist/chunks/experiments-F54C32EE.js +0 -2
  460. package/dist/chunks/experiments-signal-ONIGTGYR.js +0 -2
  461. package/dist/chunks/host-profile-evaluation-tools-LMCJ3MDJ.js +0 -2
  462. package/dist/chunks/host-profile-external-dataset-4HOXANWK.js +0 -2
  463. package/dist/chunks/hosted-app-server-composition-Y64A2A2B.js +0 -2
  464. package/dist/chunks/hosted-experiment-improvement-B2V2WIUI.js +0 -3
  465. package/dist/chunks/hosted-harness-runtime-C7I4KSDK.js +0 -2
  466. package/dist/chunks/hosted-profile-candidate-CXPVEEYQ.js +0 -3
  467. package/dist/chunks/hosted-profile-compiler-FGCI2VRW.js +0 -2
  468. package/dist/chunks/hosted-profile-evaluation-control-INNUYMBD.js +0 -2
  469. package/dist/chunks/hosted-profile-evaluation-inspection-UPTBRYMS.js +0 -3
  470. package/dist/chunks/hosted-profile-evaluation-preparation-TIQSVKLQ.js +0 -3
  471. package/dist/chunks/hosted-tasksets-7VMYOTIO.js +0 -2
  472. package/dist/chunks/human-review-7XC77NQP.js +0 -2
  473. package/dist/chunks/learning-3XDGIYUL.js +0 -2
  474. package/dist/chunks/local-harness-improvement-runtime-UIKQSAMM.js +0 -2
  475. package/dist/chunks/local-harness-taskset-review-6KJN3EQL.js +0 -2
  476. package/dist/chunks/opchat-NWYWWIA7.js +0 -3
  477. package/dist/chunks/opchat-bounded-chat-ICURZM6R.js +0 -2
  478. package/dist/chunks/organizations-7DBQGCCV.js +0 -2
  479. package/dist/chunks/project-action-payload-7DRABTHY.js +0 -2
  480. package/dist/chunks/project-agent-AXJOWXRU.js +0 -2
  481. package/dist/chunks/published-experiment-source-YBBPLNF2.js +0 -2
  482. package/dist/chunks/refiner-profile-service-ATEFPF5O.js +0 -2
  483. package/dist/chunks/sandbox-command-CF2PJCFX.js +0 -2
  484. package/dist/chunks/saved-work-3OAVRBH3.js +0 -2
  485. package/dist/chunks/setup-RHIMFI2Y.js +0 -2
  486. package/dist/chunks/src-V236S6MV.js +0 -424
  487. package/dist/chunks/standalone-experiment-turn-owner-CDRMGLWW.js +0 -2
  488. package/dist/chunks/store-chat-resources-P4EKCLSY.js +0 -2
  489. package/dist/chunks/store-conversation-serving-YFEZYQD3.js +0 -2
  490. package/dist/chunks/store-evaluation-results-VBH4R2U7.js +0 -7
  491. package/dist/chunks/store-human-review-RFCVZ3HP.js +0 -7
  492. package/dist/chunks/store-learned-preference-migration-validation-FNBGGZU6.js +0 -2
  493. package/dist/chunks/store-local-experiments-XPXGYXNM.js +0 -97
  494. package/dist/chunks/store-model-batch-review-J2L5JQV2.js +0 -2
  495. package/dist/chunks/store-model-project-preparation-OCLIFKI2.js +0 -2
  496. package/dist/chunks/store-taskset-drafts-BNKUVHPA.js +0 -9
  497. package/dist/chunks/taskset-packages-SXBLYHSP.js +0 -2
  498. package/dist/chunks/taskset-packages-V5T4V7YN.js +0 -2
  499. package/dist/chunks/tool-learning-47XQKELE.js +0 -2
  500. package/dist/chunks/training-7VQNCOGH.js +0 -2
  501. package/dist/chunks/training-VKLPNCMC.js +0 -2
  502. package/dist/chunks/training-hosted-NNE6BP6S.js +0 -2
  503. package/dist/chunks/training-hosted-serving-report-VZ4SMLMG.js +0 -2
  504. package/dist/chunks/training-model-start-G7YDZ7ZG.js +0 -2
  505. package/dist/chunks/web-search-56QRZGPR.js +0 -2
  506. package/dist/web/assets/App-DmEA-Lia.js +0 -53
  507. package/dist/web/assets/AppTerminalPanel-ScQKJV4z.js +0 -2
  508. package/dist/web/assets/AppsView-B1uNg9IQ.js +0 -1
  509. package/dist/web/assets/BrowserSidebar-DfVQoJHn.js +0 -1
  510. package/dist/web/assets/ChatTimelineEntry-Bbc6HRks.js +0 -8
  511. package/dist/web/assets/CommunityView-mO58f2B0.js +0 -1
  512. package/dist/web/assets/HostedModelLearningReview-BQIS7hkd.js +0 -1
  513. package/dist/web/assets/HostedModelLearningSettings-BQ-YeFMT.js +0 -1
  514. package/dist/web/assets/LabModelVersionDetailPage-BkHeVbAx.js +0 -1
  515. package/dist/web/assets/LabsRoute-CE45yAXJ.css +0 -1
  516. package/dist/web/assets/LabsRoute-YA9YckKj.js +0 -101
  517. package/dist/web/assets/MainChatThread-DpyPgGKW.js +0 -2
  518. package/dist/web/assets/MainPane-WOeodByM.js +0 -10
  519. package/dist/web/assets/NativeSetupTerminal-fmG2c65K.js +0 -2
  520. package/dist/web/assets/RightChatPanelStack-Bs7A4dLs.js +0 -1
  521. package/dist/web/assets/RightSidebarHomePanel-C-D4kba2.js +0 -1
  522. package/dist/web/assets/TeamChatView-DjmIaLO1.js +0 -1
  523. package/dist/web/assets/TrainingRunLineage-CtYe1KGX.js +0 -1
  524. package/dist/web/assets/WorkSidebarPanel-C6wWuo7U.js +0 -1
  525. package/dist/web/assets/WorkspaceDiffPanel-JDOUmrC-.js +0 -11
  526. package/dist/web/assets/WorkspaceEnvironmentMenu-sfL5LZeB.js +0 -35
  527. package/dist/web/assets/api-client-Dgz-fOMl.js +0 -1
  528. package/dist/web/assets/bot-Cd761lRF.js +0 -1
  529. package/dist/web/assets/chat-resources-BUDXdoG0.js +0 -1
  530. package/dist/web/assets/chevron-down-DEbd6Ek-.js +0 -1
  531. package/dist/web/assets/chevron-right-DLYNg_Oq.js +0 -1
  532. package/dist/web/assets/chevron-up-DFJJccDl.js +0 -1
  533. package/dist/web/assets/chunk-GHPCQXG5-DKDBSd8H.js +0 -9
  534. package/dist/web/assets/chunk-GJRXJL6G-luaxRTYI.js +0 -1
  535. package/dist/web/assets/chunk-JDQVAG3R-C0-rh1aR.js +0 -1
  536. package/dist/web/assets/chunk-XMVSQIK4-BBU7r_NH.js +0 -1
  537. package/dist/web/assets/client-BNjO4Xi8.js +0 -1
  538. package/dist/web/assets/cloud-upload-CoM1FGeB.js +0 -1
  539. package/dist/web/assets/common-CFsO2ppZ.js +0 -1
  540. package/dist/web/assets/copy-BGOhV6Pk.js +0 -1
  541. package/dist/web/assets/create-pipeline-DRR0Qeec.js +0 -1
  542. package/dist/web/assets/createLucideIcon-Bv-_eGcE.js +0 -1
  543. package/dist/web/assets/external-link-CVXsNeO3.js +0 -1
  544. package/dist/web/assets/folder-open-MnOmh19D.js +0 -1
  545. package/dist/web/assets/folder-plus-BRddLBtO.js +0 -1
  546. package/dist/web/assets/git-commit-horizontal-Bm4rkXug.js +0 -1
  547. package/dist/web/assets/icons-CZxmQtZs.js +0 -1
  548. package/dist/web/assets/image-BViGUAiq.js +0 -1
  549. package/dist/web/assets/info-DYPIbKKD.js +0 -1
  550. package/dist/web/assets/loader-circle-JFgFNsP5.js +0 -1
  551. package/dist/web/assets/maximize-2-DXZCQO0b.js +0 -1
  552. package/dist/web/assets/message-square-cOCAL8J1.js +0 -1
  553. package/dist/web/assets/models-route-CWcJuOd0.js +0 -1
  554. package/dist/web/assets/monitor-B35XSAvn.js +0 -1
  555. package/dist/web/assets/paperclip-CKgDxioG.js +0 -1
  556. package/dist/web/assets/play-DzqLr7fM.js +0 -1
  557. package/dist/web/assets/plus-Ddp1vXnw.js +0 -1
  558. package/dist/web/assets/presentation-B0S9v7ib.js +0 -1
  559. package/dist/web/assets/refresh-cw-D45mW-vs.js +0 -1
  560. package/dist/web/assets/reward-checks-D139zwha.js +0 -7
  561. package/dist/web/assets/save-Gu4R_82E.js +0 -1
  562. package/dist/web/assets/schemas-C9IwV7NS.js +0 -64
  563. package/dist/web/assets/settings-DdonLCIN.js +0 -21
  564. package/dist/web/assets/settings-lists-CFHFtO0D.js +0 -5
  565. package/dist/web/assets/square-Dqduqyyu.js +0 -1
  566. package/dist/web/assets/square-terminal-DS3zwi6X.js +0 -1
  567. package/dist/web/assets/training-QBuGBGJd.js +0 -2
  568. package/dist/web/assets/upload-ABSJxuUM.js +0 -1
  569. package/dist/web/assets/useQuery-CCjwL8VI.js +0 -1
  570. package/dist/web/assets/wifi-off-DGJH7Pke.js +0 -1
  571. package/dist/web/assets/work-outputs-CnbRtTLg.js +0 -1
  572. package/dist/web/assets/x-B-_zJVOZ.js +0 -1
  573. /package/dist/chunks/{chunk-SFR32TMJ.js → chunk-JXLDEYRW.js} +0 -0
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{i as m}from"./chunk-AFYYIJ6K.js";import{j as l}from"./chunk-5HPZGLOL.js";import{A as t}from"./chunk-X2J2P5ZT.js";import{a as o}from"./chunk-FTQLQJQV.js";var v="evaluation-source.json",u=t.object({id:t.string().trim().min(1),clusterKey:t.string().trim().min(1),split:t.enum(["train","validation","frozen_eval"])}).passthrough(),h=t.object({schemaVersion:t.literal("openpond.trainingEvaluationSource.v1"),taskset:m,tasks:t.array(u).min(1).max(1e4),assets:t.array(t.object({path:t.string().trim().min(1).max(2e3),sha256:t.string().regex(/^[a-f0-9]{64}$/),sizeBytes:t.number().int().nonnegative(),encoding:t.literal("base64"),content:t.string().max(32*1024*1024)}).strict()).max(1e4)}).strict().superRefine((s,n)=>{let i=new Set;s.tasks.forEach((r,e)=>{r.split==="train"&&n.addIssue({code:"custom",path:["tasks",e,"split"],message:"Evaluation sources require held-out tasks."}),i.has(r.id)&&n.addIssue({code:"custom",path:["tasks",e,"id"],message:"Evaluation task identities must be unique."}),i.add(r.id)})});function k(s,n){let i=t.array(u).min(1).max(1e4).parse(s),r=t.array(u).min(1).max(1e4).parse(n),e=new Set,c=new Set;for(let a of i){if(a.split!=="train")throw new Error("The training population contains a held-out task.");if(e.has(a.id))throw new Error("Training task identities must be unique.");e.add(a.id),c.add(a.clusterKey)}let d=new Set;for(let a of r){if(a.split==="train")throw new Error("The evaluation population contains a training task.");if(d.has(a.id))throw new Error("Evaluation task identities must be unique.");if(e.has(a.id)||c.has(a.clusterKey))throw new Error("Training and evaluation tasks or families overlap.");d.add(a.id)}}o(k,"assertTrainingEvaluationIsolation");async function w(s){let n=h.parse(s),i=await l(n);return{taskset:n.taskset,dataset:{id:`training-evaluation-${i.slice(0,32)}`,contentHash:i}}}o(w,"trainingEvaluationSourceRef");export{v as a,h as b,k as c,w as d};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as he,b as G,c as j,d as z,e as H,g as be,i as T,j as ve,k as S,l as Re,v as B,x as F}from"./chunk-NZDLL6JN.js";import{a as se,b as D,c as P}from"./chunk-RFQD6B44.js";import{a as ne,b as oe,c as re}from"./chunk-XRKFTPHD.js";import{L as fe,M as me,Q as ye,U as we,g as $,h as ce,k as le,m as de,n as pe,o as ue,p as ge}from"./chunk-JEMECEQH.js";import{d as y,e as ie,f as ae,g as L}from"./chunk-RPM4FDRX.js";import{b as C,c as Z,d as ee,f as w,h as R,i as te}from"./chunk-BSHAIAXY.js";import{a as M,f as v,k as X}from"./chunk-3M53YXEI.js";import{a as g}from"./chunk-FTQLQJQV.js";import{promises as V,existsSync as W}from"node:fs";import U from"node:path";import{stdin as $e}from"node:process";async function Ge(e,o){let t=await y(),r=w(t),n=R(t),i=await P(t,r),{app:a}=await T(n,i,o),s=await pe(n,i,a.id);console.log(JSON.stringify(s,null,2))}g(Ge,"runTemplateStatus");async function je(e,o){let t=await y(),r=w(t),n=R(t),i=await P(t,r),{app:a}=await T(n,i,o),s=await ue(n,i,a.id);console.log(JSON.stringify(s,null,2))}g(je,"runTemplateBranches");async function ze(e,o){let t=await y(),r=w(t),n=R(t),i=await P(t,r),{app:a}=await T(n,i,o),s=typeof e.env=="string"?e.env:typeof e.environment=="string"?e.environment:void 0,f=X(s),c=await ge(n,i,a.id,{environment:f});console.log(JSON.stringify(c,null,2))}g(ze,"runTemplateUpdate");async function He(e){let o=await y(),t=w(o),r=typeof e.apiKey=="string"?e.apiKey:typeof e.key=="string"?e.key:null,n=r?r.trim():await D();if(!n)throw new Error("API key is required");n.startsWith("opk_")||console.log("warning: API keys usually start with opk_."),await L({handle:o.activeProfile?.handle||"default",apiKey:n,baseUrl:t,apiBaseUrl:o.apiBaseUrl,chatApiBaseUrl:o.chatApiBaseUrl,setActive:!0}),console.log("Saved account credentials to the encrypted OpenPond credential store.")}g(He,"runLogin");async function Fe(e,o){let t=o[0]||"list";if(t==="list"){let r=await ie();console.log(JSON.stringify({profiles:r},null,2));return}if(t==="use"){let r=o[1];if(!r)throw new Error("usage: profiles use <name> [--base-url <url>]");let n=await ae(r,{baseUrl:C(e)});console.log(JSON.stringify({profile:n},null,2));return}if(t==="save"){let r=o[1];if(!r)throw new Error("usage: profiles save <name> --api-key <key> [--base-url <url>] [--api-base-url <url>] [--chat-api-base-url <url>]");let n=typeof e.apiKey=="string"?e.apiKey:typeof e.key=="string"?e.key:null,i=n?n.trim():await D(),a=typeof e.environment=="string"?e.environment:typeof e.env=="string"?e.env:void 0,s=await L({handle:r,apiKey:i,baseUrl:C(e),apiBaseUrl:Z(e),chatApiBaseUrl:ee(e),environment:a,setActive:!0});console.log(JSON.stringify({profile:s},null,2));return}throw new Error("usage: profiles <list|use|save> [args]")}g(Fe,"runProfiles");async function Ve(){let e=await y(),o=w(e),t=R(e),r=await P(e,o),n=await fe(t,r);console.log(JSON.stringify(n,null,2))}g(Ve,"runAccount");async function We(e){let o=await y(),t=R(o),r=se(o),n=await me(t,r);console.log(JSON.stringify(n,null,2))}g(We,"runHealth");async function qe(e,o){let t=await y(),r=w(t),n=R(t),i=await P(t,r),{app:a}=await T(n,i,o),s=typeof e.branch=="string"?String(e.branch):void 0,f=await $(n,i,a.id,{branch:s});if(!f?.id){console.log("no deployments found");return}let c=await ce(n,i,f.id),d=(c&&Array.isArray(c.toolsJson)?c.toolsJson:null)||(c&&typeof c.metadataJson=="object"&&c.metadataJson?c.metadataJson.tools:null),u=Array.isArray(d)?d:[];if(u.length===0){console.log("no tools found");return}for(let l of u){let m=l,h=m.profile||m.function,I=m.name||h?.name||"unknown",p=m.description||h?.description||"";console.log(p?`${I} - ${p}`:I)}}g(qe,"runToolList");async function Ye(e,o,t){let r=await y(),n=w(r),i=R(r),a=await P(r,n),{app:s}=await T(i,a,o),f=typeof e.branch=="string"?String(e.branch):void 0,c=await $(i,a,s.id,{branch:f});if(!c?.id)throw new Error("no deployments found");let d;if(typeof e.body=="string")try{d=JSON.parse(e.body)}catch{throw new Error("tool body must be valid JSON")}let u=typeof e.method=="string"?String(e.method).toUpperCase():"POST",l=await we(n,a,{appId:s.id,deploymentId:c.id,toolName:t,method:u,body:d,headers:a?{"openpond-api-key":a}:void 0});if(!l.ok)throw new Error(l.error||`tool failed (${l.status})`);let m=l.data??{ok:!0};console.log(JSON.stringify(m,null,2))}g(Ye,"runToolRun");async function Qe(e,o,t){let r=await y(),n=w(r),i=R(r),a=await P(r,n),{app:s}=await T(i,a,o),f=typeof e.branch=="string"?String(e.branch):void 0,c=typeof e.deploymentId=="string"?String(e.deploymentId):void 0,d=c?{id:c}:await $(i,a,s.id,{branch:f});if(!d?.id)throw new Error("no deployments found");let u=typeof e.body=="string"?M(String(e.body),"body"):{};if(!u||typeof u!="object"||Array.isArray(u))throw new Error("body must be a JSON object");let l=typeof e.method=="string"?String(e.method).toUpperCase():"POST",m={...u,appId:s.id,deploymentId:d.id,toolName:t,method:l},h=await ye(i,a,m);console.log(JSON.stringify(h,null,2))}g(Qe,"runBacktestRun");async function Xe(e,o){let t=await y(),r=w(t),n=R(t),i=await P(t,r),{app:a,handle:s,repo:f}=await T(n,i,o),c=typeof e.branch=="string"?String(e.branch):void 0,d=typeof e.deploymentId=="string"?String(e.deploymentId):void 0,u=d?{id:d}:await $(n,i,a.id,{branch:c});if(!u?.id){console.log("no deployments found");return}await ve({baseUrl:n,apiKey:i,deploymentId:u.id,prefix:`[${s}/${f}] `,intervalMs:e.interval?Number(e.interval):void 0,timeoutMs:e.timeout?Number(e.timeout):void 0})}g(Xe,"runDeployWatch");async function Ze(e,o){let r=((typeof e.name=="string"?e.name:null)||o.join(" ")).trim();if(!r)throw new Error("usage: repo create --name <name> [--team-id <id>] [--path <dir>] [--template <owner/repo|url>] [--template-branch <branch>] [--empty|--opentool] [--sandbox] [--token] [--auto-schedule-migration <true|false>]");let n=await y(),i=w(n),a=await P(n,i),s=R(n),f=typeof e.teamId=="string"&&e.teamId.trim()?e.teamId.trim():void 0,c=typeof e.template=="string"?e.template.trim():"";if(c&&(e.empty==="true"||e.opentool==="true"))throw new Error("choose one: --template or --empty/--opentool");if(e.empty==="true"&&e.opentool==="true")throw new Error("choose one: --empty or --opentool");let d=typeof e.description=="string"?e.description.trim():void 0,u=typeof e.templateBranch=="string"&&e.templateBranch.trim().length>0?e.templateBranch.trim():void 0,l=typeof e.env=="string"?M(e.env,"env"):void 0;if(l){if(typeof l!="object"||Array.isArray(l))throw new Error("env must be a JSON object");for(let[b,A]of Object.entries(l))if(typeof A!="string")throw new Error(`env value for ${b} must be a string`)}if(c){e.deployOnPush!==void 0&&console.warn("deploy-on-push is not used for template create (auto deploys)");let b=te(c,i),k=(await de(s,a,[{name:r,...d?{description:d}:{},templateRepoUrl:b,...u?{templateBranch:u}:{},...l?{envVars:l}:{}}],f)).items?.[0];if(!k||k.status!=="ok"||!k.appId)throw new Error(k?.error||"Template create failed");console.log(`app_id: ${k.appId}`),k.deploymentId&&console.log(`deployment_id: ${k.deploymentId}`),k.conversationId&&console.log(`conversation_id: ${k.conversationId}`);return}let m=process.cwd(),h=typeof e.path=="string"?e.path:typeof e.dir=="string"?e.dir:null,I=h&&h.trim().length>0?h.trim():$e.isTTY?await Re(m):m,p=U.resolve(I);if(W(p)){if(!(await V.stat(p)).isDirectory())throw new Error(`path is not a directory: ${p}`)}else await V.mkdir(p,{recursive:!0});let Pe=(await V.readdir(p)).filter(b=>b!==".git").length===0,x=v(e.yes)||v(e.force);if(!Pe&&!x&&!await S(`Directory is not empty (${p}). Continue?`,!1)){console.log("aborted");return}let ke=U.join(p,".git");if(!W(ke)){if(!(x?!0:await S("Initialize git repository here?",!0))){console.log("aborted");return}let A=await B("git",["init"],{cwd:p});if(A.code!==0)throw new Error(`git init failed: ${A.stderr.trim()||A.stdout.trim()||"unknown error"}`)}let K=await F(p,"origin");if(K&&!x&&!await S(`Remote "origin" already set (${K}). Replace it?`,!1)){console.log("aborted");return}let q=e.opentool==="true"?"opentool":"empty",Te=v(e.sandbox),Be=v(e.deployOnPush),N=e.autoScheduleMigration,Y=typeof N=="string"||typeof N=="boolean",Ee=Y?v(N):void 0,E=await le(s,a,{name:r,...f?{teamId:f}:{},...d?{description:d}:{},...q?{repoInit:q}:{},...Te?{sandbox:!0}:{},...l?{envVars:l}:{},...Be?{deployOnPush:!0}:{},...Y?{autoScheduleMigration:Ee}:{}}),O=he(E);H(O);let J=v(e.token)||v(e.setRemoteToken),Oe=G(O,a),Q=J?Oe:O,_=await B("git",K?["remote","set-url","origin",Q]:["remote","add","origin",Q],{cwd:p});if(_.code!==0)throw new Error(`git remote failed: ${z(_.stderr.trim()||_.stdout.trim()||"unknown error")}`);let Ae=J?j(O):O;console.log(`app_id: ${E.appId}`),E.gitOwner&&E.gitRepo&&console.log(`repo: ${E.gitOwner}/${E.gitRepo}`),console.log(`remote: ${Ae}`),console.log('next: git add . && git commit -m "init"');let Ie=E.defaultBranch||"master";console.log(`next: openpond repo push --path ${p} --branch ${Ie}`),J||console.log(`token-remote (non-interactive): git -C ${p} remote set-url origin ${j(O)}`);try{await be({apiBase:s,apiKey:a,forceRefresh:!0})}catch(b){console.warn("cache refresh failed",b)}}g(Ze,"runRepoCreate");async function Se(e){let o=await B("git",["rev-parse","--abbrev-ref","HEAD"],{cwd:e});if(o.code!==0)return null;let t=o.stdout.trim();return t.length>0?t:null}g(Se,"resolveGitBranch");async function et(e){let o=await y(),t=w(o),r=await P(o,t),n=typeof e.path=="string"?e.path:typeof e.dir=="string"?e.dir:null,i=U.resolve(n&&n.trim().length>0?n.trim():"."),a=U.join(i,".git");if(!W(a))throw new Error(`git repo not found at ${i} (missing .git)`);let s=await F(i,"origin");if(!s)throw new Error("origin remote not set; run `openpond repo create` first");H(s);let c=(typeof e.branch=="string"?e.branch.trim():"")||await Se(i);if(!c)throw new Error("unable to resolve git branch; pass --branch");let d;try{d=G(s,r)}catch{throw new Error("origin remote must be https for tokenized pushes")}let u=v(e.keepTokenRemote)||v(e.token)||v(e.setRemoteToken),l=s.includes("x-access-token:"),m=!u&&!l?s:null,h=process.env.GIT_TERMINAL_PROMPT;process.env.GIT_TERMINAL_PROMPT="0";try{if(!l){let p=await B("git",["remote","set-url","origin",d],{cwd:i});if(p.code!==0)throw new Error(`git remote set-url failed: ${z(p.stderr.trim()||p.stdout.trim()||"unknown error")}`)}if((await B("git",["push","-u","origin",c],{cwd:i,inherit:!0})).code!==0)throw new Error("git push failed")}finally{m&&await B("git",["remote","set-url","origin",m],{cwd:i}).catch(()=>null),h===void 0?delete process.env.GIT_TERMINAL_PROMPT:process.env.GIT_TERMINAL_PROMPT=h}}g(et,"runRepoPush");async function tt(e){if(e.length===0)throw new Error("usage: opentool <init|validate|build> [args]");let o=process.platform==="win32"?"npx.cmd":"npx";if((await B(o,["opentool",...e],{inherit:!0})).code!==0)throw new Error("opentool command failed")}g(tt,"runOpentool");async function nt(){let e="openpond",o=ne(),t=await re(e),r=`npm i -g ${e}@${t}`,n=oe(o,t);if(n===0){console.log(`${e} is up to date (${o})`);return}if(n===-1){console.log(`Update available: ${o} -> ${t}`),console.log(`Run: ${r}`);return}if(n===1){console.log(`Installed version (${o}) is newer than npm latest (${t}).`);return}if(o===t){console.log(`${e} is up to date (${o})`);return}console.log(`Installed: ${o}`),console.log(`Latest: ${t}`),console.log(`Run: ${r}`)}g(nt,"runCheckUpdate");export{Ge as a,je as b,ze as c,He as d,Fe as e,Ve as f,We as g,qe as h,Ye as i,Qe as j,Xe as k,Ze as l,Se as m,et as n,tt as o,nt as p};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{c as _}from"./chunk-TGULVWPV.js";import{e as B,f as T,g as A}from"./chunk-BSHAIAXY.js";import{f as w}from"./chunk-3M53YXEI.js";import{V as y,W as C,X as N,Y as D,Z as k,_ as K,e as L,f as U,i as M,t as $}from"./chunk-CRDKBFRN.js";import{b as O}from"./chunk-27JGS3KB.js";import{d as I}from"./chunk-3WJQ4IGK.js";import{b as v}from"./chunk-GLUWATL5.js";import{a as o}from"./chunk-FTQLQJQV.js";function ce(e){if(e.repoUrl)return e.repoUrl;if(e.gitHost&&e.gitOwner&&e.gitRepo)return`https://${e.gitHost}/${e.gitOwner}/${e.gitRepo}.git`;throw new Error("repoUrl missing from API response")}o(ce,"resolveRepoUrl");function le(e,t){let n=new URL(e),r=encodeURIComponent(t);return`${n.protocol}//x-access-token:${r}@${n.host}${n.pathname}`}o(le,"formatTokenizedRepoUrl");function fe(e){let t=new URL(e);return`${t.protocol}//x-access-token:$OPENPOND_API_KEY@${t.host}${t.pathname}`}o(fe,"formatTokenizedRepoUrlForPrint");function me(e){return e.replace(/x-access-token:[^@]+@/g,"x-access-token:***@")}o(me,"redactToken");function pe(e){let t=process.env.OPENPOND_BASE_URL;if(t)try{let n=new URL(t).hostname,r=new URL(e).hostname;n&&r&&n!==r&&(console.warn(`warning: repo host (${r}) does not match OPENPOND_BASE_URL (${n})`),console.warn("warning: verify your git host configuration matches OPENPOND_BASE_URL."))}catch{}}o(pe,"warnOnRepoHostMismatch");function W(e){let t=e.split("/").filter(Boolean);if(t.length!==2)throw new Error("expected <handle>/<repo>");return{handle:t[0],repo:t[1]}}o(W,"parseHandleRepo");function S(e){return(e||"").trim().toLowerCase()}o(S,"normalizeRepoName");async function ee(e){if(!e.forceRefresh){let n=await C({apiBase:e.apiBase,apiKey:e.apiKey,ttlMs:y});if(n)return n}let t=await M(e.apiBase,e.apiKey);return await N({apiBase:e.apiBase,apiKey:e.apiKey,apps:t}),t}o(ee,"fetchAppsWithCache");async function Re(e){if(!e.forceRefresh){let r=await D({apiBase:e.apiBase,apiKey:e.apiKey,ttlMs:y});if(r)return r}let t=await $(e.apiBase,e.apiKey),n=Array.isArray(t.tools)?t.tools:[];return await k({apiBase:e.apiBase,apiKey:e.apiKey,tools:n}),n}o(Re,"fetchToolsWithCache");async function Pe(e,t,n){let{handle:r,repo:s}=W(n),i=await ee({apiBase:e,apiKey:t}),a=S(s),d=i.find(u=>u.handle&&u.handle!==r?!1:[u.repo,u.gitRepo,u.id].map(S).includes(a));if(!d)throw new Error(`app not found for ${r}/${s}`);return{app:d,handle:r,repo:s}}o(Pe,"resolveAppTarget");async function Ee(e){let t=e.intervalMs??5e3,n=e.timeoutMs??240*1e3,r=new Set,s=Date.now();for(;Date.now()-s<n;){let a=(await L(e.baseUrl,e.apiKey,e.deploymentId)).filter(u=>!r.has(u.id));for(let u of a)r.add(u.id);for(let u of a)console.log(`${e.prefix}${u.message}`);let d=await U(e.baseUrl,e.apiKey,e.deploymentId);if(d.status==="failed"){console.log(`${e.prefix}deployment failed`);return}if(d.status==="running"||d.status==="deployed"){console.log(`${e.prefix}deployment complete`);return}await new Promise(u=>setTimeout(u,t))}console.log(`${e.prefix}deployment still in progress`)}o(Ee,"pollDeploymentLogs");import{stdin as q,stdout as H}from"node:process";import{createInterface as F}from"node:readline/promises";async function z(){let e=[];for await(let t of process.stdin)e.push(Buffer.isBuffer(t)?t:Buffer.from(String(t)));return Buffer.concat(e).toString("utf8").replace(/\r?\n$/,"")}o(z,"readAllStdin");function V(e){return new Promise((t,n)=>{let r=process.stdin,s=process.stderr,i="",a=r.isRaw;function d(){r.off("data",u),r.setRawMode&&r.setRawMode(a),r.pause(),s.write(`
2
+ import{c as _}from"./chunk-RFQD6B44.js";import{V as y,W as C,X as N,Y as D,Z as k,_ as K,e as L,f as U,i as M,t as $}from"./chunk-JEMECEQH.js";import{b as O}from"./chunk-7EQLW2KM.js";import{d as I}from"./chunk-RPM4FDRX.js";import{e as B,f as T,g as A}from"./chunk-BSHAIAXY.js";import{f as w}from"./chunk-3M53YXEI.js";import{b as v}from"./chunk-GLUWATL5.js";import{a as o}from"./chunk-FTQLQJQV.js";function ce(e){if(e.repoUrl)return e.repoUrl;if(e.gitHost&&e.gitOwner&&e.gitRepo)return`https://${e.gitHost}/${e.gitOwner}/${e.gitRepo}.git`;throw new Error("repoUrl missing from API response")}o(ce,"resolveRepoUrl");function le(e,t){let n=new URL(e),r=encodeURIComponent(t);return`${n.protocol}//x-access-token:${r}@${n.host}${n.pathname}`}o(le,"formatTokenizedRepoUrl");function fe(e){let t=new URL(e);return`${t.protocol}//x-access-token:$OPENPOND_API_KEY@${t.host}${t.pathname}`}o(fe,"formatTokenizedRepoUrlForPrint");function me(e){return e.replace(/x-access-token:[^@]+@/g,"x-access-token:***@")}o(me,"redactToken");function pe(e){let t=process.env.OPENPOND_BASE_URL;if(t)try{let n=new URL(t).hostname,r=new URL(e).hostname;n&&r&&n!==r&&(console.warn(`warning: repo host (${r}) does not match OPENPOND_BASE_URL (${n})`),console.warn("warning: verify your git host configuration matches OPENPOND_BASE_URL."))}catch{}}o(pe,"warnOnRepoHostMismatch");function W(e){let t=e.split("/").filter(Boolean);if(t.length!==2)throw new Error("expected <handle>/<repo>");return{handle:t[0],repo:t[1]}}o(W,"parseHandleRepo");function S(e){return(e||"").trim().toLowerCase()}o(S,"normalizeRepoName");async function ee(e){if(!e.forceRefresh){let n=await C({apiBase:e.apiBase,apiKey:e.apiKey,ttlMs:y});if(n)return n}let t=await M(e.apiBase,e.apiKey);return await N({apiBase:e.apiBase,apiKey:e.apiKey,apps:t}),t}o(ee,"fetchAppsWithCache");async function Re(e){if(!e.forceRefresh){let r=await D({apiBase:e.apiBase,apiKey:e.apiKey,ttlMs:y});if(r)return r}let t=await $(e.apiBase,e.apiKey),n=Array.isArray(t.tools)?t.tools:[];return await k({apiBase:e.apiBase,apiKey:e.apiKey,tools:n}),n}o(Re,"fetchToolsWithCache");async function Pe(e,t,n){let{handle:r,repo:s}=W(n),i=await ee({apiBase:e,apiKey:t}),a=S(s),d=i.find(u=>u.handle&&u.handle!==r?!1:[u.repo,u.gitRepo,u.id].map(S).includes(a));if(!d)throw new Error(`app not found for ${r}/${s}`);return{app:d,handle:r,repo:s}}o(Pe,"resolveAppTarget");async function Ee(e){let t=e.intervalMs??5e3,n=e.timeoutMs??240*1e3,r=new Set,s=Date.now();for(;Date.now()-s<n;){let a=(await L(e.baseUrl,e.apiKey,e.deploymentId)).filter(u=>!r.has(u.id));for(let u of a)r.add(u.id);for(let u of a)console.log(`${e.prefix}${u.message}`);let d=await U(e.baseUrl,e.apiKey,e.deploymentId);if(d.status==="failed"){console.log(`${e.prefix}deployment failed`);return}if(d.status==="running"||d.status==="deployed"){console.log(`${e.prefix}deployment complete`);return}await new Promise(u=>setTimeout(u,t))}console.log(`${e.prefix}deployment still in progress`)}o(Ee,"pollDeploymentLogs");import{stdin as q,stdout as H}from"node:process";import{createInterface as F}from"node:readline/promises";async function z(){let e=[];for await(let t of process.stdin)e.push(Buffer.isBuffer(t)?t:Buffer.from(String(t)));return Buffer.concat(e).toString("utf8").replace(/\r?\n$/,"")}o(z,"readAllStdin");function V(e){return new Promise((t,n)=>{let r=process.stdin,s=process.stderr,i="",a=r.isRaw;function d(){r.off("data",u),r.setRawMode&&r.setRawMode(a),r.pause(),s.write(`
3
3
  `)}o(d,"cleanup");function u(m){let f=Buffer.isBuffer(m)?m:Buffer.from(m);for(let c of f){if(c===3){d(),n(new Error("secret prompt cancelled"));return}if(c===13||c===10){d(),t(i);return}if(c===127||c===8){i.length>0&&(i=i.slice(0,-1),s.write("\b \b"));continue}i+=Buffer.from([c]).toString("utf8"),s.write("*")}}o(u,"onData"),s.write(e),r.resume(),r.setRawMode&&r.setRawMode(!0),r.on("data",u)})}o(V,"readMaskedLine");async function Ae(e,t=!1){let n=F({input:q,output:H});try{let r=t?"[Y/n]":"[y/N]",s=(await n.question(`${e} ${r} `)).trim().toLowerCase();return s?s==="y"||s==="yes":t}finally{n.close()}}o(Ae,"promptConfirm");async function Ie(e){let t=F({input:q,output:H});try{return(await t.question(`Local path (default: ${e}): `)).trim()||e}finally{t.close()}}o(Ie,"promptForPath");var X=["readonly","attempt","feature","rollout","replay","template_build","scheduled_run","patch_only","hotfix","multi_feature_batch"],j=["none","manual","auto_after_checks"],G=[...K];function te(e,t){return(process.env.OPENPOND_SANDBOX_BASE_URL||process.env.OPENPOND_API_URL||e.apiBaseUrl||A(process.env.OPENPOND_BASE_URL||e.baseUrl)||v).replace(/\/$/,"")}o(te,"resolveSandboxBaseUrl");async function We(e){let t=await ne(e),n=T(t),r=await _(t,n),s=B(e)||process.env.OPENPOND_SANDBOX_API_URL?.trim()||null,i=te(t,e);return O(s?{apiKey:r,sandboxApiUrl:s}:{apiKey:r,baseUrl:i})}o(We,"resolveSandboxClient");async function ne(e){return I()}o(ne,"loadSandboxConfig");function qe(e){if(e===void 0)return;if(typeof e!="string"||!e.trim())throw new Error("workflow-mode must be a non-empty value");let t=e.trim();if(!X.includes(t))throw new Error(`workflow-mode must be one of ${X.join(", ")}`);return t}o(qe,"parseSandboxWorkflowModeOption");function He(e){if(e===void 0)return;if(typeof e!="string"||!e.trim())throw new Error("runtime-promotion-policy must be a non-empty value");let t=e.trim();if(!j.includes(t))throw new Error(`runtime-promotion-policy must be one of ${j.join(", ")}`);return t}o(He,"parseSandboxRuntimePromotionPolicyOption");function Fe(e){if(typeof e!="string"||!e.trim())return;let t=e.trim();if(!G.includes(t))throw new Error(`runtime-profile-id must be one of ${G.join(", ")}`);return t}o(Fe,"parseSandboxRuntimeProfileIdOption");function re(e){let t=Y(e.envRef,"env-ref").map(({name:i,value:a})=>({name:i,secretRef:a})),n=Y(e.envLiteral,"env-literal").map(({name:i,value:a})=>{if(oe(i)&&!w(e.allowPlainSecretEnv))throw new Error(`refusing plaintext value for secret-like env ${i}; create a sandbox secret and pass --env-ref ${i}=openpond://secret/...`);return{name:i,value:a}}),r=[...t,...n],s=new Set;for(let i of r){if(s.has(i.name))throw new Error(`duplicate sandbox env var: ${i.name}`);s.add(i.name)}return r}o(re,"parseSandboxEnvOptions");function ze(e,t){let n=re(t),r=new Set(n.map(a=>a.name)),s=new Map(n.map(a=>[a.name,a]));for(let a of e.inputs.env)if(s.get(a.name)?.value!==void 0&&a.secret!==!1)throw new Error(`sandbox template env ${a.name} requires a secret ref. Pass --env-ref ${a.name}=openpond://secret/...`);let i=e.inputs.env.filter(a=>a.required&&!r.has(a.name)).map(a=>a.name);if(i.length>0)throw new Error(`missing required sandbox template env refs: ${i.join(", ")}. Pass --env-ref NAME=openpond://secret/...`);return n}o(ze,"parseSandboxTemplateEnvOptions");function Y(e,t){return typeof e!="string"?[]:e.split(",").map(n=>n.trim()).filter(Boolean).map(n=>{let r=n.indexOf("=");if(r<=0)throw new Error(`${t} entries must use NAME=value`);let s=n.slice(0,r).trim(),i=n.slice(r+1).trim();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(s))throw new Error(`${t} has invalid env name: ${s}`);if(!i)throw new Error(`${t} value is required for ${s}`);return{name:s,value:i}})}o(Y,"parseSandboxEnvAssignments");function oe(e){return/(?:SECRET|TOKEN|KEY|PASSWORD|PASSWD|PRIVATE|CREDENTIAL|DATABASE_URL|DSN)/i.test(e)}o(oe,"isSecretLikeEnvName");async function Ve(e,t){if(typeof e.value=="string"||typeof e.secretValue=="string")throw new Error("sandbox secret values must be provided with --stdin or the masked prompt");if(w(e.stdin)){let s=await z();if(!s)throw new Error(`${t} read no secret value from stdin`);return s}if(!process.stdin.isTTY)throw new Error(`${t} requires --stdin when not running in a TTY`);let r=await V(`${t}: `);if(!r)throw new Error(`${t} cannot be empty`);return r}o(Ve,"readSandboxSecretValue");function Xe(e){return{id:e.id,teamId:e.teamId,name:e.name,scope:e.scope,status:e.status,secretRef:e.secretRef,currentVersion:e.currentVersion,updatedAt:e.updatedAt,lastUsedAt:e.lastUsedAt,attachedDestinations:e.attachments?.length??0}}o(Xe,"summarizeSandboxSecret");import{Buffer as b}from"node:buffer";import{spawn as Q}from"node:child_process";var ie=600*1e3,se=2*1024*1024;function R(e,t=[],n={}){return n.inherit&&n.terminateWhenStdoutIncludes!==void 0?Promise.reject(new Error("terminateWhenStdoutIncludes requires captured stdout")):n.terminateWhenStdoutIncludes===""?Promise.reject(new Error("terminateWhenStdoutIncludes must not be empty")):new Promise((r,s)=>{let i=Q(e,t,{cwd:n.cwd,env:n.env?{...process.env,...n.env}:void 0,shell:n.shell,detached:n.detached??process.platform!=="win32",stdio:n.inherit?"inherit":[n.stdin===void 0?"ignore":"pipe","pipe","pipe"]}),a=new h(J(n)),d=new h(J(n)),u=!1,m=n.timeoutMs??ie,f,c,x=null,g=!1,P=o(()=>{f&&clearTimeout(f),c&&clearTimeout(c)},"clearTimers"),E=o(l=>{x!==null||g||(x=l,u=l==="timeout",f&&(clearTimeout(f),f=void 0),Z(i.pid,"SIGTERM"),c=setTimeout(()=>{i.exitCode===null&&i.signalCode===null&&Z(i.pid,"SIGKILL")},5e3))},"requestTermination");m>0&&(f=setTimeout(()=>{E("timeout")},m)),n.inherit||(i.stdout?.on("data",l=>{a.append(l);let p=n.terminateWhenStdoutIncludes;p!==void 0&&a.text().includes(p)&&E("output")}),i.stderr?.on("data",l=>{d.append(l)})),i.on("error",l=>{P(),g=!0,s(l)}),i.on("close",(l,p)=>{g||(g=!0,P(),r({code:l,signal:p,terminationReason:x??(p?"signal":"exit"),stdout:a.text(),stderr:d.text(),timedOut:u,stdoutTruncated:a.truncated,stderrTruncated:d.truncated}))}),n.stdin!==void 0&&i.stdin?.end(n.stdin)})}o(R,"runProcessCommand");var h=class{static{o(this,"BoundedOutput")}#t=[];#n;#e=0;truncated=!1;constructor(t){this.#n=t}append(t){let n=b.isBuffer(t)?t:b.from(t),r=this.#n-this.#e;if(r<=0){n.byteLength>0&&(this.truncated=!0);return}if(n.byteLength<=r){this.#t.push(n),this.#e+=n.byteLength;return}this.#t.push(n.subarray(0,r)),this.#e+=r,this.truncated=!0}text(){let t=b.concat(this.#t,this.#e).toString("utf8");return this.truncated?`${t}
4
4
  [truncated after ${this.#n} bytes]
5
5
  `:t}};function J(e){let t=e.maxOutputBytes??se;return Math.max(0,Math.floor(t))}o(J,"maxOutputBytes");function Z(e,t){if(e){if(process.platform==="win32"){let n=["/PID",String(e),"/T"];t==="SIGKILL"&&n.push("/F"),Q("taskkill",n,{stdio:"ignore",windowsHide:!0}).unref();return}try{process.kill(-e,t)}catch(n){if(n.code!=="ESRCH")throw n}}}o(Z,"terminateProcessTree");async function ae(e,t,n={}){return R(e,t,{cwd:n.cwd,inherit:n.inherit,timeoutMs:n.timeoutMs,maxOutputBytes:n.maxOutputBytes,terminateWhenStdoutIncludes:n.terminateWhenStdoutIncludes})}o(ae,"runCommand");async function rt(e,t={}){let n=t.timeoutSeconds===void 0?void 0:t.timeoutSeconds*1e3;return R(e,[],{cwd:t.cwd,env:t.env,shell:!0,inherit:t.inherit,timeoutMs:n,maxOutputBytes:t.maxOutputBytes})}o(rt,"runShellCommand");async function ot(e,t){let n=await ae("git",["remote","get-url",t],{cwd:e});if(n.code!==0)return null;let r=n.stdout.trim();return r.length>0?r:null}o(ot,"getGitRemoteUrl");export{ce as a,le as b,fe as c,me as d,pe as e,S as f,ee as g,Re as h,Pe as i,Ee as j,Ae as k,Ie as l,We as m,qe as n,He as o,Fe as p,re as q,ze as r,Ve as s,Xe as t,R as u,ae as v,rt as w,ot as x};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as ve}from"./chunk-L3KS6MOV.js";import{b as I,f as $}from"./chunk-ULJZ7NUF.js";import{E as ke,F as Re}from"./chunk-SH7POUVX.js";import{f as U}from"./chunk-UGOK7VTC.js";import{a as s}from"./chunk-FTQLQJQV.js";import{createRequire as at}from"node:module";import{createHash as Qe,randomUUID as et}from"node:crypto";import{spawn as uo}from"node:child_process";import{existsSync as S}from"node:fs";import{cp as fo,mkdir as x,readFile as st,readdir as it,rename as Pe,rm as we,symlink as po,writeFile as z}from"node:fs/promises";import u from"node:path";function ne(e=null){return{actionCount:0,generatedAt:null,manifestPath:null,registryPath:null,stale:!0,error:e}}s(ne,"emptyProfileCatalogState");function re(e=null){return{skillCount:0,generatedAt:null,stale:!0,error:e}}s(re,"emptyProfileSkillCatalogState");function ae(){return{status:"ready",requirementCount:0,blockingCount:0,optionalMissingCount:0,readyCount:0,requirements:[],blockingRequirements:[]}}s(ae,"emptyProfileSetupGate");function K(){return{changedAgents:[],newAgents:[],deletedAgents:[],changedSkills:[],changedActions:[],changedExtensions:[],setupChanges:[],envRequirementChanges:[],files:[]}}s(K,"emptyProfileDiffSummary");function se(e=null){return{state:e?"error":"none",message:e??"No active OpenPond profile.",agentCount:0,actionCount:0,defaultAction:null,checkFresh:!1,checkStaleReason:e??"No active profile.",localHead:null,hostedHead:null}}s(se,"emptyProfileSummary");import{existsSync as G}from"node:fs";import{readFile as It,stat as kt}from"node:fs/promises";import V from"node:path";var be=".openpond/agent-manifest.json",Ee=".openpond/action-registry.json",Rt=".openpond/source-upload-metadata.json",vt=".openpond/agent-package-origin.json";async function _e(e){return Me({agentId:"default",sourcePath:e,preferred:!0})}s(_e,"loadProfileActionCatalog");async function $e(e){if(e.length===0)return{catalog:{actionCount:0,generatedAt:null,manifestPath:null,registryPath:null,stale:!1,error:null},actionCatalog:[],sourceSetupRequirements:[]};let t=[...e.filter(c=>c.preferred),...e.filter(c=>!c.preferred)],o=await Promise.all(t.map(Me)),n=new Map,r=[];for(let c of o)for(let l of c.actionCatalog){let d=n.has(l.id)?`${l.agentId??"agent"}.${l.sourceActionId??l.id}`:l.id,p=d===l.id?l:{...l,id:d};n.set(d,p),r.push(p)}let a=Et(o.map(c=>c.catalog.generatedAt)),i=o.map(c=>c.catalog.error).filter(Boolean);return{catalog:{actionCount:r.length,generatedAt:a,manifestPath:o.find(c=>c.catalog.manifestPath)?.catalog.manifestPath??null,registryPath:o.find(c=>c.catalog.registryPath)?.catalog.registryPath??null,stale:o.some(c=>c.catalog.stale),error:i.length>0?i.join("; "):null},actionCatalog:r,sourceSetupRequirements:o.flatMap(c=>c.sourceSetupRequirements)}}s($e,"loadProfileActionCatalogForSources");async function Me(e){let t=e.sourcePath,o=V.join(t,be),n=V.join(t,Ee),r=V.join(t,Rt),a=V.join(t,vt);try{let i=await X(o),c=await X(n),l=await X(r),d=y(await X(a)),p=y(y(i)?.inputSchemas),h=Oe(y(l)?.setupRequirements)??[],v=xt(h),A=new Map;for(let g of[...ie(y(i)?.actionCatalog),...ie(y(c)?.actions),...ie(y(i)?.actions)]){let j=m(g.id)??m(g.name);if(!j)continue;let C=A.get(j),At=Ot({sourceRequirementsByAction:v,actionId:j,actionName:m(g.name)}),St=_t(Oe(g.setupRequirements)??C?.setupRequirements??[],At),Ct={id:j,agentId:e.agentId,sourcePath:t,sourceActionId:j,name:m(g.name)??C?.name??j,label:m(g.label)??C?.label??Tt(j),description:m(g.description)??C?.description??null,visibility:m(g.visibility)??C?.visibility??"default",inputSchema:qt(g.inputSchema,p)??C?.inputSchema??null,outputSchema:je(g.outputSchema)??C?.outputSchema??null,approvalPolicy:y(g.approvalPolicy)??C?.approvalPolicy??null,artifactPolicy:y(g.artifactPolicy)??C?.artifactPolicy??null,setupRequirements:St,mcp:y(g.mcp)??C?.mcp??null,schedulePolicy:y(g.schedulePolicy)??C?.schedulePolicy??null,trace:bt(y(g.trace)??C?.trace??null,d),implementation:y(g.implementation)??C?.implementation??null,invokesModel:typeof g.invokesModel=="boolean"?g.invokesModel:C?.invokesModel};A.set(j,Ct)}let M=Array.from(A.values()).filter(g=>g.visibility!=="internal"&&g.visibility!=="debug"),L=[...i?[]:[be],...c?[]:[Ee]],_=await jt([o,n]);return{catalog:{actionCount:M.length,generatedAt:_,manifestPath:G(o)?o:null,registryPath:G(n)?n:null,stale:L.length>0,error:L.length>0?Mt(e,L):null},actionCatalog:M,sourceSetupRequirements:h}}catch(i){return{catalog:{actionCount:0,generatedAt:null,manifestPath:G(o)?o:null,registryPath:G(n)?n:null,stale:!0,error:i instanceof Error?i.message:String(i)},actionCatalog:[],sourceSetupRequirements:[]}}}s(Me,"loadProfileActionCatalogSource");function bt(e,t){if(!t)return e;let o=m(t.versionId),n=m(t.digest);return!o||!n?e:{...e??{},agentVersionId:o,agentPackageDigest:n,validationReceiptIds:xe(t.validationReceiptIds),evalReceiptIds:xe(t.evalReceiptIds)}}s(bt,"mergeAgentPackageTrace");function xe(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.trim().length>0):[]}s(xe,"stringArray");function Et(e){let t=0;for(let o of e){if(!o)continue;let n=Date.parse(o);Number.isFinite(n)&&(t=Math.max(t,n))}return t>0?new Date(t).toISOString():null}s(Et,"latestIso");function xt(e){let t=new Map;for(let o of e){let n=[m(o.actionId),m(o.sourceActionId),m(o.actionName)].filter(r=>!!r);for(let r of n){let a=t.get(r)??[];a.push(o),t.set(r,a)}}return t}s(xt,"sourceSetupRequirementsByAction");function Ot(e){return[...e.sourceRequirementsByAction.get(e.actionId)??[],...e.actionName&&e.actionName!==e.actionId?e.sourceRequirementsByAction.get(e.actionName)??[]:[]].map(o=>({...o,source:"source_upload_metadata"}))}s(Ot,"setupRequirementsForActionSource");function _t(e,t){if(t.length===0)return e;let o=[],n=new Set;for(let r of[...e,...t]){let a=$t(r);n.has(a)||(n.add(a),o.push(r))}return o}s(_t,"mergeSetupRequirements");function $t(e){return[m(e.actionId)??m(e.sourceActionId)??m(e.actionName)??"",m(e.kind)??m(e.type)??"",m(e.name)??m(e.key)??m(e.provider)??m(e.tool)??m(e.command)??m(e.packageName)??m(e.path)??m(e.repo)??m(e.url)??m(e.id)??""].join(":")}s($t,"setupRequirementIdentity");function Mt(e,t){return[`Profile agent ${e.agentId} at ${e.sourcePath} is missing SDK catalog artifact(s): ${t.join(", ")}.`,"Run `openpond profile check --kind all` after source materialization so each enabled profile agent has inspect/build artifacts."].join(" ")}s(Mt,"missingSourceArtifactsMessage");async function X(e){return G(e)?JSON.parse(await It(e,"utf8")):null}s(X,"readJsonIfExists");async function jt(e){let t=0;for(let o of e){if(!G(o))continue;let n=await kt(o);t=Math.max(t,n.mtimeMs)}return t>0?new Date(t).toISOString():null}s(jt,"latestMtime");function y(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}s(y,"asRecord");function ie(e){return Array.isArray(e)?e.filter(t=>!!y(t)):[]}s(ie,"records");function Oe(e){return Array.isArray(e)?e.filter(t=>!!y(t)):null}s(Oe,"recordArray");function m(e){return typeof e=="string"&&e.trim()?e.trim():null}s(m,"text");function je(e){return m(e)??y(e)}s(je,"schemaValue");function qt(e,t){let o=je(e);return typeof o!="string"?o:y(t?.[o])??o}s(qt,"resolvedSchemaValue");function Tt(e){let t=e.replace(/[._-]+/g," ").trim();return t?t.replace(/\b\w/g,o=>o.toUpperCase()):e}s(Tt,"titleFromActionId");var Y=class extends Error{static{s(this,"OpenPondProfileSetupRequiredError")}code="agent_source_setup_required";details;constructor(t,o){let n=o.blockingRequirements.map(r=>r.label);super(["agent_source_setup_required",`Profile action ${t} has unresolved required setup.`,n.length?`Missing setup: ${n.join(", ")}`:""].filter(Boolean).join(`
2
+ import{a as ve}from"./chunk-L3KS6MOV.js";import{b as I,f as $}from"./chunk-GY7YSD6J.js";import{E as ke,F as Re}from"./chunk-SV7ZBEK2.js";import{f as U}from"./chunk-UGOK7VTC.js";import{a as s}from"./chunk-FTQLQJQV.js";import{createRequire as at}from"node:module";import{createHash as Qe,randomUUID as et}from"node:crypto";import{spawn as uo}from"node:child_process";import{existsSync as S}from"node:fs";import{cp as fo,mkdir as x,readFile as st,readdir as it,rename as Pe,rm as we,symlink as po,writeFile as z}from"node:fs/promises";import u from"node:path";function ne(e=null){return{actionCount:0,generatedAt:null,manifestPath:null,registryPath:null,stale:!0,error:e}}s(ne,"emptyProfileCatalogState");function re(e=null){return{skillCount:0,generatedAt:null,stale:!0,error:e}}s(re,"emptyProfileSkillCatalogState");function ae(){return{status:"ready",requirementCount:0,blockingCount:0,optionalMissingCount:0,readyCount:0,requirements:[],blockingRequirements:[]}}s(ae,"emptyProfileSetupGate");function K(){return{changedAgents:[],newAgents:[],deletedAgents:[],changedSkills:[],changedActions:[],changedExtensions:[],setupChanges:[],envRequirementChanges:[],files:[]}}s(K,"emptyProfileDiffSummary");function se(e=null){return{state:e?"error":"none",message:e??"No active OpenPond profile.",agentCount:0,actionCount:0,defaultAction:null,checkFresh:!1,checkStaleReason:e??"No active profile.",localHead:null,hostedHead:null}}s(se,"emptyProfileSummary");import{existsSync as G}from"node:fs";import{readFile as It,stat as kt}from"node:fs/promises";import V from"node:path";var be=".openpond/agent-manifest.json",Ee=".openpond/action-registry.json",Rt=".openpond/source-upload-metadata.json",vt=".openpond/agent-package-origin.json";async function _e(e){return Me({agentId:"default",sourcePath:e,preferred:!0})}s(_e,"loadProfileActionCatalog");async function $e(e){if(e.length===0)return{catalog:{actionCount:0,generatedAt:null,manifestPath:null,registryPath:null,stale:!1,error:null},actionCatalog:[],sourceSetupRequirements:[]};let t=[...e.filter(c=>c.preferred),...e.filter(c=>!c.preferred)],o=await Promise.all(t.map(Me)),n=new Map,r=[];for(let c of o)for(let l of c.actionCatalog){let d=n.has(l.id)?`${l.agentId??"agent"}.${l.sourceActionId??l.id}`:l.id,p=d===l.id?l:{...l,id:d};n.set(d,p),r.push(p)}let a=Et(o.map(c=>c.catalog.generatedAt)),i=o.map(c=>c.catalog.error).filter(Boolean);return{catalog:{actionCount:r.length,generatedAt:a,manifestPath:o.find(c=>c.catalog.manifestPath)?.catalog.manifestPath??null,registryPath:o.find(c=>c.catalog.registryPath)?.catalog.registryPath??null,stale:o.some(c=>c.catalog.stale),error:i.length>0?i.join("; "):null},actionCatalog:r,sourceSetupRequirements:o.flatMap(c=>c.sourceSetupRequirements)}}s($e,"loadProfileActionCatalogForSources");async function Me(e){let t=e.sourcePath,o=V.join(t,be),n=V.join(t,Ee),r=V.join(t,Rt),a=V.join(t,vt);try{let i=await X(o),c=await X(n),l=await X(r),d=y(await X(a)),p=y(y(i)?.inputSchemas),h=Oe(y(l)?.setupRequirements)??[],v=xt(h),A=new Map;for(let g of[...ie(y(i)?.actionCatalog),...ie(y(c)?.actions),...ie(y(i)?.actions)]){let j=m(g.id)??m(g.name);if(!j)continue;let C=A.get(j),At=Ot({sourceRequirementsByAction:v,actionId:j,actionName:m(g.name)}),St=_t(Oe(g.setupRequirements)??C?.setupRequirements??[],At),Ct={id:j,agentId:e.agentId,sourcePath:t,sourceActionId:j,name:m(g.name)??C?.name??j,label:m(g.label)??C?.label??Tt(j),description:m(g.description)??C?.description??null,visibility:m(g.visibility)??C?.visibility??"default",inputSchema:qt(g.inputSchema,p)??C?.inputSchema??null,outputSchema:je(g.outputSchema)??C?.outputSchema??null,approvalPolicy:y(g.approvalPolicy)??C?.approvalPolicy??null,artifactPolicy:y(g.artifactPolicy)??C?.artifactPolicy??null,setupRequirements:St,mcp:y(g.mcp)??C?.mcp??null,schedulePolicy:y(g.schedulePolicy)??C?.schedulePolicy??null,trace:bt(y(g.trace)??C?.trace??null,d),implementation:y(g.implementation)??C?.implementation??null,invokesModel:typeof g.invokesModel=="boolean"?g.invokesModel:C?.invokesModel};A.set(j,Ct)}let M=Array.from(A.values()).filter(g=>g.visibility!=="internal"&&g.visibility!=="debug"),L=[...i?[]:[be],...c?[]:[Ee]],_=await jt([o,n]);return{catalog:{actionCount:M.length,generatedAt:_,manifestPath:G(o)?o:null,registryPath:G(n)?n:null,stale:L.length>0,error:L.length>0?Mt(e,L):null},actionCatalog:M,sourceSetupRequirements:h}}catch(i){return{catalog:{actionCount:0,generatedAt:null,manifestPath:G(o)?o:null,registryPath:G(n)?n:null,stale:!0,error:i instanceof Error?i.message:String(i)},actionCatalog:[],sourceSetupRequirements:[]}}}s(Me,"loadProfileActionCatalogSource");function bt(e,t){if(!t)return e;let o=m(t.versionId),n=m(t.digest);return!o||!n?e:{...e??{},agentVersionId:o,agentPackageDigest:n,validationReceiptIds:xe(t.validationReceiptIds),evalReceiptIds:xe(t.evalReceiptIds)}}s(bt,"mergeAgentPackageTrace");function xe(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.trim().length>0):[]}s(xe,"stringArray");function Et(e){let t=0;for(let o of e){if(!o)continue;let n=Date.parse(o);Number.isFinite(n)&&(t=Math.max(t,n))}return t>0?new Date(t).toISOString():null}s(Et,"latestIso");function xt(e){let t=new Map;for(let o of e){let n=[m(o.actionId),m(o.sourceActionId),m(o.actionName)].filter(r=>!!r);for(let r of n){let a=t.get(r)??[];a.push(o),t.set(r,a)}}return t}s(xt,"sourceSetupRequirementsByAction");function Ot(e){return[...e.sourceRequirementsByAction.get(e.actionId)??[],...e.actionName&&e.actionName!==e.actionId?e.sourceRequirementsByAction.get(e.actionName)??[]:[]].map(o=>({...o,source:"source_upload_metadata"}))}s(Ot,"setupRequirementsForActionSource");function _t(e,t){if(t.length===0)return e;let o=[],n=new Set;for(let r of[...e,...t]){let a=$t(r);n.has(a)||(n.add(a),o.push(r))}return o}s(_t,"mergeSetupRequirements");function $t(e){return[m(e.actionId)??m(e.sourceActionId)??m(e.actionName)??"",m(e.kind)??m(e.type)??"",m(e.name)??m(e.key)??m(e.provider)??m(e.tool)??m(e.command)??m(e.packageName)??m(e.path)??m(e.repo)??m(e.url)??m(e.id)??""].join(":")}s($t,"setupRequirementIdentity");function Mt(e,t){return[`Profile agent ${e.agentId} at ${e.sourcePath} is missing SDK catalog artifact(s): ${t.join(", ")}.`,"Run `openpond profile check --kind all` after source materialization so each enabled profile agent has inspect/build artifacts."].join(" ")}s(Mt,"missingSourceArtifactsMessage");async function X(e){return G(e)?JSON.parse(await It(e,"utf8")):null}s(X,"readJsonIfExists");async function jt(e){let t=0;for(let o of e){if(!G(o))continue;let n=await kt(o);t=Math.max(t,n.mtimeMs)}return t>0?new Date(t).toISOString():null}s(jt,"latestMtime");function y(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}s(y,"asRecord");function ie(e){return Array.isArray(e)?e.filter(t=>!!y(t)):[]}s(ie,"records");function Oe(e){return Array.isArray(e)?e.filter(t=>!!y(t)):null}s(Oe,"recordArray");function m(e){return typeof e=="string"&&e.trim()?e.trim():null}s(m,"text");function je(e){return m(e)??y(e)}s(je,"schemaValue");function qt(e,t){let o=je(e);return typeof o!="string"?o:y(t?.[o])??o}s(qt,"resolvedSchemaValue");function Tt(e){let t=e.replace(/[._-]+/g," ").trim();return t?t.replace(/\b\w/g,o=>o.toUpperCase()):e}s(Tt,"titleFromActionId");var Y=class extends Error{static{s(this,"OpenPondProfileSetupRequiredError")}code="agent_source_setup_required";details;constructor(t,o){let n=o.blockingRequirements.map(r=>r.label);super(["agent_source_setup_required",`Profile action ${t} has unresolved required setup.`,n.length?`Missing setup: ${n.join(", ")}`:""].filter(Boolean).join(`
3
3
  `)),this.name="OpenPondProfileSetupRequiredError",this.details={error:"agent_source_setup_required",actionId:t,setupGate:o,missing:n,blockingSetupRequirements:o.blockingRequirements,setupRequirements:o.requirements}}};function Z(e){let t=new Map;for(let i of e.sourceSetupRequirements??[]){let c=Ft(i);if(e.actionId&&c&&c!==e.actionId&&P(i.actionName)!==e.actionId&&P(i.sourceActionId)!==e.actionId)continue;let l=qe({record:i,source:"source_upload_metadata",actionId:c});l&&t.set(l.ref,l)}for(let i of e.actionCatalog)if(!(e.actionId&&i.id!==e.actionId&&i.name!==e.actionId))for(let c of i.setupRequirements??[]){let l=qe({record:c,source:"action_catalog",actionId:i.id});l&&t.set(l.ref,l)}let o=Array.from(t.values()),n=o.filter(i=>i.blocking),r=o.filter(i=>!i.required&&!ce(i.status)).length,a=o.filter(i=>ce(i.status)).length;return{status:Lt(n),requirementCount:o.length,blockingCount:n.length,optionalMissingCount:r,readyCount:a,requirements:o,blockingRequirements:n}}s(Z,"buildOpenPondProfileSetupGate");function le(e,t){if(t.blockingRequirements.length>0)throw new Y(e,t)}s(le,"assertOpenPondProfileActionReady");function Nt(e){let t=e.actionId?`${e.actionId}: `:"",o=e.required?"required":"optional";return`${t}${e.label} (${o}, ${e.status})`}s(Nt,"formatOpenPondProfileSetupRequirement");function qe(e){let t=e.source==="action_catalog"&&P(e.record.source)==="source_upload_metadata"?"source_upload_metadata":e.source,o=P(e.record.kind)??P(e.record.type),n=P(e.record.label)??P(e.record.name)??P(e.record.key)??P(e.record.provider)??P(e.record.tool)??P(e.record.command)??P(e.record.packageName)??P(e.record.path)??P(e.record.repo)??P(e.record.url)??P(e.record.id)??o??"setup requirement",r=e.record.required!==!1,a=Ht(e.record);return{ref:[t,e.actionId??"source",o??"requirement",n].join(":"),source:t,actionId:e.actionId,kind:o,label:n,status:a,required:r,blocking:r&&!ce(a)}}s(qe,"setupRequirementFromRecord");function Ft(e){return P(e.actionId)??P(e.sourceActionId)??P(e.actionName)}s(Ft,"setupRequirementActionId");function Ht(e){let t=P(e.status)??P(e.state);return t?t==="satisfied"||t==="connected"||t==="provided"?"ready":t:typeof e.satisfied=="boolean"?e.satisfied?"ready":"setup_required":typeof e.ready=="boolean"&&e.ready?"ready":"setup_required"}s(Ht,"setupStatus");function Lt(e){return e.length===0?"ready":e.some(t=>["blocked","unsupported","unsupported_dependency","stale"].includes(t.status))?"blocked":"setup_required"}s(Lt,"gateStatus");function ce(e){return e==="ready"||e==="disabled"}s(ce,"isReadyStatus");function P(e){return typeof e=="string"&&e.trim()?e.trim():null}s(P,"text");import{spawn as Ut}from"node:child_process";import{randomUUID as Gt}from"node:crypto";import{existsSync as ue}from"node:fs";import{readFile as Bt,rm as Dt,writeFile as Fe}from"node:fs/promises";import Q from"node:path";var He=["**/node_modules/","**/.bun/","**/.env","**/.env.*","**/.openpond/traces/","**/.openpond/vendor/","**/.openpond/eval-results.json","**/.openpond/artifact-index.json","**/.openpond/source-upload-cache.json",""].join(`
4
4
  `);async function Le(e){if(!ue(Q.join(e,".git"))){let a=await k(e,["init","-b","main"]);if(a.code!==0)throw new Error(T("git init",a))}let t=Q.join(e,".gitignore");if(ue(t)?await zt(t):await Fe(t,He,"utf8"),await Wt(e))return;let o=await N(e);if(!o.dirty&&o.files.length===0)return;let n=await k(e,["add","-A"]);if(n.code!==0)throw new Error(T("git add",n));let r=await k(e,["commit","-m","Initialize OpenPond profile"],{env:{...process.env,GIT_AUTHOR_NAME:process.env.GIT_AUTHOR_NAME||"OpenPond",GIT_AUTHOR_EMAIL:process.env.GIT_AUTHOR_EMAIL||"openpond@example.invalid",GIT_COMMITTER_NAME:process.env.GIT_COMMITTER_NAME||"OpenPond",GIT_COMMITTER_EMAIL:process.env.GIT_COMMITTER_EMAIL||"openpond@example.invalid"}});if(r.code!==0&&!/nothing to commit/i.test(r.stdout+r.stderr))throw new Error(T("git commit",r))}s(Le,"ensureProfileGitRepo");async function zt(e){let t=await Bt(e,"utf8").catch(()=>""),o=He.split(/\r?\n/).map(r=>r.trim()).filter(Boolean).filter(r=>!t.split(/\r?\n/).some(a=>a.trim()===r));if(o.length===0)return;let n=t.endsWith(`
5
5
  `)||t.length===0?"":`
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as Je}from"./chunk-ZIQJDTQB.js";import{a as F,e as $,f as Ye,h as Ue}from"./chunk-3Z4VM2LF.js";import{b as ne}from"./chunk-EICS777E.js";import{a as $e}from"./chunk-FEAKTSRS.js";import{a as Ge}from"./chunk-TPOAAJKA.js";import{f as Fe,h as R}from"./chunk-RCQYEHHD.js";import{b as We}from"./chunk-SDHG6CKU.js";import{d as ze}from"./chunk-WCNPGKST.js";import{b as O,c as W}from"./chunk-AFH462DO.js";import{a as Me}from"./chunk-UANH7U3Y.js";import{d as X}from"./chunk-CIZI6Z7D.js";import{a as Oe}from"./chunk-VFH5C6D2.js";import{d as je,e as Ne}from"./chunk-EYTTZ5H4.js";import{m as Be}from"./chunk-DKOVZ6R2.js";import{u as se}from"./chunk-OFJPOTES.js";import{I as Q,mc as Ve,qc as qe,v as Ae}from"./chunk-HG2YFMVU.js";import{i as Le,j as Ce}from"./chunk-AUO5DCEU.js";import{f as Te}from"./chunk-WD4KAKEX.js";import{j as Ie}from"./chunk-WGQ3FMRF.js";import{f as _e}from"./chunk-JVMSN7LH.js";import{r as U,v as K,w as be}from"./chunk-YI6ME6PU.js";import{Ca as De,Ia as He,aa as q,ba as Y,ha as Pe,i as J,ia as Ee,ja as L,oa as N,za as Se}from"./chunk-BU6MW65V.js";import{w as xe,x as Re,z}from"./chunk-D6L6UNUQ.js";import{S as ve,d as we,da as ye}from"./chunk-4PUOWSDE.js";import{Ia as me,Oa as he,bb as ge,e as ce,ja as le,kb as ke,oa as de,pa as M,qa as pe,ra as fe,xa as ue}from"./chunk-ZY32SZ2P.js";import{r as ie}from"./chunk-OTDDXEQ6.js";import{a as re,f as oe}from"./chunk-HNQPEOJD.js";import{c as b,d as _,e as ae,m as V,n as f}from"./chunk-RCT3O3HQ.js";import{A as x}from"./chunk-X2J2P5ZT.js";import{a as h}from"./chunk-FTQLQJQV.js";import{promises as it}from"node:fs";import nt from"node:path";async function _t(e){let o=e.definition.tasksetRelease,c=await je(e.store,e.harnessRelease);if(!c)throw new Error("Evaluation Profile Harness release is unavailable.");let a=await lt({...e,runtime:c});if(a)return a;let s=await e.store.listTasksetRevisions(e.profileId);for(let i of s){if(o.id!==i.id&&o.id!==`taskset-release-${i.id}-r${i.revision}`)continue;let r=await ct(e.storeDir,i);if(r.taskset.id===o.id&&r.taskset.contentHash===o.contentHash)return r}throw new Error(`Released Taskset ${o.id} is unavailable in Profile ${e.profileId}.`)}h(_t,"loadLocalProfileEvaluationTaskset");async function ct(e,o){let c=o.metadata.importedPackageHash;if(typeof c=="string"){let i=await W(e,c);if(i.taskset.id!==o.id||i.taskset.revision!==o.revision)throw new Error("Imported evaluation Taskset differs from its local Profile revision.");return i}if(De(o)!==o.contentHash)throw new Error("Authored evaluation Taskset differs from its immutable revision.");let a=He({taskset:o,adapterId:ze(o)}),s=await We({storeDir:e,taskset:o,content:{schemaVersion:"openpond.tasksetPackage.v1",taskset:a.tasksetRelease,environment:a.environmentRelease,verifierSet:a.verifierSetRelease}});return await O(e,s),s}h(ct,"loadCandidate");async function lt(e){let o=e.definition.tasksetRelease,c=e.runtime;if(c.release.harnessRelease.id!==e.harnessRelease.id||c.release.harnessRelease.contentHash!==e.harnessRelease.contentHash)throw new Error("Evaluation Taskset runtime differs from its requested release.");let a=`evals/tasksets/${o.contentHash}.json`,s=c.release.harnessRelease.files.find(i=>i.path===a);if(s){if(s.visibility!=="verifier")throw new Error("Evaluation Taskset package is not verifier-private.");let i=await it.readFile(nt.join(c.release.bundlePath,"source",...a.split("/")));if(V(i)!==s.contentHash)throw new Error("Released evaluation Taskset package bytes differ from their source receipt.");let r=L(JSON.parse(i.toString("utf8")));if(r.taskset.id!==o.id||r.taskset.contentHash!==o.contentHash)throw new Error("Released evaluation Taskset package differs from its definition.");return r}return null}h(lt,"loadReleasedProfileEvaluationTaskset");function Z(e){return{id:fe(e),label:"Selected Dataset evaluation",description:"Explicit sealed external Dataset evaluation recipe.",target:e.target,tasksetRelease:{id:e.dataset.id,contentHash:e.dataset.contentHash},split:e.split,taskIds:[...new Set(e.population.map(o=>o.taskId))],seeds:[...new Set(e.population.map(o=>o.seed))],criterion:e.criterion}}h(Z,"externalProfileEvaluationDefinition");async function Bt(e){let o=e.manifest.profileEvaluation,c=o?.externalDatasetBinding?M(o.externalDatasetBinding):null;if(!c)return null;if(!e.resolveExternalDataset)throw new Error("This owner has no authorized external Dataset resolver.");let a=await e.resolveExternalDataset(c,e.selected);await a.authorize();let s=L(a.packageValue),i=await e.loadCatalog({ref:e.selected.profileRef,sourceRevision:e.selected.sourceRevision,harnessRelease:e.selected.harnessRelease});if(f(a.binding)!==f(c)||c.profileId!==e.selected.profileRef.profileId||c.declaredProfileCatalogHash!==i.catalogHash||s.contentHash!==c.packageHash||f(s.taskset)!==f(e.taskset)||c.environmentHash!==f(s.taskset.environment)||c.privateDatasetClosureHash!==f(s.files.filter(t=>t.asset.visibility!=="policy").map(t=>t.asset)))throw new Error("External Dataset admission changed its actual Profile, package or private closure.");let r=Z(c),u={schemaVersion:"openpond.profileEvaluations.v1",definitions:[r],suites:[]};if(z(e.manifest,e.taskset,u),!o||o.catalogHash!==f(u)||o.definitionHash!==f(r)||f(o.target)!==f(c.target))throw new Error("External Dataset manifest changed its derived definition.");return await a.authorize(),{...a,packageValue:s,definition:r,catalog:u}}h(Bt,"admitProfileExternalDataset");import vt from"node:path";function Ke(e,o){return e.map(c=>{let a=c.workspace.draft,s=a.metadata.profileTarget,i=s&&typeof s=="object"&&!Array.isArray(s)?s:{},r=typeof i.profileId=="string"?{profileId:i.profileId,workflowId:typeof i.workflowId=="string"?i.workflowId:null}:null,u=c.checks.find(t=>t.kind==="graders"&&t.workspaceHash===c.workspace.contentHash);return{summary:{...o(c),rows:[]},projectId:c.projectId,profileTarget:r,updatedAt:a.updatedAt,workspaceHash:c.workspace.contentHash,packageHash:c.packageHash,graders:a.graders.map(t=>{let p=u?.scopes?.find(l=>l.graderId===t.id),g=t.metadata.portableVerifierRef;return{id:`grader-${f([a.id,t.id]).slice(0,40)}`,graderId:t.id,name:t.label,kind:t.kind,version:t.version,configurationHash:f(t),weight:t.weight,hardGate:t.hardGate,rewardEligible:t.rewardEligible,privileged:t.privileged,checkState:p?`${p.checked}/${p.total} ${p.status}`:u?u.status:"Not checked",verifierPath:g&&typeof g=="object"&&"path"in g&&typeof g.path=="string"?g.path:null,fields:Array.isArray(a.metadata.fields)?a.metadata.fields.filter(l=>typeof l=="string"):[]}})}})}h(Ke,"localLearningCatalog");function B(e){let o=e.workspace.draft,c=e.checks.find(a=>a.kind==="graders");return o.graders.map(a=>{let s=c?.scopes?.find(u=>u.graderId===a.id),i=c&&c.workspaceHash!==e.workspace.contentHash?"Checks stale":s?.status??"Not tested",r=o.graderFixtures.filter(u=>!Array.isArray(u.metadata.graderIds)||u.metadata.graderIds.includes(a.id));return{kind:"grader",id:`grader-${f([o.id,a.id]).slice(0,40)}`,revision:o.revision,name:a.label,datasetId:o.id,datasetRevision:o.revision,graderId:a.id,graderType:a.kind,state:i,description:a.kind==="content"&&typeof a.config.operator=="string"?a.config.operator:`${a.kind} grader \xB7 ${a.version}`,checkState:s?`${s.checked}/${s.total} examples checked \xB7 ${i}`:i,rows:r.slice(0,3).map(u=>({id:u.id,label:u.label,detail:JSON.stringify(u.output)}))}})}h(B,"localGraderSummaries");function Xe(e,o,c){let{offset:a,limit:s}=x.object({offset:x.number().int().nonnegative().default(0),limit:x.number().int().min(1).max(100).default(20)}).parse(c),i=e.workspace.draft,r=i.graders.find(g=>g.id===o.graderId),u=i.graderFixtures.filter(g=>!Array.isArray(g.metadata.graderIds)||g.metadata.graderIds.includes(r.id)),t=r.kind==="custom_verifier"?e.workspace.files.find(g=>g.path===r.module):null,p=t?Buffer.from(t.base64,"base64").toString("utf8"):null;return{summary:o,dataset:{id:i.id,revision:i.revision,name:i.name,workspaceHash:e.workspace.contentHash},grader:r,taskCount:i.tasks.length,fixtures:{total:u.length,offset:a,items:u.slice(a,a+s),hasMore:a+s<u.length},files:t?[{path:t.path,contentHash:t.contentHash,sizeBytes:t.sizeBytes,content:p.slice(0,24e3),truncated:p.length>24e3}]:[]}}h(Xe,"localGraderInspection");async function Qe(e,o,c,a){let s=a?e.checks.find(l=>l.kind==="graders"&&l.revision===e.workspace.draft.revision&&l.workspaceHash===e.workspace.contentHash):void 0,i=s?.scopes?.filter(l=>l.graderId!==a&&o.taskset.graders.some(d=>d.id===l.graderId))??[],r=s?.issues.filter(l=>l.graderId&&i.some(d=>d.graderId===l.graderId))??[],u=e.workspace.draft.graderFixtures,t=i.reduce((l,d)=>l+d.checked,0),p=i.reduce((l,d)=>l+d.total,0),g=[...i];for(let l of o.taskset.graders){let d=u.filter(n=>!Array.isArray(n.metadata.graderIds)||n.metadata.graderIds.includes(l.id));if(a&&l.id!==a){i.some(n=>n.graderId===l.id)||(p+=d.length,g.push({graderId:l.id,checked:0,total:d.length,status:"unavailable"}),r.push({code:"grader_not_checked",message:"This grader has not been checked at the saved revision.",graderId:l.id}));continue}let k=t,I=r.length;p+=d.length,(!d.some(n=>n.label==="positive")||!d.some(n=>n.label==="negative"))&&r.push({code:"examples_missing",message:"Add known-good and known-bad examples before claiming qualification.",graderId:l.id});for(let n of d){c?.throwIfAborted();let P=o.taskset.tasks.find(w=>w.id===n.taskId);if(!P){r.push({code:"fixture_task_missing",message:`Example ${n.id} references a missing task.`,graderId:l.id,taskId:n.taskId});continue}try{let w=Ye(o,n),v={output:n.output,runtimeEventRefs:[],artifactRefs:w.map(E=>E.reference.id),artifacts:w,infrastructureError:n.infrastructureError},[S]=await me({task:P,graders:[l],purpose:"fixture_calibration",signal:c,evidence:v,customVerifier:h(async({grader:E,task:D,evidence:H})=>{let C=o.files.find(y=>y.asset.id===E.verifierRef.id);if(!C||f(C.asset)!==f(E.verifierRef))throw new Error("The exact verifier source is missing.");let T=E.runtime==="sandbox_process"?await F({packageValue:o,grader:E,task:D,evidence:{...H,artifacts:w},signal:c,authorize:h(async()=>{c?.throwIfAborted()},"authorize")}):await $({source:new TextDecoder("utf-8",{fatal:!0}).decode(q(C)),exportName:E.exportName,runtime:E.runtime,timeoutMs:E.timeoutMs,signal:c,value:{task:D,attempt:H,input:D.input,expectedOutput:D.expectedOutput,output:H.output,artifacts:w,infrastructureError:n.infrastructureError}});return{score:T.score,passed:T.passed,rewardEligible:E.rewardEligible,failureClass:null,feedback:[T.feedback],visibleEvidenceRefs:[],privilegedEvidenceRefs:T.evidenceRefs}},"customVerifier")});!S||S.score===null&&!n.infrastructureError||S.status==="pending"?r.push({code:"grader_unavailable",message:S?.feedback.join(" ")??"The grader returned no evidence.",graderId:l.id,taskId:P.id}):(t++,(S.passed!==n.expectedPassed||S.rewardEligible!==n.expectedRewardEligible)&&r.push({code:"example_mismatch",message:`Example ${n.id} did not match its expected pass/reward outcome. ${S.feedback.join(" ").slice(0,2e3)}`,graderId:l.id,taskId:P.id}))}catch(w){r.push({code:"grader_unavailable",message:w instanceof Error?w.message:"Example check failed.",graderId:l.id,taskId:P.id})}}let m=r.slice(I);g.push({graderId:l.id,checked:t-k,total:d.length,status:m.some(n=>n.code==="example_mismatch")?"failed":m.length?"unavailable":"passed"})}return o.taskset.graders.length||r.push({code:"graders_missing",message:"No graders are configured."}),{kind:"graders",revision:e.workspace.draft.revision,workspaceHash:e.workspace.contentHash,status:r.some(l=>l.code==="example_mismatch")?"failed":r.length?"unavailable":"passed",checked:t,total:p,scopes:g,issues:r,checkedAt:new Date().toISOString()}}h(Qe,"checkLocalDatasetGraders");var dt=new Set(["unknown","other"]);function Ze(e,o){return o?"approved":!e||dt.has(e.toLowerCase())?"review":"approved"}h(Ze,"approvedLicenseStatus");function pt(e,o){if(e.schemaVersion!=="openpond.huggingFaceDatasetSource.v1")throw new Error("Selected source checks require a captured Hugging Face sample.");let c=V(o);if(e.metadata.capturedSourceHash!==c||!e.sourceFileHashes.includes(c))throw new Error("The captured source bytes do not match their retained hash.");let a=new TextDecoder("utf-8",{fatal:!0}).decode(o),s=Te(a);return{...e,secretScanStatus:s.secretStatus,piiScanStatus:s.piiStatus,licensingStatus:Ze(e.declaredLicense,!1),metadata:{...e.metadata,privacyScanner:"openpond-evidence-v1",findings:s.findings,checkedSourceHash:c}}}h(pt,"checkCapturedHuggingFaceSource");function et(e){let o=0,c=e.draft.sourceRefs.map(a=>{if(a.schemaVersion!=="openpond.huggingFaceDatasetSource.v1"||typeof a.metadata.capturedSourcePath!="string")return a;let s=e.files.find(r=>r.path===a.metadata.capturedSourcePath);if(!s)throw new Error("The captured source file is missing.");let i=Buffer.from(s.base64,"base64");if(V(i)!==s.contentHash||i.byteLength!==s.sizeBytes)throw new Error("The captured source file failed integrity verification.");return o++,pt(a,i)});if(!o)throw new Error("This Dataset has no captured Hugging Face samples to check.");return c}h(et,"checkCapturedDatasetSources");function A(e){let{draft:o}=e.workspace,c=e.checks.filter(a=>a.workspaceHash===e.workspace.contentHash);return{kind:"dataset",id:o.id,revision:o.revision,name:o.name||"Untitled dataset",state:e.packageHash?"Runnable":"Saved draft",evaluationHash:e.workspace.contentHash,taskCount:o.datasetArtifact?.rowCount??o.tasks.length,graderCount:o.graders.length,checkState:c.length?c.map(a=>`${a.kind}: ${a.status} (${a.checked}/${a.total})`).join(" \xB7 "):e.checks.length?"Checks stale":"Not checked",syncState:e.sync?e.sync.paused?"Paused":e.sync.acknowledgedHash===e.workspace.contentHash&&e.sync.status==="synced"?"Synced":e.sync.status==="synced"?"Sync pending":e.sync.status:"Local",rows:o.tasks.slice(0,3).map(a=>({id:a.id,label:typeof a.input.prompt=="string"?a.input.prompt:JSON.stringify(a.input),detail:o.graders.map(s=>s.label).join(", ")}))}}h(A,"localDatasetSummary");function tt(e){async function o(r,u){let t=await e.store.readLocalDataset(r,u);if(!t||t.ownerId!==await e.store.localResourceOwnerId())throw new Error("Local Dataset was not found.");return t}h(o,"read");async function c(r,u){let t=await e.store.readLocalDatasetListing(r,u);if(!t||t.ownerId!==await e.store.localResourceOwnerId())throw new Error("Local Dataset was not found.");return t}h(c,"readListing");function a(r,u,t=r.workspace.contentHash){return _e({workspace:u?Me(r.workspace,u):r.workspace,sourceWorkspaceHash:t,maximumBytes:Number.POSITIVE_INFINITY,preparation:null,adapterId:"openpond-desktop-taskset-authoring-v1",now:r.workspace.draft.updatedAt})}h(a,"compile");async function s(r,u,t){if(t){let d=await e.store.readLocalDatasetProjection(r,t,{revision:u});if(!d||d.record.ownerId!==await e.store.localResourceOwnerId())throw new Error("Local Dataset was not found.");let k=a(d.record,void 0,d.sourceWorkspaceHash);return await O(e.home,k,Number.POSITIVE_INFINITY),{record:d.record,package:k}}let p=await o(r,u),g=a(p,t);await O(e.home,g,Number.POSITIVE_INFINITY);let l=await o(r);if(!t&&l.workspace.contentHash===p.workspace.contentHash&&l.packageHash!==g.contentHash)try{p=await e.store.updateLocalDatasetMetadata(r,f(l),d=>({...d,packageHash:g.contentHash}))}catch(d){if(!(d instanceof Error)||!d.message.startsWith("Dataset state changed."))throw d}return{record:p,package:g}}h(s,"packageDataset");async function i(r,u){let t=qe.parse(r),p=await e.store.localResourceOwnerId();if(t.action==="schema"){let m=x.enum(["task","grader","fixture","draft","file"]).parse(t.payload.kind??"task"),n=m==="task"?N.shape.tasks.unwrap().element:m==="grader"?N.shape.graders.unwrap().element:m==="fixture"?N.shape.graderFixtures.unwrap().element:m==="file"?J:N;return{kind:m,schema:x.toJSONSchema(n),...m==="grader"?{example:{id:"exact-answer",version:"1",label:"Exact answer",kind:"content",weight:1,hardGate:!0,rewardEligible:!1,privileged:!0,config:{operator:"final_answer_equals_expected"},metadata:{}}}:{}}}if(t.action==="list"){let m=(await e.store.listLocalDatasetListings()).filter(n=>n.ownerId===p);return t.payload.view==="catalog"?Ke(m,A):m.map(n=>({...A(n),projectId:n.projectId}))}if(t.action==="inspect_source"||t.action==="import_source"){if(!e.sourceAction)throw new Error("This Dataset source adapter is unavailable.");return e.sourceAction(t.action,t.payload,p)}if(t.action==="related_chats"){let m=t.payload.kind;if(m!==void 0&&!["dataset","grader","experiment"].includes(String(m)))throw new Error("Select a supported resource kind.");let n=await e.store.chatResourceLinks({kind:typeof m=="string"?m:"dataset",id:t.id}),P=[...new Set(n.map(w=>w.sessionId))];return(await Promise.all(P.map(w=>e.store.getSession(w)))).filter(w=>w&&!w.systemKind&&w.workspaceKind!=="sandbox").map(w=>({id:w.id,title:w.title}))}let g=f(t);if(["create","save","file","import","save_grader","check_sources"].includes(t.action)){if(!t.operationId)throw new Error("A stable operationId is required. Reuse it after an uncertain response.");let m=await e.store.recoverLocalDatasetOperation(t.operationId,g);if(m)return{record:m,summary:A(m),summaries:B(m)};let n=new Date().toISOString(),P;if(t.action==="create"||t.action==="import"){let v=`dataset-${f([p,t.operationId]).slice(0,40)}`,S;if(t.action==="import"){if(typeof t.payload.path!="string")throw new Error("Import requires a package folder path.");S=(await X({directory:t.payload.path,teamId:p,datasetId:v,expectedRevision:0,maximumBytes:Number.POSITIVE_INFINITY})).workspace}else{let E=Se({profileId:p,id:v,name:typeof t.payload.name=="string"?t.payload.name:"",now:n});S=U({schemaVersion:"openpond.tasksetDraftWorkspace.v1",draft:{...E,...t.payload.draft,id:v,profileId:p,modelScope:null,revision:1,status:"draft",publishedTasksetRef:null,createdAt:n,updatedAt:n},files:Array.isArray(t.payload.files)?t.payload.files:[]},Number.POSITIVE_INFINITY)}P=Ve.parse({schemaVersion:"openpond.localDataset.v1",ownerId:p,projectId:typeof t.payload.projectId=="string"?t.payload.projectId:null,workspace:S,checks:[],packageHash:null,sync:null})}else{if(!t.id||t.expectedRevision===void 0)throw new Error("Editing requires a Dataset ID and expectedRevision.");let v=await o(t.id),S=t.payload.draft;if(t.action==="check_sources"&&(S={sourceRefs:et(v.workspace)}),t.action==="save_grader"){let D=N.shape.graders.unwrap().element.parse(t.payload.grader),H=v.workspace.draft.graders.filter(T=>T.id!==D.id),C=v.workspace.draft.graders.findIndex(T=>T.id===D.id);H.splice(C<0?H.length:C,0,D),S={graders:H,...Array.isArray(t.payload.fixtures)?{graderFixtures:t.payload.fixtures}:{}}}let E;if(t.action==="save"&&typeof t.payload.path=="string"){if(v.workspace.draft.modelScope)throw new Error("Folder replacement requires an ordinary local Dataset.");let D=await X({directory:t.payload.path,teamId:p,datasetId:t.id,expectedRevision:t.expectedRevision,maximumBytes:Number.POSITIVE_INFINITY}),H=K({workspace:v.workspace,expectedDraftRevision:t.expectedRevision,draft:{...D.workspace.draft,id:v.workspace.draft.id,profileId:v.workspace.draft.profileId,modelScope:v.workspace.draft.modelScope,revision:v.workspace.draft.revision,status:v.workspace.draft.status,createdAt:v.workspace.draft.createdAt,publishedTasksetRef:v.workspace.draft.publishedTasksetRef},now:n,maximumBytes:Number.POSITIVE_INFINITY});E=U({schemaVersion:H.schemaVersion,draft:H.draft,files:D.workspace.files},Number.POSITIVE_INFINITY)}else E=t.action==="file"?be({workspace:v.workspace,mutation:J.parse({...t.payload,draftId:t.id,expectedDraftRevision:t.expectedRevision}),now:n,maximumBytes:Number.POSITIVE_INFINITY}):K({workspace:v.workspace,expectedDraftRevision:t.expectedRevision,draft:{...v.workspace.draft,...S},now:n,maximumBytes:Number.POSITIVE_INFINITY});P={...v,workspace:E,packageHash:null}}u?.throwIfAborted();let w=await e.store.saveLocalDataset({record:P,expectedRevision:t.action==="create"||t.action==="import"?0:t.expectedRevision,operationId:t.operationId,requestHash:g});return e.onSaved?.(w),{record:w,summary:A(w),summaries:B(w)}}if(!t.id)throw new Error("A Dataset ID is required.");if(t.action==="read"&&t.payload.view==="metadata"){let m=t.payload.revision===void 0?void 0:x.number().int().positive().parse(t.payload.revision),n=await c(t.id,m);return{record:n,summary:A(n)}}let l=await o(t.id,["read","read_grader","list_graders"].includes(t.action)&&t.expectedRevision?t.expectedRevision:void 0);if(t.action==="list_graders")return{summaries:B(l)};if(t.action==="read_grader"){let m=B(l).find(n=>n.graderId===t.payload.graderId||n.id===t.payload.graderId);if(!m)throw new Error("The saved grader was not found.");return t.payload.view==="inspection"?Xe(l,m,t.payload):{record:l,summary:m,grader:l.workspace.draft.graders.find(n=>n.id===m.graderId)}}if(t.action==="read")return{record:l,summary:A(l)};if(["upload","sync","pause_sync","disconnect_sync","publish"].includes(t.action)){if(t.expectedRevision!==l.workspace.draft.revision)throw new Error("Cloud actions require the exact current saved expectedRevision.");if(!e.syncAction)throw new Error("Cloud Dataset synchronization is unavailable.");let m=await e.syncAction(t.action,l,t.payload);return{record:m,summary:A(m)}}if(t.expectedRevision!==l.workspace.draft.revision)throw new Error("Checks and packaging require the exact saved expectedRevision.");if(t.action==="test_grader"&&!l.workspace.draft.graders.some(m=>m.id===t.payload.graderId))throw new Error("The saved grader was not found.");let d=null,k={kind:"structure",revision:l.workspace.draft.revision,workspaceHash:l.workspace.contentHash,status:"passed",checked:l.workspace.draft.tasks.length,total:l.workspace.draft.datasetArtifact?.rowCount??l.workspace.draft.tasks.length,checkedAt:new Date().toISOString(),issues:[]};try{d=a(l),await O(e.home,d,Number.POSITIVE_INFINITY)}catch(m){k={...k,status:"failed",issues:[{code:"package_invalid",message:m instanceof Error?m.message:"Package validation failed."}]}}if(["check_graders","test_grader"].includes(t.action)&&d){let m=[...new Set(l.workspace.draft.graderFixtures.map(n=>n.taskId))];k=await Qe(l,m.length?a(l,m):d,u,t.action==="test_grader"?t.payload.graderId:void 0)}let I=await e.store.updateLocalDatasetMetadata(t.id,f(l),m=>({...m,packageHash:d?.contentHash??null,checks:[...m.checks.filter(n=>n.kind!==k.kind),k]}));return{record:I,summary:t.action==="test_grader"?B(I).find(m=>m.graderId===t.payload.graderId):A(I),summaries:B(I),check:k,...t.action==="package"&&d?{package:d}:{}}}return h(i,"request"),{request:i,read:o,readListing:c,packageDataset:s,compile:a}}h(tt,"createLocalDatasetService");import{mkdtemp as ft,mkdir as ut,rm as mt}from"node:fs/promises";import ht from"node:os";import at from"node:path";var rt=new Set(["work_exec","work_save_output"]);function ot(e){let o=e.taskset,c=o.environment.kind==="text"&&o.tools.length===0,a=o.environment.kind==="work"&&o.environment.entrypoint==="openpond-work-v1"&&o.tools.every(s=>rt.has(s.name));return(c||a)&&o.policy.connectedAppScopes.length===0&&o.capabilities.every(s=>!s.required||s.id==="private-verifier"||s.id==="tools"&&s.scopes.every(i=>rt.has(i)&&o.tools.some(r=>r.name===i)))}h(ot,"supportsLocalProfileEnvironment");async function ba(){let e=await ft(at.join(ht.tmpdir(),"openpond-work-preflight-"));try{await ut(at.join(e,"outputs"));let o="local-work-preflight",a=await $e({authorize:h(async()=>({candidateId:o,candidateRevision:1,ownerId:o,sessionId:o,turnId:o,sourceRoot:e,layout:"profile_case",writablePaths:["outputs"]}),"authorize")})({candidateId:o,expectedRevision:1,sessionId:o,turnId:o,timeoutMs:5e3,command:`/runtime/node -e 'require("node:fs").writeFileSync("outputs/probe","ready");process.stdout.write("ready")'`});if(a.code!==0||a.timedOut||a.stdout!=="ready")throw new Error("The confined local Work executor is unavailable.")}finally{await mt(e,{recursive:!0,force:!0})}}h(ba,"assertLocalProfileWorkRuntime");function G(e){let o=Pe(e),c=e.modelResources?.rewards??(e.learningResources?ye(e.taskset).rewards:[]);if(o&&f(ge(o,c))!==f(e.taskset.graders))throw new R("local_grader_closure_conflict","The retained Reward closure differs from the released Dataset graders.",422);return e.taskset.graders.map(a=>{let s=o?.sources.find(r=>r.graderId===a.id),i=s&&c.find(r=>r.id===s.reward.id&&r.revision===s.reward.revision&&r.contentHash===s.reward.contentHash);return{id:a.id,version:a.version,contentHash:f(a),name:i?.name??("config"in a&&a.config.operator==="final_answer_equals_expected"?"Answer accuracy":`${a.kind.replaceAll("_"," ")} grader`),feedbackKey:i?he(i):`grader_${f(a.id).slice(0,24)}`,release:i?{id:i.id,revision:i.revision,contentHash:i.contentHash}:null}})}h(G,"localPackageGraders");function za(e,o){let c=G(e),a=o?o.map(s=>{let i=c.find(r=>r.id===s.id&&r.version===s.version&&r.contentHash===s.contentHash);if(!i)throw new R("local_grader_pin_unavailable","Select an exact grader from the retained Dataset package.",422);return{...i,mappings:s.mappings}}):c;try{return Le(a)}catch(s){throw new R("experiment_grader_feedback_conflict",s instanceof Error?s.message:"Grader selection conflicts.",422)}}h(za,"selectLocalPackageGraders");function Wa(e,o,c,a=!1,s=!1,i=!1){let r=L(o),u=e.configuration.request;if(r.contentHash!==e.packageHash||f(u.taskset)!==f({id:r.taskset.id,revision:r.taskset.revision,contentHash:r.taskset.contentHash}))throw new R("local_dataset_pin_conflict","Local execution requires the exact retained Dataset package.",422);if(u.policy.kind!=="hosted_chat"&&!(u.policy.kind==="hosted_harness"&&i))throw new R("local_target_not_qualified","This local execution path requires a qualified exact target owner.",422);let t=i&&u.policy.kind==="hosted_harness"&&ot(r);if(["claude-code","codex"].includes(e.model.providerId)&&!t&&(gt(r)||r.taskset.environment.kind!=="text"||r.taskset.tools.length))throw new R("native_text_environment_not_admitted","This native model adapter requires a text Dataset with no environment tools. Additional tool owners require explicit admission.",422);let p=u.policy.kind==="hosted_chat"?u.policy.harness:void 0;if(p&&!a)throw new R("local_harness_not_qualified","A released Harness must execute through its native turn owner.",422);let g=Y(r);if(r.taskset.policy.connectedAppScopes.length)throw new R("local_connected_scope_not_qualified","This Dataset requires connected scopes that have not been admitted for local execution.",422);for(let l of r.taskset.capabilities.filter(d=>d.required)){if(l.id==="tools"&&i&&l.scopes.every(k=>["work_exec","work_save_output"].includes(k)&&r.taskset.tools.some(I=>I.name===k)))continue;if(l.id!=="private-verifier")throw new R("local_capability_not_qualified","This Dataset requires capabilities not supplied by the local execution owner.",422);if((l.scopes.length?l.scopes:r.taskset.policy.hiddenGraderRefs).some(k=>!r.taskset.policy.hiddenGraderRefs.includes(k)||!r.taskset.graders.some(I=>I.id===k&&I.privileged&&I.kind!=="human")))throw new R("local_capability_not_qualified","The required private grader scope has no supported exact local grader owner.",422)}if(!g&&r.taskset.tools.length&&!i)throw new R("local_tool_target_not_qualified","This Dataset's tools require a released native target executor.",422);if(g?.execution.javascript.executionServices?.length&&!s)throw new R("local_prepared_environment_not_qualified","This Dataset requires prepared compute services that are not yet bound to the local execution owner.",422);if(r.taskset.environment.kind!=="text"&&!g&&!t)throw new R("local_environment_unavailable","The released Dataset has no supported local environment executor.",422);if(p&&(g||r.taskset.environment.kind!=="text"))throw new R("local_harness_environment_not_qualified","This native Harness requires a compatible text Dataset.",422);return u.population.map(l=>{let d=r.taskset.tasks.find(P=>P.id===l.taskId);if(!d)throw new R("local_population_unavailable","The selected task is absent from this immutable Dataset release.",422);let k=le(d);if((k.artifactRefs.length||d.requiredOutputs?.length)&&!(i&&u.policy.kind==="hosted_harness"))throw new R("local_work_target_not_qualified","This Dataset requires document input or Work output capabilities not supplied by this local model target.",422);let I=g?.assets.find(P=>P.id===g.execution.javascript.module.id),m=g?.assets.find(P=>P.id===d.privilegedContextRef);if(g&&(!I||!m))throw new R("local_environment_assets_missing","Private environment resources are missing from the retained package.",422);let n={kind:"model",id:`local-case-${f([c,l.receiptId]).slice(0,48)}`,taskId:d.id,model:e.model,...p?{harness:p}:{},instructions:Ee(r),input:k.input,policyVisibleContext:k.policyVisibleContext,timeoutMs:r.taskset.environment.defaultTimeoutMs,environment:g?{kind:"javascript",definition:g.execution.javascript,asset:I,initialState:JSON.parse(ve(m,m.asset)),seed:Number(l.seed)}:{kind:"text"}};return{receiptId:l.receiptId,taskId:l.taskId,seed:l.seed,request:Fe.parse({...n,admissionHash:f(n)})}})}h(Wa,"localExperimentAdmissions");function gt(e){return!!Y(e)}h(gt,"executionForClaude");import{readFile as kt}from"node:fs/promises";import wt from"node:path";async function st(e,o,c,a){let s=await e.getHarnessReleaseRecord(o.contentHash),i=s&&await e.getHarnessWorkspace(s.workspaceId);if(!s||!i||s.harnessRelease.id!==o.id||i.location!=="local"||i.metadata.sourceLayout!=="openpond.harnessSourceManifest.v1")throw new R("local_profile_source_unavailable","The exact Profile Harness is unavailable.",403);let r=i.metadata.profileExperimentOrigin!==void 0||i.metadata.experimentCandidateOrigin!==void 0;if(r){if(!a||!c)throw new R("local_profile_origin_access_denied","This source requires its authenticated origin.",403);await a(i,o,c)}else{if(i.ownerScope.kind!=="personal"||i.ownerScope.id!=="desktop-personal"||typeof s.harnessRelease.metadata.profileRepositoryId=="string"||typeof s.agentSnapshot.metadata.profileRepositoryId=="string")throw new R("local_profile_origin_access_denied","The Profile is not device-owned.",403);let d=s.harnessRelease.metadata.profile;if(c&&(c.source!=="local"||d?.id!==c.profileId||d.repositoryId&&d.repositoryId!==c.repositoryId))throw new R("local_profile_origin_access_denied","The retained Harness differs from this exact Profile reference.",403);if(i.metadata.selectionEligible===!1&&(!c||!d?.repositoryId||d.repositoryId!==c.repositoryId||i.id!==`${Oe}${f({ref:c,sourceRevision:d.sourceRevision}).slice(0,24)}`))throw new R("local_profile_origin_access_denied","This explicit Profile release requires its canonical accepted reference.",403)}let u=await Ne({workspace:i,release:s}),t=new Map;for(let d of s.harnessRelease.files)t.set(d.path,await kt(wt.join(s.bundlePath,"source",...d.path.split("/"))));let p=ie({agentSnapshot:s.agentSnapshot,harnessRelease:s.harnessRelease,files:t}),g=ke(s);ne({sourcePackage:p,expectedRelease:o,baseSystemPrompt:"",runtimeId:"openpond.native-profile-experiment.v1",maxContextCharacters:262144,tools:g.map(d=>({name:d.name,inputSchema:d.inputSchema,definition:{type:"function",function:{name:d.name,description:d.description,parameters:d.inputSchema}}}))});let l=await e.getHarnessWorkspace(i.id);if(!l||f(l.ownerScope)!==f(i.ownerScope)||f(l.metadata)!==f(i.metadata))throw new R("local_profile_origin_access_denied","Profile source ownership changed during admission.",403);return r&&await a(i,o,c),u}h(st,"resolveLocalProfileExperimentSource");var ee=x.object({id:b,revision:x.number().int().positive(),workspaceHash:_,taskIds:x.array(b).min(1).max(500),seed:x.string().trim().min(1).max(500).default("1")}).strict();function mr(e){let o=tt({store:e.store,home:e.storeDir});async function c(r){if(r.profileRef.source!=="local")throw new Error("Installation-local Datasets require an accepted local Profile.");if(!(await se()).profiles.some(l=>f(l.ref)===f(r.profileRef)))throw new Error("The local Dataset's Profile is no longer in this installation's accepted library.");let t=await st(e.store,r.harnessRelease,r.profileRef),p=await Je({store:e.store,ref:r.profileRef,sourceRevision:r.sourceRevision,harnessRelease:r.harnessRelease}),g=await Be({workspaceId:typeof t.release.agentSnapshot.metadata.workspaceId=="string"?t.release.agentSnapshot.metadata.workspaceId:t.release.workspaceId,sourceDir:vt.join(t.release.bundlePath,"source")});if(g.harnessRelease.contentHash!==r.harnessRelease.contentHash)throw new Error("The local Dataset's frozen Profile source changed.");return{catalog:p,protectedClosureHash:Ge(g).protectedClosureHash}}h(c,"profileAuthority");async function a(r,u,t){let p=await e.store.readLocalDatasetProjection(r,t,{workspaceHash:u});if(!p||p.record.ownerId!==await e.store.localResourceOwnerId())throw new Error("The exact installation-local Dataset workspace is unavailable to this owner.");return{record:p.record,packageValue:o.compile(p.record,void 0,p.sourceWorkspaceHash)}}return h(a,"savedPackage"),{prepareBinding:h(async(r,u,t)=>{let p=ee.parse(r);if((await o.readListing(p.id,p.revision)).workspace.contentHash!==p.workspaceHash)throw new Error("The selected local Dataset revision or workspace hash changed.");if(new Set(p.taskIds).size!==p.taskIds.length)throw new Error("Select each local Dataset task once.");let{package:l}=await o.packageDataset(p.id,p.revision,p.taskIds),d=p.taskIds.map(n=>l.taskset.tasks.find(P=>P.id===n));if(d.some(n=>!n)||d.some(n=>n.split!==d[0].split))throw new Error("Select existing local Dataset tasks from one exact split.");let{catalog:k,protectedClosureHash:I}=await c(u);if(!k.definitions.some(n=>f(n)===f(t)))throw new Error("The local Dataset target differs from the accepted Profile definition.");let m=G(l);return pe({schemaVersion:"openpond.profileExternalDatasetBinding.v1",dataset:{id:l.taskset.id,revision:l.taskset.revision,contentHash:l.taskset.contentHash},packageHash:l.contentHash,profileId:u.profileRef.profileId,target:t.target,declaredProfileCatalogHash:k.catalogHash,protectedProfileClosureHash:I,split:d[0].split,population:p.taskIds.map(n=>({taskId:n,seed:p.seed,fixtureId:null})),evaluators:m.map(n=>({release:n.release??{id:n.id,revision:n.version,contentHash:n.contentHash},feedbackKey:n.feedbackKey,configurationHash:f({graderHash:n.contentHash,mappings:[]}),output:"score",categories:[]})),fieldMappings:[],fieldMappingsHash:f([]),environmentHash:f(l.taskset.environment),privateDatasetClosureHash:f(l.files.filter(n=>n.asset.visibility!=="policy").map(n=>n.asset)),criterion:t.criterion})},"prepareBinding"),resolveExternalDataset:h(async(r,u)=>{let t;try{t=await W(e.storeDir,r.packageHash)}catch(n){if(n.code!=="ENOENT")throw n}let p=t?x.object({sourceTasksetId:b,sourcePackageHash:_}).passthrough().safeParse(t.taskset.metadata):null,g=p?.success?await e.store.readLocalDatasetListing(p.data.sourceTasksetId):null;if(!t||!p?.success||!g){if(!e.remote)throw new Error("This external Dataset has no installation-local owner.");return e.remote(r,u)}let l=p.data,d=t.contentHash,k=g.ownerId;async function I(){let n=[...new Set(r.population.map(S=>S.taskId))],{record:P,packageValue:w}=await a(l.sourceTasksetId,l.sourcePackageHash,n);if(P.ownerId!==k||w.contentHash!==d)throw new Error("The cached Dataset differs from its exact saved local source.");let v=await c(u);if(r.profileId!==u.profileRef.profileId||r.declaredProfileCatalogHash!==v.catalog.catalogHash||r.protectedProfileClosureHash!==v.protectedClosureHash)throw new Error("The local Dataset recipe changed its accepted Profile or protected evaluator closure.");return Ce({binding:r,packageValue:w,graders:G(w)})}h(I,"read");let m=await I();return{binding:r,packageValue:m,authorize:h(async()=>{if(f(await I())!==f(m))throw new Error("The local Dataset authority changed during execution.")},"authorize")}},"resolveExternalDataset")}}h(mr,"createInstallationLocalProfileDatasets");var yt=x.object({id:b,createdAt:ae,definitionId:b,externalDatasetBinding:de.optional(),localDataset:ee.optional(),profileRef:Ae.optional(),profileSource:x.object({sourceRevision:x.string().min(1).max(500),harnessRelease:x.object({id:b,contentHash:_}).strict()}).strict().optional(),modelRef:oe,hostModelConfigurationHash:_.optional(),hostArtifactHash:_.optional(),maximumSpendUsd:x.number().positive().max(1e4).optional(),expectedManifestHash:_.optional(),hostExperiment:x.object({definition:x.object({id:b,revision:x.number().int().positive(),contentHash:_}).strict().nullable(),configurationHash:_,project:x.object({id:b,revision:x.number().int().positive(),contentHash:_,targetId:b.nullable()}).strict().optional()}).strict().optional()}).strict();function Er(e){return async(o,c)=>{let a=yt.parse(o);if(c?.requireExpectedManifestHash&&!a.expectedManifestHash)throw new Error("Profile evaluation execution requires the reviewed manifest hash.");if(a.profileSource&&!a.profileRef)throw new Error("An exact Profile source requires its accepted Profile reference.");let s=c?.selectedWorkflows??await e.selectedWorkflows(a.profileRef,a.profileSource);if(a.profileRef&&f(a.profileRef)!==f(s.profileRef))throw new Error("Profile preparation did not resolve the explicitly selected Profile.");if(a.profileSource&&(s.sourceRevision!==a.profileSource.sourceRevision||f(s.harnessRelease)!==f(a.profileSource.harnessRelease)))throw new Error("Profile preparation changed its explicitly pinned source.");if(a.localDataset&&a.externalDatasetBinding)throw new Error("Select a local Dataset or an external recipe, not both.");let i=await e.loadCatalog({ref:s.profileRef,sourceRevision:s.sourceRevision,harnessRelease:s.harnessRelease}),r=a.localDataset?i.definitions.find(y=>y.id===a.definitionId):null;if(a.localDataset&&!r)throw new Error("Choose an existing accepted Profile definition as the local Dataset target.");let t=(a.localDataset&&r?await(e.prepareLocalDatasetBinding?e.prepareLocalDatasetBinding(a.localDataset,s,r):Promise.reject(new Error("This host has not qualified installation-local Profile Datasets."))):null)??(a.externalDatasetBinding?M(a.externalDatasetBinding):null),p=t?await(e.resolveExternalDataset?e.resolveExternalDataset(t,s):Promise.reject(new Error("This host has not qualified external Dataset Profile execution."))):null;if(p&&(await p.authorize(),f(M(p.binding))!==f(t)))throw new Error("External Dataset admission differs from the actual authorized recipe.");if(t&&t.declaredProfileCatalogHash!==i.catalogHash)throw new Error("The original Profile verifier catalog changed.");let g=t?Z(t):null;if(g&&!a.localDataset&&a.definitionId!==g.id)throw new Error("Use the external recipe's own definition identity.");let l={schemaVersion:"openpond.profileEvaluations.v1",definitions:g?[g]:i.definitions,suites:g?[]:i.suites},d=g??i.definitions.find(y=>y.id===a.definitionId);if(!d)throw new Error(`Evaluation ${a.definitionId} is absent from the selected Profile release.`);let k=d.target,I=k.kind==="workflow"?s.workflows.find(y=>y.binding.workflowId===k.workflowId)?.binding:ce.parse({schemaVersion:"openpond.profileComponentBinding.v1",profileId:s.profileRef.profileId,sourceRevision:s.sourceRevision,harnessRelease:s.harnessRelease,target:k});if(!I)throw new Error(`Evaluation workflow ${k.kind==="workflow"?k.workflowId:""} is absent from the selected Profile release.`);let m=L(p?.packageValue??await e.loadTasksetPackage(d,s.profileRef.profileId,s.harnessRelease)),n=m.taskset;if(n.id!==d.tasksetRelease.id||n.contentHash!==d.tasksetRelease.contentHash)throw new Error("Evaluation Taskset package differs from its released definition.");let P=n.environment.kind==="text"&&n.tools.length===0,w=n.environment.kind==="work"&&n.environment.entrypoint==="openpond-work-v1"&&n.tools.every(y=>["work_exec","work_save_output"].includes(y.name));if(!P&&!w)throw new Error("Profile evaluation supports text cases or Work cases with the built-in execution and output tools.");if(a.maximumSpendUsd!==void 0&&w){if(typeof e.boundedWorkComputeAvailable=="function")await e.boundedWorkComputeAvailable();else if(!e.boundedWorkComputeAvailable)throw new Error("This host has not admitted budgeted Work compute.")}if(n.tasks.some(y=>y.artifactRefs.length>Q.maxAttachments||y.artifactRefs.some(j=>j.visibility!=="policy"||j.mediaType!=="application/pdf"||j.sizeBytes>Q.maxAttachmentBytes)))throw new Error("Profile evaluation accepts only bounded policy-visible PDF task attachments.");if(!t&&!e.privateGradingPreflight&&(n.graders.some(y=>y.kind==="model_judge"||y.kind==="custom_verifier")||n.metrics?.aggregation==="custom"))throw new Error("Profile evaluation cannot run this Taskset's model judge, custom verifier, or custom metric in the current app-server runtime.");await e.privateGradingPreflight?.(m);let v={adapterId:k.kind==="workflow"?"openpond.profile-workflow":"openpond.profile-component",placement:e.placement,runtimeVersion:"app-server-v1",capabilityReceipt:f({adapterId:k.kind==="workflow"?"openpond.profile-workflow":"openpond.profile-component",packageHash:m.contentHash,connectedAppScopes:n.policy.connectedAppScopes})},E={...ue({catalog:l,definitionId:d.id,profileId:s.profileRef.profileId,sourceRevision:s.sourceRevision,harnessRelease:s.harnessRelease,environmentHash:f({packageHash:m.contentHash,runtimeTarget:v})}),...t?{externalDatasetBinding:t}:{},...e.sourceCandidate?{sourceCandidate:e.sourceCandidate}:{}};if(t&&(t.packageHash!==m.contentHash||t.environmentHash!==f(n.environment)||t.privateDatasetClosureHash!==f(m.files.filter(y=>y.asset.visibility!=="policy").map(y=>y.asset))))throw new Error("External Dataset package/environment/private closure changed.");let D=re.parse({provider:a.modelRef.providerId,model:a.modelRef.modelId,revision:null,artifactHash:a.hostArtifactHash??null,tokenizerRevision:null,chatTemplateHash:null}),H=await e.modelConfigurationHash(a.modelRef,a),C=c?.modelSampling?f({ownerModelConfigurationHash:H,sampling:Ie.parse(c.modelSampling)}):H,T=xe({schemaVersion:"openpond.tasksetRunManifest.v1",id:a.id,tasksetRelease:d.tasksetRelease,packageHash:m.contentHash,execution:{kind:"harness",harnessRelease:s.harnessRelease},profileEvaluation:E,policy:{kind:"model",model:D,configurationHash:C},gradingRole:"evaluation",metricPolicy:Re(n),population:t?t.population.map(y=>({...y,receiptId:`evaluation-${f([a.id,y.taskId,y.seed,y.fixtureId]).slice(0,32)}`})):d.taskIds.flatMap(y=>d.seeds.map(j=>({receiptId:`evaluation-${f([a.id,y,j]).slice(0,32)}`,taskId:y,seed:j,fixtureId:null}))),runtimeTarget:v,limits:{maxTurns:128,timeoutMs:n.environment.defaultTimeoutMs,maxOutputBytes:25e7,maximumSpendUsd:a.maximumSpendUsd??null},createdAt:a.createdAt,metadata:{sourceTasksetId:n.metadata.sourceTasksetId??n.id,...s.profileRef.source==="openpond_git"?{profileRepositoryId:s.profileRef.repositoryId}:{},...a.hostExperiment?{experimentDefinition:a.hostExperiment.definition,experimentConfigurationHash:a.hostExperiment.configurationHash,...a.hostExperiment.project?{project:a.hostExperiment.project}:{}}:{}}});if(z(T,n,l),p&&await p.authorize(),a.expectedManifestHash&&T.contentHash!==a.expectedManifestHash)throw new Error("Profile evaluation setup changed since preview; prepare the run again.");return{manifest:T,taskset:n,profileRef:s.profileRef,binding:I,modelRef:a.modelRef,modelConfigurationHash:C}}}h(Er,"createProfileEvaluationRunPreparationService");async function xt(e,o){let c=L(e);for(let s of c.taskset.graders){if(s.kind==="model_judge"&&(!o||s.calibrationStatus!=="passed"))throw new Error("This Profile requires its current calibrated judge and bounded private provider owner.");let i="verifierRef"in s?s.verifierRef:"rubricRef"in s?s.rubricRef:null;i&&te(c,i)}let a=c.taskset.metrics?.customAggregator;if(a){let s=c.files.find(i=>i.asset.path===a.module);if(!s||s.asset.visibility==="policy"||V(q(s))!==a.contentHash)throw new Error("The authored aggregate metric is not its exact private release.");new TextDecoder("utf8",{fatal:!0}).decode(q(s))}}h(xt,"preflightProfilePrivateGrading");function te(e,o){let c=e.files.find(a=>a.asset.id===o.id);if(!c||c.asset.visibility==="policy"||f(c.asset)!==f(o))throw new Error("The exact private grader asset is unavailable.");return new TextDecoder("utf8",{fatal:!0}).decode(q(c))}h(te,"readPrivate");async function Ar(e){let o=L(e.packageValue);if(o.contentHash!==e.manifest.packageHash||o.taskset.contentHash!==e.manifest.tasksetRelease.contentHash)throw new Error("The private grading package changed its frozen Run identity.");await e.authorize(),await xt(o,!!e.executeBudgetedJudge),await e.authorize();let c=h(async({grader:i,task:r,evidence:u})=>{let t=e.signal;await e.authorize(),t?.throwIfAborted();let p={manifest:e.manifest,packageValue:o,grader:i,task:r,evidence:u,signal:t,authorize:e.authorize},g=e.executeSandboxVerifier?await e.executeSandboxVerifier(p):i.runtime==="sandbox_process"?await F(p):await $({source:te(o,i.verifierRef),exportName:i.exportName,runtime:i.runtime,timeoutMs:i.timeoutMs,signal:t,value:{task:r,attempt:u,input:r.input,output:u.output,artifacts:"artifacts"in u?u.artifacts:[],expectedOutput:r.expectedOutput,infrastructureError:u.infrastructureError??null}});return await e.authorize(),t?.throwIfAborted(),{score:g.score,passed:g.passed,rewardEligible:i.rewardEligible,failureClass:null,feedback:[g.feedback],visibleEvidenceRefs:[],privilegedEvidenceRefs:g.evidenceRefs}},"customVerifier"),a=o.taskset.metrics?.customAggregator,s=a?new TextDecoder("utf8",{fatal:!0}).decode(q(o.files.find(i=>i.asset.path===a.module))):void 0;return{authorize:e.authorize,customVerifier:c,...e.executeBudgetedJudge?{modelJudge:we({readRubric:h(async i=>{await e.authorize();let r=te(o,i);return await e.authorize(),r},"readRubric"),executeBudgeted:h(async(i,r)=>{await e.authorize(),r?.throwIfAborted();let u=await e.executeBudgetedJudge(i,r);return await e.authorize(),r?.throwIfAborted(),u},"executeBudgeted")})}:{},...s!==void 0?{metricSource:s,metricExecutor:h(async i=>{await e.authorize(),i.signal?.throwIfAborted();let r=await Ue(i);return await e.authorize(),i.signal?.throwIfAborted(),r},"metricExecutor")}:{}}}h(Ar,"createProfilePrivateGradingOwner");export{_t as a,lt as b,Bt as c,B as d,Ze as e,pt as f,A as g,tt as h,ot as i,ba as j,G as k,za as l,Wa as m,st as n,mr as o,Er as p,xt as q,Ar as r};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{h as i}from"./chunk-XHU4BZQY.js";import{A as e}from"./chunk-X2J2P5ZT.js";var t=i.extend({mode:e.enum(["nightly","approved_count"]),minimumTasks:e.number().int().min(1).max(1e4),maximumSpendUsd:e.number().positive().max(1e5),maximumDailySpendUsd:e.number().positive().max(1e6)}).strict().superRefine((m,a)=>{m.maximumDailySpendUsd<m.maximumSpendUsd&&a.addIssue({code:"custom",path:["maximumDailySpendUsd"],message:"The daily budget must cover one update."})});export{t as a};
2
+ import{h as i}from"./chunk-4PUOWSDE.js";import{A as e}from"./chunk-X2J2P5ZT.js";var t=i.extend({mode:e.enum(["nightly","approved_count"]),minimumTasks:e.number().int().min(1).max(1e4),maximumSpendUsd:e.number().positive().max(1e5),maximumDailySpendUsd:e.number().positive().max(1e6)}).strict().superRefine((m,a)=>{m.maximumDailySpendUsd<m.maximumSpendUsd&&a.addIssue({code:"custom",path:["maximumDailySpendUsd"],message:"The daily budget must cover one update."})});export{t as a};
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{b}from"./chunk-JQOVC35K.js";import{ja as M}from"./chunk-HG2YFMVU.js";import{Qb as x,m as T,v as A}from"./chunk-D6L6UNUQ.js";import{n as c,o as S}from"./chunk-RCT3O3HQ.js";import{A as I}from"./chunk-X2J2P5ZT.js";import{a as R}from"./chunk-FTQLQJQV.js";function j(e,a,i){if(a==="agent_action"){let n=e.find(u=>u.name==="workspace_action_result"&&u.action==="profile_workflow_action")?.output;if(typeof n!="string")throw new Error("Profile Agent action evaluation did not produce a released action result.");return n}if(i==="completed"){let n=[...e].reverse().find(s=>s.name==="turn.completed"),r=n?.data?.providerResponse,o=n?.data;if(!r&&o?.turn?.status==="completed"){let s=[...e].reverse().find(t=>P(t)!==null);if(!s)throw new Error("Native Profile evaluation has no retained final answer.");let d=P(s);return e.filter(t=>P(t)===d).map(t=>t.output??"").join("")}if(typeof r?.requestId!="string"||!r.requestId||typeof r.contentHash!="string")throw new Error("Profile evaluation has no retained final provider response.");let p=e.filter(s=>s.name==="assistant.delta"&&s.data?.providerRequestId===r.requestId).map(s=>s.output??"").join("");if(c(p)!==r.contentHash)throw new Error("Profile evaluation final provider response differs from its retained trace.");return b(e)??p}return e.filter(n=>n.name==="assistant.delta"&&typeof n.output=="string").map(n=>n.output??"").join("")}R(j,"profileEvaluationOutput");function P(e){let a=e.data;return e.name==="assistant.delta"&&a?.provider==="codex"&&a.phase==="final_answer"&&typeof a.itemId=="string"?a.itemId:null}R(P,"nativeFinalAnswerItemId");async function _(e){let{store:a,manifest:i,receipt:n}=e;if(!n.metadata.retainedEvidenceRef)return null;let u=x.parse(n.metadata.retainedEvidenceRef),[r,o]=await Promise.all([a.getSession(u.sessionId),a.getTurn(u.turnId)]),p=r?.metadata?.profileEvaluationRun,s=i.profileEvaluation;if(!r||!o||o.sessionId!==r.id||!s||!r.currentProfile||c(r.currentProfile)!==c(e.profileRef)||c(p)!==c({id:i.id,contentHash:i.contentHash})||r.metadata?.taskId!==n.taskId||r.metadata?.seed!==n.seed||!o.completedAt||o.completedAt!==n.completedAt||o.startedAt!==n.startedAt||!o.harnessSnapshot||o.harnessSnapshot.harnessRelease.id!==s.harnessRelease.id||o.harnessSnapshot.harnessRelease.contentHash!==s.harnessRelease.contentHash||i.policy.kind!=="model"||!o.modelRef||o.modelRef.providerId!==i.policy.model.provider||o.modelRef.modelId!==i.policy.model.model)throw new Error("Retained Profile policy turn differs from its admitted case.");let d=await a.runtimeEventsForTurn(o.id);if(d.some(v=>v.turnId!==o.id)||c(d)!==n.traceHash)throw new Error("Retained Profile policy trace differs from its immutable receipt.");let t=j(d,s.target.kind,o.status);if(n.outputHash!==null&&c({text:t})!==n.outputHash)throw new Error("Retained Profile output differs from its immutable receipt.");let m=n.artifactRefs.flatMap(v=>{let y=d.filter(l=>(l.action==="work_output_save"||l.action==="sandbox_save_output")&&l.status==="completed").flatMap(l=>{let C=l.data&&typeof l.data=="object"?l.data:{},k=M.safeParse(C.outputRef);return k.success?[k.data]:[]}).filter(l=>l.sourceTaskId===r.id&&l.sourceTurnId===o.id&&`${r.id}/${l.id}/${l.revision}/${l.title}`===v.id&&l.sha256===v.contentHash&&l.sizeBytes===v.sizeBytes&&l.contentType===v.mediaType);if(y.length!==1)throw new Error("The case output has no unique sealed saved-file identity.");let h=y[0];if(h.location.kind!=="managed")return[];let H=`/api/work/outputs/${encodeURIComponent(h.location.fileId)}`;if(h.location.downloadPath!==H)throw new Error("The saved output has no canonical managed download route.");return[{id:h.id,title:h.title,revision:h.revision,contentType:h.contentType,sizeBytes:h.sizeBytes,sha256:h.sha256,downloadPath:H}]}),f=await a.listModelUsageRecords({sessionId:r.id,turnId:o.id,limit:1e4}),E=e.eventAfterId?d.findIndex(v=>v.id===e.eventAfterId):-1;if(e.eventAfterId&&E<0)throw new Error("Profile trace cursor is unavailable in this case.");let g=E+1,q=Math.max(1,Math.min(250,e.eventLimit??100)),w=d.slice(g,g+q);return{ref:u,prompt:o.prompt,output:n.outputHash===null?null:{text:t},partialOutput:n.outputHash===null&&t?{text:t}:null,error:o.error,events:w,eventCount:d.length,nextEventCursor:g+w.length<d.length?w.at(-1).id:null,files:m,usage:f,usageCoverage:f.length===1e4?"partial":"complete"}}R(_,"readProfileEvaluationPolicyEvidence");var W=I.object({runId:I.string().trim().min(1).max(240),receiptId:I.string().trim().min(1).max(500).optional(),eventAfterId:I.string().trim().min(1).max(500).optional(),eventLimit:I.number().int().min(1).max(250).optional(),manifest:A.optional()}).strict().refine(e=>e.receiptId||!e.eventAfterId&&!e.eventLimit,"Select a case before requesting its trace page.").refine(e=>!e.manifest||e.receiptId,"Interrupted-run inspection requires one exact case.");async function D(e){let a=await e.store.getProfileEvaluationRun(e.runId);if(a&&c(a.profileRef)!==c(e.profileRef))throw new Error("Profile evaluation run is unavailable in the selected Profile.");let i=a?.manifest??e.manifest;if(!i||!a&&!e.receiptId)throw new Error("Profile evaluation run is unavailable in the selected Profile.");if(a){if(e.manifest&&e.manifest.contentHash!==a.manifest.contentHash)throw new Error("Profile evaluation run differs from its pinned manifest.")}else if(S(i,"Interrupted Profile evaluation manifest"),i.id!==e.runId||i.profileEvaluation?.profileId!==e.profileRef.profileId||e.profileRef.source==="openpond_git"&&i.metadata.profileRepositoryId!==e.profileRef.repositoryId)throw new Error("Profile evaluation run is unavailable in the selected Profile.");let n=i.population.map((r,o)=>({member:r,index:o})).filter(({member:r})=>!e.receiptId||r.receiptId===e.receiptId);if(e.receiptId&&n.length!==1)throw new Error("Profile evaluation case is unavailable in the selected run.");let u=await Promise.all(n.map(async({member:r,index:o})=>{let p=a?null:await e.store.getProfileEvaluationReceipt(r.receiptId),s=a?.receiptRefs[o]??(p?{id:p.id,contentHash:p.contentHash}:null),d=a?.gradeRefs[o]??p?.graderEvidenceRefs[0];if(!s||!d)throw new Error("Profile evaluation run has incomplete case evidence.");let[t,m]=await Promise.all([e.store.getProfileEvaluationReceipt(s.id),e.store.getProfileEvaluationGrade(d.contentHash)]);if(!t||!a&&!T(t)||t.contentHash!==s.contentHash||t.id!==r.receiptId||t.taskId!==r.taskId||t.seed!==r.seed||t.runManifest.id!==i.id||t.runManifest.contentHash!==i.contentHash||!m||m.contentHash!==d.contentHash||!t.graderEvidenceRefs.some(f=>f.id===d.id&&f.contentHash===d.contentHash))throw new Error("Profile evaluation case evidence differs from its retained run.");return{taskId:r.taskId,seed:r.seed,receiptId:t.id,receiptHash:t.contentHash,traceHash:t.traceHash,outputHash:t.outputHash,score:m.score,passed:m.passed,gradingStatus:m.gradingStatus,failureClass:m.failureClass,artifactCount:t.artifactRefs.length,latencyMs:t.latencyMs,costUsd:t.costUsd,terminal:t.terminal,feedback:m.components.map(f=>({graderId:f.graderId,graderVersion:f.graderVersion,score:f.score,passed:f.passed,feedback:f.feedback})),...e.receiptId?{receipt:t,evidence:await _({store:e.store,profileRef:e.profileRef,manifest:i,receipt:t,eventAfterId:e.eventAfterId,eventLimit:e.eventLimit})}:{}}}));return{runId:i.id,sourceRevision:i.profileEvaluation?.sourceRevision??null,cases:u}}R(D,"inspectProfileEvaluationRun");export{j as a,W as b,D as c};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{A as h,C as I,D as f,G as u,H as S,I as k,f as R,h as y,ma as w,oa as n,qa as P,ra as g,sa as T,ua as v}from"./chunk-5ZNE43XC.js";import{l as p}from"./chunk-XHU4BZQY.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as l}from"./chunk-FTQLQJQV.js";var c=e.string().trim().min(1).max(240),o=e.string().trim().min(1).max(5e3),E=e.enum(["no_training","prompting","retrieval","sft","preference","grpo_rft","sdft_opsd","sdpo","agentic_rl"]),C=e.object({id:c,taskIndex:e.number().int().nonnegative(),label:k,output:e.record(e.string(),e.unknown()),infrastructureError:e.string().trim().min(1).max(1e4).nullable(),expectedPassed:e.boolean(),expectedRewardEligible:e.boolean(),metadata:e.record(e.string(),e.unknown()).default({})}),j=e.object({schemaVersion:e.literal("openpond.capabilityDiagnosis.v1"),summary:e.string().trim().min(1).max(1e4),stableBehavior:e.array(o).max(100).default([]),changingKnowledge:e.array(o).max(100).default([]),requiredContext:e.array(o).max(100).default([]),requiredTools:e.array(c).max(100).default([]),intervention:E,trainingEligible:e.boolean(),rationale:e.array(o).min(1).max(100),confidence:e.number().min(0).max(1)}),F=e.object({id:c,sourceId:c,sourceTurnId:c.nullable(),split:h,origin:e.enum(["extracted","corrected","synthetic","expert_authored"]),inputPrompt:e.string().trim().min(1).max(1e5),expectedOutputText:e.string().trim().min(1).max(2e5).nullable(),rationale:o}),D=e.object({schemaVersion:e.literal("openpond.taskDesignProposal.v1"),id:c,name:e.string().trim().min(1).max(500),objective:e.string().trim().min(1).max(2e4),diagnosis:j.default({schemaVersion:"openpond.capabilityDiagnosis.v1",summary:"Reproduce the selected approved behavior.",stableBehavior:[],changingKnowledge:[],requiredContext:[],requiredTools:[],intervention:"sft",trainingEligible:!0,rationale:["The selected examples were supplied as demonstrations."],confidence:.5}),taskKind:u.shape.taskKind,sourceIds:e.array(c).min(1).max(1e5),assumptions:e.array(o).max(1e3),successCriteria:e.array(o).min(1).max(1e3),proposedGraders:e.array(S).max(1e3).default([]),graderFixtures:e.array(C).max(1e5).default([]),generatedFiles:e.array(g).max(1e3).default([]),proposedExamples:e.array(F).max(1e5).default([]),proposedMethod:v.shape.recommendedMethod,trainingPath:T.nullable().default(null),policy:f,warnings:e.array(e.string().trim().min(1)).default([]),createdAt:e.string().trim().min(1)});var q=e.string().min(1).max(240),_=e.string().regex(/^[a-f0-9]{64}$/),H=e.array(e.object({source:I,excerpts:e.array(e.object({role:e.enum(["user","assistant"]),text:e.string().max(2e5),turnId:q}).strict()).max(200)}).strict()).min(1).max(20),Ht=e.discriminatedUnion("action",[e.object({action:e.literal("messages"),id:q,evidence:H,instruction:e.string().max(2*1024*1024),buildSpecification:P,currentProposal:D.nullable().default(null)}).strict(),e.object({action:e.literal("validate"),evidence:H,content:e.string().max(2*1024*1024)}).strict()]),qt=e.object({messages:e.array(e.object({role:e.enum(["system","user"]),content:e.string()}).strict()).min(1).max(20),skillHash:_}).strict(),_t=e.object({proposal:D,skillHash:_}).strict(),r=n.shape.id,s=e.number().int().positive(),d=e.string().regex(/^[a-f0-9]{64}$/),m={teamId:r,modelId:r},At=e.object({schemaVersion:e.literal("openpond.tasksetDraftCreate.v1"),operationId:r,modelId:r,expectedModelRevision:s,name:n.shape.name}).strict(),Lt=e.object({schemaVersion:e.literal("openpond.tasksetDraftSourceDescriptor.v1"),...m,expectedModelRevision:s,sourcePackageHash:d}).strict(),Ut=e.object({schemaVersion:e.literal("openpond.tasksetDraftReadback.v1"),...m,draft:n,workspaceHash:d,projectEtag:d}).strict().refine(t=>t.draft.profileId===t.teamId&&t.draft.modelScope?.modelId===t.modelId,"The hosted draft must belong to its declared workspace and Model."),A=e.object({id:r,revision:s,name:n.shape.name,status:w,updatedAt:n.shape.updatedAt,sourceTasksetRef:p.nullable()}).strict(),Ot=e.object({schemaVersion:e.literal("openpond.tasksetDraftList.v1"),...m,drafts:e.array(A).max(100),nextCursor:e.string().min(1).max(2e3).nullable()}).strict(),Gt=e.object({expectedDraftRevision:s,draft:n}).strict(),Vt=e.object({expectedDraftRevision:s,expectedModelRevision:s}).strict(),L=e.object({expectedDraftRevision:s,expectedWorkspaceHash:d}).strict(),Bt=e.object({schemaVersion:e.literal("openpond.tasksetDraftValidation.v1"),...m,draftId:r,draftRevision:s,workspaceHash:d,valid:e.boolean(),issues:e.array(e.object({code:e.string().min(1),severity:e.enum(["warning","error"]),message:e.string(),path:e.string().nullable()}).strict()),packageHash:d.nullable(),tasksetRef:p.nullable()}).strict().refine(t=>t.valid?t.packageHash!==null&&t.tasksetRef!==null&&t.issues.every(a=>a.severity!=="error"):t.packageHash===null&&t.tasksetRef===null&&t.issues.some(a=>a.severity==="error"),"Validation must retain either a compiled package or publication errors."),zt=L.extend({operationId:r,expectedPackageHash:d,expectedTasksetRef:p}).strict(),Kt=e.object({schemaVersion:e.literal("openpond.tasksetDraftFileList.v1"),...m,draftId:r,draftRevision:s,files:e.array(R).max(10020)}).strict(),Wt=e.object({schemaVersion:e.literal("openpond.tasksetDraftFileReadback.v1"),...m,draftId:r,draftRevision:s,file:y}).strict(),Nt=e.object({schemaVersion:e.literal("openpond.tasksetDraftDeletion.v1"),...m,draftId:r,revision:s,deleted:e.literal(!0)}).strict(),Xt=n.shape.id,Yt=e.number().int().positive();var i=e.string().trim().min(1).max(500),Zt=e.object({projectId:i.optional(),tasksetId:i.optional(),draftId:i.optional(),taskId:i.optional(),query:e.string().trim().max(1e3).default(""),split:e.enum(["train","validation","test","frozen_eval"]).optional(),after:e.string().min(1).max(2e3).optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),U=e.object({id:i,method:e.enum(["code","judge","human"]),required:e.boolean()}),O=e.object({tasksetId:i,tasksetName:e.string(),tasksetRevision:e.number().int().positive(),tasksetHash:e.string(),taskId:i,ordinal:e.number().int().nonnegative(),title:e.string(),description:e.string(),split:e.string(),scoring:e.array(U),configuration:e.enum(["configured","needs_reward","needs_checks"]),draftId:i.nullable().default(null),modelId:i.nullable().default(null)}),ea=e.object({items:e.array(O).max(100),nextCursor:e.string().nullable()});function ta(t,a){let $=[t.instruction,t.prompt,t.request,t.question,t.message].find(b=>typeof b=="string"&&b.trim().length>0),M=typeof t.title=="string"?t.title.trim():"",x=$?.trim()??"";return{title:(M||x||a).slice(0,180),description:x.slice(0,2e3)}}l(ta,"describeTaskInput");function aa(t){return t.map(a=>({id:a.id,method:a.kind==="model_judge"?"judge":a.kind==="human"?"human":"code",required:a.hardGate}))}l(aa,"summarizeTaskScoring");function sa(t){return t.some(a=>a.kind!=="human")?t.some(a=>a.kind==="model_judge"&&a.calibrationStatus!=="passed")?"needs_checks":"configured":"needs_reward"}l(sa,"taskConfiguration");export{E as a,D as b,Ht as c,Zt as d,O as e,ea as f,ta as g,aa as h,sa as i};
2
+ import{A as h,C as I,D as f,G as u,H as S,I as k,f as R,h as y,ma as w,oa as n,qa as P,ra as g,sa as T,ua as v}from"./chunk-BU6MW65V.js";import{l as p}from"./chunk-4PUOWSDE.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as l}from"./chunk-FTQLQJQV.js";var c=e.string().trim().min(1).max(240),o=e.string().trim().min(1).max(5e3),E=e.enum(["no_training","prompting","retrieval","sft","preference","grpo_rft","sdft_opsd","sdpo","agentic_rl"]),C=e.object({id:c,taskIndex:e.number().int().nonnegative(),label:k,output:e.record(e.string(),e.unknown()),infrastructureError:e.string().trim().min(1).max(1e4).nullable(),expectedPassed:e.boolean(),expectedRewardEligible:e.boolean(),metadata:e.record(e.string(),e.unknown()).default({})}),j=e.object({schemaVersion:e.literal("openpond.capabilityDiagnosis.v1"),summary:e.string().trim().min(1).max(1e4),stableBehavior:e.array(o).max(100).default([]),changingKnowledge:e.array(o).max(100).default([]),requiredContext:e.array(o).max(100).default([]),requiredTools:e.array(c).max(100).default([]),intervention:E,trainingEligible:e.boolean(),rationale:e.array(o).min(1).max(100),confidence:e.number().min(0).max(1)}),F=e.object({id:c,sourceId:c,sourceTurnId:c.nullable(),split:h,origin:e.enum(["extracted","corrected","synthetic","expert_authored"]),inputPrompt:e.string().trim().min(1).max(1e5),expectedOutputText:e.string().trim().min(1).max(2e5).nullable(),rationale:o}),D=e.object({schemaVersion:e.literal("openpond.taskDesignProposal.v1"),id:c,name:e.string().trim().min(1).max(500),objective:e.string().trim().min(1).max(2e4),diagnosis:j.default({schemaVersion:"openpond.capabilityDiagnosis.v1",summary:"Reproduce the selected approved behavior.",stableBehavior:[],changingKnowledge:[],requiredContext:[],requiredTools:[],intervention:"sft",trainingEligible:!0,rationale:["The selected examples were supplied as demonstrations."],confidence:.5}),taskKind:u.shape.taskKind,sourceIds:e.array(c).min(1).max(1e5),assumptions:e.array(o).max(1e3),successCriteria:e.array(o).min(1).max(1e3),proposedGraders:e.array(S).max(1e3).default([]),graderFixtures:e.array(C).max(1e5).default([]),generatedFiles:e.array(g).max(1e3).default([]),proposedExamples:e.array(F).max(1e5).default([]),proposedMethod:v.shape.recommendedMethod,trainingPath:T.nullable().default(null),policy:f,warnings:e.array(e.string().trim().min(1)).default([]),createdAt:e.string().trim().min(1)});var q=e.string().min(1).max(240),_=e.string().regex(/^[a-f0-9]{64}$/),H=e.array(e.object({source:I,excerpts:e.array(e.object({role:e.enum(["user","assistant"]),text:e.string().max(2e5),turnId:q}).strict()).max(200)}).strict()).min(1).max(20),Ht=e.discriminatedUnion("action",[e.object({action:e.literal("messages"),id:q,evidence:H,instruction:e.string().max(2*1024*1024),buildSpecification:P,currentProposal:D.nullable().default(null)}).strict(),e.object({action:e.literal("validate"),evidence:H,content:e.string().max(2*1024*1024)}).strict()]),qt=e.object({messages:e.array(e.object({role:e.enum(["system","user"]),content:e.string()}).strict()).min(1).max(20),skillHash:_}).strict(),_t=e.object({proposal:D,skillHash:_}).strict(),r=n.shape.id,s=e.number().int().positive(),d=e.string().regex(/^[a-f0-9]{64}$/),m={teamId:r,modelId:r},At=e.object({schemaVersion:e.literal("openpond.tasksetDraftCreate.v1"),operationId:r,modelId:r,expectedModelRevision:s,name:n.shape.name}).strict(),Lt=e.object({schemaVersion:e.literal("openpond.tasksetDraftSourceDescriptor.v1"),...m,expectedModelRevision:s,sourcePackageHash:d}).strict(),Ut=e.object({schemaVersion:e.literal("openpond.tasksetDraftReadback.v1"),...m,draft:n,workspaceHash:d,projectEtag:d}).strict().refine(t=>t.draft.profileId===t.teamId&&t.draft.modelScope?.modelId===t.modelId,"The hosted draft must belong to its declared workspace and Model."),A=e.object({id:r,revision:s,name:n.shape.name,status:w,updatedAt:n.shape.updatedAt,sourceTasksetRef:p.nullable()}).strict(),Ot=e.object({schemaVersion:e.literal("openpond.tasksetDraftList.v1"),...m,drafts:e.array(A).max(100),nextCursor:e.string().min(1).max(2e3).nullable()}).strict(),Gt=e.object({expectedDraftRevision:s,draft:n}).strict(),Vt=e.object({expectedDraftRevision:s,expectedModelRevision:s}).strict(),L=e.object({expectedDraftRevision:s,expectedWorkspaceHash:d}).strict(),Bt=e.object({schemaVersion:e.literal("openpond.tasksetDraftValidation.v1"),...m,draftId:r,draftRevision:s,workspaceHash:d,valid:e.boolean(),issues:e.array(e.object({code:e.string().min(1),severity:e.enum(["warning","error"]),message:e.string(),path:e.string().nullable()}).strict()),packageHash:d.nullable(),tasksetRef:p.nullable()}).strict().refine(t=>t.valid?t.packageHash!==null&&t.tasksetRef!==null&&t.issues.every(a=>a.severity!=="error"):t.packageHash===null&&t.tasksetRef===null&&t.issues.some(a=>a.severity==="error"),"Validation must retain either a compiled package or publication errors."),zt=L.extend({operationId:r,expectedPackageHash:d,expectedTasksetRef:p}).strict(),Kt=e.object({schemaVersion:e.literal("openpond.tasksetDraftFileList.v1"),...m,draftId:r,draftRevision:s,files:e.array(R).max(10020)}).strict(),Wt=e.object({schemaVersion:e.literal("openpond.tasksetDraftFileReadback.v1"),...m,draftId:r,draftRevision:s,file:y}).strict(),Nt=e.object({schemaVersion:e.literal("openpond.tasksetDraftDeletion.v1"),...m,draftId:r,revision:s,deleted:e.literal(!0)}).strict(),Xt=n.shape.id,Yt=e.number().int().positive();var i=e.string().trim().min(1).max(500),Zt=e.object({projectId:i.optional(),tasksetId:i.optional(),draftId:i.optional(),taskId:i.optional(),query:e.string().trim().max(1e3).default(""),split:e.enum(["train","validation","test","frozen_eval"]).optional(),after:e.string().min(1).max(2e3).optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),U=e.object({id:i,method:e.enum(["code","judge","human"]),required:e.boolean()}),O=e.object({tasksetId:i,tasksetName:e.string(),tasksetRevision:e.number().int().positive(),tasksetHash:e.string(),taskId:i,ordinal:e.number().int().nonnegative(),title:e.string(),description:e.string(),split:e.string(),scoring:e.array(U),configuration:e.enum(["configured","needs_reward","needs_checks"]),draftId:i.nullable().default(null),modelId:i.nullable().default(null)}),ea=e.object({items:e.array(O).max(100),nextCursor:e.string().nullable()});function ta(t,a){let $=[t.instruction,t.prompt,t.request,t.question,t.message].find(b=>typeof b=="string"&&b.trim().length>0),M=typeof t.title=="string"?t.title.trim():"",x=$?.trim()??"";return{title:(M||x||a).slice(0,180),description:x.slice(0,2e3)}}l(ta,"describeTaskInput");function aa(t){return t.map(a=>({id:a.id,method:a.kind==="model_judge"?"judge":a.kind==="human"?"human":"code",required:a.hardGate}))}l(aa,"summarizeTaskScoring");function sa(t){return t.some(a=>a.kind!=="human")?t.some(a=>a.kind==="model_judge"&&a.calibrationStatus!=="passed")?"needs_checks":"configured":"needs_reward"}l(sa,"taskConfiguration");export{E as a,D as b,Ht as c,Zt as d,O as e,ea as f,ta as g,aa as h,sa as i};
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as v}from"./chunk-KVTBX2UP.js";import{a as c}from"./chunk-BJXPQIVD.js";import{h as m,j as d}from"./chunk-6ESBAHWK.js";import{a as n}from"./chunk-FTQLQJQV.js";function k(e){return e.state==="planning"&&!e.plan}n(k,"shouldRunCreateImprovePlanner");function y(e){return e==="approved"?"accepted":e==="rejected"?"declined":e==="cancelled"?"cancelled":"pending"}n(y,"approvalStatusForPlan");function g(e){let t=e.run.plan;return{id:t?.approvalId??`approval_${e.run.id}`,sessionId:e.session.id,turnId:e.turn.id,providerRequestId:e.run.id,kind:"create_plan",title:`${e.run.operation==="improve"?"Approve improvement plan":"Approve creation plan"}: ${e.run.objective}`,detail:JSON.stringify({runId:e.run.id,revision:e.run.revision,planId:t?.id??null,target:e.run.target,objective:e.run.objective,summary:t?.summary??null,sourcePlan:t?.sourcePlan??[],requirements:t?.requirements??[],checks:t?.checks??[],workflowCaptureId:e.run.workflowCapture?.id??null},null,2),status:e.status,createdAt:e.existing?.createdAt??e.run.createdAt}}n(g,"createImprovePlanApproval");function h(e,t){if(e.id!==t.runId)throw new Error("Create/Improve action targets another run.");if(e.appliedActionIds.includes(t.actionId))return e;let a=c();if(t.type==="approve_plan"){if(e.state!=="awaiting_plan_approval"||!e.plan)throw new Error("Create/Improve plan is not ready for approval.");return d(e,{state:e.target.kind==="model"?"evaluating":"applying_source",plan:{...e.plan,status:"approved",approvedAt:e.plan.approvedAt??a,updatedAt:a},blockedReason:null,updatedAt:a},t.actionId)}if(t.type==="cancel"){if(!e.executionPolicy.cancellationAllowed)throw new Error("This Create/Improve run cannot be cancelled.");let r=t.reason?.trim()||"Cancelled before completion.";return d(e,{state:"cancelled",plan:e.plan?{...e.plan,status:"cancelled",approvedAt:null,metadata:{...e.plan.metadata,cancellationReason:r},updatedAt:a}:null,blockedReason:r,metadata:{...e.metadata,cancellationReason:r},updatedAt:a},t.actionId)}if(t.type==="revise_plan"){if(e.state!=="awaiting_plan_approval"||!e.plan)throw new Error("Create/Improve plan is not ready for revision.");let r=e.plan;return d(e,{state:"awaiting_plan_approval",plan:{...r,id:`create_improve_plan_${crypto.randomUUID()}`,status:"pending_approval",summary:`${r.summary}
2
+ import{a as v}from"./chunk-KVTBX2UP.js";import{a as c}from"./chunk-U7D6Q744.js";import{h as m,j as d}from"./chunk-6ESBAHWK.js";import{a as n}from"./chunk-FTQLQJQV.js";function k(e){return e.state==="planning"&&!e.plan}n(k,"shouldRunCreateImprovePlanner");function y(e){return e==="approved"?"accepted":e==="rejected"?"declined":e==="cancelled"?"cancelled":"pending"}n(y,"approvalStatusForPlan");function g(e){let t=e.run.plan;return{id:t?.approvalId??`approval_${e.run.id}`,sessionId:e.session.id,turnId:e.turn.id,providerRequestId:e.run.id,kind:"create_plan",title:`${e.run.operation==="improve"?"Approve improvement plan":"Approve creation plan"}: ${e.run.objective}`,detail:JSON.stringify({runId:e.run.id,revision:e.run.revision,planId:t?.id??null,target:e.run.target,objective:e.run.objective,summary:t?.summary??null,sourcePlan:t?.sourcePlan??[],requirements:t?.requirements??[],checks:t?.checks??[],workflowCaptureId:e.run.workflowCapture?.id??null},null,2),status:e.status,createdAt:e.existing?.createdAt??e.run.createdAt}}n(g,"createImprovePlanApproval");function h(e,t){if(e.id!==t.runId)throw new Error("Create/Improve action targets another run.");if(e.appliedActionIds.includes(t.actionId))return e;let a=c();if(t.type==="approve_plan"){if(e.state!=="awaiting_plan_approval"||!e.plan)throw new Error("Create/Improve plan is not ready for approval.");return d(e,{state:e.target.kind==="model"?"evaluating":"applying_source",plan:{...e.plan,status:"approved",approvedAt:e.plan.approvedAt??a,updatedAt:a},blockedReason:null,updatedAt:a},t.actionId)}if(t.type==="cancel"){if(!e.executionPolicy.cancellationAllowed)throw new Error("This Create/Improve run cannot be cancelled.");let r=t.reason?.trim()||"Cancelled before completion.";return d(e,{state:"cancelled",plan:e.plan?{...e.plan,status:"cancelled",approvedAt:null,metadata:{...e.plan.metadata,cancellationReason:r},updatedAt:a}:null,blockedReason:r,metadata:{...e.metadata,cancellationReason:r},updatedAt:a},t.actionId)}if(t.type==="revise_plan"){if(e.state!=="awaiting_plan_approval"||!e.plan)throw new Error("Create/Improve plan is not ready for revision.");let r=e.plan;return d(e,{state:"awaiting_plan_approval",plan:{...r,id:`create_improve_plan_${crypto.randomUUID()}`,status:"pending_approval",summary:`${r.summary}
3
3
 
4
4
  Revision requested: ${t.revision}`,sourcePlan:r.sourcePlan.map(o=>({...o,reason:`${o.reason} Revision requested: ${t.revision}`})),approvedAt:null,editedFromPlanId:r.id,metadata:{...r.metadata,revision:t.revision,supersedesPlanId:r.id},createdAt:a,updatedAt:a},metadata:{...e.metadata,previousPlanId:r.id},updatedAt:a},t.actionId)}if(t.type==="answer_question"){if(e.state!=="awaiting_questions")throw new Error("Create/Improve run is not waiting for questions.");let r=e.questions.find(p=>p.id===t.questionId);if(!r||r.status!=="pending")throw new Error("Create/Improve question is no longer pending.");let o=r.options.find(p=>p.value===t.value),i=e.questions.map(p=>p.id===t.questionId?{...p,status:"answered",answer:{value:t.value,label:o?.label??null,detail:null,answeredAt:a,metadata:{}}}:p),s=i.some(p=>p.required&&p.status==="pending");return d(e,{state:s?"awaiting_questions":"planning",questions:i,plan:null,blockedReason:null,updatedAt:a},t.actionId)}if(t.type==="open_pull_request"||t.type==="apply_candidate"){let r=t.type==="apply_candidate"&&e.state==="blocked"&&!!e.localProfileCommit;if(e.state!=="awaiting_promotion"&&!r)throw new Error("Create/Improve candidate is not awaiting promotion.");let o=u(e,t.candidateId);if(o.status!=="evaluated"||!o.git?.headCommit)throw new Error("Create/Improve candidate must be committed and evaluated before it can be applied.");if(e.tasksetRef&&(o.tasksetRef?.id!==e.tasksetRef.id||o.tasksetRef.revision!==e.tasksetRef.revision||o.tasksetRef.contentHash!==e.tasksetRef.contentHash))throw new Error("Create/Improve candidate is not linked to the exact approved Taskset revision.");let i=e.evaluationReceipts.filter(s=>s.candidateId===o.id&&s.subject==="candidate");if(i.length===0||i.some(s=>s.status!=="passed"||s.publishGate==="failed"))throw new Error("Create/Improve candidate requires passing Eval receipts before it can be applied.");if(e.tasksetRef&&i.some(s=>s.tasksetId!==e.tasksetRef.id||s.tasksetHash!==e.tasksetRef.contentHash||s.metadata.trustedTasksetExecution!==!0||typeof s.metadata.executionContractHash!="string"))throw new Error("Create/Improve candidate requires a trusted receipt for the exact approved Taskset revision.");return d(e,{state:t.type==="apply_candidate"?"reconciling_release":"opening_pull_request",releaseOutcome:{...e.releaseOutcome,status:"pending",updatedAt:a},blockedReason:null,metadata:{...e.metadata,releaseAction:{type:t.type,candidateId:o.id,requestedAt:a}},updatedAt:a},t.actionId)}if(t.type==="reconcile_pull_request"){if(!["pull_request_open","blocked"].includes(e.state))throw new Error("Create/Improve run has no open PR to reconcile.");let r=u(e,t.candidateId);if(!r.git?.pullRequest)throw new Error("Create/Improve candidate has no PR to reconcile.");if(e.state==="blocked"&&r.git.pullRequest.state!=="merged")throw new Error("Only a merged PR with failed verification can be reconciled from a blocked run.");return d(e,{state:"reconciling_release",blockedReason:null,metadata:{...e.metadata,releaseAction:{type:t.type,candidateId:r.id,requestedAt:a}},updatedAt:a},t.actionId)}if(t.type==="reject_candidate"){if(!["awaiting_promotion","pull_request_open"].includes(e.state))throw new Error("Create/Improve candidate is not available for rejection.");let r=u(e,t.candidateId),o=t.reason?.trim()||"Candidate rejected.";return r.git?.pullRequest?d(e,{state:"reconciling_release",blockedReason:null,metadata:{...e.metadata,releaseAction:{type:t.type,candidateId:r.id,reason:o,requestedAt:a}},updatedAt:a},t.actionId):d(e,{state:"rejected",candidates:e.candidates.map(i=>i.id===r.id?{...i,status:"rejected",updatedAt:a}:i),releaseOutcome:{...e.releaseOutcome,status:"rejected",updatedAt:a},blockedReason:o,metadata:{...e.metadata,releaseAction:{type:t.type,candidateId:r.id,reason:o,completedAt:a}},updatedAt:a},t.actionId)}if(t.type==="pause"){if(!e.executionPolicy.pauseAllowed)throw new Error("This Create/Improve run cannot be paused.");if(["ready","ready_local","published_hosted","cancelled"].includes(e.state))throw new Error("Completed Create/Improve runs cannot be paused.");return d(e,{state:"paused",metadata:{...e.metadata,pausedFromState:e.state,pausedAt:a},updatedAt:a},t.actionId)}let l=I(e);return d(e,{state:l,metadata:{...e.metadata,resumedAt:a},updatedAt:a},t.actionId)}n(h,"applyCreateImproveRunAction");function u(e,t){let a=e.candidates.find(l=>l.id===t);if(!a)throw new Error(`Create/Improve candidate not found: ${t}`);return a}n(u,"requireRunCandidate");function A(e,t){if(e.state!=="applying_source"||e.plan?.status!=="approved"||e.adapter.kind==="local")return e;let a=v({session:t}),l=e.adapter.kind;return d(e,{state:"blocked",blockedReason:l==="hosted"?"Approved hosted Create/Improve plans from this chat require the Cloud work item background flow. No local source mutation was performed.":"Approved Profile promotion requires an explicit Cloud promotion flow. No local source mutation was performed.",metadata:{...e.metadata,createImproveApproval:{status:"blocked",reason:l==="hosted"?"hosted_create_improve_apply_not_configured":"promote_local_to_hosted_apply_not_configured",adapterKind:l,workspaceExecutionTarget:f(a)}},updatedAt:c()})}n(A,"createPlanExecutionRunForApprovedAdapter");function f(e){return e.target==="sandbox"?{target:e.target,ready:e.ready,workspaceKind:e.workspaceKind,workspaceId:e.workspaceId,sandboxId:e.sandboxId,cloudProjectId:e.cloudProjectId,localProjectId:e.localProjectId,hybrid:e.hybrid,reason:e.reason}:e.target==="local"?{target:e.target,ready:e.ready,workspaceKind:e.workspaceKind,workspaceId:e.workspaceId,localProjectId:e.localProjectId,cwd:e.cwd,reason:e.reason}:{target:e.target,ready:e.ready,workspaceKind:e.workspaceKind,workspaceId:e.workspaceId,reason:e.reason}}n(f,"createImproveExecutionTargetMetadata");function C(e){return["awaiting_questions","awaiting_plan_approval","awaiting_promotion","pull_request_open","paused"].includes(e.state)?"pending":["applying_source","running_checks","evaluating","opening_pull_request","reconciling_release","pushing_hosted","running_hosted_checks"].includes(e.state)?"started":["rejected","blocked","failed","cancelled"].includes(e.state)?"failed":"completed"}n(C,"createImproveRuntimeEventStatus");function b(e,t){return d(e,{state:"blocked",blockedReason:t,metadata:{...e.metadata,localCreateImprove:{status:"blocked",reason:"local_create_improve_background_apply_failed"}},updatedAt:c()})}n(b,"createImproveBackgroundFailureRun");function q(e){return e.mentionedApps,e.userPrompt,e.request}n(q,"normalizeMentionedSandboxToolRequest");function P(e,t){return{...e,metadata:{...e.metadata??{},createImproveRun:t},createImproveRun:t}}n(P,"withCreateImproveRun");function I(e){if(e.state!=="paused")throw new Error("Create/Improve run cannot be resumed.");let t=m.shape.state.safeParse(e.metadata.pausedFromState);return!t.success||t.data==="paused"?"planning":t.data}n(I,"resumeStateFromMetadata");export{k as a,y as b,g as c,h as d,A as e,C as f,b as g,q as h,P as i};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{c as d,e as p,f,g,i as w,qa as P}from"./chunk-SH7POUVX.js";import{a as u,c as m,f as l,h as r}from"./chunk-UGOK7VTC.js";import{a as e}from"./chunk-FTQLQJQV.js";import c from"node:path";import{AsyncLocalStorage as v}from"node:async_hooks";import{promises as h}from"node:fs";var y=new v;function E(n,i=!1){let t=y.getStore();t&&(i&&(t.length=0),t.push(n))}e(E,"onStartupFailure");async function N(n,i){await P(n);let t;try{t=await g(c.join(r(n).runtime,"server-owner"),100)}catch(o){if(o instanceof m&&o.issue.code==="STORAGE_BUSY"){let a=await w(c.join(r(n).runtime,"endpoint.json"),()=>null);throw new m({code:"RUNTIME_ALREADY_RUNNING",path:n,message:"An OpenPond runtime already owns this home.",action:a?.url?`Connect to the existing runtime at ${a.url}, or stop it before starting another.`:"Stop the existing runtime before starting another with this home."})}throw o}let s=[];try{let o=await u(n,()=>y.run(s,i)),a=o.close.bind(o);s.length=0;let k;return{...o,close:e(()=>k??=(async()=>{try{await u(n,a)}finally{await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0}),await t()}})(),"close")}}catch(o){try{for(let a of s.reverse())await Promise.resolve().then(()=>u(n,a)).catch(()=>{});await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0})}finally{await t()}throw o}}e(N,"ownHomeRuntime");async function b(n,i,t){await p(c.join(r(n).runtime,"endpoint.json"),JSON.stringify({schemaVersion:"openpond.runtimeEndpoint.v1",pid:process.pid,url:i,serverId:t}))}e(b,"publishRuntimeEndpoint");import{randomBytes as x}from"node:crypto";function D(){return l()}e(D,"appDataDir");function _(n){return r(n).config}e(_,"providersConfigPath");function H(n){return r(n).credentials}e(H,"providerSecretsConfigPath");function L(n){return r(n).key}e(L,"providerSecretsKeyPath");async function U(n){let i=r(n).token;return f(i,async()=>{let t=(await d(i))?.trim(),s=process.env.OPENPOND_APP_TOKEN||t||x(32).toString("base64url");return s!==t&&await p(i,s),{token:s,tokenFile:i}})}e(U,"ensureCapabilityToken");export{E as a,N as b,b as c,D as d,_ as e,H as f,L as g,U as h};
2
+ import{c as d,e as p,f,g,i as w,qa as P}from"./chunk-SV7ZBEK2.js";import{a as u,c as m,f as l,h as r}from"./chunk-UGOK7VTC.js";import{a as e}from"./chunk-FTQLQJQV.js";import c from"node:path";import{AsyncLocalStorage as v}from"node:async_hooks";import{promises as h}from"node:fs";var y=new v;function E(n,i=!1){let t=y.getStore();t&&(i&&(t.length=0),t.push(n))}e(E,"onStartupFailure");async function N(n,i){await P(n);let t;try{t=await g(c.join(r(n).runtime,"server-owner"),100)}catch(o){if(o instanceof m&&o.issue.code==="STORAGE_BUSY"){let a=await w(c.join(r(n).runtime,"endpoint.json"),()=>null);throw new m({code:"RUNTIME_ALREADY_RUNNING",path:n,message:"An OpenPond runtime already owns this home.",action:a?.url?`Connect to the existing runtime at ${a.url}, or stop it before starting another.`:"Stop the existing runtime before starting another with this home."})}throw o}let s=[];try{let o=await u(n,()=>y.run(s,i)),a=o.close.bind(o);s.length=0;let k;return{...o,close:e(()=>k??=(async()=>{try{await u(n,a)}finally{await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0}),await t()}})(),"close")}}catch(o){try{for(let a of s.reverse())await Promise.resolve().then(()=>u(n,a)).catch(()=>{});await h.rm(c.join(r(n).runtime,"endpoint.json"),{force:!0})}finally{await t()}throw o}}e(N,"ownHomeRuntime");async function b(n,i,t){await p(c.join(r(n).runtime,"endpoint.json"),JSON.stringify({schemaVersion:"openpond.runtimeEndpoint.v1",pid:process.pid,url:i,serverId:t}))}e(b,"publishRuntimeEndpoint");import{randomBytes as x}from"node:crypto";function D(){return l()}e(D,"appDataDir");function _(n){return r(n).config}e(_,"providersConfigPath");function H(n){return r(n).credentials}e(H,"providerSecretsConfigPath");function L(n){return r(n).key}e(L,"providerSecretsKeyPath");async function U(n){let i=r(n).token;return f(i,async()=>{let t=(await d(i))?.trim(),s=process.env.OPENPOND_APP_TOKEN||t||x(32).toString("base64url");return s!==t&&await p(i,s),{token:s,tokenFile:i}})}e(U,"ensureCapabilityToken");export{E as a,N as b,b as c,D as d,_ as e,H as f,L as g,U as h};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{A as it,B as K,C as A,D as rt,E as at,b as u,f as I,g as Y,h as $,i as L,j as N,k as G,l as T,o as Q,r as Z,s as k,t as x,u as tt,v as M,w as et,x as z,y as q,z as nt}from"./chunk-YU3C6U5V.js";import{a as b}from"./chunk-BJXPQIVD.js";import{a as l}from"./chunk-FTQLQJQV.js";import{promises as mt}from"node:fs";async function $t(t,e,n={}){return O(A(t,e.id),e,n)}l($t,"loadWorkspaceState");async function O(t,e,n={}){let{workspacePath:i,repoPath:r}=t,a=it(e,n.gitBaseUrl);await mt.mkdir(i,{recursive:!0});let o=await L(r),s=null;if(!o&&n.clone&&a)try{await rt(r,i,a,n.token),o=!0}catch(m){s=m instanceof Error?m.message:String(m)}if(!o)return n.allowPlainFolder&&await $(r)?{appId:e.id,source:"local_folder",workspacePath:i,repoPath:r,initialized:!0,remoteUrl:null,expectedRemoteUrl:a,currentBranch:null,headCommit:null,upstreamBranch:null,ahead:0,behind:0,diverged:!1,linkedSourceHeadCommit:n.linkedSourceHeadCommit?.trim()||null,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,linkedSourceComparisonError:null,lastFetchAt:null,defaultBranch:e.defaultBranch??null,branches:[],dirty:!1,changedFilesCount:0,untrackedFilesCount:0,error:s,updatedAt:b()}:{appId:e.id,source:I(a),workspacePath:i,repoPath:r,initialized:o,remoteUrl:null,expectedRemoteUrl:a,currentBranch:null,headCommit:null,upstreamBranch:null,ahead:0,behind:0,diverged:!1,linkedSourceHeadCommit:n.linkedSourceHeadCommit?.trim()||null,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,linkedSourceComparisonError:null,lastFetchAt:null,defaultBranch:e.defaultBranch??null,branches:[],dirty:!1,changedFilesCount:0,untrackedFilesCount:0,error:s,updatedAt:b()};let[f,d,h,P,y]=await Promise.all([u("git",["branch","--show-current"],r),u("git",["branch","--format=%(refname:short)"],r),u("git",["status","--porcelain=v1","-b"],r),u("git",["config","--get","remote.origin.url"],r),u("git",["rev-parse","--verify","HEAD"],r)]),E=P.code===0&&Y(P.stdout.trim())||null,W=h.code===0?h.stdout.split(`
2
+ import{A as it,B as K,C as A,D as rt,E as at,b as u,f as I,g as Y,h as $,i as L,j as N,k as G,l as T,o as Q,r as Z,s as k,t as x,u as tt,v as M,w as et,x as z,y as q,z as nt}from"./chunk-YU3C6U5V.js";import{a as b}from"./chunk-U7D6Q744.js";import{a as l}from"./chunk-FTQLQJQV.js";import{promises as mt}from"node:fs";async function $t(t,e,n={}){return O(A(t,e.id),e,n)}l($t,"loadWorkspaceState");async function O(t,e,n={}){let{workspacePath:i,repoPath:r}=t,a=it(e,n.gitBaseUrl);await mt.mkdir(i,{recursive:!0});let o=await L(r),s=null;if(!o&&n.clone&&a)try{await rt(r,i,a,n.token),o=!0}catch(m){s=m instanceof Error?m.message:String(m)}if(!o)return n.allowPlainFolder&&await $(r)?{appId:e.id,source:"local_folder",workspacePath:i,repoPath:r,initialized:!0,remoteUrl:null,expectedRemoteUrl:a,currentBranch:null,headCommit:null,upstreamBranch:null,ahead:0,behind:0,diverged:!1,linkedSourceHeadCommit:n.linkedSourceHeadCommit?.trim()||null,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,linkedSourceComparisonError:null,lastFetchAt:null,defaultBranch:e.defaultBranch??null,branches:[],dirty:!1,changedFilesCount:0,untrackedFilesCount:0,error:s,updatedAt:b()}:{appId:e.id,source:I(a),workspacePath:i,repoPath:r,initialized:o,remoteUrl:null,expectedRemoteUrl:a,currentBranch:null,headCommit:null,upstreamBranch:null,ahead:0,behind:0,diverged:!1,linkedSourceHeadCommit:n.linkedSourceHeadCommit?.trim()||null,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,linkedSourceComparisonError:null,lastFetchAt:null,defaultBranch:e.defaultBranch??null,branches:[],dirty:!1,changedFilesCount:0,untrackedFilesCount:0,error:s,updatedAt:b()};let[f,d,h,P,y]=await Promise.all([u("git",["branch","--show-current"],r),u("git",["branch","--format=%(refname:short)"],r),u("git",["status","--porcelain=v1","-b"],r),u("git",["config","--get","remote.origin.url"],r),u("git",["rev-parse","--verify","HEAD"],r)]),E=P.code===0&&Y(P.stdout.trim())||null,W=h.code===0?h.stdout.split(`
3
3
  `).filter(m=>m.trim()):[],S=et(W.find(m=>m.startsWith("## "))??""),p=W.filter(m=>{if(m.startsWith("## "))return!1;let B=M(m),V=B?k(B.path):null;return!!(V&&!x(V))}),C=p.filter(m=>m.startsWith("??")).length,F=f.code===0&&f.stdout.trim()?f.stdout.trim():null,R=y.code===0&&y.stdout.trim()||null,U=d.code===0?d.stdout.split(`
4
4
  `).map(m=>m.trim()).filter(Boolean):[],c=I(E)==="unknown"&&a?a:E??a,g=await ht(r,n.linkedSourceHeadCommit,R);return{appId:e.id,source:c?I(c):"local_git",workspacePath:i,repoPath:r,initialized:o,remoteUrl:E,expectedRemoteUrl:a,currentBranch:F,headCommit:R,upstreamBranch:S.upstreamBranch,ahead:S.ahead,behind:S.behind,diverged:S.ahead>0&&S.behind>0,linkedSourceHeadCommit:g.linkedSourceHeadCommit,aheadOfLinkedSource:g.aheadOfLinkedSource,behindLinkedSource:g.behindLinkedSource,divergedFromLinkedSource:g.divergedFromLinkedSource,linkedSourceComparisonError:g.error,lastFetchAt:await at(r),defaultBranch:e.defaultBranch??null,branches:U,dirty:p.length>0,changedFilesCount:p.length,untrackedFilesCount:C,error:s,updatedAt:b()}}l(O,"loadWorkspaceStateAtPath");async function ht(t,e,n){let i=e?.trim()||null,r={linkedSourceHeadCommit:i,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,error:null};if(!i||!n||i===n)return r;let a=await u("git",["rev-list","--left-right","--count",`${i}...${n}`],t);if(a.code!==0)return{...r,error:a.stderr.trim()||a.stdout.trim()||"Unable to compare linked source commit."};let[o,s]=a.stdout.trim().split(/\s+/,2),f=Number(o)||0,d=Number(s)||0;return{linkedSourceHeadCommit:i,aheadOfLinkedSource:d,behindLinkedSource:f,divergedFromLinkedSource:d>0&&f>0,error:null}}l(ht,"compareLinkedSourceCommit");async function zt(t,e,n){return gt(A(t,e.id),e,n)}l(zt,"createAndCheckoutBranch");async function gt(t,e,n,i={}){K(n);let r=await O(t,e,{...i,clone:!1});if(!r.initialized)throw new Error(r.error||"Workspace is not initialized");let a=await u("git",["checkout","-b",n.trim()],r.repoPath);if(a.code!==0)throw new Error(a.stderr.trim()||a.stdout.trim()||"Unable to create branch");return O(t,e,{...i,clone:!1})}l(gt,"createAndCheckoutBranchAtPath");async function Ht(t,e,n){return kt(A(t,e.id),e,n)}l(Ht,"checkoutBranch");async function kt(t,e,n,i={}){K(n);let r=await O(t,e,{...i,clone:!1});if(!r.initialized)throw new Error(r.error||"Workspace is not initialized");if(r.dirty&&r.currentBranch!==n.trim())throw new Error("Commit or discard local changes before switching branches");let a=await u("git",["checkout",n.trim()],r.repoPath);if(a.code!==0)throw new Error(a.stderr.trim()||a.stdout.trim()||"Unable to switch branch");return O(t,e,{...i,clone:!1})}l(kt,"checkoutBranchAtPath");import w from"node:path";import{promises as ct}from"node:fs";var wt=6,Wt=60,st=1e4,D=new Map;async function H(t,e,n=wt){let i=Math.max(1,Math.floor(n)),r=new Array(t.length),a=0;async function o(){for(;a<t.length;){let s=a;a+=1,r[s]=await e(t[s],s)}}return l(o,"worker"),await Promise.all(Array.from({length:Math.min(i,t.length)},()=>o())),r}l(H,"mapWorkspaceDiffEntriesWithConcurrency");function Xt(){D.clear()}l(Xt,"clearWorkspaceDiffCacheForTests");async function Jt(t,e,n={}){let{repoPath:i}=A(t,e.id);return Pt(i,e.id,n)}l(Jt,"loadWorkspaceDiff");async function Pt(t,e,n={}){let i=await L(t);if(!i){let c=await nt(t);return{appId:e,repoPath:t,initialized:c.length>0||await $(t),dirty:!1,filesChanged:0,additions:0,deletions:0,repoFiles:c,files:[],error:null,updatedAt:b()}}let r=await X(t),a=r.pathPrefix||".",[o,s]=await Promise.all([u("git",["rev-parse","HEAD"],r.commandCwd),u("git",["status","--porcelain=v1","-uall","--",a],r.commandCwd)]);if(s.code!==0)return{appId:e,repoPath:t,initialized:i,dirty:!1,filesChanged:0,additions:0,deletions:0,repoFiles:[],files:[],error:s.stderr.trim()||s.stdout.trim()||"Unable to read workspace diff",updatedAt:b()};let f=s.stdout.split(`
5
5
  `).map(M).filter(c=>!!c).map(c=>{let g=v(c.path,r.pathPrefix);if(!g)return null;let m=k(g);return m?{...c,path:m}:null}).filter(c=>c?!x(c.path):!1),d=await Ct(t,f),h=Ft({repoPath:t,workspaceId:e,includeFileDetails:!!n.includeFileDetails,head:o.code===0?o.stdout.trim():"unborn",pathPrefix:r.pathPrefix,status:s.stdout,worktreeSignature:d}),P=D.get(h);if(P)return j(P);let y=(await H(f,async c=>c.status==="deleted"||!await Z(t,c.path)?c:null)).filter(c=>!!c),E=await u("git",["ls-files","--",a],r.commandCwd),W=q([...E.code===0?E.stdout.split(`
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{l as o}from"./chunk-XHU4BZQY.js";import{W as c}from"./chunk-ZY32SZ2P.js";import{c as t}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as n}from"./chunk-FTQLQJQV.js";var m=e.object({id:t,scope:t,sourceId:t,name:e.string().trim().min(1).max(100),keyPrefix:e.string().min(1).max(100),createdAt:e.iso.datetime(),expiresAt:e.iso.datetime(),revokedAt:e.iso.datetime().nullable()}).strict(),p=e.string().regex(/^opk_key_[A-Za-z0-9]{16}_[A-Za-z0-9]{48}$/),x=e.discriminatedUnion("action",[e.object({action:e.literal("create"),scope:t,sourceId:t,name:e.string().trim().min(1).max(100),expiresAt:e.iso.datetime(),operationId:t,apiKey:p}).strict(),e.object({action:e.literal("list"),scope:t,sourceId:t,afterId:t.optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),e.object({action:e.literal("revoke"),scope:t,sourceId:t,id:t}).strict()]),f=e.object({credential:m,apiKey:p}).strict(),y=e.object({items:e.array(m).max(100),nextCursor:t.nullable()}).strict(),h=e.object({scope:t,sourceId:t}).strict(),b=e.object({scope:t,source:o,taskDefinition:o,enabled:e.boolean(),allowedSplits:e.array(c).min(1).max(4)}).strict();function C(i){return{...i,operationId:crypto.randomUUID(),apiKey:`opk_key_${s(16)}_${s(48)}`}}n(C,"createSourceCredentialRequest");function s(i){let d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r="";for(;r.length<i;)for(let a of crypto.getRandomValues(new Uint8Array(64)))if(a<248&&(r+=d[a%62]),r.length===i)return r;return r}n(s,"randomToken");export{m as a,p as b,x as c,f as d,y as e,h as f,b as g,C as h};
2
+ import{l as o}from"./chunk-4PUOWSDE.js";import{W as c}from"./chunk-ZY32SZ2P.js";import{c as t}from"./chunk-RCT3O3HQ.js";import{A as e}from"./chunk-X2J2P5ZT.js";import{a as n}from"./chunk-FTQLQJQV.js";var m=e.object({id:t,scope:t,sourceId:t,name:e.string().trim().min(1).max(100),keyPrefix:e.string().min(1).max(100),createdAt:e.iso.datetime(),expiresAt:e.iso.datetime(),revokedAt:e.iso.datetime().nullable()}).strict(),p=e.string().regex(/^opk_key_[A-Za-z0-9]{16}_[A-Za-z0-9]{48}$/),x=e.discriminatedUnion("action",[e.object({action:e.literal("create"),scope:t,sourceId:t,name:e.string().trim().min(1).max(100),expiresAt:e.iso.datetime(),operationId:t,apiKey:p}).strict(),e.object({action:e.literal("list"),scope:t,sourceId:t,afterId:t.optional(),limit:e.number().int().min(1).max(100).default(30)}).strict(),e.object({action:e.literal("revoke"),scope:t,sourceId:t,id:t}).strict()]),f=e.object({credential:m,apiKey:p}).strict(),y=e.object({items:e.array(m).max(100),nextCursor:t.nullable()}).strict(),h=e.object({scope:t,sourceId:t}).strict(),b=e.object({scope:t,source:o,taskDefinition:o,enabled:e.boolean(),allowedSplits:e.array(c).min(1).max(4)}).strict();function C(i){return{...i,operationId:crypto.randomUUID(),apiKey:`opk_key_${s(16)}_${s(48)}`}}n(C,"createSourceCredentialRequest");function s(i){let d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r="";for(;r.length<i;)for(let a of crypto.getRandomValues(new Uint8Array(64)))if(a<248&&(r+=d[a%62]),r.length===i)return r;return r}n(s,"randomToken");export{m as a,p as b,x as c,f as d,y as e,h as f,b as g,C as h};