openpond 0.2.58 → 0.2.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (389) hide show
  1. package/README.md +27 -0
  2. package/dist/app-server.d.ts +8 -1
  3. package/dist/app-server.js +1 -1
  4. package/dist/chunks/acp-ARBNMIPT.js +2 -0
  5. package/dist/chunks/acp-agent-53COYDHB.js +21 -0
  6. package/dist/chunks/{actions-command-QU4H53OG.js → actions-command-6YSZ7EJS.js} +1 -1
  7. package/dist/chunks/{app-layer-NSTE5HIT.js → app-layer-TVG7KTW6.js} +1 -1
  8. package/dist/chunks/{app-server-connected-apps-JHGWLBXT.js → app-server-connected-apps-K62M6LCT.js} +1 -1
  9. package/dist/chunks/{app-server-evaluations-K52NAQLP.js → app-server-evaluations-RM6WXX3H.js} +1 -1
  10. package/dist/chunks/app-server-harness-services-RLKMWOQ4.js +2 -0
  11. package/dist/chunks/app-server-runtime-OKMEHNEU.js +2 -0
  12. package/dist/chunks/apps-YWZL2H34.js +2 -0
  13. package/dist/chunks/{chunk-DARVPBZ4.js → chunk-23P2O7PH.js} +1 -1
  14. package/dist/chunks/{chunk-PF5R6CMP.js → chunk-2GICDASL.js} +1 -1
  15. package/dist/chunks/{chunk-6MI4KKWF.js → chunk-2ITZW2CN.js} +1 -1
  16. package/dist/chunks/chunk-2MMCZHKL.js +2 -0
  17. package/dist/chunks/{chunk-ABD5M2D2.js → chunk-2PAJCXFC.js} +1 -1
  18. package/dist/chunks/chunk-2RNCXDJC.js +5 -0
  19. package/dist/chunks/{chunk-APB2STJK.js → chunk-2SUMZ73C.js} +1 -1
  20. package/dist/chunks/{chunk-YOQRYNLP.js → chunk-3CWRTKHY.js} +1 -1
  21. package/dist/chunks/{chunk-TRQQNFMO.js → chunk-44LWH5U6.js} +1 -1
  22. package/dist/chunks/{chunk-HPBQ4VTW.js → chunk-52KIORRX.js} +1 -1
  23. package/dist/chunks/{chunk-NHQ36THU.js → chunk-5RHYSQZ5.js} +1 -1
  24. package/dist/chunks/{chunk-3QIB5FXI.js → chunk-5ZBLCWEJ.js} +1 -1
  25. package/dist/chunks/{chunk-FTEOCCPB.js → chunk-637UACKH.js} +1 -1
  26. package/dist/chunks/chunk-655DQ6AX.js +145 -0
  27. package/dist/chunks/{chunk-N4FFQPLR.js → chunk-6GWOVHIG.js} +1 -1
  28. package/dist/chunks/chunk-6HQB3MQO.js +2 -0
  29. package/dist/chunks/{chunk-UKMA4R6X.js → chunk-7LZISGTA.js} +2 -2
  30. package/dist/chunks/{chunk-A6USMRWK.js → chunk-7RC5WPVT.js} +1 -1
  31. package/dist/chunks/{chunk-H6IW2R22.js → chunk-7YTHEMWI.js} +1 -1
  32. package/dist/chunks/{chunk-PCSIOUHF.js → chunk-A3L74U3W.js} +1 -1
  33. package/dist/chunks/{chunk-25MBPJVY.js → chunk-A66CSUBJ.js} +1 -1
  34. package/dist/chunks/{chunk-OUVIWDL2.js → chunk-AGVOGPAZ.js} +1 -1
  35. package/dist/chunks/{chunk-M4JWQSV7.js → chunk-AW5Q6NXT.js} +1 -1
  36. package/dist/chunks/{chunk-RWWE5OXU.js → chunk-B46HZ3MX.js} +1 -1
  37. package/dist/chunks/{chunk-KGNCKIFP.js → chunk-BIPQCJ5V.js} +1 -1
  38. package/dist/chunks/{chunk-HCYX6RHP.js → chunk-BIQ33JV5.js} +1 -1
  39. package/dist/chunks/{chunk-JFXWI3EN.js → chunk-BK63OQRW.js} +1 -1
  40. package/dist/chunks/{chunk-2D4Y3HNW.js → chunk-CFSIU6CW.js} +1 -1
  41. package/dist/chunks/{chunk-EIEZHFIW.js → chunk-D3RRUWNN.js} +1 -1
  42. package/dist/chunks/{chunk-X4OSOOSU.js → chunk-D4UX2O45.js} +1 -1
  43. package/dist/chunks/{chunk-GJ2ZJFDD.js → chunk-DG4TYVPF.js} +1 -1
  44. package/dist/chunks/{chunk-QIKWJ2AA.js → chunk-DGIEXZJV.js} +1 -1
  45. package/dist/chunks/{chunk-PRGBLQVH.js → chunk-DIGX56JY.js} +1 -1
  46. package/dist/chunks/{chunk-JYKRR7E5.js → chunk-DISNCX6R.js} +1 -1
  47. package/dist/chunks/{chunk-773TH7FN.js → chunk-DK7IKI7O.js} +1 -1
  48. package/dist/chunks/{chunk-74IIXVAE.js → chunk-DX7YEUNQ.js} +1 -1
  49. package/dist/chunks/{chunk-523TE4BI.js → chunk-E63VWAQA.js} +1 -1
  50. package/dist/chunks/{chunk-5MCNZCVQ.js → chunk-EL454L26.js} +1 -1
  51. package/dist/chunks/{chunk-OS3LO5J3.js → chunk-ENSB6ZTM.js} +1 -1
  52. package/dist/chunks/{chunk-EAPFMACH.js → chunk-ERJV5BMC.js} +1 -1
  53. package/dist/chunks/{chunk-RNIAFXMB.js → chunk-EXJGCNRS.js} +1 -1
  54. package/dist/chunks/chunk-F5KCCDQM.js +2 -0
  55. package/dist/chunks/chunk-FSQWAANK.js +3 -0
  56. package/dist/chunks/{chunk-Z54O534A.js → chunk-G5B3PB5X.js} +1 -1
  57. package/dist/chunks/{chunk-4D7HWVWD.js → chunk-GAWGIJQG.js} +1 -1
  58. package/dist/chunks/{chunk-IIZ4CWBX.js → chunk-GGGF5NHJ.js} +1 -1
  59. package/dist/chunks/{chunk-APB4O67E.js → chunk-GOYBYYPQ.js} +1 -1
  60. package/dist/chunks/{chunk-XDQMGUWL.js → chunk-H3BSIAQO.js} +1 -1
  61. package/dist/chunks/{chunk-EYPCBBMS.js → chunk-HCEJAOIF.js} +1 -1
  62. package/dist/chunks/{chunk-OPNRWESL.js → chunk-IFQCOSU6.js} +1 -1
  63. package/dist/chunks/chunk-IJHZBHEK.js +9 -0
  64. package/dist/chunks/{chunk-RAXOSUSW.js → chunk-ISFIDCIH.js} +1 -1
  65. package/dist/chunks/{chunk-OLLLZVHF.js → chunk-ITKTILKI.js} +1 -1
  66. package/dist/chunks/{chunk-D74JEERO.js → chunk-IUBARBGI.js} +1 -1
  67. package/dist/chunks/{chunk-O72BSKSO.js → chunk-J24I74EM.js} +1 -1
  68. package/dist/chunks/{chunk-H4QHIHMK.js → chunk-J7QGHA7G.js} +3 -3
  69. package/dist/chunks/chunk-JFXINDOQ.js +3 -0
  70. package/dist/chunks/{chunk-HIOKCIL7.js → chunk-JGWINTT5.js} +1 -1
  71. package/dist/chunks/{chunk-Q2QL6UWN.js → chunk-JHEFWB6O.js} +1 -1
  72. package/dist/chunks/{chunk-QNG27G3T.js → chunk-JHMS2WXM.js} +2 -2
  73. package/dist/chunks/{chunk-PSGGOZFM.js → chunk-JHR3LF2F.js} +1 -1
  74. package/dist/chunks/{chunk-JE7RJZOA.js → chunk-KGLJU66U.js} +3 -3
  75. package/dist/chunks/{chunk-XEOEKFG6.js → chunk-KJFRCVQC.js} +1 -1
  76. package/dist/chunks/chunk-KNO355LC.js +2 -0
  77. package/dist/chunks/{chunk-ZGTOK7ZK.js → chunk-LD7PGREF.js} +2 -2
  78. package/dist/chunks/{chunk-I7AQMAQI.js → chunk-LHA7RQBA.js} +6 -6
  79. package/dist/chunks/{chunk-6QSSIT62.js → chunk-LO3O45IX.js} +1 -1
  80. package/dist/chunks/{chunk-G3RXYI2L.js → chunk-M2SKXY5C.js} +2 -2
  81. package/dist/chunks/{chunk-2IHO4GDJ.js → chunk-M3ZQDPRS.js} +1 -1
  82. package/dist/chunks/{chunk-JDEEWOD7.js → chunk-M4ZF44H5.js} +1 -1
  83. package/dist/chunks/{chunk-Y4OWBBDD.js → chunk-M55H7KVR.js} +1 -1
  84. package/dist/chunks/{chunk-JAJ46T5X.js → chunk-MGKMIRYG.js} +1 -1
  85. package/dist/chunks/{chunk-4EQA2M7K.js → chunk-MJGU2JJ2.js} +2 -2
  86. package/dist/chunks/{chunk-65PL62KH.js → chunk-MS37ISA4.js} +2 -2
  87. package/dist/chunks/{chunk-NH6UUX5S.js → chunk-NCKXI2VB.js} +11 -11
  88. package/dist/chunks/chunk-NHUUCNAD.js +2 -0
  89. package/dist/chunks/{chunk-O6ULLQJ6.js → chunk-O3VP46SE.js} +1 -1
  90. package/dist/chunks/chunk-O4FBOUNX.js +2 -0
  91. package/dist/chunks/chunk-O6IFVTZT.js +9 -0
  92. package/dist/chunks/{chunk-5IPFI25K.js → chunk-O7B44IYN.js} +1 -1
  93. package/dist/chunks/{chunk-DMVD2RFZ.js → chunk-OGMDEA3Y.js} +1 -1
  94. package/dist/chunks/{chunk-BLXEAZCQ.js → chunk-OKBIWRHC.js} +1 -1
  95. package/dist/chunks/{chunk-FFRFSDBM.js → chunk-ON2RNOCG.js} +1 -1
  96. package/dist/chunks/{chunk-LQQNBVEB.js → chunk-ONDCV5QC.js} +1 -1
  97. package/dist/chunks/{chunk-UCPGRPWY.js → chunk-OQ4VGCRG.js} +1 -1
  98. package/dist/chunks/{chunk-YNH3NMPF.js → chunk-OWK7HU5I.js} +1 -1
  99. package/dist/chunks/{chunk-DBK66CJP.js → chunk-OY5HC2P6.js} +1 -1
  100. package/dist/chunks/{chunk-T5AACNJI.js → chunk-P7HRF4FM.js} +1 -1
  101. package/dist/chunks/{chunk-7ED24PP6.js → chunk-PCNLC5H3.js} +1 -1
  102. package/dist/chunks/{chunk-ES2ISFJC.js → chunk-PF56N7ZY.js} +1 -1
  103. package/dist/chunks/{chunk-VVCKLCF3.js → chunk-PKALOVHC.js} +2 -2
  104. package/dist/chunks/{chunk-ZCHXGRRU.js → chunk-PR5TYTY4.js} +1 -1
  105. package/dist/chunks/{chunk-Q4TBTRIG.js → chunk-PWK5Z5S3.js} +1 -1
  106. package/dist/chunks/chunk-PXS4SVQG.js +16 -0
  107. package/dist/chunks/{chunk-AY64VY4E.js → chunk-QGOPYQW3.js} +1 -1
  108. package/dist/chunks/{chunk-7E6T7GP5.js → chunk-R7YEURUQ.js} +1 -1
  109. package/dist/chunks/{chunk-ACYFMLWG.js → chunk-RCA6NGVA.js} +2 -2
  110. package/dist/chunks/{chunk-DUURYZOI.js → chunk-RG3NH6YQ.js} +1 -1
  111. package/dist/chunks/{chunk-7SC46OFC.js → chunk-RJIUOLWY.js} +1 -1
  112. package/dist/chunks/{chunk-F4KOGISR.js → chunk-RXE3FYMJ.js} +1 -1
  113. package/dist/chunks/chunk-RYGWCN2R.js +2 -0
  114. package/dist/chunks/{chunk-VYLGI3IH.js → chunk-SFNCAPCJ.js} +1 -1
  115. package/dist/chunks/{chunk-Z4Z5UOZM.js → chunk-SG6JZ7HD.js} +1 -1
  116. package/dist/chunks/{chunk-XX6SMFDY.js → chunk-SKRNWRKV.js} +5 -5
  117. package/dist/chunks/{chunk-ZRDGQDZL.js → chunk-SLZH4Z6C.js} +1 -1
  118. package/dist/chunks/{chunk-WN3V6KDN.js → chunk-SPDSSMFD.js} +1 -1
  119. package/dist/chunks/chunk-STWRTNRK.js +2 -0
  120. package/dist/chunks/{chunk-HZEIRHEB.js → chunk-T5J7HIHR.js} +1 -1
  121. package/dist/chunks/{chunk-ROGF26KV.js → chunk-TBUAQWFS.js} +1 -1
  122. package/dist/chunks/{chunk-ZUJ3XUCP.js → chunk-TEPRCBDV.js} +1 -1
  123. package/dist/chunks/{chunk-HDGTHRY7.js → chunk-TOFMA2L5.js} +2 -2
  124. package/dist/chunks/{chunk-QOGJAQDO.js → chunk-UFHLLSCE.js} +1 -1
  125. package/dist/chunks/{chunk-TTVS6JMC.js → chunk-UJKQLO6B.js} +2 -2
  126. package/dist/chunks/{chunk-OQKJGTTO.js → chunk-UZQNFTLR.js} +1 -1
  127. package/dist/chunks/{chunk-F74GBN6K.js → chunk-V2HMWCT6.js} +1 -1
  128. package/dist/chunks/{chunk-6ZFPQYHG.js → chunk-V4KT5FCJ.js} +1 -1
  129. package/dist/chunks/{chunk-TVQAPBLZ.js → chunk-VHSX3JPX.js} +1 -1
  130. package/dist/chunks/{chunk-SDXFLO7J.js → chunk-W2SXOGTQ.js} +1 -1
  131. package/dist/chunks/{chunk-FUOEIDMA.js → chunk-WDEO44UN.js} +1 -1
  132. package/dist/chunks/{chunk-4NESNOK5.js → chunk-WEHBK3MC.js} +1 -1
  133. package/dist/chunks/{chunk-4EPSHPZL.js → chunk-WGX7WY4N.js} +1 -1
  134. package/dist/chunks/{chunk-NC27T4AB.js → chunk-WHREO7A2.js} +1 -1
  135. package/dist/chunks/{chunk-RNQF63ZR.js → chunk-WS2ZZBAQ.js} +4 -4
  136. package/dist/chunks/{chunk-DIO5CB6U.js → chunk-WYZWDMMF.js} +1 -1
  137. package/dist/chunks/{chunk-MQULU465.js → chunk-XO3H32KX.js} +1 -1
  138. package/dist/chunks/{chunk-EIRYMSEG.js → chunk-XQBIHPPX.js} +1 -1
  139. package/dist/chunks/chunk-XRKFTPHD.js +2 -0
  140. package/dist/chunks/{chunk-B7RFL4N2.js → chunk-XSCIOQYE.js} +1 -1
  141. package/dist/chunks/{chunk-TJ6GVTYB.js → chunk-XTWEWYK7.js} +9 -9
  142. package/dist/chunks/{chunk-JUHZ5S3R.js → chunk-Y3GIM6WK.js} +1 -1
  143. package/dist/chunks/{chunk-74ZXXBGN.js → chunk-Y54RKLOI.js} +1 -1
  144. package/dist/chunks/{chunk-SWUEFLOH.js → chunk-Y777GISF.js} +1 -1
  145. package/dist/chunks/{chunk-EKM2D7JU.js → chunk-YDU3S6UT.js} +1 -1
  146. package/dist/chunks/{chunk-UGL7WF3W.js → chunk-YOZIZYSC.js} +1 -1
  147. package/dist/chunks/{chunk-OSIO7PLX.js → chunk-YQKOB56U.js} +1 -1
  148. package/dist/chunks/chunk-YVNDDNMK.js +3 -0
  149. package/dist/chunks/chunk-ZAZKJJOT.js +86 -0
  150. package/dist/chunks/{chunk-QL4OIPEZ.js → chunk-ZR7LIMJS.js} +2 -2
  151. package/dist/chunks/{chunk-L3KCP52O.js → chunk-ZTJOOY2F.js} +1 -1
  152. package/dist/chunks/{chunk-GPVCOEUH.js → chunk-ZTVXRZ6D.js} +1 -1
  153. package/dist/chunks/cli-CNYNXKGQ.js +2 -0
  154. package/dist/chunks/configuration-command-5K7EE2J5.js +2 -0
  155. package/dist/chunks/connected-app-executor-E25XCNAS.js +2 -0
  156. package/dist/chunks/connected-evidence-QNSO5BTF.js +2 -0
  157. package/dist/chunks/connection-Y2KCMBYD.js +2 -0
  158. package/dist/chunks/{continual-6CQAMTTR.js → continual-SOO3QBNQ.js} +1 -1
  159. package/dist/chunks/core-commands-ZTWPYAFQ.js +2 -0
  160. package/dist/chunks/datasets-XPUMWGOC.js +2 -0
  161. package/dist/chunks/desktop-test-HVSW4JHY.js +3 -0
  162. package/dist/chunks/dist-4N6AHWNN.js +2 -0
  163. package/dist/chunks/{dist-OMGUJYPD.js → dist-N6R6VNFD.js} +1 -1
  164. package/dist/chunks/{dist-VYC5VMQB.js → dist-QN7WKZ2D.js} +1 -1
  165. package/dist/chunks/{enclave-QS4BUNDU.js → enclave-VURYNILU.js} +1 -1
  166. package/dist/chunks/evaluation-coordination-AOTFPVMS.js +2 -0
  167. package/dist/chunks/experiment-improvements-75CN3VI7.js +2 -0
  168. package/dist/chunks/experiments-AGAHM2AK.js +2 -0
  169. package/dist/chunks/{experiments-VFQGE4HC.js → experiments-DYSHYBGB.js} +1 -1
  170. package/dist/chunks/{extension-XKXXOP5N.js → extension-UT4CSDJF.js} +1 -1
  171. package/dist/chunks/help-KU52CFMW.js +8 -0
  172. package/dist/chunks/host-profile-evaluation-tools-LZDMQCMT.js +2 -0
  173. package/dist/chunks/host-profile-external-dataset-VK3NJHMC.js +2 -0
  174. package/dist/chunks/hosted-app-server-composition-P7V7K7CG.js +2 -0
  175. package/dist/chunks/{hosted-experiment-improvement-HVMDGS75.js → hosted-experiment-improvement-P433KDX2.js} +1 -1
  176. package/dist/chunks/hosted-harness-runtime-Y4DONWPC.js +2 -0
  177. package/dist/chunks/{hosted-profile-candidate-EXNN6MVN.js → hosted-profile-candidate-72MMPN6U.js} +1 -1
  178. package/dist/chunks/hosted-profile-compiler-RXHLK224.js +2 -0
  179. package/dist/chunks/hosted-profile-evaluation-control-LS4DCSDO.js +2 -0
  180. package/dist/chunks/{hosted-profile-evaluation-inspection-ZUANDYZ6.js → hosted-profile-evaluation-inspection-3Q6EHO66.js} +1 -1
  181. package/dist/chunks/{hosted-profile-evaluation-preparation-ORVZ6MBD.js → hosted-profile-evaluation-preparation-ZD27HNLF.js} +1 -1
  182. package/dist/chunks/{hosted-tasksets-ANAE2PIW.js → hosted-tasksets-V2PQZJN4.js} +1 -1
  183. package/dist/chunks/human-review-4FJFINQX.js +2 -0
  184. package/dist/chunks/import-GBHSLA3G.js +3 -0
  185. package/dist/chunks/{learning-ACEVFL5M.js → learning-U3FZL5YB.js} +1 -1
  186. package/dist/chunks/local-harness-improvement-runtime-UP2P7UT4.js +2 -0
  187. package/dist/chunks/local-harness-taskset-review-ZNOKSPJJ.js +2 -0
  188. package/dist/chunks/{local-scope-HVF2GZ5W.js → local-scope-62GWHDXS.js} +1 -1
  189. package/dist/chunks/{model-projects-QPO22JPA.js → model-projects-LQ4C6R3X.js} +1 -1
  190. package/dist/chunks/opchat-Q4PIWPYW.js +3 -0
  191. package/dist/chunks/organizations-TEH6HBQ3.js +2 -0
  192. package/dist/chunks/{profile-TFZMUEDR.js → profile-SWPVCGTR.js} +1 -1
  193. package/dist/chunks/{profile-training-source-6GOT7AHM.js → profile-training-source-J73ZLNSC.js} +1 -1
  194. package/dist/chunks/project-action-payload-OU3ZPHW7.js +2 -0
  195. package/dist/chunks/project-agent-J7ILCRBS.js +2 -0
  196. package/dist/chunks/{published-experiment-source-HVP5IGRH.js → published-experiment-source-HVHKSYDL.js} +1 -1
  197. package/dist/chunks/refiner-profile-service-E7YU4E3N.js +2 -0
  198. package/dist/chunks/{runtime-A7OZXM43.js → runtime-LIPHPKKJ.js} +2 -2
  199. package/dist/chunks/sandbox-command-G6KID3OP.js +2 -0
  200. package/dist/chunks/{sandbox-template-C4V6T36U.js → sandbox-template-MZTMAUFS.js} +1 -1
  201. package/dist/chunks/saved-work-LOUWLF37.js +2 -0
  202. package/dist/chunks/{send-turn-XTAIS2JN.js → send-turn-UEUEGY5W.js} +1 -1
  203. package/dist/chunks/{src-R36AGJY7.js → src-7WMZOWZZ.js} +107 -100
  204. package/dist/chunks/{src-DZL5T2MT.js → src-MVAK6D6Y.js} +1 -1
  205. package/dist/chunks/standalone-experiment-turn-owner-YRKEOEJ2.js +2 -0
  206. package/dist/chunks/{store-continual-support-reviews-LJPNG4SP.js → store-continual-support-reviews-FJLLNKCY.js} +1 -1
  207. package/dist/chunks/{store-conversation-serving-KPC62UEY.js → store-conversation-serving-4KWR4IZY.js} +1 -1
  208. package/dist/chunks/{store-create-improve-SW5FTBTL.js → store-create-improve-JWBJZRAU.js} +1 -1
  209. package/dist/chunks/{store-datasets-WMA7AJKN.js → store-datasets-4N2M6Y3K.js} +2 -2
  210. package/dist/chunks/{store-evaluation-results-ZO6R653G.js → store-evaluation-results-OBM4623U.js} +1 -1
  211. package/dist/chunks/{store-harness-memory-VINCZ4GK.js → store-harness-memory-4HUEMRCD.js} +1 -1
  212. package/dist/chunks/{store-harness-refinement-candidates-EA5KFQPH.js → store-harness-refinement-candidates-NMRWMN23.js} +1 -1
  213. package/dist/chunks/store-harness-workspaces-BGONIQDY.js +2 -0
  214. package/dist/chunks/{store-human-review-7QQ7ZQ6P.js → store-human-review-J75SIZAL.js} +1 -1
  215. package/dist/chunks/store-learned-preference-migration-validation-VLASM4CT.js +2 -0
  216. package/dist/chunks/store-learning-TUCQFBLT.js +2 -0
  217. package/dist/chunks/{store-learning-credentials-WZQJ4HPJ.js → store-learning-credentials-S4RF57NV.js} +1 -1
  218. package/dist/chunks/{store-local-experiments-SAULQSBN.js → store-local-experiments-LULRLTII.js} +5 -5
  219. package/dist/chunks/{store-model-batch-review-VKLDYGH3.js → store-model-batch-review-SVL4MT6D.js} +1 -1
  220. package/dist/chunks/{store-model-configuration-BYRJUR3C.js → store-model-configuration-ZHDSM3XM.js} +2 -2
  221. package/dist/chunks/{store-preference-comparison-LV32MHVL.js → store-preference-comparison-YMMCKXS5.js} +1 -1
  222. package/dist/chunks/{store-schedules-VGTEQVKH.js → store-schedules-6Z4QS3NU.js} +1 -1
  223. package/dist/chunks/{store-sidebar-file-bookmarks-VB5GTLFY.js → store-sidebar-file-bookmarks-MX6EP6OB.js} +2 -2
  224. package/dist/chunks/{store-sidebar-preferences-GWIOG2NH.js → store-sidebar-preferences-VYREPW26.js} +1 -1
  225. package/dist/chunks/{store-subagents-T7R2Z6TB.js → store-subagents-WGBCRALX.js} +1 -1
  226. package/dist/chunks/{store-task-inbox-QPE44OSS.js → store-task-inbox-43BNZSB7.js} +6 -6
  227. package/dist/chunks/{store-task-inventory-I3RDRI52.js → store-task-inventory-AEW4POAJ.js} +2 -2
  228. package/dist/chunks/{store-taskset-drafts-2IULRV2W.js → store-taskset-drafts-DKFO2CYB.js} +1 -1
  229. package/dist/chunks/{store-training-B2TW2MLA.js → store-training-6PFFR6ST.js} +1 -1
  230. package/dist/chunks/{store-training-jobs-VBNG23RL.js → store-training-jobs-ANDEBQ67.js} +2 -2
  231. package/dist/chunks/{store-training-models-OMV5FIC4.js → store-training-models-OOI4ZJPX.js} +2 -2
  232. package/dist/chunks/{store-usage-IE2U2FD3.js → store-usage-U72RNW64.js} +1 -1
  233. package/dist/chunks/{store-work-evidence-QQDKM5AQ.js → store-work-evidence-NY5OBATB.js} +1 -1
  234. package/dist/chunks/{taskset-EQRFQBYM.js → taskset-SL3YOXW7.js} +1 -1
  235. package/dist/chunks/{taskset-packages-XC6HEE3K.js → taskset-packages-3PCEYYDA.js} +1 -1
  236. package/dist/chunks/{teams-bot-EAPGPTHZ.js → teams-bot-IDEF3BMI.js} +1 -1
  237. package/dist/chunks/{training-UF6RPI4T.js → training-57ISIC7U.js} +1 -1
  238. package/dist/chunks/web-search-222Y63QW.js +2 -0
  239. package/dist/chunks/{workspaces-EKKE5NAC.js → workspaces-5DF4H5EX.js} +1 -1
  240. package/dist/cli.js +1 -1
  241. package/dist/index.js +1 -1
  242. package/dist/sandbox-template/manifest.js +1 -1
  243. package/dist/web/assets/{App-CaRMZoxo.css → App-DbYvV_W6.css} +1 -1
  244. package/dist/web/assets/App-nzE7JU_O.js +154 -0
  245. package/dist/web/assets/{AppDialog-t2Fx5tK3.js → AppDialog-VtNvqbDm.js} +1 -1
  246. package/dist/web/assets/{AppTerminalPanel-Dj1Y32oI.js → AppTerminalPanel-BMfKdrrN.js} +2 -2
  247. package/dist/web/assets/AppsView-CdWyrDEb.js +1 -0
  248. package/dist/web/assets/{BrowserSidebar-jhWi4rVm.js → BrowserSidebar-CtOIciOa.js} +1 -1
  249. package/dist/web/assets/{CartesianChart-C1DIx0Ia.js → CartesianChart-u1lvLM30.js} +1 -1
  250. package/dist/web/assets/{CollaborationTabs-Bdr-HmOL.js → CollaborationTabs-CaBfDYRW.js} +1 -1
  251. package/dist/web/assets/{CommandMenu-Ux2yOHAc.js → CommandMenu-CFW3WJ11.js} +1 -1
  252. package/dist/web/assets/{CommunityView-DPEeVKFn.js → CommunityView-D2EjaeuH.js} +1 -1
  253. package/dist/web/assets/ComposerCreateImproveStrip-6wYSJdzv.js +1 -0
  254. package/dist/web/assets/ConversationImportsSettings-BJ4QhF7p.js +1 -0
  255. package/dist/web/assets/ConversationImportsSettings-PfUa8V7X.css +1 -0
  256. package/dist/web/assets/{GetStartedView-CFHP0AaI.js → GetStartedView-DBcOwIJn.js} +1 -1
  257. package/dist/web/assets/{HostedModelLearningReview-D8BGTPVN.js → HostedModelLearningReview-BNpK6_W9.js} +1 -1
  258. package/dist/web/assets/{HostedModelLearningSettings-JS1S7vNO.js → HostedModelLearningSettings-SrsdeeoA.js} +1 -1
  259. package/dist/web/assets/{LabModelVersionDetailPage-Dx5Q3xV2.js → LabModelVersionDetailPage-Cd6bRHt9.js} +1 -1
  260. package/dist/web/assets/LabSkillSidebar-CQfvel4w.js +1 -0
  261. package/dist/web/assets/{LabsRoute-CyYF8-dw.js → LabsRoute-sXLJt1KR.js} +4 -4
  262. package/dist/web/assets/MainChatThread-dlDDK2JM.js +2 -0
  263. package/dist/web/assets/MainPane-DCz38-qy.js +65 -0
  264. package/dist/web/assets/{MarkdownText-BR4V6lNO.js → MarkdownText-Drjq6-JM.js} +1 -1
  265. package/dist/web/assets/{NativeSkillSidebar-DU9IEgIO.js → NativeSkillSidebar-jncZijt-.js} +1 -1
  266. package/dist/web/assets/{NewExperienceSwitcher-mIy6FzCj.js → NewExperienceSwitcher-DXKzoMaM.js} +1 -1
  267. package/dist/web/assets/{NewProjectDialog-RfTZTHxl.js → NewProjectDialog-DIyjAxJG.js} +1 -1
  268. package/dist/web/assets/OutputsPage-Dy1cNr3n.js +1 -0
  269. package/dist/web/assets/{ProjectsPage-CE6QUB-b.js → ProjectsPage-D2EeybIv.js} +1 -1
  270. package/dist/web/assets/RightChatPanelStack-4wUL-W9_.js +1 -0
  271. package/dist/web/assets/{RightSidebarHomePanel-CK0rP3WT.js → RightSidebarHomePanel-Bd_AHUp8.js} +1 -1
  272. package/dist/web/assets/{ScheduledWorkPage-vOrYv8pp.js → ScheduledWorkPage-BJkSzwz2.js} +1 -1
  273. package/dist/web/assets/{SettingsView-DCKVrfjj.js → SettingsView-BhcP72KH.js} +4 -4
  274. package/dist/web/assets/SettingsView-DjjnCnlb.css +1 -0
  275. package/dist/web/assets/{TeamChatView-Bwrjr-vk.js → TeamChatView-CR0fdicZ.js} +2 -2
  276. package/dist/web/assets/{TerminalOverlay-DhPoKZAq.js → TerminalOverlay-DGrZRZ_3.js} +10 -10
  277. package/dist/web/assets/TrainingCreationPanel-BsTG7aFS.js +1 -0
  278. package/dist/web/assets/{TrainingDraftPanel-C9cRX5qf.js → TrainingDraftPanel-ByErrht7.js} +1 -1
  279. package/dist/web/assets/{UsageSettingsSection-CrdcSGeW.js → UsageSettingsSection-DeYTJbcM.js} +1 -1
  280. package/dist/web/assets/{WorkSidebarPanel-DSSikNFQ.js → WorkSidebarPanel-DcNvEEoy.js} +1 -1
  281. package/dist/web/assets/{WorkspaceDiffPanel-BAFo0CPN.js → WorkspaceDiffPanel-CdPRcYWN.js} +3 -3
  282. package/dist/web/assets/{WorkspaceEnvironmentMenu-BVHAhwnJ.js → WorkspaceEnvironmentMenu-xUYg-iGn.js} +18 -18
  283. package/dist/web/assets/{WorkspaceGitDialogs-CwVoiDQ2.js → WorkspaceGitDialogs-CBViLL3S.js} +1 -1
  284. package/dist/web/assets/{WorkspaceMonacoEditor-TxLyhzNp.js → WorkspaceMonacoEditor-frxie2_S.js} +3 -3
  285. package/dist/web/assets/agent-connections-D7ao-vbU.js +1 -0
  286. package/dist/web/assets/{arrow-up-right-C9aE8Mfz.js → arrow-up-right-DCWPxdbD.js} +1 -1
  287. package/dist/web/assets/{chunk-P3BRSSRD-DUGfuKA8.js → chunk-P3BRSSRD-B5JXa0Nh.js} +1 -1
  288. package/dist/web/assets/{clipboard-Dk158Qp4.js → clipboard-B-GnMVLp.js} +1 -1
  289. package/dist/web/assets/{cloud-upload-k9eqBsHr.js → cloud-upload-DpaGFZ9J.js} +1 -1
  290. package/dist/web/assets/{cssMode-CO35ARZp.js → cssMode-DJHE7R3W.js} +1 -1
  291. package/dist/web/assets/{folder-open-sYgceW_f.js → folder-open-B-DFLDFH.js} +1 -1
  292. package/dist/web/assets/{folder-plus-CS0R49m9.js → folder-plus-CPXxPvSH.js} +1 -1
  293. package/dist/web/assets/{git-commit-horizontal-DrGxH2h4.js → git-commit-horizontal-DCTzcivA.js} +1 -1
  294. package/dist/web/assets/{htmlMode-REMmzdfq.js → htmlMode-DxZVBAYd.js} +1 -1
  295. package/dist/web/assets/index-BojtIRzO.css +1 -0
  296. package/dist/web/assets/{index-C8aCGagb.js → index-Di1MU6Xr.js} +2 -2
  297. package/dist/web/assets/{info-DLdbiUrh.js → info-BMxsR_bn.js} +1 -1
  298. package/dist/web/assets/{jsonMode-KEdMfkIf.js → jsonMode-CzWoMkpp.js} +1 -1
  299. package/dist/web/assets/{lspLanguageFeatures-5KZwEoxW.js → lspLanguageFeatures-15K7ND6Q.js} +1 -1
  300. package/dist/web/assets/{minimize-2-CqcI4zcM.js → minimize-2-DwUgqXoR.js} +1 -1
  301. package/dist/web/assets/{monaco.contribution-Cly9Wt7L.js → monaco.contribution-BBLKjER5.js} +2 -2
  302. package/dist/web/assets/{monaco.contribution-omszXBEj.js → monaco.contribution-DBjvSu8p.js} +2 -2
  303. package/dist/web/assets/{monaco.contribution-DO10L0zW.js → monaco.contribution-DUWvjhIG.js} +2 -2
  304. package/dist/web/assets/{monaco.contribution-BJGj65F9.js → monaco.contribution-w0zfkYLX.js} +2 -2
  305. package/dist/web/assets/{monitor-BFVCcbxp.js → monitor-Ihu5LVYx.js} +1 -1
  306. package/dist/web/assets/{play-C469pVZq.js → play-D_YGCdxU.js} +1 -1
  307. package/dist/web/assets/{python-Dw0YcVy9.js → python-Q4OuoXYc.js} +1 -1
  308. package/dist/web/assets/{save-CtSjPydi.js → save-DJYUOhtD.js} +1 -1
  309. package/dist/web/assets/{square-BuImvLhT.js → square-DXtoCBNw.js} +1 -1
  310. package/dist/web/assets/{toggleHighContrast-DjCO9lIP.js → toggleHighContrast-CaNeuWVE.js} +1 -1
  311. package/dist/web/assets/{tsMode-BAOnxKd6.js → tsMode-CJnQ2wmM.js} +1 -1
  312. package/dist/web/assets/{upload-2JkFZo3h.js → upload-fCP3_OEO.js} +1 -1
  313. package/dist/web/assets/{useLocalAgentSchedules-BNqAisfS.js → useLocalAgentSchedules-BFoH_gwZ.js} +1 -1
  314. package/dist/web/assets/useProviderSettings-2eysgqiA.js +5 -0
  315. package/dist/web/assets/{useProviderSettings-CmL_BaxP.css → useProviderSettings-Cktvzinz.css} +1 -1
  316. package/dist/web/assets/{useSessionTurnCache-BHU2-Jmz.js → useSessionTurnCache-DLF5SPD-.js} +1 -1
  317. package/dist/web/assets/{wifi-off-CpOAH62M.js → wifi-off-DZoiFrRz.js} +1 -1
  318. package/dist/web/assets/{workers-0QvlA2T5.js → workers-D5nr74M-.js} +1 -1
  319. package/dist/web/assets/{yaml-BK3qxo7D.js → yaml-CwsoTJmk.js} +1 -1
  320. package/dist/web/index.html +2 -2
  321. package/docs/command-reference.md +22 -3
  322. package/docs/conversation-imports.md +57 -0
  323. package/package.json +1 -1
  324. package/dist/chunks/app-server-harness-services-QMUOEYOA.js +0 -2
  325. package/dist/chunks/app-server-runtime-ISGGLQHU.js +0 -2
  326. package/dist/chunks/apps-BKTOR4F7.js +0 -2
  327. package/dist/chunks/chunk-3VUATFZD.js +0 -2
  328. package/dist/chunks/chunk-3Z47M3YY.js +0 -2
  329. package/dist/chunks/chunk-6UDGARFC.js +0 -143
  330. package/dist/chunks/chunk-FV2R5RUN.js +0 -3
  331. package/dist/chunks/chunk-HY3GOBFJ.js +0 -58
  332. package/dist/chunks/chunk-I3HZKJB3.js +0 -2
  333. package/dist/chunks/chunk-I3VVWNUW.js +0 -5
  334. package/dist/chunks/chunk-KG325WTN.js +0 -2
  335. package/dist/chunks/chunk-Q5LEXXJG.js +0 -16
  336. package/dist/chunks/chunk-QDC4OW3S.js +0 -2
  337. package/dist/chunks/chunk-SDAUS5PY.js +0 -2
  338. package/dist/chunks/chunk-VRIEKBBH.js +0 -9
  339. package/dist/chunks/chunk-WJ43MJ3F.js +0 -2
  340. package/dist/chunks/chunk-X2HIHF2I.js +0 -2
  341. package/dist/chunks/chunk-YBT2NB32.js +0 -2
  342. package/dist/chunks/chunk-ZTNHW2K7.js +0 -10
  343. package/dist/chunks/cli-XZENDZ7Z.js +0 -2
  344. package/dist/chunks/configuration-command-6C5UO7GE.js +0 -2
  345. package/dist/chunks/connected-app-executor-LQNIU5NR.js +0 -2
  346. package/dist/chunks/connected-evidence-GH2ATNEX.js +0 -2
  347. package/dist/chunks/connection-HTF6CC7M.js +0 -2
  348. package/dist/chunks/core-commands-A2DGGIPS.js +0 -2
  349. package/dist/chunks/datasets-7BNMVJOY.js +0 -2
  350. package/dist/chunks/desktop-test-3CUHVLXV.js +0 -3
  351. package/dist/chunks/dist-ZVJPJLXR.js +0 -2
  352. package/dist/chunks/evaluation-coordination-XEF5L7KZ.js +0 -2
  353. package/dist/chunks/experiment-improvements-KRX2DP27.js +0 -2
  354. package/dist/chunks/experiments-DFGQYA4O.js +0 -2
  355. package/dist/chunks/help-S7THC6IE.js +0 -8
  356. package/dist/chunks/host-profile-evaluation-tools-JOFBL5OF.js +0 -2
  357. package/dist/chunks/host-profile-external-dataset-K3ICDHIP.js +0 -2
  358. package/dist/chunks/hosted-app-server-composition-T5IWGOTA.js +0 -2
  359. package/dist/chunks/hosted-harness-runtime-YCKB6NBI.js +0 -2
  360. package/dist/chunks/hosted-profile-compiler-IYLLHCRY.js +0 -2
  361. package/dist/chunks/hosted-profile-evaluation-control-TJVER3NW.js +0 -2
  362. package/dist/chunks/human-review-WR777ODH.js +0 -2
  363. package/dist/chunks/import-MLZUHITH.js +0 -4
  364. package/dist/chunks/local-harness-improvement-runtime-QRFGPFRM.js +0 -2
  365. package/dist/chunks/local-harness-taskset-review-HR7KLY4B.js +0 -2
  366. package/dist/chunks/opchat-T4QTNEIY.js +0 -3
  367. package/dist/chunks/organizations-75L5DZDV.js +0 -2
  368. package/dist/chunks/project-action-payload-JDS6OQAW.js +0 -2
  369. package/dist/chunks/project-agent-6RRO233B.js +0 -2
  370. package/dist/chunks/refiner-profile-service-FDTQKY33.js +0 -2
  371. package/dist/chunks/sandbox-command-IU5XFTJP.js +0 -2
  372. package/dist/chunks/saved-work-SHEEDZ6Z.js +0 -2
  373. package/dist/chunks/standalone-experiment-turn-owner-JCY5LL5R.js +0 -2
  374. package/dist/chunks/store-harness-workspaces-XUM4Z66X.js +0 -2
  375. package/dist/chunks/store-learned-preference-migration-validation-NADPXOTG.js +0 -2
  376. package/dist/chunks/store-learning-WLG6KFIO.js +0 -2
  377. package/dist/chunks/web-search-CZ3NCLPY.js +0 -2
  378. package/dist/web/assets/App-s-CJswyt.js +0 -154
  379. package/dist/web/assets/AppsView-BYE5EBDJ.js +0 -1
  380. package/dist/web/assets/ComposerCreateImproveStrip-CEgh4OtN.js +0 -1
  381. package/dist/web/assets/LabSkillSidebar-BxffN-pN.js +0 -1
  382. package/dist/web/assets/MainChatThread-DZpcFRFl.js +0 -2
  383. package/dist/web/assets/MainPane-5DTtwVCk.js +0 -65
  384. package/dist/web/assets/OutputsPage-Cr1Spf7S.js +0 -1
  385. package/dist/web/assets/RightChatPanelStack-T6VRWuHo.js +0 -1
  386. package/dist/web/assets/SettingsView-Dulr_xlq.css +0 -1
  387. package/dist/web/assets/TrainingCreationPanel-BXHfohNm.js +0 -1
  388. package/dist/web/assets/index-3iPNbbER.css +0 -1
  389. package/dist/web/assets/useProviderSettings-C4L4wDoh.js +0 -5
@@ -1,13 +1,13 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as pt}from"./chunk-SYUKES6H.js";import{a as A,b as L}from"./chunk-KVTBX2UP.js";import{a as dt}from"./chunk-IZ6DLEVY.js";import{b as re,m as mt,s as ft,t as oe,y as gt,z as se}from"./chunk-XW6HGSIT.js";import{d as ut,g as Te}from"./chunk-KG325WTN.js";import{O as ct,r as at,z as Ie}from"./chunk-QL4OIPEZ.js";import{e as st}from"./chunk-OQPJ7FJF.js";import{K as it}from"./chunk-WJ43MJ3F.js";import{J as ne,L as lt}from"./chunk-QOGJAQDO.js";import{I as _e}from"./chunk-Z4Z5UOZM.js";import{a as i,c as Re,e as Pn}from"./chunk-FTQLQJQV.js";var kt=Re((is,yt)=>{"use strict";var Cn=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],ht=/[\n\r\u2028\u2029]/,En=/[\s#!"$&'():;<=>@\\^`|]/g;yt.exports=i(function(t){return t.map(function(n){if(n==="")return"''";if(n&&typeof n=="object"){if("op"in n&&n.op==="glob"){if(typeof n.pattern!="string")throw new TypeError("glob token requires a string `pattern`");if(ht.test(n.pattern))throw new TypeError("glob `pattern` must not contain line terminators");return n.pattern.replace(En,"\\$&")}if("op"in n&&typeof n.op=="string"){if(Cn.indexOf(n.op)<0)throw new TypeError("invalid `op` value: "+JSON.stringify(n.op));return n.op.replace(/[\s\S]/g,"\\$&")}if("comment"in n&&typeof n.comment=="string"){if(ht.test(n.comment))throw new TypeError("`comment` must not contain line terminators");return"#"+n.comment}throw new TypeError("unrecognized object token shape")}return/["\s\\]/.test(n)&&!/'/.test(n)?"'"+n.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(n)?'"'+n.replace(/(["\\$`!])/g,"\\$1")+'"':String(n).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,"$1\\$2")}).join(" ")},"quote")});var Tt=Re((cs,It)=>{"use strict";var _t="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",wt=new RegExp("^"+_t+"$"),bt="|&;()<> \\t",Mn="'([^']*?)'",Wn='"((\\\\"|[^"])*?)"',On=/^#$/,xt="'",Rt='"',ie="$",D="",qn=4294967296;for(ve=0;ve<4;ve++)D+=(qn*Math.random()).toString(16);var ve,jn=new RegExp("^"+D);function Bn(e,t){for(var n=t.lastIndex,r=[],o;o=t.exec(e);)r[r.length]=o,t.lastIndex===o.index&&(t.lastIndex+=1);return t.lastIndex=n,r}i(Bn,"matchAll");function $n(e,t,n){var r=typeof e=="function"?e(n):e[n];return typeof r>"u"&&n!=""?r="":typeof r>"u"&&(r="$"),typeof r=="object"?t+D+JSON.stringify(r)+D:t+r}i($n,"getVar");function Nn(e,t,n){n||(n={});var r=n.escape||"\\",o=n.splitUnquoted===!0?`
2
+ import{a as ut}from"./chunk-SYUKES6H.js";import{a as pt}from"./chunk-IZ6DLEVY.js";import{b as re,m as mt,s as ft,t as oe,y as gt,z as se}from"./chunk-XW6HGSIT.js";import{a as A,b as L}from"./chunk-KVTBX2UP.js";import{d as dt,g as Te}from"./chunk-FSQWAANK.js";import{O as ct,r as at,z as Ie}from"./chunk-ZR7LIMJS.js";import{e as st}from"./chunk-OQPJ7FJF.js";import{J as ne,L as lt}from"./chunk-UFHLLSCE.js";import{K as it}from"./chunk-O4FBOUNX.js";import{I as _e}from"./chunk-SG6JZ7HD.js";import{a as i,c as Re,e as Pn}from"./chunk-FTQLQJQV.js";var kt=Re((is,yt)=>{"use strict";var Cn=["||","&&",";;","|&","<(","<<<",">>",">&","<&","&",";","(",")","|","<",">"],ht=/[\n\r\u2028\u2029]/,En=/[\s#!"$&'():;<=>@\\^`|]/g;yt.exports=i(function(t){return t.map(function(n){if(n==="")return"''";if(n&&typeof n=="object"){if("op"in n&&n.op==="glob"){if(typeof n.pattern!="string")throw new TypeError("glob token requires a string `pattern`");if(ht.test(n.pattern))throw new TypeError("glob `pattern` must not contain line terminators");return n.pattern.replace(En,"\\$&")}if("op"in n&&typeof n.op=="string"){if(Cn.indexOf(n.op)<0)throw new TypeError("invalid `op` value: "+JSON.stringify(n.op));return n.op.replace(/[\s\S]/g,"\\$&")}if("comment"in n&&typeof n.comment=="string"){if(ht.test(n.comment))throw new TypeError("`comment` must not contain line terminators");return"#"+n.comment}throw new TypeError("unrecognized object token shape")}return/["\s\\]/.test(n)&&!/'/.test(n)?"'"+n.replace(/(['])/g,"\\$1")+"'":/["'\s]/.test(n)?'"'+n.replace(/(["\\$`!])/g,"\\$1")+'"':String(n).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g,"$1\\$2")}).join(" ")},"quote")});var Tt=Re((cs,It)=>{"use strict";var _t="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",wt=new RegExp("^"+_t+"$"),bt="|&;()<> \\t",Mn="'([^']*?)'",Wn='"((\\\\"|[^"])*?)"',On=/^#$/,xt="'",Rt='"',ie="$",D="",qn=4294967296;for(ve=0;ve<4;ve++)D+=(qn*Math.random()).toString(16);var ve,jn=new RegExp("^"+D);function Bn(e,t){for(var n=t.lastIndex,r=[],o;o=t.exec(e);)r[r.length]=o,t.lastIndex===o.index&&(t.lastIndex+=1);return t.lastIndex=n,r}i(Bn,"matchAll");function $n(e,t,n){var r=typeof e=="function"?e(n):e[n];return typeof r>"u"&&n!=""?r="":typeof r>"u"&&(r="$"),typeof r=="object"?t+D+JSON.stringify(r)+D:t+r}i($n,"getVar");function Nn(e,t,n){n||(n={});var r=n.escape||"\\",o=n.splitUnquoted===!0?`
3
3
  `:typeof n.splitUnquoted=="string"?n.splitUnquoted:"",s="(\\"+r+`['"`+bt+`]|[^\\s'"`+bt+"])+",a=new RegExp(["("+_t+")","("+s+"|"+Wn+"|"+Mn+")+"].join("|"),"g"),d=Bn(e,a);if(d.length===0)return[];t||(t={});var c=!1;return d.map(function(l){var u=l[0];if(!u||c)return;if(wt.test(u))return{op:u};var p=!1,f=!1,m="",h=[],W=!1,x=null,ye=!1,b;function tt(){b+=1;var I,V,be=u.charAt(b);if(be==="{"){if(b+=1,u.charAt(b)==="}")throw new Error("Bad substitution: "+u.slice(b-2,b+1));var te=1;for(I=b;te>0&&I<u.length;)u.charAt(I)==="{"&&u.charAt(I-1)==="$"?te+=1:u.charAt(I)==="}"&&(te-=1),I+=1;if(te!==0)throw new Error("Bad substitution: "+u.slice(b));I-=1,V=u.slice(b,I),b=I}else if(/[*@#?$!_-]/.test(be))V=be,b+=1;else{var xe=u.slice(b);I=xe.match(/[^\w\d_]/),I?(V=xe.slice(0,I.index),b+=I.index-1):(V=xe,b=u.length)}return $n(t,"",V)}i(tt,"parseEnvVar");function nt(){if(x!==null){if(x===0)m!==""&&(h[h.length]=m,m="");else{h[h.length]=m,m="";for(var I=1;I<x;I+=1)h[h.length]=""}x=null}}for(i(nt,"flushRun"),b=0;b<u.length;b++){var k=u.charAt(b);if(o&&k!==ie&&nt(),ye=ye||!p&&(k==="*"||k==="?"),f)m+=k,f=!1;else if(p)k===p?p=!1:p==xt?m+=k:k===r?(b+=1,k=u.charAt(b),k===Rt||k===r||k===ie?m+=k:m+=r+k):k===ie?m+=tt():m+=k;else if(k===Rt||k===xt)p=k,W=!0;else{if(wt.test(k))return{op:u};if(On.test(k)){c=!0;var rt={comment:e.slice(l.index+b+1)};return m.length?[m,rt]:[rt]}else if(k===r)f=!0;else if(k===ie){var ke=tt();if(!o)m+=ke;else for(var we=0;we<ke.length;we+=1){var O=ke.charAt(we);o.indexOf(O)<0?(nt(),m+=O):x===null?x=O===" "||O===" "||O===`
4
4
  `?0:1:O!==" "&&O!==" "&&O!==`
5
- `&&(x+=1)}}else m+=k}}if(ye)return{op:"glob",pattern:m};if(o){if(x!==null&&x>0){h[h.length]=m,m="";for(var ot=1;ot<x;ot+=1)h[h.length]=""}return(m!==""||W&&h.length===0)&&(h[h.length]=m),h}return m}).reduce(function(l,u){return typeof u>"u"||[].concat(u).forEach(function(p){l[l.length]=p}),l},[])}i(Nn,"parseInternal");It.exports=i(function(t,n,r){var o=Nn(t,n,r);return typeof n!="function"?o:o.reduce(function(s,a){if(typeof a=="object")return s[s.length]=a,s;var d=a.split(RegExp("("+D+".*?"+D+")","g"));return d.length===1?(s[s.length]=d[0],s):(d.filter(Boolean).forEach(function(c){s[s.length]=jn.test(c)?JSON.parse(c.split(D)[1]):c}),s)},[])},"parse")});var vt=Re(Se=>{"use strict";Se.quote=kt();Se.parse=Tt()});var Mt=Pn(vt(),1);import{spawn as Ln}from"node:child_process";import{randomUUID as Dn}from"node:crypto";import le from"node:path";var Fn=120,Un=3600,de=6e4,St=2e4,zn="Select a project to use this.";function bs(e){let{upsertApproval:t,appendRuntimeEvent:n}=e,r=new Map,o=new Set;async function s(c){let l=c.command.trim();if(!l)return ce(l,null,"Command is empty.",Pt(c.timeoutSeconds));let u=Pt(c.timeoutSeconds),p=A({session:c.session}),f=Xn({requestedCwd:c.cwd,session:c.session}),m=!!(c.cwd?.trim()&&le.isAbsolute(c.cwd.trim()));if(p.target==="sandbox"||!f||p.target!=="local"&&!m)return ce(l,f,zn,u);let h=c.session.openPondCommandAccessMode??_e;if(h==="disabled")return ce(l,f,"Command access is disabled for this chat.",u);let W=Hn(l);if(h==="ask"&&!o.has(At(c.session.id,W))){let x=await d({command:l,cwd:f,family:W,input:c,timeoutSeconds:u});if(x==="acceptForSession"&&o.add(At(c.session.id,W)),x!=="accept"&&x!=="acceptForSession")return ce(l,f,x==="cancel"?"Command was cancelled.":"Command was not approved.",u)}return Yn({command:l,cwd:f,timeoutSeconds:u,signal:c.signal})}i(s,"executeCommand");async function a(c,l){let u=r.get(c);if(!u)return null;let p=it.parse(l);r.delete(c);let f=Qn(p.decision),m={...u.approval,status:f};return await t(m),await n(Te({sessionId:m.sessionId,turnId:m.turnId??void 0,name:"approval.resolved",source:"server",action:"command",status:f==="accepted"||f==="accepted_for_session"?"completed":"failed",output:m.title,data:{approvalId:c,status:f,decision:p.decision,family:u.family}})),u.resolve(p.decision),m}i(a,"resolveApproval");async function d(c){let l={id:`approval_${Dn()}`,sessionId:c.input.session.id,turnId:c.input.turnId??null,providerRequestId:c.input.providerRequestId??c.input.turnId??c.input.session.id,kind:"command",title:c.command,detail:JSON.stringify({command:c.command,cwd:c.cwd,timeoutSeconds:c.timeoutSeconds,source:c.input.source,mode:c.input.session.openPondCommandAccessMode??_e,risk:Vn(c.command),sessionApprovalFamily:{key:c.family.key,label:c.family.label,broad:c.family.broad,reason:c.family.reason}},null,2),status:"pending",createdAt:ut()},u,p=new Promise(f=>{u=f});r.set(l.id,{approval:l,family:c.family,resolve:u});try{await t(l),await n(Te({sessionId:c.input.session.id,turnId:c.input.turnId??void 0,name:"approval.requested",source:"server",action:"command",appId:c.input.session.appId,status:"pending",output:l.title,data:l}))}catch(f){throw r.delete(l.id),f}return p}return i(d,"requestCommandApproval"),{executeCommand:s,resolveApproval:a}}i(bs,"createOpenPondCommandAccessService");function Wt(e){return JSON.stringify({ok:e.ok,action:"exec_command",output:Zn(e),data:{command:e.command,cwd:e.cwd,exitCode:e.exitCode,stdout:Et(e.stdout),stderr:Et(e.stderr),timedOut:e.timedOut,timeoutSeconds:e.timeoutSeconds,truncated:e.truncated,blockedReason:e.blockedReason}},null,2)}i(Wt,"commandResultForModel");function Hn(e){let t=Jn(e);if(!t)return ae(e,"Could not safely parse shell command.");let n=Kn(t);if(n===-1)return ae(e,"Could not find command executable.");if(Gn(t))return ae(e,"Shell operators require exact-command session approval.");let r=t[n],o=t[n+1]??null;return r==="pwd"?X("pwd","pwd","Allowlisted read-only command."):r==="ls"?X("ls","ls","Allowlisted directory listing command."):r==="git"&&o==="status"?X("git status","git status","Allowlisted git status family."):r==="docker"&&o==="system"?X("docker system","docker system","Allowlisted Docker system inspection family."):r==="bun"&&o==="run"?X("bun run","bun run","Allowlisted Bun script execution family."):ae(e,"Command is not in the broad session-approval allowlist.")}i(Hn,"classifyCommandFamily");function Jn(e){try{let t=(0,Mt.parse)(e),n=[];for(let r of t){if(typeof r=="string"){n.push(r);continue}if(!r||typeof r!="object")return null;let o=r.op;if(typeof o=="string"){n.push(o);continue}return null}return n}catch{return null}}i(Jn,"safeShellTokens");function Kn(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(!/^[A-Za-z_][A-Za-z0-9_]*=.*/.test(n))return t}return-1}i(Kn,"firstCommandTokenIndex");function Gn(e){return e.some(t=>/^(?:\||&&|\|\||;|&|<|>|\(|\)|\{|\})$/.test(t))}i(Gn,"hasUnsafeShellSyntax");function X(e,t,n){return{key:e,label:t,broad:!0,reason:n}}i(X,"broadFamily");function ae(e,t){return{key:`exact:${e}`,label:e,broad:!1,reason:t}}i(ae,"exactCommandFamily");function At(e,t){return`${e}:${t.key}`}i(At,"sessionFamilyKey");function Vn(e){let t=e.toLowerCase();return/\b(?:sudo|rm\s+-rf|mkfs|dd\s+if=|docker\s+(?:volume\s+rm|system\s+prune|container\s+rm)|kill(?:all)?)\b/.test(t)?"danger":/\b(?:npm|pnpm|yarn|bun)\s+(?:install|add|remove)|\bgit\s+(?:commit|push|reset|checkout|merge|rebase)|[>|]|\b(?:mv|cp|rm|touch|mkdir|docker\s+(?:run|build|compose))\b/.test(t)?"write":"read"}i(Vn,"commandRiskLabel");function Xn(e){let t=e.requestedCwd?.trim();return t?le.isAbsolute(t)?le.resolve(t):e.session.cwd?le.resolve(e.session.cwd,t):null:e.session.cwd?.trim()||null}i(Xn,"resolveCommandCwd");function Pt(e){return Number.isFinite(e??NaN)?Math.max(1,Math.min(Math.floor(e),Un)):Fn}i(Pt,"normalizedTimeout");function ce(e,t,n,r){return{ok:!1,command:e,cwd:t,exitCode:null,stdout:"",stderr:n,timedOut:!1,timeoutSeconds:r,truncated:!1,blockedReason:n}}i(ce,"blockedCommandResult");function Yn(e){return new Promise(t=>{let n=!1,r=!1,o="",s="",a=!1,d=null,c=pt(e.command),l=Ln(c.command,{cwd:e.cwd,shell:c.shell,env:{...process.env,PATH:dt()},stdio:["ignore","pipe","pipe"],detached:process.platform!=="win32"}),u=i(h=>{n||(n=!0,clearTimeout(m),d&&clearTimeout(d),e.signal?.removeEventListener("abort",f),t(h))},"finish"),p=i((h,W)=>{let x=W.toString("utf8");h==="stdout"?o=Ae(o,x):s=Ae(s,x),o.length+s.length>=de&&(a=!0)},"appendOutput"),f=i(()=>{Pe(l,"SIGTERM"),u({ok:!1,command:e.command,cwd:e.cwd,exitCode:null,stdout:o,stderr:s||"Command was interrupted.",timedOut:!1,timeoutSeconds:e.timeoutSeconds,truncated:a,blockedReason:"Command was interrupted."}),Ct(l)},"abort"),m=setTimeout(()=>{r=!0,Pe(l,"SIGTERM"),d=Ct(l)},e.timeoutSeconds*1e3);e.signal?.addEventListener("abort",f,{once:!0}),l.stdout?.on("data",h=>p("stdout",h)),l.stderr?.on("data",h=>p("stderr",h)),l.on("error",h=>{u({ok:!1,command:e.command,cwd:e.cwd,exitCode:null,stdout:o,stderr:h.message,timedOut:r,timeoutSeconds:e.timeoutSeconds,truncated:a,blockedReason:null})}),l.on("close",h=>{u({ok:!r&&(h??1)===0,command:e.command,cwd:e.cwd,exitCode:r?null:h??1,stdout:o,stderr:r?Ae(s,`
5
+ `&&(x+=1)}}else m+=k}}if(ye)return{op:"glob",pattern:m};if(o){if(x!==null&&x>0){h[h.length]=m,m="";for(var ot=1;ot<x;ot+=1)h[h.length]=""}return(m!==""||W&&h.length===0)&&(h[h.length]=m),h}return m}).reduce(function(l,u){return typeof u>"u"||[].concat(u).forEach(function(p){l[l.length]=p}),l},[])}i(Nn,"parseInternal");It.exports=i(function(t,n,r){var o=Nn(t,n,r);return typeof n!="function"?o:o.reduce(function(s,a){if(typeof a=="object")return s[s.length]=a,s;var d=a.split(RegExp("("+D+".*?"+D+")","g"));return d.length===1?(s[s.length]=d[0],s):(d.filter(Boolean).forEach(function(c){s[s.length]=jn.test(c)?JSON.parse(c.split(D)[1]):c}),s)},[])},"parse")});var vt=Re(Se=>{"use strict";Se.quote=kt();Se.parse=Tt()});var Mt=Pn(vt(),1);import{spawn as Ln}from"node:child_process";import{randomUUID as Dn}from"node:crypto";import le from"node:path";var Fn=120,Un=3600,de=6e4,St=2e4,zn="Select a project to use this.";function bs(e){let{upsertApproval:t,appendRuntimeEvent:n}=e,r=new Map,o=new Set;async function s(c){let l=c.command.trim();if(!l)return ce(l,null,"Command is empty.",Pt(c.timeoutSeconds));let u=Pt(c.timeoutSeconds),p=A({session:c.session}),f=Xn({requestedCwd:c.cwd,session:c.session}),m=!!(c.cwd?.trim()&&le.isAbsolute(c.cwd.trim()));if(p.target==="sandbox"||!f||p.target!=="local"&&!m)return ce(l,f,zn,u);let h=c.session.openPondCommandAccessMode??_e;if(h==="disabled")return ce(l,f,"Command access is disabled for this chat.",u);let W=Hn(l);if(h==="ask"&&!o.has(At(c.session.id,W))){let x=await d({command:l,cwd:f,family:W,input:c,timeoutSeconds:u});if(x==="acceptForSession"&&o.add(At(c.session.id,W)),x!=="accept"&&x!=="acceptForSession")return ce(l,f,x==="cancel"?"Command was cancelled.":"Command was not approved.",u)}return Yn({command:l,cwd:f,timeoutSeconds:u,signal:c.signal})}i(s,"executeCommand");async function a(c,l){let u=r.get(c);if(!u)return null;let p=it.parse(l);r.delete(c);let f=Qn(p.decision),m={...u.approval,status:f};return await t(m),await n(Te({sessionId:m.sessionId,turnId:m.turnId??void 0,name:"approval.resolved",source:"server",action:"command",status:f==="accepted"||f==="accepted_for_session"?"completed":"failed",output:m.title,data:{approvalId:c,status:f,decision:p.decision,family:u.family}})),u.resolve(p.decision),m}i(a,"resolveApproval");async function d(c){let l={id:`approval_${Dn()}`,sessionId:c.input.session.id,turnId:c.input.turnId??null,providerRequestId:c.input.providerRequestId??c.input.turnId??c.input.session.id,kind:"command",title:c.command,detail:JSON.stringify({command:c.command,cwd:c.cwd,timeoutSeconds:c.timeoutSeconds,source:c.input.source,mode:c.input.session.openPondCommandAccessMode??_e,risk:Vn(c.command),sessionApprovalFamily:{key:c.family.key,label:c.family.label,broad:c.family.broad,reason:c.family.reason}},null,2),status:"pending",createdAt:dt()},u,p=new Promise(f=>{u=f});r.set(l.id,{approval:l,family:c.family,resolve:u});try{await t(l),await n(Te({sessionId:c.input.session.id,turnId:c.input.turnId??void 0,name:"approval.requested",source:"server",action:"command",appId:c.input.session.appId,status:"pending",output:l.title,data:l}))}catch(f){throw r.delete(l.id),f}return p}return i(d,"requestCommandApproval"),{executeCommand:s,resolveApproval:a}}i(bs,"createOpenPondCommandAccessService");function Wt(e){return JSON.stringify({ok:e.ok,action:"exec_command",output:Zn(e),data:{command:e.command,cwd:e.cwd,exitCode:e.exitCode,stdout:Et(e.stdout),stderr:Et(e.stderr),timedOut:e.timedOut,timeoutSeconds:e.timeoutSeconds,truncated:e.truncated,blockedReason:e.blockedReason}},null,2)}i(Wt,"commandResultForModel");function Hn(e){let t=Jn(e);if(!t)return ae(e,"Could not safely parse shell command.");let n=Kn(t);if(n===-1)return ae(e,"Could not find command executable.");if(Gn(t))return ae(e,"Shell operators require exact-command session approval.");let r=t[n],o=t[n+1]??null;return r==="pwd"?X("pwd","pwd","Allowlisted read-only command."):r==="ls"?X("ls","ls","Allowlisted directory listing command."):r==="git"&&o==="status"?X("git status","git status","Allowlisted git status family."):r==="docker"&&o==="system"?X("docker system","docker system","Allowlisted Docker system inspection family."):r==="bun"&&o==="run"?X("bun run","bun run","Allowlisted Bun script execution family."):ae(e,"Command is not in the broad session-approval allowlist.")}i(Hn,"classifyCommandFamily");function Jn(e){try{let t=(0,Mt.parse)(e),n=[];for(let r of t){if(typeof r=="string"){n.push(r);continue}if(!r||typeof r!="object")return null;let o=r.op;if(typeof o=="string"){n.push(o);continue}return null}return n}catch{return null}}i(Jn,"safeShellTokens");function Kn(e){for(let t=0;t<e.length;t+=1){let n=e[t];if(!/^[A-Za-z_][A-Za-z0-9_]*=.*/.test(n))return t}return-1}i(Kn,"firstCommandTokenIndex");function Gn(e){return e.some(t=>/^(?:\||&&|\|\||;|&|<|>|\(|\)|\{|\})$/.test(t))}i(Gn,"hasUnsafeShellSyntax");function X(e,t,n){return{key:e,label:t,broad:!0,reason:n}}i(X,"broadFamily");function ae(e,t){return{key:`exact:${e}`,label:e,broad:!1,reason:t}}i(ae,"exactCommandFamily");function At(e,t){return`${e}:${t.key}`}i(At,"sessionFamilyKey");function Vn(e){let t=e.toLowerCase();return/\b(?:sudo|rm\s+-rf|mkfs|dd\s+if=|docker\s+(?:volume\s+rm|system\s+prune|container\s+rm)|kill(?:all)?)\b/.test(t)?"danger":/\b(?:npm|pnpm|yarn|bun)\s+(?:install|add|remove)|\bgit\s+(?:commit|push|reset|checkout|merge|rebase)|[>|]|\b(?:mv|cp|rm|touch|mkdir|docker\s+(?:run|build|compose))\b/.test(t)?"write":"read"}i(Vn,"commandRiskLabel");function Xn(e){let t=e.requestedCwd?.trim();return t?le.isAbsolute(t)?le.resolve(t):e.session.cwd?le.resolve(e.session.cwd,t):null:e.session.cwd?.trim()||null}i(Xn,"resolveCommandCwd");function Pt(e){return Number.isFinite(e??NaN)?Math.max(1,Math.min(Math.floor(e),Un)):Fn}i(Pt,"normalizedTimeout");function ce(e,t,n,r){return{ok:!1,command:e,cwd:t,exitCode:null,stdout:"",stderr:n,timedOut:!1,timeoutSeconds:r,truncated:!1,blockedReason:n}}i(ce,"blockedCommandResult");function Yn(e){return new Promise(t=>{let n=!1,r=!1,o="",s="",a=!1,d=null,c=ut(e.command),l=Ln(c.command,{cwd:e.cwd,shell:c.shell,env:{...process.env,PATH:pt()},stdio:["ignore","pipe","pipe"],detached:process.platform!=="win32"}),u=i(h=>{n||(n=!0,clearTimeout(m),d&&clearTimeout(d),e.signal?.removeEventListener("abort",f),t(h))},"finish"),p=i((h,W)=>{let x=W.toString("utf8");h==="stdout"?o=Ae(o,x):s=Ae(s,x),o.length+s.length>=de&&(a=!0)},"appendOutput"),f=i(()=>{Pe(l,"SIGTERM"),u({ok:!1,command:e.command,cwd:e.cwd,exitCode:null,stdout:o,stderr:s||"Command was interrupted.",timedOut:!1,timeoutSeconds:e.timeoutSeconds,truncated:a,blockedReason:"Command was interrupted."}),Ct(l)},"abort"),m=setTimeout(()=>{r=!0,Pe(l,"SIGTERM"),d=Ct(l)},e.timeoutSeconds*1e3);e.signal?.addEventListener("abort",f,{once:!0}),l.stdout?.on("data",h=>p("stdout",h)),l.stderr?.on("data",h=>p("stderr",h)),l.on("error",h=>{u({ok:!1,command:e.command,cwd:e.cwd,exitCode:null,stdout:o,stderr:h.message,timedOut:r,timeoutSeconds:e.timeoutSeconds,truncated:a,blockedReason:null})}),l.on("close",h=>{u({ok:!r&&(h??1)===0,command:e.command,cwd:e.cwd,exitCode:r?null:h??1,stdout:o,stderr:r?Ae(s,`
6
6
  Command timed out after ${e.timeoutSeconds}s.`):s,timedOut:r,timeoutSeconds:e.timeoutSeconds,truncated:a,blockedReason:null})})})}i(Yn,"runShellCommand");function Pe(e,t){if(e.pid&&process.platform!=="win32")try{process.kill(-e.pid,t);return}catch{}e.kill(t)}i(Pe,"terminateShellProcessTree");function Ct(e){let t=setTimeout(()=>Pe(e,"SIGKILL"),1e3);return t.unref(),t}i(Ct,"scheduleShellProcessTreeKill");function Ae(e,t){if(e.length>=de)return e;let n=`${e}${t}`;return n.length<=de?n:`${n.slice(0,de)}
7
7
  [command output truncated]`}i(Ae,"appendLimited");function Et(e){return e.length<=St?e:`${e.slice(0,St)}
8
8
  [command output truncated for model]`}i(Et,"trimForModel");function Zn(e){if(e.blockedReason)return e.blockedReason;if(e.timedOut)return`Command timed out after ${e.timeoutSeconds}s.`;let t=e.exitCode??1;return t===0?"Command completed successfully.":`Command exited with code ${t}.`}i(Zn,"commandResultSummary");function Qn(e){return e==="accept"?"accepted":e==="acceptForSession"?"accepted_for_session":e==="cancel"?"cancelled":"declined"}i(Qn,"approvalStatusForDecision");import{createHash as ho}from"node:crypto";function Ce(e){return`tool-output:${encodeURIComponent(e)}`}i(Ce,"toolOutputResourceRef");function Ee(e){let t=Math.max(512,Math.floor(e.maxChars??8e3));if(e.output.length<=t)return{output:e.output,spill:null};let n=Math.ceil(t/2),r=Math.max(1,t-n),o=Ce(e.callId),s=n+r;return{output:[e.output.slice(0,n),`[tool output spilled: ${e.output.length-s} characters omitted; read ${o} with offsetBytes to page the durable output]`,e.output.slice(-r)].join(`
9
9
 
10
- `),spill:{resourceRef:o,originalChars:e.output.length,returnedChars:s,omittedChars:e.output.length-s}}}i(Ee,"toolOutputSpillForModel");function _s(e){let t=Ee({output:e.output,callId:e.resourceRef.replace(/^tool-output:/,""),maxChars:e.maxChars??4e3});return t.spill?t.output.replace(t.spill.resourceRef,e.resourceRef):e.output}i(_s,"toolOutputPreviewForCompaction");var Ot=2e4,er=new Set(["remoteUrl","repoPath","workspacePath","expectedRemoteUrl"]),qt={resource_read:[{key:"ref",type:"nonEmptyString",description:"resource ref such as workspace:file:package.json"}],resource_search:[{key:"scope",type:"nonEmptyString",description:"resource scope such as workspace"},{key:"query",type:"nonEmptyString",description:"search text or path fragment"}],read_files:[{key:"paths",type:"stringArray",description:"one or more workspace-relative file paths"}],search_files:[{key:"query",type:"nonEmptyString",description:"search text or regex"}],preview_write_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"},{key:"content",type:"string",description:"complete file contents"}],write_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"},{key:"content",type:"string",description:"complete file contents"}],preview_write_files:[{key:"files",type:"stringRecord",description:"object mapping workspace-relative paths to complete file contents"}],write_files:[{key:"files",type:"stringRecord",description:"object mapping workspace-relative paths to complete file contents"}],preview_edit_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"},{key:"oldText",type:"nonEmptyString",description:"exact text currently in the file"},{key:"newText",type:"string",description:"replacement text; use an empty string only for deletion"}],edit_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"},{key:"oldText",type:"nonEmptyString",description:"exact text currently in the file"},{key:"newText",type:"string",description:"replacement text; use an empty string only for deletion"}],preview_delete_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"}],delete_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"}],git_commit:[{key:"message",type:"nonEmptyString",description:"commit message"}],sandbox_read_file:[{key:"path",type:"nonEmptyString",description:"sandbox file path"}],sandbox_search_files:[{key:"query",type:"nonEmptyString",description:"search text or regex"}],sandbox_write_file:[{key:"path",type:"nonEmptyString",description:"sandbox file path"},{key:"content",type:"string",description:"complete file contents"}],sandbox_edit_file:[{key:"path",type:"nonEmptyString",description:"sandbox file path"},{key:"oldText",type:"nonEmptyString",description:"exact text currently in the sandbox file"},{key:"newText",type:"string",description:"replacement text; use an empty string only for deletion"}],sandbox_delete_file:[{key:"path",type:"nonEmptyString",description:"sandbox file path"}],sandbox_mkdir:[{key:"path",type:"nonEmptyString",description:"sandbox directory path"}],sandbox_move_file:[{key:"fromPath",type:"nonEmptyString",description:"sandbox source path"},{key:"toPath",type:"nonEmptyString",description:"sandbox target path"}],sandbox_exec:[{key:"command",type:"nonEmptyString",description:"bounded shell command to run in the sandbox"}],sandbox_git_branch:[{key:"branch",type:"nonEmptyString",description:"sandbox git branch name"}],sandbox_git_commit:[{key:"message",type:"nonEmptyString",description:"sandbox git commit message"}],sandbox_run_action:[{key:"actionName",type:"nonEmptyString",description:"YAML action name from the project or agent registry"}],sandbox_snapshot_create:[{key:"name",type:"nonEmptyString",description:"snapshot name"}],sandbox_snapshot_update:[{key:"snapshotId",type:"nonEmptyString",description:"snapshot id"}],sandbox_snapshot_validate:[{key:"snapshotId",type:"nonEmptyString",description:"snapshot id"}],sandbox_snapshot_publish:[{key:"snapshotId",type:"nonEmptyString",description:"snapshot id"}],sandbox_replay_start:[{key:"snapshotId",type:"nonEmptyString",description:"published replayable snapshot id"}],sandbox_replay_get:[{key:"replayId",type:"nonEmptyString",description:"sandbox replay run id"}],sandbox_replay_logs:[{key:"replayId",type:"nonEmptyString",description:"sandbox replay run id"}],sandbox_replay_artifacts:[{key:"replayId",type:"nonEmptyString",description:"sandbox replay run id"}],sandbox_replay_cancel:[{key:"replayId",type:"nonEmptyString",description:"sandbox replay run id"}]},tr=["Workspace tools are available through a strict text protocol.","When you need to inspect or change the app workspace, respond with exactly one fenced block labelled openpond_tool and no other prose.",'The block must contain JSON: {"action":"read_files","args":{"paths":["package.json"]}}.',"Available actions: create_sandbox_template_scaffold, resource_search, resource_read, workspace_status, list_files, read_files, search_files, preview_write_files, preview_write_file, preview_edit_file, preview_delete_file, write_files, write_file, edit_file, delete_file, validate_sandbox_template, build_sandbox_template, run_sandbox_template, git_init, git_status, git_diff, git_fetch, git_commit, git_push, publish_openpond_repo, sandbox_create, sandbox_templates, sandbox_template_launch, sandbox_status, sandbox_list_files, sandbox_read_file, sandbox_search_files, sandbox_upload_file, sandbox_write_file, sandbox_edit_file, sandbox_delete_file, sandbox_mkdir, sandbox_move_file, sandbox_exec, sandbox_git_status, sandbox_git_diff, sandbox_git_export_patch, sandbox_git_apply_patch_local, sandbox_git_branch, sandbox_git_commit, sandbox_git_pull, sandbox_git_push, sandbox_preserve_source, sandbox_promote_source, sandbox_run_action, sandbox_open_port, sandbox_snapshot_catalog, sandbox_snapshot_create, sandbox_snapshot_update, sandbox_snapshot_validate, sandbox_snapshot_publish, sandbox_replays, sandbox_replay_start, sandbox_replay_get, sandbox_replay_logs, sandbox_replay_artifacts, sandbox_replay_cancel, sandbox_logs, sandbox_receipts, sandbox_stop.","Required args: resource_search {scope, query}; resource_read {ref}; read_files {paths}; search_files {query}; write_file/preview_write_file {path, content}; write_files/preview_write_files {files}; edit_file/preview_edit_file {path, oldText, newText}; delete_file/preview_delete_file {path}; git_commit {message}; run_sandbox_template {optional mode/target/params/uploads/sandboxId}; sandbox_create {optional repo/teamId/projectId/agentId/command/visibility/resources/budget/quotas/metadata/runtime/workflowMode/runtimeProfileId/runtimeBaseBranch/runtimePromotionPolicy/attachToSession}; sandbox_templates {optional teamId/projectId/q/name/version/tag/useCase}; sandbox_template_launch {snapshotId or templateName or useCase, optional teamId/projectId/version/visibility/resources/budget/quotas/metadata/attachToSession}; sandbox_read_file {path, optional sandboxId}; sandbox_search_files {query, optional sandboxId}; sandbox_upload_file {path, contentsBase64, optional sandboxId}; sandbox_write_file {path, content, optional sandboxId}; sandbox_edit_file {path, oldText, newText, optional sandboxId}; sandbox_delete_file {path, optional recursive/sandboxId}; sandbox_mkdir {path, optional recursive/sandboxId}; sandbox_move_file {fromPath, toPath, optional overwrite/sandboxId}; sandbox_exec {command, optional sandboxId}; sandbox_git_export_patch {optional baseRef/sandboxId}; sandbox_git_apply_patch_local {optional baseRef/sandboxId/localProjectId}; sandbox_git_branch {branch, optional create/startPoint/sandboxId}; sandbox_git_commit {message, optional all/paths/sandboxId}; sandbox_preserve_source {optional message/runtimeId/sandboxId}; sandbox_promote_source {optional expectedTargetSha/runtimeId/sandboxId}; sandbox_run_action {actionName, optional sandboxId/projectId/agentId/input}; sandbox_open_port {port, optional sandboxId}; sandbox_snapshot_create {name, optional sandboxId/template/replay}; sandbox_snapshot_update/validate/publish {snapshotId, optional sandboxId}; sandbox_replay_start {snapshotId, optional teamId/projectId/entrypoint/params/budget/artifactPaths}; sandbox_replay_get/logs/artifacts/cancel {replayId}.",'Prefer resource_search with scope workspace to find candidate files, then resource_read on returned refs to inspect stable, metadata-rich resources with explicit truncation. Use targeted path or identifier queries with limit 5-10; avoid repeated broad one-word searches unless the word is an exact component/function/file identifier. Workspace resource_search defaults to exact literal path/text search; pass filters.mode="path" for file/path lookup and filters.mode="ranked" for broad multi-term retrieval. Use read_files only when you already know exact paths and need raw file contents.',"For edit_file and sandbox_edit_file, oldText must exactly match existing file text. For targeted edits, include enough surrounding context for oldText to match exactly once; multi-match edits fail unless args.replaceAll is true. If you are not certain, call read_files or sandbox_read_file first.","Use write_files for multi-file edits so validation/build runs once after the batch.","Local write, edit, and delete actions return a pre-write diff preview plus validation/build results. Sandbox file actions return sandbox API read/write/delete results.","If a tool result has ok:false, inspect its output/data and repair the specific issue before trying to commit, push, or deploy.","Use sandbox_create to create or resume a sandbox runtime-backed remote sandbox from chat. When projectId or agentId is provided, sandbox_create reuses that project's or agent's default sandbox runtime unless args.runtime.runtimeId selects a specific runtime. Use sandbox_templates to find published project templates, and sandbox_template_launch to start from a published template. Use sandbox_edit_file for exact text edits after reading the sandbox file. Use sandbox_git_export_patch to export a portable patch without mutating local files, sandbox_git_apply_patch_local only after explicit user confirmation to apply the sandbox patch to the linked local checkout, sandbox_preserve_source to commit active changes back to the runtime source ref, and sandbox_promote_source only when the user asks to apply the preserved source ref to the Project branch. Use sandbox_run_action to execute a named action from openpond.yaml; when projectId or agentId is provided and args.sandboxId is omitted, sandbox_run_action starts a detached sandbox for that project or agent and then runs the action. By default, sandbox_create or sandbox_template_launch binds the chat session to that sandbox workspace; set args.attachToSession false for one-off tool-style execution that should leave the current chat scope unchanged.","Use sandbox_snapshot_create, sandbox_snapshot_validate, and sandbox_snapshot_publish when the user asks to preserve a sandbox as a replayable or launchable template. Use sandbox_replay_start and replay read/log/artifact tools for durable runs that should survive sandbox cleanup.","When the active workspace is a sandbox, use only sandbox_* actions for workspace inspection, file changes, commands, previews, logs, receipts, and stopping compute.","When you finish after workspace actions, answer in a concise Codex-style markdown format: brief outcome first, then Changed Files when files changed, then Verification when checks ran.","Do not use emojis in responses, generated prompts, templates, profile text, comments, or sample output unless the user explicitly asks for them.","Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for those details or they are necessary to explain a git/deploy failure.","After a tool result is returned, either request the next tool the same way or answer the user normally."].join(`
10
+ `),spill:{resourceRef:o,originalChars:e.output.length,returnedChars:s,omittedChars:e.output.length-s}}}i(Ee,"toolOutputSpillForModel");function _s(e){let t=Ee({output:e.output,callId:e.resourceRef.replace(/^tool-output:/,""),maxChars:e.maxChars??4e3});return t.spill?t.output.replace(t.spill.resourceRef,e.resourceRef):e.output}i(_s,"toolOutputPreviewForCompaction");var Ot=2e4,er=new Set(["remoteUrl","repoPath","workspacePath","expectedRemoteUrl"]),qt={resource_read:[{key:"ref",type:"nonEmptyString",description:"resource ref such as workspace:file:package.json"}],resource_search:[{key:"scope",type:"nonEmptyString",description:"resource scope such as workspace"},{key:"query",type:"nonEmptyString",description:"search text or path fragment"}],read_files:[{key:"paths",type:"stringArray",description:"one or more workspace-relative file paths"}],search_files:[{key:"query",type:"nonEmptyString",description:"search text or regex"}],preview_write_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"},{key:"content",type:"string",description:"complete file contents"}],write_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"},{key:"content",type:"string",description:"complete file contents"}],preview_write_files:[{key:"files",type:"stringRecord",description:"object mapping workspace-relative paths to complete file contents"}],write_files:[{key:"files",type:"stringRecord",description:"object mapping workspace-relative paths to complete file contents"}],preview_edit_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"},{key:"oldText",type:"nonEmptyString",description:"exact text currently in the file"},{key:"newText",type:"string",description:"replacement text; use an empty string only for deletion"}],edit_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"},{key:"oldText",type:"nonEmptyString",description:"exact text currently in the file"},{key:"newText",type:"string",description:"replacement text; use an empty string only for deletion"}],preview_delete_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"}],delete_file:[{key:"path",type:"nonEmptyString",description:"workspace-relative file path"}],git_commit:[{key:"message",type:"nonEmptyString",description:"commit message"}],sandbox_read_file:[{key:"path",type:"nonEmptyString",description:"sandbox file path"}],sandbox_search_files:[{key:"query",type:"nonEmptyString",description:"search text or regex"}],sandbox_write_file:[{key:"path",type:"nonEmptyString",description:"sandbox file path"},{key:"content",type:"string",description:"complete file contents"}],sandbox_edit_file:[{key:"path",type:"nonEmptyString",description:"sandbox file path"},{key:"oldText",type:"nonEmptyString",description:"exact text currently in the sandbox file"},{key:"newText",type:"string",description:"replacement text; use an empty string only for deletion"}],sandbox_delete_file:[{key:"path",type:"nonEmptyString",description:"sandbox file path"}],sandbox_mkdir:[{key:"path",type:"nonEmptyString",description:"sandbox directory path"}],sandbox_move_file:[{key:"fromPath",type:"nonEmptyString",description:"sandbox source path"},{key:"toPath",type:"nonEmptyString",description:"sandbox target path"}],sandbox_exec:[{key:"command",type:"nonEmptyString",description:"bounded shell command to run in the sandbox"}],sandbox_git_branch:[{key:"branch",type:"nonEmptyString",description:"sandbox git branch name"}],sandbox_git_commit:[{key:"message",type:"nonEmptyString",description:"sandbox git commit message"}],sandbox_run_action:[{key:"actionName",type:"nonEmptyString",description:"YAML action name from the project or agent registry"}],sandbox_snapshot_create:[{key:"name",type:"nonEmptyString",description:"snapshot name"}],sandbox_snapshot_update:[{key:"snapshotId",type:"nonEmptyString",description:"snapshot id"}],sandbox_snapshot_validate:[{key:"snapshotId",type:"nonEmptyString",description:"snapshot id"}],sandbox_snapshot_publish:[{key:"snapshotId",type:"nonEmptyString",description:"snapshot id"}],sandbox_replay_start:[{key:"snapshotId",type:"nonEmptyString",description:"published replayable snapshot id"}],sandbox_replay_get:[{key:"replayId",type:"nonEmptyString",description:"sandbox replay run id"}],sandbox_replay_logs:[{key:"replayId",type:"nonEmptyString",description:"sandbox replay run id"}],sandbox_replay_artifacts:[{key:"replayId",type:"nonEmptyString",description:"sandbox replay run id"}],sandbox_replay_cancel:[{key:"replayId",type:"nonEmptyString",description:"sandbox replay run id"}]},tr=["Workspace tools are available through a strict text protocol.","When you need to inspect or change the app workspace, respond with exactly one fenced block labelled openpond_tool and no other prose.",'The block must contain JSON: {"action":"read_files","args":{"paths":["package.json"]}}.',"Available actions: create_sandbox_template_scaffold, resource_search, resource_read, workspace_status, list_files, read_files, search_files, preview_write_files, preview_write_file, preview_edit_file, preview_delete_file, write_files, write_file, edit_file, delete_file, validate_sandbox_template, build_sandbox_template, run_sandbox_template, git_init, git_status, git_diff, git_fetch, git_commit, git_push, publish_openpond_repo, sandbox_create, sandbox_templates, sandbox_template_launch, sandbox_status, sandbox_list_files, sandbox_read_file, sandbox_search_files, sandbox_upload_file, sandbox_write_file, sandbox_edit_file, sandbox_delete_file, sandbox_mkdir, sandbox_move_file, sandbox_exec, sandbox_git_status, sandbox_git_diff, sandbox_git_export_patch, sandbox_git_apply_patch_local, sandbox_git_branch, sandbox_git_commit, sandbox_git_pull, sandbox_git_push, sandbox_preserve_source, sandbox_promote_source, sandbox_run_action, sandbox_open_port, sandbox_snapshot_catalog, sandbox_snapshot_create, sandbox_snapshot_update, sandbox_snapshot_validate, sandbox_snapshot_publish, sandbox_replays, sandbox_replay_start, sandbox_replay_get, sandbox_replay_logs, sandbox_replay_artifacts, sandbox_replay_cancel, sandbox_logs, sandbox_receipts, sandbox_stop.","Required args: resource_search {scope, query}; resource_read {ref}; read_files {paths}; search_files {query}; write_file/preview_write_file {path, content}; write_files/preview_write_files {files}; edit_file/preview_edit_file {path, oldText, newText}; delete_file/preview_delete_file {path}; git_commit {message}; run_sandbox_template {optional mode/target/params/uploads/sandboxId}; sandbox_create {optional repo/teamId/projectId/agentId/command/visibility/resources/budget/quotas/metadata/runtime/workflowMode/runtimeProfileId/runtimeBaseBranch/runtimePromotionPolicy/attachToSession}; sandbox_templates {optional teamId/projectId/q/name/version/tag/useCase}; sandbox_template_launch {snapshotId or templateName or useCase, optional teamId/projectId/version/visibility/resources/budget/quotas/metadata/attachToSession}; sandbox_read_file {path, optional sandboxId}; sandbox_search_files {query, optional sandboxId}; sandbox_upload_file {path, contentsBase64, optional sandboxId}; sandbox_write_file {path, content, optional sandboxId}; sandbox_edit_file {path, oldText, newText, optional sandboxId}; sandbox_delete_file {path, optional recursive/sandboxId}; sandbox_mkdir {path, optional recursive/sandboxId}; sandbox_move_file {fromPath, toPath, optional overwrite/sandboxId}; sandbox_exec {command, optional sandboxId}; sandbox_git_export_patch {optional baseRef/sandboxId}; sandbox_git_apply_patch_local {optional baseRef/sandboxId/localProjectId}; sandbox_git_branch {branch, optional create/startPoint/sandboxId}; sandbox_git_commit {message, optional all/paths/sandboxId}; sandbox_preserve_source {optional message/runtimeId/sandboxId}; sandbox_promote_source {optional expectedTargetSha/runtimeId/sandboxId}; sandbox_run_action {actionName, optional sandboxId/projectId/agentId/input}; sandbox_open_port {port, optional sandboxId}; sandbox_snapshot_create {name, optional sandboxId/template/replay}; sandbox_snapshot_update/validate/publish {snapshotId, optional sandboxId}; sandbox_replay_start {snapshotId, optional teamId/projectId/entrypoint/params/budget/artifactPaths}; sandbox_replay_get/logs/artifacts/cancel {replayId}.",'Prefer resource_search with scope workspace to find candidate files, then resource_read on returned refs to inspect stable, metadata-rich resources with explicit truncation. Use targeted path or identifier queries with limit 5-10; avoid repeated broad one-word searches unless the word is an exact component/function/file identifier. Workspace resource_search defaults to exact literal path/text search; pass filters.mode="path" for file/path lookup and filters.mode="ranked" for broad multi-term retrieval. Use read_files only when you already know exact paths and need raw file contents.',"For edit_file and sandbox_edit_file, oldText must exactly match existing file text. For targeted edits, include enough surrounding context for oldText to match exactly once; multi-match edits fail unless args.replaceAll is true. If you are not certain, call read_files or sandbox_read_file first.","Use write_files for multi-file edits so validation/build runs once after the batch.","Local write, edit, and delete actions return a pre-write diff preview plus validation/build results. Sandbox file actions return sandbox API read/write/delete results.","If a tool result has ok:false, inspect its output/data and repair the specific issue before trying to commit, push, or deploy.","Use sandbox_create to create or resume a sandbox runtime-backed remote sandbox from chat. When projectId or agentId is provided, sandbox_create reuses that project's or agent's default sandbox runtime unless args.runtime.runtimeId selects a specific runtime. Use sandbox_templates to find published project templates, and sandbox_template_launch to start from a published template. Use sandbox_edit_file for exact text edits after reading the sandbox file. Use sandbox_git_export_patch to export a portable patch without mutating local files, sandbox_git_apply_patch_local only after explicit user confirmation to apply the sandbox patch to the linked local checkout, sandbox_preserve_source to commit active changes back to the runtime source ref, and sandbox_promote_source only when the user asks to apply the preserved source ref to the Project branch. Use sandbox_run_action to execute a named action from openpond.yaml; when projectId or agentId is provided and args.sandboxId is omitted, sandbox_run_action starts a detached sandbox for that project or agent and then runs the action. By default, sandbox_create or sandbox_template_launch binds the chat session to that sandbox workspace; set args.attachToSession false for one-off tool-style execution that should leave the current chat scope unchanged.","Use sandbox_snapshot_create, sandbox_snapshot_validate, and sandbox_snapshot_publish when the user asks to preserve a sandbox as a replayable or launchable template. Use sandbox_replay_start and replay read/log/artifact tools for durable runs that should survive sandbox cleanup.","When the active workspace is a sandbox, use only sandbox_* actions for workspace inspection, file changes, commands, previews, logs, receipts, and stopping compute.","Do not use emojis in responses, generated prompts, templates, profile text, comments, or sample output unless the user explicitly asks for them.","Do not mention raw tool JSON, internal repo paths, or origin/remote URLs unless the user explicitly asks for those details or they are necessary to explain a git/deploy failure.","After a tool result is returned, either request the next tool the same way or answer the user normally."].join(`
11
11
  `),nr=["Workspace resource tools are available through a narrow text fallback protocol.","Prefer native function tools when they are available. Use this fallback only if native tool calling fails or is unavailable in the current model turn.","When you need to inspect the app workspace through the fallback, respond with exactly one fenced block labelled openpond_tool and no other prose.",'The block must contain JSON such as {"action":"resource_search","args":{"scope":"workspace","query":"package.json"}}.',"Available fallback actions: resource_search, resource_read.","Required args: resource_search {scope, query}; resource_read {ref}.",'Use resource_search first to find stable refs, then resource_read on returned refs. Use targeted path or identifier queries with limit 5-10; avoid repeated broad one-word searches unless the word is an exact component/function/file identifier. Workspace resource_search defaults to exact literal path/text search; pass filters.mode="path" for file/path lookup and filters.mode="ranked" for broad multi-term retrieval. Do not use broad legacy actions such as list_files, read_files, search_files, sandbox_read_file, or sandbox_search_files in this fallback mode.',"After a resource result is returned, either request another resource_search/resource_read fallback call or answer the user normally."].join(`
12
12
  `);function As(e){return e==="none"?null:e==="resource_text_fallback"?nr:tr}i(As,"hostedToolProtocolForInstructionMode");function rr(e){return e.length<=Ot?e:`${e.slice(0,Ot)}
13
13
 
@@ -37,4 +37,4 @@ ${e.stderr}`:null].filter(Boolean).join(`
37
37
 
38
38
  `).trim();return{title:n,text:o}}i(bo,"extractReadableWebFetchText");function xo(e,t){if(Buffer.byteLength(e,"utf8")<=t)return{text:e,truncated:!1};let r=Math.min(e.length,t);for(;r>0&&Buffer.byteLength(e.slice(0,r),"utf8")>t;)r-=1;return{text:e.slice(0,r).trimEnd(),truncated:!0}}i(xo,"limitUtf8Text");function pn(e){return e.replace(/&nbsp;/gi," ").replace(/&amp;/gi,"&").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;|&apos;/gi,"'").replace(/&#(\d+);/g,(t,n)=>String.fromCodePoint(Number(n))).replace(/&#x([0-9a-f]+);/gi,(t,n)=>String.fromCodePoint(Number.parseInt(n,16)))}i(pn,"decodeHtmlEntities");function Ro(e){return{query:e.query,provider:e.provider,searchedAt:e.searchedAt,truncated:e.truncated,results:e.results.map((t,n)=>({id:t.id,citation:`[${n+1}]`,title:t.title,url:t.url,snippet:t.snippet,sourceName:t.sourceName,domain:_o(t.url),publishedAt:t.publishedAt,updatedAt:t.updatedAt}))}}i(Ro,"webSearchResultForModel");function _o(e){try{return new URL(e).hostname.replace(/^www\./i,"")}catch{return null}}i(_o,"hostnameFromUrl");function Ci(e){let t=e.skills.filter(r=>r.enabled&&r.validationStatus==="valid").sort((r,o)=>r.name.localeCompare(o.name));if(t.length===0)return[];let n=new Map(t.map(r=>[r.name,r]));return[{name:"profile_skill_read",description:"Read one enabled OpenPond profile skill package by name before following its workflow. The result includes its instructions, package path, and bundled resource files. Loading a skill does not grant permissions or create tools.",parameters:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1,...t.length<=100?{enum:t.map(r=>r.name)}:{},description:"Profile skill name from the Available profile skills list."}},required:["name"]},execute:i(async r=>{let o=T(r.args,"name");if(!n.get(o))return S(r.callId,"profile_skill_read",`Profile skill ${o} is not in the active enabled skill catalog.`);let a=await e.readProfileSkill(o);return{toolCallId:r.callId,name:"profile_skill_read",ok:!0,contentText:JSON.stringify({ok:!0,action:"profile_skill_read",output:`Loaded profile skill ${a.name}.`,data:{skill:a}},null,2),data:{skill:a}}},"execute")}]}i(Ci,"createOpenPondProfileSkillModelToolDefinitions");function Ei(e){let t=Array.from(new Map(e.connectedApps.map(r=>[r.provider,r])).values()).sort((r,o)=>r.label.localeCompare(o.label));if(t.length===0)return[];let n=t.map(r=>r.provider);return[{name:"connected_app_skill_read",description:"Read product-owned operating instructions for one server-validated connected app provider before using that provider's workflow.",parameters:{type:"object",additionalProperties:!1,properties:{provider:{type:"string",enum:n,description:"Connected app provider id from the Connected apps available in this turn list."}},required:["provider"]},execute:i(async r=>{let o=T(r.args,"provider");if(!n.includes(o))return S(r.callId,"connected_app_skill_read",`Connected app provider ${o} is not available in this turn.`);let s=st(o);return s?{toolCallId:r.callId,name:"connected_app_skill_read",ok:!0,contentText:JSON.stringify({ok:!0,action:"connected_app_skill_read",output:`Loaded connected app instructions for ${s.provider}.`,data:{skill:s}},null,2),data:{skill:s}}:S(r.callId,"connected_app_skill_read",`Connected app instructions are not available for ${o}.`)},"execute")}]}i(Ei,"createConnectedAppSkillModelToolDefinitions");function Mi(e){if(e.actionCatalog.length===0)return[];let t=new Map(e.actionCatalog.map(c=>[c.id,c])),n=i(()=>t.size>0,"enabled");if(e.trainingHarness)return e.trainingHarness.actionBindings.map(c=>{let l=t.get(c.actionId);if(!l)throw new Error(`Taskset Harness action ${c.actionId} is not available in the active Profile.`);return{name:c.modelToolName,description:c.description,parameters:structuredClone(c.inputSchema),enabled:n,execute:i(u=>Ke({action:l,context:u,deps:e,resultToolName:c.modelToolName,compactProfileResultForModel:!0,input:Ao({binding:c,arguments:u.args,taskId:e.trainingHarness.taskId})}),"execute")}});let r=new Map(e.actionCatalog.flatMap(c=>{let l=c.sourceActionId??c.name??c.id;return ne.includes(l)?[[l,c]]:[]})),o=e.executeCrossSystemTool&&ne.every(c=>r.has(c))?lt.map(c=>({name:c.name,description:c.description,parameters:structuredClone(c.parameters),enabled:n,execute:i(l=>e.executeCrossSystemTool({modelId:l.model,localProjectId:l.session.localProjectId??(l.session.workspaceKind==="local_project"?l.session.workspaceId??null:null),turnId:l.turnId,callId:l.callId,name:c.name,args:l.args,userPrompt:l.userPrompt,taskId:So(l.turnMetadata),signal:l.signal}),"execute")})):[],s=e.actionCatalog.filter(c=>{let l=w(c.implementation),u=c.sourceActionId??c.name??c.id;return!ne.includes(u)&&(!!c.agentId||l?.type==="openpond-profile-action")}),a=new Map;for(let c of s){let l=mn(c);l&&a.set(l,(a.get(l)??0)+1)}let d=s.flatMap(c=>{let l=i(f=>({name:f,description:[c.description??`Run the ${c.label??c.name??c.id} Profile Agent action.`,`This tool is scoped to action ${c.id}; pass the action input directly.`].join(" "),parameters:To(c),enabled:n,execute:i(m=>Ke({action:c,context:m,deps:e,resultToolName:f,compactProfileResultForModel:!0,input:m.args}),"execute")}),"definition"),u=Io(c),p=mn(c);return p&&p!==u&&a.get(p)===1?[l(p)]:[l(u)]});return[...o,...d,{name:"openpond_action_search",description:"Search the selected or mentioned OpenPond action catalog. Returns scoped action ids that may be runnable.",parameters:{type:"object",additionalProperties:!1,properties:{query:{type:"string",minLength:1},limit:{type:"integer",minimum:1,maximum:20}},required:["query"]},enabled:n,execute:i(async c=>{let l=T(c.args,"query").toLowerCase(),u=typeof c.args.limit=="number"?Math.min(Math.max(Math.floor(c.args.limit),1),20):10,p=e.actionCatalog.filter(f=>Lo(f).includes(l)).slice(0,u).map(Do);return{toolCallId:c.callId,name:"openpond_action_search",ok:!0,contentText:JSON.stringify({ok:!0,action:"openpond_action_search",output:`Found ${p.length} action${p.length===1?"":"s"}.`,data:{actions:p}},null,2),data:{actions:p}}},"execute")},{name:"openpond_action_run",description:"Run one allowed OpenPond action from the scoped action catalog by stable actionId.",parameters:{type:"object",additionalProperties:!1,properties:{actionId:{type:"string",minLength:1},input:{type:"object",additionalProperties:!0},projectId:{type:"string",minLength:1},agentId:{type:"string",minLength:1}},required:["actionId"]},enabled:n,execute:i(async c=>{let l=T(c.args,"actionId"),u=t.get(l);return u?Ke({action:u,context:c,deps:e,resultToolName:"openpond_action_run",compactProfileResultForModel:!0,input:w(c.args.input)??{},requestedProjectId:y(c.args.projectId)??void 0,requestedAgentId:y(c.args.agentId)??void 0}):S(c.callId,"openpond_action_run",`Action ${l} is not in the scoped allowed action catalog.`)},"execute")}]}i(Mi,"createOpenPondActionModelToolDefinitions");function Io(e){let n=(e.sourceActionId??e.name??e.label??e.id).toLowerCase().replace(/[^a-z0-9_]+/g,"_").replace(/^_+|_+$/g,"").slice(0,44)||"action",r=ho("sha256").update(e.id).digest("hex").slice(0,8);return`agent_${n}_${r}`}i(Io,"directOpenPondActionToolName");function mn(e){let t=y(w(e.implementation)?.actionId)??e.sourceActionId??e.name??e.id;return/^[A-Za-z0-9_-]{1,64}$/.test(t)?t:null}i(mn,"directOpenPondActionAliasName");function To(e){let t=w(e.inputSchema);return t?.type==="object"?structuredClone(t):{type:"object",additionalProperties:!0,description:typeof e.inputSchema=="string"?`Input must satisfy the Profile schema ${e.inputSchema}.`:"Input accepted by this Profile Agent action."}}i(To,"actionInputSchema");async function Ke(e){let{action:t,context:n,deps:r,resultToolName:o}=e,s=w(t.implementation);if(s?.type==="openpond-profile-action"){let u=A({session:n.session});if(L(u))return S(n.callId,o,`Action ${t.id} is a local profile action and cannot run while Working in Hybrid or sandbox. Use a sandbox action for hosted workspace work, or switch Working in to Local before running this profile action.`);if(!r.executeProfileAction)return S(n.callId,o,`Action ${t.id} is a profile action, but profile action execution is not configured.`);let p=y(s.actionId)??t.id,f=y(e.input.prompt)??y(e.input.message)??n.userPrompt,m=await r.executeProfileAction({action:p,input:{...e.input,prompt:f,message:f,source:"openpond_app"},metadata:{source:"openpond_app",selectedActionId:p,selectedActionLabel:t.label??t.name??p,selectedBy:"native_model_tool",displayPrompt:n.userPrompt,sessionId:n.session.id}}),h=e.compactProfileResultForModel?vo(m):m;return{toolCallId:n.callId,name:o,ok:!0,contentText:JSON.stringify({ok:!0,action:o,output:`Ran profile action ${p}.`,data:{result:h}},null,2),data:{result:m}}}if(s?.type==="openpond-project-action"){let u=A({session:n.session});if(L(u))return S(n.callId,o,`Action ${t.id} is a local Project Action and cannot run while Working in Hybrid or sandbox. Switch Working in to Local.`);if(!r.executeProjectAction)return S(n.callId,o,`Action ${t.id} is a local Project Action, but local action execution is not configured.`);let p=y(s.projectRoot)??t.sourcePath,f=y(s.projectId),m=y(s.actionId)??t.id;if(!p)return S(n.callId,o,`Action ${t.id} is missing its local Project root.`);if(!f||f!==n.session.localProjectId)return S(n.callId,o,`Action ${t.id} is not authorized for the selected local Project.`);let h=await r.executeProjectAction({action:m,input:e.input,metadata:{source:"openpond_project_action",projectRoot:p,projectId:f,selectedActionId:m,selectedActionLabel:t.label??t.name??m,selectedBy:"native_model_tool",displayPrompt:n.userPrompt,sessionId:n.session.id,turnId:n.turnId,toolCallId:n.callId}});return{toolCallId:n.callId,name:o,ok:!0,contentText:JSON.stringify({ok:!0,action:o,output:`Ran Project Action ${m}.`,data:{result:h}},null,2),data:{result:h}}}if(s?.type==="openpond-hosted-project-action")return un({action:t,context:n,implementation:s,actionInput:e.input,requestedProjectId:e.requestedProjectId,resultToolName:o,executeProjectAction:r.executeProjectAction});let a={actionName:t.sourceActionId??t.name??t.id,input:e.input},d=y(s?.projectId);if(e.requestedProjectId){if(!d||e.requestedProjectId!==d)return S(n.callId,o,`Project ${e.requestedProjectId} is not authorized for action ${t.id}.`);a.projectId=e.requestedProjectId}else d&&(a.projectId=d);let c=t.agentId??y(s?.agentId);if(e.requestedAgentId){if(!c||e.requestedAgentId!==c)return S(n.callId,o,`Agent ${e.requestedAgentId} is not authorized for action ${t.id}.`);a.agentId=e.requestedAgentId}else c&&(a.agentId=c);let l=await r.executeWorkspaceTool(n.session.id,{action:"sandbox_run_action",args:a,source:"chat_action"},{turnId:n.turnId,workspaceDiffBaseline:n.workspaceDiffBaseline});return C(n.callId,o,l)}i(Ke,"executeScopedOpenPondAction");function vo(e){let t=w(e),n=y(t?.stdout);if(!n)return e;let r;try{r=JSON.parse(n)}catch{return e}let o=w(r)?.result??r,s=w(o),a=w(s?.metadata);for(let c of["snapshot","decision","submission","receipt"])if(a&&Object.hasOwn(a,c))return a[c];let d=y(s?.text);if(d)try{return JSON.parse(d)}catch{return d}return o}i(vo,"compactProfileActionResult");function So(e){let t=e?.crossSystemTaskId;return typeof t=="string"&&t.trim()?t.trim().slice(0,240):void 0}i(So,"crossSystemTaskIdFromTurnMetadata");function Ao(e){let t=structuredClone(e.arguments);for(let n of e.binding.episodeArgumentBindings){if(Object.hasOwn(t,n.argument))throw new Error(`Harness action ${e.binding.actionId} cannot accept caller-supplied episode argument ${n.argument}.`);t[n.argument]=e.taskId}return t}i(Ao,"bindHarnessEpisodeArguments");function Po(e,t){let n=[],r=new Set;for(let o of kn(e.data)){let s=`sandbox:file:${o.path}`;r.has(s)||(r.add(s),n.push({ref:s,title:o.path,snippet:o.snippet??"Sandbox file match",score:.8,metadata:{source:"sandbox",path:o.path,line:o.line??null}}))}return{query:t,scope:"sandbox",items:n,truncated:!1}}i(Po,"sandboxWorkspaceToolSearchResult");async function Co(e){let t=e.ref.startsWith("sandbox:dir:"),n=e.ref.slice(t?12:13),r=await e.executeWorkspaceTool(e.session.id,{action:t?"sandbox_list_files":"sandbox_read_file",args:{path:n||"."},source:"chat_action"},{turnId:e.turnId,workspaceDiffBaseline:e.workspaceDiffBaseline});if(!r.ok)throw new Error(r.output||`Sandbox resource read failed: ${n||"."}`);if(t){let d=kn(r.data),c=d.map(l=>`${l.kind??"file"} ${l.path}`).join(`
39
39
  `);return{ref:`sandbox:dir:${n||"."}`,kind:"sandbox.dir",title:n||".",contentType:"inode/directory",contentText:c,metadata:{path:n||".",entryCount:d.length,entries:d,ok:r.ok},relatedRefs:d.slice(0,50).map(l=>l.kind==="directory"?`sandbox:dir:${l.path}`:`sandbox:file:${l.path}`),truncation:{truncated:!1,originalBytes:Buffer.byteLength(c,"utf8"),returnedBytes:Buffer.byteLength(c,"utf8")}}}let o=xn(r.data,n);if(o.binary)return{ref:`sandbox:file:${n}`,kind:"sandbox.file",title:n,contentType:o.contentType,metadata:{path:n,ok:r.ok,binary:!0,sizeBytes:o.sizeBytes},relatedRefs:[`sandbox:dir:${gn(n)}`],truncation:{truncated:!1,originalBytes:o.sizeBytes??0,returnedBytes:0,reason:"binary"}};let s=jo(r.data)??r.output,a=Buffer.byteLength(s,"utf8");return{ref:`sandbox:file:${n}`,kind:"sandbox.file",title:n,contentType:o.contentType,contentText:s,metadata:{path:n,ok:r.ok,binary:!1,sizeBytes:o.sizeBytes},relatedRefs:[`sandbox:dir:${gn(n)}`],truncation:{truncated:!1,originalBytes:a,returnedBytes:a}}}i(Co,"readSandboxResourceViaWorkspaceTool");function Eo(e){let t=e.toLowerCase(),r=[{ref:"git:status:working-tree",title:"Git status",snippet:"Current branch, upstream, ahead/behind state, and changed files.",score:.9,metadata:{source:"git",kind:"status"},haystack:"git status working tree changed files branch upstream dirty"},{ref:"git:diff:working-tree",title:"Git working tree diff",snippet:"Unstaged working tree diff.",score:.85,metadata:{source:"git",kind:"diff",staged:!1},haystack:"git diff working tree unstaged patch changes"},{ref:"git:diff:staged",title:"Git staged diff",snippet:"Staged git diff.",score:.84,metadata:{source:"git",kind:"diff",staged:!0},haystack:"git diff staged cached patch index changes"}].filter(o=>o.haystack.includes(t)||o.ref.includes(t)).map(({haystack:o,...s})=>s);return{query:e,scope:"git",items:r,truncated:!1}}i(Eo,"gitResourceSearchResult");async function Mo(e){let t=A({session:e.session}),n=L(t),r=Wo(e.ref,n),o=await e.executeWorkspaceTool(e.session.id,{action:r.name,args:r.args,source:"chat_action"},{turnId:e.turnId,workspaceDiffBaseline:e.workspaceDiffBaseline});if(e.ref==="git:status:working-tree"){let a=JSON.stringify(o.data??{output:o.output},null,2);return{ref:e.ref,kind:"git.status",title:"Git status",contentType:"application/json",contentText:a,metadata:{action:r.name,ok:o.ok,changedFileRefs:fn(o.data,n)},relatedRefs:fn(o.data,n),truncation:{truncated:!1,originalBytes:Buffer.byteLength(a,"utf8"),returnedBytes:Buffer.byteLength(a,"utf8")}}}let s=qo(o.data)??o.output;return{ref:e.ref,kind:"git.diff",title:e.ref==="git:diff:staged"?"Git staged diff":"Git working tree diff",contentType:"text/x-diff",contentText:s,metadata:{action:r.name,ok:o.ok,staged:e.ref==="git:diff:staged"},relatedRefs:[],truncation:{truncated:!1,originalBytes:Buffer.byteLength(s,"utf8"),returnedBytes:Buffer.byteLength(s,"utf8")}}}i(Mo,"readGitResourceViaWorkspaceTool");function Wo(e,t){if(e==="git:status:working-tree")return{name:t?"sandbox_git_status":"git_status",args:{}};if(e==="git:diff:working-tree")return{name:t?"sandbox_git_diff":"git_diff",args:{}};if(e==="git:diff:staged")return{name:t?"sandbox_git_diff":"git_diff",args:{staged:!0}};throw new Error(`Unsupported git resource ref: ${e}`)}i(Wo,"gitResourceWorkspaceAction");function Oo(e,t){return e.startsWith("sandbox:file:")||e.startsWith("sandbox:dir:")?e:L(t)?e.startsWith("workspace:file:")?`sandbox:file:${e.slice(15)}`:e.startsWith("workspace:dir:")?`sandbox:dir:${e.slice(14)}`:null:null}i(Oo,"sandboxResourceRefForExecutionTarget");function fn(e,t=!1){let n=w(e),r=w(n?.status);return(Array.isArray(n?.files)?n.files:Array.isArray(r?.files)?r.files:[]).filter(s=>!!s&&typeof s=="object"&&!Array.isArray(s)).map(s=>y(s.path)).filter(s=>!!s).map(s=>`${t?"sandbox":"workspace"}:file:${s}`)}i(fn,"gitChangedFileRefs");function qo(e){let t=w(e);return y(t?.diff)??y(w(t?.result)?.diff)}i(qo,"gitDiffText");function kn(e){let t=wn(e,["matches","files","entries"]),n=[];for(let r of t){let o=y(r.path)??y(r.name);o&&n.push({path:o,snippet:y(r.text)??y(r.snippet)??y(r.content)??void 0,line:typeof r.line=="number"?r.line:null,kind:y(r.kind)??y(r.type)})}return n}i(kn,"sandboxPathItems");function wn(e,t){if(!e||typeof e!="object")return[];let n=e,r=[];for(let o of t){let s=n[o];Array.isArray(s)&&r.push(...s.filter(a=>!!a&&typeof a=="object"&&!Array.isArray(a)))}for(let o of Object.values(n))o&&typeof o=="object"&&!Array.isArray(o)&&r.push(...wn(o,t));return r}i(wn,"nestedArraysForKeys");function jo(e){let t=w(e),n=bn(e),r=y(n?.contentsBase64)??y(t?.contentsBase64);if(r&&!xn(e,y(n?.path)??"").binary)try{return Buffer.from(r,"base64").toString("utf8")}catch{return null}return y(t?.content)??y(t?.text)??y(t?.contents)??y(n?.content)??y(n?.text)}i(jo,"sandboxFileContent");function Bo(e){let t=e.toLowerCase();return t.endsWith(".json")?"application/json":t.endsWith(".md")||t.endsWith(".mdx")?"text/markdown":/\.(css|csv|html|js|jsx|ts|tsx|txt|yaml|yml)$/.test(t)?"text/plain":null}i(Bo,"contentTypeForResourcePath");function bn(e){let t=w(e);return w(t?.file)??w(w(t?.result)?.file)}i(bn,"sandboxFileRecord");function xn(e,t){let n=bn(e),r=y(n?.contentType)??y(n?.mimeType)??Bo(t),o=hn(n?.sizeBytes)??hn(n?.size);return{binary:n?.binary===!0||n?.isBinary===!0||(r?$o(r):No(t)),contentType:r,...o!==null?{sizeBytes:o}:{}}}i(xn,"sandboxFileMetadata");function $o(e){return e.startsWith("image/")||e.startsWith("video/")||e.startsWith("audio/")||e==="application/pdf"||e==="application/octet-stream"||e.includes("zip")||e.includes("sqlite")}i($o,"isBinaryContentType");function No(e){return/\.(7z|avif|db|gif|gz|ico|jpe?g|mov|mp4|pdf|png|sqlite|tar|webp|xlsm?|xlsx|zip)$/i.test(e)}i(No,"isLikelyBinaryResourcePath");function gn(e){let t=e.replace(/\/+$/,""),n=t.lastIndexOf("/");return n<=0?".":t.slice(0,n)}i(gn,"parentResourcePath");function Ge(e,t){return{toolCallId:e,name:"resource_search",ok:!0,contentText:JSON.stringify({ok:!0,action:"resource_search",output:`Found ${t.items.length} resource${t.items.length===1?"":"s"}.`,data:{result:t}},null,2),data:{result:t}}}i(Ge,"resourceSearchResultToModelToolResult");function Ve(e,t){return{toolCallId:e,name:"resource_read",ok:!0,contentText:JSON.stringify({ok:!0,action:"resource_read",output:`Read resource ${t.ref}.`,data:{resource:t}},null,2),data:{resource:t}}}i(Ve,"resourceReadResultToModelToolResult");function T(e,t){let n=e[t];if(typeof n!="string"||!n.trim())throw new Error(`${t} is required`);return n.trim()}i(T,"stringArg");function Xe(e,t,n={}){let r=e[t];if(typeof r!="string"||!n.allowEmpty&&r.length===0)throw new Error(`${t} is required`);return r}i(Xe,"exactTextArg");function Lo(e){return[e.id,e.name,e.label,e.description,e.sourceActionId,e.agentId].filter(t=>typeof t=="string"&&t.trim().length>0).join(" ").toLowerCase()}i(Lo,"actionCatalogText");function Do(e){let t=w(e.implementation),n=t?.type!=="openpond-profile-action";return{actionId:e.id,name:e.name??e.id,label:e.label??e.name??e.id,description:e.description??null,directRunAllowed:n,inputSchema:e.inputSchema??null,outputSchema:e.outputSchema??null,agentId:e.agentId??y(t?.agentId),projectId:y(t?.projectId),sourceActionId:e.sourceActionId??null}}i(Do,"actionCatalogItemForModel");function S(e,t,n){return{toolCallId:e,name:t,ok:!1,contentText:JSON.stringify({ok:!1,action:t,output:n},null,2)}}i(S,"failedActionToolResult");function w(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}i(w,"asRecord");function y(e){return typeof e=="string"&&e.trim()?e.trim():null}i(y,"stringValue");function hn(e){return typeof e=="number"&&Number.isFinite(e)?e:null}i(hn,"numberValue");var Rn=class{static{i(this,"NativeToolCallAccumulator")}calls=new Map;append(t){t.forEach((n,r)=>{let o=n,s=typeof o.index=="number"&&Number.isInteger(o.index)?o.index:null,a=Ye(n.id),d=s!==null?`index:${s}`:a?`id:${a}`:`ordinal:${r}`,c=this.calls.get(d)??{key:d,index:s,id:null,type:"function",name:"",argumentsJson:""};a&&(c.id=a);let l=Ye(n.type);l&&(c.type=l);let u=n.function&&typeof n.function=="object"?n.function:{},p=Ye(u.name);p&&(c.name+=p),typeof u.arguments=="string"&&(c.argumentsJson+=u.arguments),this.calls.set(d,c)})}completed(t={}){if(t.strict&&[...this.calls.values()].some(n=>!n.id||!n.name||n.type!=="function"||!n.argumentsJson.trim()))throw new Error("Model returned an incomplete function call.");return[...this.calls.values()].sort((n,r)=>(n.index??Number.MAX_SAFE_INTEGER)-(r.index??Number.MAX_SAFE_INTEGER)).map((n,r)=>Fo(n,r)).filter(n=>!!n)}};function qi(e,t,n={}){let r=n.continuation;return{role:"assistant",content:e.trim()||(r?"":null),...r?{continuation:r}:{},tool_calls:t.map(o=>({id:o.id,type:o.hostedToolCall.type||"function",function:{name:o.name,arguments:Uo(o.argumentsJson,n.maxArgumentCharacters)}}))}}i(qi,"assistantMessageForNativeToolCalls");function ji(e,t={}){return{role:"tool",tool_call_id:e.toolCallId,content:_n(e.contentText,t.maxContentCharacters)}}i(ji,"toolResultMessage");function Bi(e){let t=e.argumentsJson.trim();if(!t)return{};let n=JSON.parse(t);if(!n||typeof n!="object"||Array.isArray(n))throw new Error("Tool arguments must be a JSON object.");return n}i(Bi,"parseNativeToolArguments");function $i(e,t){return{toolCallId:e.id,name:e.name,ok:!1,contentText:JSON.stringify({ok:!1,action:e.name,output:`Invalid ${e.name} tool arguments: ${t}`,repairHint:"Retry the tool call with arguments as one valid JSON object."},null,2),data:{validationError:!0,argumentsJson:e.argumentsJson}}}i($i,"invalidNativeToolArgumentsResult");function Ni(e){return{toolCallId:e.id,name:e.name,ok:!1,contentText:JSON.stringify({ok:!1,action:e.name,output:`Unknown tool: ${e.name}`,repairHint:"Call one of the tools that was provided in this request."},null,2)}}i(Ni,"unknownNativeToolResult");function Fo(e,t){let n=e.name.trim();if(!n)return null;let r=e.id??`call_${t+1}`,o={id:r,type:e.type||"function",function:{name:n,arguments:e.argumentsJson}};return e.index!==null&&(o.index=e.index),{id:r,name:n,argumentsJson:e.argumentsJson,hostedToolCall:o}}i(Fo,"completedToolCall");function Ye(e){return typeof e=="string"&&e.trim()?e:null}i(Ye,"stringValue");function Uo(e,t){let n=e.trim();if(!n)return"{}";try{let r=JSON.parse(n);return r&&typeof r=="object"&&!Array.isArray(r)?_n(e,t):"{}"}catch{return"{}"}}i(Uo,"replayableNativeToolArguments");function _n(e,t){if(typeof t!="number"||!Number.isInteger(t)||t<500||e.length<=t)return e;try{let n=JSON.parse(e),r=Ze(n,Math.max(200,Math.floor(t/2))),o=JSON.stringify(r);if(o.length<=t)return o}catch{}return JSON.stringify({truncated:!0,originalCharacters:e.length,preview:e.slice(0,Math.max(100,t-120))})}i(_n,"boundedJsonText");function Ze(e,t){return typeof e=="string"?e.length<=t?e:`${e.slice(0,t)}
40
- [truncated after execution; ${e.length} characters total]`:Array.isArray(e)?e.slice(0,100).map(n=>Ze(n,t)):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).slice(0,100).map(([n,r])=>[n,Ze(r,t)])):e}i(Ze,"boundLongStrings");function Li(e){return{content:[{type:"text",text:e.contentText},...(e.images??[]).map(t=>({type:"image",mimeType:t.mimeType,data:t.data}))],...e.ok?{}:{isError:!0}}}i(Li,"nativeToolMcpResult");import{createHash as zo}from"node:crypto";import{promises as Ho}from"node:fs";import Jo from"node:path";var ge="openpond-work-v1",Ko="mkdir -p inputs work outputs",Go="find /workspace/inputs /workspace/work /workspace/outputs -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +",Vo=18e4,Xo=1e3,Yo=15e3,Zo=250,In=["cd /workspace/work &&",'printf "architecture="; uname -m;','printf "kernel="; uname -sr;','printf "cpu_count="; getconf _NPROCESSORS_ONLN 2>/dev/null || true;',`printf "memory_kb="; awk '/MemTotal/ {print $2}' /proc/meminfo 2>/dev/null || true;`,`printf "workspace_bytes="; df -Pk .. 2>/dev/null | awk 'NR==2 {print $4 * 1024}' || true;`,'printf "tools=";','for tool in python3 pip node npm npx pnpm java gcc g++ make git ffmpeg convert magick pandoc pdftotext pdfinfo pdftoppm curl wget jq rg; do command -v "$tool" >/dev/null 2>&1 && printf "%s " "$tool"; done;',"printf '\\n'"].join(" "),Qo=new Set(["archived","deleted","error"]);function Tn(e){let t=new Map,n=new Set;async function r(c,l,u){return e.executeWorkspaceTool(c.session.id,{action:l,args:u,source:"chat_action"},{turnId:c.turnId,workspaceDiffBaseline:c.workspaceDiffBaseline})}i(r,"execute");async function o(c){if(n.has(c.session.id))return;let l=t.get(c.session.id);if(l)return l;let u=(async()=>{let p=c.session.workspaceKind==="sandbox"&&!!c.session.workspaceId,f=p;try{if(p){let m=await r(c,"sandbox_status",{});if(!m.ok)throw new Error(m.output);if(Sn(m.data)==="stopped"){let h=await r(c,"sandbox_start",{});if(!h.ok)throw new Error(h.output)}}else{let m=await r(c,"sandbox_create",{attachToSession:!0,command:Ko,visibility:"private",networkPolicy:{internetEgress:"block",allowedHosts:[]},reuseDefaultRuntime:!1,markDefaultRuntime:!1,runtime:{runtimeProfileId:ge,workflowMode:"attempt",promotionPolicy:"none",metadata:{source:"openpond-work",experience:"work"}},metadata:{source:"openpond-work",experience:"work"}});if(!m.ok)throw new Error(m.output);f=!0}await vn(()=>r(c,"sandbox_status",{})),await a(c),n.add(c.session.id)}catch(m){throw n.delete(c.session.id),f&&await r(c,"sandbox_stop",{}).catch(()=>{}),m}})();t.set(c.session.id,u);try{await u}finally{t.get(c.session.id)===u&&t.delete(c.session.id)}}i(o,"ensureReady");async function s(c){await o(c);let l=await r(c,"sandbox_exec",{command:Go,timeoutSeconds:60,autoPreserveSource:!1});if(!l.ok)throw new Error(l.output);await a(c)}i(s,"reset");async function a(c){for(let l of e.inputs??[]){if(!l.storageName)continue;let u=await es(l),p=await r(c,"sandbox_upload_file",{path:N("inputs",l.storageName,["inputs"]),contentsBase64:u.toString("base64")});if(!p.ok)throw new Error(p.output)}}i(a,"stageInputs");async function d(c){if(!n.has(c.session.id)&&(c.session.workspaceKind!=="sandbox"||!c.session.workspaceId))return{ok:!0,action:"sandbox_stop",output:"No Work compute is attached to this task.",data:{stopped:!1,reason:"not_attached"}};let l=await r(c,"sandbox_stop",{});return l.ok&&n.delete(c.session.id),l}return i(d,"stop"),{ensureReady:o,execute:r,reset:s,stop:d}}i(Tn,"createWorkRuntimeService");async function es(e){let t=e.storageName??"unnamed";if(!e.localPath&&e.bytes===void 0)throw new Error(`Work input ${t} has no readable content.`);let n=e.bytes===void 0?await Ho.readFile(e.localPath):Buffer.from(e.bytes);if(e.sizeBytes!==void 0&&n.byteLength!==e.sizeBytes)throw new Error(`Work input ${e.storageName} size does not match its manifest.`);if(e.sha256!==void 0&&zo("sha256").update(n).digest("hex")!==e.sha256)throw new Error(`Work input ${e.storageName} hash does not match its manifest.`);return n}i(es,"workInputBytes");function N(e,t,n=["inputs","work","outputs"]){let r=ts(e);if(!n.includes(r))throw new Error(`Unknown Work area: ${r}`);let o=t.trim().replaceAll("\\","/");if(!o||o===".")return r;if(o.startsWith("/"))throw new Error("Work paths must be relative to their selected area.");let s=Jo.posix.normalize(o);if(s===".."||s.startsWith("../")||s.includes("/../"))throw new Error("Work path escaped its selected area.");return`${r}/${s}`}i(N,"workPath");async function vn(e,t={}){let n=t.timeoutMs??Vo,r=t.pollMs??Xo,o=t.now??Date.now,s=t.sleep??(c=>new Promise(l=>setTimeout(l,c))),a=o(),d="";for(;o()-a<=n;){let c=await e();if(!c.ok)throw new Error(c.output);if(d=Sn(c.data),d==="running")return c;if(Qo.has(d))throw new Error(`Work sandbox entered ${d} during startup.`);await s(r)}throw new Error(`Work sandbox did not become ready within ${n}ms${d?` (last state: ${d})`:""}.`)}i(vn,"waitForWorkSandboxReady");async function Ji(e,t={}){let n=t.timeoutMs??Yo,r=t.pollMs??Zo,o=t.now??Date.now,s=t.sleep??(c=>new Promise(l=>setTimeout(l,c))),a=o(),d=null;for(;o()-a<=n;){if(d=await e(),!d.ok||ns(d.data))return d;await s(r)}return d??e()}i(Ji,"waitForWorkReceiptSettlement");function ts(e){if(typeof e!="string"||!e.trim())throw new Error("A required string argument is missing.");return e.trim()}i(ts,"requiredString");function Sn(e){if(!e||typeof e!="object"||Array.isArray(e))return"";let t=e.sandbox;if(!t||typeof t!="object"||Array.isArray(t))return"";let n=t.state;return typeof n=="string"?n:""}i(Sn,"sandboxState");function ns(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e,n=t.sandbox&&typeof t.sandbox=="object"&&!Array.isArray(t.sandbox)?t.sandbox:{};return(Array.isArray(t.receipts)?t.receipts:Array.isArray(n.receipts)?n.receipts:[]).some(o=>o&&typeof o=="object"&&!Array.isArray(o)&&o.status==="captured")}i(ns,"receiptSettlementComplete");import{randomUUID as rs}from"node:crypto";function he(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e,n=t.sandbox;if(!n||typeof n!="object"||Array.isArray(n))return t;let r=n;return{...t,sandbox:{id:r.id,name:r.name,state:r.state,resources:r.resources,createdAt:r.createdAt,updatedAt:r.updatedAt}}}i(he,"workModelData");function na(e){let t=Tn(e);async function n(a,d,c,l){let u=await t.execute(a,d,c);return Qe(a.callId,l,u)}i(n,"execute");async function r(a){await t.ensureReady(a)}i(r,"ensureSandbox");let o=i((a,d,c)=>async l=>{let u=c(l);return await r(l),await n(l,d,u,a)},"withSandbox"),s=[...e.createScheduledWork?[{name:"schedule_work",description:"Create a durable recurring workflow attached to the current chat when the user directly asks to schedule the current or another task and provides an exact cadence, local date/time, and timezone. Every scheduled run is sent through the attached chat so its output appears in that conversation. Use the conversation context to preserve the task prompt and ask only for genuinely unavailable required scheduling details. The scheduled prompt must describe only the work to perform when the schedule fires, not the scheduling request itself.",parameters:os(),execute:i(async a=>{let d=ct.parse({...a.args,clientRequestId:`${a.turnId}:${a.callId}`,sourceTurnId:a.turnId,targetSessionId:a.session.id,modelId:a.provider==="openpond"?a.model:"openpond-chat"}),c=await e.createScheduledWork(d);return{toolCallId:a.callId,name:"schedule_work",ok:!0,contentText:JSON.stringify({ok:!0,action:"schedule_work",output:`Created scheduled Work: ${d.name}.`,data:c}),data:c}},"execute")}]:[],{name:"work_capabilities",description:"Return the truthful Work output, preview, validation, and destination matrix without starting sandbox compute.",parameters:et(),execute:i(async a=>({toolCallId:a.callId,name:"work_capabilities",ok:!0,contentText:JSON.stringify({ok:!0,action:"work_capabilities",output:"Returned the supported Work formats and durable destinations. Sandbox compute was not started.",data:{compute:"lazy",formats:Ie,destinations:["managed_local_file","approved_connected_resource","deployment_url"],constraints:{maxLocalOutputBytes:1e7,repositoryChangesRequireDevelopment:!0,browserAndLocalAppControl:{location:"host",requiresTurnPermission:!0,guestCredentials:!1}}}},null,2),data:{compute:"lazy",formats:Ie,destinations:["managed_local_file","approved_connected_resource","deployment_url"]}}),"execute")},{name:"work_environment",description:"Start Work compute only when it is needed, then return live sandbox status and the stable /workspace/inputs, /workspace/work, and /workspace/outputs layout.",parameters:et(),execute:i(async a=>{await r(a);let d=await t.execute(a,"sandbox_status",{});if(!d.ok)return Qe(a.callId,"work_environment",d);let l=await t.execute(a,"sandbox_exec",{command:In,timeoutSeconds:30,autoPreserveSource:!1});return{toolCallId:a.callId,name:"work_environment",ok:d.ok&&l.ok,contentText:JSON.stringify({ok:d.ok&&l.ok,action:"work_environment",output:l.ok?"Work compute is ready. Environment facts were measured live.":l.output,data:{runtimeProfileId:ge,workspaceRoot:"/workspace",cwd:"/workspace/work",layout:{inputs:"/workspace/inputs",work:"/workspace/work",outputs:"/workspace/outputs"},status:he(d.data)??null,probe:he(l.data)??{output:l.output},executionBacked:l.ok}},null,2),data:{runtimeProfileId:ge,workspaceRoot:"/workspace",cwd:"/workspace/work",status:d.data??null,probe:l.data??null,executionBacked:l.ok}}},"execute")},{name:"work_list_files",description:"List files in the Work scratch, input, or completed-output area. This lazily starts Work compute.",parameters:{type:"object",additionalProperties:!1,properties:{area:An(),path:{type:"string",description:"Optional relative path inside the selected area."},recursive:{type:"boolean"}},required:["area"]},execute:o("work_list_files","sandbox_list_files",a=>({path:N(a.args.area,H(a.args.path)),recursive:typeof a.args.recursive=="boolean"?a.args.recursive:!1}))},{name:"work_read_file",description:"Read a bounded file from Work inputs, scratch space, or completed-output candidates.",parameters:{type:"object",additionalProperties:!1,properties:{area:An(),path:{type:"string",minLength:1},maxBytes:{type:"integer",minimum:1,maximum:1e6}},required:["area","path"]},execute:o("work_read_file","sandbox_read_file",a=>({path:N(a.args.area,_(a.args.path)),maxBytes:typeof a.args.maxBytes=="number"?Math.min(Math.max(Math.floor(a.args.maxBytes),1),1e6):512e3}))},{name:"work_write_file",description:"Write a UTF-8 Work scratch file or completed-output candidate. Use area=outputs only for a finished result that is ready to validate and save.",parameters:{type:"object",additionalProperties:!1,properties:{area:{type:"string",enum:["work","outputs"]},path:{type:"string",minLength:1},content:{type:"string"}},required:["area","path","content"]},execute:o("work_write_file","sandbox_write_file",a=>({path:N(a.args.area,_(a.args.path),["work","outputs"]),content:_(a.args.content,!0),autoPreserveSource:!1}))},{name:"work_edit_file",description:"Edit a Work scratch file or output candidate by exact text replacement after reading it.",parameters:{type:"object",additionalProperties:!1,properties:{area:{type:"string",enum:["work","outputs"]},path:{type:"string",minLength:1},oldText:{type:"string",minLength:1},newText:{type:"string"},replaceAll:{type:"boolean"}},required:["area","path","oldText","newText"]},execute:o("work_edit_file","sandbox_edit_file",a=>({path:N(a.args.area,_(a.args.path),["work","outputs"]),oldText:_(a.args.oldText),newText:_(a.args.newText,!0),replaceAll:a.args.replaceAll===!0,autoPreserveSource:!1}))},{name:"work_delete_file",description:"Delete a Work scratch file or an output candidate. Saved outputs outside the sandbox are unaffected.",parameters:{type:"object",additionalProperties:!1,properties:{area:{type:"string",enum:["work","outputs"]},path:{type:"string",minLength:1},recursive:{type:"boolean"}},required:["area","path"]},execute:o("work_delete_file","sandbox_delete_file",a=>({path:N(a.args.area,_(a.args.path),["work","outputs"]),recursive:a.args.recursive===!0,autoPreserveSource:!1}))},{name:"work_exec",description:"Run a bounded shell command from /workspace/work. Write finished deliverables to ../outputs and inspect them; the runtime preserves output files automatically when the turn ends.",parameters:{type:"object",additionalProperties:!1,properties:{command:{type:"string",minLength:1},timeoutSeconds:{type:"integer",minimum:1,maximum:3600}},required:["command"]},execute:o("work_exec","sandbox_exec",a=>({command:`cd /workspace/work && ${_(a.args.command)}`,timeoutSeconds:typeof a.args.timeoutSeconds=="number"?Math.min(Math.max(Math.floor(a.args.timeoutSeconds),1),3600):120,autoPreserveSource:!1}))},{name:"work_open_port",description:"Open a bounded Work sandbox port for a temporary preview. This is not a production deployment.",parameters:{type:"object",additionalProperties:!1,properties:{port:{type:"integer",minimum:1,maximum:65535},label:{type:"string"}},required:["port"]},execute:o("work_open_port","sandbox_open_port",a=>({port:a.args.port,label:H(a.args.label)||"Work preview",access:"private",autoStart:!0}))},{name:"work_checkpoint",description:"Create a resumable checkpoint of the current Work sandbox before a substantial revision.",parameters:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1,maxLength:120}},required:["name"]},execute:o("work_checkpoint","sandbox_snapshot_create",a=>({name:_(a.args.name)}))},{name:"work_prepare_agent",description:"Create a validated OpenPond Agent SDK project in Work scratch space. Use this when the requested deliverable is a new reusable Agent, not for ordinary documents, code snippets, or one-off scripts.",parameters:{type:"object",additionalProperties:!1,properties:{directory:{type:"string",minLength:1,maxLength:180,description:"Relative directory inside Work scratch space for the Agent source."},template:{type:"string",enum:["blank-agent","customer-reply-agent","integration-heavy-agent"]}},required:["directory","template"]},execute:o("work_prepare_agent","sandbox_prepare_agent",a=>({directory:_(a.args.directory),template:_(a.args.template)}))},{name:"work_save_agent_package",description:"Run the OpenPond Agent SDK build, validation, and eval publish gate in the Work sandbox, then save the complete source as an immutable content-addressed Agent-package output. Use this only after finishing and reviewing the Agent source.",parameters:{type:"object",additionalProperties:!1,properties:{directory:{type:"string",minLength:1,maxLength:180,description:"Relative Agent project directory inside Work scratch space."},agentId:{type:"string",minLength:1,maxLength:191},title:{type:"string",minLength:1,maxLength:240}},required:["directory"]},execute:o("work_save_agent_package","sandbox_save_agent_package",a=>({directory:_(a.args.directory),agentId:H(a.args.agentId)||void 0,title:H(a.args.title)||void 0}))},{name:"work_save_output",description:"Explicitly copy one completed file from /workspace/outputs to durable OpenPond output storage before turn completion. Normal Work turns preserve output files automatically.",parameters:{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,description:"Path relative to /workspace/outputs, for example report.md."},suggestedName:{type:"string",minLength:1,maxLength:180},validation:{type:"array",maxItems:32,items:{type:"object",additionalProperties:!1,properties:{kind:{type:"string",enum:["structural","visual","test","user_review"]},status:{type:"string",enum:["passed","failed","not_run"]},label:{type:"string",minLength:1,maxLength:240},detail:{type:"string",maxLength:4e3},ref:{type:"string",maxLength:4096}},required:["kind","status","label"]}}},required:["path"]},execute:o("work_save_output","sandbox_save_output",a=>({path:N("outputs",_(a.args.path),["outputs"]),suggestedName:H(a.args.suggestedName)||void 0,validation:Array.isArray(a.args.validation)?a.args.validation:[]}))},{name:"work_register_external_output",description:"Register a completed result that already lives in an approved connected service or at a production deployment URL. Use only after the provider write or deployment succeeded and returned a stable resource id or URL.",parameters:{type:"object",additionalProperties:!1,properties:{kind:{type:"string",enum:["external_file","deployment"]},title:{type:"string",minLength:1,maxLength:240},provider:{type:"string",minLength:1,maxLength:120},resourceId:{type:"string",minLength:1,maxLength:500},url:{type:"string",minLength:1,maxLength:4096},contentType:{type:"string",minLength:1,maxLength:200},validation:{type:"array",maxItems:32,items:{type:"object",additionalProperties:!1,properties:{kind:{type:"string",enum:["structural","visual","test","user_review"]},status:{type:"string",enum:["passed","failed","not_run"]},label:{type:"string",minLength:1,maxLength:240},detail:{type:"string",maxLength:4e3},ref:{type:"string",maxLength:4096}},required:["kind","status","label"]}}},required:["kind","title","resourceId","url"]},execute:i(async a=>{let d=_(a.args.kind),c=_(a.args.title),l=_(a.args.resourceId),u=ss(a.args.url),p=Array.isArray(a.args.validation)?a.args.validation:[],f={id:rs(),title:c,sourceTaskId:a.session.id,sourceTurnId:a.turnId,revision:1,createdAt:new Date().toISOString(),validation:p},m=d==="deployment"?{...f,kind:"deployment",deploymentId:l,url:u}:{...f,kind:"external_resource",provider:H(a.args.provider)||"external",resourceId:l,url:u,contentType:H(a.args.contentType)||null};return{toolCallId:a.callId,name:"work_register_external_output",ok:!0,contentText:JSON.stringify({ok:!0,action:"work_register_external_output",output:`Registered ${c} as a Work output.`,data:{outputRef:m}},null,2),data:{outputRef:m}}},"execute")},{name:"work_stop",description:"Stop Work compute after durable outputs have been saved. Saved OutputRefs remain available.",parameters:et(),execute:i(async a=>Qe(a.callId,"work_stop",await t.stop(a)),"execute")}];return e.automaticLifecycle?s.filter(a=>a.name!=="work_save_output"&&a.name!=="work_stop"):s}i(na,"createWorkModelToolDefinitions");function os(){return{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1,maxLength:180},prompt:{type:"string",minLength:1,maxLength:2e4},recurrence:{type:"object",additionalProperties:!1,properties:{version:{type:"integer",enum:[1]},kind:{type:"string",enum:["once","daily","weekdays","weekly","monthly"]},timeZone:{type:"string",minLength:1,maxLength:100},startDate:{type:"string",pattern:"^\\d{4}-\\d{2}-\\d{2}$"},localTime:{type:"string",pattern:"^\\d{2}:\\d{2}$"},weekdays:{type:"array",minItems:1,maxItems:7,items:{type:"string",enum:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]}},dayOfMonth:{type:"integer",minimum:1,maximum:31},end:{type:"object",additionalProperties:!1,properties:{kind:{type:"string",enum:["never","on_date","after_occurrences"]},date:{type:"string",pattern:"^\\d{4}-\\d{2}-\\d{2}$"},occurrences:{type:"integer",minimum:1,maximum:1e5}},required:["kind"]}},required:["version","kind","timeZone","startDate","localTime","end"]}},required:["name","prompt","recurrence"]}}i(os,"savedWorkScheduleParameters");function Qe(e,t,n){return{toolCallId:e,name:t,ok:n.ok,contentText:JSON.stringify({...n,data:he(n.data)},null,2),data:n.data}}i(Qe,"workspaceToolResult");function et(){return{type:"object",additionalProperties:!1,properties:{}}}i(et,"emptyObjectParameters");function An(){return{type:"string",enum:["inputs","work","outputs"]}}i(An,"workAreaProperty");function _(e,t=!1){if(typeof e!="string"||!t&&!e.trim())throw new Error("A required string argument is missing.");return t?e:e.trim()}i(_,"requiredString");function H(e){return typeof e=="string"?e.trim():""}i(H,"optionalString");function ss(e){let t=_(e),n=new URL(t);if(n.protocol!=="http:"&&n.protocol!=="https:")throw new Error("Work output URLs must use HTTP or HTTPS.");return n.toString()}i(ss,"validHttpUrl");export{Rn as a,qi as b,ji as c,Bi as d,$i as e,Ni as f,Li as g,zn as h,bs as i,Wt as j,Ce as k,_s as l,As as m,Ps as n,Cs as o,Es as p,Ms as q,We as r,C as s,Y as t,Us as u,Nt as v,dr as w,zs as x,Hs as y,Js as z,Ks as A,fr as B,si as C,Ii as D,Ti as E,vi as F,Si as G,Ai as H,Pi as I,Ci as J,Ei as K,Mi as L,Ji as M,na as N};
40
+ [truncated after execution; ${e.length} characters total]`:Array.isArray(e)?e.slice(0,100).map(n=>Ze(n,t)):e&&typeof e=="object"?Object.fromEntries(Object.entries(e).slice(0,100).map(([n,r])=>[n,Ze(r,t)])):e}i(Ze,"boundLongStrings");function Li(e){return{content:[{type:"text",text:e.contentText},...(e.images??[]).map(t=>({type:"image",mimeType:t.mimeType,data:t.data}))],...e.ok?{}:{isError:!0}}}i(Li,"nativeToolMcpResult");import{createHash as zo}from"node:crypto";import{promises as Ho}from"node:fs";import Jo from"node:path";var ge="openpond-work-v1",Ko="mkdir -p inputs work outputs",Go="find /workspace/inputs /workspace/work /workspace/outputs -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +",Vo=18e4,Xo=1e3,Yo=15e3,Zo=250,In=["cd /workspace/work &&",'printf "architecture="; uname -m;','printf "kernel="; uname -sr;','printf "cpu_count="; getconf _NPROCESSORS_ONLN 2>/dev/null || true;',`printf "memory_kb="; awk '/MemTotal/ {print $2}' /proc/meminfo 2>/dev/null || true;`,`printf "workspace_bytes="; df -Pk .. 2>/dev/null | awk 'NR==2 {print $4 * 1024}' || true;`,'printf "tools=";','for tool in python3 pip node npm npx pnpm java gcc g++ make git ffmpeg convert magick pandoc pdftotext pdfinfo pdftoppm curl wget jq rg; do command -v "$tool" >/dev/null 2>&1 && printf "%s " "$tool"; done;',"printf '\\n'"].join(" "),Qo=new Set(["archived","deleted","error"]);function Tn(e){let t=new Map,n=new Set;async function r(c,l,u){return e.executeWorkspaceTool(c.session.id,{action:l,args:u,source:"chat_action"},{turnId:c.turnId,workspaceDiffBaseline:c.workspaceDiffBaseline})}i(r,"execute");async function o(c){if(n.has(c.session.id))return;let l=t.get(c.session.id);if(l)return l;let u=(async()=>{let p=c.session.workspaceKind==="sandbox"&&!!c.session.workspaceId,f=p;try{if(p){let m=await r(c,"sandbox_status",{});if(!m.ok)throw new Error(m.output);if(Sn(m.data)==="stopped"){let h=await r(c,"sandbox_start",{});if(!h.ok)throw new Error(h.output)}}else{let m=await r(c,"sandbox_create",{attachToSession:!0,command:Ko,visibility:"private",networkPolicy:{internetEgress:"block",allowedHosts:[]},reuseDefaultRuntime:!1,markDefaultRuntime:!1,runtime:{runtimeProfileId:ge,workflowMode:"attempt",promotionPolicy:"none",metadata:{source:"openpond-work",experience:"work"}},metadata:{source:"openpond-work",experience:"work"}});if(!m.ok)throw new Error(m.output);f=!0}await vn(()=>r(c,"sandbox_status",{})),await a(c),n.add(c.session.id)}catch(m){throw n.delete(c.session.id),f&&await r(c,"sandbox_stop",{}).catch(()=>{}),m}})();t.set(c.session.id,u);try{await u}finally{t.get(c.session.id)===u&&t.delete(c.session.id)}}i(o,"ensureReady");async function s(c){await o(c);let l=await r(c,"sandbox_exec",{command:Go,timeoutSeconds:60,autoPreserveSource:!1});if(!l.ok)throw new Error(l.output);await a(c)}i(s,"reset");async function a(c){for(let l of e.inputs??[]){if(!l.storageName)continue;let u=await es(l),p=await r(c,"sandbox_upload_file",{path:N("inputs",l.storageName,["inputs"]),contentsBase64:u.toString("base64")});if(!p.ok)throw new Error(p.output)}}i(a,"stageInputs");async function d(c){if(!n.has(c.session.id)&&(c.session.workspaceKind!=="sandbox"||!c.session.workspaceId))return{ok:!0,action:"sandbox_stop",output:"No Work compute is attached to this task.",data:{stopped:!1,reason:"not_attached"}};let l=await r(c,"sandbox_stop",{});return l.ok&&n.delete(c.session.id),l}return i(d,"stop"),{ensureReady:o,execute:r,reset:s,stop:d}}i(Tn,"createWorkRuntimeService");async function es(e){let t=e.storageName??"unnamed";if(!e.localPath&&e.bytes===void 0)throw new Error(`Work input ${t} has no readable content.`);let n=e.bytes===void 0?await Ho.readFile(e.localPath):Buffer.from(e.bytes);if(e.sizeBytes!==void 0&&n.byteLength!==e.sizeBytes)throw new Error(`Work input ${e.storageName} size does not match its manifest.`);if(e.sha256!==void 0&&zo("sha256").update(n).digest("hex")!==e.sha256)throw new Error(`Work input ${e.storageName} hash does not match its manifest.`);return n}i(es,"workInputBytes");function N(e,t,n=["inputs","work","outputs"]){let r=ts(e);if(!n.includes(r))throw new Error(`Unknown Work area: ${r}`);let o=t.trim().replaceAll("\\","/");if(!o||o===".")return r;if(o.startsWith("/"))throw new Error("Work paths must be relative to their selected area.");let s=Jo.posix.normalize(o);if(s===".."||s.startsWith("../")||s.includes("/../"))throw new Error("Work path escaped its selected area.");return`${r}/${s}`}i(N,"workPath");async function vn(e,t={}){let n=t.timeoutMs??Vo,r=t.pollMs??Xo,o=t.now??Date.now,s=t.sleep??(c=>new Promise(l=>setTimeout(l,c))),a=o(),d="";for(;o()-a<=n;){let c=await e();if(!c.ok)throw new Error(c.output);if(d=Sn(c.data),d==="running")return c;if(Qo.has(d))throw new Error(`Work sandbox entered ${d} during startup.`);await s(r)}throw new Error(`Work sandbox did not become ready within ${n}ms${d?` (last state: ${d})`:""}.`)}i(vn,"waitForWorkSandboxReady");async function Ji(e,t={}){let n=t.timeoutMs??Yo,r=t.pollMs??Zo,o=t.now??Date.now,s=t.sleep??(c=>new Promise(l=>setTimeout(l,c))),a=o(),d=null;for(;o()-a<=n;){if(d=await e(),!d.ok||ns(d.data))return d;await s(r)}return d??e()}i(Ji,"waitForWorkReceiptSettlement");function ts(e){if(typeof e!="string"||!e.trim())throw new Error("A required string argument is missing.");return e.trim()}i(ts,"requiredString");function Sn(e){if(!e||typeof e!="object"||Array.isArray(e))return"";let t=e.sandbox;if(!t||typeof t!="object"||Array.isArray(t))return"";let n=t.state;return typeof n=="string"?n:""}i(Sn,"sandboxState");function ns(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;let t=e,n=t.sandbox&&typeof t.sandbox=="object"&&!Array.isArray(t.sandbox)?t.sandbox:{};return(Array.isArray(t.receipts)?t.receipts:Array.isArray(n.receipts)?n.receipts:[]).some(o=>o&&typeof o=="object"&&!Array.isArray(o)&&o.status==="captured")}i(ns,"receiptSettlementComplete");import{randomUUID as rs}from"node:crypto";function he(e){if(!e||typeof e!="object"||Array.isArray(e))return e;let t=e,n=t.sandbox;if(!n||typeof n!="object"||Array.isArray(n))return t;let r=n;return{...t,sandbox:{id:r.id,name:r.name,state:r.state,resources:r.resources,createdAt:r.createdAt,updatedAt:r.updatedAt}}}i(he,"workModelData");function na(e){let t=Tn(e);async function n(a,d,c,l){let u=await t.execute(a,d,c);return Qe(a.callId,l,u)}i(n,"execute");async function r(a){await t.ensureReady(a)}i(r,"ensureSandbox");let o=i((a,d,c)=>async l=>{let u=c(l);return await r(l),await n(l,d,u,a)},"withSandbox"),s=[...e.createScheduledWork?[{name:"schedule_work",description:"Create a durable recurring workflow attached to the current chat when the user directly asks to schedule the current or another task and provides an exact cadence, local date/time, and timezone. Every scheduled run is sent through the attached chat so its output appears in that conversation. Use the conversation context to preserve the task prompt and ask only for genuinely unavailable required scheduling details. The scheduled prompt must describe only the work to perform when the schedule fires, not the scheduling request itself.",parameters:os(),execute:i(async a=>{let d=ct.parse({...a.args,clientRequestId:`${a.turnId}:${a.callId}`,sourceTurnId:a.turnId,targetSessionId:a.session.id,modelId:a.provider==="openpond"?a.model:"openpond-chat"}),c=await e.createScheduledWork(d);return{toolCallId:a.callId,name:"schedule_work",ok:!0,contentText:JSON.stringify({ok:!0,action:"schedule_work",output:`Created scheduled Work: ${d.name}.`,data:c}),data:c}},"execute")}]:[],{name:"work_capabilities",description:"Return the truthful Work output, preview, validation, and destination matrix without starting sandbox compute.",parameters:et(),execute:i(async a=>({toolCallId:a.callId,name:"work_capabilities",ok:!0,contentText:JSON.stringify({ok:!0,action:"work_capabilities",output:"Returned the supported Work formats and durable destinations. Sandbox compute was not started.",data:{compute:"lazy",formats:Ie,destinations:["managed_local_file","approved_connected_resource","deployment_url"],constraints:{maxLocalOutputBytes:1e7,repositoryChangesRequireDevelopment:!0,browserAndLocalAppControl:{location:"host",requiresTurnPermission:!0,guestCredentials:!1}}}},null,2),data:{compute:"lazy",formats:Ie,destinations:["managed_local_file","approved_connected_resource","deployment_url"]}}),"execute")},{name:"work_environment",description:"Start Work compute only when it is needed, then return live sandbox status and the stable /workspace/inputs, /workspace/work, and /workspace/outputs layout.",parameters:et(),execute:i(async a=>{await r(a);let d=await t.execute(a,"sandbox_status",{});if(!d.ok)return Qe(a.callId,"work_environment",d);let l=await t.execute(a,"sandbox_exec",{command:In,timeoutSeconds:30,autoPreserveSource:!1});return{toolCallId:a.callId,name:"work_environment",ok:d.ok&&l.ok,contentText:JSON.stringify({ok:d.ok&&l.ok,action:"work_environment",output:l.ok?"Work compute is ready. Environment facts were measured live.":l.output,data:{runtimeProfileId:ge,workspaceRoot:"/workspace",cwd:"/workspace/work",layout:{inputs:"/workspace/inputs",work:"/workspace/work",outputs:"/workspace/outputs"},status:he(d.data)??null,probe:he(l.data)??{output:l.output},executionBacked:l.ok}},null,2),data:{runtimeProfileId:ge,workspaceRoot:"/workspace",cwd:"/workspace/work",status:d.data??null,probe:l.data??null,executionBacked:l.ok}}},"execute")},{name:"work_list_files",description:"List files in the Work scratch, input, or completed-output area. This lazily starts Work compute.",parameters:{type:"object",additionalProperties:!1,properties:{area:An(),path:{type:"string",description:"Optional relative path inside the selected area."},recursive:{type:"boolean"}},required:["area"]},execute:o("work_list_files","sandbox_list_files",a=>({path:N(a.args.area,H(a.args.path)),recursive:typeof a.args.recursive=="boolean"?a.args.recursive:!1}))},{name:"work_read_file",description:"Read a bounded file from Work inputs, scratch space, or completed-output candidates.",parameters:{type:"object",additionalProperties:!1,properties:{area:An(),path:{type:"string",minLength:1},maxBytes:{type:"integer",minimum:1,maximum:1e6}},required:["area","path"]},execute:o("work_read_file","sandbox_read_file",a=>({path:N(a.args.area,_(a.args.path)),maxBytes:typeof a.args.maxBytes=="number"?Math.min(Math.max(Math.floor(a.args.maxBytes),1),1e6):512e3}))},{name:"work_write_file",description:"Write a UTF-8 Work scratch file or completed-output candidate. Use area=outputs only for a finished result that is ready to validate and save.",parameters:{type:"object",additionalProperties:!1,properties:{area:{type:"string",enum:["work","outputs"]},path:{type:"string",minLength:1},content:{type:"string"}},required:["area","path","content"]},execute:o("work_write_file","sandbox_write_file",a=>({path:N(a.args.area,_(a.args.path),["work","outputs"]),content:_(a.args.content,!0),autoPreserveSource:!1}))},{name:"work_edit_file",description:"Edit a Work scratch file or output candidate by exact text replacement after reading it.",parameters:{type:"object",additionalProperties:!1,properties:{area:{type:"string",enum:["work","outputs"]},path:{type:"string",minLength:1},oldText:{type:"string",minLength:1},newText:{type:"string"},replaceAll:{type:"boolean"}},required:["area","path","oldText","newText"]},execute:o("work_edit_file","sandbox_edit_file",a=>({path:N(a.args.area,_(a.args.path),["work","outputs"]),oldText:_(a.args.oldText),newText:_(a.args.newText,!0),replaceAll:a.args.replaceAll===!0,autoPreserveSource:!1}))},{name:"work_delete_file",description:"Delete a Work scratch file or an output candidate. Saved outputs outside the sandbox are unaffected.",parameters:{type:"object",additionalProperties:!1,properties:{area:{type:"string",enum:["work","outputs"]},path:{type:"string",minLength:1},recursive:{type:"boolean"}},required:["area","path"]},execute:o("work_delete_file","sandbox_delete_file",a=>({path:N(a.args.area,_(a.args.path),["work","outputs"]),recursive:a.args.recursive===!0,autoPreserveSource:!1}))},{name:"work_exec",description:"Run a bounded shell command from /workspace/work. Write finished deliverables to ../outputs and inspect them; the runtime preserves output files automatically when the turn ends.",parameters:{type:"object",additionalProperties:!1,properties:{command:{type:"string",minLength:1},timeoutSeconds:{type:"integer",minimum:1,maximum:3600}},required:["command"]},execute:o("work_exec","sandbox_exec",a=>({command:`cd /workspace/work && ${_(a.args.command)}`,timeoutSeconds:typeof a.args.timeoutSeconds=="number"?Math.min(Math.max(Math.floor(a.args.timeoutSeconds),1),3600):120,autoPreserveSource:!1}))},{name:"work_open_port",description:"Open a bounded Work sandbox port for a temporary preview. This is not a production deployment.",parameters:{type:"object",additionalProperties:!1,properties:{port:{type:"integer",minimum:1,maximum:65535},label:{type:"string"}},required:["port"]},execute:o("work_open_port","sandbox_open_port",a=>({port:a.args.port,label:H(a.args.label)||"Work preview",access:"private",autoStart:!0}))},{name:"work_checkpoint",description:"Create a resumable checkpoint of the current Work sandbox before a substantial revision.",parameters:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1,maxLength:120}},required:["name"]},execute:o("work_checkpoint","sandbox_snapshot_create",a=>({name:_(a.args.name)}))},{name:"work_prepare_agent",description:"Create a validated OpenPond Agent SDK project in Work scratch space. Use this when the requested deliverable is a new reusable Agent, not for ordinary documents, code snippets, or one-off scripts.",parameters:{type:"object",additionalProperties:!1,properties:{directory:{type:"string",minLength:1,maxLength:180,description:"Relative directory inside Work scratch space for the Agent source."},template:{type:"string",enum:["blank-agent","customer-reply-agent","integration-heavy-agent"]}},required:["directory","template"]},execute:o("work_prepare_agent","sandbox_prepare_agent",a=>({directory:_(a.args.directory),template:_(a.args.template)}))},{name:"work_save_agent_package",description:"Run the OpenPond Agent SDK build, validation, and eval publish gate in the Work sandbox, then save the complete source as an immutable content-addressed Agent-package output. Use this only after finishing and reviewing the Agent source.",parameters:{type:"object",additionalProperties:!1,properties:{directory:{type:"string",minLength:1,maxLength:180,description:"Relative Agent project directory inside Work scratch space."},agentId:{type:"string",minLength:1,maxLength:191},title:{type:"string",minLength:1,maxLength:240}},required:["directory"]},execute:o("work_save_agent_package","sandbox_save_agent_package",a=>({directory:_(a.args.directory),agentId:H(a.args.agentId)||void 0,title:H(a.args.title)||void 0}))},{name:"work_save_output",description:"Explicitly copy one completed file from /workspace/outputs to durable OpenPond output storage before turn completion. Normal Work turns preserve output files automatically.",parameters:{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,description:"Path relative to /workspace/outputs, for example report.md."},suggestedName:{type:"string",minLength:1,maxLength:180},validation:{type:"array",maxItems:32,items:{type:"object",additionalProperties:!1,properties:{kind:{type:"string",enum:["structural","visual","test","user_review"]},status:{type:"string",enum:["passed","failed","not_run"]},label:{type:"string",minLength:1,maxLength:240},detail:{type:"string",maxLength:4e3},ref:{type:"string",maxLength:4096}},required:["kind","status","label"]}}},required:["path"]},execute:o("work_save_output","sandbox_save_output",a=>({path:N("outputs",_(a.args.path),["outputs"]),suggestedName:H(a.args.suggestedName)||void 0,validation:Array.isArray(a.args.validation)?a.args.validation:[]}))},{name:"work_register_external_output",description:"Register a completed result that already lives in an approved connected service or at a production deployment URL. Use only after the provider write or deployment succeeded and returned a stable resource id or URL.",parameters:{type:"object",additionalProperties:!1,properties:{kind:{type:"string",enum:["external_file","deployment"]},title:{type:"string",minLength:1,maxLength:240},provider:{type:"string",minLength:1,maxLength:120},resourceId:{type:"string",minLength:1,maxLength:500},url:{type:"string",minLength:1,maxLength:4096},contentType:{type:"string",minLength:1,maxLength:200},validation:{type:"array",maxItems:32,items:{type:"object",additionalProperties:!1,properties:{kind:{type:"string",enum:["structural","visual","test","user_review"]},status:{type:"string",enum:["passed","failed","not_run"]},label:{type:"string",minLength:1,maxLength:240},detail:{type:"string",maxLength:4e3},ref:{type:"string",maxLength:4096}},required:["kind","status","label"]}}},required:["kind","title","resourceId","url"]},execute:i(async a=>{let d=_(a.args.kind),c=_(a.args.title),l=_(a.args.resourceId),u=ss(a.args.url),p=Array.isArray(a.args.validation)?a.args.validation:[],f={id:rs(),title:c,sourceTaskId:a.session.id,sourceTurnId:a.turnId,revision:1,createdAt:new Date().toISOString(),validation:p},m=d==="deployment"?{...f,kind:"deployment",deploymentId:l,url:u}:{...f,kind:"external_resource",provider:H(a.args.provider)||"external",resourceId:l,url:u,contentType:H(a.args.contentType)||null};return{toolCallId:a.callId,name:"work_register_external_output",ok:!0,contentText:JSON.stringify({ok:!0,action:"work_register_external_output",output:`Registered ${c} as a Work output.`,data:{outputRef:m}},null,2),data:{outputRef:m}}},"execute")},{name:"work_stop",description:"Stop Work compute after durable outputs have been saved. Saved OutputRefs remain available.",parameters:et(),execute:i(async a=>Qe(a.callId,"work_stop",await t.stop(a)),"execute")}];return e.automaticLifecycle?s.filter(a=>a.name!=="work_save_output"&&a.name!=="work_stop"):s}i(na,"createWorkModelToolDefinitions");function os(){return{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1,maxLength:180},prompt:{type:"string",minLength:1,maxLength:2e4},recurrence:{type:"object",additionalProperties:!1,properties:{version:{type:"integer",enum:[1]},kind:{type:"string",enum:["once","daily","weekdays","weekly","monthly"]},timeZone:{type:"string",minLength:1,maxLength:100},startDate:{type:"string",pattern:"^\\d{4}-\\d{2}-\\d{2}$"},localTime:{type:"string",pattern:"^\\d{2}:\\d{2}$"},weekdays:{type:"array",minItems:1,maxItems:7,items:{type:"string",enum:["sunday","monday","tuesday","wednesday","thursday","friday","saturday"]}},dayOfMonth:{type:"integer",minimum:1,maximum:31},end:{type:"object",additionalProperties:!1,properties:{kind:{type:"string",enum:["never","on_date","after_occurrences"]},date:{type:"string",pattern:"^\\d{4}-\\d{2}-\\d{2}$"},occurrences:{type:"integer",minimum:1,maximum:1e5}},required:["kind"]}},required:["version","kind","timeZone","startDate","localTime","end"]}},required:["name","prompt","recurrence"]}}i(os,"savedWorkScheduleParameters");function Qe(e,t,n){return{toolCallId:e,name:t,ok:n.ok,contentText:JSON.stringify({...n,data:he(n.data)},null,2),data:n.data}}i(Qe,"workspaceToolResult");function et(){return{type:"object",additionalProperties:!1,properties:{}}}i(et,"emptyObjectParameters");function An(){return{type:"string",enum:["inputs","work","outputs"]}}i(An,"workAreaProperty");function _(e,t=!1){if(typeof e!="string"||!t&&!e.trim())throw new Error("A required string argument is missing.");return t?e:e.trim()}i(_,"requiredString");function H(e){return typeof e=="string"?e.trim():""}i(H,"optionalString");function ss(e){let t=_(e),n=new URL(t);if(n.protocol!=="http:"&&n.protocol!=="https:")throw new Error("Work output URLs must use HTTP or HTTPS.");return n.toString()}i(ss,"validHttpUrl");export{zn as a,bs as b,Wt as c,Ce as d,_s as e,As as f,Ps as g,Cs as h,Es as i,Ms as j,We as k,Y as l,Us as m,Nt as n,dr as o,zs as p,Hs as q,Js as r,Ks as s,fr as t,si as u,Rn as v,qi as w,ji as x,Bi as y,$i as z,Ni as A,Li as B,C,Ii as D,Ti as E,vi as F,Si as G,Ai as H,Pi as I,Ci as J,Ei as K,Mi as L,Ji as M,na as N};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{N as a}from"./chunk-Z4Z5UOZM.js";import{b as e}from"./chunk-ES2ISFJC.js";var r=e.enum(["openpond_hosted","local_byok","codex_app_server","unknown"]),s=e.enum(["provider_usage","codex_context_usage","missing"]),d=e.enum(["provider_usage_body","provider_response_headers"]),p=e.enum(["chat_turn","tool_loop","slash_command","create_improve_planner","harness_refiner","context_compaction","subagent","codex_context","other"]),v=e.enum(["foreground","tool_loop","compaction","subagent","refiner","other"]),m=e.enum(["user_facing","background","system"]),u=e.enum(["started","completed","failed","interrupted"]),i=e.enum(["composer_selection","prompt_parse","server_parser","model_tool","api"]),c=e.enum(["chat","settings","goal","create_improve","compaction","system"]),g=e.enum(["direct_chat","tool_loop","slash_command","planner","summary","scan","subagent","other"]),h=e.object({surface:c,workflowKind:g,sessionId:e.string().trim().min(1).nullable().default(null),turnId:e.string().trim().min(1).nullable().default(null),goalId:e.string().trim().min(1).nullable().default(null),subagentRunId:e.string().trim().min(1).nullable().default(null),subagentRoleId:e.string().trim().min(1).nullable().default(null),createImproveRunId:e.string().trim().min(1).nullable().default(null),commandName:e.string().trim().min(1).max(160).nullable().default(null),commandSource:i.nullable().default(null),appId:e.string().trim().min(1).nullable().default(null),workspaceKind:a.nullable().default(null),workspaceId:e.string().trim().min(1).nullable().default(null),localProjectId:e.string().trim().min(1).nullable().default(null),cloudProjectId:e.string().trim().min(1).nullable().default(null),sourceEventSequence:e.number().int().nonnegative().nullable().default(null)}),C=e.object({surface:c.optional(),workflowKind:g.optional(),goalId:e.string().trim().min(1).nullable().optional(),subagentRunId:e.string().trim().min(1).nullable().optional(),subagentRoleId:e.string().trim().min(1).nullable().optional(),createImproveRunId:e.string().trim().min(1).nullable().optional(),commandName:e.string().trim().min(1).max(160).nullable().optional(),commandSource:i.nullable().optional()}).strict(),n=e.string().trim().min(1).max(160),x=e.object({id:e.string().trim().min(1),requestId:e.string().trim().min(1),requestOrdinal:e.number().int().nonnegative(),sessionId:e.string().trim().min(1).nullable(),turnId:e.string().trim().min(1).nullable(),provider:n,model:e.string().trim().min(1),route:r,source:s,requestKind:p,visibility:m,status:u,startedAt:e.string().trim().min(1),completedAt:e.string().trim().min(1).nullable(),durationMs:e.number().int().nonnegative().nullable(),firstTokenMs:e.number().int().nonnegative().nullable(),promptTokens:e.number().int().nonnegative().nullable(),cachedPromptTokens:e.number().int().nonnegative().nullable(),uncachedPromptTokens:e.number().int().nonnegative().nullable(),cacheWritePromptTokens:e.number().int().nonnegative().nullable(),cacheTelemetrySource:d.nullable(),completionTokens:e.number().int().nonnegative().nullable(),totalTokens:e.number().int().nonnegative().nullable(),errorType:e.string().trim().min(1).max(160).nullable(),errorMessage:e.string().trim().min(1).max(2e3).nullable(),attribution:h}),b=e.object({from:e.string().trim().min(1),to:e.string().trim().min(1),bucket:e.enum(["day","all_time"])}),o=e.union([e.literal("all"),m]),l=e.enum(["all","started","completed","failed","interrupted","missing"]),S=e.object({range:e.enum(["7d","30d","90d","all"]).default("30d"),visibility:o.default("all"),status:l.default("all"),provider:n.optional(),model:e.string().trim().min(1).optional()}),B=S.extend({sessionId:e.string().trim().min(1).optional(),turnId:e.string().trim().min(1).optional(),limit:e.number().int().positive().max(500).default(100)}),A=e.object({sessionId:e.string().trim().min(1)}),t=e.object({requests:e.number().int().nonnegative(),promptTokens:e.number().int().nonnegative().nullable(),cacheTelemetryRequests:e.number().int().nonnegative(),cacheHitRequests:e.number().int().nonnegative(),cachedPromptTokens:e.number().int().nonnegative().nullable(),uncachedPromptTokens:e.number().int().nonnegative().nullable(),cacheWritePromptTokens:e.number().int().nonnegative().nullable(),cacheHitRate:e.number().min(0).max(1).nullable(),cacheRequestHitRate:e.number().min(0).max(1).nullable(),cacheTelemetryCoverage:e.number().min(0).max(1),completionTokens:e.number().int().nonnegative().nullable(),totalTokens:e.number().int().nonnegative().nullable(),averageLatencyMs:e.number().nonnegative().nullable(),p95LatencyMs:e.number().nonnegative().nullable(),averageFirstTokenMs:e.number().nonnegative().nullable(),p95FirstTokenMs:e.number().nonnegative().nullable(),failures:e.number().int().nonnegative(),failureRate:e.number().nonnegative(),firstSeenAt:e.string().trim().min(1),lastSeenAt:e.string().trim().min(1)}),k=t.extend({provider:n,model:e.string().trim().min(1),route:r}),y=t.extend({sessionId:e.string().trim().min(1),title:e.string().trim().min(1).nullable(),workspaceKind:a.nullable(),workspaceId:e.string().trim().min(1).nullable()}),f=t.extend({commandName:e.string().trim().min(1),commandSource:i.nullable()}),T=t.extend({route:r}),U=t.extend({status:u}),_=t.extend({source:s}),R=t.extend({cohort:v}),I=e.object({date:e.string().trim().min(1),totalTokens:e.number().int().nonnegative(),requests:e.number().int().nonnegative(),models:e.array(e.object({provider:n,model:e.string().trim().min(1),totalTokens:e.number().int().nonnegative(),requests:e.number().int().nonnegative()}))}),M=e.object({requests:e.number().int().nonnegative(),completedRequests:e.number().int().nonnegative(),failedRequests:e.number().int().nonnegative(),missingUsageRequests:e.number().int().nonnegative(),promptTokens:e.number().int().nonnegative().nullable(),cacheTelemetryRequests:e.number().int().nonnegative(),cacheHitRequests:e.number().int().nonnegative(),cachedPromptTokens:e.number().int().nonnegative().nullable(),uncachedPromptTokens:e.number().int().nonnegative().nullable(),cacheWritePromptTokens:e.number().int().nonnegative().nullable(),cacheHitRate:e.number().min(0).max(1).nullable(),cacheRequestHitRate:e.number().min(0).max(1).nullable(),cacheTelemetryCoverage:e.number().min(0).max(1),completionTokens:e.number().int().nonnegative().nullable(),totalTokens:e.number().int().nonnegative().nullable(),averageLatencyMs:e.number().nonnegative().nullable(),p95LatencyMs:e.number().nonnegative().nullable(),averageFirstTokenMs:e.number().nonnegative().nullable(),p95FirstTokenMs:e.number().nonnegative().nullable(),failureRate:e.number().nonnegative(),activeModelCount:e.number().int().nonnegative(),peakDailyTokens:e.number().int().nonnegative(),longestRequestMs:e.number().int().nonnegative().nullable(),activeDays:e.number().int().nonnegative(),currentStreakDays:e.number().int().nonnegative(),longestStreakDays:e.number().int().nonnegative()}),K=e.object({generatedAt:e.string().trim().min(1),range:b,filters:e.object({visibility:o,status:l,provider:n.nullable(),model:e.string().trim().min(1).nullable()}),totals:M,daily:e.array(I),models:e.array(k),threads:e.array(y),commands:e.array(f),routes:e.array(T),statuses:e.array(U),sources:e.array(_),cohorts:e.array(R)}),H=e.object({generatedAt:e.string().trim().min(1),range:b,filters:e.object({visibility:o,status:l,provider:n.nullable(),model:e.string().trim().min(1).nullable(),sessionId:e.string().trim().min(1).nullable(),turnId:e.string().trim().min(1).nullable()}),limit:e.number().int().positive(),hasMore:e.boolean(),records:e.array(x)}),q=e.object({turnId:e.string().trim().min(1),requests:e.number().int().nonnegative(),cacheTelemetryRequests:e.number().int().nonnegative(),cachedPromptTokens:e.number().int().nonnegative().nullable(),uncachedPromptTokens:e.number().int().nonnegative().nullable(),cacheWritePromptTokens:e.number().int().nonnegative().nullable(),cacheHitRate:e.number().min(0).max(1).nullable(),cacheTelemetryCoverage:e.number().min(0).max(1),providers:e.array(n)}),F=e.object({generatedAt:e.string().trim().min(1),sessionId:e.string().trim().min(1),turns:e.array(q)}),j=e.enum(["usage_spike","model_usage_spike","latency_regression","failure_cluster","missing_usage_frames"]),W=e.object({type:j,title:e.string().trim().min(1),summary:e.string().trim().min(1),severity:e.enum(["nit","concern","blocker"]),payload:e.record(e.string(),e.unknown()).default({})});export{C as a,x as b,S as c,B as d,A as e,K as f,H as g,F as h};
2
+ import{N as a}from"./chunk-SG6JZ7HD.js";import{A as e}from"./chunk-PF56N7ZY.js";var r=e.enum(["openpond_hosted","local_byok","codex_app_server","unknown"]),s=e.enum(["provider_usage","codex_context_usage","missing"]),d=e.enum(["provider_usage_body","provider_response_headers"]),p=e.enum(["chat_turn","tool_loop","slash_command","create_improve_planner","harness_refiner","context_compaction","subagent","codex_context","other"]),v=e.enum(["foreground","tool_loop","compaction","subagent","refiner","other"]),m=e.enum(["user_facing","background","system"]),u=e.enum(["started","completed","failed","interrupted"]),i=e.enum(["composer_selection","prompt_parse","server_parser","model_tool","api"]),c=e.enum(["chat","settings","goal","create_improve","compaction","system"]),g=e.enum(["direct_chat","tool_loop","slash_command","planner","summary","scan","subagent","other"]),h=e.object({surface:c,workflowKind:g,sessionId:e.string().trim().min(1).nullable().default(null),turnId:e.string().trim().min(1).nullable().default(null),goalId:e.string().trim().min(1).nullable().default(null),subagentRunId:e.string().trim().min(1).nullable().default(null),subagentRoleId:e.string().trim().min(1).nullable().default(null),createImproveRunId:e.string().trim().min(1).nullable().default(null),commandName:e.string().trim().min(1).max(160).nullable().default(null),commandSource:i.nullable().default(null),appId:e.string().trim().min(1).nullable().default(null),workspaceKind:a.nullable().default(null),workspaceId:e.string().trim().min(1).nullable().default(null),localProjectId:e.string().trim().min(1).nullable().default(null),cloudProjectId:e.string().trim().min(1).nullable().default(null),sourceEventSequence:e.number().int().nonnegative().nullable().default(null)}),C=e.object({surface:c.optional(),workflowKind:g.optional(),goalId:e.string().trim().min(1).nullable().optional(),subagentRunId:e.string().trim().min(1).nullable().optional(),subagentRoleId:e.string().trim().min(1).nullable().optional(),createImproveRunId:e.string().trim().min(1).nullable().optional(),commandName:e.string().trim().min(1).max(160).nullable().optional(),commandSource:i.nullable().optional()}).strict(),n=e.string().trim().min(1).max(160),x=e.object({id:e.string().trim().min(1),requestId:e.string().trim().min(1),requestOrdinal:e.number().int().nonnegative(),sessionId:e.string().trim().min(1).nullable(),turnId:e.string().trim().min(1).nullable(),provider:n,model:e.string().trim().min(1),route:r,source:s,requestKind:p,visibility:m,status:u,startedAt:e.string().trim().min(1),completedAt:e.string().trim().min(1).nullable(),durationMs:e.number().int().nonnegative().nullable(),firstTokenMs:e.number().int().nonnegative().nullable(),promptTokens:e.number().int().nonnegative().nullable(),cachedPromptTokens:e.number().int().nonnegative().nullable(),uncachedPromptTokens:e.number().int().nonnegative().nullable(),cacheWritePromptTokens:e.number().int().nonnegative().nullable(),cacheTelemetrySource:d.nullable(),completionTokens:e.number().int().nonnegative().nullable(),totalTokens:e.number().int().nonnegative().nullable(),errorType:e.string().trim().min(1).max(160).nullable(),errorMessage:e.string().trim().min(1).max(2e3).nullable(),attribution:h}),b=e.object({from:e.string().trim().min(1),to:e.string().trim().min(1),bucket:e.enum(["day","all_time"])}),o=e.union([e.literal("all"),m]),l=e.enum(["all","started","completed","failed","interrupted","missing"]),S=e.object({range:e.enum(["7d","30d","90d","all"]).default("30d"),visibility:o.default("all"),status:l.default("all"),provider:n.optional(),model:e.string().trim().min(1).optional()}),B=S.extend({sessionId:e.string().trim().min(1).optional(),turnId:e.string().trim().min(1).optional(),limit:e.number().int().positive().max(500).default(100)}),A=e.object({sessionId:e.string().trim().min(1)}),t=e.object({requests:e.number().int().nonnegative(),promptTokens:e.number().int().nonnegative().nullable(),cacheTelemetryRequests:e.number().int().nonnegative(),cacheHitRequests:e.number().int().nonnegative(),cachedPromptTokens:e.number().int().nonnegative().nullable(),uncachedPromptTokens:e.number().int().nonnegative().nullable(),cacheWritePromptTokens:e.number().int().nonnegative().nullable(),cacheHitRate:e.number().min(0).max(1).nullable(),cacheRequestHitRate:e.number().min(0).max(1).nullable(),cacheTelemetryCoverage:e.number().min(0).max(1),completionTokens:e.number().int().nonnegative().nullable(),totalTokens:e.number().int().nonnegative().nullable(),averageLatencyMs:e.number().nonnegative().nullable(),p95LatencyMs:e.number().nonnegative().nullable(),averageFirstTokenMs:e.number().nonnegative().nullable(),p95FirstTokenMs:e.number().nonnegative().nullable(),failures:e.number().int().nonnegative(),failureRate:e.number().nonnegative(),firstSeenAt:e.string().trim().min(1),lastSeenAt:e.string().trim().min(1)}),k=t.extend({provider:n,model:e.string().trim().min(1),route:r}),y=t.extend({sessionId:e.string().trim().min(1),title:e.string().trim().min(1).nullable(),workspaceKind:a.nullable(),workspaceId:e.string().trim().min(1).nullable()}),f=t.extend({commandName:e.string().trim().min(1),commandSource:i.nullable()}),T=t.extend({route:r}),U=t.extend({status:u}),_=t.extend({source:s}),R=t.extend({cohort:v}),I=e.object({date:e.string().trim().min(1),totalTokens:e.number().int().nonnegative(),requests:e.number().int().nonnegative(),models:e.array(e.object({provider:n,model:e.string().trim().min(1),totalTokens:e.number().int().nonnegative(),requests:e.number().int().nonnegative()}))}),M=e.object({requests:e.number().int().nonnegative(),completedRequests:e.number().int().nonnegative(),failedRequests:e.number().int().nonnegative(),missingUsageRequests:e.number().int().nonnegative(),promptTokens:e.number().int().nonnegative().nullable(),cacheTelemetryRequests:e.number().int().nonnegative(),cacheHitRequests:e.number().int().nonnegative(),cachedPromptTokens:e.number().int().nonnegative().nullable(),uncachedPromptTokens:e.number().int().nonnegative().nullable(),cacheWritePromptTokens:e.number().int().nonnegative().nullable(),cacheHitRate:e.number().min(0).max(1).nullable(),cacheRequestHitRate:e.number().min(0).max(1).nullable(),cacheTelemetryCoverage:e.number().min(0).max(1),completionTokens:e.number().int().nonnegative().nullable(),totalTokens:e.number().int().nonnegative().nullable(),averageLatencyMs:e.number().nonnegative().nullable(),p95LatencyMs:e.number().nonnegative().nullable(),averageFirstTokenMs:e.number().nonnegative().nullable(),p95FirstTokenMs:e.number().nonnegative().nullable(),failureRate:e.number().nonnegative(),activeModelCount:e.number().int().nonnegative(),peakDailyTokens:e.number().int().nonnegative(),longestRequestMs:e.number().int().nonnegative().nullable(),activeDays:e.number().int().nonnegative(),currentStreakDays:e.number().int().nonnegative(),longestStreakDays:e.number().int().nonnegative()}),K=e.object({generatedAt:e.string().trim().min(1),range:b,filters:e.object({visibility:o,status:l,provider:n.nullable(),model:e.string().trim().min(1).nullable()}),totals:M,daily:e.array(I),models:e.array(k),threads:e.array(y),commands:e.array(f),routes:e.array(T),statuses:e.array(U),sources:e.array(_),cohorts:e.array(R)}),H=e.object({generatedAt:e.string().trim().min(1),range:b,filters:e.object({visibility:o,status:l,provider:n.nullable(),model:e.string().trim().min(1).nullable(),sessionId:e.string().trim().min(1).nullable(),turnId:e.string().trim().min(1).nullable()}),limit:e.number().int().positive(),hasMore:e.boolean(),records:e.array(x)}),q=e.object({turnId:e.string().trim().min(1),requests:e.number().int().nonnegative(),cacheTelemetryRequests:e.number().int().nonnegative(),cachedPromptTokens:e.number().int().nonnegative().nullable(),uncachedPromptTokens:e.number().int().nonnegative().nullable(),cacheWritePromptTokens:e.number().int().nonnegative().nullable(),cacheHitRate:e.number().min(0).max(1).nullable(),cacheTelemetryCoverage:e.number().min(0).max(1),providers:e.array(n)}),F=e.object({generatedAt:e.string().trim().min(1),sessionId:e.string().trim().min(1),turns:e.array(q)}),j=e.enum(["usage_spike","model_usage_spike","latency_regression","failure_cluster","missing_usage_frames"]),W=e.object({type:j,title:e.string().trim().min(1),summary:e.string().trim().min(1),severity:e.enum(["nit","concern","blocker"]),payload:e.record(e.string(),e.unknown()).default({})});export{C as a,x as b,S as c,B as d,A as e,K as f,H as g,F as h};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{Tb as l}from"./chunk-Y4OWBBDD.js";import{b as n,c as a,d as i,f as t}from"./chunk-KGNCKIFP.js";import{b as e}from"./chunk-ES2ISFJC.js";var k=e.enum(["trajectory","reward","demonstration","preference","correction","critique","targeted_feedback","grader_evidence","infrastructure_failure"]),c=e.object({datasetRelease:t,harnessRelease:t,evidenceSetRelease:t.nullable(),profileRelease:t.nullable(),model:e.object({source:e.string().trim().min(1).max(200),revision:e.string().trim().min(1).max(500),artifactHash:a.nullable()}).strict(),environmentHash:a,graderHash:a,toolContractHash:a,verificationReceiptHash:a.nullable()}).strict(),r=e.object({schemaVersion:e.literal("openpond.learningSignal.v1"),id:n,taskId:n.nullable(),episodeId:n.nullable(),policyVersion:e.number().int().nonnegative().nullable(),lineage:c,approved:e.boolean(),verifier:e.enum(["deterministic","model_judge","human","none"]),createdAt:i,contentHash:a,metadata:e.record(e.string(),e.unknown()).default({})}).strict(),m=r.extend({kind:e.literal("trajectory"),payload:e.object({traceRef:e.string().trim().min(1).max(2e3),traceHash:a,terminal:e.boolean(),failureClass:e.enum(["policy_failure","grader_failure","environment_failure","infrastructure_failure","timeout","cancelled"]).nullable(),optimizerSample:l.nullable().optional()}).strict()}).strict(),d=r.extend({kind:e.literal("reward"),payload:e.object({reward:e.number().finite(),components:e.record(e.string(),e.number().finite()),eligible:e.boolean(),graderEvidenceRefs:e.array(n).max(1e3)}).strict()}).strict(),g=r.extend({kind:e.literal("demonstration"),payload:e.object({prompt:e.string().max(5e5),response:e.string().max(1e6)}).strict()}).strict(),u=r.extend({kind:e.literal("preference"),payload:e.object({prompt:e.string().max(5e5),chosen:e.string().max(1e6),rejected:e.string().max(1e6),rationale:e.string().max(5e5).nullable()}).strict()}).strict(),p=r.extend({kind:e.literal("correction"),payload:e.object({original:e.string().max(1e6),corrected:e.string().max(1e6),rationale:e.string().max(5e5).nullable()}).strict()}).strict(),b=r.extend({kind:e.literal("critique"),payload:e.object({response:e.string().max(1e6),critique:e.string().max(5e5),severity:e.enum(["note","warning","error"])}).strict()}).strict(),f=r.extend({kind:e.literal("targeted_feedback"),payload:e.object({turnIndex:e.number().int().nonnegative(),target:e.enum(["reasoning","tool","answer","policy"]),feedback:e.string().max(5e5)}).strict()}).strict(),h=r.extend({kind:e.literal("grader_evidence"),payload:e.object({graderId:n,score:e.number().finite().nullable(),passed:e.boolean(),privilegedArtifactRefs:e.array(e.string().trim().min(1).max(2e3))}).strict()}).strict(),x=r.extend({kind:e.literal("infrastructure_failure"),approved:e.literal(!1),verifier:e.literal("none"),payload:e.object({code:n,phase:n,retryable:e.boolean(),rewardEligible:e.literal(!1)}).strict()}).strict(),o=e.discriminatedUnion("kind",[m,d,g,u,p,b,f,h,x]),H=e.object({schemaVersion:e.literal("openpond.learningSignalBatch.v1"),manifestId:n,manifestHash:a,sequence:e.number().int().nonnegative(),signals:e.array(o).min(1).max(1e5),contentHash:a}).strict();var S=e.object({id:n,turn:e.number().int().nonnegative(),kind:e.enum(["message","tool_call","terminal"]),name:n.nullable(),arguments:e.record(e.string(),e.unknown()),content:e.string().max(1e6).nullable(),contentHash:a}).strict(),_=e.object({actionId:n,turn:e.number().int().nonnegative(),terminal:e.boolean(),output:e.record(e.string(),e.unknown()),artifactRefs:e.array(e.string().trim().min(1).max(2e3)),contentHash:a}).strict(),v=e.object({sequence:e.number().int().nonnegative(),type:e.enum(["created","reset","action","observation","terminal","graded","feedback","failure","collected","destroyed"]),timestamp:i,payloadHash:a,metadata:e.record(e.string(),e.unknown()).default({})}).strict(),s=e.object({graderId:n,graderVersion:e.string().trim().min(1).max(200),score:e.number().finite().nullable(),passed:e.boolean(),rewardEligible:e.boolean(),failureClass:e.enum(["policy_failure","grader_failure","environment_failure","infrastructure_failure","timeout","cancelled"]).nullable(),feedback:e.array(e.string().max(5e5)),visibleEvidenceRefs:e.array(e.string().trim().min(1).max(2e3)),privilegedEvidenceRefs:e.array(e.string().trim().min(1).max(2e3)),contentHash:a}).strict(),A=e.object({schemaVersion:e.literal("openpond.harnessRunTrace.v1"),manifest:t,taskId:n,seed:e.string().trim().min(1).max(500),events:e.array(v).max(1e6),actions:e.array(S).max(1e5),observations:e.array(_).max(1e5),graderEvidence:e.array(s).max(1e4),learningSignals:e.array(o).max(1e5),terminal:e.boolean(),failureClass:s.shape.failureClass,artifactHash:a,contentHash:a}).strict();export{k as a};
2
+ import{Tb as l}from"./chunk-M55H7KVR.js";import{b as n,c as a,d as i,f as t}from"./chunk-BIPQCJ5V.js";import{A as e}from"./chunk-PF56N7ZY.js";var k=e.enum(["trajectory","reward","demonstration","preference","correction","critique","targeted_feedback","grader_evidence","infrastructure_failure"]),c=e.object({datasetRelease:t,harnessRelease:t,evidenceSetRelease:t.nullable(),profileRelease:t.nullable(),model:e.object({source:e.string().trim().min(1).max(200),revision:e.string().trim().min(1).max(500),artifactHash:a.nullable()}).strict(),environmentHash:a,graderHash:a,toolContractHash:a,verificationReceiptHash:a.nullable()}).strict(),r=e.object({schemaVersion:e.literal("openpond.learningSignal.v1"),id:n,taskId:n.nullable(),episodeId:n.nullable(),policyVersion:e.number().int().nonnegative().nullable(),lineage:c,approved:e.boolean(),verifier:e.enum(["deterministic","model_judge","human","none"]),createdAt:i,contentHash:a,metadata:e.record(e.string(),e.unknown()).default({})}).strict(),m=r.extend({kind:e.literal("trajectory"),payload:e.object({traceRef:e.string().trim().min(1).max(2e3),traceHash:a,terminal:e.boolean(),failureClass:e.enum(["policy_failure","grader_failure","environment_failure","infrastructure_failure","timeout","cancelled"]).nullable(),optimizerSample:l.nullable().optional()}).strict()}).strict(),d=r.extend({kind:e.literal("reward"),payload:e.object({reward:e.number().finite(),components:e.record(e.string(),e.number().finite()),eligible:e.boolean(),graderEvidenceRefs:e.array(n).max(1e3)}).strict()}).strict(),g=r.extend({kind:e.literal("demonstration"),payload:e.object({prompt:e.string().max(5e5),response:e.string().max(1e6)}).strict()}).strict(),u=r.extend({kind:e.literal("preference"),payload:e.object({prompt:e.string().max(5e5),chosen:e.string().max(1e6),rejected:e.string().max(1e6),rationale:e.string().max(5e5).nullable()}).strict()}).strict(),p=r.extend({kind:e.literal("correction"),payload:e.object({original:e.string().max(1e6),corrected:e.string().max(1e6),rationale:e.string().max(5e5).nullable()}).strict()}).strict(),b=r.extend({kind:e.literal("critique"),payload:e.object({response:e.string().max(1e6),critique:e.string().max(5e5),severity:e.enum(["note","warning","error"])}).strict()}).strict(),f=r.extend({kind:e.literal("targeted_feedback"),payload:e.object({turnIndex:e.number().int().nonnegative(),target:e.enum(["reasoning","tool","answer","policy"]),feedback:e.string().max(5e5)}).strict()}).strict(),h=r.extend({kind:e.literal("grader_evidence"),payload:e.object({graderId:n,score:e.number().finite().nullable(),passed:e.boolean(),privilegedArtifactRefs:e.array(e.string().trim().min(1).max(2e3))}).strict()}).strict(),x=r.extend({kind:e.literal("infrastructure_failure"),approved:e.literal(!1),verifier:e.literal("none"),payload:e.object({code:n,phase:n,retryable:e.boolean(),rewardEligible:e.literal(!1)}).strict()}).strict(),o=e.discriminatedUnion("kind",[m,d,g,u,p,b,f,h,x]),H=e.object({schemaVersion:e.literal("openpond.learningSignalBatch.v1"),manifestId:n,manifestHash:a,sequence:e.number().int().nonnegative(),signals:e.array(o).min(1).max(1e5),contentHash:a}).strict();var S=e.object({id:n,turn:e.number().int().nonnegative(),kind:e.enum(["message","tool_call","terminal"]),name:n.nullable(),arguments:e.record(e.string(),e.unknown()),content:e.string().max(1e6).nullable(),contentHash:a}).strict(),_=e.object({actionId:n,turn:e.number().int().nonnegative(),terminal:e.boolean(),output:e.record(e.string(),e.unknown()),artifactRefs:e.array(e.string().trim().min(1).max(2e3)),contentHash:a}).strict(),v=e.object({sequence:e.number().int().nonnegative(),type:e.enum(["created","reset","action","observation","terminal","graded","feedback","failure","collected","destroyed"]),timestamp:i,payloadHash:a,metadata:e.record(e.string(),e.unknown()).default({})}).strict(),s=e.object({graderId:n,graderVersion:e.string().trim().min(1).max(200),score:e.number().finite().nullable(),passed:e.boolean(),rewardEligible:e.boolean(),failureClass:e.enum(["policy_failure","grader_failure","environment_failure","infrastructure_failure","timeout","cancelled"]).nullable(),feedback:e.array(e.string().max(5e5)),visibleEvidenceRefs:e.array(e.string().trim().min(1).max(2e3)),privilegedEvidenceRefs:e.array(e.string().trim().min(1).max(2e3)),contentHash:a}).strict(),A=e.object({schemaVersion:e.literal("openpond.harnessRunTrace.v1"),manifest:t,taskId:n,seed:e.string().trim().min(1).max(500),events:e.array(v).max(1e6),actions:e.array(S).max(1e5),observations:e.array(_).max(1e5),graderEvidence:e.array(s).max(1e4),learningSignals:e.array(o).max(1e5),terminal:e.boolean(),failureClass:s.shape.failureClass,artifactHash:a,contentHash:a}).strict();export{k as a};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{b as I,f as $}from"./chunk-6QSSIT62.js";import{a as ve}from"./chunk-L3KS6MOV.js";import{E as ke,F as Re}from"./chunk-I7AQMAQI.js";import{f as U}from"./chunk-H7IWJN7L.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{b as I,f as $}from"./chunk-LO3O45IX.js";import{a as ve}from"./chunk-L3KS6MOV.js";import{E as ke,F as Re}from"./chunk-LHA7RQBA.js";import{f as U}from"./chunk-H7IWJN7L.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 s}from"./chunk-FTQLQJQV.js";import{readFileSync as i}from"node:fs";import a from"node:path";function l(){let o=["../../../package.json","../../package.json","../package.json","./package.json","../../../../package.json"];for(let t of o)try{let r=new URL(t,import.meta.url),e=i(r,"utf-8"),n=JSON.parse(e);if(n.name==="openpond"&&typeof n.version=="string")return n.version}catch{}try{let t=i(a.join(a.dirname(process.execPath),"package.json"),"utf-8"),r=JSON.parse(t);if(r.name==="openpond"&&typeof r.version=="string")return r.version}catch{}return"unknown"}s(l,"getInstalledCliVersion");function c(o){let t=/^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/.exec(o.trim());if(!t)return null;let r=Number.parseInt(t[1],10),e=Number.parseInt(t[2],10),n=Number.parseInt(t[3],10);return!Number.isFinite(r)||!Number.isFinite(e)||!Number.isFinite(n)?null:[r,e,n]}s(c,"parseSemver");function f(o,t){let r=c(o),e=c(t);if(!r||!e)return null;for(let n=0;n<3;n+=1){if(r[n]<e[n])return-1;if(r[n]>e[n])return 1}return 0}s(f,"compareSemver");async function g(o){let t=new AbortController,r=setTimeout(()=>t.abort(),7e3);try{let e=await fetch(`https://registry.npmjs.org/${encodeURIComponent(o)}/latest`,{signal:t.signal});if(!e.ok){let u=await e.text().catch(()=>"");throw new Error(`npm registry request failed: ${e.status} ${u}`.trim())}let n=await e.json().catch(()=>({}));if(typeof n.version!="string"||n.version.trim().length===0)throw new Error("npm registry payload missing version");return n.version.trim()}finally{clearTimeout(r)}}s(g,"fetchLatestNpmVersion");export{l as a,f as b,g as c};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{c as l}from"./chunk-DARVPBZ4.js";import{a as m,c as f}from"./chunk-NPOHW5OU.js";import{c,f as u}from"./chunk-BSHAIAXY.js";import{c as a}from"./chunk-3M53YXEI.js";import{d as n}from"./chunk-OS3LO5J3.js";import{b as s}from"./chunk-GLUWATL5.js";import{a as i}from"./chunk-FTQLQJQV.js";import{readFile as w,stat as h}from"node:fs/promises";async function U(r){let t=a(r,"inputFile");if(!t)throw new Error("Provide --input-file with the exact reviewed request.");let o=await h(t);if(!o.isFile()||o.size>1048576)throw new Error("The request must be a regular JSON file of at most 1 MiB.");let e=await w(t);if(e.byteLength>1048576)throw new Error("The request file grew beyond 1 MiB.");return JSON.parse(e.toString("utf8"))}i(U,"readEvaluationCommandInput");async function b(r){let t=a(r,"team");if(!t)throw new Error("Select --team for the evaluation owner.");if(r.local===!0||r.local==="true"){let e=new URL(a(r,"serverUrl")||m);if(e.protocol!=="http:"||!["localhost","127.0.0.1","[::1]"].includes(e.hostname)||e.username||e.password||e.search||e.hash||e.pathname!=="/")throw new Error("Local evaluation commands require an HTTP loopback server origin.");return{teamId:t,baseUrl:e.origin,apiKey:"local-capability",fetch:await f(e.origin)}}let o=await n();return{teamId:t,apiKey:await l(o,u(o)),baseUrl:c(r)??o.apiBaseUrl??s}}i(b,"evaluationCommandAccess");export{U as a,b};
2
+ import{c as l}from"./chunk-23P2O7PH.js";import{a as m,c as f}from"./chunk-NPOHW5OU.js";import{c,f as u}from"./chunk-BSHAIAXY.js";import{c as a}from"./chunk-3M53YXEI.js";import{d as n}from"./chunk-ENSB6ZTM.js";import{b as s}from"./chunk-GLUWATL5.js";import{a as i}from"./chunk-FTQLQJQV.js";import{readFile as w,stat as h}from"node:fs/promises";async function U(r){let t=a(r,"inputFile");if(!t)throw new Error("Provide --input-file with the exact reviewed request.");let o=await h(t);if(!o.isFile()||o.size>1048576)throw new Error("The request must be a regular JSON file of at most 1 MiB.");let e=await w(t);if(e.byteLength>1048576)throw new Error("The request file grew beyond 1 MiB.");return JSON.parse(e.toString("utf8"))}i(U,"readEvaluationCommandInput");async function b(r){let t=a(r,"team");if(!t)throw new Error("Select --team for the evaluation owner.");if(r.local===!0||r.local==="true"){let e=new URL(a(r,"serverUrl")||m);if(e.protocol!=="http:"||!["localhost","127.0.0.1","[::1]"].includes(e.hostname)||e.username||e.password||e.search||e.hash||e.pathname!=="/")throw new Error("Local evaluation commands require an HTTP loopback server origin.");return{teamId:t,baseUrl:e.origin,apiKey:"local-capability",fetch:await f(e.origin)}}let o=await n();return{teamId:t,apiKey:await l(o,u(o)),baseUrl:c(r)??o.apiBaseUrl??s}}i(b,"evaluationCommandAccess");export{U as a,b};