openpond 0.2.62 → 0.2.63

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 (496) hide show
  1. package/README.md +2 -0
  2. package/dist/app-server.d.ts +1053 -63
  3. package/dist/app-server.js +1 -1
  4. package/dist/chunks/{acp-DYRBDJRU.js → acp-H3MJCPHX.js} +1 -1
  5. package/dist/chunks/{acp-agent-UTLP7C3I.js → acp-agent-DWA7272M.js} +1 -1
  6. package/dist/chunks/actions-command-IIYOO4LL.js +2 -0
  7. package/dist/chunks/{app-layer-N2H3RBEN.js → app-layer-K7H2WJ56.js} +1 -1
  8. package/dist/chunks/app-server-connected-apps-RM5E2VWF.js +2 -0
  9. package/dist/chunks/app-server-evaluations-XGMGS67X.js +2 -0
  10. package/dist/chunks/app-server-harness-services-BHD6S5II.js +2 -0
  11. package/dist/chunks/app-server-runtime-LFIL6F7D.js +2 -0
  12. package/dist/chunks/apps-QKAHJGQ4.js +2 -0
  13. package/dist/chunks/chunk-25XXZS3E.js +2 -0
  14. package/dist/chunks/chunk-27JGS3KB.js +12 -0
  15. package/dist/chunks/{chunk-7JBB4PXS.js → chunk-2HAWOMZK.js} +1 -1
  16. package/dist/chunks/chunk-2LJCJOJ7.js +2 -0
  17. package/dist/chunks/{chunk-CN5OXQ7A.js → chunk-3YXYBYWK.js} +1 -1
  18. package/dist/chunks/{chunk-GEKORCMN.js → chunk-42V4NV2F.js} +1 -1
  19. package/dist/chunks/{chunk-VAJSRUAB.js → chunk-4FNCBA3Y.js} +1 -1
  20. package/dist/chunks/{chunk-F7D4BMTO.js → chunk-4L6DU6Z2.js} +1 -1
  21. package/dist/chunks/{chunk-SZKFNKWO.js → chunk-4SZ3HKHU.js} +1 -1
  22. package/dist/chunks/chunk-5EP2DZLJ.js +2 -0
  23. package/dist/chunks/chunk-5FU5RLML.js +2 -0
  24. package/dist/chunks/{chunk-6SH4B7DV.js → chunk-5MHYGMJG.js} +1 -1
  25. package/dist/chunks/{chunk-MEK7DLX3.js → chunk-6EBCS57F.js} +1 -1
  26. package/dist/chunks/chunk-6RS4NAOY.js +2 -0
  27. package/dist/chunks/{chunk-NVHZRKXB.js → chunk-7HRLWPPZ.js} +1 -1
  28. package/dist/chunks/chunk-7O6Z3VOZ.js +2 -0
  29. package/dist/chunks/{chunk-P74RR2GB.js → chunk-7WYL2IDD.js} +1 -1
  30. package/dist/chunks/chunk-7YLXGILH.js +2 -0
  31. package/dist/chunks/chunk-7ZLXFKRI.js +2 -0
  32. package/dist/chunks/{chunk-NWOK6NLE.js → chunk-AH26AQN7.js} +1 -1
  33. package/dist/chunks/chunk-AHOBCBVZ.js +2 -0
  34. package/dist/chunks/chunk-B5R53U74.js +2 -0
  35. package/dist/chunks/{chunk-NKZNPTLA.js → chunk-BPZOABMC.js} +1 -1
  36. package/dist/chunks/{chunk-2IIBCCOK.js → chunk-BSPFY3Y5.js} +1 -1
  37. package/dist/chunks/{chunk-5OSM75X5.js → chunk-BU27SLZP.js} +2 -2
  38. package/dist/chunks/chunk-C2AXMKK4.js +2 -0
  39. package/dist/chunks/{chunk-AMO5DVKM.js → chunk-C2LAEGOW.js} +2 -2
  40. package/dist/chunks/{chunk-GNCEZ3UP.js → chunk-CZ5R4JXZ.js} +1 -1
  41. package/dist/chunks/{chunk-JIFUGA3U.js → chunk-DABBHWSF.js} +1 -1
  42. package/dist/chunks/{chunk-VK4TPZTA.js → chunk-DLANLLKH.js} +1 -1
  43. package/dist/chunks/{chunk-WGLVSGFA.js → chunk-DQI5TE6A.js} +2 -2
  44. package/dist/chunks/chunk-DTTFUANI.js +12 -0
  45. package/dist/chunks/{chunk-4TM75R7V.js → chunk-DUL6DXOI.js} +1 -1
  46. package/dist/chunks/{chunk-TGEGXTPR.js → chunk-ELX7VRSU.js} +1 -1
  47. package/dist/chunks/chunk-ERL2M773.js +3 -0
  48. package/dist/chunks/{chunk-4PZWGNX4.js → chunk-ERT32RZA.js} +4 -4
  49. package/dist/chunks/{chunk-RTJCELRR.js → chunk-EZRUWIP6.js} +1 -1
  50. package/dist/chunks/{chunk-LJDBR3RN.js → chunk-F6UQ6PPK.js} +1 -1
  51. package/dist/chunks/chunk-F7QTIHXX.js +2 -0
  52. package/dist/chunks/chunk-FAKDGLZQ.js +8 -0
  53. package/dist/chunks/{chunk-FFWOTZQM.js → chunk-FVRII5XO.js} +1 -1
  54. package/dist/chunks/{chunk-C7M2WBWZ.js → chunk-FYYYECHE.js} +51 -49
  55. package/dist/chunks/chunk-G32BO6M5.js +4 -0
  56. package/dist/chunks/{chunk-NBE74GLF.js → chunk-G6OR5NB6.js} +1 -1
  57. package/dist/chunks/{chunk-GQGLPKU4.js → chunk-GGJUWIGR.js} +1 -1
  58. package/dist/chunks/{chunk-VSQXDS6H.js → chunk-GPL2Z65R.js} +1 -1
  59. package/dist/chunks/{chunk-INO67SEN.js → chunk-GS6ZUSIN.js} +2 -2
  60. package/dist/chunks/{chunk-47AXSBPV.js → chunk-GVARQXYI.js} +1 -1
  61. package/dist/chunks/chunk-GXCUH2VV.js +17 -0
  62. package/dist/chunks/{chunk-OCC43RSJ.js → chunk-GXZCMO6S.js} +1 -1
  63. package/dist/chunks/{chunk-CLFYRN46.js → chunk-H6C4MAUN.js} +1 -1
  64. package/dist/chunks/{chunk-HBLN4OLY.js → chunk-HUCBKXTU.js} +1 -1
  65. package/dist/chunks/{chunk-M5IX6VUA.js → chunk-IHB5GTOJ.js} +2 -2
  66. package/dist/chunks/{chunk-J3B2GM4A.js → chunk-IWWXIUAQ.js} +1 -1
  67. package/dist/chunks/chunk-J572ANHX.js +13 -0
  68. package/dist/chunks/{chunk-AKZPMKWP.js → chunk-J7ZTPXRQ.js} +1 -1
  69. package/dist/chunks/{chunk-CJUVHE4U.js → chunk-JORRZ4BB.js} +1 -1
  70. package/dist/chunks/chunk-JSQRLLN6.js +2 -0
  71. package/dist/chunks/chunk-KCOTDUGW.js +2 -0
  72. package/dist/chunks/{chunk-NK4JKB7C.js → chunk-KHTAAVC2.js} +1 -1
  73. package/dist/chunks/{chunk-LRRBYIGH.js → chunk-LK2K3SPM.js} +2 -2
  74. package/dist/chunks/{chunk-557XSPVS.js → chunk-LKKMLBOH.js} +1 -1
  75. package/dist/chunks/{chunk-U456UP3N.js → chunk-LSZJ5M3X.js} +1 -1
  76. package/dist/chunks/chunk-M3FLEZ4E.js +4 -0
  77. package/dist/chunks/{chunk-Y2KPHVZK.js → chunk-M3SCON53.js} +1 -1
  78. package/dist/chunks/{chunk-VPDG2V2R.js → chunk-MEGKXGW3.js} +1 -1
  79. package/dist/chunks/chunk-MPNJ2BB4.js +2 -0
  80. package/dist/chunks/{chunk-4RZBGKT7.js → chunk-N33D7KCW.js} +1 -1
  81. package/dist/chunks/chunk-N42HT64M.js +2 -0
  82. package/dist/chunks/{chunk-SD64CLJX.js → chunk-N4VHLJBZ.js} +1 -1
  83. package/dist/chunks/chunk-NEJLJ2XY.js +2 -0
  84. package/dist/chunks/chunk-NG2L6D7G.js +2 -0
  85. package/dist/chunks/{chunk-GV3LFSMI.js → chunk-NLYZ5K7U.js} +1 -1
  86. package/dist/chunks/{chunk-F4TJ7WQV.js → chunk-NT7N6KLE.js} +1 -1
  87. package/dist/chunks/{chunk-PAE3PQEC.js → chunk-NZTCH6K5.js} +1 -1
  88. package/dist/chunks/{chunk-BEI4YULC.js → chunk-OG33QAG6.js} +1 -1
  89. package/dist/chunks/chunk-OTUBJV6C.js +6 -0
  90. package/dist/chunks/{chunk-RH43WLBX.js → chunk-PBTXLQAU.js} +1 -1
  91. package/dist/chunks/{chunk-3R4MSE2S.js → chunk-QJ6KUVAR.js} +1 -1
  92. package/dist/chunks/{chunk-7JXZNCBC.js → chunk-QU4UE73E.js} +1 -1
  93. package/dist/chunks/{chunk-WQMXEZVE.js → chunk-R6VJDOQM.js} +3 -3
  94. package/dist/chunks/{chunk-FUSCTBJI.js → chunk-R6WMY6AH.js} +1 -1
  95. package/dist/chunks/{chunk-EIX2V2KU.js → chunk-RDSVU6F6.js} +1 -1
  96. package/dist/chunks/{chunk-R4PDSOB4.js → chunk-RFMME46Z.js} +1 -1
  97. package/dist/chunks/{chunk-GW5SE3FM.js → chunk-RZUCVF2Q.js} +1 -1
  98. package/dist/chunks/{chunk-UC3FXTDL.js → chunk-SFKZITAG.js} +5 -5
  99. package/dist/chunks/{chunk-5A6ER3M2.js → chunk-SHJY5RLU.js} +1 -1
  100. package/dist/chunks/chunk-SI5W5LBV.js +2 -0
  101. package/dist/chunks/chunk-SO42ZB5K.js +2 -0
  102. package/dist/chunks/{chunk-2UDAKLJ4.js → chunk-TCOTXCV6.js} +1 -1
  103. package/dist/chunks/{chunk-QCSLEMZF.js → chunk-U2K7QJCG.js} +1 -1
  104. package/dist/chunks/{chunk-ISIXFK6U.js → chunk-UH4JSSRL.js} +28 -28
  105. package/dist/chunks/{chunk-X4ZT22SG.js → chunk-UPWJSNL5.js} +1 -1
  106. package/dist/chunks/chunk-URNMC46H.js +157 -0
  107. package/dist/chunks/{chunk-NLQ2UPN2.js → chunk-V7KR74NO.js} +1 -1
  108. package/dist/chunks/{chunk-HXZXDDKW.js → chunk-VHXDWAEH.js} +1 -1
  109. package/dist/chunks/{chunk-NE4ESZPT.js → chunk-W2TICQ62.js} +1 -1
  110. package/dist/chunks/chunk-WP2L2NY2.js +2 -0
  111. package/dist/chunks/chunk-WSOUMXH3.js +24 -0
  112. package/dist/chunks/chunk-WWQNMC7C.js +6 -0
  113. package/dist/chunks/chunk-XMHIQ3SK.js +5 -0
  114. package/dist/chunks/{chunk-5MTN6KXV.js → chunk-XNOMIWEY.js} +1 -1
  115. package/dist/chunks/{chunk-ZXT7V64X.js → chunk-XOB6FKQV.js} +1 -1
  116. package/dist/chunks/chunk-Y766IN7Y.js +2 -0
  117. package/dist/chunks/chunk-YCZZ62C2.js +2 -0
  118. package/dist/chunks/chunk-YM4PSVFW.js +4 -0
  119. package/dist/chunks/chunk-YNQWJWIC.js +10 -0
  120. package/dist/chunks/{chunk-GSWBNJGZ.js → chunk-Z3BWCFLV.js} +1 -1
  121. package/dist/chunks/{chunk-GOIKLFXK.js → chunk-ZG6353RM.js} +1 -1
  122. package/dist/chunks/{chunk-T6C5BNXK.js → chunk-ZPTKR3GB.js} +1 -1
  123. package/dist/chunks/{chunk-MNXNZDDW.js → chunk-ZYVHOVKL.js} +1 -1
  124. package/dist/chunks/chunk-ZZHXQCNB.js +22 -0
  125. package/dist/chunks/cli-PSXMIJTF.js +2 -0
  126. package/dist/chunks/{configuration-command-BU2RPG33.js → configuration-command-XYKMXIWF.js} +1 -1
  127. package/dist/chunks/connected-app-executor-6G2LA3PQ.js +2 -0
  128. package/dist/chunks/connected-evidence-IRXYN6YD.js +2 -0
  129. package/dist/chunks/{connected-starting-assets-V5QXRK5Q.js → connected-starting-assets-JONPTII6.js} +1 -1
  130. package/dist/chunks/{continual-FLW6DAJK.js → continual-Z7MO2PF6.js} +1 -1
  131. package/dist/chunks/core-commands-WWN7X3XC.js +2 -0
  132. package/dist/chunks/dataset-preparation-authoring-F3OZIQSP.js +4 -0
  133. package/dist/chunks/datasets-2PC2HP7N.js +2 -0
  134. package/dist/chunks/desktop-test-VU6AFAMO.js +3 -0
  135. package/dist/chunks/dist-47AYOIH6.js +2 -0
  136. package/dist/chunks/{dist-DCSLPBO2.js → dist-MXBEBM4D.js} +1 -1
  137. package/dist/chunks/evaluation-coordination-UOWZHHC5.js +2 -0
  138. package/dist/chunks/experiment-improvements-EB2CV5RA.js +2 -0
  139. package/dist/chunks/experiments-SZQYR6MH.js +2 -0
  140. package/dist/chunks/experiments-signal-2KJCP25D.js +2 -0
  141. package/dist/chunks/{help-PXUUREHZ.js → help-7HXFWIKS.js} +1 -1
  142. package/dist/chunks/host-profile-evaluation-tools-Y2LQ4WQN.js +2 -0
  143. package/dist/chunks/host-profile-external-dataset-FRIGXOO7.js +2 -0
  144. package/dist/chunks/hosted-app-server-composition-PGKQNDW6.js +2 -0
  145. package/dist/chunks/hosted-experiment-improvement-UXC542SZ.js +3 -0
  146. package/dist/chunks/hosted-harness-runtime-6PEI7F2U.js +2 -0
  147. package/dist/chunks/hosted-profile-candidate-HM44BIUX.js +3 -0
  148. package/dist/chunks/hosted-profile-compiler-UAZ4PHYE.js +2 -0
  149. package/dist/chunks/hosted-profile-evaluation-control-EUL57FAB.js +2 -0
  150. package/dist/chunks/hosted-profile-evaluation-inspection-7USY75Z4.js +3 -0
  151. package/dist/chunks/hosted-profile-evaluation-preparation-2LSMZQNA.js +3 -0
  152. package/dist/chunks/{hosted-tasksets-X2YCFYEJ.js → hosted-tasksets-WGXGXJ7E.js} +1 -1
  153. package/dist/chunks/human-review-M26UKGJL.js +2 -0
  154. package/dist/chunks/{import-JWZSZCE4.js → import-6SI4BEKS.js} +2 -2
  155. package/dist/chunks/learning-HM3NWOV5.js +2 -0
  156. package/dist/chunks/local-harness-improvement-runtime-QGWFWNSR.js +2 -0
  157. package/dist/chunks/local-harness-taskset-review-KS4WPMN6.js +2 -0
  158. package/dist/chunks/model-projects-YUAMBQTO.js +2 -0
  159. package/dist/chunks/opchat-AG4CWVY4.js +3 -0
  160. package/dist/chunks/opchat-bounded-chat-IQMP5IIO.js +2 -0
  161. package/dist/chunks/organizations-KDKX77XZ.js +2 -0
  162. package/dist/chunks/{profile-ELE2D7HU.js → profile-O5HL5DTQ.js} +1 -1
  163. package/dist/chunks/project-action-payload-QA24HYGF.js +2 -0
  164. package/dist/chunks/project-agent-XBOOM5TS.js +2 -0
  165. package/dist/chunks/published-experiment-source-GZGN354O.js +2 -0
  166. package/dist/chunks/refiner-profile-service-BJMOYKTC.js +2 -0
  167. package/dist/chunks/{runtime-776NUSE7.js → runtime-XBA744HJ.js} +2 -2
  168. package/dist/chunks/sandbox-command-5ECGS7DG.js +2 -0
  169. package/dist/chunks/{sandbox-template-WP6YCGBK.js → sandbox-template-27U3FQN7.js} +1 -1
  170. package/dist/chunks/saved-work-KUNVTJ7O.js +2 -0
  171. package/dist/chunks/{send-turn-RPB65PME.js → send-turn-FIPWOXWV.js} +1 -1
  172. package/dist/chunks/src-BLWX6DRG.js +424 -0
  173. package/dist/chunks/{src-2R4CMCJ5.js → src-PU7QTFO5.js} +1 -1
  174. package/dist/chunks/standalone-experiment-turn-owner-XIE46VNH.js +2 -0
  175. package/dist/chunks/store-chat-resources-YOEJ2BI6.js +2 -0
  176. package/dist/chunks/{store-continual-support-reviews-R62D2HD6.js → store-continual-support-reviews-FOMYYS25.js} +1 -1
  177. package/dist/chunks/{store-conversation-serving-25O7BAR2.js → store-conversation-serving-K324SQTO.js} +1 -1
  178. package/dist/chunks/{store-create-improve-T5E2GUKK.js → store-create-improve-3LQMIYAP.js} +1 -1
  179. package/dist/chunks/{store-datasets-5Y4U5L3R.js → store-datasets-3KSX7RSO.js} +1 -1
  180. package/dist/chunks/store-evaluation-results-LHCCNNE6.js +7 -0
  181. package/dist/chunks/{store-harness-evaluation-review-settings-I2R3HPO3.js → store-harness-evaluation-review-settings-AAN7KKJ5.js} +1 -1
  182. package/dist/chunks/{store-harness-refinement-candidates-SUT45FQX.js → store-harness-refinement-candidates-3PHL3BUY.js} +1 -1
  183. package/dist/chunks/store-harness-workspaces-ZHNCNWVI.js +2 -0
  184. package/dist/chunks/store-human-review-QJY3ZPPF.js +7 -0
  185. package/dist/chunks/store-learned-preference-migration-validation-X32SRBOM.js +2 -0
  186. package/dist/chunks/{store-learning-MFS4DGQR.js → store-learning-DW3QLQXU.js} +1 -1
  187. package/dist/chunks/{store-learning-credentials-BECWEG2Y.js → store-learning-credentials-67QNTPA7.js} +1 -1
  188. package/dist/chunks/{store-local-experiments-LOH4F4TF.js → store-local-experiments-QTVHJAEP.js} +1 -1
  189. package/dist/chunks/store-model-batch-review-PBYQZJJJ.js +2 -0
  190. package/dist/chunks/store-model-configuration-3SU73CMS.js +3 -0
  191. package/dist/chunks/store-model-project-preparation-TFCG2F2F.js +2 -0
  192. package/dist/chunks/store-ponder-history-WDLMXBIJ.js +2 -0
  193. package/dist/chunks/store-ponder-hosted-DX6E2BVW.js +4 -0
  194. package/dist/chunks/{store-preference-comparison-RNIFLJRW.js → store-preference-comparison-DWV5XSMY.js} +1 -1
  195. package/dist/chunks/{store-schedules-DVQ2PP4F.js → store-schedules-2KUY4T6M.js} +1 -1
  196. package/dist/chunks/{store-sidebar-file-bookmarks-LXWFFYCZ.js → store-sidebar-file-bookmarks-A4XCS7RM.js} +1 -1
  197. package/dist/chunks/{store-sidebar-preferences-4HH7LX6N.js → store-sidebar-preferences-V2PKRXUZ.js} +1 -1
  198. package/dist/chunks/{store-subagents-JLW4GD4Q.js → store-subagents-UGVEFA6M.js} +1 -1
  199. package/dist/chunks/store-task-inbox-QABI4ZAH.js +33 -0
  200. package/dist/chunks/{store-task-inventory-NJXRXFLC.js → store-task-inventory-GEQIZELY.js} +1 -1
  201. package/dist/chunks/store-taskset-drafts-GXABQR5G.js +9 -0
  202. package/dist/chunks/{store-training-VRLU6NFX.js → store-training-CQV7PL3V.js} +1 -1
  203. package/dist/chunks/{store-training-jobs-3ZHG4LGI.js → store-training-jobs-XKN6K66J.js} +18 -10
  204. package/dist/chunks/{store-training-models-KWQD5PRP.js → store-training-models-Q7DTTR4S.js} +1 -1
  205. package/dist/chunks/{store-usage-ZRS3ILF2.js → store-usage-XGAX7NLB.js} +1 -1
  206. package/dist/chunks/{taskset-QDMCQQDJ.js → taskset-ARKJQKYQ.js} +1 -1
  207. package/dist/chunks/taskset-packages-X4K65DTW.js +2 -0
  208. package/dist/chunks/taskset-packages-XK7FSD45.js +2 -0
  209. package/dist/chunks/{teams-bot-GF272RGC.js → teams-bot-UTQAJA6H.js} +1 -1
  210. package/dist/chunks/training-3IWW4256.js +2 -0
  211. package/dist/chunks/{training-DF5UEPY3.js → training-RVIESURJ.js} +1 -1
  212. package/dist/chunks/training-error-2EWDOQ4G.js +2 -0
  213. package/dist/chunks/training-hosted-PFJHYTEU.js +2 -0
  214. package/dist/chunks/training-hosted-checkpoint-evaluation-JJPP7KFW.js +2 -0
  215. package/dist/chunks/training-hosted-feedback-5B2KJGOT.js +2 -0
  216. package/dist/chunks/training-hosted-learning-Y7NHRY4V.js +2 -0
  217. package/dist/chunks/training-hosted-report-UVGTPDOK.js +2 -0
  218. package/dist/chunks/training-hosted-serving-report-OX4A5OKB.js +2 -0
  219. package/dist/chunks/training-hosted-workers-LST4ZUXN.js +2 -0
  220. package/dist/chunks/training-model-start-ROLS3E4V.js +2 -0
  221. package/dist/chunks/{web-search-5RUXYIOF.js → web-search-7FBUBZ66.js} +1 -1
  222. package/dist/chunks/{workspaces-JRY2IE7H.js → workspaces-G3CMY7ZA.js} +1 -1
  223. package/dist/cli.js +1 -1
  224. package/dist/index.js +1 -1
  225. package/dist/sandbox/url.d.ts +3 -1
  226. package/dist/skills/LICENSE +21 -0
  227. package/dist/skills/manifest.json +168 -0
  228. package/dist/skills/openpond-agent-authoring/SKILL.md +9 -3
  229. package/dist/skills/openpond-agent-authoring/references/profile-layout.md +1 -1
  230. package/dist/skills/openpond-agent-authoring/references/validation-and-repair.md +2 -2
  231. package/dist/skills/openpond-cli/SKILL.md +11 -7
  232. package/dist/skills/openpond-cli/references/experiments-and-training.md +1 -1
  233. package/dist/skills/openpond-refiner-authoring/SKILL.md +4 -0
  234. package/dist/skills/openpond-skill-authoring/SKILL.md +5 -1
  235. package/dist/web/assets/App-DY2R8Z6r.js +53 -0
  236. package/dist/web/assets/{AppDialog-BurL61qE.js → AppDialog-8Y0FYalT.js} +1 -1
  237. package/dist/web/assets/AppTerminalPanel-YcnBD5DF.js +2 -0
  238. package/dist/web/assets/{AppToastContext-DZLErwj0.js → AppToastContext-BiQbbVxq.js} +1 -1
  239. package/dist/web/assets/AppsView-Dtte4h6e.js +1 -0
  240. package/dist/web/assets/{AttachmentTypeIcon-CpMSfHCK.js → AttachmentTypeIcon-DgADV7dn.js} +1 -1
  241. package/dist/web/assets/BrowserSidebar-BUqDvEv9.js +1 -0
  242. package/dist/web/assets/{CartesianChart-CEbM980A.js → CartesianChart-J4ChOjvG.js} +1 -1
  243. package/dist/web/assets/ChatTimelineEntry-DC93wlDa.js +8 -0
  244. package/dist/web/assets/ChatTimelineEntry-DztFb85D.css +1 -0
  245. package/dist/web/assets/{CollaborationTabs-DrKJmJZK.js → CollaborationTabs-CFCpk2Ck.js} +1 -1
  246. package/dist/web/assets/CommandMenu-EPPjB14H.js +1 -0
  247. package/dist/web/assets/{CommunityView-BzpIq1lD.js → CommunityView-Okydjpqm.js} +1 -1
  248. package/dist/web/assets/ComposerAttachments-RXCiE88M.js +2 -0
  249. package/dist/web/assets/{ComposerCreateImproveStrip-ChplO9YP.js → ComposerCreateImproveStrip-CSngc8-V.js} +1 -1
  250. package/dist/web/assets/{ConversationImportsSettings-DRHgc7j_.js → ConversationImportsSettings-DS73kyfj.js} +1 -1
  251. package/dist/web/assets/FilePagePreview-Qc4B0vue.js +2 -0
  252. package/dist/web/assets/{GetStartedView-CaBk_mX6.js → GetStartedView-DGFPQ1We.js} +1 -1
  253. package/dist/web/assets/{GettingStartedDialog-JtFLyU3F.js → GettingStartedDialog-DFBYQdHz.js} +1 -1
  254. package/dist/web/assets/{HostedModelLearningReview-hhcjDifK.js → HostedModelLearningReview-BDu3FlcU.js} +1 -1
  255. package/dist/web/assets/{HostedModelLearningSettings-CY8198Y1.js → HostedModelLearningSettings-CHaTHwC8.js} +1 -1
  256. package/dist/web/assets/HtmlVisual-C7GlEVfH.css +1 -0
  257. package/dist/web/assets/HtmlVisual-D9Mh7xds.js +81 -0
  258. package/dist/web/assets/LabModelVersionDetailPage-DgY7lAu5.js +1 -0
  259. package/dist/web/assets/{LabSkillSidebar-HibUEEko.js → LabSkillSidebar-BwtlThO7.js} +1 -1
  260. package/dist/web/assets/LabsRoute-BV7ZJGEw.js +101 -0
  261. package/dist/web/assets/MainChatThread-pzHKd_YN.js +2 -0
  262. package/dist/web/assets/MainPane-6OlLiKKb.js +10 -0
  263. package/dist/web/assets/MainPane-Dje-hfUM.css +1 -0
  264. package/dist/web/assets/NativeSetupTerminal-CPDChcMi.js +2 -0
  265. package/dist/web/assets/NativeSkillSidebar-BEJvt5_H.js +1 -0
  266. package/dist/web/assets/{NewProjectDialog-t9Imnb__.js → NewProjectDialog-CjrjgkTN.js} +1 -1
  267. package/dist/web/assets/{OutputsPage-CeGq_F1S.js → OutputsPage-jzx93QQ3.js} +1 -1
  268. package/dist/web/assets/{PageChrome-VHME5V8j.js → PageChrome-C1M13qG2.js} +1 -1
  269. package/dist/web/assets/{ProjectsPage-2TMZoEPB.js → ProjectsPage-DZrjlMp2.js} +1 -1
  270. package/dist/web/assets/RightChatPanelStack-BsxJg9sy.js +1 -0
  271. package/dist/web/assets/RightSidebarHomePanel-CCVQ9LMB.js +1 -0
  272. package/dist/web/assets/ScheduledWorkPage-Cw1ja2GF.js +1 -0
  273. package/dist/web/assets/{SettingsView-Y8f98GSE.css → SettingsView-Cc0376pY.css} +1 -1
  274. package/dist/web/assets/SettingsView-CckoIki3.js +5 -0
  275. package/dist/web/assets/TasksetDraftEditorPrimitives-ByC8bDjp.js +1 -0
  276. package/dist/web/assets/TeamChatView-OprnSKLF.js +1 -0
  277. package/dist/web/assets/{TerminalOverlay-DlhRpi-X.js → TerminalOverlay-d7A2F9Lx.js} +2 -2
  278. package/dist/web/assets/TrainingCreationPanel-Cyn6R6I6.js +1 -0
  279. package/dist/web/assets/{TrainingDraftPanel-BhhZPPuY.js → TrainingDraftPanel-Mpb5e7t5.js} +1 -1
  280. package/dist/web/assets/TrainingRunLineage-PXzWR65d.css +1 -0
  281. package/dist/web/assets/TrainingRunLineage-VcKz7dIR.js +1 -0
  282. package/dist/web/assets/{UsageSettingsSection-DTZslBeW.js → UsageSettingsSection-FhYymrfc.js} +2 -2
  283. package/dist/web/assets/WorkSidebarPanel-u87uptH0.js +1 -0
  284. package/dist/web/assets/WorkspaceDiffPanel-B5rlW7bA.js +11 -0
  285. package/dist/web/assets/WorkspaceEnvironmentMenu-C8y3537a.js +35 -0
  286. package/dist/web/assets/{WorkspaceFileLocation-ChEeZffU.js → WorkspaceFileLocation-LrEWj4UK.js} +1 -1
  287. package/dist/web/assets/{WorkspaceGitDialogs-D_RUXhTi.js → WorkspaceGitDialogs-NRIMXnkS.js} +1 -1
  288. package/dist/web/assets/{WorkspaceMonacoEditor-BJxaiDrj.js → WorkspaceMonacoEditor-CvDGjKAL.js} +3 -3
  289. package/dist/web/assets/WorkspacePdfPreview-BZ0BbnHv.js +2 -0
  290. package/dist/web/assets/{WorkspacePresentationPreview-A28Poeca.js → WorkspacePresentationPreview-DJrjrvT0.js} +1 -1
  291. package/dist/web/assets/app-models-CUA9XB9U.js +1 -0
  292. package/dist/web/assets/bot-6OhUEmkE.js +1 -0
  293. package/dist/web/assets/browser-sidebar-links-ZyYiYBBd.js +1 -0
  294. package/dist/web/assets/chat-resources-CI8KFVO5.js +1 -0
  295. package/dist/web/assets/{chevron-down-dYn0pd4Q.js → chevron-down-jmVA1BIf.js} +1 -1
  296. package/dist/web/assets/chevron-right-BYmDQ7ti.js +1 -0
  297. package/dist/web/assets/chevron-up-CstyLXH3.js +1 -0
  298. package/dist/web/assets/{chunk-ZFYI4P6C-BmsNtSkR.js → chunk-ONGOAEY6-C__DQmRT.js} +5 -5
  299. package/dist/web/assets/{chunk-BYNVSWIQ-DWh9SmdB.js → chunk-SQBYHWZU-DumrB9SB.js} +1 -1
  300. package/dist/web/assets/{client-choice-storage-DTTLbrYt.js → client-choice-storage-BdQ_YDuk.js} +1 -1
  301. package/dist/web/assets/{cloud-upload-CRMPCFnq.js → cloud-upload-Ck1ufAr8.js} +1 -1
  302. package/dist/web/assets/contracts-BLiqJxBv.js +1 -0
  303. package/dist/web/assets/{copy-DR4ielPn.js → copy-CPkbMfXt.js} +1 -1
  304. package/dist/web/assets/{createLucideIcon-DmttVQ_a.js → createLucideIcon-CXQny8HU.js} +1 -1
  305. package/dist/web/assets/{cssMode-d-2GuNvW.js → cssMode-CYxYl_om.js} +1 -1
  306. package/dist/web/assets/{external-link-B4rPiZEp.js → external-link-CDKOLG_v.js} +1 -1
  307. package/dist/web/assets/{folder-open-BrIUcUk_.js → folder-open-CEtOb_lK.js} +1 -1
  308. package/dist/web/assets/{folder-plus-DwImGEt-.js → folder-plus-CVMYZs3e.js} +1 -1
  309. package/dist/web/assets/{git-commit-horizontal-Ds1mkrlW.js → git-commit-horizontal-DDyhPjxS.js} +1 -1
  310. package/dist/web/assets/{htmlMode-s15GR0Fn.js → htmlMode-DoY4V_j0.js} +1 -1
  311. package/dist/web/assets/icons-D7jkCa2d.js +1 -0
  312. package/dist/web/assets/{image-CY-sHbfQ.js → image-B-PjDSwU.js} +1 -1
  313. package/dist/web/assets/{index-DYrLeSyY.js → index-D9WbJMSq.js} +2 -2
  314. package/dist/web/assets/index-g7UqJhnX.css +1 -0
  315. package/dist/web/assets/{info-aSvM8YlJ.js → info-CCnw-K3b.js} +1 -1
  316. package/dist/web/assets/intake-contracts-BW0Y0C2R.js +1 -0
  317. package/dist/web/assets/{jsonMode-vos9H2hz.js → jsonMode-CeOpZdPj.js} +1 -1
  318. package/dist/web/assets/loader-circle-CPaJeTDy.js +1 -0
  319. package/dist/web/assets/{lspLanguageFeatures-pQmEaoMt.js → lspLanguageFeatures-DAbgLCqZ.js} +1 -1
  320. package/dist/web/assets/{maximize-2-DgF6ZVOM.js → maximize-2-BZX38cpr.js} +1 -1
  321. package/dist/web/assets/message-square-CvgSecgD.js +1 -0
  322. package/dist/web/assets/{monaco.contribution-BPwsKvRB.js → monaco.contribution-CF2JDhi4.js} +2 -2
  323. package/dist/web/assets/{monaco.contribution-CJlccVX3.js → monaco.contribution-cbDqt48m.js} +2 -2
  324. package/dist/web/assets/{monaco.contribution-BbMpa0_-.js → monaco.contribution-m2ze2EsL.js} +2 -2
  325. package/dist/web/assets/{monaco.contribution-pWurLXbm.js → monaco.contribution-yeyow_-Q.js} +2 -2
  326. package/dist/web/assets/{monitor-DlEV241C.js → monitor-By0s4hxb.js} +1 -1
  327. package/dist/web/assets/{paperclip-fnRZSIRc.js → paperclip-BJ2QgJLa.js} +1 -1
  328. package/dist/web/assets/{pdf-CT3zVKCE.js → pdf-C4x-1jjP.js} +1 -1
  329. package/dist/web/assets/pdf.worker.min-BrEVksTu.js +1 -0
  330. package/dist/web/assets/play-D_SuGDBM.js +1 -0
  331. package/dist/web/assets/plus-yw95Iaj8.js +1 -0
  332. package/dist/web/assets/{presentation-Bb8ecExR.js → presentation-I86G1Gd9.js} +1 -1
  333. package/dist/web/assets/{python-DXA1xp0A.js → python-CqFTPj8r.js} +1 -1
  334. package/dist/web/assets/{refresh-cw-B53QjxMO.js → refresh-cw-Dga35Eay.js} +1 -1
  335. package/dist/web/assets/requests-BCbaFiqV.js +1 -0
  336. package/dist/web/assets/{reward-checks-5AOStF27.js → reward-checks-Bcq9ETCA.js} +1 -1
  337. package/dist/web/assets/{save-V1Q4Fcqa.js → save-BLKjYtzR.js} +1 -1
  338. package/dist/web/assets/settings-D7C-Auyi.js +21 -0
  339. package/dist/web/assets/{settings-lists-CtH1A57b.js → settings-lists-DMKA1lCN.js} +5 -5
  340. package/dist/web/assets/square-BY5lG2Ol.js +1 -0
  341. package/dist/web/assets/{square-terminal-Dmgkm5zY.js → square-terminal-B-n7vUex.js} +1 -1
  342. package/dist/web/assets/submit-issue-command-B7Hrt2tU.js +3 -0
  343. package/dist/web/assets/{toggleHighContrast-B-BD2K2Q.js → toggleHighContrast-BhmBE5XE.js} +1 -1
  344. package/dist/web/assets/training-QrdkRQZQ.js +2 -0
  345. package/dist/web/assets/{training-model-data-14942K_Z.js → training-model-data-DB-jg6L_.js} +12 -12
  346. package/dist/web/assets/{tsMode-DdgIcxK3.js → tsMode-BSWEII2p.js} +1 -1
  347. package/dist/web/assets/{upload-82Y6RjLi.js → upload-C4MPhQn8.js} +1 -1
  348. package/dist/web/assets/{useAccountSettings-BgHXNpq_.js → useAccountSettings-9oqWdRLs.js} +1 -1
  349. package/dist/web/assets/useAgentInventory-isO79ui9.js +1 -0
  350. package/dist/web/assets/{useLocalAgentSchedules-CsKv22Hs.js → useLocalAgentSchedules-CZX6PxoK.js} +1 -1
  351. package/dist/web/assets/{useQuery-CPC2wsWm.js → useQuery-BD0Uexmh.js} +1 -1
  352. package/dist/web/assets/{wifi-off-DXOoDN9l.js → wifi-off-Cloe0WuQ.js} +1 -1
  353. package/dist/web/assets/{workers-Clf4hKt5.js → workers-BXagz5eg.js} +1 -1
  354. package/dist/web/assets/x-Dqpel42h.js +1 -0
  355. package/dist/web/assets/{yaml-I1tf8Uxx.js → yaml-sBdvVbCc.js} +1 -1
  356. package/dist/web/index.html +2 -2
  357. package/docs/command-reference.md +22 -4
  358. package/package.json +5 -2
  359. package/dist/chunks/actions-command-6LF4Z4WK.js +0 -2
  360. package/dist/chunks/app-server-connected-apps-3T546FE7.js +0 -2
  361. package/dist/chunks/app-server-evaluations-TXD747QA.js +0 -2
  362. package/dist/chunks/app-server-harness-services-BBCDV5P3.js +0 -2
  363. package/dist/chunks/app-server-runtime-VEJPDAFP.js +0 -2
  364. package/dist/chunks/apps-CTT2XYRR.js +0 -2
  365. package/dist/chunks/chunk-4M3YW3EQ.js +0 -13
  366. package/dist/chunks/chunk-4U2FNXQW.js +0 -2
  367. package/dist/chunks/chunk-547AUVKN.js +0 -2
  368. package/dist/chunks/chunk-557YG77L.js +0 -2
  369. package/dist/chunks/chunk-7KTARW23.js +0 -2
  370. package/dist/chunks/chunk-B42QQUZY.js +0 -2
  371. package/dist/chunks/chunk-EWOTDVDJ.js +0 -4
  372. package/dist/chunks/chunk-GAQLXFOT.js +0 -2
  373. package/dist/chunks/chunk-GLDYJM7O.js +0 -1
  374. package/dist/chunks/chunk-HKV7RX5E.js +0 -2
  375. package/dist/chunks/chunk-IWK3RTLR.js +0 -2
  376. package/dist/chunks/chunk-JX6OX6XE.js +0 -12
  377. package/dist/chunks/chunk-JY3YSI54.js +0 -2
  378. package/dist/chunks/chunk-LILXHGIA.js +0 -2
  379. package/dist/chunks/chunk-LJPO3TEL.js +0 -17
  380. package/dist/chunks/chunk-MNFW5WLD.js +0 -6
  381. package/dist/chunks/chunk-N5GPINVP.js +0 -2
  382. package/dist/chunks/chunk-N663LL27.js +0 -2
  383. package/dist/chunks/chunk-NOSBNHGC.js +0 -18
  384. package/dist/chunks/chunk-NR5VASQB.js +0 -2
  385. package/dist/chunks/chunk-O3MHHGC5.js +0 -151
  386. package/dist/chunks/chunk-OZ6LRNRE.js +0 -2
  387. package/dist/chunks/chunk-PGO4FRHU.js +0 -10
  388. package/dist/chunks/chunk-QAVQJZCM.js +0 -2
  389. package/dist/chunks/chunk-RBDUMASL.js +0 -2
  390. package/dist/chunks/chunk-TM4VEMNN.js +0 -2
  391. package/dist/chunks/chunk-TUCKED4T.js +0 -4
  392. package/dist/chunks/chunk-TVTFEGTU.js +0 -2
  393. package/dist/chunks/chunk-TW3SRBLU.js +0 -22
  394. package/dist/chunks/chunk-UT6F6AIB.js +0 -12
  395. package/dist/chunks/chunk-VE6ZIGUQ.js +0 -2
  396. package/dist/chunks/chunk-VI32G77S.js +0 -2
  397. package/dist/chunks/chunk-VWRTE64Y.js +0 -2
  398. package/dist/chunks/chunk-XSB3T4JZ.js +0 -5
  399. package/dist/chunks/chunk-XWDFXM3S.js +0 -2
  400. package/dist/chunks/chunk-ZQHPGEYT.js +0 -2
  401. package/dist/chunks/cli-GCSO2OAI.js +0 -2
  402. package/dist/chunks/connected-app-executor-UDE7U4KG.js +0 -2
  403. package/dist/chunks/connected-evidence-GXIY2L7C.js +0 -2
  404. package/dist/chunks/core-commands-NJ6TGND4.js +0 -2
  405. package/dist/chunks/dataset-preparation-authoring-IUXUQK3L.js +0 -4
  406. package/dist/chunks/datasets-AH56DKLZ.js +0 -2
  407. package/dist/chunks/desktop-test-PYUTEOWO.js +0 -3
  408. package/dist/chunks/dist-5267UT3V.js +0 -2
  409. package/dist/chunks/evaluation-coordination-3AUICOC5.js +0 -2
  410. package/dist/chunks/experiment-improvements-YS7GGPDW.js +0 -2
  411. package/dist/chunks/experiments-EJZK7FPT.js +0 -2
  412. package/dist/chunks/experiments-signal-NKUIJCIY.js +0 -2
  413. package/dist/chunks/host-profile-evaluation-tools-CTC5JQPD.js +0 -2
  414. package/dist/chunks/host-profile-external-dataset-GJWDY3YT.js +0 -2
  415. package/dist/chunks/hosted-app-server-composition-TLJSKMJT.js +0 -2
  416. package/dist/chunks/hosted-experiment-improvement-TIVXXRPG.js +0 -3
  417. package/dist/chunks/hosted-harness-runtime-SFLJEZFI.js +0 -2
  418. package/dist/chunks/hosted-profile-candidate-DKEMVIYG.js +0 -3
  419. package/dist/chunks/hosted-profile-compiler-V6YR6EHO.js +0 -2
  420. package/dist/chunks/hosted-profile-evaluation-control-ERCXAPZD.js +0 -2
  421. package/dist/chunks/hosted-profile-evaluation-inspection-Q3AIIIB6.js +0 -3
  422. package/dist/chunks/hosted-profile-evaluation-preparation-ELLGH44Z.js +0 -3
  423. package/dist/chunks/human-review-5WM6MSON.js +0 -2
  424. package/dist/chunks/learning-KVLTMRLD.js +0 -2
  425. package/dist/chunks/local-harness-improvement-runtime-IGIKM6GJ.js +0 -2
  426. package/dist/chunks/local-harness-taskset-review-DR2ZIDOH.js +0 -2
  427. package/dist/chunks/model-projects-H22KENI4.js +0 -2
  428. package/dist/chunks/opchat-3S6TSDZO.js +0 -3
  429. package/dist/chunks/opchat-bounded-chat-B7LPCD4U.js +0 -2
  430. package/dist/chunks/organizations-62YNTZTO.js +0 -2
  431. package/dist/chunks/project-action-payload-32F4X2BB.js +0 -2
  432. package/dist/chunks/project-agent-O4REKO6T.js +0 -2
  433. package/dist/chunks/published-experiment-source-DAOTJLIN.js +0 -2
  434. package/dist/chunks/refiner-profile-service-DYMZ7J3X.js +0 -2
  435. package/dist/chunks/sandbox-command-UQ26NDIX.js +0 -2
  436. package/dist/chunks/saved-work-PG52WCRQ.js +0 -2
  437. package/dist/chunks/src-AU6LG7E6.js +0 -421
  438. package/dist/chunks/standalone-experiment-turn-owner-SD3SUTKX.js +0 -2
  439. package/dist/chunks/store-chat-resources-T4LR7K25.js +0 -2
  440. package/dist/chunks/store-evaluation-results-WUVJWCFU.js +0 -7
  441. package/dist/chunks/store-harness-workspaces-IFEFY5CK.js +0 -2
  442. package/dist/chunks/store-human-review-ZQNLZRGG.js +0 -7
  443. package/dist/chunks/store-learned-preference-migration-validation-UH6MJQSH.js +0 -2
  444. package/dist/chunks/store-model-batch-review-QO4VVKWC.js +0 -2
  445. package/dist/chunks/store-model-configuration-C3HSOFD5.js +0 -3
  446. package/dist/chunks/store-model-project-preparation-RQ2YTC2Y.js +0 -2
  447. package/dist/chunks/store-task-inbox-DL5RYFPO.js +0 -33
  448. package/dist/chunks/store-taskset-drafts-UFGN4SGF.js +0 -9
  449. package/dist/chunks/taskset-packages-CBLJFWDQ.js +0 -2
  450. package/dist/chunks/training-error-L5V5IBX3.js +0 -2
  451. package/dist/chunks/training-hosted-I2NDBYGS.js +0 -2
  452. package/dist/chunks/training-hosted-report-4F25RZZ4.js +0 -2
  453. package/dist/chunks/training-hosted-workers-KI767T4Y.js +0 -2
  454. package/dist/skills/openpond-desktop-harness/SKILL.md +0 -113
  455. package/dist/skills/openpond-desktop-harness/agents/openai.yaml +0 -4
  456. package/dist/web/assets/App-DHJVXTI2.js +0 -54
  457. package/dist/web/assets/AppTerminalPanel-RjFlF-a4.js +0 -2
  458. package/dist/web/assets/AppsView-ttlr9ckQ.js +0 -1
  459. package/dist/web/assets/BrowserSidebar-Cp2l0kg0.js +0 -1
  460. package/dist/web/assets/ChatTimelineEntry-BITv20Ze.js +0 -1
  461. package/dist/web/assets/CommandMenu-6oj8FUr6.js +0 -1
  462. package/dist/web/assets/ComposerAttachments-6en7m_ov.js +0 -2
  463. package/dist/web/assets/FilePagePreview-CW4J_1u7.js +0 -2
  464. package/dist/web/assets/LabModelVersionDetailPage-f0tHT-Sn.js +0 -1
  465. package/dist/web/assets/LabsRoute-B61l1b8P.js +0 -101
  466. package/dist/web/assets/MainChatThread-egKi0gLk.js +0 -2
  467. package/dist/web/assets/MainPane-2dj6Dg4l.js +0 -95
  468. package/dist/web/assets/MainPane-BwHw3UYp.css +0 -1
  469. package/dist/web/assets/NativeSetupTerminal-CNHTByLo.js +0 -2
  470. package/dist/web/assets/NativeSkillSidebar-DCdMbSfe.js +0 -1
  471. package/dist/web/assets/RightChatPanelStack-B3mBViGC.js +0 -1
  472. package/dist/web/assets/RightSidebarHomePanel-CxDYSyyx.js +0 -1
  473. package/dist/web/assets/ScheduledWorkPage-Dh47iH11.js +0 -1
  474. package/dist/web/assets/SettingsView-D2bu3tK_.js +0 -5
  475. package/dist/web/assets/TeamChatView-CN17AsgA.js +0 -1
  476. package/dist/web/assets/TrainingCreationPanel-DJKzaNFj.js +0 -1
  477. package/dist/web/assets/TrainingMetricWorkbench-DBy8F1xp.js +0 -1
  478. package/dist/web/assets/WorkSidebarPanel-Ds-eTQLs.js +0 -1
  479. package/dist/web/assets/WorkspaceDiffPanel-D_iyg2D4.js +0 -11
  480. package/dist/web/assets/WorkspaceEnvironmentMenu-Fn-NlfMQ.js +0 -35
  481. package/dist/web/assets/app-models-BviS9b7U.js +0 -1
  482. package/dist/web/assets/browser-sidebar-links-ujSvTf5h.js +0 -1
  483. package/dist/web/assets/chat-resources-3SvnVeKv.js +0 -1
  484. package/dist/web/assets/chevron-right-sFx2xRvT.js +0 -1
  485. package/dist/web/assets/contracts-BHTOD1nd.js +0 -1
  486. package/dist/web/assets/icons-CK5-nxVC.js +0 -1
  487. package/dist/web/assets/index-Dezj4Z2p.css +0 -1
  488. package/dist/web/assets/loader-circle-cyf35w3i.js +0 -1
  489. package/dist/web/assets/play-wI_3FLr4.js +0 -1
  490. package/dist/web/assets/plus-DoJe4fLj.js +0 -1
  491. package/dist/web/assets/settings-BKmRueaw.js +0 -21
  492. package/dist/web/assets/square-BqSK-hv9.js +0 -1
  493. package/dist/web/assets/submit-issue-command-DRgUboVW.js +0 -3
  494. package/dist/web/assets/training-managed-adapter-BXNwgd3P.js +0 -1
  495. package/dist/web/assets/useAgentInventory-B-LNn3up.js +0 -1
  496. package/dist/web/assets/x-IPhrr4ju.js +0 -1
@@ -0,0 +1,2 @@
1
+ import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
+ import{a as Je}from"./chunk-QU4UE73E.js";import{a as F,e as $,f as Ye,h as Ue}from"./chunk-YM4PSVFW.js";import{b as ie}from"./chunk-6PKXJEJM.js";import{a as $e}from"./chunk-FEAKTSRS.js";import{a as Ge}from"./chunk-HIYQPZ7C.js";import{f as Fe,h as R}from"./chunk-F6UQ6PPK.js";import{b as We}from"./chunk-NT7N6KLE.js";import{d as ze}from"./chunk-6EBCS57F.js";import{b as O,c as W}from"./chunk-KCOTDUGW.js";import{a as Me}from"./chunk-SI5W5LBV.js";import{d as X}from"./chunk-RZUCVF2Q.js";import{a as Oe}from"./chunk-VFH5C6D2.js";import{d as je,e as Ne}from"./chunk-AH26AQN7.js";import{m as Be}from"./chunk-LK2K3SPM.js";import{u as _e}from"./chunk-B4RKHHF7.js";import{H as Q,lc as Ve,pc as qe,v as Ae}from"./chunk-M3FLEZ4E.js";import{f as be}from"./chunk-5EP2DZLJ.js";import{i as Le,j as Ce}from"./chunk-PBTXLQAU.js";import{i as Te}from"./chunk-6RS4NAOY.js";import{t as U,x as K,y as Se}from"./chunk-ZZHXQCNB.js";import{Ca as Ee,Ja as De,Nb as He,aa as q,ba as Y,ha as Re,i as J,ia as Ie,ja as L,oa as N,za as Pe}from"./chunk-YNQWJWIC.js";import{w as we,x as ve,z}from"./chunk-ABF3W2MO.js";import{a as re,f as oe}from"./chunk-OE22TAXP.js";import{ca as xe,d as fe,h as ye}from"./chunk-J572ANHX.js";import{Ga as le,H as ce,Ja as de,Ya as pe,e as ne,eb as ue,fb as M,gb as me,hb as he,nb as ge,vb as ke}from"./chunk-PBZCXPPC.js";import{r as se}from"./chunk-NJLULBTM.js";import{c as b,d as _,e as ae,m as V,n as f}from"./chunk-VVNV4NNW.js";import{A as x}from"./chunk-PF56N7ZY.js";import{a as h}from"./chunk-FTQLQJQV.js";import{promises as it}from"node:fs";import nt from"node:path";async function _t(e){let o=e.definition.tasksetRelease,c=await je(e.store,e.harnessRelease);if(!c)throw new Error("Evaluation Profile Harness release is unavailable.");let a=await lt({...e,runtime:c});if(a)return a;let s=await e.store.listTasksetRevisions(e.profileId);for(let i of s){if(o.id!==i.id&&o.id!==`taskset-release-${i.id}-r${i.revision}`)continue;let r=await ct(e.storeDir,i);if(r.taskset.id===o.id&&r.taskset.contentHash===o.contentHash)return r}throw new Error(`Released Taskset ${o.id} is unavailable in Profile ${e.profileId}.`)}h(_t,"loadLocalProfileEvaluationTaskset");async function ct(e,o){let c=o.metadata.importedPackageHash;if(typeof c=="string"){let i=await W(e,c);if(i.taskset.id!==o.id||i.taskset.revision!==o.revision)throw new Error("Imported evaluation Taskset differs from its local Profile revision.");return i}if(Ee(o)!==o.contentHash)throw new Error("Authored evaluation Taskset differs from its immutable revision.");let a=He({taskset:o,adapterId:ze(o)}),s=await We({storeDir:e,taskset:o,content:{schemaVersion:"openpond.tasksetPackage.v1",taskset:a.tasksetRelease,environment:a.environmentRelease,verifierSet:a.verifierSetRelease}});return await O(e,s),s}h(ct,"loadCandidate");async function lt(e){let o=e.definition.tasksetRelease,c=e.runtime;if(c.release.harnessRelease.id!==e.harnessRelease.id||c.release.harnessRelease.contentHash!==e.harnessRelease.contentHash)throw new Error("Evaluation Taskset runtime differs from its requested release.");let a=`evals/tasksets/${o.contentHash}.json`,s=c.release.harnessRelease.files.find(i=>i.path===a);if(s){if(s.visibility!=="verifier")throw new Error("Evaluation Taskset package is not verifier-private.");let i=await it.readFile(nt.join(c.release.bundlePath,"source",...a.split("/")));if(V(i)!==s.contentHash)throw new Error("Released evaluation Taskset package bytes differ from their source receipt.");let r=L(JSON.parse(i.toString("utf8")));if(r.taskset.id!==o.id||r.taskset.contentHash!==o.contentHash)throw new Error("Released evaluation Taskset package differs from its definition.");return r}return null}h(lt,"loadReleasedProfileEvaluationTaskset");function Z(e){return{id:he(e),label:"Selected Dataset evaluation",description:"Explicit sealed external Dataset evaluation recipe.",target:e.target,tasksetRelease:{id:e.dataset.id,contentHash:e.dataset.contentHash},split:e.split,taskIds:[...new Set(e.population.map(o=>o.taskId))],seeds:[...new Set(e.population.map(o=>o.seed))],criterion:e.criterion}}h(Z,"externalProfileEvaluationDefinition");async function Bt(e){let o=e.manifest.profileEvaluation,c=o?.externalDatasetBinding?M(o.externalDatasetBinding):null;if(!c)return null;if(!e.resolveExternalDataset)throw new Error("This owner has no authorized external Dataset resolver.");let a=await e.resolveExternalDataset(c,e.selected);await a.authorize();let s=L(a.packageValue),i=await e.loadCatalog({ref:e.selected.profileRef,sourceRevision:e.selected.sourceRevision,harnessRelease:e.selected.harnessRelease});if(f(a.binding)!==f(c)||c.profileId!==e.selected.profileRef.profileId||c.declaredProfileCatalogHash!==i.catalogHash||s.contentHash!==c.packageHash||f(s.taskset)!==f(e.taskset)||c.environmentHash!==f(s.taskset.environment)||c.privateDatasetClosureHash!==f(s.files.filter(t=>t.asset.visibility!=="policy").map(t=>t.asset)))throw new Error("External Dataset admission changed its actual Profile, package or private closure.");let r=Z(c),u={schemaVersion:"openpond.profileEvaluations.v1",definitions:[r],suites:[]};if(z(e.manifest,e.taskset,u),!o||o.catalogHash!==f(u)||o.definitionHash!==f(r)||f(o.target)!==f(c.target))throw new Error("External Dataset manifest changed its derived definition.");return await a.authorize(),{...a,packageValue:s,definition:r,catalog:u}}h(Bt,"admitProfileExternalDataset");import vt from"node:path";function Ke(e,o){return e.map(c=>{let a=c.workspace.draft,s=a.metadata.profileTarget,i=s&&typeof s=="object"&&!Array.isArray(s)?s:{},r=typeof i.profileId=="string"?{profileId:i.profileId,workflowId:typeof i.workflowId=="string"?i.workflowId:null}:null,u=c.checks.find(t=>t.kind==="graders"&&t.workspaceHash===c.workspace.contentHash);return{summary:{...o(c),rows:[]},projectId:c.projectId,profileTarget:r,updatedAt:a.updatedAt,workspaceHash:c.workspace.contentHash,packageHash:c.packageHash,graders:a.graders.map(t=>{let p=u?.scopes?.find(l=>l.graderId===t.id),g=t.metadata.portableVerifierRef;return{id:`grader-${f([a.id,t.id]).slice(0,40)}`,graderId:t.id,name:t.label,kind:t.kind,version:t.version,configurationHash:f(t),weight:t.weight,hardGate:t.hardGate,rewardEligible:t.rewardEligible,privileged:t.privileged,checkState:p?`${p.checked}/${p.total} ${p.status}`:u?u.status:"Not checked",verifierPath:g&&typeof g=="object"&&"path"in g&&typeof g.path=="string"?g.path:null,fields:Array.isArray(a.metadata.fields)?a.metadata.fields.filter(l=>typeof l=="string"):[]}})}})}h(Ke,"localLearningCatalog");function B(e){let o=e.workspace.draft,c=e.checks.find(a=>a.kind==="graders");return o.graders.map(a=>{let s=c?.scopes?.find(u=>u.graderId===a.id),i=c&&c.workspaceHash!==e.workspace.contentHash?"Checks stale":s?.status??"Not tested",r=o.graderFixtures.filter(u=>!Array.isArray(u.metadata.graderIds)||u.metadata.graderIds.includes(a.id));return{kind:"grader",id:`grader-${f([o.id,a.id]).slice(0,40)}`,revision:o.revision,name:a.label,datasetId:o.id,datasetRevision:o.revision,graderId:a.id,graderType:a.kind,state:i,description:a.kind==="content"&&typeof a.config.operator=="string"?a.config.operator:`${a.kind} grader \xB7 ${a.version}`,checkState:s?`${s.checked}/${s.total} examples checked \xB7 ${i}`:i,rows:r.slice(0,3).map(u=>({id:u.id,label:u.label,detail:JSON.stringify(u.output)}))}})}h(B,"localGraderSummaries");function Xe(e,o,c){let{offset:a,limit:s}=x.object({offset:x.number().int().nonnegative().default(0),limit:x.number().int().min(1).max(100).default(20)}).parse(c),i=e.workspace.draft,r=i.graders.find(g=>g.id===o.graderId),u=i.graderFixtures.filter(g=>!Array.isArray(g.metadata.graderIds)||g.metadata.graderIds.includes(r.id)),t=r.kind==="custom_verifier"?e.workspace.files.find(g=>g.path===r.module):null,p=t?Buffer.from(t.base64,"base64").toString("utf8"):null;return{summary:o,dataset:{id:i.id,revision:i.revision,name:i.name,workspaceHash:e.workspace.contentHash},grader:r,taskCount:i.tasks.length,fixtures:{total:u.length,offset:a,items:u.slice(a,a+s),hasMore:a+s<u.length},files:t?[{path:t.path,contentHash:t.contentHash,sizeBytes:t.sizeBytes,content:p.slice(0,24e3),truncated:p.length>24e3}]:[]}}h(Xe,"localGraderInspection");async function Qe(e,o,c,a){let s=a?e.checks.find(l=>l.kind==="graders"&&l.revision===e.workspace.draft.revision&&l.workspaceHash===e.workspace.contentHash):void 0,i=s?.scopes?.filter(l=>l.graderId!==a&&o.taskset.graders.some(d=>d.id===l.graderId))??[],r=s?.issues.filter(l=>l.graderId&&i.some(d=>d.graderId===l.graderId))??[],u=e.workspace.draft.graderFixtures,t=i.reduce((l,d)=>l+d.checked,0),p=i.reduce((l,d)=>l+d.total,0),g=[...i];for(let l of o.taskset.graders){let d=u.filter(n=>!Array.isArray(n.metadata.graderIds)||n.metadata.graderIds.includes(l.id));if(a&&l.id!==a){i.some(n=>n.graderId===l.id)||(p+=d.length,g.push({graderId:l.id,checked:0,total:d.length,status:"unavailable"}),r.push({code:"grader_not_checked",message:"This grader has not been checked at the saved revision.",graderId:l.id}));continue}let k=t,I=r.length;p+=d.length,(!d.some(n=>n.label==="positive")||!d.some(n=>n.label==="negative"))&&r.push({code:"examples_missing",message:"Add known-good and known-bad examples before claiming qualification.",graderId:l.id});for(let n of d){c?.throwIfAborted();let P=o.taskset.tasks.find(w=>w.id===n.taskId);if(!P){r.push({code:"fixture_task_missing",message:`Example ${n.id} references a missing task.`,graderId:l.id,taskId:n.taskId});continue}try{let w=Ye(o,n),v={output:n.output,runtimeEventRefs:[],artifactRefs:w.map(E=>E.reference.id),artifacts:w,infrastructureError:n.infrastructureError},[S]=await ce({task:P,graders:[l],purpose:"fixture_calibration",signal:c,evidence:v,customVerifier:h(async({grader:E,task:D,evidence:H})=>{let C=o.files.find(y=>y.asset.id===E.verifierRef.id);if(!C||f(C.asset)!==f(E.verifierRef))throw new Error("The exact verifier source is missing.");let T=E.runtime==="sandbox_process"?await F({packageValue:o,grader:E,task:D,evidence:{...H,artifacts:w},signal:c,authorize:h(async()=>{c?.throwIfAborted()},"authorize")}):await $({source:new TextDecoder("utf-8",{fatal:!0}).decode(q(C)),exportName:E.exportName,runtime:E.runtime,timeoutMs:E.timeoutMs,signal:c,value:{task:D,attempt:H,input:D.input,expectedOutput:D.expectedOutput,output:H.output,artifacts:w,infrastructureError:n.infrastructureError}});return{score:T.score,passed:T.passed,rewardEligible:E.rewardEligible,failureClass:null,feedback:[T.feedback],visibleEvidenceRefs:[],privilegedEvidenceRefs:T.evidenceRefs}},"customVerifier")});!S||S.score===null&&!n.infrastructureError||S.status==="pending"?r.push({code:"grader_unavailable",message:S?.feedback.join(" ")??"The grader returned no evidence.",graderId:l.id,taskId:P.id}):(t++,(S.passed!==n.expectedPassed||S.rewardEligible!==n.expectedRewardEligible)&&r.push({code:"example_mismatch",message:`Example ${n.id} did not match its expected pass/reward outcome. ${S.feedback.join(" ").slice(0,2e3)}`,graderId:l.id,taskId:P.id}))}catch(w){r.push({code:"grader_unavailable",message:w instanceof Error?w.message:"Example check failed.",graderId:l.id,taskId:P.id})}}let m=r.slice(I);g.push({graderId:l.id,checked:t-k,total:d.length,status:m.some(n=>n.code==="example_mismatch")?"failed":m.length?"unavailable":"passed"})}return o.taskset.graders.length||r.push({code:"graders_missing",message:"No graders are configured."}),{kind:"graders",revision:e.workspace.draft.revision,workspaceHash:e.workspace.contentHash,status:r.some(l=>l.code==="example_mismatch")?"failed":r.length?"unavailable":"passed",checked:t,total:p,scopes:g,issues:r,checkedAt:new Date().toISOString()}}h(Qe,"checkLocalDatasetGraders");var dt=new Set(["unknown","other"]);function Ze(e,o){return o?"approved":!e||dt.has(e.toLowerCase())?"review":"approved"}h(Ze,"approvedLicenseStatus");function pt(e,o){if(e.schemaVersion!=="openpond.huggingFaceDatasetSource.v1")throw new Error("Selected source checks require a captured Hugging Face sample.");let c=V(o);if(e.metadata.capturedSourceHash!==c||!e.sourceFileHashes.includes(c))throw new Error("The captured source bytes do not match their retained hash.");let a=new TextDecoder("utf-8",{fatal:!0}).decode(o),s=be(a);return{...e,secretScanStatus:s.secretStatus,piiScanStatus:s.piiStatus,licensingStatus:Ze(e.declaredLicense,!1),metadata:{...e.metadata,privacyScanner:"openpond-evidence-v1",findings:s.findings,checkedSourceHash:c}}}h(pt,"checkCapturedHuggingFaceSource");function et(e){let o=0,c=e.draft.sourceRefs.map(a=>{if(a.schemaVersion!=="openpond.huggingFaceDatasetSource.v1"||typeof a.metadata.capturedSourcePath!="string")return a;let s=e.files.find(r=>r.path===a.metadata.capturedSourcePath);if(!s)throw new Error("The captured source file is missing.");let i=Buffer.from(s.base64,"base64");if(V(i)!==s.contentHash||i.byteLength!==s.sizeBytes)throw new Error("The captured source file failed integrity verification.");return o++,pt(a,i)});if(!o)throw new Error("This Dataset has no captured Hugging Face samples to check.");return c}h(et,"checkCapturedDatasetSources");function A(e){let{draft:o}=e.workspace,c=e.checks.filter(a=>a.workspaceHash===e.workspace.contentHash);return{kind:"dataset",id:o.id,revision:o.revision,name:o.name||"Untitled dataset",state:e.packageHash?"Runnable":"Saved draft",evaluationHash:e.workspace.contentHash,taskCount:o.datasetArtifact?.rowCount??o.tasks.length,graderCount:o.graders.length,checkState:c.length?c.map(a=>`${a.kind}: ${a.status} (${a.checked}/${a.total})`).join(" \xB7 "):e.checks.length?"Checks stale":"Not checked",syncState:e.sync?e.sync.paused?"Paused":e.sync.acknowledgedHash===e.workspace.contentHash&&e.sync.status==="synced"?"Synced":e.sync.status==="synced"?"Sync pending":e.sync.status:"Local",rows:o.tasks.slice(0,3).map(a=>({id:a.id,label:typeof a.input.prompt=="string"?a.input.prompt:JSON.stringify(a.input),detail:o.graders.map(s=>s.label).join(", ")}))}}h(A,"localDatasetSummary");function tt(e){async function o(r,u){let t=await e.store.readLocalDataset(r,u);if(!t||t.ownerId!==await e.store.localResourceOwnerId())throw new Error("Local Dataset was not found.");return t}h(o,"read");async function c(r,u){let t=await e.store.readLocalDatasetListing(r,u);if(!t||t.ownerId!==await e.store.localResourceOwnerId())throw new Error("Local Dataset was not found.");return t}h(c,"readListing");function a(r,u,t=r.workspace.contentHash){return Te({workspace:u?Me(r.workspace,u):r.workspace,sourceWorkspaceHash:t,maximumBytes:Number.POSITIVE_INFINITY,preparation:null,adapterId:"openpond-desktop-taskset-authoring-v1",now:r.workspace.draft.updatedAt})}h(a,"compile");async function s(r,u,t){if(t){let d=await e.store.readLocalDatasetProjection(r,t,{revision:u});if(!d||d.record.ownerId!==await e.store.localResourceOwnerId())throw new Error("Local Dataset was not found.");let k=a(d.record,void 0,d.sourceWorkspaceHash);return await O(e.home,k,Number.POSITIVE_INFINITY),{record:d.record,package:k}}let p=await o(r,u),g=a(p,t);await O(e.home,g,Number.POSITIVE_INFINITY);let l=await o(r);if(!t&&l.workspace.contentHash===p.workspace.contentHash&&l.packageHash!==g.contentHash)try{p=await e.store.updateLocalDatasetMetadata(r,f(l),d=>({...d,packageHash:g.contentHash}))}catch(d){if(!(d instanceof Error)||!d.message.startsWith("Dataset state changed."))throw d}return{record:p,package:g}}h(s,"packageDataset");async function i(r,u){let t=qe.parse(r),p=await e.store.localResourceOwnerId();if(t.action==="schema"){let m=x.enum(["task","grader","fixture","draft","file"]).parse(t.payload.kind??"task"),n=m==="task"?N.shape.tasks.unwrap().element:m==="grader"?N.shape.graders.unwrap().element:m==="fixture"?N.shape.graderFixtures.unwrap().element:m==="file"?J:N;return{kind:m,schema:x.toJSONSchema(n),...m==="grader"?{example:{id:"exact-answer",version:"1",label:"Exact answer",kind:"content",weight:1,hardGate:!0,rewardEligible:!1,privileged:!0,config:{operator:"final_answer_equals_expected"},metadata:{}}}:{}}}if(t.action==="list"){let m=(await e.store.listLocalDatasetListings()).filter(n=>n.ownerId===p);return t.payload.view==="catalog"?Ke(m,A):m.map(n=>({...A(n),projectId:n.projectId}))}if(t.action==="inspect_source"||t.action==="import_source"){if(!e.sourceAction)throw new Error("This Dataset source adapter is unavailable.");return e.sourceAction(t.action,t.payload,p)}if(t.action==="related_chats"){let m=t.payload.kind;if(m!==void 0&&!["dataset","grader","experiment"].includes(String(m)))throw new Error("Select a supported resource kind.");let n=await e.store.chatResourceLinks({kind:typeof m=="string"?m:"dataset",id:t.id}),P=[...new Set(n.map(w=>w.sessionId))];return(await Promise.all(P.map(w=>e.store.getSession(w)))).filter(w=>w&&!w.systemKind&&w.workspaceKind!=="sandbox").map(w=>({id:w.id,title:w.title}))}let g=f(t);if(["create","save","file","import","save_grader","check_sources"].includes(t.action)){if(!t.operationId)throw new Error("A stable operationId is required. Reuse it after an uncertain response.");let m=await e.store.recoverLocalDatasetOperation(t.operationId,g);if(m)return{record:m,summary:A(m),summaries:B(m)};let n=new Date().toISOString(),P;if(t.action==="create"||t.action==="import"){let v=`dataset-${f([p,t.operationId]).slice(0,40)}`,S;if(t.action==="import"){if(typeof t.payload.path!="string")throw new Error("Import requires a package folder path.");S=(await X({directory:t.payload.path,teamId:p,datasetId:v,expectedRevision:0,maximumBytes:Number.POSITIVE_INFINITY})).workspace}else{let E=Pe({profileId:p,id:v,name:typeof t.payload.name=="string"?t.payload.name:"",now:n});S=U({schemaVersion:"openpond.tasksetDraftWorkspace.v1",draft:{...E,...t.payload.draft,id:v,profileId:p,modelScope:null,revision:1,status:"draft",publishedTasksetRef:null,createdAt:n,updatedAt:n},files:Array.isArray(t.payload.files)?t.payload.files:[]},Number.POSITIVE_INFINITY)}P=Ve.parse({schemaVersion:"openpond.localDataset.v1",ownerId:p,projectId:typeof t.payload.projectId=="string"?t.payload.projectId:null,workspace:S,checks:[],packageHash:null,sync:null})}else{if(!t.id||t.expectedRevision===void 0)throw new Error("Editing requires a Dataset ID and expectedRevision.");let v=await o(t.id),S=t.payload.draft;if(t.action==="check_sources"&&(S={sourceRefs:et(v.workspace)}),t.action==="save_grader"){let D=N.shape.graders.unwrap().element.parse(t.payload.grader),H=v.workspace.draft.graders.filter(T=>T.id!==D.id),C=v.workspace.draft.graders.findIndex(T=>T.id===D.id);H.splice(C<0?H.length:C,0,D),S={graders:H,...Array.isArray(t.payload.fixtures)?{graderFixtures:t.payload.fixtures}:{}}}let E;if(t.action==="save"&&typeof t.payload.path=="string"){if(v.workspace.draft.modelScope)throw new Error("Folder replacement requires an ordinary local Dataset.");let D=await X({directory:t.payload.path,teamId:p,datasetId:t.id,expectedRevision:t.expectedRevision,maximumBytes:Number.POSITIVE_INFINITY}),H=K({workspace:v.workspace,expectedDraftRevision:t.expectedRevision,draft:{...D.workspace.draft,id:v.workspace.draft.id,profileId:v.workspace.draft.profileId,modelScope:v.workspace.draft.modelScope,revision:v.workspace.draft.revision,status:v.workspace.draft.status,createdAt:v.workspace.draft.createdAt,publishedTasksetRef:v.workspace.draft.publishedTasksetRef},now:n,maximumBytes:Number.POSITIVE_INFINITY});E=U({schemaVersion:H.schemaVersion,draft:H.draft,files:D.workspace.files},Number.POSITIVE_INFINITY)}else E=t.action==="file"?Se({workspace:v.workspace,mutation:J.parse({...t.payload,draftId:t.id,expectedDraftRevision:t.expectedRevision}),now:n,maximumBytes:Number.POSITIVE_INFINITY}):K({workspace:v.workspace,expectedDraftRevision:t.expectedRevision,draft:{...v.workspace.draft,...S},now:n,maximumBytes:Number.POSITIVE_INFINITY});P={...v,workspace:E,packageHash:null}}u?.throwIfAborted();let w=await e.store.saveLocalDataset({record:P,expectedRevision:t.action==="create"||t.action==="import"?0:t.expectedRevision,operationId:t.operationId,requestHash:g});return e.onSaved?.(w),{record:w,summary:A(w),summaries:B(w)}}if(!t.id)throw new Error("A Dataset ID is required.");if(t.action==="read"&&t.payload.view==="metadata"){let m=t.payload.revision===void 0?void 0:x.number().int().positive().parse(t.payload.revision),n=await c(t.id,m);return{record:n,summary:A(n)}}let l=await o(t.id,["read","read_grader","list_graders"].includes(t.action)&&t.expectedRevision?t.expectedRevision:void 0);if(t.action==="list_graders")return{summaries:B(l)};if(t.action==="read_grader"){let m=B(l).find(n=>n.graderId===t.payload.graderId||n.id===t.payload.graderId);if(!m)throw new Error("The saved grader was not found.");return t.payload.view==="inspection"?Xe(l,m,t.payload):{record:l,summary:m,grader:l.workspace.draft.graders.find(n=>n.id===m.graderId)}}if(t.action==="read")return{record:l,summary:A(l)};if(["upload","sync","pause_sync","disconnect_sync","publish"].includes(t.action)){if(t.expectedRevision!==l.workspace.draft.revision)throw new Error("Cloud actions require the exact current saved expectedRevision.");if(!e.syncAction)throw new Error("Cloud Dataset synchronization is unavailable.");let m=await e.syncAction(t.action,l,t.payload);return{record:m,summary:A(m)}}if(t.expectedRevision!==l.workspace.draft.revision)throw new Error("Checks and packaging require the exact saved expectedRevision.");if(t.action==="test_grader"&&!l.workspace.draft.graders.some(m=>m.id===t.payload.graderId))throw new Error("The saved grader was not found.");let d=null,k={kind:"structure",revision:l.workspace.draft.revision,workspaceHash:l.workspace.contentHash,status:"passed",checked:l.workspace.draft.tasks.length,total:l.workspace.draft.datasetArtifact?.rowCount??l.workspace.draft.tasks.length,checkedAt:new Date().toISOString(),issues:[]};try{d=a(l),await O(e.home,d,Number.POSITIVE_INFINITY)}catch(m){k={...k,status:"failed",issues:[{code:"package_invalid",message:m instanceof Error?m.message:"Package validation failed."}]}}if(["check_graders","test_grader"].includes(t.action)&&d){let m=[...new Set(l.workspace.draft.graderFixtures.map(n=>n.taskId))];k=await Qe(l,m.length?a(l,m):d,u,t.action==="test_grader"?t.payload.graderId:void 0)}let I=await e.store.updateLocalDatasetMetadata(t.id,f(l),m=>({...m,packageHash:d?.contentHash??null,checks:[...m.checks.filter(n=>n.kind!==k.kind),k]}));return{record:I,summary:t.action==="test_grader"?B(I).find(m=>m.graderId===t.payload.graderId):A(I),summaries:B(I),check:k,...t.action==="package"&&d?{package:d}:{}}}return h(i,"request"),{request:i,read:o,readListing:c,packageDataset:s,compile:a}}h(tt,"createLocalDatasetService");import{mkdtemp as ft,mkdir as ut,rm as mt}from"node:fs/promises";import ht from"node:os";import at from"node:path";var rt=new Set(["work_exec","work_save_output"]);function ot(e){let o=e.taskset,c=o.environment.kind==="text"&&o.tools.length===0,a=o.environment.kind==="work"&&o.environment.entrypoint==="openpond-work-v1"&&o.tools.every(s=>rt.has(s.name));return(c||a)&&o.policy.connectedAppScopes.length===0&&o.capabilities.every(s=>!s.required||s.id==="private-verifier"||s.id==="tools"&&s.scopes.every(i=>rt.has(i)&&o.tools.some(r=>r.name===i)))}h(ot,"supportsLocalProfileEnvironment");async function ba(){let e=await ft(at.join(ht.tmpdir(),"openpond-work-preflight-"));try{await ut(at.join(e,"outputs"));let o="local-work-preflight",a=await $e({authorize:h(async()=>({candidateId:o,candidateRevision:1,ownerId:o,sessionId:o,turnId:o,sourceRoot:e,layout:"profile_case",writablePaths:["outputs"]}),"authorize")})({candidateId:o,expectedRevision:1,sessionId:o,turnId:o,timeoutMs:5e3,command:`/runtime/node -e 'require("node:fs").writeFileSync("outputs/probe","ready");process.stdout.write("ready")'`});if(a.code!==0||a.timedOut||a.stdout!=="ready")throw new Error("The confined local Work executor is unavailable.")}finally{await mt(e,{recursive:!0,force:!0})}}h(ba,"assertLocalProfileWorkRuntime");function G(e){let o=Re(e),c=e.modelResources?.rewards??(e.learningResources?xe(e.taskset).rewards:[]);if(o&&f(pe(o,c))!==f(e.taskset.graders))throw new R("local_grader_closure_conflict","The retained Reward closure differs from the released Dataset graders.",422);return e.taskset.graders.map(a=>{let s=o?.sources.find(r=>r.graderId===a.id),i=s&&c.find(r=>r.id===s.reward.id&&r.revision===s.reward.revision&&r.contentHash===s.reward.contentHash);return{id:a.id,version:a.version,contentHash:f(a),name:i?.name??("config"in a&&a.config.operator==="final_answer_equals_expected"?"Answer accuracy":`${a.kind.replaceAll("_"," ")} grader`),feedbackKey:i?de(i):`grader_${f(a.id).slice(0,24)}`,release:i?{id:i.id,revision:i.revision,contentHash:i.contentHash}:null}})}h(G,"localPackageGraders");function za(e,o){let c=G(e),a=o?o.map(s=>{let i=c.find(r=>r.id===s.id&&r.version===s.version&&r.contentHash===s.contentHash);if(!i)throw new R("local_grader_pin_unavailable","Select an exact grader from the retained Dataset package.",422);return{...i,mappings:s.mappings}}):c;try{return Le(a)}catch(s){throw new R("experiment_grader_feedback_conflict",s instanceof Error?s.message:"Grader selection conflicts.",422)}}h(za,"selectLocalPackageGraders");function Wa(e,o,c,a=!1,s=!1,i=!1){let r=L(o),u=e.configuration.request;if(r.contentHash!==e.packageHash||f(u.taskset)!==f({id:r.taskset.id,revision:r.taskset.revision,contentHash:r.taskset.contentHash}))throw new R("local_dataset_pin_conflict","Local execution requires the exact retained Dataset package.",422);if(u.policy.kind!=="hosted_chat"&&!(u.policy.kind==="hosted_harness"&&i))throw new R("local_target_not_qualified","This local execution path requires a qualified exact target owner.",422);let t=i&&u.policy.kind==="hosted_harness"&&ot(r);if(["claude-code","codex"].includes(e.model.providerId)&&!t&&(gt(r)||r.taskset.environment.kind!=="text"||r.taskset.tools.length))throw new R("native_text_environment_not_admitted","This native model adapter requires a text Dataset with no environment tools. Additional tool owners require explicit admission.",422);let p=u.policy.kind==="hosted_chat"?u.policy.harness:void 0;if(p&&!a)throw new R("local_harness_not_qualified","A released Harness must execute through its native turn owner.",422);let g=Y(r);if(r.taskset.policy.connectedAppScopes.length)throw new R("local_connected_scope_not_qualified","This Dataset requires connected scopes that have not been admitted for local execution.",422);for(let l of r.taskset.capabilities.filter(d=>d.required)){if(l.id==="tools"&&i&&l.scopes.every(k=>["work_exec","work_save_output"].includes(k)&&r.taskset.tools.some(I=>I.name===k)))continue;if(l.id!=="private-verifier")throw new R("local_capability_not_qualified","This Dataset requires capabilities not supplied by the local execution owner.",422);if((l.scopes.length?l.scopes:r.taskset.policy.hiddenGraderRefs).some(k=>!r.taskset.policy.hiddenGraderRefs.includes(k)||!r.taskset.graders.some(I=>I.id===k&&I.privileged&&I.kind!=="human")))throw new R("local_capability_not_qualified","The required private grader scope has no supported exact local grader owner.",422)}if(!g&&r.taskset.tools.length&&!i)throw new R("local_tool_target_not_qualified","This Dataset's tools require a released native target executor.",422);if(g?.execution.javascript.executionServices?.length&&!s)throw new R("local_prepared_environment_not_qualified","This Dataset requires prepared compute services that are not yet bound to the local execution owner.",422);if(r.taskset.environment.kind!=="text"&&!g&&!t)throw new R("local_environment_unavailable","The released Dataset has no supported local environment executor.",422);if(p&&(g||r.taskset.environment.kind!=="text"))throw new R("local_harness_environment_not_qualified","This native Harness requires a compatible text Dataset.",422);return u.population.map(l=>{let d=r.taskset.tasks.find(P=>P.id===l.taskId);if(!d)throw new R("local_population_unavailable","The selected task is absent from this immutable Dataset release.",422);let k=le(d);if((k.artifactRefs.length||d.requiredOutputs?.length)&&!(i&&u.policy.kind==="hosted_harness"))throw new R("local_work_target_not_qualified","This Dataset requires document input or Work output capabilities not supplied by this local model target.",422);let I=g?.assets.find(P=>P.id===g.execution.javascript.module.id),m=g?.assets.find(P=>P.id===d.privilegedContextRef);if(g&&(!I||!m))throw new R("local_environment_assets_missing","Private environment resources are missing from the retained package.",422);let n={kind:"model",id:`local-case-${f([c,l.receiptId]).slice(0,48)}`,taskId:d.id,model:e.model,...p?{harness:p}:{},instructions:Ie(r),input:k.input,policyVisibleContext:k.policyVisibleContext,timeoutMs:r.taskset.environment.defaultTimeoutMs,environment:g?{kind:"javascript",definition:g.execution.javascript,asset:I,initialState:JSON.parse(fe(m,m.asset)),seed:Number(l.seed)}:{kind:"text"}};return{receiptId:l.receiptId,taskId:l.taskId,seed:l.seed,request:Fe.parse({...n,admissionHash:f(n)})}})}h(Wa,"localExperimentAdmissions");function gt(e){return!!Y(e)}h(gt,"executionForClaude");import{readFile as kt}from"node:fs/promises";import wt from"node:path";async function st(e,o,c,a){let s=await e.getHarnessReleaseRecord(o.contentHash),i=s&&await e.getHarnessWorkspace(s.workspaceId);if(!s||!i||s.harnessRelease.id!==o.id||i.location!=="local"||i.metadata.sourceLayout!=="openpond.harnessSourceManifest.v1")throw new R("local_profile_source_unavailable","The exact Profile Harness is unavailable.",403);let r=i.metadata.profileExperimentOrigin!==void 0||i.metadata.experimentCandidateOrigin!==void 0;if(r){if(!a||!c)throw new R("local_profile_origin_access_denied","This source requires its authenticated origin.",403);await a(i,o,c)}else{if(i.ownerScope.kind!=="personal"||i.ownerScope.id!=="desktop-personal"||typeof s.harnessRelease.metadata.profileRepositoryId=="string"||typeof s.agentSnapshot.metadata.profileRepositoryId=="string")throw new R("local_profile_origin_access_denied","The Profile is not device-owned.",403);let d=s.harnessRelease.metadata.profile;if(c&&(c.source!=="local"||d?.id!==c.profileId||d.repositoryId&&d.repositoryId!==c.repositoryId))throw new R("local_profile_origin_access_denied","The retained Harness differs from this exact Profile reference.",403);if(i.metadata.selectionEligible===!1&&(!c||!d?.repositoryId||d.repositoryId!==c.repositoryId||i.id!==`${Oe}${f({ref:c,sourceRevision:d.sourceRevision}).slice(0,24)}`))throw new R("local_profile_origin_access_denied","This explicit Profile release requires its canonical accepted reference.",403)}let u=await Ne({workspace:i,release:s}),t=new Map;for(let d of s.harnessRelease.files)t.set(d.path,await kt(wt.join(s.bundlePath,"source",...d.path.split("/"))));let p=se({agentSnapshot:s.agentSnapshot,harnessRelease:s.harnessRelease,files:t}),g=ke(s);ie({sourcePackage:p,expectedRelease:o,baseSystemPrompt:"",runtimeId:"openpond.native-profile-experiment.v1",maxContextCharacters:262144,tools:g.map(d=>({name:d.name,inputSchema:d.inputSchema,definition:{type:"function",function:{name:d.name,description:d.description,parameters:d.inputSchema}}}))});let l=await e.getHarnessWorkspace(i.id);if(!l||f(l.ownerScope)!==f(i.ownerScope)||f(l.metadata)!==f(i.metadata))throw new R("local_profile_origin_access_denied","Profile source ownership changed during admission.",403);return r&&await a(i,o,c),u}h(st,"resolveLocalProfileExperimentSource");var ee=x.object({id:b,revision:x.number().int().positive(),workspaceHash:_,taskIds:x.array(b).min(1).max(500),seed:x.string().trim().min(1).max(500).default("1")}).strict();function mr(e){let o=tt({store:e.store,home:e.storeDir});async function c(r){if(r.profileRef.source!=="local")throw new Error("Installation-local Datasets require an accepted local Profile.");if(!(await _e()).profiles.some(l=>f(l.ref)===f(r.profileRef)))throw new Error("The local Dataset's Profile is no longer in this installation's accepted library.");let t=await st(e.store,r.harnessRelease,r.profileRef),p=await Je({store:e.store,ref:r.profileRef,sourceRevision:r.sourceRevision,harnessRelease:r.harnessRelease}),g=await Be({workspaceId:typeof t.release.agentSnapshot.metadata.workspaceId=="string"?t.release.agentSnapshot.metadata.workspaceId:t.release.workspaceId,sourceDir:vt.join(t.release.bundlePath,"source")});if(g.harnessRelease.contentHash!==r.harnessRelease.contentHash)throw new Error("The local Dataset's frozen Profile source changed.");return{catalog:p,protectedClosureHash:Ge(g).protectedClosureHash}}h(c,"profileAuthority");async function a(r,u,t){let p=await e.store.readLocalDatasetProjection(r,t,{workspaceHash:u});if(!p||p.record.ownerId!==await e.store.localResourceOwnerId())throw new Error("The exact installation-local Dataset workspace is unavailable to this owner.");return{record:p.record,packageValue:o.compile(p.record,void 0,p.sourceWorkspaceHash)}}return h(a,"savedPackage"),{prepareBinding:h(async(r,u,t)=>{let p=ee.parse(r);if((await o.readListing(p.id,p.revision)).workspace.contentHash!==p.workspaceHash)throw new Error("The selected local Dataset revision or workspace hash changed.");if(new Set(p.taskIds).size!==p.taskIds.length)throw new Error("Select each local Dataset task once.");let{package:l}=await o.packageDataset(p.id,p.revision,p.taskIds),d=p.taskIds.map(n=>l.taskset.tasks.find(P=>P.id===n));if(d.some(n=>!n)||d.some(n=>n.split!==d[0].split))throw new Error("Select existing local Dataset tasks from one exact split.");let{catalog:k,protectedClosureHash:I}=await c(u);if(!k.definitions.some(n=>f(n)===f(t)))throw new Error("The local Dataset target differs from the accepted Profile definition.");let m=G(l);return me({schemaVersion:"openpond.profileExternalDatasetBinding.v1",dataset:{id:l.taskset.id,revision:l.taskset.revision,contentHash:l.taskset.contentHash},packageHash:l.contentHash,profileId:u.profileRef.profileId,target:t.target,declaredProfileCatalogHash:k.catalogHash,protectedProfileClosureHash:I,split:d[0].split,population:p.taskIds.map(n=>({taskId:n,seed:p.seed,fixtureId:null})),evaluators:m.map(n=>({release:n.release??{id:n.id,revision:n.version,contentHash:n.contentHash},feedbackKey:n.feedbackKey,configurationHash:f({graderHash:n.contentHash,mappings:[]}),output:"score",categories:[]})),fieldMappings:[],fieldMappingsHash:f([]),environmentHash:f(l.taskset.environment),privateDatasetClosureHash:f(l.files.filter(n=>n.asset.visibility!=="policy").map(n=>n.asset)),criterion:t.criterion})},"prepareBinding"),resolveExternalDataset:h(async(r,u)=>{let t;try{t=await W(e.storeDir,r.packageHash)}catch(n){if(n.code!=="ENOENT")throw n}let p=t?x.object({sourceTasksetId:b,sourcePackageHash:_}).passthrough().safeParse(t.taskset.metadata):null,g=p?.success?await e.store.readLocalDatasetListing(p.data.sourceTasksetId):null;if(!t||!p?.success||!g){if(!e.remote)throw new Error("This external Dataset has no installation-local owner.");return e.remote(r,u)}let l=p.data,d=t.contentHash,k=g.ownerId;async function I(){let n=[...new Set(r.population.map(S=>S.taskId))],{record:P,packageValue:w}=await a(l.sourceTasksetId,l.sourcePackageHash,n);if(P.ownerId!==k||w.contentHash!==d)throw new Error("The cached Dataset differs from its exact saved local source.");let v=await c(u);if(r.profileId!==u.profileRef.profileId||r.declaredProfileCatalogHash!==v.catalog.catalogHash||r.protectedProfileClosureHash!==v.protectedClosureHash)throw new Error("The local Dataset recipe changed its accepted Profile or protected evaluator closure.");return Ce({binding:r,packageValue:w,graders:G(w)})}h(I,"read");let m=await I();return{binding:r,packageValue:m,authorize:h(async()=>{if(f(await I())!==f(m))throw new Error("The local Dataset authority changed during execution.")},"authorize")}},"resolveExternalDataset")}}h(mr,"createInstallationLocalProfileDatasets");var yt=x.object({id:b,createdAt:ae,definitionId:b,externalDatasetBinding:ue.optional(),localDataset:ee.optional(),profileRef:Ae.optional(),profileSource:x.object({sourceRevision:x.string().min(1).max(500),harnessRelease:x.object({id:b,contentHash:_}).strict()}).strict().optional(),modelRef:oe,hostModelConfigurationHash:_.optional(),hostArtifactHash:_.optional(),maximumSpendUsd:x.number().positive().max(1e4).optional(),expectedManifestHash:_.optional(),hostExperiment:x.object({definition:x.object({id:b,revision:x.number().int().positive(),contentHash:_}).strict().nullable(),configurationHash:_,project:x.object({id:b,revision:x.number().int().positive(),contentHash:_,targetId:b.nullable()}).strict().optional()}).strict().optional()}).strict();function Er(e){return async(o,c)=>{let a=yt.parse(o);if(c?.requireExpectedManifestHash&&!a.expectedManifestHash)throw new Error("Profile evaluation execution requires the reviewed manifest hash.");if(a.profileSource&&!a.profileRef)throw new Error("An exact Profile source requires its accepted Profile reference.");let s=c?.selectedWorkflows??await e.selectedWorkflows(a.profileRef,a.profileSource);if(a.profileRef&&f(a.profileRef)!==f(s.profileRef))throw new Error("Profile preparation did not resolve the explicitly selected Profile.");if(a.profileSource&&(s.sourceRevision!==a.profileSource.sourceRevision||f(s.harnessRelease)!==f(a.profileSource.harnessRelease)))throw new Error("Profile preparation changed its explicitly pinned source.");if(a.localDataset&&a.externalDatasetBinding)throw new Error("Select a local Dataset or an external recipe, not both.");let i=await e.loadCatalog({ref:s.profileRef,sourceRevision:s.sourceRevision,harnessRelease:s.harnessRelease}),r=a.localDataset?i.definitions.find(y=>y.id===a.definitionId):null;if(a.localDataset&&!r)throw new Error("Choose an existing accepted Profile definition as the local Dataset target.");let t=(a.localDataset&&r?await(e.prepareLocalDatasetBinding?e.prepareLocalDatasetBinding(a.localDataset,s,r):Promise.reject(new Error("This host has not qualified installation-local Profile Datasets."))):null)??(a.externalDatasetBinding?M(a.externalDatasetBinding):null),p=t?await(e.resolveExternalDataset?e.resolveExternalDataset(t,s):Promise.reject(new Error("This host has not qualified external Dataset Profile execution."))):null;if(p&&(await p.authorize(),f(M(p.binding))!==f(t)))throw new Error("External Dataset admission differs from the actual authorized recipe.");if(t&&t.declaredProfileCatalogHash!==i.catalogHash)throw new Error("The original Profile verifier catalog changed.");let g=t?Z(t):null;if(g&&!a.localDataset&&a.definitionId!==g.id)throw new Error("Use the external recipe's own definition identity.");let l={schemaVersion:"openpond.profileEvaluations.v1",definitions:g?[g]:i.definitions,suites:g?[]:i.suites},d=g??i.definitions.find(y=>y.id===a.definitionId);if(!d)throw new Error(`Evaluation ${a.definitionId} is absent from the selected Profile release.`);let k=d.target,I=k.kind==="workflow"?s.workflows.find(y=>y.binding.workflowId===k.workflowId)?.binding:ne.parse({schemaVersion:"openpond.profileComponentBinding.v1",profileId:s.profileRef.profileId,sourceRevision:s.sourceRevision,harnessRelease:s.harnessRelease,target:k});if(!I)throw new Error(`Evaluation workflow ${k.kind==="workflow"?k.workflowId:""} is absent from the selected Profile release.`);let m=L(p?.packageValue??await e.loadTasksetPackage(d,s.profileRef.profileId,s.harnessRelease)),n=m.taskset;if(n.id!==d.tasksetRelease.id||n.contentHash!==d.tasksetRelease.contentHash)throw new Error("Evaluation Taskset package differs from its released definition.");let P=n.environment.kind==="text"&&n.tools.length===0,w=n.environment.kind==="work"&&n.environment.entrypoint==="openpond-work-v1"&&n.tools.every(y=>["work_exec","work_save_output"].includes(y.name));if(!P&&!w)throw new Error("Profile evaluation supports text cases or Work cases with the built-in execution and output tools.");if(a.maximumSpendUsd!==void 0&&w){if(typeof e.boundedWorkComputeAvailable=="function")await e.boundedWorkComputeAvailable();else if(!e.boundedWorkComputeAvailable)throw new Error("This host has not admitted budgeted Work compute.")}if(n.tasks.some(y=>y.artifactRefs.length>Q.maxAttachments||y.artifactRefs.some(j=>j.visibility!=="policy"||j.mediaType!=="application/pdf"||j.sizeBytes>Q.maxAttachmentBytes)))throw new Error("Profile evaluation accepts only bounded policy-visible PDF task attachments.");if(!t&&!e.privateGradingPreflight&&(n.graders.some(y=>y.kind==="model_judge"||y.kind==="custom_verifier")||n.metrics?.aggregation==="custom"))throw new Error("Profile evaluation cannot run this Taskset's model judge, custom verifier, or custom metric in the current app-server runtime.");await e.privateGradingPreflight?.(m);let v={adapterId:k.kind==="workflow"?"openpond.profile-workflow":"openpond.profile-component",placement:e.placement,runtimeVersion:"app-server-v1",capabilityReceipt:f({adapterId:k.kind==="workflow"?"openpond.profile-workflow":"openpond.profile-component",packageHash:m.contentHash,connectedAppScopes:n.policy.connectedAppScopes})},E={...ge({catalog:l,definitionId:d.id,profileId:s.profileRef.profileId,sourceRevision:s.sourceRevision,harnessRelease:s.harnessRelease,environmentHash:f({packageHash:m.contentHash,runtimeTarget:v})}),...t?{externalDatasetBinding:t}:{},...e.sourceCandidate?{sourceCandidate:e.sourceCandidate}:{}};if(t&&(t.packageHash!==m.contentHash||t.environmentHash!==f(n.environment)||t.privateDatasetClosureHash!==f(m.files.filter(y=>y.asset.visibility!=="policy").map(y=>y.asset))))throw new Error("External Dataset package/environment/private closure changed.");let D=re.parse({provider:a.modelRef.providerId,model:a.modelRef.modelId,revision:null,artifactHash:a.hostArtifactHash??null,tokenizerRevision:null,chatTemplateHash:null}),H=await e.modelConfigurationHash(a.modelRef,a),C=c?.modelSampling?f({ownerModelConfigurationHash:H,sampling:De.parse(c.modelSampling)}):H,T=we({schemaVersion:"openpond.tasksetRunManifest.v1",id:a.id,tasksetRelease:d.tasksetRelease,packageHash:m.contentHash,execution:{kind:"harness",harnessRelease:s.harnessRelease},profileEvaluation:E,policy:{kind:"model",model:D,configurationHash:C},gradingRole:"evaluation",metricPolicy:ve(n),population:t?t.population.map(y=>({...y,receiptId:`evaluation-${f([a.id,y.taskId,y.seed,y.fixtureId]).slice(0,32)}`})):d.taskIds.flatMap(y=>d.seeds.map(j=>({receiptId:`evaluation-${f([a.id,y,j]).slice(0,32)}`,taskId:y,seed:j,fixtureId:null}))),runtimeTarget:v,limits:{maxTurns:128,timeoutMs:n.environment.defaultTimeoutMs,maxOutputBytes:25e7,maximumSpendUsd:a.maximumSpendUsd??null},createdAt:a.createdAt,metadata:{sourceTasksetId:n.metadata.sourceTasksetId??n.id,...s.profileRef.source==="openpond_git"?{profileRepositoryId:s.profileRef.repositoryId}:{},...a.hostExperiment?{experimentDefinition:a.hostExperiment.definition,experimentConfigurationHash:a.hostExperiment.configurationHash,...a.hostExperiment.project?{project:a.hostExperiment.project}:{}}:{}}});if(z(T,n,l),p&&await p.authorize(),a.expectedManifestHash&&T.contentHash!==a.expectedManifestHash)throw new Error("Profile evaluation setup changed since preview; prepare the run again.");return{manifest:T,taskset:n,profileRef:s.profileRef,binding:I,modelRef:a.modelRef,modelConfigurationHash:C}}}h(Er,"createProfileEvaluationRunPreparationService");async function xt(e,o){let c=L(e);for(let s of c.taskset.graders){if(s.kind==="model_judge"&&(!o||s.calibrationStatus!=="passed"))throw new Error("This Profile requires its current calibrated judge and bounded private provider owner.");let i="verifierRef"in s?s.verifierRef:"rubricRef"in s?s.rubricRef:null;i&&te(c,i)}let a=c.taskset.metrics?.customAggregator;if(a){let s=c.files.find(i=>i.asset.path===a.module);if(!s||s.asset.visibility==="policy"||V(q(s))!==a.contentHash)throw new Error("The authored aggregate metric is not its exact private release.");new TextDecoder("utf8",{fatal:!0}).decode(q(s))}}h(xt,"preflightProfilePrivateGrading");function te(e,o){let c=e.files.find(a=>a.asset.id===o.id);if(!c||c.asset.visibility==="policy"||f(c.asset)!==f(o))throw new Error("The exact private grader asset is unavailable.");return new TextDecoder("utf8",{fatal:!0}).decode(q(c))}h(te,"readPrivate");async function Ar(e){let o=L(e.packageValue);if(o.contentHash!==e.manifest.packageHash||o.taskset.contentHash!==e.manifest.tasksetRelease.contentHash)throw new Error("The private grading package changed its frozen Run identity.");await e.authorize(),await xt(o,!!e.executeBudgetedJudge),await e.authorize();let c=h(async({grader:i,task:r,evidence:u})=>{let t=e.signal;await e.authorize(),t?.throwIfAborted();let p={manifest:e.manifest,packageValue:o,grader:i,task:r,evidence:u,signal:t,authorize:e.authorize},g=e.executeSandboxVerifier?await e.executeSandboxVerifier(p):i.runtime==="sandbox_process"?await F(p):await $({source:te(o,i.verifierRef),exportName:i.exportName,runtime:i.runtime,timeoutMs:i.timeoutMs,signal:t,value:{task:r,attempt:u,input:r.input,output:u.output,artifacts:"artifacts"in u?u.artifacts:[],expectedOutput:r.expectedOutput,infrastructureError:u.infrastructureError??null}});return await e.authorize(),t?.throwIfAborted(),{score:g.score,passed:g.passed,rewardEligible:i.rewardEligible,failureClass:null,feedback:[g.feedback],visibleEvidenceRefs:[],privilegedEvidenceRefs:g.evidenceRefs}},"customVerifier"),a=o.taskset.metrics?.customAggregator,s=a?new TextDecoder("utf8",{fatal:!0}).decode(q(o.files.find(i=>i.asset.path===a.module))):void 0;return{authorize:e.authorize,customVerifier:c,...e.executeBudgetedJudge?{modelJudge:ye({readRubric:h(async i=>{await e.authorize();let r=te(o,i);return await e.authorize(),r},"readRubric"),executeBudgeted:h(async(i,r)=>{await e.authorize(),r?.throwIfAborted();let u=await e.executeBudgetedJudge(i,r);return await e.authorize(),r?.throwIfAborted(),u},"executeBudgeted")})}:{},...s!==void 0?{metricSource:s,metricExecutor:h(async i=>{await e.authorize(),i.signal?.throwIfAborted();let r=await Ue(i);return await e.authorize(),i.signal?.throwIfAborted(),r},"metricExecutor")}:{}}}h(Ar,"createProfilePrivateGradingOwner");export{_t as a,lt as b,Bt as c,B as d,Ze as e,pt as f,A as g,tt as h,ot as i,ba as j,G as k,za as l,Wa as m,st as n,mr as o,Er as p,xt as q,Ar as r};
@@ -1,3 +1,3 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{j as l,n as c}from"./chunk-LRRBYIGH.js";import{z as n}from"./chunk-B4RKHHF7.js";import{a as t}from"./chunk-FTQLQJQV.js";import{mkdir as f}from"node:fs/promises";import p from"node:path";import a from"node:path";function d(e,o){let i=a.resolve(e),r=a.resolve(o);return r===i||r.startsWith(`${i}${a.sep}`)}t(d,"isHostedProfileSourceWithinRepo");async function u(e){if(!p.isAbsolute(e.repoPath)||!p.isAbsolute(e.outputDir)||!/^[a-f0-9]{40,64}$/.test(e.sourceRevision)||!e.workspaceId.trim()||!e.repositoryId.trim()||!e.profileId.trim())throw new Error("Hosted Profile compile request is invalid.");let o=await n({repoPath:e.repoPath,profileId:e.profileId});if(o.error||o.mode!=="local"||o.activeProfile!==e.profileId||!o.sourcePath||!d(e.repoPath,o.sourcePath))throw new Error("Hosted Profile source is unavailable.");await f(e.outputDir,{recursive:!0});let i=await l({storeDir:e.outputDir,workspaceId:e.workspaceId,name:e.profileId,profile:o,sourceRevision:e.sourceRevision,repositoryId:e.repositoryId}),r=i.harnessRelease.metadata.profile;if(!r||typeof r!="object"||r.id!==e.profileId||r.sourceRevision!==e.sourceRevision||r.repositoryId!==e.repositoryId)throw new Error("Hosted Profile release provenance is invalid.");let s=await c({storeDir:e.outputDir,workspaceId:e.workspaceId,compiled:i,createdAt:new Date().toISOString()});return{workspaceId:e.workspaceId,sourceRevision:s.sourceRevision,harnessRelease:s.harnessRelease,agentSnapshot:s.agentSnapshot,bundlePath:s.bundlePath}}t(u,"compileHostedProfileRelease");async function H(e){if(e.length!==1||e[0].length>16e3||!/^[A-Za-z0-9_-]+$/.test(e[0]))throw new Error("Hosted Profile compile argument is invalid.");let o=JSON.parse(Buffer.from(e[0],"base64url").toString("utf8")),i=await u(o);process.stdout.write(`${JSON.stringify(i)}
3
- `)}t(H,"runHostedProfileCompilerCli");async function y(e){await(await import("./hosted-profile-evaluation-preparation-ELLGH44Z.js")).runHostedProfileEvaluationCli(e)}t(y,"runHostedProfileEvaluationCli");async function k(e){await(await import("./hosted-profile-evaluation-inspection-Q3AIIIB6.js")).runHostedProfileInspectionCli(e)}t(k,"runHostedProfileInspectionCli");export{u as a,H as b,y as c,k as d};
2
+ import{j as l,n as c}from"./chunk-LK2K3SPM.js";import{z as n}from"./chunk-B4RKHHF7.js";import{a as t}from"./chunk-FTQLQJQV.js";import{mkdir as f}from"node:fs/promises";import p from"node:path";import a from"node:path";function d(e,o){let i=a.resolve(e),r=a.resolve(o);return r===i||r.startsWith(`${i}${a.sep}`)}t(d,"isHostedProfileSourceWithinRepo");async function u(e){if(!p.isAbsolute(e.repoPath)||!p.isAbsolute(e.outputDir)||!/^[a-f0-9]{40,64}$/.test(e.sourceRevision)||!e.workspaceId.trim()||!e.repositoryId.trim()||!e.profileId.trim())throw new Error("Hosted Profile compile request is invalid.");let o=await n({repoPath:e.repoPath,profileId:e.profileId});if(o.error||o.mode!=="local"||o.activeProfile!==e.profileId||!o.sourcePath||!d(e.repoPath,o.sourcePath))throw new Error("Hosted Profile source is unavailable.");await f(e.outputDir,{recursive:!0});let i=await l({storeDir:e.outputDir,workspaceId:e.workspaceId,name:e.profileId,profile:o,sourceRevision:e.sourceRevision,repositoryId:e.repositoryId}),r=i.harnessRelease.metadata.profile;if(!r||typeof r!="object"||r.id!==e.profileId||r.sourceRevision!==e.sourceRevision||r.repositoryId!==e.repositoryId)throw new Error("Hosted Profile release provenance is invalid.");let s=await c({storeDir:e.outputDir,workspaceId:e.workspaceId,compiled:i,createdAt:new Date().toISOString()});return{workspaceId:e.workspaceId,sourceRevision:s.sourceRevision,harnessRelease:s.harnessRelease,agentSnapshot:s.agentSnapshot,bundlePath:s.bundlePath}}t(u,"compileHostedProfileRelease");async function H(e){if(e.length!==1||e[0].length>16e3||!/^[A-Za-z0-9_-]+$/.test(e[0]))throw new Error("Hosted Profile compile argument is invalid.");let o=JSON.parse(Buffer.from(e[0],"base64url").toString("utf8")),i=await u(o);process.stdout.write(`${JSON.stringify(i)}
3
+ `)}t(H,"runHostedProfileCompilerCli");async function y(e){await(await import("./hosted-profile-evaluation-preparation-2LSMZQNA.js")).runHostedProfileEvaluationCli(e)}t(y,"runHostedProfileEvaluationCli");async function k(e){await(await import("./hosted-profile-evaluation-inspection-7USY75Z4.js")).runHostedProfileInspectionCli(e)}t(k,"runHostedProfileInspectionCli");export{u as a,H as b,y as c,k as d};
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{d as c}from"./chunk-557XSPVS.js";import{a as m}from"./chunk-DMFUEUAZ.js";import{n as p}from"./chunk-JY3YSI54.js";import{I as i,L as d}from"./chunk-BKEDG3A4.js";import{a as n}from"./chunk-FTQLQJQV.js";async function r(e,o){return(await e.allPayloadRows(`SELECT payload FROM ${o} ORDER BY sort_index ASC`)).map(t=>JSON.parse(t.payload))}n(r,"readStorePayloads");function S(e){let o=e,a=d.safeParse(o.openPondCommandAccessMode);return{...o,experience:l(o),openPondCommandAccessMode:a.success?a.data:i,currentProfile:o.currentProfile??null}}n(S,"normalizeSessionPayload");function l(e){let o=p.safeParse(e.experience);return o.success?o.data:!!(e.provider==="codex"||e.codexThreadId||e.systemKind||e.parentSessionId||e.subagentRunId||e.appId||e.workspaceKind||e.workspaceId||e.localProjectId||e.cloudProjectId)?"development":"chat"}n(l,"storedSessionExperience");async function E(e){return{sessions:(await r(e,"sessions")).map(S),turns:await r(e,"turns"),approvals:await r(e,"approvals")}}n(E,"readStoreMetadata");async function T(e){return{...await E(e),events:(await r(e,"events")).map(m)}}n(T,"readStoreData");async function D(e,o){let a=c();await o.exec("BEGIN IMMEDIATE");try{await o.exec("DELETE FROM approvals; DELETE FROM events; DELETE FROM turns; DELETE FROM sessions;");for(let[t,s]of e.sessions.entries())await o.run("INSERT INTO sessions (id, sort_index, payload, updated_at) VALUES (?, ?, ?, ?)",[s.id,t,JSON.stringify(s),s.updatedAt]);for(let[t,s]of e.turns.entries())await o.run("INSERT INTO turns (id, session_id, provider_turn_id, status, sort_index, payload, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?)",[s.id,s.sessionId,s.providerTurnId,s.status,t,JSON.stringify(s),s.completedAt??s.startedAt]);for(let[t,s]of e.events.entries()){let u=t+1;await o.run("INSERT INTO events (id, session_id, turn_id, name, timestamp, sequence, sort_index, payload) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",[s.id,s.sessionId??null,s.turnId??null,s.name,s.timestamp,u,t,JSON.stringify(s)])}for(let[t,s]of e.approvals.entries())await o.run("INSERT INTO approvals (id, session_id, status, sort_index, payload, updated_at) VALUES (?, ?, ?, ?, ?, ?)",[s.id,s.sessionId,s.status,t,JSON.stringify(s),a]);await o.exec("COMMIT")}catch(t){throw await o.exec("ROLLBACK"),t}}n(D,"persistStoreData");export{S as a,E as b,T as c,D as d};
2
+ import{d as c}from"./chunk-LKKMLBOH.js";import{a as m}from"./chunk-DMFUEUAZ.js";import{t as p}from"./chunk-M3FLEZ4E.js";import{I as i,L as d}from"./chunk-BKEDG3A4.js";import{a as n}from"./chunk-FTQLQJQV.js";async function r(e,o){return(await e.allPayloadRows(`SELECT payload FROM ${o} ORDER BY sort_index ASC`)).map(t=>JSON.parse(t.payload))}n(r,"readStorePayloads");function S(e){let o=e,a=d.safeParse(o.openPondCommandAccessMode);return{...o,experience:l(o),openPondCommandAccessMode:a.success?a.data:i,currentProfile:o.currentProfile??null}}n(S,"normalizeSessionPayload");function l(e){let o=p.safeParse(e.experience);return o.success?o.data:!!(e.provider==="codex"||e.codexThreadId||e.systemKind||e.parentSessionId||e.subagentRunId||e.appId||e.workspaceKind||e.workspaceId||e.localProjectId||e.cloudProjectId)?"development":"chat"}n(l,"storedSessionExperience");async function E(e){return{sessions:(await r(e,"sessions")).map(S),turns:await r(e,"turns"),approvals:await r(e,"approvals")}}n(E,"readStoreMetadata");async function T(e){return{...await E(e),events:(await r(e,"events")).map(m)}}n(T,"readStoreData");async function D(e,o){let a=c();await o.exec("BEGIN IMMEDIATE");try{await o.exec("DELETE FROM approvals; DELETE FROM events; DELETE FROM turns; DELETE FROM sessions;");for(let[t,s]of e.sessions.entries())await o.run("INSERT INTO sessions (id, sort_index, payload, updated_at) VALUES (?, ?, ?, ?)",[s.id,t,JSON.stringify(s),s.updatedAt]);for(let[t,s]of e.turns.entries())await o.run("INSERT INTO turns (id, session_id, provider_turn_id, status, sort_index, payload, updated_at) VALUES (?, ?, ?, ?, ?, ?, ?)",[s.id,s.sessionId,s.providerTurnId,s.status,t,JSON.stringify(s),s.completedAt??s.startedAt]);for(let[t,s]of e.events.entries()){let u=t+1;await o.run("INSERT INTO events (id, session_id, turn_id, name, timestamp, sequence, sort_index, payload) VALUES (?, ?, ?, ?, ?, ?, ?, ?)",[s.id,s.sessionId??null,s.turnId??null,s.name,s.timestamp,u,t,JSON.stringify(s)])}for(let[t,s]of e.approvals.entries())await o.run("INSERT INTO approvals (id, session_id, status, sort_index, payload, updated_at) VALUES (?, ?, ?, ?, ?, ?)",[s.id,s.sessionId,s.status,t,JSON.stringify(s),a]);await o.exec("COMMIT")}catch(t){throw await o.exec("ROLLBACK"),t}}n(D,"persistStoreData");export{S as a,E as b,T as c,D as d};
@@ -1,4 +1,4 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{h as a}from"./chunk-LJDBR3RN.js";import{fb as d,ib as p}from"./chunk-TUCKED4T.js";import{a as o}from"./chunk-FTQLQJQV.js";function g(n,e,t,i){let s=n.get(`SELECT payload,package_payload FROM local_experiment_definitions WHERE team_id=? AND id=? ${i===void 0?"ORDER BY revision DESC LIMIT 1":"AND revision=?"}`,i===void 0?[e,t]:[e,t,i]);if(!s)throw new a("local_definition_not_found","Local Experiment definition is unavailable in this workspace.",404);return{definition:d.parse(JSON.parse(s.payload)),package:JSON.parse(s.package_payload)}}o(g,"localDefinition");function _(n,e,t){let i=n.get("SELECT payload FROM local_experiment_executions WHERE team_id=? AND id=?",[e,t]);if(!i)throw new a("local_execution_not_found","Local Experiment execution is unavailable in this workspace.",404);return p.parse(JSON.parse(i.payload))}o(_,"localExecution");function f(n,e,t){return n.all("SELECT receipt_id,status,admission,result,error FROM local_experiment_cases WHERE team_id=? AND execution_id=? ORDER BY ordinal",[e,t]).map(i=>({receiptId:i.receipt_id,status:i.status,admission:JSON.parse(i.admission),result:i.result?JSON.parse(i.result):null,error:i.error}))}o(f,"localCases");function L(n,e,t,i={}){let s=_(n,e,t),c={pending:0,running:0,completed:0,failed:0,cancelled:0,unknown:0};for(let u of n.all("SELECT status,COUNT(*) AS count FROM local_experiment_cases WHERE team_id=? AND execution_id=? GROUP BY status",[e,t]))c[u.status]=u.count;let r=n.get(`SELECT COALESCE(SUM(CASE WHEN status='settled' THEN cost_usd ELSE 0 END),0) AS spent,
2
+ import{h as a}from"./chunk-F6UQ6PPK.js";import{Wb as d,Zb as p}from"./chunk-M3FLEZ4E.js";import{a as o}from"./chunk-FTQLQJQV.js";function g(n,e,t,i){let s=n.get(`SELECT payload,package_payload FROM local_experiment_definitions WHERE team_id=? AND id=? ${i===void 0?"ORDER BY revision DESC LIMIT 1":"AND revision=?"}`,i===void 0?[e,t]:[e,t,i]);if(!s)throw new a("local_definition_not_found","Local Experiment definition is unavailable in this workspace.",404);return{definition:d.parse(JSON.parse(s.payload)),package:JSON.parse(s.package_payload)}}o(g,"localDefinition");function _(n,e,t){let i=n.get("SELECT payload FROM local_experiment_executions WHERE team_id=? AND id=?",[e,t]);if(!i)throw new a("local_execution_not_found","Local Experiment execution is unavailable in this workspace.",404);return p.parse(JSON.parse(i.payload))}o(_,"localExecution");function f(n,e,t){return n.all("SELECT receipt_id,status,admission,result,error FROM local_experiment_cases WHERE team_id=? AND execution_id=? ORDER BY ordinal",[e,t]).map(i=>({receiptId:i.receipt_id,status:i.status,admission:JSON.parse(i.admission),result:i.result?JSON.parse(i.result):null,error:i.error}))}o(f,"localCases");function L(n,e,t,i={}){let s=_(n,e,t),c={pending:0,running:0,completed:0,failed:0,cancelled:0,unknown:0};for(let u of n.all("SELECT status,COUNT(*) AS count FROM local_experiment_cases WHERE team_id=? AND execution_id=? GROUP BY status",[e,t]))c[u.status]=u.count;let r=n.get(`SELECT COALESCE(SUM(CASE WHEN status='settled' THEN cost_usd ELSE 0 END),0) AS spent,
3
3
  COALESCE(SUM(CASE WHEN status IN ('reserved','dispatched','unknown') THEN maximum_usd ELSE 0 END),0) AS held,
4
4
  COALESCE(SUM(CASE WHEN status IN ('dispatched','unknown') THEN 1 ELSE 0 END),0) AS uncertain FROM local_experiment_charges WHERE team_id=? AND execution_id=?`,[e,t]),l=p.parse({...s,...i,counts:c,usage:{knownCostUsd:r.spent,costUsd:r.uncertain?null:r.spent,heldUsd:r.held,uncertainRequests:r.uncertain}});return n.run("UPDATE local_experiment_executions SET payload=? WHERE team_id=? AND id=?",[JSON.stringify(l),e,t]),l}o(L,"refreshLocalExecution");function O(n,e,t,i,s,c){let r=n.get("SELECT kind,intent_hash,receipt FROM local_experiment_operations WHERE team_id=? AND operation_id=?",[e,t]);if(r){if(r.kind!==i||r.intent_hash!==s)throw new a("local_operation_conflict","This operation already owns different immutable inputs.");return JSON.parse(r.receipt)}let l=c();return n.run("INSERT INTO local_experiment_operations(team_id,operation_id,kind,intent_hash,receipt) VALUES(?,?,?,?,?)",[e,t,i,s,JSON.stringify(l)]),l}o(O,"localOperation");function w(n,e,t){n.run("INSERT INTO local_experiment_definitions(team_id,id,revision,content_hash,project_id,payload,package_payload) VALUES(?,?,?,?,?,?,?)",[e.teamId,e.id,e.revision,e.contentHash,e.configuration.request.project?.id??null,JSON.stringify(e),JSON.stringify(t)])}o(w,"writeLocalDefinition");var E=15e3;function T(n,e,t){let i=n.get("SELECT owner_id,pid,lease_until FROM local_experiment_owner WHERE singleton=1");if(i&&i.owner_id!==e&&S(i.pid))throw new a("local_runtime_already_owned","Another live local server owns Experiment execution in this installation.");n.run("INSERT INTO local_experiment_owner(singleton,owner_id,pid,lease_until) VALUES(1,?,?,?) ON CONFLICT(singleton) DO UPDATE SET owner_id=excluded.owner_id,pid=excluded.pid,lease_until=excluded.lease_until",[e,t,Date.now()+E])}o(T,"claimLocalExperimentOwner");function m(n,e){let t=n.get("SELECT owner_id,pid FROM local_experiment_owner WHERE singleton=1");if(!t||t.owner_id!==e||t.pid!==process.pid)throw new a("local_runtime_lease_lost","This process no longer owns local Experiment execution.")}o(m,"requireLocalRuntimeOwner");function R(n,e){m(n,e),n.run("UPDATE local_experiment_owner SET lease_until=? WHERE singleton=1 AND owner_id=?",[Date.now()+E,e])}o(R,"renewLocalExperimentOwner");function S(n){if(!Number.isSafeInteger(n)||n<=0)return!0;try{return process.kill(n,0),!0}catch(e){return!(e instanceof Error&&"code"in e&&e.code==="ESRCH")}}o(S,"alive");export{g as a,_ as b,f as c,L as d,O as e,w as f,T as g,m as h,R as i};
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{A as it,B as K,C as A,D as rt,E as at,b as u,f as I,g as Y,h as $,i as L,j as N,k as G,l as T,o as Q,r as Z,s as k,t as x,u as tt,v as M,w as et,x as z,y as q,z as nt}from"./chunk-YU3C6U5V.js";import{d as b}from"./chunk-557XSPVS.js";import{a as l}from"./chunk-FTQLQJQV.js";import{promises as mt}from"node:fs";async function $t(t,e,n={}){return O(A(t,e.id),e,n)}l($t,"loadWorkspaceState");async function O(t,e,n={}){let{workspacePath:i,repoPath:r}=t,a=it(e,n.gitBaseUrl);await mt.mkdir(i,{recursive:!0});let o=await L(r),s=null;if(!o&&n.clone&&a)try{await rt(r,i,a,n.token),o=!0}catch(m){s=m instanceof Error?m.message:String(m)}if(!o)return n.allowPlainFolder&&await $(r)?{appId:e.id,source:"local_folder",workspacePath:i,repoPath:r,initialized:!0,remoteUrl:null,expectedRemoteUrl:a,currentBranch:null,headCommit:null,upstreamBranch:null,ahead:0,behind:0,diverged:!1,linkedSourceHeadCommit:n.linkedSourceHeadCommit?.trim()||null,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,linkedSourceComparisonError:null,lastFetchAt:null,defaultBranch:e.defaultBranch??null,branches:[],dirty:!1,changedFilesCount:0,untrackedFilesCount:0,error:s,updatedAt:b()}:{appId:e.id,source:I(a),workspacePath:i,repoPath:r,initialized:o,remoteUrl:null,expectedRemoteUrl:a,currentBranch:null,headCommit:null,upstreamBranch:null,ahead:0,behind:0,diverged:!1,linkedSourceHeadCommit:n.linkedSourceHeadCommit?.trim()||null,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,linkedSourceComparisonError:null,lastFetchAt:null,defaultBranch:e.defaultBranch??null,branches:[],dirty:!1,changedFilesCount:0,untrackedFilesCount:0,error:s,updatedAt:b()};let[f,d,h,P,y]=await Promise.all([u("git",["branch","--show-current"],r),u("git",["branch","--format=%(refname:short)"],r),u("git",["status","--porcelain=v1","-b"],r),u("git",["config","--get","remote.origin.url"],r),u("git",["rev-parse","--verify","HEAD"],r)]),E=P.code===0&&Y(P.stdout.trim())||null,W=h.code===0?h.stdout.split(`
2
+ import{A as it,B as K,C as A,D as rt,E as at,b as u,f as I,g as Y,h as $,i as L,j as N,k as G,l as T,o as Q,r as Z,s as k,t as x,u as tt,v as M,w as et,x as z,y as q,z as nt}from"./chunk-YU3C6U5V.js";import{d as b}from"./chunk-LKKMLBOH.js";import{a as l}from"./chunk-FTQLQJQV.js";import{promises as mt}from"node:fs";async function $t(t,e,n={}){return O(A(t,e.id),e,n)}l($t,"loadWorkspaceState");async function O(t,e,n={}){let{workspacePath:i,repoPath:r}=t,a=it(e,n.gitBaseUrl);await mt.mkdir(i,{recursive:!0});let o=await L(r),s=null;if(!o&&n.clone&&a)try{await rt(r,i,a,n.token),o=!0}catch(m){s=m instanceof Error?m.message:String(m)}if(!o)return n.allowPlainFolder&&await $(r)?{appId:e.id,source:"local_folder",workspacePath:i,repoPath:r,initialized:!0,remoteUrl:null,expectedRemoteUrl:a,currentBranch:null,headCommit:null,upstreamBranch:null,ahead:0,behind:0,diverged:!1,linkedSourceHeadCommit:n.linkedSourceHeadCommit?.trim()||null,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,linkedSourceComparisonError:null,lastFetchAt:null,defaultBranch:e.defaultBranch??null,branches:[],dirty:!1,changedFilesCount:0,untrackedFilesCount:0,error:s,updatedAt:b()}:{appId:e.id,source:I(a),workspacePath:i,repoPath:r,initialized:o,remoteUrl:null,expectedRemoteUrl:a,currentBranch:null,headCommit:null,upstreamBranch:null,ahead:0,behind:0,diverged:!1,linkedSourceHeadCommit:n.linkedSourceHeadCommit?.trim()||null,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,linkedSourceComparisonError:null,lastFetchAt:null,defaultBranch:e.defaultBranch??null,branches:[],dirty:!1,changedFilesCount:0,untrackedFilesCount:0,error:s,updatedAt:b()};let[f,d,h,P,y]=await Promise.all([u("git",["branch","--show-current"],r),u("git",["branch","--format=%(refname:short)"],r),u("git",["status","--porcelain=v1","-b"],r),u("git",["config","--get","remote.origin.url"],r),u("git",["rev-parse","--verify","HEAD"],r)]),E=P.code===0&&Y(P.stdout.trim())||null,W=h.code===0?h.stdout.split(`
3
3
  `).filter(m=>m.trim()):[],S=et(W.find(m=>m.startsWith("## "))??""),p=W.filter(m=>{if(m.startsWith("## "))return!1;let B=M(m),V=B?k(B.path):null;return!!(V&&!x(V))}),C=p.filter(m=>m.startsWith("??")).length,F=f.code===0&&f.stdout.trim()?f.stdout.trim():null,R=y.code===0&&y.stdout.trim()||null,U=d.code===0?d.stdout.split(`
4
4
  `).map(m=>m.trim()).filter(Boolean):[],c=I(E)==="unknown"&&a?a:E??a,g=await ht(r,n.linkedSourceHeadCommit,R);return{appId:e.id,source:c?I(c):"local_git",workspacePath:i,repoPath:r,initialized:o,remoteUrl:E,expectedRemoteUrl:a,currentBranch:F,headCommit:R,upstreamBranch:S.upstreamBranch,ahead:S.ahead,behind:S.behind,diverged:S.ahead>0&&S.behind>0,linkedSourceHeadCommit:g.linkedSourceHeadCommit,aheadOfLinkedSource:g.aheadOfLinkedSource,behindLinkedSource:g.behindLinkedSource,divergedFromLinkedSource:g.divergedFromLinkedSource,linkedSourceComparisonError:g.error,lastFetchAt:await at(r),defaultBranch:e.defaultBranch??null,branches:U,dirty:p.length>0,changedFilesCount:p.length,untrackedFilesCount:C,error:s,updatedAt:b()}}l(O,"loadWorkspaceStateAtPath");async function ht(t,e,n){let i=e?.trim()||null,r={linkedSourceHeadCommit:i,aheadOfLinkedSource:0,behindLinkedSource:0,divergedFromLinkedSource:!1,error:null};if(!i||!n||i===n)return r;let a=await u("git",["rev-list","--left-right","--count",`${i}...${n}`],t);if(a.code!==0)return{...r,error:a.stderr.trim()||a.stdout.trim()||"Unable to compare linked source commit."};let[o,s]=a.stdout.trim().split(/\s+/,2),f=Number(o)||0,d=Number(s)||0;return{linkedSourceHeadCommit:i,aheadOfLinkedSource:d,behindLinkedSource:f,divergedFromLinkedSource:d>0&&f>0,error:null}}l(ht,"compareLinkedSourceCommit");async function zt(t,e,n){return gt(A(t,e.id),e,n)}l(zt,"createAndCheckoutBranch");async function gt(t,e,n,i={}){K(n);let r=await O(t,e,{...i,clone:!1});if(!r.initialized)throw new Error(r.error||"Workspace is not initialized");let a=await u("git",["checkout","-b",n.trim()],r.repoPath);if(a.code!==0)throw new Error(a.stderr.trim()||a.stdout.trim()||"Unable to create branch");return O(t,e,{...i,clone:!1})}l(gt,"createAndCheckoutBranchAtPath");async function Ht(t,e,n){return kt(A(t,e.id),e,n)}l(Ht,"checkoutBranch");async function kt(t,e,n,i={}){K(n);let r=await O(t,e,{...i,clone:!1});if(!r.initialized)throw new Error(r.error||"Workspace is not initialized");if(r.dirty&&r.currentBranch!==n.trim())throw new Error("Commit or discard local changes before switching branches");let a=await u("git",["checkout",n.trim()],r.repoPath);if(a.code!==0)throw new Error(a.stderr.trim()||a.stdout.trim()||"Unable to switch branch");return O(t,e,{...i,clone:!1})}l(kt,"checkoutBranchAtPath");import w from"node:path";import{promises as ct}from"node:fs";var wt=6,Wt=60,st=1e4,D=new Map;async function H(t,e,n=wt){let i=Math.max(1,Math.floor(n)),r=new Array(t.length),a=0;async function o(){for(;a<t.length;){let s=a;a+=1,r[s]=await e(t[s],s)}}return l(o,"worker"),await Promise.all(Array.from({length:Math.min(i,t.length)},()=>o())),r}l(H,"mapWorkspaceDiffEntriesWithConcurrency");function Xt(){D.clear()}l(Xt,"clearWorkspaceDiffCacheForTests");async function Jt(t,e,n={}){let{repoPath:i}=A(t,e.id);return Pt(i,e.id,n)}l(Jt,"loadWorkspaceDiff");async function Pt(t,e,n={}){let i=await L(t);if(!i){let c=await nt(t);return{appId:e,repoPath:t,initialized:c.length>0||await $(t),dirty:!1,filesChanged:0,additions:0,deletions:0,repoFiles:c,files:[],error:null,updatedAt:b()}}let r=await X(t),a=r.pathPrefix||".",[o,s]=await Promise.all([u("git",["rev-parse","HEAD"],r.commandCwd),u("git",["status","--porcelain=v1","-uall","--",a],r.commandCwd)]);if(s.code!==0)return{appId:e,repoPath:t,initialized:i,dirty:!1,filesChanged:0,additions:0,deletions:0,repoFiles:[],files:[],error:s.stderr.trim()||s.stdout.trim()||"Unable to read workspace diff",updatedAt:b()};let f=s.stdout.split(`
5
5
  `).map(M).filter(c=>!!c).map(c=>{let g=v(c.path,r.pathPrefix);if(!g)return null;let m=k(g);return m?{...c,path:m}:null}).filter(c=>c?!x(c.path):!1),d=await Ct(t,f),h=Ft({repoPath:t,workspaceId:e,includeFileDetails:!!n.includeFileDetails,head:o.code===0?o.stdout.trim():"unborn",pathPrefix:r.pathPrefix,status:s.stdout,worktreeSignature:d}),P=D.get(h);if(P)return j(P);let y=(await H(f,async c=>c.status==="deleted"||!await Z(t,c.path)?c:null)).filter(c=>!!c),E=await u("git",["ls-files","--",a],r.commandCwd),W=q([...E.code===0?E.stdout.split(`
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __openpondCreateRequire } from "node:module"; var require = __openpondCreateRequire(import.meta.url);
2
- import{a as ut}from"./chunk-SYUKES6H.js";import{a as pt}from"./chunk-IZ6DLEVY.js";import{b as se,m as mt,s as ft,t as ie,y as gt,z as ae}from"./chunk-YU3C6U5V.js";import{a as A,b as L}from"./chunk-KVTBX2UP.js";import{d as dt,g as Te}from"./chunk-557XSPVS.js";import{O as ct,r as at,z as Ie}from"./chunk-TUCKED4T.js";import{e as st}from"./chunk-OQPJ7FJF.js";import{P as oe,R as lt}from"./chunk-INO67SEN.js";import{L as it}from"./chunk-JY3YSI54.js";import{I as _e}from"./chunk-BKEDG3A4.js";import{a as i,c as Re,e as Pn}from"./chunk-FTQLQJQV.js";var kt=Re((as,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((ls,It)=>{"use strict";var _t="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",wt=new RegExp("^"+_t+"$"),bt="|&;()<> \\t",Mn="'([^']*?)'",Wn='"((\\\\"|[^"])*?)"',On=/^#$/,xt="'",Rt='"',ce="$",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 pt}from"./chunk-IZ6DLEVY.js";import{a as ut}from"./chunk-SYUKES6H.js";import{b as se,m as mt,s as ft,t as ie,y as gt,z as ae}from"./chunk-YU3C6U5V.js";import{a as A,b as L}from"./chunk-KVTBX2UP.js";import{d as dt,g as Te}from"./chunk-LKKMLBOH.js";import{Da as ct,_ as it,ga as at,oa as Ie}from"./chunk-M3FLEZ4E.js";import{e as st}from"./chunk-OQPJ7FJF.js";import{P as oe,R as lt}from"./chunk-GS6ZUSIN.js";import{I as _e}from"./chunk-BKEDG3A4.js";import{a as i,c as Re,e as Pn}from"./chunk-FTQLQJQV.js";var kt=Re((as,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((ls,It)=>{"use strict";var _t="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(","\\<\\<\\<",">>",">\\&","<\\&","[&;()|<>]"].join("|")+")",wt=new RegExp("^"+_t+"$"),bt="|&;()<> \\t",Mn="'([^']*?)'",Wn='"((\\\\"|[^"])*?)"',On=/^#$/,xt="'",Rt='"',ce="$",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=[],N=!1,R=null,V=!1,k;function tt(){k+=1;var I,X,be=u.charAt(k);if(be==="{"){if(k+=1,u.charAt(k)==="}")throw new Error("Bad substitution: "+u.slice(k-2,k+1));var re=1;for(I=k;re>0&&I<u.length;)u.charAt(I)==="{"&&u.charAt(I-1)==="$"?re+=1:u.charAt(I)==="}"&&(re-=1),I+=1;if(re!==0)throw new Error("Bad substitution: "+u.slice(k));I-=1,X=u.slice(k,I),k=I}else if(/[*@#?$!_-]/.test(be))X=be,k+=1;else{var xe=u.slice(k);I=xe.match(/[^\w\d_]/),I?(X=xe.slice(0,I.index),k+=I.index-1):(X=xe,k=u.length)}return $n(t,"",X)}i(tt,"parseEnvVar");function nt(){if(R!==null){if(R===0)m!==""&&(h[h.length]=m,m="");else{h[h.length]=m,m="";for(var I=1;I<R;I+=1)h[h.length]=""}R=null}}for(i(nt,"flushRun"),k=0;k<u.length;k++){var w=u.charAt(k);if(o&&w!==ce&&nt(),V=V||!p&&(w==="*"||w==="?"),f)m+=w,f=!1;else if(p)w===p?p=!1:p==xt?m+=w:w===r?(k+=1,w=u.charAt(k),w===Rt||w===r||w===ce?m+=w:m+=r+w):w===ce?m+=tt():m+=w;else if(w===Rt||w===xt)p=w,N=!0;else{if(wt.test(w))return{op:u};if(On.test(w)){c=!0;var rt={comment:e.slice(l.index+k+1)};return m.length?[m,rt]:[rt]}else if(w===r)f=!0;else if(w===ce){var ke=tt();if(!o)m+=ke;else for(var we=0;we<ke.length;we+=1){var W=ke.charAt(we);o.indexOf(W)<0?(nt(),m+=W):R===null?R=W===" "||W===" "||W===`
4
4
  `?0:1:W!==" "&&W!==" "&&W!==`
5
5
  `&&(R+=1)}}else m+=w}}if(V)return{op:"glob",pattern:m};if(o){if(R!==null&&R>0){h[h.length]=m,m="";for(var ot=1;ot<R;ot+=1)h[h.length]=""}return(m!==""||N&&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 Z from"node:path";import{mkdir as Fn}from"node:fs/promises";var Un=120,zn=3600,ue=6e4,St=2e4,Jn="Select a project to use this.";function Rs(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 de(l,null,"Command is empty.",Pt(c.timeoutSeconds));let u=Pt(c.timeoutSeconds),p=A({session:c.session}),f=Yn({requestedCwd:c.cwd,session:c.session}),m=!f&&!c.session.workspaceKind&&!c.session.systemKind&&e.managedChatCwd;m&&(f=Z.join(m,c.session.id.replace(/[^a-zA-Z0-9_-]/g,"_")),await Fn(f,{recursive:!0}));let h=!!(c.cwd?.trim()&&Z.isAbsolute(c.cwd.trim()));if(p.target==="sandbox"||!f||p.target!=="local"&&!h&&!m)return de(l,f,Jn,u);let N=c.session.openPondCommandAccessMode??_e;if(N==="disabled")return de(l,f,"Command access is disabled for this chat.",u);let R=Hn(l);if(N==="ask"&&!o.has(At(c.session.id,R))){let k=await d({command:l,cwd:f,family:R,input:c,timeoutSeconds:u});if(k==="acceptForSession"&&o.add(At(c.session.id,R)),k!=="accept"&&k!=="acceptForSession")return de(l,f,k==="cancel"?"Command was cancelled.":"Command was not approved.",u)}let V=e.executionEnvironment?await e.executionEnvironment(c):{};return Zn({command:l,cwd:f,timeoutSeconds:u,signal:c.signal,env:V})}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=er(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:Xn(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(Rs,"createOpenPondCommandAccessService");function Wt(e){return JSON.stringify({ok:e.ok,action:"exec_command",output:Qn(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=Kn(e);if(!t)return le(e,"Could not safely parse shell command.");let n=Gn(t);if(n===-1)return le(e,"Could not find command executable.");if(Vn(t))return le(e,"Shell operators require exact-command session approval.");let r=t[n],o=t[n+1]??null;return r==="pwd"?Y("pwd","pwd","Allowlisted read-only command."):r==="ls"?Y("ls","ls","Allowlisted directory listing command."):r==="git"&&o==="status"?Y("git status","git status","Allowlisted git status family."):r==="docker"&&o==="system"?Y("docker system","docker system","Allowlisted Docker system inspection family."):r==="bun"&&o==="run"?Y("bun run","bun run","Allowlisted Bun script execution family."):le(e,"Command is not in the broad session-approval allowlist.")}i(Hn,"classifyCommandFamily");function Kn(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(Kn,"safeShellTokens");function Gn(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(Gn,"firstCommandTokenIndex");function Vn(e){return e.some(t=>/^(?:\||&&|\|\||;|&|<|>|\(|\)|\{|\})$/.test(t))}i(Vn,"hasUnsafeShellSyntax");function Y(e,t,n){return{key:e,label:t,broad:!0,reason:n}}i(Y,"broadFamily");function le(e,t){return{key:`exact:${e}`,label:e,broad:!1,reason:t}}i(le,"exactCommandFamily");function At(e,t){return`${e}:${t.key}`}i(At,"sessionFamilyKey");function Xn(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(Xn,"commandRiskLabel");function Yn(e){let t=e.requestedCwd?.trim();return t?Z.isAbsolute(t)?Z.resolve(t):e.session.cwd?Z.resolve(e.session.cwd,t):null:e.session.cwd?.trim()||null}i(Yn,"resolveCommandCwd");function Pt(e){return Number.isFinite(e??NaN)?Math.max(1,Math.min(Math.floor(e),zn)):Un}i(Pt,"normalizedTimeout");function de(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(de,"blockedCommandResult");function Zn(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(),...e.env},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,N)=>{let R=N.toString("utf8");h==="stdout"?o=Ae(o,R):s=Ae(s,R),o.length+s.length>=ue&&(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,`
@@ -37,4 +37,4 @@ ${e.stderr}`:null].filter(Boolean).join(`
37
37
 
38
38
  `).trim();return{title:n,text:o}}i(xo,"extractReadableWebFetchText");function Ro(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(Ro,"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 _o(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:Io(t.url),publishedAt:t.publishedAt,updatedAt:t.updatedAt}))}}i(_o,"webSearchResultForModel");function Io(e){try{return new URL(e).hostname.replace(/^www\./i,"")}catch{return null}}i(Io,"hostnameFromUrl");function Mi(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(Mi,"createOpenPondProfileSkillModelToolDefinitions");function Wi(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(Wi,"createConnectedAppSkillModelToolDefinitions");function Oi(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:Po({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 oe.includes(l)?[[l,c]]:[]})),o=e.executeCrossSystemTool&&oe.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:Ao(l.turnMetadata),signal:l.signal}),"execute")})):[],s=e.actionCatalog.filter(c=>{let l=b(c.implementation),u=c.sourceActionId??c.name??c.id;return!oe.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:vo(c),enabled:n,execute:i(m=>Ke({action:c,context:m,deps:e,resultToolName:f,compactProfileResultForModel:!0,input:m.args}),"execute")}),"definition"),u=To(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=>Do(f).includes(l)).slice(0,u).map(Fo);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:b(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(Oi,"createOpenPondActionModelToolDefinitions");function To(e){let n=(e.sourceActionId??e.name??e.label??e.id).toLowerCase().replace(/[^a-z0-9_]+/g,"_").replace(/^_+|_+$/g,"").slice(0,44)||"action",r=yo("sha256").update(e.id).digest("hex").slice(0,8);return`agent_${n}_${r}`}i(To,"directOpenPondActionToolName");function mn(e){let t=y(b(e.implementation)?.actionId)??e.sourceActionId??e.name??e.id;return/^[A-Za-z0-9_-]{1,64}$/.test(t)?t:null}i(mn,"directOpenPondActionAliasName");function vo(e){let t=b(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(vo,"actionInputSchema");async function Ke(e){let{action:t,context:n,deps:r,resultToolName:o}=e,s=b(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?So(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 So(e){let t=b(e),n=y(t?.stdout);if(!n)return e;let r;try{r=JSON.parse(n)}catch{return e}let o=b(r)?.result??r,s=b(o),a=b(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(So,"compactProfileActionResult");function Ao(e){let t=e?.crossSystemTaskId;return typeof t=="string"&&t.trim()?t.trim().slice(0,240):void 0}i(Ao,"crossSystemTaskIdFromTurnMetadata");function Po(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(Po,"bindHarnessEpisodeArguments");function Co(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(Co,"sandboxWorkspaceToolSearchResult");async function Eo(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=Bo(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(Eo,"readSandboxResourceViaWorkspaceTool");function Mo(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(Mo,"gitResourceSearchResult");async function Wo(e){let t=A({session:e.session}),n=L(t),r=Oo(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=jo(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(Wo,"readGitResourceViaWorkspaceTool");function Oo(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(Oo,"gitResourceWorkspaceAction");function qo(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(qo,"sandboxResourceRefForExecutionTarget");function fn(e,t=!1){let n=b(e),r=b(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 jo(e){let t=b(e);return y(t?.diff)??y(b(t?.result)?.diff)}i(jo,"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 Bo(e){let t=b(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(Bo,"sandboxFileContent");function $o(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($o,"contentTypeForResourcePath");function bn(e){let t=b(e);return b(t?.file)??b(b(t?.result)?.file)}i(bn,"sandboxFileRecord");function xn(e,t){let n=bn(e),r=y(n?.contentType)??y(n?.mimeType)??$o(t),o=hn(n?.sizeBytes)??hn(n?.size);return{binary:n?.binary===!0||n?.isBinary===!0||(r?No(r):Lo(t)),contentType:r,...o!==null?{sizeBytes:o}:{}}}i(xn,"sandboxFileMetadata");function No(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(No,"isBinaryContentType");function Lo(e){return/\.(7z|avif|db|gif|gz|ico|jpe?g|mov|mp4|pdf|png|sqlite|tar|webp|xlsm?|xlsx|zip)$/i.test(e)}i(Lo,"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 Do(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(Do,"actionCatalogText");function Fo(e){let t=b(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(Fo,"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 b(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}i(b,"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)=>Uo(n,r)).filter(n=>!!n)}};function Bi(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:zo(o.argumentsJson,n.maxArgumentCharacters)}}))}}i(Bi,"assistantMessageForNativeToolCalls");function $i(e,t={}){return{role:"tool",tool_call_id:e.toolCallId,content:_n(e.contentText,t.maxContentCharacters)}}i($i,"toolResultMessage");function Ni(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(Ni,"parseNativeToolArguments");function Li(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(Li,"invalidNativeToolArgumentsResult");function Di(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(Di,"unknownNativeToolResult");function Uo(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(Uo,"completedToolCall");function Ye(e){return typeof e=="string"&&e.trim()?e:null}i(Ye,"stringValue");function zo(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(zo,"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 Fi(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(Fi,"nativeToolMcpResult");import{createHash as Jo}from"node:crypto";import{promises as Ho}from"node:fs";import Ko from"node:path";var he="openpond-work-v1",Go="mkdir -p inputs work outputs",Vo="find /workspace/inputs /workspace/work /workspace/outputs -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +",Xo=18e4,Yo=1e3,Zo=15e3,Qo=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(" "),es=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:Go,visibility:"private",networkPolicy:{internetEgress:"block",allowedHosts:[]},reuseDefaultRuntime:!1,markDefaultRuntime:!1,runtime:{runtimeProfileId:he,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:Vo,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 ts(l),p=await r(c,"sandbox_upload_file",{path:$("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 ts(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&&Jo("sha256").update(n).digest("hex")!==e.sha256)throw new Error(`Work input ${e.storageName} hash does not match its manifest.`);return n}i(ts,"workInputBytes");function $(e,t,n=["inputs","work","outputs"]){let r=ns(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=Ko.posix.normalize(o);if(s===".."||s.startsWith("../")||s.includes("/../"))throw new Error("Work path escaped its selected area.");return`${r}/${s}`}i($,"workPath");async function vn(e,t={}){let n=t.timeoutMs??Xo,r=t.pollMs??Yo,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(es.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 Gi(e,t={}){let n=t.timeoutMs??Zo,r=t.pollMs??Qo,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||rs(d.data))return d;await s(r)}return d??e()}i(Gi,"waitForWorkReceiptSettlement");function ns(e){if(typeof e!="string"||!e.trim())throw new Error("A required string argument is missing.");return e.trim()}i(ns,"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 rs(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(rs,"receiptSettlementComplete");import{randomUUID as os}from"node:crypto";function ye(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(ye,"workModelData");function oa(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:ss(),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:he,workspaceRoot:"/workspace",cwd:"/workspace/work",layout:{inputs:"/workspace/inputs",work:"/workspace/work",outputs:"/workspace/outputs"},status:ye(d.data)??null,probe:ye(l.data)??{output:l.output},executionBacked:l.ok}},null,2),data:{runtimeProfileId:he,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:$(a.args.area,J(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:$(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:$(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:$(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:$(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:J(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:J(a.args.agentId)||void 0,title:J(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:$("outputs",_(a.args.path),["outputs"]),suggestedName:J(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=is(a.args.url),p=Array.isArray(a.args.validation)?a.args.validation:[],f={id:os(),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:J(a.args.provider)||"external",resourceId:l,url:u,contentType:J(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(oa,"createWorkModelToolDefinitions");function ss(){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(ss,"savedWorkScheduleParameters");function Qe(e,t,n){return{toolCallId:e,name:t,ok:n.ok,contentText:JSON.stringify({...n,data:ye(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 J(e){return typeof e=="string"?e.trim():""}i(J,"optionalString");function is(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(is,"validHttpUrl");export{Jn as a,Rs as b,Wt as c,Ce as d,Ts as e,Cs as f,Es as g,Ms as h,Ws as i,Os as j,We as k,Q as l,Js as m,Nt as n,ur as o,Hs as p,Ks as q,Gs as r,Vs as s,gr as t,ai as u,Rn as v,Bi as w,$i as x,Ni as y,Li as z,Di as A,Fi as B,C,vi as D,Si as E,Ai as F,Pi as G,Ci as H,Ei as I,Mi as J,Wi as K,Oi as L,Gi as M,oa 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 Fi(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(Fi,"nativeToolMcpResult");import{createHash as Jo}from"node:crypto";import{promises as Ho}from"node:fs";import Ko from"node:path";var he="openpond-work-v1",Go="mkdir -p inputs work outputs",Vo="find /workspace/inputs /workspace/work /workspace/outputs -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +",Xo=18e4,Yo=1e3,Zo=15e3,Qo=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(" "),es=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:Go,visibility:"private",networkPolicy:{internetEgress:"block",allowedHosts:[]},reuseDefaultRuntime:!1,markDefaultRuntime:!1,runtime:{runtimeProfileId:he,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:Vo,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 ts(l),p=await r(c,"sandbox_upload_file",{path:$("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 ts(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&&Jo("sha256").update(n).digest("hex")!==e.sha256)throw new Error(`Work input ${e.storageName} hash does not match its manifest.`);return n}i(ts,"workInputBytes");function $(e,t,n=["inputs","work","outputs"]){let r=ns(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=Ko.posix.normalize(o);if(s===".."||s.startsWith("../")||s.includes("/../"))throw new Error("Work path escaped its selected area.");return`${r}/${s}`}i($,"workPath");async function vn(e,t={}){let n=t.timeoutMs??Xo,r=t.pollMs??Yo,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(es.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 Gi(e,t={}){let n=t.timeoutMs??Zo,r=t.pollMs??Qo,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||rs(d.data))return d;await s(r)}return d??e()}i(Gi,"waitForWorkReceiptSettlement");function ns(e){if(typeof e!="string"||!e.trim())throw new Error("A required string argument is missing.");return e.trim()}i(ns,"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 rs(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(rs,"receiptSettlementComplete");import{randomUUID as os}from"node:crypto";function ye(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(ye,"workModelData");function oa(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:ss(),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:he,workspaceRoot:"/workspace",cwd:"/workspace/work",layout:{inputs:"/workspace/inputs",work:"/workspace/work",outputs:"/workspace/outputs"},status:ye(d.data)??null,probe:ye(l.data)??{output:l.output},executionBacked:l.ok}},null,2),data:{runtimeProfileId:he,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:$(a.args.area,J(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:$(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:$(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:$(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:$(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:J(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:J(a.args.agentId)||void 0,title:J(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:$("outputs",_(a.args.path),["outputs"]),suggestedName:J(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=is(a.args.url),p=Array.isArray(a.args.validation)?a.args.validation:[],f={id:os(),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:J(a.args.provider)||"external",resourceId:l,url:u,contentType:J(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(oa,"createWorkModelToolDefinitions");function ss(){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(ss,"savedWorkScheduleParameters");function Qe(e,t,n){return{toolCallId:e,name:t,ok:n.ok,contentText:JSON.stringify({...n,data:ye(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 J(e){return typeof e=="string"?e.trim():""}i(J,"optionalString");function is(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(is,"validHttpUrl");export{Jn as a,Rs as b,Wt as c,Ce as d,Ts as e,Cs as f,Es as g,Ms as h,Ws as i,Os as j,We as k,Q as l,Js as m,Nt as n,ur as o,Hs as p,Ks as q,Gs as r,Vs as s,gr as t,ai as u,C as v,vi as w,Si as x,Ai as y,Pi as z,Ci as A,Ei as B,Mi as C,Wi as D,Oi as E,Rn as F,Bi as G,$i as H,Ni as I,Li as J,Di as K,Fi as L,Gi as M,oa as N};